TProjectDecisionMapper.xml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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.invest.mapper.TProjectDecisionMapper">
  6. <resultMap type="TProjectDecision" id="TProjectDecisionResult">
  7. <result property="id" column="id" />
  8. <result property="projectPoolId" column="project_pool_id" />
  9. <result property="participantsId" column="participants_id" />
  10. <result property="participants" column="participants" />
  11. <result property="provision" column="provision" />
  12. <result property="remark" column="remark" />
  13. <result property="delFlag" column="del_flag" />
  14. <result property="createBy" column="create_by" />
  15. <result property="createTime" column="create_time" />
  16. <result property="updateBy" column="update_by" />
  17. <result property="updateTime" column="update_time" />
  18. </resultMap>
  19. <sql id="selectTProjectDecisionVo">
  20. select id, project_pool_id, participants_id, participants, provision, remark, del_flag, create_by, create_time, update_by, update_time from t_project_decision
  21. </sql>
  22. <select id="selectTProjectDecisionList" parameterType="TProjectDecision" resultMap="TProjectDecisionResult">
  23. <include refid="selectTProjectDecisionVo"/>
  24. <where>
  25. <if test="projectPoolId != null and projectPoolId != ''"> and project_pool_id = #{projectPoolId}</if>
  26. <if test="participantsId != null and participantsId != ''"> and participants_id = #{participantsId}</if>
  27. <if test="participants != null and participants != ''"> and participants = #{participants}</if>
  28. <if test="provision != null and provision != ''"> and provision = #{provision}</if>
  29. </where>
  30. </select>
  31. <select id="selectTProjectDecisionById" parameterType="String" resultMap="TProjectDecisionResult">
  32. <include refid="selectTProjectDecisionVo"/>
  33. where id = #{id}
  34. </select>
  35. <insert id="insertTProjectDecision" parameterType="TProjectDecision">
  36. insert into t_project_decision
  37. <trim prefix="(" suffix=")" suffixOverrides=",">
  38. <if test="id != null">id,</if>
  39. <if test="procInstId != null">proc_inst_id,</if>
  40. <if test="projectPoolId != null">project_pool_id,</if>
  41. <if test="participantsId != null">participants_id,</if>
  42. <if test="participants != null">participants,</if>
  43. <if test="provision != null">provision,</if>
  44. <if test="remark != null">remark,</if>
  45. <if test="delFlag != null">del_flag,</if>
  46. <if test="createBy != null">create_by,</if>
  47. <if test="createTime != null">create_time,</if>
  48. <if test="updateBy != null">update_by,</if>
  49. <if test="updateTime != null">update_time,</if>
  50. <if test="needMeeting != null">need_meeting,</if>
  51. <if test="status != null">status,</if>
  52. </trim>
  53. <trim prefix="values (" suffix=")" suffixOverrides=",">
  54. <if test="id != null">#{id},</if>
  55. <if test="procInstId != null">#{procInstId},</if>
  56. <if test="projectPoolId != null">#{projectPoolId},</if>
  57. <if test="participantsId != null">#{participantsId},</if>
  58. <if test="participants != null">#{participants},</if>
  59. <if test="provision != null">#{provision},</if>
  60. <if test="remark != null">#{remark},</if>
  61. <if test="delFlag != null">#{delFlag},</if>
  62. <if test="createBy != null">#{createBy},</if>
  63. <if test="createTime != null">#{createTime},</if>
  64. <if test="updateBy != null">#{updateBy},</if>
  65. <if test="updateTime != null">#{updateTime},</if>
  66. <if test="needMeeting != null">#{needMeeting},</if>
  67. <if test="status != null">#{status},</if>
  68. </trim>
  69. </insert>
  70. <update id="updateTProjectDecision" parameterType="TProjectDecision">
  71. update t_project_decision
  72. <trim prefix="SET" suffixOverrides=",">
  73. <if test="projectPoolId != null">project_pool_id = #{projectPoolId},</if>
  74. <if test="participantsId != null">participants_id = #{participantsId},</if>
  75. <if test="participants != null">participants = #{participants},</if>
  76. <if test="provision != null">provision = #{provision},</if>
  77. <if test="remark != null">remark = #{remark},</if>
  78. <if test="delFlag != null">del_flag = #{delFlag},</if>
  79. <if test="createBy != null">create_by = #{createBy},</if>
  80. <if test="createTime != null">create_time = #{createTime},</if>
  81. <if test="updateBy != null">update_by = #{updateBy},</if>
  82. <if test="updateTime != null">update_time = #{updateTime},</if>
  83. <if test="needMeeting != null">need_meeting = #{needMeeting},</if>
  84. <if test="status != null">status = #{status},</if>
  85. </trim>
  86. where id = #{id}
  87. </update>
  88. <delete id="deleteTProjectDecisionById" parameterType="String">
  89. delete from t_project_decision where id = #{id}
  90. </delete>
  91. <delete id="deleteTProjectDecisionByIds" parameterType="String">
  92. delete from t_project_decision where id in
  93. <foreach item="id" collection="array" open="(" separator="," close=")">
  94. #{id}
  95. </foreach>
  96. </delete>
  97. <select id="listProjectPoolIdNew" parameterType="String" resultMap="TProjectDecisionResult">
  98. <include refid="selectTProjectDecisionVo"/>
  99. where project_pool_id = #{projectPoolId} and del_flag = 0
  100. ORDER BY create_time DESC LIMIT 1
  101. </select>
  102. </mapper>