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

View File

@ -3,6 +3,7 @@ package com.ruoyi.xkt.dto.order;
import lombok.Data; import lombok.Data;
import java.util.Date; import java.util.Date;
import java.util.List;
/** /**
* @author liangyq * @author liangyq
@ -26,4 +27,8 @@ public class StoreOrderCountQueryDTO {
* *
*/ */
private Date createTimeEnd; 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:] * 12退[10: 11: 12: 13: 14: 21: 22: 23: 24:]
*/ */
private Integer orderStatus; 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; package com.ruoyi.xkt.enums;
import com.ruoyi.common.exception.ServiceException;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Getter; import lombok.Getter;
import java.util.Arrays;
import java.util.List;
/** /**
* @author liangyq * @author liangyq
* @date 2025-04-02 23:42 * @date 2025-04-02 23:42
@ -36,4 +38,14 @@ public enum EOrderStatus {
} }
return null; 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"> <if test="orderStatus != null">
AND so.order_status = #{orderStatus} AND so.order_status = #{orderStatus}
</if> </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 !=''"> <if test="destinationContactName != null and destinationContactName !=''">
AND so.destination_contact_name LIKE CONCAT('%', #{destinationContactName}, '%') AND so.destination_contact_name LIKE CONCAT('%', #{destinationContactName}, '%')
</if> </if>
@ -105,6 +111,12 @@
<if test="createTimeBegin != null and createTimeEnd != null"> <if test="createTimeBegin != null and createTimeEnd != null">
AND create_time BETWEEN #{createTimeBegin} AND #{createTimeEnd} AND create_time BETWEEN #{createTimeBegin} AND #{createTimeEnd}
</if> </if>
<if test="orderStatusList != null and !orderStatusList.isEmpty()">
AND order_status IN
<foreach collection="orderStatusList" item="obj" open="(" close=")" separator=",">
#{obj}
</foreach>
</if>
</where> </where>
</select> </select>
<select id="listNeedAutoCompleteOrder" resultType="com.ruoyi.xkt.domain.StoreOrder"> <select id="listNeedAutoCompleteOrder" resultType="com.ruoyi.xkt.domain.StoreOrder">