From 737e389a1dbab6f6e52fb9b280df772c60f5ee13 Mon Sep 17 00:00:00 2001 From: czc Date: Tue, 27 Feb 2024 18:22:18 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E7=83=AD=E5=8D=96=E5=95=86=E5=93=81TOP10sql?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/statistics/IndexStatisticsMapper.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ruoyi-mall/src/main/resources/mapper/statistics/IndexStatisticsMapper.xml b/ruoyi-mall/src/main/resources/mapper/statistics/IndexStatisticsMapper.xml index 0acf28b..21335c8 100644 --- a/ruoyi-mall/src/main/resources/mapper/statistics/IndexStatisticsMapper.xml +++ b/ruoyi-mall/src/main/resources/mapper/statistics/IndexStatisticsMapper.xml @@ -56,7 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SELECT product_id , product_name, pic, - SUM(quantity) as total_sales + IFNULL(SUM(quantity), 0) as total_sales FROM oms_order_item item right join oms_order o on o.id=item.order_id WHERE DATE(item.create_time) between DATE(#{startDate}) AND DATE(#{endDate}) AND o.status in(1,2,3) GROUP BY product_id, product_name @@ -94,7 +94,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" product_name, pic, sp_data, - SUM(quantity) as total_sales + IFNULL(SUM(quantity), 0) as total_sales FROM oms_order_item item right join oms_order o on o.id=item.order_id WHERE DATE(item.create_time) between DATE(#{startDate}) AND DATE(#{endDate}) AND o.status in(1,2,3) GROUP BY sku_id From d5075cf0c1ed5d180ee78ed2324cd2b5bb195daa Mon Sep 17 00:00:00 2001 From: czc Date: Wed, 28 Feb 2024 09:32:21 +0800 Subject: [PATCH 2/3] =?UTF-8?q?aes=E5=8A=A0=E5=AF=86key=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-admin/src/main/resources/application-druid.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml index e784c19..78f4198 100644 --- a/ruoyi-admin/src/main/resources/application-druid.yml +++ b/ruoyi-admin/src/main/resources/application-druid.yml @@ -64,5 +64,5 @@ sms: # 腾讯专用 sdkAppId: aes: - # aes的密钥(长度需要16位) + # aes的密钥(长度只能是16或24或32位) key: 1111111111111111 From be127c7fd6b6866e7649bd984130bc70370be3c9 Mon Sep 17 00:00:00 2001 From: zccbbg Date: Wed, 28 Feb 2024 10:27:09 +0800 Subject: [PATCH 3/3] =?UTF-8?q?job=E5=8E=BB=E6=8E=89@Async=E6=B3=A8?= =?UTF-8?q?=E8=A7=A3=EF=BC=8C=E5=A2=9E=E5=8A=A0=E4=BB=BB=E5=8A=A1=E8=A7=A3?= =?UTF-8?q?=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-mall/src/main/java/com/cyl/job/OrderJob.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ruoyi-mall/src/main/java/com/cyl/job/OrderJob.java b/ruoyi-mall/src/main/java/com/cyl/job/OrderJob.java index f262824..89b4a6e 100644 --- a/ruoyi-mall/src/main/java/com/cyl/job/OrderJob.java +++ b/ruoyi-mall/src/main/java/com/cyl/job/OrderJob.java @@ -6,11 +6,9 @@ import com.cyl.h5.pojo.request.CancelOrderRequest; import com.cyl.h5.service.H5OrderService; import com.cyl.manager.oms.domain.Order; import com.cyl.manager.oms.mapper.OrderMapper; -import com.cyl.manager.oms.service.OrderService; import com.ruoyi.common.constant.Constants; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; @@ -28,7 +26,9 @@ public class OrderJob { @Autowired private OrderMapper orderMapper; - @Async + /** + * 每天的1点20分20秒执行任务 + */ @Scheduled(cron = "20 20 1 * * ?") public void cancelOrder(){ log.info("【取消订单任务开始】");