CustomerUserInfoMapper.xml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.goafanti.common.dao.CustomerUserInfoMapper">
  4. <resultMap id="BaseResultMap" type="com.goafanti.common.model.CustomerUserInfo">
  5. <id column="id" jdbcType="VARCHAR" property="id" />
  6. <result column="cid" jdbcType="VARCHAR" property="cid" />
  7. <result column="name" jdbcType="VARCHAR" property="name" />
  8. <result column="sex" jdbcType="CHAR" property="sex" />
  9. <result column="mobile" jdbcType="VARCHAR" property="mobile" />
  10. <result column="email" jdbcType="VARCHAR" property="email" />
  11. <result column="qq" jdbcType="VARCHAR" property="qq" />
  12. <result column="wechat" jdbcType="VARCHAR" property="wechat" />
  13. <result column="depatrment" jdbcType="VARCHAR" property="depatrment" />
  14. <result column="customer_position" jdbcType="VARCHAR" property="customerPosition" />
  15. <result column="remarks" jdbcType="VARCHAR" property="remarks" />
  16. </resultMap>
  17. <!-- 新增 -->
  18. <insert id="insertCustomerUser" parameterType="com.goafanti.common.model.CustomerUserInfo">
  19. insert into customer_user_info
  20. <trim prefix="(" suffix=")" suffixOverrides=",">
  21. <if test="id != null">
  22. id,
  23. </if>
  24. <if test="cid != null">
  25. cid,
  26. </if>
  27. <if test="name != null">
  28. name,
  29. </if>
  30. <if test="sex != null">
  31. sex,
  32. </if>
  33. <if test="mobile != null">
  34. mobile,
  35. </if>
  36. <if test="email != null">
  37. email,
  38. </if>
  39. <if test="qq != null">
  40. qq,
  41. </if>
  42. <if test="wechat != null">
  43. wechat,
  44. </if>
  45. <if test="depatrment != null">
  46. depatrment,
  47. </if>
  48. <if test="customerPosition != null">
  49. customer_position,
  50. </if>
  51. <if test="remarks != null">
  52. remarks,
  53. </if>
  54. </trim>
  55. <trim prefix="values (" suffix=")" suffixOverrides=",">
  56. <if test="id != null">
  57. #{id,jdbcType=VARCHAR},
  58. </if>
  59. <if test="cid != null">
  60. #{cid,jdbcType=VARCHAR},
  61. </if>
  62. <if test="name != null">
  63. #{name,jdbcType=VARCHAR},
  64. </if>
  65. <if test="sex != null">
  66. #{sex,jdbcType=CHAR},
  67. </if>
  68. <if test="mobile != null">
  69. #{mobile,jdbcType=VARCHAR},
  70. </if>
  71. <if test="email != null">
  72. #{email,jdbcType=VARCHAR},
  73. </if>
  74. <if test="qq != null">
  75. #{qq,jdbcType=VARCHAR},
  76. </if>
  77. <if test="wechat != null">
  78. #{wechat,jdbcType=VARCHAR},
  79. </if>
  80. <if test="depatrment != null">
  81. #{depatrment,jdbcType=VARCHAR},
  82. </if>
  83. <if test="customerPosition != null">
  84. #{customerPosition,jdbcType=VARCHAR},
  85. </if>
  86. <if test="remarks != null">
  87. #{remarks,jdbcType=VARCHAR},
  88. </if>
  89. </trim>
  90. </insert>
  91. </mapper>