Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 
 

382 wiersze
21 KiB

  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.iformall.mapper.WxRentContractMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxRentContract">
  5. <id column="id" jdbcType="BIGINT" property="id"/>
  6. <result column="merchant_id" jdbcType="BIGINT" property="merchantId"/>
  7. <result column="price" jdbcType="INTEGER" property="price"/>
  8. <result column="rental_start_date" jdbcType="TIMESTAMP" property="rentalStartDate"/>
  9. <result column="rental_end_date" jdbcType="TIMESTAMP" property="rentalEndDate"/>
  10. <result column="sign_date" jdbcType="TIMESTAMP" property="signDate"/>
  11. <result column="receive_period" jdbcType="INTEGER" property="receivePeriod"/>
  12. <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
  13. <result column="filepath" jdbcType="VARCHAR" property="filepath"/>
  14. <result column="status" jdbcType="INTEGER" property="status"/>
  15. <result column="contract_number" jdbcType="VARCHAR" property="contractNumber"/>
  16. <result column="deposit" jdbcType="INTEGER" property="deposit"/>
  17. <result column="pay_date" jdbcType="INTEGER" property="payDate"/>
  18. <result column="is_del" jdbcType="INTEGER" property="isDel"/>
  19. <result column="merchant_name" jdbcType="VARCHAR" property="merchantName"/>
  20. <result column="brand" jdbcType="VARCHAR" property="brand"/>
  21. <result column="business_id" jdbcType="INTEGER" property="businessId"/>
  22. <result column="shop_type" jdbcType="INTEGER" property="shopType"/>
  23. <result column="shop_id" jdbcType="BIGINT" property="shopId"/>
  24. <result column="updatetime" jdbcType="TIMESTAMP" property="updatetime"/>
  25. <result column="createtime" jdbcType="TIMESTAMP" property="createtime"/>
  26. <result column="link_person" jdbcType="VARCHAR" property="linkPerson"/>
  27. <result column="link_phone" jdbcType="VARCHAR" property="linkPhone"/>
  28. <result column="pay_account" jdbcType="VARCHAR" property="payAccount"/>
  29. <result column="filename" jdbcType="VARCHAR" property="filename"/>
  30. <result column="lease" jdbcType="INTEGER" property="lease"/>
  31. <result column="type" jdbcType="INTEGER" property="type"/>
  32. <result column="revenue" jdbcType="INTEGER" property="revenue"/>
  33. <result column="adjust_ratio" jdbcType="VARCHAR" property="adjustRatio"/>
  34. <result column="adjust_period" jdbcType="INTEGER" property="adjustPeriod"/>
  35. <result column="pay_ratio" jdbcType="INTEGER" property="payRatio"/>
  36. <result column="start_date" jdbcType="TIMESTAMP" property="startDate"/>
  37. <result column="end_date" jdbcType="TIMESTAMP" property="endDate"/>
  38. <result column="apply_status" jdbcType="INTEGER" property="applyStatus"/>
  39. <result column="bank_name" jdbcType="VARCHAR" property="bankName"/>
  40. <result column="rent_shop_type" jdbcType="INTEGER" property="rentShopType"/>
  41. <result column="fix_start_date" property="fixStartDate"/>
  42. <result column="fix_end_date" property="fixEndDate"/>
  43. <result column="business_type" property="businessType"/>
  44. <result column="receive_period" property="receivePeriod"/>
  45. <result column="rent_info" jdbcType="VARCHAR" property="rentInfo"/>
  46. <result column="file_names" jdbcType="VARCHAR" property="fileNames"/>
  47. <result column="price_unit" property="priceUnit"/>
  48. <result column="rent_price" property="rentPrice"/>
  49. <result column="subject_name" property="subjectName"/>
  50. <result column="rent_start_type" property="rentStartType"/><result column="type" jdbcType="INTEGER" property="type"/>
  51. <result column="revenue" jdbcType="INTEGER" property="revenue"/>
  52. <result column="adjust_ratio" jdbcType="VARCHAR" property="adjustRatio"/>
  53. <result column="adjust_period" jdbcType="INTEGER" property="adjustPeriod"/>
  54. <result column="pay_ratio" jdbcType="INTEGER" property="payRatio"/>
  55. <result column="start_date" jdbcType="TIMESTAMP" property="startDate"/>
  56. <result column="end_date" jdbcType="TIMESTAMP" property="endDate"/>
  57. <result column="apply_status" jdbcType="INTEGER" property="applyStatus"/>
  58. <result column="bank_name" jdbcType="VARCHAR" property="bankName"/>
  59. <result column="rent_shop_type" jdbcType="INTEGER" property="rentShopType"/>
  60. <result column="fix_start_date" property="fixStartDate"/>
  61. <result column="fix_end_date" property="fixEndDate"/>
  62. <result column="business_type" property="businessType"/>
  63. <result column="receive_period" property="receivePeriod"/>
  64. <result column="rent_info" jdbcType="VARCHAR" property="rentInfo"/>
  65. <result column="file_names" jdbcType="VARCHAR" property="fileNames"/>
  66. <result column="price_unit" property="priceUnit"/>
  67. <result column="rent_price" property="rentPrice"/>
  68. <result column="subject_name" property="subjectName"/>
  69. <result column="rent_start_type" property="rentStartType"/>
  70. <result column="rent_input_way" property="rentInputWay"/>
  71. <result column="adjust_ratio_way" property="adjustRatioWay"/>
  72. <result column="operation_type" property="operationType"/>
  73. <result column="late_pay_ratio" property="latePayRatio"/>
  74. <result column="late_pay_day" property="latePayDay"/>
  75. <result column="bus_discount_ratio" property="busDiscountRatio"/>
  76. </resultMap>
  77. <sql id="allColumns">
  78. `id`,`merchant_id`,`price`,`rental_start_date`,`rental_end_date`,`sign_date`,`receive_period`,
  79. `tenant_id`,`filepath`,`status`,`contract_number`,`deposit`,`pay_date`,`is_del`,`merchant_name`,
  80. `brand`,`business_id`,`shop_type`,`shop_id`,`updatetime`,`createtime`,`link_person`,`link_phone`,
  81. `pay_account`,`filename`,`lease`,`type`,`revenue`,`adjust_ratio`,`adjust_period`,`pay_ratio`,
  82. `start_date`,`end_date`,
  83. `apply_status`,`bank_name`,`rent_shop_type`,`fix_start_date`,`fix_end_date`,
  84. `business_type`,`rent_info`, `file_names`,price_unit,rent_price,`subject_name`,rent_start_type,
  85. `rent_input_way`,`adjust_ratio_way`,`operation_type`,late_pay_ratio,late_pay_day,bus_discount_ratio
  86. </sql>
  87. <sql id="dynamicWhereConditions">
  88. where 1 = 1
  89. <if test=" null != id ">and `id` = #{id}</if>
  90. <if test=" null != merchantId ">and `merchant_id` = #{merchantId}</if>
  91. <if test=" null != price ">and `price` = #{price}</if>
  92. <if test=" null != rentalStartDate ">and `rental_start_date` = #{rentalStartDate}</if>
  93. <if test=" null != rentalEndDate ">and `rental_end_date` = #{rentalEndDate}</if>
  94. <if test=" null != signDate ">and `sign_date` = #{signDate}</if>
  95. <if test=" null != receivePeriod ">and `receive_period` = #{receivePeriod}</if>
  96. <if test=" null != tenantId ">and `tenant_id` = #{tenantId}</if>
  97. <if test=" null != filepath ">and `filepath` = #{filepath}</if>
  98. <if test=" null != status ">and `status` = #{status}</if>
  99. <if test=" null != contractNumber ">and `contract_number` = #{contractNumber}</if>
  100. <if test=" null != deposit ">and `deposit` = #{deposit}</if>
  101. <if test=" null != payDate ">and `pay_date` = #{payDate}</if>
  102. <if test=" null != isDel ">and `is_del` = #{isDel}</if>
  103. <if test=" null != merchantName ">and `merchant_name` = #{merchantName}</if>
  104. <if test=" null != brand ">and `brand` = #{brand}</if>
  105. <if test=" null != businessId ">and `business_id` = #{businessId}</if>
  106. <if test=" null != shopType ">and `shop_type` = #{shopType}</if>
  107. <if test=" null != shopId ">and `shop_id` = #{shopId}</if>
  108. <if test=" null != updatetime ">and `updatetime` = #{updatetime}</if>
  109. <if test=" null != createtime ">and `createtime` = #{createtime}</if>
  110. <if test=" null != linkPerson ">and `link_person` = #{linkPerson}</if>
  111. <if test=" null != linkPhone ">and `link_phone` = #{linkPhone}</if>
  112. <if test=" null != payAccount ">and `pay_account` = #{payAccount}</if>
  113. <if test=" null != filename ">and `filename` = #{filename}</if>
  114. <if test=" null != lease ">and `lease` = #{lease}</if>
  115. <if test=" null != type ">and `type` = #{type}</if>
  116. <if test=" null != startDate ">and `start_date` = #{startDate}</if>
  117. <if test=" null != endDate ">and `end_date` = #{endDate}</if>
  118. <if test=" null != rentShopType ">and `rent_shop_type` = #{rentShopType}</if>
  119. <if test=" null != operationType ">and `operation_type` = #{operationType}</if>
  120. <if test=" null != ids ">
  121. and id in
  122. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  123. #{idItem}
  124. </foreach>
  125. </if>
  126. <if test=" null != sortColumns">order by ${sortColumns}</if>
  127. </sql>
  128. <select id="findList" parameterType="com.iformall.domain.po.WxRentContract" resultMap="BaseResultMap">
  129. select
  130. <include refid="allColumns"/>
  131. from wx_rent_contract
  132. <include refid="dynamicWhereConditions"/>
  133. </select>
  134. <select id="queryRentContractData" resultType="hashmap" parameterType="com.iformall.domain.po.WxRentContract">
  135. select rc.id,rc.merchant_name merchantName,rc.rental_start_date rentalStartDate,rc.rental_end_date rentalEndDate,rc.`status`,
  136. rc.price,rc.contract_number contractNumber,s.shop_number shopNumber,f.floor_name floorName,b.building_name buildingName,
  137. rc.lease,rc.filepath,rc.filename,rc.pay_account payAccount,rc.sign_date signDate,rc.merchant_id merchantId,rc.type,
  138. rc.start_date startDate,rc.end_date endDate,br.`name` brandName,rc.apply_status applyStatus,rc.bank_name
  139. bankName,rc.rent_shop_type rentShopType,rc.fix_start_date fixStartDate,rc.fix_end_date fixEndDate
  140. ,rc.business_type businessType,rc.adjust_period adjustPeriod,rc.rent_info rentInfo, rc.file_names
  141. fileNames,rc.price_unit,rc.subject_name subjectName,rc.`rent_input_way` rentInputWay,rc.`adjust_ratio_way`
  142. adjustRatioWay,rc.bus_discount_ratio
  143. from wx_rent_contract rc
  144. left join wx_shop s on rc.shop_id=s.id
  145. left join wx_mall_floor f on s.floor=f.id
  146. left join wx_mall_building b on s.building=b.id
  147. left join wx_brand br on rc.brand=br.id
  148. <where>
  149. rc.tenant_id=#{tenantId}
  150. <if test=" null != merchantName and merchantName!=''">and rc.`merchant_name` like concat('%',#{merchantName},'%')</if>
  151. <if test=" null != shopNumber and shopNumber!='' and null != rentShopType and rentShopType==1">
  152. and json_extract(rc.rent_info,'$[*].shopNumber') like concat('%',#{shopNumber},'%')
  153. </if>
  154. <if test=" null != shopNumber and shopNumber!='' and null != rentShopType and rentShopType==2">
  155. and s.`shop_number` like concat('%',#{shopNumber},'%')
  156. </if>
  157. <if test=" null != status ">and rc.`status` = #{status}</if>
  158. <if test=" null != shopId">and rc.`shop_id` = #{shopId}</if>
  159. <if test=" null != type ">and rc.`type` = #{type}</if>
  160. <if test=" null != rentShopType ">and rc.`rent_shop_type` = #{rentShopType}</if>
  161. <if test=" null != applyStatus ">and rc.`apply_status` = #{applyStatus}</if>
  162. <if test=" null != building and ''!= building">and b.id = #{building}</if>
  163. <if test=" null != floor and ''!= floor">and f.id = #{floor}</if>
  164. <if test=" null != operationType ">and `operation_type` = #{operationType}</if>
  165. </where>
  166. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  167. <if test=" null == sortColumns"> order by rc.createtime desc,rc.id desc </if>
  168. </select>
  169. <select id="queryRentContractWaitSignStatus" resultType="int" parameterType="com.iformall.domain.po.WxRentContract">
  170. select count(id) from wx_rent_contract where tenant_id=#{tenantId} and status=#{status}
  171. <if test=" null != rentShopType ">and rent_shop_type = #{rentShopType}</if>
  172. </select>
  173. <select id="queryRentContractEndSoonStatus" resultType="int" parameterType="com.iformall.domain.po.WxRentContract">
  174. select count(id) from wx_rent_contract where tenant_id=#{tenantId} and status=4
  175. <if test=" null != rentShopType ">and rent_shop_type = #{rentShopType}</if>
  176. </select>
  177. <select id="queryRentContractPaidStatus" resultType="int" parameterType="com.iformall.domain.po.WxRentContract">
  178. select count(id) from wx_rent_contract where tenant_id=#{tenantId} and status in (2,3,4)
  179. <if test=" null != rentShopType ">and rent_shop_type = #{rentShopType}</if>
  180. </select>
  181. <select id="queryRentContractEndStatus" resultType="int" parameterType="com.iformall.domain.po.WxRentContract">
  182. select count(id) from wx_rent_contract where tenant_id=#{tenantId} and status!=0 and status!=1 and status!=6 and
  183. status!=7
  184. and rental_end_date &lt;now()
  185. <if test=" null != rentShopType ">and rent_shop_type = #{rentShopType}</if>
  186. </select>
  187. <update id="updateRentContractEndSoonStatus" parameterType="com.iformall.domain.po.WxRentContract">
  188. update wx_rent_contract set status=#{status} where tenant_id=#{tenantId} and status!=0 and status!=5 and status!=1 and status!=6 and status!=7 and DATEDIFF(rental_end_date,now()) &lt;= 30 and rental_end_date > now()
  189. </update>
  190. <update id="updateRentContractPaidStatus" parameterType="com.iformall.domain.po.WxRentContract">
  191. update wx_rent_contract set status=#{status} where tenant_id=#{tenantId} and status!=0 and status!=1 and status!=5 and status!=6 and status!=7 and rental_start_date &lt;= now() and rental_end_date >= now()
  192. </update>
  193. <update id="updateRentContractEndStatus" parameterType="com.iformall.domain.po.WxRentContract">
  194. update wx_rent_contract set status=#{status} where tenant_id=#{tenantId} and status!=0 and status!=1 and status!=5 and status!=6 and status!=7 and rental_end_date &lt;now()
  195. </update>
  196. <update id="updateRentWaitSignStatus" parameterType="com.iformall.domain.po.WxRentContract">
  197. update wx_rent_contract set status=#{status} where tenant_id=#{tenantId} and status!=0 and status!=5 and status!=6 and status!=7 and merchant_id is null
  198. </update>
  199. <update id="updateApplyStatus" parameterType="com.iformall.domain.po.WxRentContract">
  200. update wx_rent_contract
  201. set apply_status=#{applyStatus}
  202. <if test=" null != businessType ">,business_type=#{businessType}</if>
  203. <if test=" null != status ">,status=#{status}</if>
  204. where id=#{id}
  205. </update>
  206. <update id="updateStatus" parameterType="com.iformall.domain.po.WxRentContract">
  207. update wx_rent_contract set status=#{status} where id=#{id}
  208. </update>
  209. <update id="updateRentInvalidStatus" parameterType="com.iformall.domain.po.WxRentContract">
  210. update wx_rent_contract set status=#{status} where shop_id in (
  211. select s.shop_id from (SELECT shop_id FROM wx_rent_contract WHERE tenant_id = #{tenantId} and status in(2,3,4)
  212. )s) and status in(0,1) and status!=7 and tenant_id=#{tenantId} and rent_shop_type=2
  213. </update>
  214. <select id="getRentContractList" parameterType="com.iformall.domain.po.WxRentContract"
  215. resultType="com.iformall.domain.po.WxRentContract">
  216. select s.shop_id,s.shop_number,s.building_name building, s.floor_name floor,s.build_area,rc.* from (
  217. select s.id shop_id,ms.merchant_id,s.shop_number,b.building_name,f.floor_name,s.build_area
  218. from wx_shop s
  219. left join wx_mall_building b on s.building=b.id
  220. left join wx_mall_floor f on s.floor=f.id
  221. left join wx_merchant_shop ms on s.id=ms.shop_id
  222. where ms.is_del=0) s
  223. inner join (select * from wx_rent_contract where status in(2,3,4)) rc on s.merchant_id=rc.merchant_id
  224. where rc.tenant_id=#{tenantId}
  225. order by rc.id desc
  226. </select>
  227. <select id="updateStatusForUnsign" parameterType="com.iformall.domain.po.WxRentContract">
  228. update wx_rent_contract set status=1 where tenant_id=#{tenantId} and status=2 and merchant_id is null
  229. </select>
  230. <select id="getRentInvalidList" parameterType="com.iformall.domain.po.WxRentContract"
  231. resultType="com.iformall.domain.po.WxRentContract">
  232. select id from wx_rent_contract where shop_id in (
  233. select s.shop_id from (SELECT shop_id FROM wx_rent_contract WHERE tenant_id = #{tenantId} and status in(2,3,4)
  234. )s) and status in(0,1) and status!=7 and tenant_id=#{tenantId} and apply_status=1
  235. </select>
  236. <select id="queryOweCount" parameterType="com.iformall.domain.po.WxRentContract" resultType="Long">
  237. select count(*) from wx_rent_contract r,wx_bill_rent b
  238. where b.rent_contract_id = r.id and b.status = 1 and r.id = #{id}
  239. </select>
  240. <select id="getMerchants" parameterType="com.iformall.domain.po.WxRentContract"
  241. resultType="com.iformall.domain.po.WxRentContract">
  242. select * from wx_rent_contract where status in(2,3,4)
  243. and merchant_id not in(select merchant_id from wx_property_contract where status in(2,3,4))
  244. <if test=" null != rentShopType ">and rent_shop_type = #{rentShopType}</if>
  245. </select>
  246. <select id="selectRentContractCountByShopId" parameterType="com.iformall.domain.po.WxRentContract" resultType="int">
  247. select count(*) from wx_rent_contract where tenant_id=#{tenantId} and json_contains(json_extract(rent_info,'$[*].shopId'),concat('"',${shopId},'"')) and status in (2,3,4)
  248. <if test="id!=null">
  249. and id!=#{id}
  250. </if>
  251. </select>
  252. <select id="selectRentContractByShopId" parameterType="com.iformall.domain.po.WxRentContract"
  253. resultType="com.iformall.domain.po.WxRentContract">
  254. select * from wx_rent_contract where tenant_id=#{tenantId} and
  255. json_contains(json_extract(rent_info,'$[*].shopId'),concat('"',${shopId},'"')) and rent_shop_type =1
  256. <if test=" null != status ">and status=#{status} and status!=7</if>
  257. </select>
  258. <update id="updateInvalidContract" parameterType="com.iformall.domain.po.WxRentContract">
  259. update wx_rent_contract set status=#{status} where tenant_id=#{tenantId} and id in(select r.id from (
  260. select id from wx_rent_contract where json_contains(json_extract(rent_info,'$[*].shopId'),concat('"',${shopId},'"'))
  261. and rent_shop_type=1 and status in(0,1) and status!=7)r)
  262. </update>
  263. <select id="selectRentContractByMerchantId" parameterType="com.iformall.domain.po.WxRentContract"
  264. resultType="com.iformall.domain.po.WxRentContract">
  265. select * from wx_rent_contract
  266. where status in(2,3,4)
  267. and merchant_id = #{merchantId}
  268. </select>
  269. <select id="hasContractNumber" parameterType="com.iformall.domain.po.WxRentContract"
  270. resultType="int">
  271. select count(*) from (
  272. select * from wx_rent_contract where tenant_id=#{tenantId}
  273. and contract_number=#{contractNumber}
  274. and status not in(5,6,7)
  275. union
  276. select * from wx_rent_contract where tenant_id=#{tenantId}
  277. and contract_number=#{contractNumber}
  278. and apply_status in(1,2)
  279. ) r
  280. <where>
  281. <if test="id!=null and id!=''">
  282. r.id!=#{id}
  283. </if>
  284. </where>
  285. </select>
  286. <select id="getShopType" parameterType="com.iformall.domain.po.WxRentContract" resultType="int">
  287. select s.type from wx_rent_contract r left join wx_shop s on(s.id = r.`shop_id`)
  288. where r.id = #{id}
  289. </select>
  290. <resultMap id="contractMap" type="com.iformall.domain.vo.WxRentPropertyContractVo">
  291. <id column="id" property="id"/>
  292. <result column="contract_number" property="contractNumber"/>
  293. <result column="shop_number" property="shopNumber"/>
  294. <result column="merchant_name" property="merchantName"/>
  295. <result column="rent_info" property="rentInfo"/>
  296. <result column="rental_start_date" property="rentalStartDate"/>
  297. <result column="rental_end_date" property="rentalEndDate"/>
  298. <result column="rent_price" property="rentPrice"/>
  299. <result column="property_price" property="propertyPrice"/>
  300. <result column="type" property="type"/>
  301. <result column="status" property="status"/>
  302. <result column="apply_status" property="applyStatus"/>
  303. <result column="operation_type" property="operationType"/>
  304. <result column="rent_shop_type" property="rentShopType"/>
  305. <result column="merchant_id" property="merchantId"/>
  306. <result column="property_status" property="propertyStatus"/>
  307. <result column="rent_price_unit" property="rentPriceUnit"/>
  308. <result column="property_price_unit" property="propertyPriceUnit"/>
  309. </resultMap>
  310. <select id="listContractVo" parameterType="com.iformall.domain.vo.WxRentPropertyContractVo" resultMap="contractMap">
  311. select rc.id,rc.merchant_name,rc.rental_start_date,rc.rental_end_date,rc.`status`,
  312. rc.price as rent_price,rc.contract_number,s.shop_number,rc.type,rc.apply_status,
  313. rc.rent_shop_type,rc.rent_info,pc.price as property_price,rc.merchant_id,pc.`status` as property_status,
  314. rc.price_unit as rent_price_unit,pc.price_unit as property_price_unit,
  315. rc.business_type businessType
  316. from wx_rent_contract rc left join wx_property_contract pc on rc.id=pc.rent_contract_id
  317. left join wx_shop s on rc.shop_id=s.id
  318. <where>
  319. rc.tenant_id=#{tenantId}
  320. <if test=" null != merchantName and merchantName!=''">and rc.`merchant_name` like
  321. concat('%',#{merchantName},'%')
  322. </if>
  323. <if test=" null != shopNumber and shopNumber!='' and null != rentShopType and rentShopType==1">
  324. and json_extract(rc.rent_info,'$[*].shopNumber') like concat('%',#{shopNumber},'%')
  325. </if>
  326. <if test=" null != shopNumber and shopNumber!='' and null != rentShopType and rentShopType==2">
  327. and s.`shop_number` like concat('%',#{shopNumber},'%')
  328. </if>
  329. <if test=" null != status ">and rc.`status` = #{status}</if>
  330. <if test=" null != type ">and rc.`type` = #{type}</if>
  331. <if test=" null != rentShopType ">and rc.`rent_shop_type` = #{rentShopType}</if>
  332. <if test=" null != applyStatus ">and rc.`apply_status` = #{applyStatus}</if>
  333. <if test=" null != operationType ">and rc.`operation_type` = #{operationType}</if>
  334. </where>
  335. <if test=" null != sortColumns">order by ${sortColumns}</if>
  336. <if test=" null == sortColumns">order by rc.createtime desc,rc.id desc</if>
  337. </select>
  338. <select id="getByBill" parameterType="com.iformall.domain.po.WxBillRent" resultMap="BaseResultMap">
  339. select * from wx_rent_contract where id in(
  340. select rent_contract_id from wx_bill_rent id = #{id}
  341. )
  342. </select>
  343. </mapper>