| | |
| | | import javax.annotation.Resource;
|
| | | import javax.validation.Valid;
|
| | |
|
| | | import com.alibaba.fastjson.JSONObject;
|
| | | import com.xcong.excoin.modules.coin.entity.OrderCoinsEntity;
|
| | | import com.xcong.excoin.modules.symbols.constants.SymbolsConstats;
|
| | | import org.springframework.validation.annotation.Validated;
|
| | | import org.springframework.web.bind.annotation.GetMapping;
|
| | | import org.springframework.web.bind.annotation.PostMapping;
|
| | |
| | | import com.xcong.excoin.modules.coin.parameter.dto.SubmitSalesWalletCoinOrderDto;
|
| | | import com.xcong.excoin.modules.coin.parameter.vo.FindCollectListVo;
|
| | | import com.xcong.excoin.modules.coin.parameter.vo.MemberSelectSymbolsVo;
|
| | | import com.xcong.excoin.modules.coin.parameter.vo.OrderWalletCoinDealListVo;
|
| | | import com.xcong.excoin.modules.coin.parameter.vo.OrderWalletCoinDealVo;
|
| | | import com.xcong.excoin.modules.coin.parameter.vo.OrderWalletCoinListVo;
|
| | | import com.xcong.excoin.modules.coin.parameter.vo.TransactionPageOfWalletCoinVo;
|
| | | import com.xcong.excoin.modules.coin.service.OrderCoinService;
|
| | | import com.xcong.excoin.modules.contract.parameter.dto.OrderListDto;
|
| | |
|
| | | import io.swagger.annotations.Api;
|
| | | import io.swagger.annotations.ApiImplicitParam;
|
| | | import io.swagger.annotations.ApiImplicitParams;
|
| | | import io.swagger.annotations.ApiOperation;
|
| | | import io.swagger.annotations.ApiParam;
|
| | | import io.swagger.annotations.ApiResponse;
|
| | | import io.swagger.annotations.ApiResponses;
|
| | | import lombok.extern.slf4j.Slf4j;
|
| | |
| | | @ApiOperation(value = "提交买卖订单", notes = "提交买卖订单")
|
| | | @PostMapping(value="/submitSalesWalletCoinOrder")
|
| | | public Result submitSalesWalletCoinOrder(@RequestBody @Valid SubmitSalesWalletCoinOrderDto submitSalesWalletCoinOrderDto) {
|
| | | log.info("买卖单参数[{}]", JSONObject.toJSONString(submitSalesWalletCoinOrderDto));
|
| | | String symbol = submitSalesWalletCoinOrderDto.getSymbol();
|
| | | Integer type = submitSalesWalletCoinOrderDto.getType();
|
| | | Integer tradeType = submitSalesWalletCoinOrderDto.getTradeType();
|
| | | BigDecimal price = submitSalesWalletCoinOrderDto.getPrice();
|
| | | BigDecimal amount = submitSalesWalletCoinOrderDto.getAmount();
|
| | | return orderCoinService.submitSalesWalletCoinOrder(symbol,type,tradeType,price,amount);
|
| | | if(SymbolsConstats.EXCHANGE_SYMBOLS.contains(symbol)){
|
| | | return orderCoinService.submitSalesWalletCoinOrderWithMatch(symbol,type,tradeType,price,amount,submitSalesWalletCoinOrderDto.getEntrustAmount());
|
| | |
|
| | | }else{
|
| | | return orderCoinService.submitSalesWalletCoinOrder(symbol,type,tradeType,price,amount,submitSalesWalletCoinOrderDto.getEntrustAmount());
|
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | @PostMapping(value="/cancelEntrustWalletCoinOrder")
|
| | | public Result cancelEntrustWalletCoinOrder(@RequestBody @Valid CancelEntrustWalletCoinOrderDto cancelEntrustWalletCoinOrderDto) {
|
| | | String orderId = cancelEntrustWalletCoinOrderDto.getOrderId();
|
| | | // 根据不同币种
|
| | | return orderCoinService.cancelEntrustWalletCoinOrder(orderId);
|
| | | }
|
| | |
|
| | |
| | | * @return
|
| | | */
|
| | | @ApiOperation(value = "获取币币交易历史订单信息", notes = "获取币币交易历史订单信息")
|
| | | @ApiResponses({@ApiResponse( code = 200, message = "success", response = OrderWalletCoinDealListVo.class)})
|
| | | @ApiResponses({@ApiResponse( code = 200, message = "success", response = OrderWalletCoinDealVo.class)})
|
| | | @PostMapping(value="/findAllWalletCoinOrder")
|
| | | public Result findAllWalletCoinOrder(@RequestBody @Validated FindAllWalletCoinOrderDto findAllWalletCoinOrderDto) {
|
| | | return orderCoinService.findAllWalletCoinOrder(findAllWalletCoinOrderDto);
|
| | |
| | | public Result searchSymbolResultList() {
|
| | | return orderCoinService.searchSymbolResultList();
|
| | | }
|
| | | |
| | |
|
| | | }
|