充值修改
This commit is contained in:
parent
22042eb66e
commit
cd481bd9e9
|
|
@ -511,15 +511,15 @@ public class PayServiceImpl implements PayService {
|
|||
@Override
|
||||
public CzgResult<Map<String, Object>> recharge(String clientIP, VipPayParamDTO rechargeDTO, Long shopUserId) {
|
||||
boolean isFree = checkPayVip(rechargeDTO);
|
||||
Long mainShopId = shopInfoService.getMainIdByShopId(rechargeDTO.getShopId());
|
||||
|
||||
ShopUser shopUser = shopUserService.getOne(new QueryWrapper().eq(ShopUser::getSourceShopId, rechargeDTO.getShopId())
|
||||
ShopUser shopUser = shopUserService.getOne(new QueryWrapper().eq(ShopUser::getMainShopId,mainShopId))
|
||||
.eq(ShopUser::getId, shopUserId));
|
||||
AssertUtil.isNull(shopUser, "充值失败 该店铺用户不存在");
|
||||
MkShopRechargeVO rechargeVO = shopRechargeService.detail(rechargeDTO.getShopId());
|
||||
if (rechargeDTO.getRechargeDetailId() == null && rechargeVO.getIsCustom() == 0) {
|
||||
throw new CzgException("未开启自定义充值金额");
|
||||
}
|
||||
Long mainShopId = shopInfoService.getMainIdByShopId(rechargeDTO.getShopId());
|
||||
UserInfo userInfo = userInfoService.getById(shopUser.getUserId());
|
||||
|
||||
BigDecimal amount = shopRechargeService.checkRecharge(mainShopId, rechargeDTO.getShopId(), shopUser.getUserId(), rechargeDTO.getRechargeDetailId(), rechargeDTO.getAmount());
|
||||
|
|
|
|||
Loading…
Reference in New Issue