| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143 |
- <?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.goafanti.common.dao.CustomerUserInfoMapper">
- <resultMap id="BaseResultMap" type="com.goafanti.common.model.CustomerUserInfo">
- <id column="id" jdbcType="VARCHAR" property="id" />
- <result column="cid" jdbcType="VARCHAR" property="cid" />
- <result column="name" jdbcType="VARCHAR" property="name" />
- <result column="sex" jdbcType="CHAR" property="sex" />
- <result column="mobile" jdbcType="VARCHAR" property="mobile" />
- <result column="tel_num" jdbcType="VARCHAR" property="telNum" />
- <result column="email" jdbcType="VARCHAR" property="email" />
- <result column="qq" jdbcType="VARCHAR" property="qq" />
- <result column="wechat" jdbcType="VARCHAR" property="wechat" />
- <result column="depatrment" jdbcType="VARCHAR" property="depatrment" />
- <result column="customer_position" jdbcType="VARCHAR" property="customerPosition" />
- <result column="remarks" jdbcType="VARCHAR" property="remarks" />
- </resultMap>
-
-
- <!-- 新增 -->
- <insert id="insertCustomerUser" parameterType="com.goafanti.common.model.CustomerUserInfo">
- insert into customer_user_info
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">
- id,
- </if>
- <if test="cid != null">
- cid,
- </if>
- <if test="name != null">
- name,
- </if>
- <if test="sex != null">
- sex,
- </if>
- <if test="mobile != null">
- mobile,
- </if>
- <if test="telNum != null">
- tel_num,
- </if>
- <if test="email != null">
- email,
- </if>
- <if test="qq != null">
- qq,
- </if>
- <if test="wechat != null">
- wechat,
- </if>
- <if test="depatrment != null">
- depatrment,
- </if>
- <if test="customerPosition != null">
- customer_position,
- </if>
- <if test="remarks != null">
- remarks,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">
- #{id,jdbcType=VARCHAR},
- </if>
- <if test="cid != null">
- #{cid,jdbcType=VARCHAR},
- </if>
- <if test="name != null">
- #{name,jdbcType=VARCHAR},
- </if>
- <if test="sex != null">
- #{sex,jdbcType=CHAR},
- </if>
- <if test="mobile != null">
- #{mobile,jdbcType=VARCHAR},
- </if>
- <if test="telNum != null">
- #{telNum,jdbcType=VARCHAR},
- </if>
- <if test="email != null">
- #{email,jdbcType=VARCHAR},
- </if>
- <if test="qq != null">
- #{qq,jdbcType=VARCHAR},
- </if>
- <if test="wechat != null">
- #{wechat,jdbcType=VARCHAR},
- </if>
- <if test="depatrment != null">
- #{depatrment,jdbcType=VARCHAR},
- </if>
- <if test="customerPosition != null">
- #{customerPosition,jdbcType=VARCHAR},
- </if>
- <if test="remarks != null">
- #{remarks,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
-
- <delete id="deleteCustomerUserByCid" parameterType="java.lang.String">
- delete from customer_user_info
- where cid = #{cid,jdbcType=VARCHAR}
- </delete>
-
- <update id="updateCustomerUserByPrimaryKey" parameterType="com.goafanti.common.model.CustomerUserInfo">
- update customer_user_info
- <set>
- <if test="cid != null">
- cid = #{cid,jdbcType=VARCHAR},
- </if>
- <if test="name != null">
- name = #{name,jdbcType=VARCHAR},
- </if>
- <if test="sex != null">
- sex = #{sex,jdbcType=INTEGER},
- </if>
- <if test="mobile != null">
- mobile = #{mobile,jdbcType=VARCHAR},
- </if>
- <if test="email != null">
- email = #{email,jdbcType=VARCHAR},
- </if>
- <if test="qq != null">
- qq = #{qq,jdbcType=VARCHAR},
- </if>
- <if test="wechat != null">
- wechat = #{wechat,jdbcType=VARCHAR},
- </if>
- <if test="depatrment != null">
- depatrment = #{depatrment,jdbcType=VARCHAR},
- </if>
- <if test="customerPosition != null">
- customer_position = #{customerPosition,jdbcType=VARCHAR},
- </if>
- <if test="remarks != null">
- remarks = #{remarks,jdbcType=VARCHAR},
- </if>
- </set>
- where cid = #{cid,jdbcType=VARCHAR}
- </update>
-
- </mapper>
|