Commit 0ec60626 authored by codezwjava's avatar codezwjava

修改用户升级后同步账户表和团队业绩表等级bug

parent 9582f8aa
......@@ -11,6 +11,8 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
/**
......@@ -889,17 +891,20 @@ public class UserLevelServiceImpl extends ServiceImpl<UsersMapper, User> impleme
@Override
public void accountAndTeamPerformanceUserLevelUpdate(String userId){
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM");
String format = dateFormat.format(new Date());
User userByUserId = usersMapper.getUserByUserId(userId);
if (null != userByUserId){
int userLevel = userByUserId.getUserLevel();
AccountInfo accountInfoByUserId = accountMapper.getByUserId(userId);
accountInfoByUserId.setUserLevel(userLevel);
TeamPerformance teamPerformanceByUserId = teamPerformanceMapper.getByUserId(userId);
TeamPerformance teamPerformanceByUserId = teamPerformanceMapper.getByUserIdAndTime(userId,format);
teamPerformanceByUserId.setUserLevel(userLevel);
accountMapper.updateById(accountInfoByUserId);
teamPerformanceMapper.updateById(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