| | |
| | | package cc.mrbird.febs.dapp.controller; |
| | | |
| | | import cc.mrbird.febs.common.annotation.ControllerEndpoint; |
| | | import cc.mrbird.febs.common.controller.BaseController; |
| | | import cc.mrbird.febs.common.entity.FebsResponse; |
| | | import cc.mrbird.febs.common.entity.QueryRequest; |
| | |
| | | import cc.mrbird.febs.dapp.entity.DappMemberEntity; |
| | | import cc.mrbird.febs.dapp.entity.DappTransferRecordEntity; |
| | | import cc.mrbird.febs.dapp.service.DappMemberService; |
| | | import cc.mrbird.febs.dapp.service.DappSystemService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | import java.math.BigDecimal; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | |
| | | public class MemberController extends BaseController { |
| | | |
| | | private final DappMemberService dappMemberService; |
| | | private final DappSystemService dappSystemService; |
| | | |
| | | @RequestMapping(value = "/list") |
| | | public FebsResponse list(DappMemberEntity member, QueryRequest request) { |
| | |
| | | dappMemberService.setNewestPrice(priceSettingDto); |
| | | return new FebsResponse().success(); |
| | | } |
| | | |
| | | @GetMapping(value = "/findDicByType/{type}") |
| | | public FebsResponse findDicByType(@PathVariable("type") String type) { |
| | | return new FebsResponse().success().data(dappSystemService.findDataDicByType(type)); |
| | | } |
| | | |
| | | /** |
| | | * 字典表设置 |
| | | * @param map |
| | | * @return |
| | | */ |
| | | @PostMapping(value = "/levelSystemSetting") |
| | | public FebsResponse levelSystemSetting(@RequestBody Map<String, Object> map) { |
| | | dappSystemService.levelSystemSetting(map); |
| | | return new FebsResponse().success().message("设置成功"); |
| | | } |
| | | |
| | | /** |
| | | * 挂机方案设置启用 |
| | | */ |
| | | @GetMapping("enableOnHook/{id}") |
| | | @ControllerEndpoint(operation = "挂机方案设置启用", exceptionMessage = "设置失败") |
| | | public FebsResponse enableOnHook(@NotNull(message = "{required}") @PathVariable Long id) { |
| | | return dappSystemService.enableOnHook(id); |
| | | } |
| | | |
| | | /** |
| | | * 挂机方案设置禁用 |
| | | */ |
| | | @GetMapping("disableOnHook/{id}") |
| | | @ControllerEndpoint(operation = "挂机方案设置禁用", exceptionMessage = "设置失败") |
| | | public FebsResponse disableOnHook(@NotNull(message = "{required}") @PathVariable Long id) { |
| | | return dappSystemService.disableOnHook(id); |
| | | } |
| | | } |