StudentPaymentOrderDetailMapper.xml 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445
  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. <!--
  4. 这个文件是自动生成的。
  5. 不要修改此文件。所有改动将在下次重新自动生成时丢失。
  6. -->
  7. <mapper namespace="com.ym.mec.biz.dal.dao.StudentPaymentOrderDetailDao">
  8. <resultMap type="com.ym.mec.biz.dal.entity.StudentPaymentOrderDetail" id="StudentPaymentOrderDetail">
  9. <result column="id_" property="id"/>
  10. <result column="type_" property="type" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
  11. <result column="goods_id_list_" property="goodsIdList"/>
  12. <result column="price_" property="price"/>
  13. <result column="create_time_" property="createTime"/>
  14. <result column="update_time_" property="updateTime"/>
  15. <result column="tenant_id_" property="tenantId"/>
  16. <result column="payment_order_id_" property="paymentOrderId"/>
  17. <result column="kit_group_purchase_type_" property="kitGroupPurchaseType"
  18. typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
  19. <result column="student_instrument_id_" property="studentInstrumentId"/>
  20. <result column="is_renew_" property="isRenew"/>
  21. <result column="income_item_" property="incomeItem"/>
  22. <result column="income_" property="income"/>
  23. <result column="balance_income_" property="balanceIncome"/>
  24. <result column="minuend_stock_goods_id_list_" property="minuendStockGoodsIdList"/>
  25. <result column="user_id_" property="userId"/>
  26. <result column="delivery_batch_no_" property="deliveryBatchNo"/>
  27. <result column="remit_fee_" property="remitFee"/>
  28. <collection property="goodsList" ofType="com.ym.mec.biz.dal.entity.Goods">
  29. <result column="goods_id_" property="id"/>
  30. <result column="goods_name_" property="name"/>
  31. <result column="group_purchase_price_" property="groupPurchasePrice"/>
  32. <result column="discount_price_" property="discountPrice"/>
  33. <result column="agree_cost_price_" property="agreeCostPrice"/>
  34. <result column="goods_type_" property="type" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
  35. <result column="complement_goods_id_list_" property="complementGoodsIdList"/>
  36. </collection>
  37. </resultMap>
  38. <resultMap type="com.ym.mec.biz.dal.dto.Mapper" id="Mapper">
  39. <result column="key_" property="key"/>
  40. <result column="value_" property="value"/>
  41. </resultMap>
  42. <resultMap type="com.ym.mec.biz.dal.dto.StudentApplyInstrumentDto" id="StudentApplyInstrumentDto">
  43. <result column="music_group_id_" property="musicGroupId"/>
  44. <result column="student_instrument_id_" property="studentInstrumentId"/>
  45. <result column="user_id_" property="userId"/>
  46. <result column="student_payment_order_id_" property="studentPyamentOrderId"/>
  47. <result column="calender_id_" property="musicGroupPaymentCalenderId"/>
  48. </resultMap>
  49. <!-- 根据主键查询一条记录 -->
  50. <select id="get" resultMap="StudentPaymentOrderDetail">
  51. SELECT *
  52. FROM student_payment_order_detail
  53. WHERE id_ = #{id}
  54. </select>
  55. <!-- 全查询 -->
  56. <select id="findAll" resultMap="StudentPaymentOrderDetail">
  57. SELECT *
  58. FROM student_payment_order_detail where tenant_id_ = #{tenantId}
  59. ORDER BY id_
  60. </select>
  61. <!-- 向数据库增加一条记录 -->
  62. <insert id="insert" parameterType="com.ym.mec.biz.dal.entity.StudentPaymentOrderDetail" useGeneratedKeys="true"
  63. keyColumn="id" keyProperty="id">
  64. INSERT INTO student_payment_order_detail
  65. (type_,goods_id_list_,price_,create_time_,update_time_,payment_order_id_,kit_group_purchase_type_,
  66. student_instrument_id_,is_renew_,income_item_,income_,balance_income_,minuend_stock_goods_id_list_,tenant_id_,remit_fee_,delivery_batch_no_)
  67. VALUES(#{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{goodsIdList},#{price},now(),now(),
  68. #{paymentOrderId},#{kitGroupPurchaseType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
  69. #{studentInstrumentId},#{isRenew},#{incomeItem},#{income},#{balanceIncome},#{minuendStockGoodsIdList},#{tenantId},#{remitFee},#{deliveryBatchNo})
  70. </insert>
  71. <!-- 根据主键查询一条记录 -->
  72. <update id="update" parameterType="com.ym.mec.biz.dal.entity.StudentPaymentOrderDetail">
  73. UPDATE student_payment_order_detail
  74. <set>
  75. <if test="price != null">
  76. price_ = #{price},
  77. </if>
  78. <if test="goodsIdList != null">
  79. goods_id_list_ = #{goodsIdList},
  80. </if>
  81. <if test="updateTime != null">
  82. update_time_ = NOW(),
  83. </if>
  84. <if test="paymentOrderId != null">
  85. payment_order_id_ = #{paymentOrderId},
  86. </if>
  87. <if test="kitGroupPurchaseType != null">
  88. kit_group_purchase_type_ =
  89. #{kitGroupPurchaseType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
  90. </if>
  91. <if test="type != null">
  92. type_ = #{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
  93. </if>
  94. <if test="studentInstrumentId != null">
  95. student_instrument_id_ = #{studentInstrumentId},
  96. </if>
  97. <if test="incomeItem != null">
  98. income_item_ = #{incomeItem},
  99. </if>
  100. <if test="income != null">
  101. income_ = #{income},
  102. </if>
  103. <if test="balanceIncome != null">
  104. balance_income_ = #{balanceIncome},
  105. </if>
  106. <if test="minuendStockGoodsIdList != null">
  107. minuend_stock_goods_id_list_ = #{minuendStockGoodsIdList},
  108. </if>
  109. <if test="deliveryBatchNo != null">
  110. delivery_batch_no_ = #{deliveryBatchNo},
  111. </if>
  112. </set>
  113. WHERE id_ = #{id} and tenant_id_ = #{tenantId}
  114. </update>
  115. <update id="batchUpdate" parameterType="java.util.List">
  116. <foreach collection="list" item="item" index="index" open="" close="" separator=";">
  117. UPDATE student_payment_order_detail
  118. <set>
  119. <if test="item.price != null">
  120. price_ = #{item.price},
  121. </if>
  122. <if test="item.goodsIdList != null">
  123. goods_id_list_ = #{item.goodsIdList},
  124. </if>
  125. <if test="item.updateTime != null">
  126. update_time_ = NOW(),
  127. </if>
  128. <if test="item.paymentOrderId != null">
  129. payment_order_id_ = #{item.paymentOrderId},
  130. </if>
  131. <if test="item.kitGroupPurchaseType != null">
  132. kit_group_purchase_type_ =
  133. #{item.kitGroupPurchaseType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
  134. </if>
  135. <if test="item.type != null">
  136. type_ = #{item.type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
  137. </if>
  138. <if test="item.studentInstrumentId != null">
  139. student_instrument_id_ = #{item.studentInstrumentId},
  140. </if>
  141. <if test="item.incomeItem != null">
  142. income_item_ = #{item.incomeItem},
  143. </if>
  144. <if test="item.income != null">
  145. income_ = #{item.income},
  146. </if>
  147. <if test="item.balanceIncome != null">
  148. balance_income_ = #{item.balanceIncome},
  149. </if>
  150. <if test="item.minuendStockGoodsIdList != null">
  151. minuend_stock_goods_id_list_ = #{item.minuendStockGoodsIdList},
  152. </if>
  153. <if test="item.deliveryBatchNo != null">
  154. delivery_batch_no_ = #{item.deliveryBatchNo},
  155. </if>
  156. </set>
  157. WHERE id_ = #{item.id} and tenant_id_ = #{item.tenantId}
  158. </foreach>
  159. </update>
  160. <!-- 根据主键删除一条记录 -->
  161. <delete id="delete">
  162. DELETE
  163. FROM student_payment_order_detail
  164. WHERE id_ = #{id}
  165. </delete>
  166. <!-- 分页查询 -->
  167. <select id="queryPage" resultMap="StudentPaymentOrderDetail" parameterType="map">
  168. SELECT * FROM student_payment_order_detail where tenant_id_ = #{tenantId} ORDER BY id_
  169. <include refid="global.limit"/>
  170. </select>
  171. <!-- 查询当前表的总记录数 -->
  172. <select id="queryCount" resultType="int">
  173. SELECT COUNT(*)
  174. FROM student_payment_order_detail where tenant_id_ = #{tenantId}
  175. </select>
  176. <insert id="batchAdd" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id_">
  177. INSERT INTO student_payment_order_detail
  178. (type_,goods_id_list_,price_,remit_fee_,create_time_,update_time_,payment_order_id_,
  179. kit_group_purchase_type_,student_instrument_id_,is_renew_,income_item_,income_,balance_income_,minuend_stock_goods_id_list_,tenant_id_,delivery_batch_no_)
  180. VALUE
  181. <foreach collection="studentPaymentOrderDetailList" item="orderDetail" separator=",">
  182. (#{orderDetail.type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
  183. #{orderDetail.goodsIdList},#{orderDetail.price},#{orderDetail.remitFee},now(),now(),#{orderDetail.paymentOrderId},
  184. #{orderDetail.kitGroupPurchaseType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
  185. #{orderDetail.studentInstrumentId},#{orderDetail.isRenew},#{orderDetail.incomeItem},#{orderDetail.income},#{orderDetail.balanceIncome},#{orderDetail.minuendStockGoodsIdList},#{orderDetail.tenantId},#{orderDetail.deliveryBatchNo})
  186. </foreach>
  187. </insert>
  188. <!-- 查询注册订单详情 -->
  189. <select id="findApplyOrderSuccess" resultMap="StudentPaymentOrderDetail">
  190. SELECT spod.*,spo.user_id_
  191. FROM student_payment_order spo
  192. LEFT JOIN student_payment_order_detail spod ON spo.id_ = spod.payment_order_id_
  193. LEFT JOIN student_registration sr ON spo.user_id_ = sr.user_id_
  194. WHERE spo.music_group_id_ = #{musicGroupId}
  195. AND spo.status_ = #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
  196. AND spo.type_ = 'APPLY'
  197. AND sr.music_group_id_ = #{musicGroupId}
  198. AND sr.music_group_status_ != 'QUIT' AND spod.id_ IS NOT NULL
  199. <if test="deliveryStatus != null and deliveryStatus == 1">
  200. and spod.delivery_batch_no_ is NOT NULL
  201. </if>
  202. <if test="deliveryStatus != null and deliveryStatus == 0">
  203. and spod.delivery_batch_no_ is NULL
  204. </if>
  205. </select>
  206. <!-- 查询订单详情 -->
  207. <select id="findApplyOrderGoods" resultMap="StudentPaymentOrderDetail">
  208. SELECT *
  209. FROM student_payment_order_detail
  210. WHERE payment_order_id_ = #{orderId}
  211. </select>
  212. <!-- 查询用户注册订单详情 -->
  213. <select id="findUserApplyOrder" resultMap="StudentPaymentOrderDetail">
  214. SELECT spod.*,spo.user_id_
  215. FROM student_payment_order_detail spod
  216. LEFT JOIN student_payment_order spo ON spo.id_ = spod.payment_order_id_
  217. WHERE
  218. spo.music_group_id_ = #{musicGroupId}
  219. <if test="userId != null">
  220. AND spo.user_id_ = #{userId}
  221. </if>
  222. AND spo.status_ = #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
  223. AND spo.type_ = 'APPLY'
  224. </select>
  225. <resultMap id="musicalListDetailDtoMap" type="com.ym.mec.biz.dal.dto.MusicalListDetailDto">
  226. <result property="paymentOrderId" column="payment_order_id_"/>
  227. <result property="username" column="username_"/>
  228. <result property="userId" column="user_id_"/>
  229. <result property="musicGroupName" column="muaic_group_name_"/>
  230. <result property="accessoriesAmount" column="accessories_amount_"/>
  231. <result property="courseAmount" column="course_amount_"/>
  232. <result property="kitGroupPurchaseTypeEnum" column="kit_group_purchase_type_"/>
  233. <result property="musicalAmount" column="musical_amount_"/>
  234. <result property="orderAmount" column="order_amount_"/>
  235. <result property="organName" column="organ_name_"/>
  236. <result property="goodsNames" column="goods_names_"/>
  237. </resultMap>
  238. <select id="getMusicalListDetail" resultMap="musicalListDetailDtoMap">
  239. SELECT spo.id_ payment_order_id_, spo.user_id_
  240. FROM student_payment_order spo
  241. LEFT JOIN student_registration sr ON spo.user_id_ = sr.user_id_
  242. WHERE spo.music_group_id_ = #{musicGroupId}
  243. <if test="userId != null">
  244. AND spo.user_id_ = #{userId}
  245. </if>
  246. AND spo.status_ = 'SUCCESS'
  247. AND sr.music_group_id_ = #{musicGroupId}
  248. AND sr.music_group_status_ != 'QUIT'
  249. </select>
  250. <select id="queryGoodsNames" resultType="java.util.Map">
  251. SELECT spod.payment_order_id_ 'key',GROUP_CONCAT(g.name_) 'value'
  252. FROM student_payment_order_detail spod
  253. LEFT JOIN goods g ON FIND_IN_SET(g.id_,spod.goods_id_list_)
  254. WHERE spod.payment_order_id_ IN
  255. <foreach collection="paymentOrderNo" open="(" close=")" separator="," item="item">
  256. #{item}
  257. </foreach>
  258. GROUP BY spod.payment_order_id_
  259. </select>
  260. <select id="queryGoodsPrice" resultType="java.util.Map">
  261. SELECT spod.payment_order_id_ 'key' ,SUM(price_) 'value' FROM student_payment_order_detail spod
  262. WHERE FIND_IN_SET(spod.type_,#{types})
  263. AND spod.payment_order_id_ IN
  264. <foreach collection="paymentOrderNo" open="(" close=")" separator="," item="item">
  265. #{item}
  266. </foreach>
  267. GROUP BY spod.payment_order_id_
  268. </select>
  269. <select id="findApplyOrderMusical" resultMap="StudentPaymentOrderDetail">
  270. SELECT *
  271. FROM student_payment_order_detail
  272. WHERE payment_order_id_ = #{orderId}
  273. AND type_ = 'MUSICAL'
  274. LIMIT 1
  275. </select>
  276. <select id="getOrderDetail" resultMap="StudentPaymentOrderDetail">
  277. SELECT spod.*,
  278. g.id_ goods_id_,
  279. g.name_ goods_name_,
  280. g.group_purchase_price_,
  281. g.discount_price_,
  282. g.agree_cost_price_,
  283. g.type_ goods_type_,
  284. g.complement_goods_id_list_
  285. FROM student_payment_order_detail spod
  286. LEFT JOIN goods g ON FIND_IN_SET(g.id_, spod.goods_id_list_)
  287. WHERE spod.payment_order_id_ = #{orderId}
  288. AND spod.goods_id_list_ IS NOT NULL
  289. </select>
  290. <select id="getOrderDetailType" resultType="java.lang.String">
  291. SELECT DISTINCT type_
  292. FROM student_payment_order_detail
  293. WHERE payment_order_id_ = #{orderId}
  294. </select>
  295. <select id="getStudentApplyDetail" resultMap="StudentPaymentOrderDetail">
  296. SELECT spod.*,
  297. g.id_ goods_id_,
  298. g.name_ goods_name_,
  299. g.group_purchase_price_,
  300. g.discount_price_,
  301. g.agree_cost_price_,
  302. g.type_ goods_type_
  303. FROM student_payment_order_detail spod
  304. LEFT JOIN goods g ON FIND_IN_SET(g.id_, spod.goods_id_list_)
  305. LEFT JOIN student_payment_order spo on spod.payment_order_id_ = spo.id_
  306. WHERE spo.user_id_ = #{studentId}
  307. AND spo.music_group_id_ = #{musicGroupId}
  308. AND spo.status_ = 'SUCCESS'
  309. AND spo.type_ = 'APPLY'
  310. AND spod.type_ IN ('MUSICAL', 'ACCESSORIES', 'TEACHING', 'OTHER', 'COURSE')
  311. </select>
  312. <select id="queryPurchaseTypeMap" resultType="java.util.Map">
  313. SELECT payment_order_id_ 'key',kit_group_purchase_type_ 'value'
  314. FROM student_payment_order_detail
  315. WHERE payment_order_id_ IN
  316. <foreach collection="paymentOrderNo" open="(" close=")" separator="," item="item">
  317. #{item}
  318. </foreach>
  319. AND type_='MUSICAL'
  320. </select>
  321. <select id="getOrderGoodies" resultMap="StudentPaymentOrderDetail">
  322. SELECT spod.*,
  323. g.id_ goods_id_,
  324. g.name_ goods_name_,
  325. g.group_purchase_price_,
  326. g.discount_price_,
  327. g.agree_cost_price_,
  328. g.type_ goods_type_,
  329. g.complement_goods_id_list_
  330. FROM student_payment_order_detail spod
  331. LEFT JOIN goods g ON FIND_IN_SET(g.id_, spod.goods_id_list_)
  332. WHERE spod.payment_order_id_ IN
  333. <foreach collection="orderIds" open="(" close=")" separator="," item="orderId">
  334. #{orderId}
  335. </foreach>
  336. AND spod.goods_id_list_ IS NOT NULL
  337. </select>
  338. <select id="getWithIds" resultMap="StudentPaymentOrderDetail">
  339. SELECT * FROM student_payment_order_detail WHERE payment_order_id_ IN
  340. <foreach collection="paymentOrderIds" item="paymentOrderId" open="(" close=")" separator=",">
  341. #{paymentOrderId}
  342. </foreach>
  343. </select>
  344. <select id="getOrderDetailByType" resultMap="StudentPaymentOrderDetail">
  345. SELECT * FROM student_payment_order_detail WHERE payment_order_id_ = #{orderId} AND type_ IN
  346. <foreach collection="orderDetailTypes" item="orderDetailType" open="(" close=")" separator=",">
  347. #{orderDetailType}
  348. </foreach>
  349. </select>
  350. <select id="getWithUserAndOrderType" resultMap="StudentPaymentOrderDetail">
  351. SELECT spod.* FROM student_payment_order_detail spod
  352. LEFT JOIN student_payment_order spo ON spo.id_=spod.payment_order_id_
  353. WHERE spo.user_id_= #{userId} AND spo.music_group_id_ = #{musicGroupId}
  354. AND spod.type_ = #{orderDetailType, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
  355. AND spo.status_='SUCCESS'
  356. AND spo.type_ = 'APPLY'
  357. </select>
  358. <select id="getOrderDetailByOrderId" resultMap="StudentPaymentOrderDetail">
  359. SELECT * FROM student_payment_order_detail WHERE payment_order_id_ IN
  360. <foreach collection="orderIdList" open="(" close=")" separator="," item="item">
  361. #{item}
  362. </foreach>
  363. </select>
  364. <select id="getInstrumentNumInMusicApply" resultMap="Mapper">
  365. SELECT count(distinct spo.user_id_) value_,spo.music_group_id_ key_
  366. FROM student_payment_order_detail spod left join student_payment_order spo on spod.payment_order_id_ = spo.id_
  367. WHERE spo.music_group_id_ IN
  368. <foreach collection="musicGroupIds" item="musicGroupId" open="(" close=")" separator=",">
  369. #{musicGroupId}
  370. </foreach>
  371. AND spo.type_ = 'APPLY' and spo.status_ = 'SUCCESS' and spod.type_ = 'MUSICAL'
  372. GROUP BY spo.music_group_id_
  373. </select>
  374. <select id="queryByType" resultMap="StudentApplyInstrumentDto" parameterType="map">
  375. select spo.user_id_,spo.music_group_id_,spo.calender_id_,spod.student_instrument_id_ from student_payment_order_detail spod left join student_payment_order spo on spod.payment_order_id_ = spo.id_
  376. WHERE spo.music_group_id_ = #{musicGroupId}
  377. AND spo.type_ = 'APPLY' and spo.status_ = 'SUCCESS' and spod.type_ = #{orderDetailType, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
  378. </select>
  379. <select id="getGoodsSellPrice" resultMap="com.ym.mec.biz.dal.dao.GoodsDao.Goods">
  380. SELECT g.id_,g.goods_category_id_,g.sn_,g.name_,g.brand_,g.specification_,g.image_,g.type_,spod.price_ group_purchase_price_
  381. FROM student_payment_order_detail spod
  382. LEFT JOIN goods g ON spod.goods_id_list_ = g.id_
  383. WHERE spod.payment_order_id_ IN
  384. <foreach collection="orderIds" separator="," item="item" open="(" close=")">
  385. #{item}
  386. </foreach>
  387. AND spod.type_ = #{type}
  388. GROUP BY spod.id_
  389. </select>
  390. <select id="findByOrderId" resultMap="StudentPaymentOrderDetail">
  391. SELECT * FROM student_payment_order_detail WHERE payment_order_id_ = #{paymentOrderId}
  392. </select>
  393. <select id="findByCalenderId" resultMap="StudentPaymentOrderDetail">
  394. SELECT spod.*,spo.user_id_ FROM student_payment_order spo
  395. LEFT JOIN student_payment_order_detail spod ON spo.id_ = spod.payment_order_id_
  396. WHERE spo.id_ IN (
  397. SELECT c.id_ FROM (SELECT payment_order_id_ id_ FROM music_group_payment_calender_detail
  398. WHERE music_group_payment_calender_id_ = #{calenderId} AND payment_order_id_ IS NOT NULL
  399. UNION
  400. SELECT id_ FROM student_payment_order WHERE calender_id_ = #{calenderId} AND status_ = 'SUCCESS')c) AND spod.id_ IS NOT NULL
  401. </select>
  402. <select id="querySubjectChangeByMusicGroupId" resultMap="StudentPaymentOrderDetail">
  403. SELECT spod.*,spo.user_id_ FROM student_payment_order_detail spod
  404. LEFT JOIN student_payment_order spo ON spo.id_ = spod.payment_order_id_
  405. left join subject_change sc on sc.order_id_ = spo.id_
  406. WHERE sc.music_group_id_ = #{musicGroupId}
  407. AND spo.type_ = 'SUBJECT_CHANGE' and spo.status_ = 'SUCCESS' and spod.delivery_batch_no_ is NULL
  408. </select>
  409. <select id="getByOrderIdAndType" resultMap="StudentPaymentOrderDetail">
  410. SELECT * FROM student_payment_order_detail WHERE payment_order_id_ in
  411. <foreach collection="orderIds" item="orderId" open="(" close=")" separator=",">
  412. #{orderId}
  413. </foreach>
  414. AND type_ = #{type}
  415. </select>
  416. </mapper>