From 16b9e8b2690e8cc2b7f2262d1fa2ec65ee5dc590 Mon Sep 17 00:00:00 2001 From: xiaoyong931011 <15274802129@163.com> Date: Mon, 17 Apr 2023 16:27:34 +0800 Subject: [PATCH] 只针对一星会员做修改: 按购买业绩(不按权益积分)每天静态释0.6%~1.2% --- src/main/java/cc/mrbird/febs/mall/controller/ViewSystemController.java | 68 ++++++++++++++++++++++++++++++++++ 1 files changed, 68 insertions(+), 0 deletions(-) diff --git a/src/main/java/cc/mrbird/febs/mall/controller/ViewSystemController.java b/src/main/java/cc/mrbird/febs/mall/controller/ViewSystemController.java index 796674d..50115fe 100644 --- a/src/main/java/cc/mrbird/febs/mall/controller/ViewSystemController.java +++ b/src/main/java/cc/mrbird/febs/mall/controller/ViewSystemController.java @@ -256,6 +256,13 @@ String achieveReleasePercent = ObjectUtil.isEmpty(achieveReleasePercentDic.getValue()) ? "0" : achieveReleasePercentDic.getValue(); hlmVoucherSetDto.setAchieveReleasePercent(achieveReleasePercent); } + DataDictionaryCustom achieveReleaseDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( + GreenScoreEnum.ACHIEVE_RELEASE.getType(), + GreenScoreEnum.ACHIEVE_RELEASE.getCode()); + if (achieveReleaseDic != null) { + String achieveRelease = ObjectUtil.isEmpty(achieveReleaseDic.getValue()) ? "0" : achieveReleaseDic.getValue(); + hlmVoucherSetDto.setAchieveRelease(achieveRelease); + } DataDictionaryCustom achieveMaxDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( GreenScoreEnum.ACHIEVE_MAX.getType(), GreenScoreEnum.ACHIEVE_MAX.getCode()); @@ -291,7 +298,68 @@ String levelAchievePercent = ObjectUtil.isEmpty(levelAchievePercentDic.getValue()) ? "0" : levelAchievePercentDic.getValue(); hlmVoucherSetDto.setLevelAchievePercent(levelAchievePercent); } + DataDictionaryCustom scorePoolCntDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( + GreenScoreEnum.SCORE_POOL_CNT.getType(), + GreenScoreEnum.SCORE_POOL_CNT.getCode()); + if (scorePoolCntDic != null) { + String scorePoolCnt = ObjectUtil.isEmpty(scorePoolCntDic.getValue()) ? "0" : scorePoolCntDic.getValue(); + hlmVoucherSetDto.setScorePoolCnt(scorePoolCnt); + } model.addAttribute("hlmVoucherSetDto", hlmVoucherSetDto); return FebsUtil.view("modules/system/hlmVoucherSet"); } + + /** + * 一键卖出 + * @param model + * @return + */ + @GetMapping("hlmVoucherButton") + @RequiresPermissions("hlmVoucherButton:view") + public String hlmVoucherButton(Model model) { + HlmVoucherButtonDto hlmVoucherButtonDto = new HlmVoucherButtonDto(); + DataDictionaryCustom scorePriceDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( + GreenScoreEnum.SCORE_PRICE.getType(), + GreenScoreEnum.SCORE_PRICE.getCode()); + if (scorePriceDic != null) { + String scorePrice = ObjectUtil.isEmpty(scorePriceDic.getValue()) ? "0" : scorePriceDic.getValue(); + hlmVoucherButtonDto.setScorePrice(scorePrice); + } + DataDictionaryCustom voucherOnOffDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( + GreenScoreEnum.VOUCHER_ON_OFF.getType(), + GreenScoreEnum.VOUCHER_ON_OFF.getCode()); + if (voucherOnOffDic != null) { + String voucherOnOff = ObjectUtil.isEmpty(voucherOnOffDic.getValue()) ? "0" : voucherOnOffDic.getValue(); + hlmVoucherButtonDto.setVoucherOnOff(voucherOnOff); + } + DataDictionaryCustom voucherPercentDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( + GreenScoreEnum.VOUCHER_PERCENT.getType(), + GreenScoreEnum.VOUCHER_PERCENT.getCode()); + if (voucherPercentDic != null) { + String voucherPercent = ObjectUtil.isEmpty(voucherPercentDic.getValue()) ? "0" : voucherPercentDic.getValue(); + hlmVoucherButtonDto.setVoucherPercent(voucherPercent); + } + model.addAttribute("hlmVoucherButtonDto", hlmVoucherButtonDto); + return FebsUtil.view("modules/system/hlmVoucherButton"); + } + + /** + * 一键释放业绩 + * @param model + * @return + */ + @GetMapping("hlmAchieveSetButton") + @RequiresPermissions("hlmAchieveSetButton:view") + public String hlmAchieveSetButton(Model model) { + HlmVoucherButtonDto hlmVoucherButtonDto = new HlmVoucherButtonDto(); + DataDictionaryCustom jobAchieveReleasePercentDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( + GreenScoreEnum.JOB_ACHIEVE_RELEASE_PERCENT.getType(), + GreenScoreEnum.JOB_ACHIEVE_RELEASE_PERCENT.getCode()); + if (jobAchieveReleasePercentDic != null) { + String jobAchieveReleasePercent = ObjectUtil.isEmpty(jobAchieveReleasePercentDic.getValue()) ? "0" : jobAchieveReleasePercentDic.getValue(); + hlmVoucherButtonDto.setJobAchieveReleasePercent(jobAchieveReleasePercent); + } + model.addAttribute("hlmAchieveSet", hlmVoucherButtonDto); + return FebsUtil.view("modules/system/hlmAchieveSet"); + } } -- Gitblit v1.9.1