|
@@ -1588,7 +1588,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</select>
|
|
</select>
|
|
|
<!-- 商城订单查询接口-->
|
|
<!-- 商城订单查询接口-->
|
|
|
<select id="selectFsStoreOrderListVO" resultType="com.fs.hisStore.vo.FsStoreOrderVO">
|
|
<select id="selectFsStoreOrderListVO" resultType="com.fs.hisStore.vo.FsStoreOrderVO">
|
|
|
- select o.id,o.order_code,o.extend_order_id,o.pay_order_id,o.bank_order_id,o.user_id,o.real_name,o.user_phone,o.user_address,o.cart_id,o.freight_price,o.total_num,o.total_price,o.total_postage,o.pay_price,o.pay_postage,o.pay_delivery,o.pay_money,o.deduction_price,o.coupon_id,o.coupon_price,o.paid,o.pay_time,o.pay_type,o.create_time,o.update_time,o.status,o.refund_status,o.refund_reason_wap_img,o.refund_reason_wap_explain,o.refund_reason_time,o.refund_reason_wap,o.refund_reason,o.refund_price,o.delivery_sn,o.delivery_name,o.delivery_type,o.delivery_id,o.gain_integral,o.use_integral,o.pay_integral,o.back_integral,o.mark,o.is_del,o.remark,o.verify_code,o.store_id,o.shipping_type,o.is_channel,o.is_remind,o.is_sys_del,o.is_prescribe,o.prescribe_id,o.company_id,o.company_user_id,o.is_package,o.package_json,o.order_type,o.package_id,o.finish_time,o.delivery_status,o.delivery_pay_status,o.delivery_time,o.delivery_pay_time,o.delivery_pay_money,o.tui_money,o.tui_money_status,o.delivery_import_time,o.tui_user_id,o.tui_user_money_status,o.order_create_type,o.store_house_code,o.dept_id,o.is_edit_money,o.customer_id,o.is_pay_remain,o.delivery_send_time,o.certificates,o.upload_time,o.item_json,o.schedule_id,o.delivery_pay_type,o.order_visit,o.service_fee,o.cycle,o.prescribe_price,o.follow_doctor_id,o.follow_time,o.user_coupon_id,o.order_medium,o.erp_phone
|
|
|
|
|
|
|
+ select DISTINCT o.id,o.order_code,o.extend_order_id,o.pay_order_id,o.bank_order_id,o.user_id,o.real_name,o.user_phone,o.user_address,o.cart_id,o.freight_price,o.total_num,o.total_price,o.total_postage,o.pay_price,o.pay_postage,o.pay_delivery,o.pay_money,o.deduction_price,o.coupon_id,o.coupon_price,o.paid,o.pay_time,o.pay_type,o.create_time,o.update_time,o.status,o.refund_status,o.refund_reason_wap_img,o.refund_reason_wap_explain,o.refund_reason_time,o.refund_reason_wap,o.refund_reason,o.refund_price,o.delivery_sn,o.delivery_name,o.delivery_type,o.delivery_id,o.gain_integral,o.use_integral,o.pay_integral,o.back_integral,o.mark,o.is_del,o.remark,o.verify_code,o.store_id,o.shipping_type,o.is_channel,o.is_remind,o.is_sys_del,o.is_prescribe,o.prescribe_id,o.company_id,o.company_user_id,o.is_package,o.package_json,o.order_type,o.package_id,o.finish_time,o.delivery_status,o.delivery_pay_status,o.delivery_time,o.delivery_pay_time,o.delivery_pay_money,o.tui_money,o.tui_money_status,o.delivery_import_time,o.tui_user_id,o.tui_user_money_status,o.order_create_type,o.store_house_code,o.dept_id,o.is_edit_money,o.customer_id,o.is_pay_remain,o.delivery_send_time,o.certificates,o.upload_time,o.item_json,o.schedule_id,o.delivery_pay_type,o.order_visit,o.service_fee,o.cycle,o.prescribe_price,o.follow_doctor_id,o.follow_time,o.user_coupon_id,o.order_medium,o.erp_phone
|
|
|
,u.phone,u.register_code,u.register_date,u.source, c.company_name ,cu.nick_name as company_user_nick_name ,cu.phonenumber as company_usere_phonenumber
|
|
,u.phone,u.register_code,u.register_date,u.source, c.company_name ,cu.nick_name as company_user_nick_name ,cu.phonenumber as company_usere_phonenumber
|
|
|
, csc.name miniProgramName,fsp.cost, fspc.cate_name,spavs.bar_code, sp_latest.bank_transaction_id as bankTransactionId
|
|
, csc.name miniProgramName,fsp.cost, fspc.cate_name,spavs.bar_code, sp_latest.bank_transaction_id as bankTransactionId
|
|
|
from fs_store_order_scrm o
|
|
from fs_store_order_scrm o
|
|
@@ -1602,7 +1602,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
left join fs_store_order_item_scrm oi on o.id = oi.order_id
|
|
left join fs_store_order_item_scrm oi on o.id = oi.order_id
|
|
|
left join fs_store_product_scrm fsp on fsp.product_id = oi.product_id
|
|
left join fs_store_product_scrm fsp on fsp.product_id = oi.product_id
|
|
|
left join fs_store_product_category_scrm fspc on fspc.cate_id = fsp.cate_id
|
|
left join fs_store_product_category_scrm fspc on fspc.cate_id = fsp.cate_id
|
|
|
- left join fs_store_product_attr_value_scrm spavs on fsp.product_id = spavs.product_id
|
|
|
|
|
|
|
+ LEFT JOIN fs_store_product_attr_value_scrm spavs
|
|
|
|
|
+ ON fsp.product_id = spavs.product_id
|
|
|
|
|
+ AND spavs.bar_code = JSON_UNQUOTE(JSON_EXTRACT(oi.json_info, '$.barCode'))
|
|
|
|
|
|
|
|
LEFT JOIN (
|
|
LEFT JOIN (
|
|
|
SELECT
|
|
SELECT
|
|
@@ -1761,6 +1763,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="maps.companyUserNickName != null and maps.companyUserNickName != ''">
|
|
<if test="maps.companyUserNickName != null and maps.companyUserNickName != ''">
|
|
|
left join company_user cu on cu.user_id=o.company_user_id
|
|
left join company_user cu on cu.user_id=o.company_user_id
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="maps.erpAccount != null and maps.erpAccount != ''">
|
|
|
|
|
+ LEFT JOIN fs_store_order_df df on df.order_id=o.id
|
|
|
|
|
+
|
|
|
|
|
+ </if>
|
|
|
<if test = "maps.productName != null and maps.productName != '' ">
|
|
<if test = "maps.productName != null and maps.productName != '' ">
|
|
|
left join fs_store_order_item_scrm oi on o.id = oi.order_id
|
|
left join fs_store_order_item_scrm oi on o.id = oi.order_id
|
|
|
left join fs_store_product_scrm fsp on fsp.product_id = oi.product_id
|
|
left join fs_store_product_scrm fsp on fsp.product_id = oi.product_id
|
|
@@ -1780,6 +1786,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="maps.appId != null and map.appId != ''">
|
|
<if test="maps.appId != null and map.appId != ''">
|
|
|
and csc.appid = #{maps.appId}
|
|
and csc.appid = #{maps.appId}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="maps.orderCodes != null and maps.orderCodes.size > 0">
|
|
|
|
|
+ and o.order_code in
|
|
|
|
|
+ <foreach collection="maps.orderCodes" item="orderCode" open="(" close=")" separator=",">
|
|
|
|
|
+ #{orderCode}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
<if test="maps.orderCode != null and maps.orderCode !=''">
|
|
<if test="maps.orderCode != null and maps.orderCode !=''">
|
|
|
and o.order_code like CONCAT('%',#{maps.orderCode},'%')
|
|
and o.order_code like CONCAT('%',#{maps.orderCode},'%')
|
|
|
</if>
|
|
</if>
|
|
@@ -1881,6 +1893,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="maps.appId != null and maps.appId != ''">
|
|
<if test="maps.appId != null and maps.appId != ''">
|
|
|
and csc.appid = #{maps.appId}
|
|
and csc.appid = #{maps.appId}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="maps.erpPhoneNumber != null and maps.erpPhoneNumber != ''">
|
|
|
|
|
+ and o.erp_phone like concat(#{maps.erpPhoneNumber},'%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="maps.erpAccount != null and maps.erpAccount != '未分拣' and maps.erpAccount != ''">
|
|
|
|
|
+ and df.login_account like #{maps.erpAccount}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="maps.erpAccount == '未分拣'">
|
|
|
|
|
+ and ( df.login_account is null or df.login_account like '')
|
|
|
|
|
+ </if>
|
|
|
</where>
|
|
</where>
|
|
|
${maps.params.dataScope}
|
|
${maps.params.dataScope}
|
|
|
<if test="maps.productName != null and maps.productName != '' ">
|
|
<if test="maps.productName != null and maps.productName != '' ">
|