|
|
@@ -34,6 +34,7 @@ import com.fs.store.service.*;
|
|
|
import com.fs.store.vo.*;
|
|
|
import com.hc.openapi.tool.fastjson.JSON;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
+import org.apache.commons.collections4.CollectionUtils;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
@@ -85,8 +86,9 @@ public class FsStoreOrderController extends BaseController {
|
|
|
private IFsStoreProductCacheService fsStoreProductCacheService;
|
|
|
|
|
|
@Autowired
|
|
|
- private FsWarehousesMapper fsWarehousesMapper;
|
|
|
-
|
|
|
+ private IFsCoursePlaySourceConfigService fsCoursePlaySourceConfigService;
|
|
|
+ @Autowired
|
|
|
+ private IFsStorePaymentService fsStorePaymentService;
|
|
|
@Autowired
|
|
|
private FsStoreOrderMapper fsStoreOrderMapper;
|
|
|
|
|
|
@@ -198,6 +200,12 @@ public class FsStoreOrderController extends BaseController {
|
|
|
@Log(title = "订单", businessType = BusinessType.EXPORT)
|
|
|
@GetMapping("/export")
|
|
|
public AjaxResult export(FsStoreOrderParam param) {
|
|
|
+ // 将逗号分隔的字符串转换为 List
|
|
|
+ List<String> orderSourceList = null;
|
|
|
+ if (StringUtils.isNotBlank(param.getOrderSource())) {
|
|
|
+ orderSourceList = Arrays.asList(param.getOrderSource().split(","));
|
|
|
+ param.setOrderSources(orderSourceList);
|
|
|
+ }
|
|
|
if (param.getBeginTime().equals("") && param.getEndTime().equals("")){
|
|
|
param.setBeginTime(null);
|
|
|
param.setEndTime(null);
|
|
|
@@ -231,6 +239,12 @@ public class FsStoreOrderController extends BaseController {
|
|
|
if (vo.getUserAddress()!=null){
|
|
|
vo.setUserAddress(ParseUtils.parseAddress(vo.getUserAddress()));
|
|
|
}
|
|
|
+ List<FsStorePayment> fsStorePayments = fsStorePaymentService.selectFsStorePaymentByOrderIdNew(vo.getId());
|
|
|
+ if (CollectionUtils.isEmpty(fsStorePayments)) {continue;}
|
|
|
+ FsCoursePlaySourceConfig fsCoursePlaySourceConfig = fsCoursePlaySourceConfigService.selectFsCoursePlaySourceConfigByAppId(fsStorePayments.get(0).getAppId());
|
|
|
+ if(ObjectUtil.isNotEmpty(fsCoursePlaySourceConfig)){
|
|
|
+ vo.setOrderSource(fsCoursePlaySourceConfig.getName());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
ExcelUtil<FsStoreOrderExportVO> util = new ExcelUtil<FsStoreOrderExportVO>(FsStoreOrderExportVO.class);
|