|
@@ -733,4 +733,49 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</foreach>
|
|
|
</select>
|
|
|
|
|
|
+ <select id="exportNew" resultType="com.zhongzheng.modules.order.vo.OrderExportNewVo"
|
|
|
+ parameterType="com.zhongzheng.modules.order.bo.OrderExportNewBo">
|
|
|
+ SELECT
|
|
|
+ FROM_UNIXTIME( og.create_time, '%Y-%m-%d %H:%i:%s' ) AS orderTime,
|
|
|
+ u.realname AS realname,
|
|
|
+ AES_DECRYPT( UNHEX( u.id_card ), 'base20230213zzkj' ) AS idCard,
|
|
|
+ AES_DECRYPT( UNHEX( u.telphone ), 'base20230213zzkj' ) AS telphone,
|
|
|
+ u.company_name AS companyName,
|
|
|
+ m.category_name AS majorName,
|
|
|
+ g.seven_year AS goodsYear,
|
|
|
+ CASE
|
|
|
+ WHEN og.`status` = 1 THEN
|
|
|
+ '否'
|
|
|
+ WHEN og.`status` = 0 THEN
|
|
|
+ '是' ELSE '其他'
|
|
|
+ END AS orderStatus
|
|
|
+ FROM
|
|
|
+ order_goods og
|
|
|
+ LEFT JOIN `order` o ON og.order_sn = o.order_sn
|
|
|
+ LEFT JOIN `user` u ON o.user_id = u.user_id
|
|
|
+ LEFT JOIN goods g ON og.goods_id = g.goods_id
|
|
|
+ LEFT JOIN major m ON g.major_id = m.id
|
|
|
+ WHERE
|
|
|
+ og.refund_status != 2
|
|
|
+ AND og.pay_status != 1
|
|
|
+ <if test="orderSn != null and orderSn != ''">
|
|
|
+ AND o.order_sn = #{orderSn}
|
|
|
+ </if>
|
|
|
+ <if test="orderStartTime != null and orderStartTime != ''">
|
|
|
+ AND og.create_time <![CDATA[ >= ]]> #{orderStartTime}
|
|
|
+ </if>
|
|
|
+ <if test="orderEndTime != null and orderEndTime != ''">
|
|
|
+ AND og.create_time <![CDATA[ <= ]]> #{orderEndTime}
|
|
|
+ </if>
|
|
|
+ <if test="educationTypeId != null and educationTypeId != ''">
|
|
|
+ AND g.education_type_id = #{educationTypeId}
|
|
|
+ </if>
|
|
|
+ <if test="businessId != null and businessId != ''">
|
|
|
+ AND g.business_id = #{businessId}
|
|
|
+ </if>
|
|
|
+ <if test="companyName != null and companyName != ''">
|
|
|
+ AND u.company_name = #{companyName}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|