| | |
| | | import cc.mrbird.febs.common.entity.FebsConstant; |
| | | import cc.mrbird.febs.common.enumerates.AgentLevelEnum; |
| | | import cc.mrbird.febs.common.enumerates.DataDictionaryEnum; |
| | | import cc.mrbird.febs.common.enumerates.GreenScoreEnum; |
| | | import cc.mrbird.febs.common.enumerates.OrderPayMethodEnum; |
| | | import cc.mrbird.febs.common.service.ValidateCodeService; |
| | | import cc.mrbird.febs.common.utils.FebsUtil; |
| | |
| | | model.addAttribute("hlmBasicPerk", hlmBasicPerkDto); |
| | | return FebsUtil.view("modules/system/hlmBasicPerk"); |
| | | } |
| | | |
| | | /** |
| | | * 积分凭证设置 |
| | | * @param model |
| | | * @return |
| | | */ |
| | | @GetMapping("hlmVoucherSet") |
| | | @RequiresPermissions("hlmVoucherSet:view") |
| | | public String hlmVoucherSet(Model model) { |
| | | HlmVoucherSetDto hlmVoucherSetDto = new HlmVoucherSetDto(); |
| | | DataDictionaryCustom totalCntDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( |
| | | GreenScoreEnum.TOTAL_CNT.getType(), |
| | | GreenScoreEnum.TOTAL_CNT.getCode()); |
| | | if (totalCntDic != null) { |
| | | String totalCnt = ObjectUtil.isEmpty(totalCntDic.getValue()) ? "0" : totalCntDic.getValue(); |
| | | hlmVoucherSetDto.setTotalCnt(totalCnt); |
| | | } |
| | | DataDictionaryCustom surplusCntDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( |
| | | GreenScoreEnum.SURPLUS_CNT.getType(), |
| | | GreenScoreEnum.SURPLUS_CNT.getCode()); |
| | | if (surplusCntDic != null) { |
| | | String surplusCnt = ObjectUtil.isEmpty(surplusCntDic.getValue()) ? "0" : surplusCntDic.getValue(); |
| | | hlmVoucherSetDto.setSurplusCnt(surplusCnt); |
| | | } |
| | | DataDictionaryCustom roleReleasePercentDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( |
| | | GreenScoreEnum.ROLE_RELEASE_PERCENT.getType(), |
| | | GreenScoreEnum.ROLE_RELEASE_PERCENT.getCode()); |
| | | if (roleReleasePercentDic != null) { |
| | | String roleReleasePercent = ObjectUtil.isEmpty(roleReleasePercentDic.getValue()) ? "0" : roleReleasePercentDic.getValue(); |
| | | hlmVoucherSetDto.setRoleReleasePercent(roleReleasePercent); |
| | | } |
| | | DataDictionaryCustom achieveReleasePercentDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( |
| | | GreenScoreEnum.ACHIEVE_RELEASE_PERCENT.getType(), |
| | | GreenScoreEnum.ACHIEVE_RELEASE_PERCENT.getCode()); |
| | | if (achieveReleasePercentDic != null) { |
| | | String achieveReleasePercent = ObjectUtil.isEmpty(achieveReleasePercentDic.getValue()) ? "0" : achieveReleasePercentDic.getValue(); |
| | | hlmVoucherSetDto.setAchieveReleasePercent(achieveReleasePercent); |
| | | } |
| | | DataDictionaryCustom achieveMaxDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( |
| | | GreenScoreEnum.ACHIEVE_MAX.getType(), |
| | | GreenScoreEnum.ACHIEVE_MAX.getCode()); |
| | | if (achieveMaxDic != null) { |
| | | String achieveMax = ObjectUtil.isEmpty(achieveMaxDic.getValue()) ? "0" : achieveMaxDic.getValue(); |
| | | hlmVoucherSetDto.setAchieveMax(achieveMax); |
| | | } |
| | | DataDictionaryCustom achieveMinDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( |
| | | GreenScoreEnum.ACHIEVE_MIN.getType(), |
| | | GreenScoreEnum.ACHIEVE_MIN.getCode()); |
| | | if (achieveMinDic != null) { |
| | | String achieveMin = ObjectUtil.isEmpty(achieveMinDic.getValue()) ? "0" : achieveMinDic.getValue(); |
| | | hlmVoucherSetDto.setAchieveMin(achieveMin); |
| | | } |
| | | DataDictionaryCustom roleAchievePercentDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( |
| | | GreenScoreEnum.ROLE_ACHIEVE_PERCENT.getType(), |
| | | GreenScoreEnum.ROLE_ACHIEVE_PERCENT.getCode()); |
| | | if (roleAchievePercentDic != null) { |
| | | String roleAchievePercent = ObjectUtil.isEmpty(roleAchievePercentDic.getValue()) ? "0" : roleAchievePercentDic.getValue(); |
| | | hlmVoucherSetDto.setRoleAchievePercent(roleAchievePercent); |
| | | } |
| | | DataDictionaryCustom starAchievePercentDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( |
| | | GreenScoreEnum.STAR_ACHIEVE_PERCENT.getType(), |
| | | GreenScoreEnum.STAR_ACHIEVE_PERCENT.getCode()); |
| | | if (starAchievePercentDic != null) { |
| | | String starAchievePercent = ObjectUtil.isEmpty(starAchievePercentDic.getValue()) ? "0" : starAchievePercentDic.getValue(); |
| | | hlmVoucherSetDto.setStarAchievePercent(starAchievePercent); |
| | | } |
| | | DataDictionaryCustom levelAchievePercentDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( |
| | | GreenScoreEnum.LEVEL_ACHIEVE_PERCENT.getType(), |
| | | GreenScoreEnum.LEVEL_ACHIEVE_PERCENT.getCode()); |
| | | if (levelAchievePercentDic != null) { |
| | | String levelAchievePercent = ObjectUtil.isEmpty(levelAchievePercentDic.getValue()) ? "0" : levelAchievePercentDic.getValue(); |
| | | hlmVoucherSetDto.setLevelAchievePercent(levelAchievePercent); |
| | | } |
| | | model.addAttribute("hlmVoucherSetDto", hlmVoucherSetDto); |
| | | return FebsUtil.view("modules/system/hlmVoucherSet"); |
| | | } |
| | | } |