2 changed files with 54 additions and 0 deletions
@ -0,0 +1,53 @@ |
|||
package com.epmet.modules.support; |
|||
|
|||
import com.epmet.commons.tools.constant.NumConstant; |
|||
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|||
import com.epmet.commons.tools.exception.RenException; |
|||
|
|||
/** |
|||
* desc:小组成就下一等级规则工具类 |
|||
* |
|||
* @author: LiuJanJun |
|||
* @date: 2021/4/19 4:11 下午 |
|||
* @version: 1.0 |
|||
* @remark 利用此工具类生成下一等级的目标值 |
|||
*/ |
|||
public class GroupAchievementUtils { |
|||
//小组人数、话题数、转议题数、小组内问题解决数
|
|||
|
|||
/** |
|||
* desc:获取下一等级的话题数目标值 步长500 起始值 500 |
|||
* |
|||
* @param currentValue |
|||
*/ |
|||
public static Integer getNextTopicTargetValue(Integer currentValue) { |
|||
if (currentValue < NumConstant.FIVE_HUNDRED) { |
|||
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode()); |
|||
} |
|||
return currentValue + NumConstant.FIVE_HUNDRED; |
|||
} |
|||
|
|||
/** |
|||
* desc:获取下一等级的转议题数目标值 步长50 起始值 100 |
|||
* |
|||
* @param currentValue |
|||
*/ |
|||
public static Integer getNextToIssueTargetValue(Integer currentValue) { |
|||
if (currentValue < NumConstant.ONE_HUNDRED) { |
|||
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode()); |
|||
} |
|||
return currentValue + NumConstant.FIFTY; |
|||
} |
|||
|
|||
/** |
|||
* desc:获取下一等级的话题解决数目标值 步长100 起始值 100 |
|||
* |
|||
* @param currentValue |
|||
*/ |
|||
public static Integer getNextResolveTopicTargetValue(Integer currentValue) { |
|||
if (currentValue < NumConstant.ONE_HUNDRED) { |
|||
throw new RenException(EpmetErrorCode.INTERNAL_VALIDATE_ERROR.getCode()); |
|||
} |
|||
return currentValue + NumConstant.ONE_HUNDRED; |
|||
} |
|||
} |
|||
Loading…
Reference in new issue