Commit 7422f9ba authored by shangtx's avatar shangtx

fix: 修改用户类型bug

parent 0a8cf3a0
...@@ -52,10 +52,12 @@ public class UserService extends AbstractMapper<User> { ...@@ -52,10 +52,12 @@ public class UserService extends AbstractMapper<User> {
condition.setAccountNo(user.getId()); condition.setAccountNo(user.getId());
var promote = servicePromoteMapper.selectOne(condition); var promote = servicePromoteMapper.selectOne(condition);
if(promote == null) { if(promote == null) {
var modifyUser = userMapper.selectByPrimaryKey(user.getId());
promote = condition; promote = condition;
promote.setCount(0); promote.setCount(0);
promote.setUserName(modifyUser.getUserName());
EntityUtils.insert(promote, userId); EntityUtils.insert(promote, userId);
servicePromoteMapper.insertSelective(promote); servicePromoteMapper.insert(promote);
} }
} }
return this.updateByPrimaryKeySelective(user); return this.updateByPrimaryKeySelective(user);
......
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