|
|
@@ -6,16 +6,15 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.yami.shop.bean.dto.OrderRefundDto;
|
|
|
import com.yami.shop.bean.model.OrderRefund;
|
|
|
import com.yami.shop.bean.model.OrderRefundRecord;
|
|
|
+import com.yami.shop.bean.model.RefundAppointment;
|
|
|
+import com.yami.shop.bean.model.RefundDelivery;
|
|
|
import com.yami.shop.bean.param.OrderRefundCountParam;
|
|
|
import com.yami.shop.bean.param.OrderRefundStaisticsParam;
|
|
|
import com.yami.shop.bean.vo.OrderRefundSkuVo;
|
|
|
import com.yami.shop.bean.vo.OrderRefundVo;
|
|
|
import com.yami.shop.common.util.PageParam;
|
|
|
import com.yami.shop.common.util.R;
|
|
|
-import com.yami.shop.dao.OrderItemMapper;
|
|
|
-import com.yami.shop.dao.OrderRefundMapper;
|
|
|
-import com.yami.shop.dao.OrderRefundRecordMapper;
|
|
|
-import com.yami.shop.dao.OrderRefundSkuMapper;
|
|
|
+import com.yami.shop.dao.*;
|
|
|
import com.yami.shop.service.OrderRefundService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
@@ -43,6 +42,9 @@ public class OrderRefundController {
|
|
|
private final OrderItemMapper orderItemMapper;
|
|
|
private final OrderRefundRecordMapper orderRefundRecordMapper;
|
|
|
|
|
|
+ private final RefundAppointmentMapper refundAppointmentMapper;
|
|
|
+ private final RefundDeliveryMapper refundDeliveryMapper;
|
|
|
+
|
|
|
/**
|
|
|
* 分页查询
|
|
|
*
|
|
|
@@ -51,10 +53,9 @@ public class OrderRefundController {
|
|
|
* @return 分页数据
|
|
|
*/
|
|
|
@GetMapping("/page")
|
|
|
- @PreAuthorize("@pms.hasPermission('platform:orderRefund:page')")
|
|
|
+// @PreAuthorize("@pms.hasPermission('platform:orderRefund:page')")
|
|
|
public R<IPage<OrderRefundDto>> getOrderRefundPage(PageParam<OrderRefundDto> page, OrderRefundDto orderRefundDto,
|
|
|
@RequestParam(required = false) String startTime, @RequestParam(required = false) String endTime) {
|
|
|
- IPage<OrderRefundDto> page1 = orderRefundService.getPage(page, orderRefundDto, startTime, endTime);
|
|
|
return R.SUCCESS(orderRefundService.getPage(page, orderRefundDto, startTime, endTime));
|
|
|
}
|
|
|
|
|
|
@@ -85,6 +86,18 @@ public class OrderRefundController {
|
|
|
.orderByDesc(OrderRefundRecord::getSort));
|
|
|
orderRefundVo.setOrderRefundRecordList(orderRefundRecords);
|
|
|
|
|
|
+ Integer dvyType = orderRefundVo.getDvyType();
|
|
|
+ if (dvyType == 1){
|
|
|
+ // 1:快递 2:自提 3:及时配送
|
|
|
+ RefundDelivery refundDelivery = refundDeliveryMapper.selectOne(new LambdaQueryWrapper<RefundDelivery>()
|
|
|
+ .eq(RefundDelivery::getRefundSn, orderRefundVo.getRefundSn()));
|
|
|
+ orderRefundVo.setRefundDelivery(refundDelivery);
|
|
|
+ }else {
|
|
|
+ RefundAppointment refundAppointment = refundAppointmentMapper.selectOne(new LambdaQueryWrapper<RefundAppointment>()
|
|
|
+ .eq(RefundAppointment::getRefundNumber, orderRefundVo.getRefundSn()));
|
|
|
+ orderRefundVo.setRefundAppointment(refundAppointment);
|
|
|
+ }
|
|
|
+
|
|
|
List<OrderRefundSkuVo> orderRefundSkuVos = orderRefundskuMapper.selectByRefundId(refundId);
|
|
|
orderRefundSkuVos.forEach(c -> c.setOrderItem(orderItemMapper.selectById(c.getOrderItemId())));
|
|
|
orderRefundVo.setOrderRefundSkuList(orderRefundSkuVos);
|