New file |
| | |
| | | package com.hx.phip.controller.common; |
| | | |
| | | import com.hx.common.BaseController; |
| | | import com.hx.phiappt.dto.money.MoneyRuleValueDto; |
| | | import com.hx.phip.dto.PageDto; |
| | | import com.hx.phip.enums.SysFunctionLimitEnum; |
| | | import com.hx.resultTool.Result; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 通用列表 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/common/list") |
| | | public class CommonListController extends BaseController { |
| | | /** |
| | | * 金额规则-领取条件枚举列表 |
| | | */ |
| | | @RequestMapping("/money/rule/list/receive") |
| | | public Result sysFunctionEnumLimitList(@RequestBody PageDto pageDto) { |
| | | List<MoneyRuleValueDto> list = new ArrayList<>(); |
| | | MoneyRuleValueDto moneyRuleValueDto = null; |
| | | for (SysFunctionLimitEnum value : SysFunctionLimitEnum.values()) { |
| | | moneyRuleValueDto = new MoneyRuleValueDto(); |
| | | moneyRuleValueDto.setFunctionCode(value.getCode()); |
| | | moneyRuleValueDto.setFunctionName(value.getName()); |
| | | list.add(moneyRuleValueDto); |
| | | } |
| | | Map<String, Object> data = new HashMap<>(); |
| | | data.put("list", list); |
| | | return Result.success(data); |
| | | } |
| | | |
| | | } |