修改产品列表查询及师傅列表查询

This commit is contained in:
donqi 2022-12-31 20:41:07 +08:00
parent a9a05faeb9
commit 07350aa6d5
6 changed files with 22 additions and 1 deletions

View File

@ -181,6 +181,7 @@ public class WorkerController extends BaseController {
try { try {
// 查询满足区域条件的师傅区域记录 // 查询满足区域条件的师傅区域记录
worker.setDistrictId(workerListRequest.getAreaId()); worker.setDistrictId(workerListRequest.getAreaId());
worker.setDistrictIds(workerListRequest.getAreaIds());
// 查询需要排除的区 // 查询需要排除的区
if (workerListRequest.getExceptParentAreaId() != null) { if (workerListRequest.getExceptParentAreaId() != null) {
SysArea areaParams = new SysArea(); SysArea areaParams = new SysArea();

View File

@ -3,6 +3,8 @@ package com.ghy.web.pojo.vo;
import com.ghy.worker.domain.Worker; import com.ghy.worker.domain.Worker;
import lombok.Data; import lombok.Data;
import java.util.List;
/** /**
* @author ydq * @author ydq
* @date : 2022-06-24 17:38 * @date : 2022-06-24 17:38
@ -11,6 +13,8 @@ import lombok.Data;
public class WorkerListRequest { public class WorkerListRequest {
private Long areaId; private Long areaId;
private List<Long> areaIds;
private Long goodsCategoryId; private Long goodsCategoryId;
private String workerName; private String workerName;

View File

@ -63,6 +63,8 @@ public class Goods extends BaseEntity {
@Excel(name = "区域Id", cellType = Excel.ColumnType.NUMERIC) @Excel(name = "区域Id", cellType = Excel.ColumnType.NUMERIC)
private Long areaId; private Long areaId;
private List<Long> areaIds;
private Long exceptParentAreaId; private Long exceptParentAreaId;
private List<GoodsArea> goodsAreaList; private List<GoodsArea> goodsAreaList;

View File

@ -110,6 +110,12 @@
<if test="areaId != null and areaId != ''"> <if test="areaId != null and areaId != ''">
AND country_area_id = #{areaId} AND country_area_id = #{areaId}
</if> </if>
<if test="areaIds != null and areaIds.size > 0">
AND country_area_id in
<foreach collection="areaIds" item="areaId" open="(" separator="," close=")">
#{areaId}
</foreach>
</if>
<if test="exceptParentAreaId != null"> <if test="exceptParentAreaId != null">
AND sa.parent_code != #{exceptParentAreaId} AND sa.parent_code != #{exceptParentAreaId}
</if> </if>

View File

@ -66,6 +66,8 @@ public class Worker extends BaseEntity {
private Long districtId; private Long districtId;
private List<Long> districtIds;
private List<Long> exceptDistrictIds; private List<Long> exceptDistrictIds;
private Long goodsCategoryId; private Long goodsCategoryId;

View File

@ -61,7 +61,13 @@
<if test="districtId != null"> <if test="districtId != null">
AND wa.district_id = #{districtId} AND wa.district_id = #{districtId}
</if> </if>
<if test="exceptDistrictIds != null"> <if test="districtIds != null and districtIds.size > 0">
AND wa.district_id in
<foreach collection="districtIds" item="districtId" open="(" separator="," close=")">
#{districtId}
</foreach>
</if>
<if test="exceptDistrictIds != null and exceptDistrictIds.size > 0">
AND wa.district_id not in AND wa.district_id not in
<foreach collection="exceptDistrictIds" item="exceptDistrictId" open="(" separator="," close=")"> <foreach collection="exceptDistrictIds" item="exceptDistrictId" open="(" separator="," close=")">
#{exceptDistrictId} #{exceptDistrictId}