| | |
| | | import cc.mrbird.febs.mall.entity.DataDictionaryCustom; |
| | | import cc.mrbird.febs.mall.entity.MallMember; |
| | | import cc.mrbird.febs.mall.mapper.*; |
| | | import cc.mrbird.febs.mall.vo.AdminSystemSettingVo; |
| | | import cc.mrbird.febs.monitor.service.ILoginLogService; |
| | | import cc.mrbird.febs.system.service.IUserService; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | return FebsUtil.view("modules/system/profitSetting"); |
| | | } |
| | | |
| | | /** |
| | | * 会员等级设置 |
| | | * @return |
| | | */ |
| | | @GetMapping("agentLevelSetting") |
| | | public String agentLevelSetting() { |
| | | return FebsUtil.view("modules/system/agentLevelSetting"); |
| | | } |
| | | |
| | | @GetMapping("cashOutSetting") |
| | | @RequiresPermissions("cashOutSetting:update") |
| | | public String cashOutSetting(Model model) { |
| | |
| | | return FebsUtil.view("modules/system/scorePoorSetting"); |
| | | } |
| | | |
| | | @GetMapping("systemSetting") |
| | | @RequiresPermissions("systemSetting:update") |
| | | public String systemSetting(Model model) { |
| | | AdminSystemSettingVo adminSystemSettingVo = new AdminSystemSettingVo(); |
| | | DataDictionaryCustom returnPercentDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( |
| | | DataDictionaryEnum.RETURN_PERCENT.getType(), |
| | | DataDictionaryEnum.RETURN_PERCENT.getCode()); |
| | | if (ObjectUtil.isNotEmpty(returnPercentDic)) { |
| | | adminSystemSettingVo.setReturnPercent(returnPercentDic.getValue()); |
| | | } |
| | | DataDictionaryCustom levelOneDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( |
| | | DataDictionaryEnum.LEVEL_ONE.getType(), |
| | | DataDictionaryEnum.LEVEL_ONE.getCode()); |
| | | if (ObjectUtil.isNotEmpty(levelOneDic)) { |
| | | adminSystemSettingVo.setLevelOne(levelOneDic.getValue()); |
| | | } |
| | | DataDictionaryCustom levelTwoDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( |
| | | DataDictionaryEnum.LEVEL_TWO.getType(), |
| | | DataDictionaryEnum.LEVEL_TWO.getCode()); |
| | | if (ObjectUtil.isNotEmpty(levelTwoDic)) { |
| | | adminSystemSettingVo.setLevelTwo(levelTwoDic.getValue()); |
| | | } |
| | | DataDictionaryCustom rewardPercentDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( |
| | | DataDictionaryEnum.REWARD_PERCENT.getType(), |
| | | DataDictionaryEnum.REWARD_PERCENT.getCode()); |
| | | if (ObjectUtil.isNotEmpty(rewardPercentDic)) { |
| | | adminSystemSettingVo.setRewardPercent(rewardPercentDic.getValue()); |
| | | } |
| | | DataDictionaryCustom buyTimesDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( |
| | | DataDictionaryEnum.BUY_TIMES.getType(), |
| | | DataDictionaryEnum.BUY_TIMES.getCode()); |
| | | if (ObjectUtil.isNotEmpty(buyTimesDic)) { |
| | | adminSystemSettingVo.setBuyTimes(buyTimesDic.getValue()); |
| | | } |
| | | DataDictionaryCustom subsidyPercentDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( |
| | | DataDictionaryEnum.SUBSIDY_PERCENT.getType(), |
| | | DataDictionaryEnum.SUBSIDY_PERCENT.getCode()); |
| | | if (ObjectUtil.isNotEmpty(subsidyPercentDic)) { |
| | | adminSystemSettingVo.setSubsidyPercent(subsidyPercentDic.getValue()); |
| | | } |
| | | DataDictionaryCustom allBuyTimesDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode( |
| | | DataDictionaryEnum.ALL_BUY_TIMES.getType(), |
| | | DataDictionaryEnum.ALL_BUY_TIMES.getCode()); |
| | | if (ObjectUtil.isNotEmpty(allBuyTimesDic)) { |
| | | adminSystemSettingVo.setAllBuyTimes(allBuyTimesDic.getValue()); |
| | | } |
| | | model.addAttribute("adminSystemSettingVo", adminSystemSettingVo); |
| | | return FebsUtil.view("modules/system/systemSetting"); |
| | | } |
| | | |
| | | @GetMapping("indexData") |
| | | @RequiresPermissions("indexData:view") |
| | | public String indexData(Model model) { |