xiaoyong931011
2020-06-19 e3df07f247883a7a2e726eeacc6c6c590ce5281e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
package com.xcong.excoin.modules.systemSetting.controller;
 
import java.util.Map;
 
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
 
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
import com.xcong.excoin.common.annotation.ControllerEndpoint;
import com.xcong.excoin.common.controller.BaseController;
import com.xcong.excoin.common.entity.FebsResponse;
import com.xcong.excoin.common.entity.QueryRequest;
import com.xcong.excoin.modules.systemSetting.entity.PlatformBannerEntity;
import com.xcong.excoin.modules.systemSetting.entity.PlatformSymbolsSkuEntity;
import com.xcong.excoin.modules.systemSetting.entity.PlatformTradeSettingEntity;
import com.xcong.excoin.modules.systemSetting.service.SystemSettingService;
 
import lombok.RequiredArgsConstructor;
 
@Validated
@RestController
@RequiredArgsConstructor
@RequestMapping(value = "/systemSetting")
public class SystemSettingController extends BaseController{
    
    private final SystemSettingService systemSettingService;
    
    /**
     * 交易设置---列表
     */
    @GetMapping("platformTradeSetting")
    public FebsResponse platformTradeSetting(PlatformTradeSettingEntity platformTradeSettingEntity, QueryRequest request) {
        Map<String, Object> data = getDataTable(systemSettingService.findPlatformTradeSettingInPage(platformTradeSettingEntity, request));
        return new FebsResponse().success().data(data);
    }
    
    /**
     *交易设置---确认
     * @return
     */
    @PostMapping("platformTradeSettingConfirm")
    @ControllerEndpoint(operation = "交易设置---确认", exceptionMessage = "设置失败")
    public FebsResponse platformTradeSettingConfirm(@Valid PlatformTradeSettingEntity platformTradeSettingEntity) {
        return systemSettingService.platformTradeSettingConfirm(platformTradeSettingEntity);
    }
    
    /**
     * 币种规格---列表
     */
    @GetMapping("platformSymbolsSku")
    public FebsResponse platformSymbolsSku(PlatformSymbolsSkuEntity platformSymbolsSkuEntity, QueryRequest request) {
        Map<String, Object> data = getDataTable(systemSettingService.findPlatformSymbolsSkuInPage(platformSymbolsSkuEntity, request));
        return new FebsResponse().success().data(data);
    }
    
    /**
     * 币种规格---确认
     * @return
     */
    @PostMapping("platformSymbolsSkuConfirm")
    @ControllerEndpoint(operation = "币种规格---确认", exceptionMessage = "设置失败")
    public FebsResponse platformSymbolsSkuConfirm(@Valid PlatformSymbolsSkuEntity platformSymbolsSkuEntity) {
        return systemSettingService.platformSymbolsSkuConfirm(platformSymbolsSkuEntity);
    }
    
    /**
     * 轮播图---列表
     */
    @GetMapping("platformBanner")
    public FebsResponse platformBanner(PlatformBannerEntity platformBannerEntity, QueryRequest request) {
        Map<String, Object> data = getDataTable(systemSettingService.findPlatformBannerInPage(platformBannerEntity, request));
        return new FebsResponse().success().data(data);
    }
    
    /**
     * 轮播图---确认
     * @return
     */
    @PostMapping("platformBannerConfirm")
    @ControllerEndpoint(operation = "轮播图---确认", exceptionMessage = "设置失败")
    public FebsResponse platformBannerConfirm(@Valid PlatformBannerEntity platformBannerEntity) {
        return systemSettingService.platformBannerConfirm(platformBannerEntity);
    }
    
    /**
     * 轮播图---删除
     * @return
     */
    @GetMapping("platformBannerDelete/{id}")
    @ControllerEndpoint(operation = "轮播图---删除", exceptionMessage = "删除失败")
    public FebsResponse platformBannerDelete(@NotNull(message = "{required}") @PathVariable Long id) {
        return systemSettingService.platformBannerDelete(id);
    }
    
    /**
     * 轮播图---新增
     */
    @GetMapping("platformBannerAdd")
    @ControllerEndpoint(operation = "轮播图---新增", exceptionMessage = "新增失败")
    public FebsResponse platformBannerAdd() {
        systemSettingService.platformBannerAdd();
        return new FebsResponse().success();
    }
    
}