|
@@ -21,10 +21,12 @@
|
|
|
<result property="updateBy" column="update_by"/>
|
|
|
<result property="updateTime" column="update_time"/>
|
|
|
<result property="remark" column="remark"/>
|
|
|
+ <result property="deptId" column="dept_id"/>
|
|
|
+ <result property="userId" column="user_id"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectTCustomerContactVo">
|
|
|
- select t_id, f_pid, f_no, f_name, f_ename, f_tel, f_duty, f_email, f_wx, f_status, del_flag, create_by, create_time, update_by, update_time, remark from t_customer_contact
|
|
|
+ select t_id, f_pid, f_no, f_name, f_ename, f_tel, f_duty, f_email, f_wx, dept_id, user_id, f_status, del_flag, create_by, create_time, update_by, update_time, remark from t_customer_contact
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectTCustomerContactList" parameterType="TCustomerContact" resultMap="TCustomerContactResult">
|
|
@@ -37,6 +39,7 @@
|
|
|
<if test="fTel != null and fTel != ''">and f_tel = #{fTel}</if>
|
|
|
<if test="fDuty != null and fDuty != ''">and f_duty = #{fDuty}</if>
|
|
|
<if test="fEmail != null and fEmail != ''">and f_email = #{fEmail}</if>
|
|
|
+ <if test="userId != null and userId != ''">and user_id = #{userId}</if>
|
|
|
<if test="fWx != null and fWx != ''">and f_wx = #{fWx}</if>
|
|
|
<if test="fStatus != null and fStatus != ''">and f_status = #{fStatus}</if>
|
|
|
</where>
|
|
@@ -47,6 +50,10 @@
|
|
|
where t_id = #{tId}
|
|
|
</select>
|
|
|
|
|
|
+ <select id="checkTelUnique" parameterType="string" resultType="int">
|
|
|
+ select count(t_id) from t_customer_contact where f_tel = #{fTel}
|
|
|
+ </select>
|
|
|
+
|
|
|
<insert id="insertTCustomerContact" parameterType="TCustomerContact" useGeneratedKeys="true" keyProperty="tId">
|
|
|
insert into t_customer_contact
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
@@ -65,6 +72,8 @@
|
|
|
<if test="updateBy != null">update_by,</if>
|
|
|
<if test="updateTime != null">update_time,</if>
|
|
|
<if test="remark != null">remark,</if>
|
|
|
+ <if test="deptId != null">dept_id,</if>
|
|
|
+ <if test="userId != null">user_id,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="fPid != null">#{fPid},</if>
|
|
@@ -82,6 +91,8 @@
|
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
|
<if test="remark != null">#{remark},</if>
|
|
|
+ <if test="deptId != null">#{deptId},</if>
|
|
|
+ <if test="userId != null">#{userId},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
@@ -103,6 +114,8 @@
|
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
|
+ <if test="deptId != null">dept_id = #{deptId},</if>
|
|
|
+ <if test="userId != null">user_id = #{userId},</if>
|
|
|
</trim>
|
|
|
where t_id = #{tId}
|
|
|
</update>
|