| | |
| | | import cc.mrbird.febs.common.entity.QueryRequest; |
| | | import cc.mrbird.febs.common.enumerates.FlowTypeEnum; |
| | | import cc.mrbird.febs.common.enumerates.MoneyFlowTypeEnum; |
| | | import cc.mrbird.febs.common.enumerates.OrderDeliveryStateEnum; |
| | | import cc.mrbird.febs.mall.dto.*; |
| | | import cc.mrbird.febs.mall.entity.*; |
| | | import cc.mrbird.febs.mall.mapper.*; |
| | |
| | | |
| | | private final MallOrderRefundAddressMapper mallOrderRefundAddressMapper; |
| | | |
| | | private final MallGoodsCommentMapper mallGoodsCommentMapper; |
| | | |
| | | private final MallMoneyFlowMapper mallMoneyFlowMapper; |
| | | |
| | | private final IApiMallMemberWalletService iApiMallMemberWalletService; |
| | |
| | | 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)){ |
| | | return new FebsResponse().fail().message("请输入物流单号"); |
| | |
| | | mallExpressInfoMapper.insert(mallExpressInfo); |
| | | |
| | | mallOrderInfo.setStatus(3); |
| | | mallOrderInfo.setDeliveryState(OrderDeliveryStateEnum.DELIVERY_ING.getValue()); |
| | | mallOrderInfoMapper.updateById(mallOrderInfo); |
| | | return new FebsResponse().success(); |
| | | } |
| | |
| | | } |
| | | |
| | | @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 updateOrderStateAndDeliveryState(Long id, int value, int value1) { |
| | | mallOrderInfoMapper.updateOrderStateAndDeliveryState(id,value,value1); |
| | | } |
| | | |
| | | @Override |
| | | public void deliverGoodsByOrderNo(DeliverGoodsDto deliverGoodsDto) { |
| | | MallOrderInfo mallOrderInfo = mallOrderInfoMapper.selectByOrderNo(deliverGoodsDto.getOrderNo()); |
| | | if (mallOrderInfo == null) { |