KwsEntCheckTrackDao.xml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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.system.dao.KwsEntCheckTrackDao">
  4. <resultMap id="BaseResultMap" type="com.sckw.system.model.KwsEntCheckTrack">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="ent_id" jdbcType="BIGINT" property="entId" />
  7. <result column="remark" jdbcType="VARCHAR" property="remark" />
  8. <result column="status" jdbcType="INTEGER" property="status" />
  9. <result column="create_by" jdbcType="BIGINT" property="createBy" />
  10. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  11. <result column="update_by" jdbcType="BIGINT" property="updateBy" />
  12. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  13. <result column="del_flag" jdbcType="INTEGER" property="delFlag" />
  14. </resultMap>
  15. <sql id="Base_Column_List">
  16. id, ent_id, remark, status, create_by, create_time, update_by, update_time, del_flag
  17. </sql>
  18. <insert id="insert" parameterType="com.sckw.system.model.KwsEntCheckTrack">
  19. insert into kws_ent_check_track
  20. <trim prefix="(" suffix=")" suffixOverrides=",">
  21. <if test="id != null">
  22. id,
  23. </if>
  24. <if test="entId != null">
  25. ent_id,
  26. </if>
  27. <if test="remark != null">
  28. remark,
  29. </if>
  30. <if test="status != null">
  31. status,
  32. </if>
  33. <if test="createBy != null">
  34. create_by,
  35. </if>
  36. <if test="createTime != null">
  37. create_time,
  38. </if>
  39. <if test="updateBy != null">
  40. update_by,
  41. </if>
  42. <if test="updateTime != null">
  43. update_time,
  44. </if>
  45. <if test="delFlag != null">
  46. del_flag,
  47. </if>
  48. </trim>
  49. <trim prefix="values (" suffix=")" suffixOverrides=",">
  50. <if test="id != null">
  51. #{id,jdbcType=BIGINT},
  52. </if>
  53. <if test="entId != null">
  54. #{entId,jdbcType=BIGINT},
  55. </if>
  56. <if test="remark != null">
  57. #{remark,jdbcType=VARCHAR},
  58. </if>
  59. <if test="status != null">
  60. #{status,jdbcType=INTEGER},
  61. </if>
  62. <if test="createBy != null">
  63. #{createBy,jdbcType=BIGINT},
  64. </if>
  65. <if test="createTime != null">
  66. #{createTime,jdbcType=TIMESTAMP},
  67. </if>
  68. <if test="updateBy != null">
  69. #{updateBy,jdbcType=BIGINT},
  70. </if>
  71. <if test="updateTime != null">
  72. #{updateTime,jdbcType=TIMESTAMP},
  73. </if>
  74. <if test="delFlag != null">
  75. #{delFlag,jdbcType=INTEGER},
  76. </if>
  77. </trim>
  78. </insert>
  79. <update id="update" parameterType="com.sckw.system.model.KwsEntCheckTrack">
  80. update kws_ent_check_track
  81. <set>
  82. <if test="entId != null">
  83. ent_id = #{entId,jdbcType=BIGINT},
  84. </if>
  85. <if test="remark != null">
  86. remark = #{remark,jdbcType=VARCHAR},
  87. </if>
  88. <if test="status != null">
  89. status = #{status,jdbcType=INTEGER},
  90. </if>
  91. <if test="createBy != null">
  92. create_by = #{createBy,jdbcType=BIGINT},
  93. </if>
  94. <if test="createTime != null">
  95. create_time = #{createTime,jdbcType=TIMESTAMP},
  96. </if>
  97. <if test="updateBy != null">
  98. update_by = #{updateBy,jdbcType=BIGINT},
  99. </if>
  100. <if test="updateTime != null">
  101. update_time = #{updateTime,jdbcType=TIMESTAMP},
  102. </if>
  103. <if test="delFlag != null">
  104. del_flag = #{delFlag,jdbcType=INTEGER},
  105. </if>
  106. </set>
  107. where id = #{id,jdbcType=BIGINT}
  108. </update>
  109. <select id="findList" resultType="com.sckw.system.model.KwsEntCheckTrack">
  110. select * from kws_ent_check_track where ent_id = #{entId} order by create_time desc
  111. </select>
  112. </mapper>