记得上下班打卡 | git大法好,push需谨慎

Commit a99ba576 authored by GaoHu's avatar GaoHu

exit

parent 320a2411
......@@ -228,6 +228,8 @@ public class SmileUserServiceImpl extends ServiceImpl<SmileUserMapper, SmileUser
smileUser.setDelTag(0);
smileUser.setType(5);
smileUser.setAgent(1);
smileUser.setCreatedDate(LocalDateTime.now());
smileUser.setUpdatedDate(LocalDateTime.now());
int insert = smileUserMapper.insert(smileUser);
//票提新增
SmileAgent smileAgent = SmileAgent.getNew();
......@@ -239,6 +241,17 @@ public class SmileUserServiceImpl extends ServiceImpl<SmileUserMapper, SmileUser
smileAgentMapper.insert(smileAgent);
if (insert > 0) {
//新增缓存
SmileUserVO smileUserVO = getSmileUserVO(uid, smileUser);
smileRedisUtils.setSmileUserVo(uid, smileUserVO);
SmileAgentVo smileAgentVo = SmileAgentVo.getNew();
BeanUtils.copyProperties(smileAgent, smileAgentVo);
smileRedisUtils.setAgent(smileAgent.getPerformanceId(), smileAgent.getTicketId(), smileAgentVo);
return AjaxResult.success();
}
return AjaxResult.warn("添加失败,请联系管理员!");
}
private SmileUserVO getSmileUserVO(String uid, SmileUser smileUser) {
SmileUserVO smileUserVO = new SmileUserVO();
smileUserVO.setUid(smileUser.getUid());
smileUserVO.setPhone(smileUser.getPhone());
......@@ -248,13 +261,9 @@ public class SmileUserServiceImpl extends ServiceImpl<SmileUserMapper, SmileUser
smileUserVO.setType(5);
smileUserVO.setAgentId(uid);
smileUserVO.setAgent(1);
smileRedisUtils.setSmileUserVo(uid, smileUserVO);
SmileAgentVo smileAgentVo = SmileAgentVo.getNew();
BeanUtils.copyProperties(smileAgent, smileAgentVo);
smileRedisUtils.setAgent(smileAgent.getPerformanceId(), smileAgent.getTicketId(), smileAgentVo);
return AjaxResult.success();
}
return AjaxResult.warn("添加失败,请联系管理员!");
smileUserVO.setCreatedDate(smileUser.getCreatedDate());
smileUserVO.setUpdatedDate(smileUser.getUpdatedDate());
return smileUserVO;
}
private void updateUserVoRedis(SmileUserCheckVo smileUserCheckVo, SmileOrganization smileOrganization) {
......
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