|
@@ -70,4 +70,38 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</if>
|
|
|
order by up.create_time desc
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="getInfo" parameterType="com.zhongzheng.modules.base.bo.UserProfileQueryBo" resultMap="UserProfileVo">
|
|
|
+ SELECT
|
|
|
+ up.*,
|
|
|
+ (SELECT u.realname FROM `user` u where u.user_id = up.user_id) as realname,
|
|
|
+ (SELECT u.user_account FROM `user` u where u.user_id = up.user_id) as user_account,
|
|
|
+ (SELECT u.telphone FROM `user` u where u.user_id = up.user_id) as telphone,
|
|
|
+ (SELECT u.id_card FROM `user` u where u.user_id = up.user_id) as id_card,
|
|
|
+ (SELECT g.goods_name FROM goods g where up.goods_id = g.goods_id) as goods_name,
|
|
|
+ (SELECT g.`code` FROM goods g where up.goods_id = g.goods_id) as goods_code,
|
|
|
+ (SELECT cet.education_name FROM goods g LEFT JOIN course_education_type cet on g.education_type_id = cet.id where up.goods_id = g.goods_id) as education_name,
|
|
|
+ (SELECT cet.project_name FROM goods g LEFT JOIN course_project_type cet on g.project_id = cet.id where up.goods_id = g.goods_id) as project_name,
|
|
|
+ (SELECT cet.business_name FROM goods g LEFT JOIN course_business cet on g.business_id = cet.id where up.goods_id = g.goods_id) as business_name
|
|
|
+ FROM
|
|
|
+ user_profile up
|
|
|
+ where 1=1
|
|
|
+ and up.current_status = 1
|
|
|
+ <if test="status != null and status.size()!=0 ">
|
|
|
+ AND up.status in
|
|
|
+ <foreach collection="status" item="item" index="index" open="(" close=")" separator=",">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="id != null and id !='' ">
|
|
|
+ AND up.id =#{id}
|
|
|
+ </if>
|
|
|
+ <if test="userId != null and userId !='' ">
|
|
|
+ AND up.user_id =#{userId}
|
|
|
+ </if>
|
|
|
+ <if test="goodsId != null and goodsId !='' ">
|
|
|
+ AND up.goods_id =#{goodsId}
|
|
|
+ </if>
|
|
|
+ order by up.create_time desc LIMIT 1
|
|
|
+ </select>
|
|
|
</mapper>
|