Helius
2021-05-19 76a3c9d2bf30b7362661bf36ba7170d5e6d565e5
modify
5 files modified
20 ■■■■■ 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/dao/OtcOrderDao.java 2 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/otc/service/OtcOrderService.java 2 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/otc/service/impl/OtcOrderServiceImpl.java 7 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/otc/OtcOrderDao.xml 6 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/otc/controller/OtcOrderController.java
@@ -49,7 +49,8 @@
    @ApiOperation(value = "已付款,请放币")
    @PostMapping(value = "/hasPay/{id}")
    public Result hasPay(@PathVariable("id") Long id) {
        return null;
        otcOrderService.hasPay(id);
        return Result.ok("操作成功");
    }
    @ApiOperation(value = "确认收款")
src/main/java/com/xcong/excoin/modules/otc/dao/OtcOrderDao.java
@@ -14,4 +14,6 @@
    List<OtcOrder> selectOrderListUnFinish(@Param("memberId") Long memberId, @Param("entrustOrderId") Long entrustOrderId);
    IPage<OrderListVo> selectOrdderListInPage(@Param("record") OtcOrder order, Page<OrderListVo> page);
    int updateOrderStatusByOrderNo(@Param("status") Integer status, @Param("orderNo") String orderNo);
}
src/main/java/com/xcong/excoin/modules/otc/service/OtcOrderService.java
@@ -14,4 +14,6 @@
    void saleOrder(OrderAddDto orderAddDto);
    IPage<OrderListVo> findOrderListInPage(OrderListDto orderListDto);
    void hasPay(Long id);
}
src/main/java/com/xcong/excoin/modules/otc/service/impl/OtcOrderServiceImpl.java
@@ -150,4 +150,11 @@
        order.setMemberId(member.getId());
        return this.baseMapper.selectOrdderListInPage(order, page);
    }
    @Override
    public void hasPay(Long id) {
        OtcOrder otcOrder = this.baseMapper.selectById(id);
        this.baseMapper.updateOrderStatusByOrderNo(OtcOrder.STATUS_PAY, otcOrder.getOrderNo());
    }
}
src/main/resources/mapper/otc/OtcOrderDao.xml
@@ -37,4 +37,10 @@
            </if>
        </where>
    </select>
    <update id="updateOrderStatusByOrderNo">
        update otc_order
        set status=#{status}
        where order_no=#{orderNo}
    </update>
</mapper>