Jelajahi Sumber

修改定时任务

Yangzw 1 bulan lalu
induk
melakukan
de4e93e7c1

+ 3 - 0
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/service/dailyawardrecords/DailyAwardRecordsServiceImpl.java

@@ -186,6 +186,9 @@ public class DailyAwardRecordsServiceImpl implements DailyAwardRecordsService {
     public void calcLucky() {
         List<DailyAwardRecordsDO> VOS = dailyAwardRecordsMapper.selectList(new LambdaQueryWrapper<DailyAwardRecordsDO>()
                 .eq(DailyAwardRecordsDO::getCalcLucky, false));
+        if(VOS == null || VOS.isEmpty()){
+            return;
+        }
 
         OrderPercentageDO orderPercentageDO = orderPercentageService.queryStatus();
         // 黄积分比例

+ 5 - 2
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/service/integral/IntegralServiceImpl.java

@@ -109,6 +109,9 @@ public class IntegralServiceImpl implements IntegralService {
 
     @Override
     public void updateBatch(List<IntegralSaveReqVO> integralSaveReqVOS) {
+        if(integralSaveReqVOS == null || integralSaveReqVOS.isEmpty()){
+            return;
+        }
         integralMapper.updateBatch(BeanUtils.toBean(integralSaveReqVOS, IntegralDO.class));
     }
     @Override
@@ -215,9 +218,9 @@ public class IntegralServiceImpl implements IntegralService {
             success = true;
 
             //用户修改后的当前可用的钱包余额
-            Long afterAmount = null;
+            Long afterAmount;
             //用户修改后的冻结积分钱包余额
-            Long afterFreezeAmount = null;
+            Long afterFreezeAmount;
 
             //查询用户修改后的积分
             Map<String, Object> map = ptProfitMapper.selectUserIntegral(userId);

+ 3 - 3
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/service/ptprofitlog/PtProfitLogServiceImpl.java

@@ -41,9 +41,6 @@ public class PtProfitLogServiceImpl implements PtProfitLogService {
     private PtProfitLogMapper ptProfitLogMapper;
     @Resource
     private MemberUserService memberUserService;
-    @Autowired
-    private MappingsEndpoint mappingsEndpoint;
-
 
     @Override
     public Long createPtProfitLog(PtProfitLogSaveReqVO createReqVO) {
@@ -98,6 +95,9 @@ public class PtProfitLogServiceImpl implements PtProfitLogService {
 
     @Override
     public void saveBatch(List<PtProfitLogSaveReqVO> ptProfitLogSaveReqVOS) {
+        if(ptProfitLogSaveReqVOS == null || ptProfitLogSaveReqVOS.isEmpty()){
+            return;
+        }
         List<PtProfitLogDO> ptProfitLog = BeanUtils.toBean(ptProfitLogSaveReqVOS, PtProfitLogDO.class);
         ptProfitLogMapper.insertBatch(ptProfitLog);
     }

+ 8 - 8
feifan-server/src/main/resources/application-prod.yaml

@@ -47,14 +47,14 @@ spring:
       primary: master
       datasource:
         master:
-          name: new-letcgo
-          url: jdbc:mysql://120.78.5.233:3306/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
+          name: new-feifan
+          url: jdbc:mysql://120.78.5.233:3307/${spring.datasource.dynamic.datasource.master.name}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
           username: root
           password: PA55W0RD
         slave: # 模拟从库,可根据自己需要修改
-          name: new-letcgo
+          name: new-feifan
           lazy: true # 开启懒加载,保证启动速度
-          url: jdbc:mysql://120.78.5.233:3306/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
+          url: jdbc:mysql://120.78.5.233:3307/${spring.datasource.dynamic.datasource.slave.name}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
           username: root
           password: PA55W0RD
 
@@ -62,8 +62,8 @@ spring:
   redis:
     host: 47.107.29.61 # 地址
     port: 6379 # 端口
-    database: 0 # 数据库索引
-#    password: 123456 # 密码,建议生产环境开启
+    database: 2 # 数据库索引
+    password: FF@QWQiopY.1 # 密码,建议生产环境开启
 
 --- #################### 定时任务相关配置 ####################
 
@@ -221,8 +221,8 @@ feifan:
       - ${spring.boot.admin.context-path}/** # 不处理 Spring Boot Admin 的请求
       - ${management.endpoints.web.base-path}/** # 不处理 Actuator 的请求
   pay:
-    order-notify-url: http://zxgz.newfeifan.cn/admin-api/pay/notify/order # 支付渠道的【支付】回调地址
-    refund-notify-url: http://zxgz.newfeifan.cn/admin-api/pay/notify/refund # 支付渠道的【退款】回调地址
+    order-notify-url: http://letcgo.com/admin-api/pay/notify/order # 支付渠道的【支付】回调地址
+    refund-notify-url: http://letcgo.com/admin-api/pay/notify/refund # 支付渠道的【退款】回调地址
   access-log: # 访问日志的配置项
     enable: false
   error-code: # 错误码相关配置项

+ 1 - 1
feifan-server/src/main/resources/application.yaml

@@ -3,7 +3,7 @@ spring:
     name: feifan-server
 
   profiles:
-    active: local
+    active: prod
 
   main:
     allow-circular-references: true # 允许循环依赖,因为项目是三层架构,无法避免这个情况。