SmartAuthorGroupMapper.xml 898 B

123456789101112131415161718
  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.template.mapper.SmartAuthorGroupMapper">
  4. <resultMap type="com.template.model.pojo.SmartAuthorGroup" id="smartAuthorGroupMap">
  5. <result property="id" column="id"/>
  6. <result property="parentId" column="parent_id"/>
  7. <result property="name" column="name"/>
  8. <result property="userId" column="user_id"/>
  9. <result property="applyId" column="apply_id"/>
  10. </resultMap>
  11. <select id="smartAuthorGroup" resultType="com.template.model.pojo.SmartAuthorGroup" resultMap="smartAuthorGroupMap">
  12. SELECT * FROM `smart_author_group`
  13. where deleted = 0
  14. <if test="userId != null and userId != ''">
  15. and FIND_IN_SET(userId,user_id)
  16. </if>
  17. </select>
  18. </mapper>