门店 id对应不上的问题
This commit is contained in:
parent
b64c2fa598
commit
bbc1eadd71
|
|
@ -203,7 +203,7 @@ public class PayServiceImpl implements PayService {
|
||||||
AssertUtil.isNull(shopUser, "会员不存在");
|
AssertUtil.isNull(shopUser, "会员不存在");
|
||||||
UserInfo userInfo = userInfoService.getById(shopUser.getUserId());
|
UserInfo userInfo = userInfoService.getById(shopUser.getUserId());
|
||||||
AssertUtil.isNull(userInfo, "用户信息不存在");
|
AssertUtil.isNull(userInfo, "用户信息不存在");
|
||||||
if (userInfo.getUsePayPwd() == 1 ) {
|
if (userInfo.getUsePayPwd() == 1) {
|
||||||
AssertUtil.isBlank(payParam.getPwd(), "支付密码不能为空");
|
AssertUtil.isBlank(payParam.getPwd(), "支付密码不能为空");
|
||||||
if (userInfo.getPayPwd() == null || !userInfo.getPayPwd().equals(MD5Util.md5AsHex(payParam.getPwd()))) {
|
if (userInfo.getPayPwd() == null || !userInfo.getPayPwd().equals(MD5Util.md5AsHex(payParam.getPwd()))) {
|
||||||
return CzgResult.failure("支付密码错误");
|
return CzgResult.failure("支付密码错误");
|
||||||
|
|
@ -216,8 +216,17 @@ public class PayServiceImpl implements PayService {
|
||||||
}
|
}
|
||||||
payParam.getCheckOrderPay().setUserId(shopUser.getUserId());
|
payParam.getCheckOrderPay().setUserId(shopUser.getUserId());
|
||||||
OrderInfo orderInfo = checkPay(payParam.getCheckOrderPay());
|
OrderInfo orderInfo = checkPay(payParam.getCheckOrderPay());
|
||||||
if (!shopUser.getSourceShopId().equals(orderInfo.getShopId()) && !shopUser.getMainShopId().equals(orderInfo.getShopId())) {
|
if (shopInfo.getIsHeadShop().equals(1)) {
|
||||||
return CzgResult.failure("违规操作,请确认店铺后重试");
|
if (!shopUser.getMainShopId().equals(orderInfo.getShopId())) {
|
||||||
|
return CzgResult.failure("违规操作,请确认店铺后重试");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
boolean exists = shopInfoService.exists(QueryWrapper.create()
|
||||||
|
.eq(ShopInfo::getMainId, shopInfo.getMainId())
|
||||||
|
.eq(ShopInfo::getId, orderInfo.getShopId()));
|
||||||
|
if(!exists){
|
||||||
|
return CzgResult.failure("违规操作,请确认店铺后重试");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (shopUser.getAmount().compareTo(orderInfo.getOrderAmount()) < 0) {
|
if (shopUser.getAmount().compareTo(orderInfo.getOrderAmount()) < 0) {
|
||||||
return CzgResult.failure("会员余额不足");
|
return CzgResult.failure("会员余额不足");
|
||||||
|
|
@ -501,7 +510,7 @@ public class PayServiceImpl implements PayService {
|
||||||
boolean isFree = checkPayVip(rechargeDTO);
|
boolean isFree = checkPayVip(rechargeDTO);
|
||||||
Long mainShopId = shopInfoService.getMainIdByShopId(rechargeDTO.getShopId());
|
Long mainShopId = shopInfoService.getMainIdByShopId(rechargeDTO.getShopId());
|
||||||
|
|
||||||
ShopUser shopUser = shopUserService.getOne(new QueryWrapper().eq(ShopUser::getMainShopId,mainShopId)
|
ShopUser shopUser = shopUserService.getOne(new QueryWrapper().eq(ShopUser::getMainShopId, mainShopId)
|
||||||
.eq(ShopUser::getId, shopUserId));
|
.eq(ShopUser::getId, shopUserId));
|
||||||
AssertUtil.isNull(shopUser, "充值失败 该店铺用户不存在");
|
AssertUtil.isNull(shopUser, "充值失败 该店铺用户不存在");
|
||||||
MkShopRechargeVO rechargeVO = shopRechargeService.detail(rechargeDTO.getShopId());
|
MkShopRechargeVO rechargeVO = shopRechargeService.detail(rechargeDTO.getShopId());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue