KwsProjectDeviceMapper.xml 5.4 KB

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