InstallLogMapper.xml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  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.bz.smart_city.dao.assistant.InstallLogMapper">
  4. <resultMap id="BaseResultMap" type="com.bz.smart_city.entity.assistant.InstallLog">
  5. <!--@mbg.generated-->
  6. <id column="id" property="id" />
  7. <result column="device_id" property="deviceId" />
  8. <result column="action" property="action" />
  9. <result column="action_desc" property="actionDesc" />
  10. <result column="action_time" property="actionTime" />
  11. <result column="action_user" property="actionUser" />
  12. <result column="status" property="status" />
  13. <result column="date_create" property="dateCreate" />
  14. <result column="date_update" property="dateUpdate" />
  15. <result column="create_by" property="createBy" />
  16. <result column="update_by" property="updateBy" />
  17. <result column="remark" property="remark" />
  18. </resultMap>
  19. <sql id="Base_Column_List">
  20. <!--@mbg.generated-->
  21. id, device_id, `action`, action_desc, action_time, action_user, `status`, date_create,
  22. date_update, create_by, update_by, remark
  23. </sql>
  24. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
  25. <!--@mbg.generated-->
  26. select
  27. <include refid="Base_Column_List" />
  28. from sc_install_log
  29. where id = #{id}
  30. </select>
  31. <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.bz.smart_city.entity.assistant.InstallLog" useGeneratedKeys="true">
  32. <!--@mbg.generated-->
  33. insert into sc_install_log (device_id, `action`, action_desc, action_time, action_user, `status`,
  34. date_create, date_update, create_by, update_by, remark)
  35. values (#{deviceId}, #{action}, #{actionDesc}, #{actionTime}, #{actionUser}, #{status},
  36. #{dateCreate}, #{dateUpdate}, #{createBy}, #{updateBy}, #{remark})
  37. </insert>
  38. <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.bz.smart_city.entity.assistant.InstallLog" useGeneratedKeys="true">
  39. <!--@mbg.generated-->
  40. insert into sc_install_log
  41. <trim prefix="(" suffix=")" suffixOverrides=",">
  42. <if test="deviceId != null">
  43. device_id,
  44. </if>
  45. <if test="action != null">
  46. `action`,
  47. </if>
  48. <if test="actionDesc != null">
  49. action_desc,
  50. </if>
  51. <if test="actionTime != null">
  52. action_time,
  53. </if>
  54. <if test="actionUser != null">
  55. action_user,
  56. </if>
  57. <if test="status != null">
  58. `status`,
  59. </if>
  60. <if test="dateCreate != null">
  61. date_create,
  62. </if>
  63. <if test="dateUpdate != null">
  64. date_update,
  65. </if>
  66. <if test="createBy != null">
  67. create_by,
  68. </if>
  69. <if test="updateBy != null">
  70. update_by,
  71. </if>
  72. <if test="remark != null">
  73. remark,
  74. </if>
  75. </trim>
  76. <trim prefix="values (" suffix=")" suffixOverrides=",">
  77. <if test="deviceId != null">
  78. #{deviceId},
  79. </if>
  80. <if test="action != null">
  81. #{action},
  82. </if>
  83. <if test="actionDesc != null">
  84. #{actionDesc},
  85. </if>
  86. <if test="actionTime != null">
  87. #{actionTime},
  88. </if>
  89. <if test="actionUser != null">
  90. #{actionUser},
  91. </if>
  92. <if test="status != null">
  93. #{status},
  94. </if>
  95. <if test="dateCreate != null">
  96. #{dateCreate},
  97. </if>
  98. <if test="dateUpdate != null">
  99. #{dateUpdate},
  100. </if>
  101. <if test="createBy != null">
  102. #{createBy},
  103. </if>
  104. <if test="updateBy != null">
  105. #{updateBy},
  106. </if>
  107. <if test="remark != null">
  108. #{remark},
  109. </if>
  110. </trim>
  111. </insert>
  112. <update id="updateByPrimaryKeySelective" parameterType="com.bz.smart_city.entity.assistant.InstallLog">
  113. <!--@mbg.generated-->
  114. update sc_install_log
  115. <set>
  116. <if test="deviceId != null">
  117. device_id = #{deviceId},
  118. </if>
  119. <if test="action != null">
  120. `action` = #{action},
  121. </if>
  122. <if test="actionDesc != null">
  123. action_desc = #{actionDesc},
  124. </if>
  125. <if test="actionTime != null">
  126. action_time = #{actionTime},
  127. </if>
  128. <if test="actionUser != null">
  129. action_user = #{actionUser},
  130. </if>
  131. <if test="status != null">
  132. `status` = #{status},
  133. </if>
  134. <if test="dateCreate != null">
  135. date_create = #{dateCreate},
  136. </if>
  137. <if test="dateUpdate != null">
  138. date_update = #{dateUpdate},
  139. </if>
  140. <if test="createBy != null">
  141. create_by = #{createBy},
  142. </if>
  143. <if test="updateBy != null">
  144. update_by = #{updateBy},
  145. </if>
  146. <if test="remark != null">
  147. remark = #{remark},
  148. </if>
  149. </set>
  150. where id = #{id}
  151. </update>
  152. </mapper>