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