pull/1121/head
梁宇奇 2025-08-19 14:44:23 +08:00
parent 33f8823a97
commit 37adf3c384
3 changed files with 13 additions and 7 deletions

View File

@ -191,7 +191,7 @@ public class StoreOrderController extends XktBaseController {
return success(PageVO.of(pageDTO, StoreOrderPageItemVO.class));
}
@PreAuthorize("@ss.hasAnyRoles('store')||@ss.hasSupplierSubRole()")
@PreAuthorize("@ss.hasAnyRoles('store,seller,agent')||@ss.hasSupplierSubRole()")
@ApiOperation(value = "导出订单")
@PostMapping("/export")
@ResponseHeader
@ -199,10 +199,17 @@ public class StoreOrderController extends XktBaseController {
StoreOrderQueryDTO queryDTO = BeanUtil.toBean(vo, StoreOrderQueryDTO.class);
//日期转时间
date2Time(queryDTO);
Long storeId = SecurityUtils.getStoreId();
queryDTO.setStoreId(storeId);
String storeName = storeService.getStoreNameByIds(Collections.singletonList(storeId)).get(storeId);
String title = StrUtil.emptyIfNull(storeName).concat("代发订单");
String title = "代发订单";
if (!SecurityUtils.isAdmin()) {
Long storeId = SecurityUtils.getStoreId();
if (storeId != null) {
queryDTO.setStoreId(storeId);
String storeName = storeService.getStoreNameByIds(Collections.singletonList(storeId)).get(storeId);
title = StrUtil.emptyIfNull(storeName).concat("代发订单");
} else {
queryDTO.setOrderUserId(SecurityUtils.getUserId());
}
}
try (ServletOutputStream os = response.getOutputStream()) {
FileUtils.setAttachmentResponseHeader(response, title + ".xlsx");
storeOrderService.exportOrder(queryDTO, null, title, os);

View File

@ -237,7 +237,6 @@ public class ZtoExpressManagerImpl implements ExpressManager, InitializingBean {
}
//等待推送
try {
//TODO 等待时间?
TimeUnit.SECONDS.sleep(3);
} catch (InterruptedException e) {
throw new ServiceException("系统异常");

View File

@ -1303,7 +1303,7 @@ public class StoreOrderServiceImpl implements IStoreOrderService {
order.setId(null);
order.setCreateTime(null);
order.setUpdateTime(null);
// order.setPayTradeNo(null);
order.setPayTradeNo(null);
// order.setPayOverTime(null);
// order.setDeliveryOverTime(null);
order.setVoucherDate(new Date());