feat(house): 添加用户手机号字段并关联查询
- 在 HouseInfo 实体类中新增 userPhone 字段- 配置 userPhone 字段不映射数据库表字段 - 在 HouseInfoMapper.xml 中关联查询用户手机号 - 将用户手机号别名设置为 userPhone 返回前端使用
This commit is contained in:
@@ -148,6 +148,10 @@ public class HouseInfo implements Serializable {
|
||||
@Schema(description = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@Schema(description = "用户手机号")
|
||||
@TableField(exist = false)
|
||||
private String userPhone;
|
||||
|
||||
@Schema(description = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*,
|
||||
b.nickname,b.avatar,b.grade_id
|
||||
b.nickname,b.avatar,b.grade_id, b.phone as userPhone
|
||||
FROM house_info a
|
||||
LEFT JOIN gxwebsoft_core.sys_user b ON a.user_id = b.user_id
|
||||
<where>
|
||||
|
||||
Reference in New Issue
Block a user