| | |
| | | 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 |
| | |
| | | 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); |
| | | } |
| | | } |