|
@@ -1,6 +1,7 @@
|
|
|
package com.sd.business.service.order.impl;
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
+import cn.hutool.core.convert.Convert;
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
@@ -15,6 +16,7 @@ import com.sd.business.entity.order.dto.OrderInfoDto;
|
|
|
import com.sd.business.entity.order.dto.OrderSelectDto;
|
|
|
import com.sd.business.entity.order.dto.OrderSkuDto;
|
|
|
import com.sd.business.entity.order.dto.SkuSpecPriceDto;
|
|
|
+import com.sd.business.entity.order.enums.OrderExceptionTypeEnum;
|
|
|
import com.sd.business.entity.order.enums.OrderStatusEnum;
|
|
|
import com.sd.business.entity.order.po.OrderInfo;
|
|
|
import com.sd.business.entity.order.po.OrderOperatingLog;
|
|
@@ -101,7 +103,36 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, OrderInfo> implem
|
|
|
OrderStatusEnum.HAVE_BEEN_SHIPPED.getKey());
|
|
|
}
|
|
|
|
|
|
- return this.baseMapper.getPage(dto.getPage(), wrapper);
|
|
|
+ if (dto.getException() != null) {
|
|
|
+ if (dto.getException().equals(StatusConstant.YES)) {
|
|
|
+ wrapper.eq("o", OrderInfo::getExceptionType, "0");
|
|
|
+ } else {
|
|
|
+ wrapper.ne("o", OrderInfo::getExceptionType, "0");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ Page<OrderInfoVo> page = this.baseMapper.getPage(dto.getPage(), wrapper);
|
|
|
+ List<OrderInfoVo> records = page.getRecords();
|
|
|
+
|
|
|
+ if (records.size() == 0) {
|
|
|
+ return page;
|
|
|
+ }
|
|
|
+
|
|
|
+ for (OrderInfoVo record : records) {
|
|
|
+
|
|
|
+ // 设置异常提示
|
|
|
+ String exceptionType = record.getExceptionType();
|
|
|
+ if (exceptionType.equals("0")) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ String exceptionTypeDetail = Arrays.stream(exceptionType.split(","))
|
|
|
+ .map(Convert::toInt)
|
|
|
+ .map(OrderExceptionTypeEnum::getEnumValue)
|
|
|
+ .collect(Collectors.joining(","));
|
|
|
+ record.setExceptionTypeDetail(exceptionTypeDetail);
|
|
|
+ }
|
|
|
+
|
|
|
+ return page;
|
|
|
}
|
|
|
|
|
|
@Override
|