feat:创建共富商城订单
This commit is contained in:
1 parent
3672f9b5b4
commit
c303814c09
3 files changed
+3
-4
No files matched your search
+2
-2
@@ -19,8 +19,8 @@ public class HardAppCreateFarmerOrderDto {
|
||||
@NotNull(message = "购物车id不能为空")
|
||||
private Long carParentId;
|
||||
|
||||
@NotNull(message = "钱包类型不能为空")
|
||||
private WalletTypeEnum walletType;
|
||||
@NotNull(message = "钱包类型id")
|
||||
private Long walletTypeId;
|
||||
|
||||
@NotNull(message = "自提点id不能为空")
|
||||
private Long pickUpId;
|
||||
|
||||
-1
@@ -194,7 +194,6 @@ public class HardOrderController {
|
||||
@Idempotent(expireTime = 3, key = "'/app/hard-order/app/create-farmer-order' + #body.getCarParentId() ", info = "正在创建订单中,请勿重复操作")
|
||||
public R<Long> appCreateFarmerReserveOrder(@RequestBody HardAppCreateFarmerOrderDto body) {
|
||||
PjcloudUser user = SecurityUtils.getUser();
|
||||
body.setWalletType(WalletTypeEnum.EAT);
|
||||
body.setHardType(HardTypeEnum.SUPERMARKET);
|
||||
body.setUserId(user.getId());
|
||||
body.setOrderType(HardOrderTypeEnum.FARMER);
|
||||
|
||||
+1
-1
@@ -642,7 +642,7 @@ public class HardOrderServiceImpl extends ServiceImpl<HardOrderMapper, HardOrder
|
||||
UserInfo userDetail = userService.getInnerByUserId(dto.getUserId()).getData();
|
||||
if (ObjectUtil.isEmpty(userDetail)) throw new RuntimeException("用户不存在不存在");
|
||||
// 钱包
|
||||
WalletManageEntity wallet = remoteWalletService.getWallet(dto.getUserId(), dto.getWalletType()).getData();
|
||||
WalletManageEntity wallet = remoteWalletService.getWalletByWalletTypeId(dto.getUserId(), dto.getWalletTypeId()).getData();
|
||||
if (ObjectUtil.isEmpty(wallet)) throw new RuntimeException("用户钱包不存在");
|
||||
// 查询父订单
|
||||
HardParentCarEntity parentCar = hardCarService.getParentCarById(dto.getCarParentId());
|
||||
|
||||
Reference in new issue
Block a user