46 lines
1.7 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.wzj.soopin.content.mapper.UserMemberMapper">
<resultMap id="BaseResultMap"
type="com.wzj.soopin.content.domain.po.Users">
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="mobile" property="mobile" jdbcType="VARCHAR" />
<result column="nickname" property="nickname" jdbcType="VARCHAR" />
<result column="imooc_num" property="imoocNum" jdbcType="VARCHAR" />
<result column="face" property="face" jdbcType="VARCHAR" />
<result column="sex" property="sex" jdbcType="INTEGER" />
<result column="birthday" property="birthday" jdbcType="DATE" />
<result column="country" property="country" jdbcType="VARCHAR" />
<result column="province" property="province" jdbcType="VARCHAR" />
<result column="city" property="city" jdbcType="VARCHAR" />
<result column="district" property="district" jdbcType="VARCHAR" />
<result column="description" property="description" jdbcType="VARCHAR" />
<result column="bg_img" property="bgImg" jdbcType="VARCHAR" />
<result column="can_imooc_num_be_updated" property="canImoocNumBeUpdated" jdbcType="INTEGER" />
</resultMap>
<select id="getUserByMemberId" resultMap="BaseResultMap"
parameterType="string">
SELECT
t1.id,
t1.mobile,
t1.nickname,
t1.imooc_num,
t1.face,
t1.sex,
t1.birthday,
t1.country,
t1.province,
t1.city,
t1.district,
t1.description,
t1.bg_img,
t1.can_imooc_num_be_updated
FROM t_users t1 INNER JOIN
r_user_member t2 ON t1.id=t2.user_id
WHERE t2.member_id=#{memberId}
</select>
</mapper>