TProjectRecordMapper.xml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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.TProjectRecordMapper">
  6. <resultMap type="TProjectRecord" id="TProjectRecordResult">
  7. <result property="id" column="id" />
  8. <result property="porjectId" column="porject_id" />
  9. <result property="contacts" column="contacts" />
  10. <result property="realityUpDate" column="reality_up_date" />
  11. <result property="upPerson" column="up_person" />
  12. <result property="upWay" column="up_way" />
  13. <result property="upContent" column="up_content" />
  14. <result property="mark" column="mark" />
  15. <result property="delFlag" column="del_flag" />
  16. <result property="createBy" column="create_by" />
  17. <result property="createTime" column="create_time" />
  18. <result property="updateBy" column="update_by" />
  19. <result property="updateTime" column="update_time" />
  20. </resultMap>
  21. <sql id="selectTProjectRecordVo">
  22. select id, porject_id, contacts, reality_up_date, up_person, up_way, up_content, mark, del_flag, create_by, create_time, update_by, update_time from t_project_record
  23. </sql>
  24. <select id="selectTProjectRecordList" parameterType="TProjectRecord" resultMap="TProjectRecordResult">
  25. <include refid="selectTProjectRecordVo"/>
  26. <where>
  27. del_flag = 0
  28. <if test="porjectId != null and porjectId != ''"> and porject_id = #{porjectId}</if>
  29. <if test="contacts != null and contacts != ''"> and contacts = #{contacts}</if>
  30. <if test="realityUpDate != null "> and reality_up_date = #{realityUpDate}</if>
  31. <if test="upPerson != null and upPerson != ''"> and up_person = #{upPerson}</if>
  32. <if test="upWay != null and upWay != ''"> and up_way = #{upWay}</if>
  33. </where>
  34. </select>
  35. <select id="selectTProjectRecordById" parameterType="String" resultMap="TProjectRecordResult">
  36. <include refid="selectTProjectRecordVo"/>
  37. where id = #{id}
  38. </select>
  39. <insert id="insertTProjectRecord" parameterType="TProjectRecord">
  40. insert into t_project_record
  41. <trim prefix="(" suffix=")" suffixOverrides=",">
  42. <if test="id != null">id,</if>
  43. <if test="porjectId != null">porject_id,</if>
  44. <if test="contacts != null">contacts,</if>
  45. <if test="realityUpDate != null">reality_up_date,</if>
  46. <if test="upPerson != null">up_person,</if>
  47. <if test="upWay != null">up_way,</if>
  48. <if test="upContent != null">up_content,</if>
  49. <if test="mark != null">mark,</if>
  50. <if test="delFlag != null">del_flag,</if>
  51. <if test="createBy != null">create_by,</if>
  52. <if test="createTime != null">create_time,</if>
  53. <if test="updateBy != null">update_by,</if>
  54. <if test="updateTime != null">update_time,</if>
  55. </trim>
  56. <trim prefix="values (" suffix=")" suffixOverrides=",">
  57. <if test="id != null">#{id},</if>
  58. <if test="porjectId != null">#{porjectId},</if>
  59. <if test="contacts != null">#{contacts},</if>
  60. <if test="realityUpDate != null">#{realityUpDate},</if>
  61. <if test="upPerson != null">#{upPerson},</if>
  62. <if test="upWay != null">#{upWay},</if>
  63. <if test="upContent != null">#{upContent},</if>
  64. <if test="mark != null">#{mark},</if>
  65. <if test="delFlag != null">#{delFlag},</if>
  66. <if test="createBy != null">#{createBy},</if>
  67. <if test="createTime != null">#{createTime},</if>
  68. <if test="updateBy != null">#{updateBy},</if>
  69. <if test="updateTime != null">#{updateTime},</if>
  70. </trim>
  71. </insert>
  72. <update id="updateTProjectRecord" parameterType="TProjectRecord">
  73. update t_project_record
  74. <trim prefix="SET" suffixOverrides=",">
  75. <if test="porjectId != null">porject_id = #{porjectId},</if>
  76. <if test="contacts != null">contacts = #{contacts},</if>
  77. <if test="realityUpDate != null">reality_up_date = #{realityUpDate},</if>
  78. <if test="upPerson != null">up_person = #{upPerson},</if>
  79. <if test="upWay != null">up_way = #{upWay},</if>
  80. <if test="upContent != null">up_content = #{upContent},</if>
  81. <if test="mark != null">mark = #{mark},</if>
  82. <if test="delFlag != null">del_flag = #{delFlag},</if>
  83. <if test="createBy != null">create_by = #{createBy},</if>
  84. <if test="createTime != null">create_time = #{createTime},</if>
  85. <if test="updateBy != null">update_by = #{updateBy},</if>
  86. <if test="updateTime != null">update_time = #{updateTime},</if>
  87. </trim>
  88. where id = #{id}
  89. </update>
  90. <delete id="deleteTProjectRecordById" parameterType="String">
  91. delete from t_project_record where id = #{id}
  92. </delete>
  93. <delete id="deleteTProjectRecordByIds" parameterType="String">
  94. delete from t_project_record where id in
  95. <foreach item="id" collection="array" open="(" separator="," close=")">
  96. #{id}
  97. </foreach>
  98. </delete>
  99. </mapper>