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,11 +420,18 @@ public class DrmSharerConfig { ...@@ -422,11 +420,18 @@ 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();
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(); Date now = new Date();
SharerProductCommissionRecord record = new SharerProductCommissionRecord(); SharerProductCommissionRecord record = new SharerProductCommissionRecord();
record.setOpenId(loginUserInfo.getOpenId()); record.setOpenId(openId);
record.setSharerAppid(sharerAppid); record.setSharerAppid(sharerAppid);
record.setProductId(productId); record.setProductId(productId);
record.setOptType(optTypeEnum.getCode()); record.setOptType(optTypeEnum.getCode());
...@@ -438,9 +443,6 @@ public class DrmSharerConfig { ...@@ -438,9 +443,6 @@ public class DrmSharerConfig {
record.setCreateTime(now); record.setCreateTime(now);
record.setUpdateTime(now); record.setUpdateTime(now);
sharerProdutcCommissionRecordMapper.insert(record); sharerProdutcCommissionRecordMapper.insert(record);
} else {
log.error("用户登录状态过期,保存记录失败");
}
} }
/** /**
......
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