Commit 70fe96ea authored by licc's avatar licc

用户升级修改

parent 158c8eac
...@@ -915,11 +915,20 @@ public class UserLevelServiceImpl extends ServiceImpl<UsersMapper, User> impleme ...@@ -915,11 +915,20 @@ public class UserLevelServiceImpl extends ServiceImpl<UsersMapper, User> impleme
AccountInfo accountInfoByUserId = accountMapper.getByUserId(userId); AccountInfo accountInfoByUserId = accountMapper.getByUserId(userId);
accountInfoByUserId.setUserLevel(userLevel); accountInfoByUserId.setUserLevel(userLevel);
TeamPerformance teamPerformanceByUserId = teamPerformanceMapper.getByUserIdAndTime(userId,format); TeamPerformance teamPerformanceByUserId = teamPerformanceMapper.getByUserIdAndTime(userId,format);
if(null == teamPerformanceByUserId){
TeamPerformance teamPerformance = new TeamPerformance();
teamPerformance.setUserId(userId);
teamPerformance.setUserLevel(userLevel);
teamPerformance.setYearMonth(format);
teamPerformance.setMonthTeamPerformance(new BigDecimal(0));
teamPerformanceMapper.add(teamPerformance);
}else {
teamPerformanceByUserId.setUserLevel(userLevel); teamPerformanceByUserId.setUserLevel(userLevel);
accountMapper.edit(accountInfoByUserId);
teamPerformanceMapper.edit(teamPerformanceByUserId); teamPerformanceMapper.edit(teamPerformanceByUserId);
} }
accountMapper.edit(accountInfoByUserId);
}
} }
/** /**
......
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