| | |
| | | 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;
|
| | |
| | | @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();
|
| | | if("NEKK".equals(symbol)){
|
| | | if(SymbolsConstats.EXCHANGE_SYMBOLS.contains(symbol)){
|
| | | return orderCoinService.submitSalesWalletCoinOrderWithMatch(symbol,type,tradeType,price,amount,submitSalesWalletCoinOrderDto.getEntrustAmount());
|
| | |
|
| | | }else{
|
| | |
| | | public Result searchSymbolResultList() {
|
| | | return orderCoinService.searchSymbolResultList();
|
| | | }
|
| | | |
| | |
|
| | | }
|