Przeglądaj źródła

fixed 定时任务脚本完善

fushengqian 1 rok temu
rodzic
commit
46c44d104c

+ 3 - 3
fuint-application/src/main/java/com/fuint/common/service/impl/CartServiceImpl.java

@@ -41,8 +41,8 @@ public class CartServiceImpl extends ServiceImpl<MtCartMapper, MtCart> implement
     /**
      * 切换购物车给会员
      *
-     * @param userId
-     * @param cartIds
+     * @param userId 会员ID
+     * @param cartIds 购物车ID
      * @return
      * */
     @Override
@@ -69,7 +69,7 @@ public class CartServiceImpl extends ServiceImpl<MtCartMapper, MtCart> implement
     /**
      * 保存购物车
      *
-     * @param  reqDto
+     * @param  reqDto 购物车参数
      * @throws BusinessCheckException
      * @return
      */

+ 1 - 1
fuint-application/src/main/java/com/fuint/module/clientApi/controller/ClientCartController.java

@@ -97,7 +97,7 @@ public class ClientCartController extends BaseController {
         if (mtUser == null) {
             AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
             if (accountInfo != null) {
-                return getFailureResult(201, "请先将该账号关联店铺员工");
+                return getFailureResult(201, "该管理员还未关联店铺员工");
             }
             return getFailureResult(1001);
         }

+ 1 - 1
fuint-application/src/main/java/com/fuint/module/schedule/CommissionJob.java

@@ -60,7 +60,7 @@ public class CommissionJob {
     @Transactional(rollbackFor = Exception.class)
     public void dealOrder() throws BusinessCheckException {
         String theSwitch = environment.getProperty("commission.job.switch");
-         if (theSwitch.equals("1")) {
+         if (theSwitch != null && theSwitch.equals("1")) {
              logger.info("CommissionJobStart!!!");
              Map<String, Object> param = new HashMap<>();
              param.put("PAY_STATUS", PayStatusEnum.SUCCESS.getKey());

+ 1 - 1
fuint-application/src/main/java/com/fuint/module/schedule/CouponExpireJob.java

@@ -73,7 +73,7 @@ public class CouponExpireJob {
     @Transactional(rollbackFor = Exception.class)
     public void dealCoupon() throws BusinessCheckException {
         String theSwitch = environment.getProperty("couponExpire.job.switch");
-        if (theSwitch.equals("1")) {
+        if (theSwitch != null && theSwitch.equals("1")) {
             logger.info("CouponExpireJobJobStart!!!");
 
             // 获取3天内到期的会员卡券

+ 1 - 1
fuint-application/src/main/java/com/fuint/module/schedule/MessageJob.java

@@ -52,7 +52,7 @@ public class MessageJob {
     @Transactional(rollbackFor = Exception.class)
     public void dealMessage() throws BusinessCheckException {
         String theSwitch = environment.getProperty("message.job.switch");
-        if (theSwitch.equals("1")) {
+        if (theSwitch != null && theSwitch.equals("1")) {
             logger.info("MessageJobStart!!!");
             List<MtMessage> dataList = messageService.getNeedSendList();
             if (dataList.size() > 0) {

+ 1 - 1
fuint-application/src/main/java/com/fuint/module/schedule/OrderCancelJob.java

@@ -55,7 +55,7 @@ public class OrderCancelJob {
     @Transactional(rollbackFor = Exception.class)
     public void dealOrder() throws BusinessCheckException {
         String theSwitch = environment.getProperty("orderCancel.job.switch");
-         if (theSwitch.equals("1")) {
+         if (theSwitch != null && theSwitch.equals("1")) {
             logger.info("OrderCancelJobStart!!!");
             Map<String, Object> param = new HashMap<>();
             param.put("status", OrderStatusEnum.CREATED.getKey());