xiaoyong931011
2021-05-18 9909c23061541816b21d560f765d0a7274fc6323
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
package com.xcong.excoin.modules.otc.controller;
 
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.member.entity.MemberAccountMoneyChangeEntity;
import com.xcong.excoin.modules.otc.entity.OtcMarketBussinessEntity;
import com.xcong.excoin.modules.otc.service.OtcService;
import lombok.RequiredArgsConstructor;
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.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
import javax.validation.constraints.NotNull;
import java.util.Map;
 
@Validated
@RestController
@RequiredArgsConstructor
@RequestMapping(value = "/otc")
public class OtcController extends BaseController {
 
    private final OtcService otcService;
 
    /**
     * 获取商户审核列表
     */
    @GetMapping("otcShopList")
    public FebsResponse otcShopList(OtcMarketBussinessEntity otcMarketBussinessEntity, QueryRequest request) {
        Map<String, Object> data = getDataTable(otcService.otcShopList(otcMarketBussinessEntity, request));
        return new FebsResponse().success().data(data);
    }
 
    /**
     * 商户审核---通过
     * @return
     */
    @GetMapping("agreeShop/{id}")
    @ControllerEndpoint(operation = "商户审核---通过", exceptionMessage = "通过失败")
    public FebsResponse agreeShop(@NotNull(message = "{required}") @PathVariable Long id) {
        return otcService.agreeShop(id);
    }
 
    /**
     * 商户审核---拒绝
     * @return
     */
    @GetMapping("disagreeShop/{id}")
    @ControllerEndpoint(operation = "商户审核---通过", exceptionMessage = "通过失败")
    public FebsResponse disagreeShop(@NotNull(message = "{required}") @PathVariable Long id) {
        return otcService.disagreeShop(id);
    }
 
 
}