| 123456789101112131415161718 |
- <?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.template.mapper.SmartAuthorGroupMapper">
- <resultMap type="com.template.model.pojo.SmartAuthorGroup" id="smartAuthorGroupMap">
- <result property="id" column="id"/>
- <result property="parentId" column="parent_id"/>
- <result property="name" column="name"/>
- <result property="userId" column="user_id"/>
- <result property="applyId" column="apply_id"/>
- </resultMap>
- <select id="smartAuthorGroup" resultType="com.template.model.pojo.SmartAuthorGroup" resultMap="smartAuthorGroupMap">
- SELECT * FROM `smart_author_group`
- where deleted = 0
- <if test="userId != null and userId != ''">
- and FIND_IN_SET(#{userId},user_id)
- </if>
- </select>
- </mapper>
|