Commit 1197d02d by fanjiaxin

分佣配置结构调整

parent 614d6fc1
Pipeline #71716 passed with stages
in 1 minute 0 seconds
......@@ -405,16 +405,23 @@ public class DrmSharerConfig {
return;
}
SharerInfo sharerInfo = getSharerInfoByOpenId(oldBo.getOpenId());
if(null == sharerInfo){
return;
}
// 设置推客分佣比例
boolean isSuccess = false;
try {
// 获取推客的分佣比例
BigDecimal sharerCommissionRatio = getSharerCommissionRatio(sharerInfo.getOpenId());
if (StringUtils.isNotBlank(sharerInfo.getSharerAppid())) {
// 分佣比例为小数, 微信接口参数应当分佣比例*倍数 为整数
sharerCommissionRatio = sharerCommissionRatio
.multiply(new BigDecimal(WeChatApi.WECHAT_COMMISSION_RATIO_MULTIPLIER))
.setScale(0, RoundingMode.DOWN);
// 设置推客分佣比例
weChatShopSetSharerProductCommissionRequest.handle(sharerInfo.getSharerAppid(),
Long.valueOf(oldBo.getProductId()), null);
Long.valueOf(oldBo.getProductId()), sharerCommissionRatio.longValue());
}
// 获取推客的分佣比例
BigDecimal sharerCommissionRatio = getSharerCommissionRatio(sharerInfo.getOpenId(), null);
// 保存推客商品记录
saveSharerProductCommissionInfo(sharerInfo.getOpenId(), oldBo.getProductId(),
sharerCommissionRatio, SharerProductCommission.UnsetEnum.UNSET);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment