KwsProjectAreaMapper.xml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  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.sckw.slope.detection.dao.mysql.KwsProjectAreaMapper">
  4. <resultMap id="BaseResultMap" type="com.sckw.slope.detection.model.dos.mysql.KwsProjectArea">
  5. <!--@mbg.generated-->
  6. <!--@Table kws_project_area-->
  7. <id column="id" jdbcType="BIGINT" property="id" />
  8. <result column="project_id" jdbcType="BIGINT" property="projectId" />
  9. <result column="fence" jdbcType="VARCHAR" property="fence" />
  10. <result column="area" jdbcType="DECIMAL" property="area" />
  11. <result column="create_by" jdbcType="BIGINT" property="createBy" />
  12. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  13. <result column="update_by" jdbcType="BIGINT" property="updateBy" />
  14. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  15. <result column="del_flag" jdbcType="TINYINT" property="delFlag" />
  16. </resultMap>
  17. <sql id="Base_Column_List">
  18. <!--@mbg.generated-->
  19. id, project_id, fence, area, create_by, create_time, update_by, update_time, del_flag<!--,company_id-->
  20. </sql>
  21. <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
  22. <!--@mbg.generated-->
  23. select
  24. <include refid="Base_Column_List" />
  25. from kws_project_area
  26. where id = #{id,jdbcType=BIGINT}
  27. </select>
  28. <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
  29. <!--@mbg.generated-->
  30. delete from kws_project_area
  31. where id = #{id,jdbcType=BIGINT}
  32. </delete>
  33. <insert id="insert" parameterType="com.sckw.slope.detection.model.dos.mysql.KwsProjectArea">
  34. <!--@mbg.generated-->
  35. insert into kws_project_area (id, project_id, fence,
  36. area, create_by, create_time,
  37. update_by, update_time, del_flag
  38. )
  39. values (#{id,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT}, #{fence,jdbcType=VARCHAR},
  40. #{area,jdbcType=DECIMAL}, #{createBy,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
  41. #{updateBy,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP}, #{delFlag,jdbcType=TINYINT}
  42. )
  43. </insert>
  44. <insert id="insertSelective" parameterType="com.sckw.slope.detection.model.dos.mysql.KwsProjectArea">
  45. <!--@mbg.generated-->
  46. insert into kws_project_area
  47. <trim prefix="(" suffix=")" suffixOverrides=",">
  48. <if test="id != null">
  49. id,
  50. </if>
  51. <if test="projectId != null">
  52. project_id,
  53. </if>
  54. <if test="fence != null">
  55. fence,
  56. </if>
  57. <if test="area != null">
  58. area,
  59. </if>
  60. <if test="createBy != null">
  61. create_by,
  62. </if>
  63. <if test="createTime != null">
  64. create_time,
  65. </if>
  66. <if test="updateBy != null">
  67. update_by,
  68. </if>
  69. <if test="updateTime != null">
  70. update_time,
  71. </if>
  72. <if test="delFlag != null">
  73. del_flag,
  74. </if>
  75. </trim>
  76. <trim prefix="values (" suffix=")" suffixOverrides=",">
  77. <if test="id != null">
  78. #{id,jdbcType=BIGINT},
  79. </if>
  80. <if test="projectId != null">
  81. #{projectId,jdbcType=BIGINT},
  82. </if>
  83. <if test="fence != null">
  84. #{fence,jdbcType=VARCHAR},
  85. </if>
  86. <if test="area != null">
  87. #{area,jdbcType=DECIMAL},
  88. </if>
  89. <if test="createBy != null">
  90. #{createBy,jdbcType=BIGINT},
  91. </if>
  92. <if test="createTime != null">
  93. #{createTime,jdbcType=TIMESTAMP},
  94. </if>
  95. <if test="updateBy != null">
  96. #{updateBy,jdbcType=BIGINT},
  97. </if>
  98. <if test="updateTime != null">
  99. #{updateTime,jdbcType=TIMESTAMP},
  100. </if>
  101. <if test="delFlag != null">
  102. #{delFlag,jdbcType=TINYINT},
  103. </if>
  104. </trim>
  105. </insert>
  106. <update id="updateByPrimaryKeySelective" parameterType="com.sckw.slope.detection.model.dos.mysql.KwsProjectArea">
  107. <!--@mbg.generated-->
  108. update kws_project_area
  109. <set>
  110. <if test="projectId != null">
  111. project_id = #{projectId,jdbcType=BIGINT},
  112. </if>
  113. <if test="fence != null">
  114. fence = #{fence,jdbcType=VARCHAR},
  115. </if>
  116. <if test="area != null">
  117. area = #{area,jdbcType=DECIMAL},
  118. </if>
  119. <if test="createBy != null">
  120. create_by = #{createBy,jdbcType=BIGINT},
  121. </if>
  122. <if test="createTime != null">
  123. create_time = #{createTime,jdbcType=TIMESTAMP},
  124. </if>
  125. <if test="updateBy != null">
  126. update_by = #{updateBy,jdbcType=BIGINT},
  127. </if>
  128. <if test="updateTime != null">
  129. update_time = #{updateTime,jdbcType=TIMESTAMP},
  130. </if>
  131. <if test="delFlag != null">
  132. del_flag = #{delFlag,jdbcType=TINYINT},
  133. </if>
  134. </set>
  135. where id = #{id,jdbcType=BIGINT}
  136. </update>
  137. <update id="updateByPrimaryKey" parameterType="com.sckw.slope.detection.model.dos.mysql.KwsProjectArea">
  138. <!--@mbg.generated-->
  139. update kws_project_area
  140. set project_id = #{projectId,jdbcType=BIGINT},
  141. fence = #{fence,jdbcType=VARCHAR},
  142. area = #{area,jdbcType=DECIMAL},
  143. create_by = #{createBy,jdbcType=BIGINT},
  144. create_time = #{createTime,jdbcType=TIMESTAMP},
  145. update_by = #{updateBy,jdbcType=BIGINT},
  146. update_time = #{updateTime,jdbcType=TIMESTAMP},
  147. del_flag = #{delFlag,jdbcType=TINYINT}
  148. where id = #{id,jdbcType=BIGINT}
  149. </update>
  150. </mapper>