| | |
| | | package cc.mrbird.febs.mall.controller; |
| | | |
| | | import cc.mrbird.febs.common.entity.FebsConstant; |
| | | import cc.mrbird.febs.common.enumerates.DataDictionaryEnum; |
| | | import cc.mrbird.febs.common.utils.FebsUtil; |
| | | import cc.mrbird.febs.mall.dto.AdminAgentAmountDto; |
| | | import cc.mrbird.febs.mall.dto.CashOutSettingDto; |
| | | import cc.mrbird.febs.mall.dto.ScoreSettingDto; |
| | | import cc.mrbird.febs.mall.entity.DataDictionaryCustom; |
| | | import cc.mrbird.febs.mall.mapper.DataDictionaryCustomMapper; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | |
| | | @RequiredArgsConstructor |
| | | public class ViewSystemController { |
| | | |
| | | private final DataDictionaryCustomMapper dataDictionaryCustomMapper; |
| | | |
| | | @GetMapping("profitSetting") |
| | | public String profitSetting() { |
| | | return FebsUtil.view("modules/system/profitSetting"); |
| | | } |
| | | |
| | | @GetMapping("cashOutSetting") |
| | | @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)); |
| | | } |
| | | return FebsUtil.view("modules/system/cashOutSetting"); |
| | | } |
| | | |
| | | @GetMapping("agentAmountSet") |
| | | @RequiresPermissions("agentAmountSet:update") |
| | | public String agentAmountSet(Model model) { |
| | | DataDictionaryCustom dic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(DataDictionaryEnum.PRICE_AMOUNT.getType(), |
| | | DataDictionaryEnum.PRICE_AMOUNT.getCode()); |
| | | AdminAgentAmountDto adminAgentAmountDto = new AdminAgentAmountDto(); |
| | | if (dic != null) { |
| | | adminAgentAmountDto.setAgentAmountValue(dic.getValue()); |
| | | model.addAttribute("agentAmountSet", adminAgentAmountDto); |
| | | } |
| | | return FebsUtil.view("modules/system/agentAmountSet"); |
| | | } |
| | | } |