|
|
@ -19,6 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<result property="createdAt" column="created_at" /> |
|
|
<result property="createdAt" column="created_at" /> |
|
|
<result property="updatedAt" column="updated_at" /> |
|
|
<result property="updatedAt" column="updated_at" /> |
|
|
<result property="nickName" column="nick_name" /> |
|
|
<result property="nickName" column="nick_name" /> |
|
|
|
|
|
<result property="avatar" column="avatar"/> |
|
|
</resultMap> |
|
|
</resultMap> |
|
|
|
|
|
|
|
|
<!-- 修改为关联查询 --> |
|
|
<!-- 修改为关联查询 --> |
|
|
@ -37,7 +38,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
f.images, |
|
|
f.images, |
|
|
f.created_at, |
|
|
f.created_at, |
|
|
f.updated_at, |
|
|
f.updated_at, |
|
|
u.nick_name <!-- 从sys_user表关联查询昵称 --> |
|
|
|
|
|
|
|
|
u.nick_name, <!-- 从sys_user表关联查询昵称 --> |
|
|
|
|
|
u.avatar |
|
|
from muhu_feedback f |
|
|
from muhu_feedback f |
|
|
left join sys_user u on f.user_id = u.user_id |
|
|
left join sys_user u on f.user_id = u.user_id |
|
|
</sql> |
|
|
</sql> |
|
|
@ -58,6 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<if test="createdAt != null "> and created_at = #{createdAt}</if> |
|
|
<if test="createdAt != null "> and created_at = #{createdAt}</if> |
|
|
<if test="updatedAt != null "> and updated_at = #{updatedAt}</if> |
|
|
<if test="updatedAt != null "> and updated_at = #{updatedAt}</if> |
|
|
<if test="nickName != null and nickName != ''"> and nick_name like concat('%', #{nickName}, '%')</if> |
|
|
<if test="nickName != null and nickName != ''"> and nick_name like concat('%', #{nickName}, '%')</if> |
|
|
|
|
|
<if test="avatar != null "> and avatar = #{avatar}</if> |
|
|
</where> |
|
|
</where> |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
|