From 33570e66c49c06d9977f11399cdcbdbb022c44bb Mon Sep 17 00:00:00 2001 From: yanghui <2536613402@qq.com> Date: 星期二, 29 十一月 2022 15:25:21 +0800 Subject: [PATCH] Merge branch 'local_20221104' into huacheng_test --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComShopFlowerOrderDAO.xml | 56 ++++++++++++++++++++++++++++---------------------------- 1 files changed, 28 insertions(+), 28 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComShopFlowerOrderDAO.xml b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComShopFlowerOrderDAO.xml index 050baf8..dd21af2 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComShopFlowerOrderDAO.xml +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComShopFlowerOrderDAO.xml @@ -45,7 +45,7 @@ <select id="pageOrderList" resultType="com.panzhihua.common.model.vos.shop.ComShopFlowerOrderPageVO"> select id as orderId,order_no,store_id,`status`,pay_status,receiver_id,total_amount as orderTotal,pay_amount,delivery_type,remark,create_at, logistics_company, logistics_no,receiving_time from com_shop_flower_order as cso - where cso.delete_status = 1 + where cso.delete_status = 1 and cso.`status` != 0 <if test="comOrderListDTO.userId != null"> and cso.user_id = #{comOrderListDTO.userId} </if> @@ -82,7 +82,7 @@ LEFT JOIN com_shop_flower_user_address uad ON sr.receiver_id = uad.id LEFT JOIN com_convenient_merchants ss ON sr.store_id = ss.id LEFT JOIN com_convenient_elevating_point ccep on ccep.id = sr.point_id - WHERE sr.delete_status = 1 + WHERE sr.delete_status = 1 and sr.`status` != 0 <if test='pageComShopOrderSearchDTO.userId != null'> AND sr.user_id = #{pageComShopOrderSearchDTO.userId} </if> @@ -166,7 +166,7 @@ com_shop_flower_order o LEFT JOIN com_shop_flower_order_goods g ON o.id = g.order_id LEFT JOIN com_shop_flower_user_address a ON a.id = o.receiver_id - WHERE 1=1 + WHERE 1=1 and o.`status` != 0 <if test="comOrderListDTO.deliveryType != null"> and o.delivery_type = #{comOrderListDTO.deliveryType} </if> @@ -205,7 +205,7 @@ com_shop_flower_order o LEFT JOIN com_shop_flower_order_goods g ON o.id = g.order_id LEFT JOIN com_shop_flower_user_address a ON a.id = o.receiver_id - WHERE 1=1 and o.delivery_type = 1 + WHERE 1=1 and o.delivery_type = 1 and o.`status` != 0 <if test="comOrderListDTO.storeId != null"> and o.store_id = #{comOrderListDTO.storeId} </if> @@ -216,12 +216,12 @@ </select> <select id="selectCountByDeliveryType" resultType="com.panzhihua.common.model.vos.shop.ComShopOrderCountVO"> - SELECT count(1) amount , `status` FROM com_shop_flower_order WHERE delivery_type = #{deliveryType} and store_id = #{storeId} GROUP BY `status` + SELECT count(1) amount , `status` FROM com_shop_flower_order WHERE delivery_type = #{deliveryType} and store_id = #{storeId} and `status` != 0 GROUP BY `status` </select> <select id="selectCountByStoreId" resultType="com.panzhihua.common.model.vos.shop.ComShopOrderStoreIdCountVO"> - SELECT count(1) as count_num,'dayCount' as count_name FROM com_shop_flower_order WHERE TO_DAYS(create_at)=TO_DAYS(NOW()) + SELECT count(1) as count_num,'dayCount' as count_name FROM com_shop_flower_order WHERE TO_DAYS(create_at)=TO_DAYS(NOW()) and `status` != 0 <if test="storeId != null"> and store_id = #{storeId} </if> @@ -229,7 +229,7 @@ and delivery_type = #{deliveryType} </if> union all - SELECT count(1) as count_num,'monthCount' as count_name FROM com_shop_flower_order WHERE DATE_FORMAT(create_at,'%Y%m')=DATE_FORMAT(CURDATE(),'%Y%m') + SELECT count(1) as count_num,'monthCount' as count_name FROM com_shop_flower_order WHERE DATE_FORMAT(create_at,'%Y%m')=DATE_FORMAT(CURDATE(),'%Y%m') and `status` != 0 <if test="storeId != null"> and store_id = #{storeId} </if> @@ -237,7 +237,7 @@ and delivery_type = #{deliveryType} </if> union all - SELECT count(1) as count_num,'yearCount' as count_name FROM com_shop_flower_order where YEAR(create_at) =YEAR(NOW()) + SELECT count(1) as count_num,'yearCount' as count_name FROM com_shop_flower_order where YEAR(create_at) =YEAR(NOW()) and `status` != 0 <if test="storeId != null"> and store_id = #{storeId} </if> @@ -245,8 +245,8 @@ and delivery_type = #{deliveryType} </if> union all - SELECT count(1) as count_num,'allCount' as count_name FROM com_shop_flower_order WHERE 1=1 - <if test="storeId != null"> + SELECT count(1) as count_num,'allCount' as count_name FROM com_shop_flower_order WHERE `status` != 0 + <if test="storeId != null"> and store_id = #{storeId} </if> <if test="deliveryType != null"> @@ -255,23 +255,23 @@ </select> <select id="selectSumAmountByStoreId" resultType="com.panzhihua.common.model.vos.shop.ComShopOrderStoreIdNumVO"> - SELECT IFNULL(sum(pay_amount),0) as count_num,'dayAmount' as count_name FROM com_shop_flower_order WHERE TO_DAYS(create_at)=TO_DAYS(NOW()) and `status` not in (6,7) - <if test="storeId != null"> + SELECT IFNULL(sum(pay_amount),0) as count_num,'dayAmount' as count_name FROM com_shop_flower_order WHERE TO_DAYS(create_at)=TO_DAYS(NOW()) and `status` not in (6,7) and `status` != 0 + <if test="storeId != null"> and store_id = #{storeId} </if> union all - SELECT IFNULL(sum(pay_amount),0) as count_num,'monthAmount' as count_name FROM com_shop_flower_order WHERE DATE_FORMAT(create_at,'%Y%m')=DATE_FORMAT(CURDATE(),'%Y%m') and `status` not in (6,7) - <if test="storeId != null"> + SELECT IFNULL(sum(pay_amount),0) as count_num,'monthAmount' as count_name FROM com_shop_flower_order WHERE DATE_FORMAT(create_at,'%Y%m')=DATE_FORMAT(CURDATE(),'%Y%m') and `status` not in (6,7) and `status` != 0 + <if test="storeId != null"> and store_id = #{storeId} </if> union all - SELECT IFNULL(sum(pay_amount),0) as count_num,'yearAmount' as count_name FROM com_shop_flower_order where YEAR(create_at) =YEAR(NOW()) and `status` not in (6,7) - <if test="storeId != null"> + SELECT IFNULL(sum(pay_amount),0) as count_num,'yearAmount' as count_name FROM com_shop_flower_order where YEAR(create_at) =YEAR(NOW()) and `status` not in (6,7) and `status` != 0 + <if test="storeId != null"> and store_id = #{storeId} </if> union all - SELECT IFNULL(sum(pay_amount),0) as count_num,'allAmount' as count_name FROM com_shop_flower_order WHERE `status` not in (6,7) - <if test="storeId != null"> + SELECT IFNULL(sum(pay_amount),0) as count_num,'allAmount' as count_name FROM com_shop_flower_order WHERE `status` not in (6,7) and `status` != 0 + <if test="storeId != null"> and store_id = #{storeId} </if> </select> @@ -283,17 +283,17 @@ </select> <select id="selectSumOrderAndAmountByStoreId" resultType="com.panzhihua.common.model.vos.shop.ComShopOrderStoreIdNumVO"> - SELECT count(1) count_num ,'pddd' as count_name FROM `com_shop_flower_order` WHERE delivery_type =1 and delete_status = 1 and pay_status = 2 and store_id = #{storeId} + SELECT count(1) count_num ,'pddd' as count_name FROM `com_shop_flower_order` WHERE delivery_type =1 and delete_status = 1 and pay_status = 2 and store_id = #{storeId} and `status` != 0 union all - SELECT count(1) count_num ,'kddd' as count_name FROM `com_shop_flower_order` WHERE delivery_type =2 and delete_status = 1 and pay_status = 2 and store_id = #{storeId} + SELECT count(1) count_num ,'kddd' as count_name FROM `com_shop_flower_order` WHERE delivery_type =2 and delete_status = 1 and pay_status = 2 and store_id = #{storeId} and `status` != 0 union all - SELECT count(1) count_num ,'tkdd' as count_name FROM `com_shop_flower_order` WHERE delete_status = 1 and pay_status = 2 and `status` in (6,7) and store_id = #{storeId} + SELECT count(1) count_num ,'tkdd' as count_name FROM `com_shop_flower_order` WHERE delete_status = 1 and pay_status = 2 and `status` in (6,7) and store_id = #{storeId} and `status` != 0 union all - SELECT IFNULL(sum(pay_amount),0) count_num ,'yysr' as count_name FROM `com_shop_flower_order` WHERE `status` not in (6,7) and store_id = #{storeId} + SELECT IFNULL(sum(pay_amount),0) count_num ,'yysr' as count_name FROM `com_shop_flower_order` WHERE `status` not in (6,7) and store_id = #{storeId} and `status` != 0 union all - SELECT IFNULL(sum(pay_amount),0) count_num ,'tkje' as count_name FROM `com_shop_flower_order` WHERE `status` in (6,7) and store_id = #{storeId} + SELECT IFNULL(sum(pay_amount),0) count_num ,'tkje' as count_name FROM `com_shop_flower_order` WHERE `status` in (6,7) and store_id = #{storeId} and `status` != 0 union all - SELECT IFNULL(sum(pay_amount),0) count_num ,'ktxje' as count_name FROM `com_shop_flower_order` WHERE `status` in (4,5) and create_at <= date_sub(now(), INTERVAL 15 DAY) and store_id = #{storeId} + SELECT IFNULL(sum(pay_amount),0) count_num ,'ktxje' as count_name FROM `com_shop_flower_order` WHERE `status` in (4,5) and create_at <= date_sub(now(), INTERVAL 15 DAY) and store_id = #{storeId} and `status` != 0 </select> @@ -301,25 +301,25 @@ resultType="com.panzhihua.common.model.vos.shop.ComShopOrderStoreIdCountVO"> SELECT count(1) count_num, date_format(create_at,'%Y-%m-%d') as count_name FROM com_shop_flower_order WHERE date_format(create_at,'%Y-%m-%d') >= date_format(date_sub(now(), INTERVAL #{days} DAY),'%Y-%m-%d') - and store_id = #{storeId} + and store_id = #{storeId} and `status` != 0 GROUP BY count_name </select> <select id="selectCountOrderMonthByStoreId" resultType="com.panzhihua.common.model.vos.shop.ComShopOrderStoreIdCountVO"> SELECT count(1) count_num, date_format(create_at,'%Y-%m') as count_name FROM com_shop_flower_order - WHERE date_format(create_at,'%Y-%m') >= date_format(now(),'%Y-01') and store_id = #{storeId} GROUP BY count_name + WHERE date_format(create_at,'%Y-%m') >= date_format(now(),'%Y-01') and store_id = #{storeId} and `status` != 0 GROUP BY count_name </select> <select id="selectOrderSumPayDayByStoreId" resultType="com.panzhihua.common.model.vos.shop.ComShopOrderStoreIdNumVO"> SELECT IFNULL(sum(pay_amount),0) count_num, date_format(create_at,'%Y-%m-%d') as count_name FROM com_shop_flower_order WHERE date_format(create_at,'%Y-%m-%d') >= date_format(date_sub(now(), INTERVAL #{days} DAY),'%Y-%m-%d') - and store_id = #{storeId} and `status` not in (6,7) + and store_id = #{storeId} and `status` not in (6,7) and `status` != 0 GROUP BY count_name </select> <select id="selectOrderSumMonthByStoreId" resultType="com.panzhihua.common.model.vos.shop.ComShopOrderStoreIdNumVO"> SELECT IFNULL(sum(pay_amount),0) count_num, date_format(create_at,'%Y-%m') as count_name FROM com_shop_flower_order - WHERE date_format(create_at,'%Y-%m') >= date_format(now(),'%Y-01') and store_id = #{storeId} and `status` not in (6,7) GROUP BY count_name + WHERE date_format(create_at,'%Y-%m') >= date_format(now(),'%Y-01') and store_id = #{storeId} and `status` not in (6,7) and `status` != 0 GROUP BY count_name </select> -- Gitblit v1.7.1