|
@ -117,19 +117,20 @@ public class StatsAchievementServiceImpl extends AbstractStatsAchievementService |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* desc: 计算小组的人数等级 |
|
|
* desc: 计算小组成就 |
|
|
* |
|
|
* |
|
|
* @param customerId |
|
|
* @param customerId |
|
|
* @param groupId |
|
|
* @param groupId |
|
|
*/ |
|
|
*/ |
|
|
private void calculateGroupAchievement(String customerId, String groupId, int currentValue, String achievementType) { |
|
|
private void calculateGroupAchievement(String customerId, String groupId, int currentValue, String achievementType) { |
|
|
|
|
|
//根据成就类型获取小组未实现成就 数据库正常只会有一条
|
|
|
ResiGroupAchievementStatsEntity one = super.achievementStatsService.selectLastUnAchieved(customerId, groupId, achievementType); |
|
|
ResiGroupAchievementStatsEntity one = super.achievementStatsService.selectLastUnAchieved(customerId, groupId, achievementType); |
|
|
|
|
|
|
|
|
List<ResiGroupAchievementStatsEntity> haveArrive = new ArrayList<>(); |
|
|
List<ResiGroupAchievementStatsEntity> haveArrive = new ArrayList<>(); |
|
|
//如果没有实现的额成就则说明是初始化
|
|
|
//如果没有实现的成就则说明是初始化
|
|
|
if (one == null) { |
|
|
if (one == null) { |
|
|
initAchievementStat(customerId, groupId, achievementType, currentValue, haveArrive); |
|
|
initAchievementStat(customerId, groupId, achievementType, currentValue, haveArrive); |
|
|
|
|
|
//初始化如果记录存在 只更新修改时间
|
|
|
super.achievementStatsService.saveOrUpdate(haveArrive, false); |
|
|
super.achievementStatsService.saveOrUpdate(haveArrive, false); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
@ -160,6 +161,13 @@ public class StatsAchievementServiceImpl extends AbstractStatsAchievementService |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* desc: 初始化成就 |
|
|
|
|
|
* |
|
|
|
|
|
* @return void |
|
|
|
|
|
* @author LiuJanJun |
|
|
|
|
|
* @date 2021/4/23 6:20 下午 |
|
|
|
|
|
*/ |
|
|
private void initAchievementStat(String customerId, String groupId, String achievementType, int currentValue, List<ResiGroupAchievementStatsEntity> haveArrive) { |
|
|
private void initAchievementStat(String customerId, String groupId, String achievementType, int currentValue, List<ResiGroupAchievementStatsEntity> haveArrive) { |
|
|
|
|
|
|
|
|
boolean isContinue; |
|
|
boolean isContinue; |
|
|