feat(db): 优化ShopDealerApply查询条件支持接待人过滤
- 修改ShopDealerApplyMapper.xml,增加接待人ID和申请用户ID的联合过滤条件 - 支持当接待人ID与申请用户ID都存在时,进行多条件OR查询 - 支持单独存在接待人ID时的过滤条件 - 在ShopDealerApplyParam中新增receptionistId字段,支持接待人用户ID查询参数 - 完善查询条件逻辑,提高业务灵活性和数据筛选能力
This commit is contained in:
@@ -16,7 +16,10 @@
|
|||||||
<if test="param.type != null">
|
<if test="param.type != null">
|
||||||
AND a.type = #{param.type}
|
AND a.type = #{param.type}
|
||||||
</if>
|
</if>
|
||||||
<if test="param.userId != null">
|
<if test="param.userId != null and param.receptionistId != null">
|
||||||
|
AND (a.user_id = #{param.userId} OR a.receptionist_id = #{param.receptionistId})
|
||||||
|
</if>
|
||||||
|
<if test="param.userId != null and param.receptionistId == null">
|
||||||
AND a.user_id = #{param.userId}
|
AND a.user_id = #{param.userId}
|
||||||
</if>
|
</if>
|
||||||
<if test="param.realName != null">
|
<if test="param.realName != null">
|
||||||
@@ -46,6 +49,9 @@
|
|||||||
<if test="param.refereeId != null">
|
<if test="param.refereeId != null">
|
||||||
AND a.referee_id = #{param.refereeId}
|
AND a.referee_id = #{param.refereeId}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="param.receptionistId != null and param.userId == null">
|
||||||
|
AND a.receptionist_id = #{param.receptionistId}
|
||||||
|
</if>
|
||||||
<if test="param.applyType != null">
|
<if test="param.applyType != null">
|
||||||
AND a.apply_type = #{param.applyType}
|
AND a.apply_type = #{param.applyType}
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
@@ -59,6 +59,10 @@ public class ShopDealerApplyParam extends BaseParam {
|
|||||||
@QueryField(type = QueryType.EQ)
|
@QueryField(type = QueryType.EQ)
|
||||||
private Integer refereeId;
|
private Integer refereeId;
|
||||||
|
|
||||||
|
@Schema(description = "接待人用户ID")
|
||||||
|
@QueryField(type = QueryType.EQ)
|
||||||
|
private Integer receptionistId;
|
||||||
|
|
||||||
@Schema(description = "申请方式(10需后台审核 20无需审核)")
|
@Schema(description = "申请方式(10需后台审核 20无需审核)")
|
||||||
@QueryField(type = QueryType.EQ)
|
@QueryField(type = QueryType.EQ)
|
||||||
private Integer applyType;
|
private Integer applyType;
|
||||||
|
|||||||
Reference in New Issue
Block a user