Helius
2021-05-20 f454fbde8d020d279de090992009cb8fa1f5c63e
modify
3 files modified
12 ■■■■■ changed files
src/main/java/com/xcong/excoin/modules/otc/controller/OtcOrderController.java 3 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/otc/service/impl/OtcOrderServiceImpl.java 8 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/otc/OtcOrderDao.xml 1 ●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/otc/controller/OtcOrderController.java
@@ -43,6 +43,9 @@
    }
    @ApiOperation(value = "用户订单列表")
    @ApiResponses({
            @ApiResponse(code = 200, message = "success", response = OrderListVo.class)
    })
    @PostMapping(value = "/orderList")
    public Result orderList(@RequestBody OrderListDto orderListDto) {
        IPage<OrderListVo> page = otcOrderService.findOrderListInPage(orderListDto);
src/main/java/com/xcong/excoin/modules/otc/service/impl/OtcOrderServiceImpl.java
@@ -63,6 +63,10 @@
            throw new GlobalException("委托单不存在");
        }
        if (member.getId().equals(entrustOrder.getMemberId())) {
            throw new GlobalException("不能购买自己的委托单");
        }
        if (!OtcEntrustOrder.ORDER_TYPE_S.equals(entrustOrder.getOrderType())) {
            throw new GlobalException("无法购买");
        }
@@ -116,6 +120,10 @@
            throw new GlobalException("委托单不存在");
        }
        if (member.getId().equals(entrustOrder.getMemberId())) {
            throw new GlobalException("不能购买自己的委托单");
        }
        if (!OtcEntrustOrder.ORDER_TYPE_B.equals(entrustOrder.getOrderType())) {
            throw new GlobalException("无法出售");
        }
src/main/resources/mapper/otc/OtcOrderDao.xml
@@ -14,6 +14,7 @@
            a.order_no orderNo,
            a.unit_price unitPrice,
            a.coin_amount amount,
            a.status status,
            a.total_amount totalAmount,
            a.create_time creatTime,
            a.order_type orderType,