| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551 |
- <?xml version="1.0" encoding="UTF-8" ?>
- <!DOCTYPE mapper
- PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.zhongzheng.modules.top.goods.mapper.TopOldOrderMapper">
- <resultMap type="com.zhongzheng.modules.top.goods.domain.TopOldOrder" id="TopOrderResult">
- <result property="orderId" column="order_id"/>
- <result property="orderSn" column="order_sn"/>
- <result property="userId" column="user_id"/>
- <result property="orderPrice" column="order_price"/>
- <result property="orderGeneral" column="order_general"/>
- <result property="orderStatus" column="order_status"/>
- <result property="createTime" column="create_time"/>
- <result property="updateTime" column="update_time"/>
- <result property="payTime" column="pay_time"/>
- <result property="payType" column="pay_type"/>
- <result property="transid" column="transid"/>
- <result property="cancelTime" column="cancel_time"/>
- <result property="finishTime" column="finish_time"/>
- <result property="orderType" column="order_type"/>
- <result property="payPrice" column="pay_price"/>
- <result property="orderFrom" column="order_from"/>
- <result property="createUsername" column="create_username"/>
- <result property="status" column="status"/>
- <result property="createSysUserId" column="create_sys_user_id"/>
- <result property="inputOrderSn" column="input_order_sn"/>
- <result property="payStatus" column="pay_status"/>
- <result property="checkStatus" column="check_status"/>
- <result property="refundStatus" column="refund_status"/>
- <result property="creditStatus" column="credit_status"/>
- <result property="invoiceStatus" column="invoice_status"/>
- <result property="orderProfit" column="order_profit"/>
- <result property="orderCost" column="order_cost"/>
- <result property="orderRefund" column="order_refund"/>
- <result property="orderRefunded" column="order_refunded"/>
- <result property="orderUncollected" column="order_uncollected"/>
- <result property="orderReceived" column="order_received"/>
- <result property="remark" column="remark"/>
- <result property="costJson" column="cost_json"/>
- <result property="buyTime" column="buy_time"/>
- </resultMap>
- <select id="queryList" parameterType="com.zhongzheng.modules.top.goods.bo.TopOldOrderQueryBo" resultType="com.zhongzheng.modules.top.goods.vo.TopOldOrderVo">
- SELECT
- vto.*
- FROM
- ( SELECT DISTINCT order_sn
- <if test="businessFullName != null and businessFullName != '' and ((userCard == null or userCard == '') and (userName == null or userName == ''))">
- FROM `v_top_order_business` where INSTR( business_full_name,#{businessFullName} ) > 0
- </if>
- <if test="((userCard != null and userCard != '') or (userName != null and userName != '')) and (businessFullName == null or businessFullName == '')">
- FROM `v_top_order_card` where 1=1
- <if test="userCard != null and userCard != ''">
- AND user_card = #{userCard,typeHandler=com.zhongzheng.common.type.EncryptHandler}
- </if>
- <if test="userName != null and userName != ''">
- AND user_name LIKE CONCAT( '%', #{userName}, '%' )
- </if>
- </if>
- <if test="((userCard != null and userCard != '') or (userName != null and userName != '')) and businessFullName != null and businessFullName != ''">
- FROM (
- SELECT
- DISTINCT order_sn
- FROM
- ( SELECT order_sn FROM v_top_order_business WHERE INSTR( business_full_name,#{businessFullName} ) > 0 UNION ALL SELECT order_sn FROM v_top_order_card
- WHERE 1 = 1
- <if test="userCard != null and userCard != ''">
- AND user_card = #{userCard,typeHandler=com.zhongzheng.common.type.EncryptHandler}
- </if>
- <if test="userName != null and userName != ''">
- AND user_name LIKE CONCAT( '%', #{userName}, '%' )
- </if>
- ) b
- ) m
- </if>
- <if test="(userCard == null or userCard == '') and (businessFullName == null or businessFullName == '') and (userName == null or userName == '')">
- FROM (
- SELECT
- DISTINCT order_sn
- FROM
- ( SELECT order_sn FROM v_top_order_business UNION ALL SELECT order_sn FROM v_top_order_card) b
- ) m
- </if>
- ) a
- LEFT JOIN v_top_order vto ON a.order_sn = vto.order_sn
- WHERE vto.`status` in (0,1)
- <if test="checkStatus != null">
- AND vto.check_status = #{checkStatus}
- </if>
- <if test="refundStatus != null">
- AND vto.refund_status = #{refundStatus}
- </if>
- <if test="refundStatusList != null and refundStatusList.size()!=0 ">
- AND vto.refund_status in
- <foreach collection="refundStatusList" item="item" index="index" open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="creditStatus != null and creditStatus == 0">
- AND vto.order_received <![CDATA[ < ]]> vto.pay_price
- </if>
- <if test="creditStatus != null and creditStatus == 1">
- AND vto.pay_price = vto.order_received
- </if>
- <if test="finishStatus != null">
- AND vto.finish_status = #{finishStatus}
- </if>
- <if test="invoiceStatus != null and invoiceStatus != ''">
- AND vto.invoice_status = #{invoiceStatus}
- </if>
- <if test="orderOrg != null and orderOrg != ''">
- AND vto.order_org LIKE CONCAT( '%', #{orderOrg}, '%' )
- </if>
- <if test="startTime != null and startTime != ''">
- AND vto.buy_time <![CDATA[ >= ]]> #{startTime}
- </if>
- <if test="endTime != null and endTime != ''">
- AND vto.buy_time <![CDATA[ <= ]]> #{endTime}
- </if>
- <if test="checkStartTime != null and checkStartTime != ''">
- AND vto.check_time <![CDATA[ >= ]]> #{checkStartTime}
- </if>
- <if test="checkEndTime != null and checkEndTime != ''">
- AND vto.check_time <![CDATA[ <= ]]> #{checkEndTime}
- </if>
- <if test="orderSn != null and orderSn != ''">
- AND vto.order_sn = #{orderSn}
- </if>
- <if test="tenantId != null and tenantId != ''">
- AND vto.tenant_id = #{tenantId}
- </if>
- <if test="orderSnList != null and orderSnList.size()!=0 ">
- AND vto.order_sn in
- <foreach collection="orderSnList" item="item" index="index" open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="keyword != null and keyword != ''">
- AND (
- vto.order_sn LIKE CONCAT( '%', #{keyword}, '%' )
- OR vto.create_no LIKE CONCAT( '%', #{keyword}, '%' )
- OR vto.purchase_org LIKE CONCAT( '%', #{keyword}, '%' ))
- </if>
- order by vto.create_time DESC
- </select>
- <select id="queryList_COUNT" resultType="Long">
- SELECT
- ((SELECT
- COUNT( DISTINCT ot.order_sn ) AS num
- FROM
- top_old_order ot
- LEFT JOIN top_old_order_goods otg ON ot.order_sn = otg.order_sn
- WHERE
- 1 = 1 AND ot.`status` = 1
- <if test="businessFullName != null and businessFullName != ''">
- AND INSTR( otg.business_full_name , #{businessFullName} ) > 0
- </if>
- <if test="userCard != null and userCard != ''">
- AND otg.user_card = #{userCard,typeHandler=com.zhongzheng.common.type.EncryptHandler}
- </if>
- <if test="userName != null and userName != ''">
- AND otg.user_name LIKE CONCAT( '%', #{userName}, '%' )
- </if>
- <if test="checkStatus != null">
- AND ot.check_status = #{checkStatus}
- </if>
- <if test="refundStatus != null">
- AND ot.refund_status = #{refundStatus}
- </if>
- <if test="refundStatusList != null and refundStatusList.size()!=0 ">
- AND ot.refund_status in
- <foreach collection="refundStatusList" item="item" index="index" open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="orderOrg != null and orderOrg != ''">
- AND ot.order_org LIKE CONCAT( '%', #{orderOrg}, '%' )
- </if>
- <if test="checkStartTime != null and checkStartTime != ''">
- AND ot.check_time <![CDATA[ >= ]]> #{checkStartTime}
- </if>
- <if test="checkEndTime != null and checkEndTime != ''">
- AND ot.check_time <![CDATA[ <= ]]> #{checkEndTime}
- </if>
- <if test="creditStatus != null and creditStatus != '' and creditStatus == 0">
- AND ot.order_received <![CDATA[ < ]]> ot.pay_price
- </if>
- <if test="creditStatus != null and creditStatus != '' and creditStatus == 1">
- AND ot.pay_price = ot.order_received
- </if>
- <if test="invoiceStatus != null and invoiceStatus != ''">
- AND ot.invoice_status = #{invoiceStatus}
- </if>
- <if test="startTime != null and startTime != ''">
- AND ot.create_time <![CDATA[ >= ]]> #{startTime}
- </if>
- <if test="endTime != null and endTime != ''">
- AND ot.create_time <![CDATA[ <= ]]> #{endTime}
- </if>
- <if test="orderSn != null and orderSn != ''">
- AND ot.order_sn = #{orderSn}
- </if>
- <if test="finishStatus != null">
- AND ot.finish_status = #{finishStatus}
- </if>
- <if test="tenantId != null and tenantId != ''">
- AND ot.tenant_id = #{tenantId}
- </if>
- <if test="orderSnList != null and orderSnList.size()!=0 ">
- AND ot.order_sn in
- <foreach collection="orderSnList" item="item" index="index" open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="keyword != null and keyword != ''">
- AND (
- ot.order_sn LIKE CONCAT( '%', #{keyword}, '%' )
- OR ot.create_no LIKE CONCAT( '%', #{keyword}, '%' )
- OR ot.purchase_org LIKE CONCAT( '%', #{keyword}, '%' ))
- </if>
- ) + (SELECT
- COUNT( DISTINCT o.order_sn ) AS num
- FROM
- `order` o
- LEFT JOIN order_goods og ON o.order_sn = og.order_sn
- LEFT JOIN `user` u ON o.user_id = u.user_id
- WHERE
- 1 = 1 AND o.`status` IN (0,1)
- AND (
- isnull( `o`.`input_order_sn` )
- OR (
- NOT (
- `o`.`input_order_sn` IN ( SELECT `top_old_order`.`input_order_sn` FROM `top_old_order` ))))
- <if test="businessFullName != null and businessFullName != ''">
- AND (
- SELECT
- COUNT(g.goods_id)
- FROM
- goods g
- LEFT JOIN course_education_type cet ON g.education_type_id = cet.id
- LEFT JOIN course_project_type cpt ON g.project_id = cpt.id
- LEFT JOIN course_business cb ON g.business_id = cb.id
- WHERE
- og.goods_id = g.goods_id
- AND
- INSTR( CONCAT('学校业务', cet.education_name, cb.business_name, cpt.project_name),#{businessFullName}) > 0) > 0
- </if>
- <if test="userCard != null and userCard != ''">
- AND o.user_id = (SELECT user_id FROM `user` WHERE id_card = #{userCard,typeHandler=com.zhongzheng.common.type.EncryptHandler})
- </if>
- <if test="userName != null and userName != ''">
- AND u.realname LIKE CONCAT( '%', #{userName}, '%' )
- </if>
- <if test="checkStatus != null">
- AND o.check_status = #{checkStatus}
- </if>
- <if test="refundStatus != null">
- AND o.order_refund_status = #{refundStatus}
- </if>
- <if test="refundStatusList != null and refundStatusList.size()!=0 ">
- AND o.order_refund_status in
- <foreach collection="refundStatusList" item="item" index="index" open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="orderOrg != null and orderOrg != ''">
- AND 'C端云学堂' LIKE CONCAT( '%', #{orderOrg}, '%' )
- </if>
- <if test="checkStartTime != null and checkStartTime != ''">
- AND o.pay_time <![CDATA[ >= ]]> #{checkStartTime}
- </if>
- <if test="checkEndTime != null and checkEndTime != ''">
- AND o.pay_time <![CDATA[ <= ]]> #{checkEndTime}
- </if>
- <if test="creditStatus != null and creditStatus != '' and creditStatus == 0">
- AND o.order_received <![CDATA[ < ]]> o.pay_price
- </if>
- <if test="creditStatus != null and creditStatus != '' and creditStatus == 1">
- AND o.pay_price = o.order_received
- </if>
- <if test="invoiceStatus != null and invoiceStatus != ''">
- AND o.invoice_status = #{invoiceStatus}
- </if>
- <if test="finishStatus != null">
- AND o.finish_status = #{finishStatus}
- </if>
- <if test="tenantId != null and tenantId != ''">
- AND o.tenant_id = #{tenantId}
- </if>
- <if test="startTime != null and startTime != ''">
- AND o.create_time <![CDATA[ >= ]]> #{startTime}
- </if>
- <if test="startTime == null">
- AND o.create_time <![CDATA[ > ]]> #{filtrationTime}
- </if>
- <if test="endTime != null and endTime != ''">
- AND o.create_time <![CDATA[ <= ]]> #{endTime}
- </if>
- <if test="orderSn != null and orderSn != ''">
- AND o.order_sn = #{orderSn}
- </if>
- <if test="orderSnList != null and orderSnList.size()!=0 ">
- AND o.order_sn in
- <foreach collection="orderSnList" item="item" index="index" open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="keyword != null and keyword != ''">
- AND o.order_sn LIKE CONCAT( '%', #{keyword}, '%' )
- </if>
- )) as number
- </select>
- <select id="queryById" parameterType="java.lang.String" resultType="com.zhongzheng.modules.top.goods.vo.TopOldOrderVo">
- SELECT * FROM v_top_order WHERE order_sn = #{orderSn}
- </select>
- <select id="queryBusinessBySn" parameterType="java.lang.String" resultType="java.lang.String">
- SELECT DISTINCT business_name FROM v_top_order_business WHERE order_sn = #{orderSn}
- </select>
- <select id="queryByOrderSns" parameterType="java.lang.String" resultType="com.zhongzheng.modules.top.goods.vo.TopOldOrderVo">
- SELECT * FROM v_top_order WHERE 1 =1
- <if test="orderSnList != null and orderSnList.size()!=0 ">
- AND order_sn in
- <foreach collection="orderSnList" item="item" index="index" open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- </select>
- <select id="queryReceiveUnSum" parameterType="com.zhongzheng.modules.top.goods.bo.TopOldOrderQueryBo" resultType="long">
- SELECT
- IFNULL(sum(
- too.order_uncollected),0)
- FROM
- top_old_order too
- LEFT JOIN sys_tenant st ON too.tenant_id = st.tenant_id
- LEFT JOIN top_order_rec_note rn ON too.tenant_id = rn.tenant_id and too.order_sn = rn.order_sn
- where too.check_status=1 AND too.order_uncollected >0
- <if test="tenantId != null and tenantId != ''">
- AND too.tenant_id = #{tenantId}
- </if>
- <if test="startTime != null and startTime != ''">
- AND too.buy_time <![CDATA[ >= ]]> #{startTime}
- </if>
- <if test="endTime != null and endTime != ''">
- AND too.buy_time <![CDATA[ <= ]]> #{endTime}
- </if>
- <if test="keyNo != null and keyNo != ''">
- AND (st.tenant_name like concat('%', #{keyNo}, '%') or too.create_no like concat('%', #{keyNo}, '%'))
- </if>
- <if test="creditStatus != null and creditStatus != ''">
- AND too.credit_status = #{creditStatus}
- </if>
- <if test="orderSn != null and orderSn != ''">
- AND too.order_sn = #{orderSn}
- </if>
- <if test="badBill != null and badBill == 1 and badBillList != null and badBillList.size()!=0 ">
- AND
- <foreach collection="badBillList" item="item" index="index" open="(" close=")" separator="or">
- (too.check_time BETWEEN #{item.startTime} and #{item.endTime})
- </foreach>
- </if>
- <if test="badBill != null and badBill == 2 and badBillList != null and badBillList.size()!=0 ">
- AND
- <foreach collection="badBillList" item="item" index="index" open="(" close=")" separator="or">
- (too.check_time NOT BETWEEN #{item.startTime} and #{item.endTime})
- </foreach>
- </if>
- ORDER BY too.buy_time DESC
- </select>
- <select id="queryReceiveList" parameterType="com.zhongzheng.modules.top.goods.bo.TopOldOrderQueryBo" resultType="com.zhongzheng.modules.top.goods.vo.TopOldOrderVo">
- SELECT
- too.*,
- st.tenant_name,
- rn.id as note_id,
- rn.note_type,
- rn.day_time,
- rn.week_time,
- rn.month_time,
- rn.last_time
- FROM
- top_old_order too
- LEFT JOIN sys_tenant st ON too.tenant_id = st.tenant_id
- LEFT JOIN top_order_rec_note rn ON too.tenant_id = rn.tenant_id and too.order_sn = rn.order_sn
- where too.check_status=1 AND too.order_uncollected >0
- <if test="tenantId != null and tenantId != ''">
- AND too.tenant_id = #{tenantId}
- </if>
- <if test="startTime != null and startTime != ''">
- AND too.buy_time <![CDATA[ >= ]]> #{startTime}
- </if>
- <if test="endTime != null and endTime != ''">
- AND too.buy_time <![CDATA[ <= ]]> #{endTime}
- </if>
- <if test="keyNo != null and keyNo != ''">
- AND (st.tenant_name like concat('%', #{keyNo}, '%') or too.create_no like concat('%', #{keyNo}, '%'))
- </if>
- <if test="creditStatus != null and creditStatus != ''">
- AND too.credit_status = #{creditStatus}
- </if>
- <if test="orderSn != null and orderSn != ''">
- AND too.order_sn = #{orderSn}
- </if>
- <if test="badBill != null and badBill == 1 and badBillList != null and badBillList.size()!=0 ">
- AND
- <foreach collection="badBillList" item="item" index="index" open="(" close=")" separator="or">
- (too.check_time BETWEEN #{item.startTime} and #{item.endTime})
- </foreach>
- </if>
- <if test="badBill != null and badBill == 2 and badBillList != null and badBillList.size()!=0 ">
- AND
- <foreach collection="badBillList" item="item" index="index" open="(" close=")" separator="or">
- (too.check_time NOT BETWEEN #{item.startTime} and #{item.endTime})
- </foreach>
- </if>
- ORDER BY too.buy_time DESC
- </select>
- <select id="queryDivSellerList" parameterType="com.zhongzheng.modules.top.goods.bo.TopOldOrderQueryBo" resultType="com.zhongzheng.modules.top.goods.vo.TopOldOrderVo">
- SELECT
- too.*,
- st.tenant_name,
- r.role_name,
- cl.check_status as divide_check_status
- FROM
- v_top_order too
- LEFT JOIN sys_tenant st ON too.tenant_id = st.tenant_id
- LEFT JOIN top_old_order_check_log cl ON too.order_sn = cl.order_sn
- AND cl.check_sign = 1
- AND ( too.divide_model + 1 ) = cl.check_from
- LEFT JOIN top_sys_role r ON cl.role_id = r.role_id
- where 1=1 AND too.divide_model = 2
- <if test="startTime != null and startTime != ''">
- AND too.create_time <![CDATA[ >= ]]> #{startTime}
- </if>
- <if test="endTime != null and endTime != ''">
- AND too.create_time <![CDATA[ <= ]]> #{endTime}
- </if>
- <if test="keyNo != null and keyNo != ''">
- AND (too.tenant_id like concat('%', #{keyNo}, '%') or too.create_no like concat('%', #{keyNo}, '%'))
- </if>
- <if test="divideStatusList != null and divideStatusList.size()!=0 ">
- AND too.divide_status in
- <foreach collection="divideStatusList" item="item" index="index" open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="divideStatus != null and divideStatus != ''">
- AND too.divide_status = #{divideStatus}
- </if>
- <if test="roleId != null and roleId != ''">
- AND cl.role_id = #{roleId}
- </if>
- ORDER BY too.order_id DESC
- </select>
- <select id="queryTenantList" parameterType="com.zhongzheng.modules.top.goods.bo.TopOldOrderQueryBo" resultType="com.zhongzheng.modules.top.goods.vo.TopOldOrderVo">
- SELECT
- too.*,
- st.tenant_name,
- r.role_name,
- cl.check_status as divide_check_status
- FROM
- top_old_order too
- LEFT JOIN sys_tenant st ON too.tenant_id = st.tenant_id
- LEFT JOIN top_old_order_check_log cl ON too.order_sn = cl.order_sn
- AND cl.check_sign = 1
- AND ( too.divide_model + 1 ) = cl.check_from
- LEFT JOIN top_sys_role r ON cl.role_id = r.role_id
- where 1=1 AND too.divide_model = 1
- <if test="startTime != null and startTime != ''">
- AND too.create_time <![CDATA[ >= ]]> #{startTime}
- </if>
- <if test="endTime != null and endTime != ''">
- AND too.create_time <![CDATA[ <= ]]> #{endTime}
- </if>
- <if test="keyNo != null and keyNo != ''">
- AND (too.tenant_id like concat('%', #{keyNo}, '%') or too.create_no like concat('%', #{keyNo}, '%'))
- </if>
- <if test="divideStatusList != null and divideStatusList.size()!=0 ">
- AND too.divide_status in
- <foreach collection="divideStatusList" item="item" index="index" open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- <if test="divideStatus != null and divideStatus != ''">
- AND too.divide_status = #{divideStatus}
- </if>
- <if test="tenantId != null and tenantId != ''">
- AND too.tenant_id = #{tenantId}
- </if>
- <if test="roleId != null and roleId != ''">
- AND cl.role_id = #{roleId}
- </if>
- ORDER BY too.order_id DESC
- </select>
- <select id="tenantMoneyTotal" parameterType="com.zhongzheng.modules.top.goods.bo.TopOldOrderQueryBo" resultType="BigDecimal">
- SELECT
- IFNULL( SUM( too.divide_company_money ), 0 )
- FROM
- v_top_order too
- WHERE
- too.divide_model = 1
- AND too.divide_status = 5
- </select>
- <select id="tenantSellerTotal" parameterType="com.zhongzheng.modules.top.goods.bo.TopOldOrderQueryBo" resultType="BigDecimal">
- SELECT
- IFNULL( SUM( too.divide_seller_money ), 0 )
- FROM
- v_top_order too
- WHERE
- too.divide_model = 2
- AND too.divide_status = 5
- </select>
- <select id="queryListAll" resultType="com.zhongzheng.modules.top.goods.vo.TopOldOrderVo">
- SELECT * FROM v_top_order
- </select>
- <select id="getOrderBySn" parameterType="java.lang.String" resultType="com.zhongzheng.modules.top.goods.domain.TopOldOrder">
- SELECT * FROM v_top_order WHERE order_sn = #{orderSn}
- </select>
- <select id="logList" parameterType="com.zhongzheng.modules.top.financial.bo.TopOrderLogQueryBo" resultType="com.zhongzheng.modules.top.financial.vo.TopOrderLogVo">
- SELECT * FROM top_order_log WHERE order_sn = #{orderSn}
- </select>
- <select id="getRefundOrder" parameterType="java.lang.String" resultType="com.zhongzheng.modules.top.goods.vo.TopOldOrderRefundVo">
- SELECT * FROM v_top_order_refund WHERE order_sn = #{orderSn}
- </select>
- <select id="getRefundOrderByBo" parameterType="com.zhongzheng.modules.top.financial.bo.RefundOrderBo" resultType="com.zhongzheng.modules.top.goods.vo.TopOldOrderRefundVo">
- SELECT * FROM v_top_order_refund WHERE order_sn = #{orderSn} AND status = 1
- <if test="periodStatus != null and periodStatus != ''">
- AND period_status = #{periodStatus}
- </if>
- </select>
- <select id="getOrderSnByBusiness" parameterType="java.lang.String" resultType="java.lang.Long">
- SELECT DISTINCT order_sn FROM v_top_order_business WHERE INSTR(business_full_name,#{businessName}) > 0
- </select>
- </mapper>
|