运营端充值
This commit is contained in:
@@ -134,4 +134,15 @@ public class MkDistributionConfigServiceImpl extends ServiceImpl<MkDistributionC
|
||||
distributionUserService.addDistributionUser(new MkDistributionUser().setParentId(null).setShopId(shopId)
|
||||
.setShopUserId(shopUserInfo.getId()).setOpeningMethod("付费开通"));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void rechargeCallBack(Long userId, Long shopId, BigDecimal amount, Long paymentId) {
|
||||
Long mainShopId = shopInfoService.getMainIdByShopId(shopId);
|
||||
BigDecimal finalAmount = shopInfoService.updateAmount(shopId, amount);
|
||||
distributionAmountFlowService.save(new MkDistributionAmountFlow()
|
||||
.setType(TableValueConstant.DistributionAmountFlow.Type.SELF_RECHARGE.getCode())
|
||||
.setMainShopId(mainShopId).setShopId(shopId).setAmount(finalAmount).setChangeAmount(amount).setSourceId(paymentId)
|
||||
.setRemark("自助充值").setOpAccount(StpKit.USER.getAccount()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.czg.service.order.service.impl;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.czg.account.entity.ShopInfo;
|
||||
import com.czg.account.entity.ShopUser;
|
||||
import com.czg.account.entity.UserInfo;
|
||||
@@ -82,6 +83,11 @@ public class DistributionPayServiceImpl implements DistributionPayService {
|
||||
initInfo.setPayment(orderPayment).setShopUser(shopUserInfo)
|
||||
.setOpenId("aliPay".equals(payParam.getPayType()) ? userInfo.getAlipayOpenId() : userInfo.getWechatOpenId());
|
||||
}
|
||||
|
||||
if (StrUtil.isNotBlank(payParam.getCode())) {
|
||||
String openId = wxService.getOpenId(payParam.getCode());
|
||||
initInfo.setOpenId(openId);
|
||||
}
|
||||
return initInfo;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user