pull/1121/head
parent
17bbbf28c3
commit
3f2d89cbbb
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
/**
|
||||
* 订单状态(1开头为销售订单状态,2开头为退货订单状态)[10:已取消 11:待付款 12:待发货 13:已发货 14:已完成 21:售后中 22:售后拒绝 23:平台介入 24:售后完成]
|
||||
*/
|
||||
private List<Integer> orderStatusList;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,6 +44,10 @@ public class StoreOrderQueryDTO extends BasePageDTO {
|
|||
* 订单状态(1开头为销售订单状态,2开头为退货订单状态)[10:已取消 11:待付款 12:待发货 13:已发货 14:已完成 21:售后中 22:售后拒绝 23:平台介入 24:售后完成]
|
||||
*/
|
||||
private Integer orderStatus;
|
||||
/**
|
||||
* 订单状态(1开头为销售订单状态,2开头为退货订单状态)[10:已取消 11:待付款 12:待发货 13:已发货 14:已完成 21:售后中 22:售后拒绝 23:平台介入 24:售后完成]
|
||||
*/
|
||||
private List<Integer> orderStatusList;
|
||||
/**
|
||||
* 收货人-名称(模糊)
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
Loading…
Reference in New Issue