| <?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.zy.crm.manager.mapper.ItemMapper"> | 
|   | 
|     <!-- 通用查询映射结果 --> | 
|     <resultMap id="BaseResultMap" type="com.zy.crm.manager.entity.Item"> | 
|         <id column="id" property="id" /> | 
|         <result column="host_id" property="hostId" /> | 
|         <result column="name" property="name" /> | 
|         <result column="order_num" property="orderNum" /> | 
|         <result column="in_order_num" property="inOrderNum" /> | 
|         <result column="cstmr_uuid" property="cstmrUuid" /> | 
|         <result column="cstmr" property="cstmr" /> | 
|         <result column="member" property="member" /> | 
|         <result column="leader" property="leader" /> | 
|         <result column="start_time" property="startTime" /> | 
|         <result column="end_time" property="endTime" /> | 
|         <result column="status" property="status" /> | 
|         <result column="update_time" property="updateTime" /> | 
|     </resultMap> | 
|   | 
|     <select id="listByPage" resultMap="BaseResultMap"> | 
|         SELECT | 
|         * | 
|         FROM man_item | 
|         WHERE 1=1 | 
|         <if test="userIds != null"> | 
|             and member in | 
|             <foreach collection="userIds" index="index" item="item" separator="," open="(" close=")"> | 
|                 #{item} | 
|             </foreach> | 
|         </if> | 
|         <if test="condition != null and condition != ''"> | 
|             and ( | 
|             id like concat('%',#{condition},'%') | 
|             or host_id like concat('%',#{condition},'%') | 
|             or name like concat('%',#{condition},'%') | 
|             or in_order_num like concat('%',#{condition},'%') | 
|             or cstmr_uuid like concat('%',#{condition},'%') | 
|             or cstmr like concat('%',#{condition},'%') | 
|             or member like concat('%',#{condition},'%') | 
|             or leader like concat('%',#{condition},'%') | 
|             ) | 
|         </if> | 
|         ORDER BY id DESC | 
|     </select> | 
|   | 
| </mapper> |