feat(shop): 添加管理员推荐关系查询功能
- 在 ShopDealerReferee 实体类中新增 isAdmin 字段 - 在 ShopDealerRefereeMapper.xml 中增加 is_admin 字段映射 - 修改 SQL 查询逻辑,支持根据 isAdmin 进行筛选 - 在 ShopDealerRefereeParam 参数类中新增 isAdmin 查询字段 - 使用 @QueryField 注解实现对 isAdmin 的精确查询支持
This commit is contained in:
@@ -60,6 +60,10 @@ public class ShopDealerReferee implements Serializable {
|
||||
@TableField(exist = false)
|
||||
private String phone;
|
||||
|
||||
@Schema(description = "是否管理员")
|
||||
@TableField(exist = false)
|
||||
private Boolean isAdmin;
|
||||
|
||||
@Schema(description = "推荐关系层级(1,2,3)")
|
||||
private Integer level;
|
||||
|
||||
|
||||
@@ -11,7 +11,8 @@
|
||||
u.nickname,
|
||||
u.avatar,
|
||||
u.alias,
|
||||
u.phone
|
||||
u.phone,
|
||||
u.is_admin as isAdmin
|
||||
FROM shop_dealer_referee a
|
||||
INNER JOIN gxwebsoft_core.sys_user d ON a.dealer_id = d.user_id AND d.deleted = 0
|
||||
INNER JOIN gxwebsoft_core.sys_user u ON a.user_id = u.user_id AND u.deleted = 0
|
||||
@@ -28,6 +29,9 @@
|
||||
<if test="param.level != null">
|
||||
AND a.level = #{param.level}
|
||||
</if>
|
||||
<if test="param.isAdmin != null">
|
||||
AND u.is_admin = 1
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.gxwebsoft.shop.param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
@@ -38,4 +40,8 @@ public class ShopDealerRefereeParam extends BaseParam {
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer level;
|
||||
|
||||
@Schema(description = "是否管理员")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Boolean isAdmin;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user