| | |
| | | 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; |
| | |
| | | @RequiresPermissions("cashOutSetting:update") |
| | | public String cashOutSetting(Model model) { |
| | | DataDictionaryCustom dic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(DataDictionaryEnum.CASHOUT_SETTING.getType(), DataDictionaryEnum.CASHOUT_SETTING.getCode()); |
| | | if (dic != null) { |
| | | model.addAttribute("cashout", JSONObject.parseObject(dic.getValue(), CashOutSettingDto.class)); |
| | | CashOutSettingDto cashOutSettingDto = JSONObject.parseObject(dic.getValue(), CashOutSettingDto.class); |
| | | |
| | | DataDictionaryCustom urlDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( |
| | | DataDictionaryEnum.BANK_TRANS_URL.getType(), |
| | | DataDictionaryEnum.BANK_TRANS_URL.getCode()); |
| | | if (urlDic != null) { |
| | | cashOutSettingDto.setUrlStr(urlDic.getValue()); |
| | | } |
| | | DataDictionaryCustom verifyIpDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( |
| | | DataDictionaryEnum.BANK_TRANS_VERIFY_IP.getType(), |
| | | DataDictionaryEnum.BANK_TRANS_VERIFY_IP.getCode()); |
| | | if (verifyIpDic != null) { |
| | | cashOutSettingDto.setVerifyIp(verifyIpDic.getValue()); |
| | | } |
| | | DataDictionaryCustom verifyPortDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( |
| | | DataDictionaryEnum.BANK_TRANS_VERIFY_PORT.getType(), |
| | | DataDictionaryEnum.BANK_TRANS_VERIFY_PORT.getCode()); |
| | | if (verifyPortDic != null) { |
| | | cashOutSettingDto.setVerifyPort(verifyPortDic.getValue()); |
| | | } |
| | | DataDictionaryCustom fkzhDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( |
| | | DataDictionaryEnum.BANK_TRANS_FKZH.getType(), |
| | | DataDictionaryEnum.BANK_TRANS_FKZH.getCode()); |
| | | if (fkzhDic != null) { |
| | | cashOutSettingDto.setFkzh(fkzhDic.getValue()); |
| | | } |
| | | DataDictionaryCustom customerIdDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( |
| | | DataDictionaryEnum.BANK_TRANS_customerId.getType(), |
| | | DataDictionaryEnum.BANK_TRANS_customerId.getCode()); |
| | | if (customerIdDic != null) { |
| | | cashOutSettingDto.setCustomerId(customerIdDic.getValue()); |
| | | } |
| | | DataDictionaryCustom softwareIdDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( |
| | | DataDictionaryEnum.BANK_TRANS_softwareId.getType(), |
| | | DataDictionaryEnum.BANK_TRANS_softwareId.getCode()); |
| | | if (softwareIdDic != null) { |
| | | cashOutSettingDto.setSoftwareId(softwareIdDic.getValue()); |
| | | } |
| | | |
| | | model.addAttribute("cashout", cashOutSettingDto); |
| | | return FebsUtil.view("modules/system/cashOutSetting"); |
| | | } |
| | | |
| | |
| | | data.put("alipayPay",mallOrderInfoMapper.selectSumAmountByPayMethodAndSomeStatue(OrderPayMethodEnum.ALIPAY.getName(), states)); |
| | | data.put("scorePay",mallOrderInfoMapper.selectSumAmountByPayMethodAndSomeStatue(OrderPayMethodEnum.BANK.getName(), states)); |
| | | data.put("balancePay",mallOrderInfoMapper.selectSumAmountByPayMethodAndSomeStatue(OrderPayMethodEnum.BALANCE.getName(), states)); |
| | | data.put("LKLPay",mallOrderInfoMapper.selectSumAmountByPayMethodAndSomeStatue(OrderPayMethodEnum.LKALA.getName(), states)); |
| | | |
| | | |
| | | data.put("lastDay", mallAchieveRecordMapper.selectAchieveTotal("D", DateUtil.offsetDay(new Date(), -1))); |
| | |
| | | String agentPerk = ObjectUtil.isEmpty(agentPerkDic.getValue()) ? "0" : agentPerkDic.getValue(); |
| | | hlmBasicPerkDto.setAgentPerk(agentPerk); |
| | | } |
| | | DataDictionaryCustom perkAgentAchieveTotalDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( |
| | | DataDictionaryEnum.PERK_AGENT_ACHIEVE_TOTAL.getType(), |
| | | DataDictionaryEnum.PERK_AGENT_ACHIEVE_TOTAL.getCode()); |
| | | if (perkAgentAchieveTotalDic != null) { |
| | | String perkAgentAchieveTotal = ObjectUtil.isEmpty(perkAgentAchieveTotalDic.getValue()) ? "0" : perkAgentAchieveTotalDic.getValue(); |
| | | hlmBasicPerkDto.setPerkAgentAchieveTotal(perkAgentAchieveTotal); |
| | | } |
| | | DataDictionaryCustom perkAgentAchievePercentDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( |
| | | DataDictionaryEnum.PERK_AGENT_ACHIEVE_PERCENT.getType(), |
| | | DataDictionaryEnum.PERK_AGENT_ACHIEVE_PERCENT.getCode()); |
| | | if (perkAgentAchievePercentDic != null) { |
| | | String perkAgentAchievePercent = ObjectUtil.isEmpty(perkAgentAchievePercentDic.getValue()) ? "0" : perkAgentAchievePercentDic.getValue(); |
| | | hlmBasicPerkDto.setPerkAgentAchievePercent(perkAgentAchievePercent); |
| | | } |
| | | 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 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()); |
| | | 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); |
| | | } |
| | | 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("hlmAchieveSet") |
| | | @RequiresPermissions("hlmAchieveSet: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"); |
| | | } |
| | | } |