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 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("【取消订单任务开始】"); 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