Commit 21739ac2 by HlQ

[fixme] 同步合同时,修复 userid 获取的 bug

1 parent 036393a5
......@@ -126,7 +126,11 @@ public class ContractRunner {
// 合同状态不为空,代表此条记录为新增,需要同步销售人信息到 r_contract_user 表中
if (ObjUtil.isNotNull(v.getStatus())) {
RContractUser contractUser = new RContractUser();
contractUser.setUserId(Opt.ofNullable(redisTemplate.opsForValue().get("dingtalk:user:name:" + v.getSaleName())).map(Object::toString).orElse(null));
String userId = Opt.ofNullable(redisTemplate.opsForValue().get("dingtalk:user:name:" + v.getSaleName()))
.map(u -> (User) u)
.map(User::getUserid)
.orElse(null);
contractUser.setUserId(userId);
contractUser.setUsername(v.getSaleName());
contractUser.setContractId(v.getId());
contractUser.setContractNo(v.getContractNo());
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!