StudentPaymentOrderDetailMapper.xml 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447
  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_,
  180. balance_income_,minuend_stock_goods_id_list_,tenant_id_,delivery_batch_no_)
  181. VALUE
  182. <foreach collection="studentPaymentOrderDetailList" item="orderDetail" separator=",">
  183. (#{orderDetail.type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
  184. #{orderDetail.goodsIdList},#{orderDetail.price},#{orderDetail.remitFee},now(),now(),#{orderDetail.paymentOrderId},
  185. #{orderDetail.kitGroupPurchaseType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
  186. #{orderDetail.studentInstrumentId},#{orderDetail.isRenew},#{orderDetail.incomeItem},#{orderDetail.income},
  187. #{orderDetail.balanceIncome},#{orderDetail.minuendStockGoodsIdList},#{orderDetail.tenantId},#{orderDetail.deliveryBatchNo})
  188. </foreach>
  189. </insert>
  190. <!-- 查询注册订单详情 -->
  191. <select id="findApplyOrderSuccess" resultMap="StudentPaymentOrderDetail">
  192. SELECT spod.*,spo.user_id_
  193. FROM student_payment_order spo
  194. LEFT JOIN student_payment_order_detail spod ON spo.id_ = spod.payment_order_id_
  195. LEFT JOIN student_registration sr ON spo.user_id_ = sr.user_id_
  196. WHERE spo.music_group_id_ = #{musicGroupId}
  197. AND spo.status_ = #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
  198. AND spo.type_ = 'APPLY'
  199. AND sr.music_group_id_ = #{musicGroupId}
  200. AND sr.music_group_status_ != 'QUIT' AND spod.id_ IS NOT NULL
  201. <if test="deliveryStatus != null and deliveryStatus == 1">
  202. and spod.delivery_batch_no_ is NOT NULL
  203. </if>
  204. <if test="deliveryStatus != null and deliveryStatus == 0">
  205. and spod.delivery_batch_no_ is NULL
  206. </if>
  207. </select>
  208. <!-- 查询订单详情 -->
  209. <select id="findApplyOrderGoods" resultMap="StudentPaymentOrderDetail">
  210. SELECT *
  211. FROM student_payment_order_detail
  212. WHERE payment_order_id_ = #{orderId}
  213. </select>
  214. <!-- 查询用户注册订单详情 -->
  215. <select id="findUserApplyOrder" resultMap="StudentPaymentOrderDetail">
  216. SELECT spod.*,spo.user_id_
  217. FROM student_payment_order_detail spod
  218. LEFT JOIN student_payment_order spo ON spo.id_ = spod.payment_order_id_
  219. WHERE
  220. spo.music_group_id_ = #{musicGroupId}
  221. <if test="userId != null">
  222. AND spo.user_id_ = #{userId}
  223. </if>
  224. AND spo.status_ = #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
  225. AND spo.type_ = 'APPLY'
  226. </select>
  227. <resultMap id="musicalListDetailDtoMap" type="com.ym.mec.biz.dal.dto.MusicalListDetailDto">
  228. <result property="paymentOrderId" column="payment_order_id_"/>
  229. <result property="username" column="username_"/>
  230. <result property="userId" column="user_id_"/>
  231. <result property="musicGroupName" column="muaic_group_name_"/>
  232. <result property="accessoriesAmount" column="accessories_amount_"/>
  233. <result property="courseAmount" column="course_amount_"/>
  234. <result property="kitGroupPurchaseTypeEnum" column="kit_group_purchase_type_"/>
  235. <result property="musicalAmount" column="musical_amount_"/>
  236. <result property="orderAmount" column="order_amount_"/>
  237. <result property="organName" column="organ_name_"/>
  238. <result property="goodsNames" column="goods_names_"/>
  239. </resultMap>
  240. <select id="getMusicalListDetail" resultMap="musicalListDetailDtoMap">
  241. SELECT spo.id_ payment_order_id_, spo.user_id_
  242. FROM student_payment_order spo
  243. LEFT JOIN student_registration sr ON spo.user_id_ = sr.user_id_
  244. WHERE spo.music_group_id_ = #{musicGroupId}
  245. <if test="userId != null">
  246. AND spo.user_id_ = #{userId}
  247. </if>
  248. AND spo.status_ = 'SUCCESS'
  249. AND sr.music_group_id_ = #{musicGroupId}
  250. AND sr.music_group_status_ != 'QUIT'
  251. </select>
  252. <select id="queryGoodsNames" resultType="java.util.Map">
  253. SELECT spod.payment_order_id_ 'key',GROUP_CONCAT(g.name_) 'value'
  254. FROM student_payment_order_detail spod
  255. LEFT JOIN goods g ON FIND_IN_SET(g.id_,spod.goods_id_list_)
  256. WHERE spod.payment_order_id_ IN
  257. <foreach collection="paymentOrderNo" open="(" close=")" separator="," item="item">
  258. #{item}
  259. </foreach>
  260. GROUP BY spod.payment_order_id_
  261. </select>
  262. <select id="queryGoodsPrice" resultType="java.util.Map">
  263. SELECT spod.payment_order_id_ 'key' ,SUM(price_) 'value' FROM student_payment_order_detail spod
  264. WHERE FIND_IN_SET(spod.type_,#{types})
  265. AND spod.payment_order_id_ IN
  266. <foreach collection="paymentOrderNo" open="(" close=")" separator="," item="item">
  267. #{item}
  268. </foreach>
  269. GROUP BY spod.payment_order_id_
  270. </select>
  271. <select id="findApplyOrderMusical" resultMap="StudentPaymentOrderDetail">
  272. SELECT *
  273. FROM student_payment_order_detail
  274. WHERE payment_order_id_ = #{orderId}
  275. AND type_ = 'MUSICAL'
  276. LIMIT 1
  277. </select>
  278. <select id="getOrderDetail" resultMap="StudentPaymentOrderDetail">
  279. SELECT spod.*,
  280. g.id_ goods_id_,
  281. g.name_ goods_name_,
  282. g.group_purchase_price_,
  283. g.discount_price_,
  284. g.agree_cost_price_,
  285. g.type_ goods_type_,
  286. g.complement_goods_id_list_
  287. FROM student_payment_order_detail spod
  288. LEFT JOIN goods g ON FIND_IN_SET(g.id_, spod.goods_id_list_)
  289. WHERE spod.payment_order_id_ = #{orderId}
  290. AND spod.goods_id_list_ IS NOT NULL
  291. </select>
  292. <select id="getOrderDetailType" resultType="java.lang.String">
  293. SELECT DISTINCT type_
  294. FROM student_payment_order_detail
  295. WHERE payment_order_id_ = #{orderId}
  296. </select>
  297. <select id="getStudentApplyDetail" resultMap="StudentPaymentOrderDetail">
  298. SELECT spod.*,
  299. g.id_ goods_id_,
  300. g.name_ goods_name_,
  301. g.group_purchase_price_,
  302. g.discount_price_,
  303. g.agree_cost_price_,
  304. g.type_ goods_type_
  305. FROM student_payment_order_detail spod
  306. LEFT JOIN goods g ON FIND_IN_SET(g.id_, spod.goods_id_list_)
  307. LEFT JOIN student_payment_order spo on spod.payment_order_id_ = spo.id_
  308. WHERE spo.user_id_ = #{studentId}
  309. AND spo.music_group_id_ = #{musicGroupId}
  310. AND spo.status_ = 'SUCCESS'
  311. AND spo.type_ = 'APPLY'
  312. AND spod.type_ IN ('MUSICAL', 'ACCESSORIES', 'TEACHING', 'OTHER', 'COURSE')
  313. </select>
  314. <select id="queryPurchaseTypeMap" resultType="java.util.Map">
  315. SELECT payment_order_id_ 'key',kit_group_purchase_type_ 'value'
  316. FROM student_payment_order_detail
  317. WHERE payment_order_id_ IN
  318. <foreach collection="paymentOrderNo" open="(" close=")" separator="," item="item">
  319. #{item}
  320. </foreach>
  321. AND type_='MUSICAL'
  322. </select>
  323. <select id="getOrderGoodies" resultMap="StudentPaymentOrderDetail">
  324. SELECT spod.*,
  325. g.id_ goods_id_,
  326. g.name_ goods_name_,
  327. g.group_purchase_price_,
  328. g.discount_price_,
  329. g.agree_cost_price_,
  330. g.type_ goods_type_,
  331. g.complement_goods_id_list_
  332. FROM student_payment_order_detail spod
  333. LEFT JOIN goods g ON FIND_IN_SET(g.id_, spod.goods_id_list_)
  334. WHERE spod.payment_order_id_ IN
  335. <foreach collection="orderIds" open="(" close=")" separator="," item="orderId">
  336. #{orderId}
  337. </foreach>
  338. AND spod.goods_id_list_ IS NOT NULL
  339. </select>
  340. <select id="getWithIds" resultMap="StudentPaymentOrderDetail">
  341. SELECT * FROM student_payment_order_detail WHERE payment_order_id_ IN
  342. <foreach collection="paymentOrderIds" item="paymentOrderId" open="(" close=")" separator=",">
  343. #{paymentOrderId}
  344. </foreach>
  345. </select>
  346. <select id="getOrderDetailByType" resultMap="StudentPaymentOrderDetail">
  347. SELECT * FROM student_payment_order_detail WHERE payment_order_id_ = #{orderId} AND type_ IN
  348. <foreach collection="orderDetailTypes" item="orderDetailType" open="(" close=")" separator=",">
  349. #{orderDetailType}
  350. </foreach>
  351. </select>
  352. <select id="getWithUserAndOrderType" resultMap="StudentPaymentOrderDetail">
  353. SELECT spod.* FROM student_payment_order_detail spod
  354. LEFT JOIN student_payment_order spo ON spo.id_=spod.payment_order_id_
  355. WHERE spo.user_id_= #{userId} AND spo.music_group_id_ = #{musicGroupId}
  356. AND spod.type_ = #{orderDetailType, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
  357. AND spo.status_='SUCCESS'
  358. AND spo.type_ = 'APPLY'
  359. </select>
  360. <select id="getOrderDetailByOrderId" resultMap="StudentPaymentOrderDetail">
  361. SELECT * FROM student_payment_order_detail WHERE payment_order_id_ IN
  362. <foreach collection="orderIdList" open="(" close=")" separator="," item="item">
  363. #{item}
  364. </foreach>
  365. </select>
  366. <select id="getInstrumentNumInMusicApply" resultMap="Mapper">
  367. SELECT count(distinct spo.user_id_) value_,spo.music_group_id_ key_
  368. FROM student_payment_order_detail spod left join student_payment_order spo on spod.payment_order_id_ = spo.id_
  369. WHERE spo.music_group_id_ IN
  370. <foreach collection="musicGroupIds" item="musicGroupId" open="(" close=")" separator=",">
  371. #{musicGroupId}
  372. </foreach>
  373. AND spo.type_ = 'APPLY' and spo.status_ = 'SUCCESS' and spod.type_ = 'MUSICAL'
  374. GROUP BY spo.music_group_id_
  375. </select>
  376. <select id="queryByType" resultMap="StudentApplyInstrumentDto" parameterType="map">
  377. 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_
  378. WHERE spo.music_group_id_ = #{musicGroupId}
  379. AND spo.type_ = 'APPLY' and spo.status_ = 'SUCCESS' and spod.type_ = #{orderDetailType, typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
  380. </select>
  381. <select id="getGoodsSellPrice" resultMap="com.ym.mec.biz.dal.dao.GoodsDao.Goods">
  382. SELECT g.id_,g.goods_category_id_,g.sn_,g.name_,g.brand_,g.specification_,g.image_,g.type_,spod.price_ group_purchase_price_
  383. FROM student_payment_order_detail spod
  384. LEFT JOIN goods g ON spod.goods_id_list_ = g.id_
  385. WHERE spod.payment_order_id_ IN
  386. <foreach collection="orderIds" separator="," item="item" open="(" close=")">
  387. #{item}
  388. </foreach>
  389. AND spod.type_ = #{type}
  390. GROUP BY spod.id_
  391. </select>
  392. <select id="findByOrderId" resultMap="StudentPaymentOrderDetail">
  393. SELECT * FROM student_payment_order_detail WHERE payment_order_id_ = #{paymentOrderId}
  394. </select>
  395. <select id="findByCalenderId" resultMap="StudentPaymentOrderDetail">
  396. SELECT spod.*,spo.user_id_ FROM student_payment_order spo
  397. LEFT JOIN student_payment_order_detail spod ON spo.id_ = spod.payment_order_id_
  398. WHERE spo.id_ IN (
  399. SELECT c.id_ FROM (SELECT payment_order_id_ id_ FROM music_group_payment_calender_detail
  400. WHERE music_group_payment_calender_id_ = #{calenderId} AND payment_order_id_ IS NOT NULL
  401. UNION
  402. SELECT id_ FROM student_payment_order WHERE calender_id_ = #{calenderId} AND status_ = 'SUCCESS')c) AND spod.id_ IS NOT NULL
  403. </select>
  404. <select id="querySubjectChangeByMusicGroupId" resultMap="StudentPaymentOrderDetail">
  405. SELECT spod.*,spo.user_id_ FROM student_payment_order_detail spod
  406. LEFT JOIN student_payment_order spo ON spo.id_ = spod.payment_order_id_
  407. left join subject_change sc on sc.order_id_ = spo.id_
  408. WHERE sc.music_group_id_ = #{musicGroupId}
  409. AND spo.type_ = 'SUBJECT_CHANGE' and spo.status_ = 'SUCCESS' and spod.delivery_batch_no_ is NULL
  410. </select>
  411. <select id="getByOrderIdAndType" resultMap="StudentPaymentOrderDetail">
  412. SELECT * FROM student_payment_order_detail WHERE payment_order_id_ in
  413. <foreach collection="orderIds" item="orderId" open="(" close=")" separator=",">
  414. #{orderId}
  415. </foreach>
  416. AND type_ = #{type}
  417. </select>
  418. </mapper>