TProjectCompanyMapper.xml 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  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.TProjectCompanyMapper">
  6. <resultMap type="TProjectCompany" id="TProjectCompanyResult">
  7. <result property="id" column="id" />
  8. <result property="companyName" column="company_name" />
  9. <result property="projectPoolId" column="project_pool_id" />
  10. <result property="companyCode" column="company_code" />
  11. <result property="startTime" column="start_time" />
  12. <result property="endTime" column="end_time" />
  13. <result property="registeredCapital" column="registered_capital" />
  14. <result property="registeredAddress" column="registered_address" />
  15. <result property="paidCapital" column="paid_capital" />
  16. <result property="businessAddress" column="business_address" />
  17. <result property="actualBod" column="actual_bod" />
  18. <result property="phone" column="phone" />
  19. <result property="filingTime" column="filing_time" />
  20. <result property="delFlag" column="del_flag" />
  21. <result property="delFlag" column="del_flag" />
  22. <result property="createBy" column="create_by" />
  23. <result property="createTime" column="create_time" />
  24. <result property="updateBy" column="update_by" />
  25. <result property="updateTime" column="update_time" />
  26. </resultMap>
  27. <sql id="selectTProjectCompanyVo">
  28. select id, company_name, project_pool_id, company_code, start_time, end_time, registered_capital, registered_address, paid_capital, business_address, actual_bod, phone, type,filing_time, del_flag, create_by, create_time, update_by, update_time from t_project_company
  29. </sql>
  30. <select id="selectTProjectCompanyList" parameterType="TProjectCompany" resultMap="TProjectCompanyResult">
  31. <include refid="selectTProjectCompanyVo"/>
  32. <where>
  33. del_flag = 0
  34. <if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if>
  35. <if test="companyCode != null and companyCode != ''"> and company_code = #{companyCode}</if>
  36. <if test="startTime != null "> and start_time = #{startTime}</if>
  37. <if test="endTime != null "> and end_time = #{endTime}</if>
  38. <if test="actualBod != null and actualBod != ''"> and actual_bod = #{actualBod}</if>
  39. </where>
  40. </select>
  41. <select id="selectTProjectCompanyById" parameterType="String" resultMap="TProjectCompanyResult">
  42. <include refid="selectTProjectCompanyVo"/>
  43. where id = #{id}
  44. </select>
  45. <insert id="insertTProjectCompany" parameterType="TProjectCompany">
  46. insert into t_project_company
  47. <trim prefix="(" suffix=")" suffixOverrides=",">
  48. <if test="id != null">id,</if>
  49. <if test="companyName != null">company_name,</if>
  50. <if test="projectPoolId != null">project_pool_id,</if>
  51. <if test="companyCode != null">company_code,</if>
  52. <if test="startTime != null">start_time,</if>
  53. <if test="endTime != null">end_time,</if>
  54. <if test="registeredCapital != null">registered_capital,</if>
  55. <if test="registeredAddress != null">registered_address,</if>
  56. <if test="paidCapital != null">paid_capital,</if>
  57. <if test="businessAddress != null">business_address,</if>
  58. <if test="actualBod != null">actual_bod,</if>
  59. <if test="phone != null">phone,</if>
  60. <if test="type != null">type,</if>
  61. <if test="filingTime != null">filing_time,</if>
  62. <if test="delFlag != null">del_flag,</if>
  63. <if test="createBy != null">create_by,</if>
  64. <if test="createTime != null">create_time,</if>
  65. <if test="updateBy != null">update_by,</if>
  66. <if test="updateTime != null">update_time,</if>
  67. </trim>
  68. <trim prefix="values (" suffix=")" suffixOverrides=",">
  69. <if test="id != null">#{id},</if>
  70. <if test="companyName != null">#{companyName},</if>
  71. <if test="projectPoolId != null">#{projectPoolId},</if>
  72. <if test="companyCode != null">#{companyCode},</if>
  73. <if test="startTime != null">#{startTime},</if>
  74. <if test="endTime != null">#{endTime},</if>
  75. <if test="registeredCapital != null">#{registeredCapital},</if>
  76. <if test="registeredAddress != null">#{registeredAddress},</if>
  77. <if test="paidCapital != null">#{paidCapital},</if>
  78. <if test="businessAddress != null">#{businessAddress},</if>
  79. <if test="actualBod != null">#{actualBod},</if>
  80. <if test="phone != null">#{phone},</if>
  81. <if test="type != null">#{type},</if>
  82. <if test="filingTime != null">#{filingTime},</if>
  83. <if test="delFlag != null">#{delFlag},</if>
  84. <if test="createBy != null">#{createBy},</if>
  85. <if test="createTime != null">#{createTime},</if>
  86. <if test="updateBy != null">#{updateBy},</if>
  87. <if test="updateTime != null">#{updateTime},</if>
  88. </trim>
  89. </insert>
  90. <update id="updateTProjectCompany" parameterType="TProjectCompany">
  91. update t_project_company
  92. <trim prefix="SET" suffixOverrides=",">
  93. <if test="companyName != null">company_name = #{companyName},</if>
  94. <if test="projectPoolId != null">project_pool_id = #{projectPoolId},</if>
  95. <if test="companyCode != null">company_code = #{companyCode},</if>
  96. <if test="startTime != null">start_time = #{startTime},</if>
  97. <if test="endTime != null">end_time = #{endTime},</if>
  98. <if test="registeredCapital != null">registered_capital = #{registeredCapital},</if>
  99. <if test="registeredAddress != null">registered_address = #{registeredAddress},</if>
  100. <if test="paidCapital != null">paid_capital = #{paidCapital},</if>
  101. <if test="businessAddress != null">business_address = #{businessAddress},</if>
  102. <if test="actualBod != null">actual_bod = #{actualBod},</if>
  103. <if test="phone != null">phone = #{phone},</if>
  104. <if test="type != null">type = #{type},</if>
  105. <if test="filingTime != null"> filing_time = #{filingTime},</if>
  106. <if test="delFlag != null">del_flag = #{delFlag},</if>
  107. <if test="createBy != null">create_by = #{createBy},</if>
  108. <if test="createTime != null">create_time = #{createTime},</if>
  109. <if test="updateBy != null">update_by = #{updateBy},</if>
  110. <if test="updateTime != null">update_time = #{updateTime},</if>
  111. </trim>
  112. where project_pool_id = #{id}
  113. </update>
  114. <delete id="deleteTProjectCompanyById" parameterType="String">
  115. delete from t_project_company where id = #{id}
  116. </delete>
  117. <delete id="deleteTProjectCompanyByIds" parameterType="String">
  118. delete from t_project_company where id in
  119. <foreach item="id" collection="array" open="(" separator="," close=")">
  120. #{id}
  121. </foreach>
  122. </delete>
  123. <update id="updateTProjectCompanyByIds" parameterType="String">
  124. update t_project_company
  125. set del_flag = 1
  126. where id in
  127. <foreach item="id" collection="array" open="(" separator="," close=")">
  128. #{id}
  129. </foreach>
  130. </update>
  131. <select id="selectTProjectCompanyByProjectPoolId" parameterType="String" resultMap="TProjectCompanyResult">
  132. <include refid="selectTProjectCompanyVo"/>
  133. where project_pool_id = #{projectPoolId}
  134. </select>
  135. </mapper>