OrganizationSalesTargetMapper.xml 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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.OrganizationSalesTargetMapper">
  4. <resultMap id="BaseResultMap" type="com.goafanti.common.model.OrganizationSalesTarget">
  5. <!--
  6. WARNING - @mbg.generated
  7. This element is automatically generated by MyBatis Generator, do not modify.
  8. This element was generated on Mon Jan 04 17:13:29 CST 2021.
  9. -->
  10. <id column="id" jdbcType="INTEGER" property="id" />
  11. <result column="uid" jdbcType="VARCHAR" property="uid" />
  12. <result column="keyword" jdbcType="VARCHAR" property="keyword" />
  13. </resultMap>
  14. <sql id="Base_Column_List">
  15. <!--
  16. WARNING - @mbg.generated
  17. This element is automatically generated by MyBatis Generator, do not modify.
  18. This element was generated on Mon Jan 04 17:13:29 CST 2021.
  19. -->
  20. id, `uid`, keyword
  21. </sql>
  22. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
  23. <!--
  24. WARNING - @mbg.generated
  25. This element is automatically generated by MyBatis Generator, do not modify.
  26. This element was generated on Mon Jan 04 17:13:29 CST 2021.
  27. -->
  28. select
  29. <include refid="Base_Column_List" />
  30. from organization_sales_target
  31. where id = #{id,jdbcType=INTEGER}
  32. </select>
  33. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  34. <!--
  35. WARNING - @mbg.generated
  36. This element is automatically generated by MyBatis Generator, do not modify.
  37. This element was generated on Mon Jan 04 17:13:29 CST 2021.
  38. -->
  39. delete from organization_sales_target
  40. where id = #{id,jdbcType=INTEGER}
  41. </delete>
  42. <insert id="insert" parameterType="com.goafanti.common.model.OrganizationSalesTarget">
  43. <!--
  44. WARNING - @mbg.generated
  45. This element is automatically generated by MyBatis Generator, do not modify.
  46. This element was generated on Mon Jan 04 17:13:29 CST 2021.
  47. -->
  48. insert into organization_sales_target (id, `uid`, keyword
  49. )
  50. values (#{id,jdbcType=INTEGER}, #{uid,jdbcType=VARCHAR}, #{keyword,jdbcType=VARCHAR}
  51. )
  52. </insert>
  53. <insert id="insertSelective" parameterType="com.goafanti.common.model.OrganizationSalesTarget">
  54. <!--
  55. WARNING - @mbg.generated
  56. This element is automatically generated by MyBatis Generator, do not modify.
  57. This element was generated on Mon Jan 04 17:13:29 CST 2021.
  58. -->
  59. insert into organization_sales_target
  60. <trim prefix="(" suffix=")" suffixOverrides=",">
  61. <if test="id != null">
  62. id,
  63. </if>
  64. <if test="uid != null">
  65. `uid`,
  66. </if>
  67. <if test="keyword != null">
  68. keyword,
  69. </if>
  70. </trim>
  71. <trim prefix="values (" suffix=")" suffixOverrides=",">
  72. <if test="id != null">
  73. #{id,jdbcType=INTEGER},
  74. </if>
  75. <if test="uid != null">
  76. #{uid,jdbcType=VARCHAR},
  77. </if>
  78. <if test="keyword != null">
  79. #{keyword,jdbcType=VARCHAR},
  80. </if>
  81. </trim>
  82. </insert>
  83. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.OrganizationSalesTarget">
  84. <!--
  85. WARNING - @mbg.generated
  86. This element is automatically generated by MyBatis Generator, do not modify.
  87. This element was generated on Mon Jan 04 17:13:29 CST 2021.
  88. -->
  89. update organization_sales_target
  90. <set>
  91. <if test="uid != null">
  92. `uid` = #{uid,jdbcType=VARCHAR},
  93. </if>
  94. <if test="keyword != null">
  95. keyword = #{keyword,jdbcType=VARCHAR},
  96. </if>
  97. </set>
  98. where id = #{id,jdbcType=INTEGER}
  99. </update>
  100. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.OrganizationSalesTarget">
  101. <!--
  102. WARNING - @mbg.generated
  103. This element is automatically generated by MyBatis Generator, do not modify.
  104. This element was generated on Mon Jan 04 17:13:29 CST 2021.
  105. -->
  106. update organization_sales_target
  107. set `uid` = #{uid,jdbcType=VARCHAR},
  108. keyword = #{keyword,jdbcType=VARCHAR}
  109. where id = #{id,jdbcType=INTEGER}
  110. </update>
  111. <insert id="insertBatch" parameterType="com.goafanti.common.model.OrganizationSalesTarget">
  112. insert into organization_sales_target
  113. (`uid`, keyword)
  114. values
  115. <foreach item="item" index="index" collection="list" separator=",">
  116. (#{item.uid,jdbcType=VARCHAR},
  117. #{item.keyword,jdbcType=VARCHAR})
  118. </foreach>
  119. </insert>
  120. <delete id="deleteByUid">
  121. delete from organization_sales_target where uid= #{uid}
  122. </delete>
  123. </mapper>