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; ...@@ -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.ApolloConfigChangeListener;
import com.ctrip.framework.apollo.spring.annotation.EnableAutoUpdateApolloConfig; import com.ctrip.framework.apollo.spring.annotation.EnableAutoUpdateApolloConfig;
import com.ctrip.framework.apollo.spring.annotation.ValueMapping; 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.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.CommissionSharerBO;
import com.netease.yanxuan.wx.store.sharer.biz.meta.model.bo.CommissionSharerProductBO; import com.netease.yanxuan.wx.store.sharer.biz.meta.model.bo.CommissionSharerProductBO;
...@@ -422,25 +420,29 @@ public class DrmSharerConfig { ...@@ -422,25 +420,29 @@ public class DrmSharerConfig {
BigDecimal newCommissionRatio, BigDecimal newCommissionRatio,
CommissionChangeOptTypeEnum optTypeEnum, CommissionChangeOptTypeEnum optTypeEnum,
boolean isSuccess) { boolean isSuccess) {
LoginUserInfo loginUserInfo = LoginUserContextHolder.get(); String openId = null;
if (null != loginUserInfo) { LambdaQueryWrapper<SharerInfo> sharerInfoLqw = Wrappers.lambdaQuery();
Date now = new Date(); sharerInfoLqw.select(SharerInfo::getOpenId);
SharerProductCommissionRecord record = new SharerProductCommissionRecord(); sharerInfoLqw.eq(SharerInfo::getSharerAppid, sharerAppid);
record.setOpenId(loginUserInfo.getOpenId()); sharerInfoLqw.last("LIMIT 1");
record.setSharerAppid(sharerAppid); SharerInfo sharerInfo = sharerInfoMapper.selectOne(sharerInfoLqw);
record.setProductId(productId); if (null != sharerInfo && StringUtils.isNotBlank(sharerInfo.getOpenId())) {
record.setOptType(optTypeEnum.getCode()); openId = sharerInfo.getOpenId();
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("用户登录状态过期,保存记录失败");
} }
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