Commit 70fe96ea authored by licc's avatar licc

用户升级修改

parent 158c8eac
......@@ -915,10 +915,19 @@ public class UserLevelServiceImpl extends ServiceImpl<UsersMapper, User> impleme
AccountInfo accountInfoByUserId = accountMapper.getByUserId(userId);
accountInfoByUserId.setUserLevel(userLevel);
TeamPerformance teamPerformanceByUserId = teamPerformanceMapper.getByUserIdAndTime(userId,format);
teamPerformanceByUserId.setUserLevel(userLevel);
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);
teamPerformanceMapper.edit(teamPerformanceByUserId);
}
accountMapper.edit(accountInfoByUserId);
teamPerformanceMapper.edit(teamPerformanceByUserId);
}
}
......
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