feat(db): 优化ShopDealerApply查询条件支持接待人过滤

- 修改ShopDealerApplyMapper.xml,增加接待人ID和申请用户ID的联合过滤条件
- 支持当接待人ID与申请用户ID都存在时,进行多条件OR查询
- 支持单独存在接待人ID时的过滤条件
- 在ShopDealerApplyParam中新增receptionistId字段,支持接待人用户ID查询参数
- 完善查询条件逻辑,提高业务灵活性和数据筛选能力
This commit is contained in:
2026-04-16 17:42:21 +08:00
parent 9ec44dbe5c
commit 30a53e7283
2 changed files with 11 additions and 1 deletions

View File

@@ -16,7 +16,10 @@
<if test="param.type != null">
AND a.type = #{param.type}
</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}
</if>
<if test="param.realName != null">
@@ -46,6 +49,9 @@
<if test="param.refereeId != null">
AND a.referee_id = #{param.refereeId}
</if>
<if test="param.receptionistId != null and param.userId == null">
AND a.receptionist_id = #{param.receptionistId}
</if>
<if test="param.applyType != null">
AND a.apply_type = #{param.applyType}
</if>

View File

@@ -59,6 +59,10 @@ public class ShopDealerApplyParam extends BaseParam {
@QueryField(type = QueryType.EQ)
private Integer refereeId;
@Schema(description = "接待人用户ID")
@QueryField(type = QueryType.EQ)
private Integer receptionistId;
@Schema(description = "申请方式(10需后台审核 20无需审核)")
@QueryField(type = QueryType.EQ)
private Integer applyType;