UserAscriptionMapper.xml 1.1 KB

12345678910111213141516171819202122
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.tofly.base.mapper.UserAscriptionMapper">
  4. <resultMap id="userParentMap" type="com.tofly.base.entity.UserAscription">
  5. <id property="id" column="ID"/>
  6. <result property="parentUserId" column="PARENT_USER_ID"/>
  7. <result property="userId" column="USER_ID"/>
  8. <association property="parentUserIdName" column="PARENT_USER_ID" select="com.tofly.baseapi.mapper.ToflyCodeCommonMapper.getUserName"/>
  9. <association property="userIdName" column="USER_ID" select="com.tofly.baseapi.mapper.ToflyCodeCommonMapper.getUserName"/>
  10. <association property="parentUserLonginName" column="PARENT_USER_ID" select="getUserLonginName"/>
  11. <association property="userLonginName" column="USER_ID" select="getUserLonginName"/>
  12. </resultMap>
  13. <select id="getUserLonginName" resultType="String">
  14. select USERNAME
  15. from TF_SMPN_USER_X
  16. where id = #{userId}
  17. </select>
  18. </mapper>