|
@@ -6,23 +6,28 @@
|
|
<resultMap id="BaseResultMap" type="com.management.platform.entity.Contacts">
|
|
<resultMap id="BaseResultMap" type="com.management.platform.entity.Contacts">
|
|
<id column="id" property="id" />
|
|
<id column="id" property="id" />
|
|
<result column="company_id" property="companyId" />
|
|
<result column="company_id" property="companyId" />
|
|
|
|
+ <result column="sex" property="sex" />
|
|
<result column="name" property="name" />
|
|
<result column="name" property="name" />
|
|
<result column="custom_id" property="customId" />
|
|
<result column="custom_id" property="customId" />
|
|
<result column="email" property="email" />
|
|
<result column="email" property="email" />
|
|
<result column="phone" property="phone" />
|
|
<result column="phone" property="phone" />
|
|
<result column="owner_id" property="ownerId" />
|
|
<result column="owner_id" property="ownerId" />
|
|
|
|
+ <result column="creator_id" property="creatorId" />
|
|
|
|
+ <result column="address" property="address" />
|
|
|
|
+ <result column="remark" property="remark" />
|
|
|
|
+ <result column="is_delete" property="isDelete" />
|
|
|
|
+ <result column="create_time" property="createTime" />
|
|
|
|
+ <result column="range" property="range" />
|
|
<result column="plate1" property="plate1" />
|
|
<result column="plate1" property="plate1" />
|
|
<result column="plate2" property="plate2" />
|
|
<result column="plate2" property="plate2" />
|
|
<result column="plate3" property="plate3" />
|
|
<result column="plate3" property="plate3" />
|
|
<result column="plate4" property="plate4" />
|
|
<result column="plate4" property="plate4" />
|
|
<result column="plate5" property="plate5" />
|
|
<result column="plate5" property="plate5" />
|
|
- <result column="is_delete" property="isDelete" />
|
|
|
|
- <result column="create_time" property="createTime" />
|
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<!-- 通用查询结果列 -->
|
|
<!-- 通用查询结果列 -->
|
|
<sql id="Base_Column_List">
|
|
<sql id="Base_Column_List">
|
|
- id, company_id, name, custom_id, email, phone, owner_id, plate1, plate2, plate3, plate4, plate5, is_delete, create_time
|
|
|
|
|
|
+ id, company_id, sex, name, custom_id, email, phone, owner_id, creator_id, address, remark, is_delete, create_time, range, plate1, plate2, plate3, plate4, plate5
|
|
</sql>
|
|
</sql>
|
|
<select id="pageContacts" parameterType="java.util.Map" resultType="com.management.platform.entity.vo.ContactsVo">
|
|
<select id="pageContacts" parameterType="java.util.Map" resultType="com.management.platform.entity.vo.ContactsVo">
|
|
SELECT c.*, cust.custom_name as customName, own.name as ownerName
|
|
SELECT c.*, cust.custom_name as customName, own.name as ownerName
|
|
@@ -39,12 +44,18 @@
|
|
<if test="map.ownerName != null and map.ownerName != ''">
|
|
<if test="map.ownerName != null and map.ownerName != ''">
|
|
AND own.name LIKE CONCAT('%', #{map.ownerName}, '%')
|
|
AND own.name LIKE CONCAT('%', #{map.ownerName}, '%')
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="map.creatorName != null and map.creatorName != ''">
|
|
|
|
+ AND own.name LIKE CONCAT('%', #{map.creatorName}, '%')
|
|
|
|
+ </if>
|
|
<if test="map.phone != null and map.phone != ''">
|
|
<if test="map.phone != null and map.phone != ''">
|
|
AND c.phone LIKE CONCAT('%', #{map.phone}, '%')
|
|
AND c.phone LIKE CONCAT('%', #{map.phone}, '%')
|
|
</if>
|
|
</if>
|
|
<if test="map.name != null and map.name != ''">
|
|
<if test="map.name != null and map.name != ''">
|
|
AND c.name LIKE CONCAT('%', #{map.name}, '%')
|
|
AND c.name LIKE CONCAT('%', #{map.name}, '%')
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="map.email != null and map.email != ''">
|
|
|
|
+ AND c.email LIKE CONCAT('%', #{map.email}, '%')
|
|
|
|
+ </if>
|
|
<if test="map.companyId != null">
|
|
<if test="map.companyId != null">
|
|
AND c.company_id=#{map.companyId}
|
|
AND c.company_id=#{map.companyId}
|
|
</if>
|
|
</if>
|