TKekaoMgListMapper.xml 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ruoyi.project.reliability.mapper.TKekaoMgListMapper">
  6. <resultMap type="TKekaoMgList" id="TKekaoMgListResult">
  7. <result property="id" column="id" />
  8. <result property="plantCode" column="plant_code" />
  9. <result property="influenceFactor" column="influence_factor" />
  10. <result property="measures" column="measures" />
  11. <result property="completeStatus" column="complete_status" />
  12. <result property="implementDate" column="implement_date" />
  13. <result property="implementPerson" column="implement_person" />
  14. <result property="approveStatus" column="approve_status" />
  15. <result property="delFlag" column="del_flag" />
  16. </resultMap>
  17. <sql id="selectTKekaoMgListVo">
  18. select d.id, d.plant_code, d.influence_factor, d.measures, d.complete_status, d.implement_date, d.implement_person, d.approve_status, d.del_flag from t_kekao_mg_list d
  19. </sql>
  20. <select id="selectTKekaoMgListList" parameterType="TKekaoMgList" resultMap="TKekaoMgListResult">
  21. <include refid="selectTKekaoMgListVo"/>
  22. <where>
  23. <if test="plantCode != null and plantCode != ''"> and plant_code = #{plantCode}</if>
  24. <if test="influenceFactor != null and influenceFactor != ''"> and influence_factor = #{influenceFactor}</if>
  25. <if test="measures != null and measures != ''"> and measures = #{measures}</if>
  26. <if test="completeStatus != null "> and complete_status = #{completeStatus}</if>
  27. <if test="implementDate != null "> and implement_date = #{implementDate}</if>
  28. <if test="implementPerson != null and implementPerson != ''"> and implement_person = #{implementPerson}</if>
  29. <if test="approveStatus != null "> and approve_status = #{approveStatus}</if>
  30. and d.del_flag = 0
  31. </where>
  32. <!-- 数据范围过滤 -->
  33. ${params.dataScope}
  34. </select>
  35. <select id="selectTKekaoMgListById" parameterType="Long" resultMap="TKekaoMgListResult">
  36. <include refid="selectTKekaoMgListVo"/>
  37. where id = #{id}
  38. </select>
  39. <insert id="insertTKekaoMgList" parameterType="TKekaoMgList">
  40. <selectKey keyProperty="id" resultType="long" order="BEFORE">
  41. SELECT seq_t_kekao_mg_list.NEXTVAL as id FROM DUAL
  42. </selectKey>
  43. insert into t_kekao_mg_list
  44. <trim prefix="(" suffix=")" suffixOverrides=",">
  45. <if test="id != null">id,</if>
  46. <if test="plantCode != null">plant_code,</if>
  47. <if test="influenceFactor != null">influence_factor,</if>
  48. <if test="measures != null">measures,</if>
  49. <if test="completeStatus != null">complete_status,</if>
  50. <if test="implementDate != null">implement_date,</if>
  51. <if test="implementPerson != null">implement_person,</if>
  52. <if test="approveStatus != null">approve_status,</if>
  53. <if test="delFlag != null">del_flag,</if>
  54. </trim>
  55. <trim prefix="values (" suffix=")" suffixOverrides=",">
  56. <if test="id != null">#{id},</if>
  57. <if test="plantCode != null">#{plantCode},</if>
  58. <if test="influenceFactor != null">#{influenceFactor},</if>
  59. <if test="measures != null">#{measures},</if>
  60. <if test="completeStatus != null">#{completeStatus},</if>
  61. <if test="implementDate != null">#{implementDate},</if>
  62. <if test="implementPerson != null">#{implementPerson},</if>
  63. <if test="approveStatus != null">#{approveStatus},</if>
  64. <if test="delFlag != null">#{delFlag},</if>
  65. </trim>
  66. </insert>
  67. <update id="updateTKekaoMgList" parameterType="TKekaoMgList">
  68. update t_kekao_mg_list
  69. <trim prefix="SET" suffixOverrides=",">
  70. <if test="plantCode != null">plant_code = #{plantCode},</if>
  71. <if test="influenceFactor != null">influence_factor = #{influenceFactor},</if>
  72. <if test="measures != null">measures = #{measures},</if>
  73. <if test="completeStatus != null">complete_status = #{completeStatus},</if>
  74. <if test="implementDate != null">implement_date = #{implementDate},</if>
  75. <if test="implementPerson != null">implement_person = #{implementPerson},</if>
  76. <if test="approveStatus != null">approve_status = #{approveStatus},</if>
  77. <if test="delFlag != null">del_flag = #{delFlag},</if>
  78. </trim>
  79. where id = #{id}
  80. </update>
  81. <update id="deleteTKekaoMgListById" parameterType="Long">
  82. update t_kekao_mg_list set del_flag = 2 where id = #{id}
  83. </update>
  84. <update id="deleteTKekaoMgListByIds" parameterType="String">
  85. update t_kekao_mg_list set del_flag = 2 where id in
  86. <foreach item="id" collection="array" open="(" separator="," close=")">
  87. #{id}
  88. </foreach>
  89. </update>
  90. </mapper>