xiaoyong931011
2022-07-29 d287809367d8277c6fb1cf582434e611b3809455
src/main/java/cc/mrbird/febs/mall/service/impl/AdminMallOrderService.java
@@ -43,6 +43,8 @@
    private final MallOrderRefundAddressMapper mallOrderRefundAddressMapper;
    private final MallGoodsCommentMapper mallGoodsCommentMapper;
    private final MallMoneyFlowMapper mallMoneyFlowMapper;
    private final IApiMallMemberWalletService iApiMallMemberWalletService;
@@ -80,6 +82,10 @@
        Integer status = mallOrderInfo.getStatus();
        if(2 != status){
            return new FebsResponse().fail().message("订单不是待发货状态");
        }
        Integer deliveryType = mallOrderInfo.getDeliveryType();
        if(2 != deliveryType){
            return new FebsResponse().fail().message("订单的配送方式不是快递");
        }
        String expressNo = deliverGoodsDto.getExpressNo();
        if(StrUtil.isEmpty(expressNo)){
@@ -363,6 +369,35 @@
    }
    @Override
    public IPage<AdminMallGoodsCommentVo> getCommentListInPage(AdminMallGoodsCommentDto adminMallGoodsCommentDto, QueryRequest request) {
        Page<AdminMallGoodsCommentVo> page = new Page<>(request.getPageNum(), request.getPageSize());
        IPage<AdminMallGoodsCommentVo> adminMallGoodsCommentVos = mallGoodsCommentMapper.getCommentListInPage(page, adminMallGoodsCommentDto);
        return adminMallGoodsCommentVos;
    }
    @Override
    public FebsResponse showStateSwitchOn(Long id) {
        MallGoodsComment mallGoodsComment = mallGoodsCommentMapper.selectById(id);
        if (ObjectUtil.isEmpty(mallGoodsComment)) {
            return new FebsResponse().fail().message("评论不存在,请刷新当前页面");
        }
        mallGoodsComment.setShowState(MallGoodsComment.SHOW_STATE_ENABLE);
        mallGoodsCommentMapper.updateById(mallGoodsComment);
        return new FebsResponse().success();
    }
    @Override
    public FebsResponse showStateSwitchOff(Long id) {
        MallGoodsComment mallGoodsComment = mallGoodsCommentMapper.selectById(id);
        if (ObjectUtil.isEmpty(mallGoodsComment)) {
            return new FebsResponse().fail().message("评论不存在,请刷新当前页面");
        }
        mallGoodsComment.setShowState(MallGoodsComment.SHOW_STATE_DISABLED);
        mallGoodsCommentMapper.updateById(mallGoodsComment);
        return new FebsResponse().success();
    }
    @Override
    public void deliverGoodsByOrderNo(DeliverGoodsDto deliverGoodsDto) {
        MallOrderInfo mallOrderInfo = mallOrderInfoMapper.selectByOrderNo(deliverGoodsDto.getOrderNo());
        if (mallOrderInfo == null) {