KwsIntegrationMapper.xml 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  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.KwsIntegrationMapper">
  4. <resultMap id="BaseResultMap" type="com.sckw.slope.detection.model.dos.mysql.KwsIntegration">
  5. <!--@mbg.generated-->
  6. <!--@Table kws_integration-->
  7. <id column="id" jdbcType="BIGINT" property="id" />
  8. <result column="integration_name" jdbcType="VARCHAR" property="integrationName" />
  9. <result column="part_names" jdbcType="VARCHAR" property="partNames" />
  10. <result column="unit" jdbcType="VARCHAR" property="unit" />
  11. <result column="formula" jdbcType="VARCHAR" property="formula" />
  12. <result column="remark" jdbcType="VARCHAR" property="remark" />
  13. <result column="status" jdbcType="TINYINT" property="status" />
  14. <result column="create_by" jdbcType="BIGINT" property="createBy" />
  15. <result column="mountain_id" jdbcType="VARCHAR" property="mountainId" />
  16. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  17. <result column="update_by" jdbcType="BIGINT" property="updateBy" />
  18. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  19. <result column="del_flag" jdbcType="TINYINT" property="delFlag" />
  20. </resultMap>
  21. <sql id="Base_Column_List">
  22. <!--@mbg.generated-->
  23. id, integration_name, part_names, unit, formula, remark, `status`, create_by, create_time,
  24. update_by, update_time, del_flag,mountain_id
  25. </sql>
  26. <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
  27. <!--@mbg.generated-->
  28. select
  29. <include refid="Base_Column_List" />
  30. from kws_integration
  31. where id = #{id,jdbcType=BIGINT}
  32. </select>
  33. <select id="getDataByFindInSet" resultType="com.sckw.slope.detection.model.vo.IntegrationItemVO">
  34. <!--@mbg.generated-->
  35. select
  36. <include refid="Base_Column_List" />
  37. from kws_integration
  38. where FIND_IN_SET(#{partNames,jdbcType=VARCHAR},part_names)
  39. </select>
  40. <select id="getDataByName" resultType="com.sckw.slope.detection.model.vo.IntegrationVo">
  41. <!--@mbg.generated-->
  42. select
  43. <include refid="Base_Column_List" />
  44. from kws_integration
  45. where del_flag=0
  46. <if test="integrationQuery.integrationName != null and integrationQuery.integrationName != ''">
  47. and integration_name like concat('%', #{integrationQuery.integrationName}, '%')
  48. </if>
  49. </select>
  50. <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
  51. <!--@mbg.generated-->
  52. delete from kws_integration
  53. where id = #{id,jdbcType=BIGINT}
  54. </delete>
  55. <insert id="insert" parameterType="com.sckw.slope.detection.model.dos.mysql.KwsIntegration">
  56. <!--@mbg.generated-->
  57. insert into kws_integration (id, integration_name, part_names,
  58. unit, formula, remark,
  59. `status`, create_by, create_time,
  60. update_by, update_time, del_flag
  61. )
  62. values (#{id,jdbcType=BIGINT}, #{integrationName,jdbcType=VARCHAR}, #{partNames,jdbcType=VARCHAR},
  63. #{unit,jdbcType=VARCHAR}, #{formula,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
  64. #{status,jdbcType=TINYINT}, #{createBy,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
  65. #{updateBy,jdbcType=BIGINT}, #{updateTime,jdbcType=TIMESTAMP}, #{delFlag,jdbcType=TINYINT}
  66. )
  67. </insert>
  68. <insert id="insertSelective" parameterType="com.sckw.slope.detection.model.dos.mysql.KwsIntegration">
  69. <!--@mbg.generated-->
  70. insert into kws_integration
  71. <trim prefix="(" suffix=")" suffixOverrides=",">
  72. <if test="id != null">
  73. id,
  74. </if>
  75. <if test="integrationName != null">
  76. integration_name,
  77. </if>
  78. <if test="partNames != null">
  79. part_names,
  80. </if>
  81. <if test="unit != null">
  82. unit,
  83. </if>
  84. <if test="formula != null">
  85. formula,
  86. </if>
  87. <if test="remark != null">
  88. remark,
  89. </if>
  90. <if test="status != null">
  91. `status`,
  92. </if>
  93. <if test="createBy != null">
  94. create_by,
  95. </if>
  96. <if test="createTime != null">
  97. create_time,
  98. </if>
  99. <if test="updateBy != null">
  100. update_by,
  101. </if>
  102. <if test="updateTime != null">
  103. update_time,
  104. </if>
  105. <if test="delFlag != null">
  106. del_flag,
  107. </if>
  108. </trim>
  109. <trim prefix="values (" suffix=")" suffixOverrides=",">
  110. <if test="id != null">
  111. #{id,jdbcType=BIGINT},
  112. </if>
  113. <if test="integrationName != null">
  114. #{integrationName,jdbcType=VARCHAR},
  115. </if>
  116. <if test="partNames != null">
  117. #{partNames,jdbcType=VARCHAR},
  118. </if>
  119. <if test="unit != null">
  120. #{unit,jdbcType=VARCHAR},
  121. </if>
  122. <if test="formula != null">
  123. #{formula,jdbcType=VARCHAR},
  124. </if>
  125. <if test="remark != null">
  126. #{remark,jdbcType=VARCHAR},
  127. </if>
  128. <if test="status != null">
  129. #{status,jdbcType=TINYINT},
  130. </if>
  131. <if test="createBy != null">
  132. #{createBy,jdbcType=BIGINT},
  133. </if>
  134. <if test="createTime != null">
  135. #{createTime,jdbcType=TIMESTAMP},
  136. </if>
  137. <if test="updateBy != null">
  138. #{updateBy,jdbcType=BIGINT},
  139. </if>
  140. <if test="updateTime != null">
  141. #{updateTime,jdbcType=TIMESTAMP},
  142. </if>
  143. <if test="delFlag != null">
  144. #{delFlag,jdbcType=TINYINT},
  145. </if>
  146. </trim>
  147. </insert>
  148. <update id="updateByPrimaryKeySelective" parameterType="com.sckw.slope.detection.model.dos.mysql.KwsIntegration">
  149. <!--@mbg.generated-->
  150. update kws_integration
  151. <set>
  152. <if test="integrationName != null">
  153. integration_name = #{integrationName,jdbcType=VARCHAR},
  154. </if>
  155. <if test="partNames != null">
  156. part_names = #{partNames,jdbcType=VARCHAR},
  157. </if>
  158. <if test="unit != null">
  159. unit = #{unit,jdbcType=VARCHAR},
  160. </if>
  161. <if test="formula != null">
  162. formula = #{formula,jdbcType=VARCHAR},
  163. </if>
  164. <if test="remark != null">
  165. remark = #{remark,jdbcType=VARCHAR},
  166. </if>
  167. <if test="status != null">
  168. `status` = #{status,jdbcType=TINYINT},
  169. </if>
  170. <if test="createBy != null">
  171. create_by = #{createBy,jdbcType=BIGINT},
  172. </if>
  173. <if test="createTime != null">
  174. create_time = #{createTime,jdbcType=TIMESTAMP},
  175. </if>
  176. <if test="updateBy != null">
  177. update_by = #{updateBy,jdbcType=BIGINT},
  178. </if>
  179. <if test="updateTime != null">
  180. update_time = #{updateTime,jdbcType=TIMESTAMP},
  181. </if>
  182. <if test="delFlag != null">
  183. del_flag = #{delFlag,jdbcType=TINYINT},
  184. </if>
  185. </set>
  186. where id = #{id,jdbcType=BIGINT}
  187. </update>
  188. <update id="updateByPrimaryKey" parameterType="com.sckw.slope.detection.model.dos.mysql.KwsIntegration">
  189. <!--@mbg.generated-->
  190. update kws_integration
  191. set integration_name = #{integrationName,jdbcType=VARCHAR},
  192. part_names = #{partNames,jdbcType=VARCHAR},
  193. unit = #{unit,jdbcType=VARCHAR},
  194. formula = #{formula,jdbcType=VARCHAR},
  195. remark = #{remark,jdbcType=VARCHAR},
  196. `status` = #{status,jdbcType=TINYINT},
  197. create_by = #{createBy,jdbcType=BIGINT},
  198. create_time = #{createTime,jdbcType=TIMESTAMP},
  199. update_by = #{updateBy,jdbcType=BIGINT},
  200. update_time = #{updateTime,jdbcType=TIMESTAMP},
  201. del_flag = #{delFlag,jdbcType=TINYINT}
  202. where id = #{id,jdbcType=BIGINT}
  203. </update>
  204. </mapper>