fix:扫一扫选择钱包进行支付
This commit is contained in:
1 parent
b07d43a339
commit
b5cdcaf2d3
4 files changed
+6
-5
No files matched your search
+3
-3
@@ -11,9 +11,9 @@ public class HardAppCreateOrderScancode {
|
||||
@NotNull(message = "商户id不能为空")
|
||||
private Long merchantId;
|
||||
|
||||
@Schema(description = "钱包类型id")
|
||||
@NotNull(message = "钱包类型id不能为空")
|
||||
private Long walletTypeId;
|
||||
@Schema(description = "钱包id")
|
||||
@NotNull(message = "钱包id不能为空")
|
||||
private Long walletId;
|
||||
|
||||
@Schema(description = "用户输入的价格")
|
||||
@NotNull(message = "自定义金额不能为空")
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ public class HardAppCreateOrderDto {
|
||||
@NotNull(message = "用户id不能为空")
|
||||
private Long userId;
|
||||
|
||||
@NotNull(message = "钱包类型不能为空")
|
||||
// @NotNull(message = "钱包类型不能为空")
|
||||
private WalletTypeEnum walletType;
|
||||
|
||||
@NotNull(message = "订单类型不能为空")
|
||||
|
||||
+1
@@ -151,6 +151,7 @@ public class HardOrderController {
|
||||
HardAppCreateOrderDto dto = HardAppCreateOrderDto.builder()
|
||||
.customPrice(body.getCustomPrice())
|
||||
.merchantId(body.getMerchantId())
|
||||
.walletId(body.getWalletId())
|
||||
.userId(user.getId())
|
||||
.hardType(HardTypeEnum.MERCHANT_QR_CODE)
|
||||
.orderType(HardOrderTypeEnum.BELOW)
|
||||
|
||||
+1
-1
@@ -366,7 +366,7 @@ public class HardOrderServiceImpl extends ServiceImpl<HardOrderMapper, HardOrder
|
||||
UserInfo userDetail = userService.getByUserId(dto.getUserId()).getData();
|
||||
if (ObjectUtil.isEmpty(userDetail)) throw new RuntimeException("用户不存在不存在");
|
||||
// 钱包
|
||||
WalletManageEntity wallet = remoteWalletService.getWalletByWalletTypeId(dto.getUserId(), dto.getWalletId()).getData();
|
||||
WalletManageEntity wallet = remoteWalletService.getWalletById(dto.getWalletId()).getData();
|
||||
if (ObjectUtil.isEmpty(wallet)) throw new RuntimeException("用户钱包不存在");
|
||||
Integer balance = wallet.getBalance();
|
||||
int totalPrice = dto.getCustomPrice();
|
||||
|
||||
Reference in new issue
Block a user