xiaoyong931011
2021-06-16 2f8f4085cd854cdfc7d3a692c3f77138584141e1
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
package com.xcong.excoin.modules.trademanage.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.systemSetting.entity.PlatformTradeSettingEntity;
import com.xcong.excoin.modules.trademanage.dto.BzzNewPriceDto;
import com.xcong.excoin.modules.trademanage.entity.ContractHoldOrderEntity;
import com.xcong.excoin.modules.trademanage.entity.GbzOrderEntity;
import com.xcong.excoin.modules.trademanage.entity.OrderCoinsDealEntity;
import com.xcong.excoin.modules.trademanage.service.OrderCoinDealService;
import lombok.RequiredArgsConstructor;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.Map;
 
@Validated
@RestController
@RequiredArgsConstructor
@RequestMapping(value = "/orderCoin")
public class OrderCoinDealController extends BaseController {
 
    private final OrderCoinDealService orderCoinDealService;
 
    @GetMapping("/page")
    @RequiresPermissions("orderCoins:view")
    public FebsResponse getList(OrderCoinsDealEntity contractHoldOrderEntity, QueryRequest request) {
        Map<String, Object> data = getDataTable(orderCoinDealService.findOrderCoinsDealListInPage(contractHoldOrderEntity, request));
        return new FebsResponse().success().data(data);
    }
 
 
 
    @GetMapping("/gbzOrderList")
    public FebsResponse gbzOrderList(GbzOrderEntity gbzOrderEntity, QueryRequest request) {
        Map<String, Object> data = getDataTable(orderCoinDealService.gbzOrderEntity(gbzOrderEntity, request));
        return new FebsResponse().success().data(data);
    }
 
    /**
     * BZZ最新价
     */
    @GetMapping("bzzNewPrice")
    public FebsResponse bzzNewPrice(QueryRequest request) {
        Map<String, Object> data = getDataTable(orderCoinDealService.bzzNewPrice(request));
        return new FebsResponse().success().data(data);
    }
 
    /**
     *BZZ最新价---确认
     * @return
     */
    @PostMapping("bzzNewPriceUpdate")
    @ControllerEndpoint(operation = "交易设置---确认", exceptionMessage = "设置失败")
    public FebsResponse bzzNewPriceUpdate(@Valid BzzNewPriceDto bzzNewPriceDto) {
        return orderCoinDealService.bzzNewPriceUpdate(bzzNewPriceDto);
    }
}