pull/1121/head
梁宇奇 2025-08-22 01:29:08 +08:00
parent 17bbbf28c3
commit 3f2d89cbbb
5 changed files with 44 additions and 1 deletions

View File

@ -180,6 +180,10 @@ public class StoreOrderController extends XktBaseController {
queryDTO.setOrderUserId(SecurityUtils.getUserId());
} else {
Long storeId = SecurityUtils.getStoreId();
if (storeId != null) {
//不显示已取消、未支付的订单
queryDTO.setOrderStatusList(EOrderStatus.storeDisplayOrderStatusValues());
}
if (storeId == null && !SecurityUtils.isAdmin()) {
//没有权限
return success();
@ -204,6 +208,8 @@ public class StoreOrderController extends XktBaseController {
Long storeId = SecurityUtils.getStoreId();
if (storeId != null) {
queryDTO.setStoreId(storeId);
//不显示已取消、未支付的订单
queryDTO.setOrderStatusList(EOrderStatus.storeDisplayOrderStatusValues());
String storeName = storeService.getStoreNameByIds(Collections.singletonList(storeId)).get(storeId);
title = StrUtil.emptyIfNull(storeName).concat("代发订单");
} else {
@ -248,6 +254,10 @@ public class StoreOrderController extends XktBaseController {
queryDTO.setOrderUserId(SecurityUtils.getUserId());
} else {
Long storeId = SecurityUtils.getStoreId();
if (storeId != null) {
//不显示已取消、未支付的订单
queryDTO.setOrderStatusList(EOrderStatus.storeDisplayOrderStatusValues());
}
if (storeId == null && !SecurityUtils.isAdmin()) {
//没有权限
return R.fail();

View File

@ -3,6 +3,7 @@ package com.ruoyi.xkt.dto.order;
import lombok.Data;
import java.util.Date;
import java.util.List;
/**
* @author liangyq
@ -26,4 +27,8 @@ public class StoreOrderCountQueryDTO {
*
*/
private Date createTimeEnd;
/**
* 12退[10: 11: 12: 13: 14: 21: 22: 23: 24:]
*/
private List<Integer> orderStatusList;
}

View File

@ -44,6 +44,10 @@ public class StoreOrderQueryDTO extends BasePageDTO {
* 12退[10: 11: 12: 13: 14: 21: 22: 23: 24:]
*/
private Integer orderStatus;
/**
* 12退[10: 11: 12: 13: 14: 21: 22: 23: 24:]
*/
private List<Integer> orderStatusList;
/**
* -
*/

View File

@ -1,9 +1,11 @@
package com.ruoyi.xkt.enums;
import com.ruoyi.common.exception.ServiceException;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.Arrays;
import java.util.List;
/**
* @author liangyq
* @date 2025-04-02 23:42
@ -36,4 +38,14 @@ public enum EOrderStatus {
}
return null;
}
public static List<Integer> storeDisplayOrderStatusValues() {
return Arrays.asList(PENDING_SHIPMENT.getValue(),
SHIPPED.getValue(),
COMPLETED.getValue(),
AFTER_SALE_IN_PROGRESS.getValue(),
AFTER_SALE_REJECTED.getValue(),
PLATFORM_INTERVENED.getValue(),
AFTER_SALE_COMPLETED.getValue());
}
}

View File

@ -38,6 +38,12 @@
<if test="orderStatus != null">
AND so.order_status = #{orderStatus}
</if>
<if test="orderStatusList != null and !orderStatusList.isEmpty()">
AND so.order_status IN
<foreach collection="orderStatusList" item="obj" open="(" close=")" separator=",">
#{obj}
</foreach>
</if>
<if test="destinationContactName != null and destinationContactName !=''">
AND so.destination_contact_name LIKE CONCAT('%', #{destinationContactName}, '%')
</if>
@ -105,6 +111,12 @@
<if test="createTimeBegin != null and createTimeEnd != null">
AND create_time BETWEEN #{createTimeBegin} AND #{createTimeEnd}
</if>
<if test="orderStatusList != null and !orderStatusList.isEmpty()">
AND order_status IN
<foreach collection="orderStatusList" item="obj" open="(" close=")" separator=",">
#{obj}
</foreach>
</if>
</where>
</select>
<select id="listNeedAutoCompleteOrder" resultType="com.ruoyi.xkt.domain.StoreOrder">