<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String">SELECT
a.user_id,
b.dictionary_content user_grade,
c.dictionary_content user_subject,
a.user_password,
a.user_name,
a.user_phone,
a.user_address,
a.user_register_time,
d.dictionary_content user_sex,
a.user_sign,
a.user_icon
FROM
teacher_user AS a
INNERJOIN system_dictionary AS b ON b.dictionary_id = a.user_grade
INNERJOIN system_dictionary AS c ON c.dictionary_id = a.user_subject
INNERJOIN system_dictionary AS d ON d.dictionary_id = a.user_sex
WHERE
a.is_deleted ="N"AND a.user_id =#{userId,jdbcType=VARCHAR}47534bd1bf5a41f7a16c306188af0864
</select>
根据手机号查找老师
<select id="findUserByPhone" resultMap="BaseResultMap" parameterType="java.lang.String">SELECT
a.user_id,
b.dictionary_content user_grade,
c.dictionary_content user_subject,
a.user_password,
a.user_name,
a.user_phone,
a.user_address,
a.user_register_time,
d.dictionary_content user_sex,
a.user_sign,
a.user_icon
FROM
teacher_user AS a
INNERJOIN system_dictionary AS b ON b.dictionary_id = a.user_grade
INNERJOIN system_dictionary AS c ON c.dictionary_id = a.user_subject
INNERJOIN system_dictionary AS d ON d.dictionary_id = a.user_sex
WHERE
a.is_deleted ="N"AND a.user_phone =#{userPhone,jdbcType=VARCHAR}</select>