Commit 1cf8a856 by fanjiaxin

联调问题处理

parent 8504a285
Pipeline #71616 passed with stages
in 1 minute 3 seconds
......@@ -14,8 +14,6 @@ import com.ctrip.framework.apollo.model.ConfigChangeEvent;
import com.ctrip.framework.apollo.spring.annotation.ApolloConfigChangeListener;
import com.ctrip.framework.apollo.spring.annotation.EnableAutoUpdateApolloConfig;
import com.ctrip.framework.apollo.spring.annotation.ValueMapping;
import com.netease.yanxuan.wx.store.sharer.biz.core.LoginUserContextHolder;
import com.netease.yanxuan.wx.store.sharer.biz.core.LoginUserInfo;
import com.netease.yanxuan.wx.store.sharer.biz.meta.enums.CommissionChangeOptTypeEnum;
import com.netease.yanxuan.wx.store.sharer.biz.meta.model.bo.CommissionSharerBO;
import com.netease.yanxuan.wx.store.sharer.biz.meta.model.bo.CommissionSharerProductBO;
......@@ -422,25 +420,29 @@ public class DrmSharerConfig {
BigDecimal newCommissionRatio,
CommissionChangeOptTypeEnum optTypeEnum,
boolean isSuccess) {
LoginUserInfo loginUserInfo = LoginUserContextHolder.get();
if (null != loginUserInfo) {
Date now = new Date();
SharerProductCommissionRecord record = new SharerProductCommissionRecord();
record.setOpenId(loginUserInfo.getOpenId());
record.setSharerAppid(sharerAppid);
record.setProductId(productId);
record.setOptType(optTypeEnum.getCode());
record.setOptInfo(oldCommissionRatio.toPlainString() + "&"
+ (null == newCommissionRatio ? "" : newCommissionRatio.toPlainString()));
record.setOptTime(now);
record.setOptStatus(isSuccess ? "1" : "2");
record.setExtInfo("");
record.setCreateTime(now);
record.setUpdateTime(now);
sharerProdutcCommissionRecordMapper.insert(record);
} else {
log.error("用户登录状态过期,保存记录失败");
String openId = null;
LambdaQueryWrapper<SharerInfo> sharerInfoLqw = Wrappers.lambdaQuery();
sharerInfoLqw.select(SharerInfo::getOpenId);
sharerInfoLqw.eq(SharerInfo::getSharerAppid, sharerAppid);
sharerInfoLqw.last("LIMIT 1");
SharerInfo sharerInfo = sharerInfoMapper.selectOne(sharerInfoLqw);
if (null != sharerInfo && StringUtils.isNotBlank(sharerInfo.getOpenId())) {
openId = sharerInfo.getOpenId();
}
Date now = new Date();
SharerProductCommissionRecord record = new SharerProductCommissionRecord();
record.setOpenId(openId);
record.setSharerAppid(sharerAppid);
record.setProductId(productId);
record.setOptType(optTypeEnum.getCode());
record.setOptInfo(oldCommissionRatio.toPlainString() + "&"
+ (null == newCommissionRatio ? "" : newCommissionRatio.toPlainString()));
record.setOptTime(now);
record.setOptStatus(isSuccess ? "1" : "2");
record.setExtInfo("");
record.setCreateTime(now);
record.setUpdateTime(now);
sharerProdutcCommissionRecordMapper.insert(record);
}
/**
......
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