Browse Source

feature-img-1.0:修正xxl-job日志打印方法

feature-1.0-img
Penny 3 years ago
parent
commit
aca679d7bc
  1. 4
      bnyer-services/bnyer-img/src/main/java/com/bnyer/img/task/CollectionSyncTask.java
  2. 4
      bnyer-services/bnyer-img/src/main/java/com/bnyer/img/task/CreatorProfitConfirmTypeSyncTask.java
  3. 4
      bnyer-services/bnyer-img/src/main/java/com/bnyer/img/task/DateSyncTask.java
  4. 6
      bnyer-services/bnyer-img/src/main/java/com/bnyer/img/task/LikeSyncTask.java
  5. 6
      bnyer-services/bnyer-img/src/main/java/com/bnyer/img/task/UserDownloadSyncTask.java

4
bnyer-services/bnyer-img/src/main/java/com/bnyer/img/task/CollectionSyncTask.java

@ -2,8 +2,8 @@ package com.bnyer.img.task;
import com.bnyer.img.service.TiktokCollectionService; import com.bnyer.img.service.TiktokCollectionService;
import com.xxl.job.core.biz.model.ReturnT; import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob; import com.xxl.job.core.handler.annotation.XxlJob;
import com.xxl.job.core.log.XxlJobLogger;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@ -23,7 +23,7 @@ public class CollectionSyncTask {
@XxlJob("collectionSyncTask") @XxlJob("collectionSyncTask")
public ReturnT<String> syncCollection(String param) throws Exception { public ReturnT<String> syncCollection(String param) throws Exception {
tiktokCollectionService.insertNum(); tiktokCollectionService.insertNum();
XxlJobLogger.log("{} 我执行了同步收藏记录任务", System.currentTimeMillis()); XxlJobHelper.log("{} 我执行了同步收藏记录任务", System.currentTimeMillis());
return ReturnT.SUCCESS; return ReturnT.SUCCESS;
} }
} }

4
bnyer-services/bnyer-img/src/main/java/com/bnyer/img/task/CreatorProfitConfirmTypeSyncTask.java

@ -2,8 +2,8 @@ package com.bnyer.img.task;
import com.bnyer.img.service.CreatorProfitService; import com.bnyer.img.service.CreatorProfitService;
import com.xxl.job.core.biz.model.ReturnT; import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob; import com.xxl.job.core.handler.annotation.XxlJob;
import com.xxl.job.core.log.XxlJobLogger;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@ -23,7 +23,7 @@ public class CreatorProfitConfirmTypeSyncTask {
@XxlJob("creatorProfitConfirmTypeSyncTask") @XxlJob("creatorProfitConfirmTypeSyncTask")
public ReturnT<String> syncUpdateConfirmType(String param) throws Exception { public ReturnT<String> syncUpdateConfirmType(String param) throws Exception {
creatorProfitService.batchUpdateConfirmType(); creatorProfitService.batchUpdateConfirmType();
XxlJobLogger.log("{} 我执行了批量更新艺术家收益状态任务", System.currentTimeMillis()); XxlJobHelper.log("{} 我执行了批量更新艺术家收益状态任务", System.currentTimeMillis());
return ReturnT.SUCCESS; return ReturnT.SUCCESS;
} }
} }

4
bnyer-services/bnyer-img/src/main/java/com/bnyer/img/task/DateSyncTask.java

@ -5,7 +5,7 @@ import com.bnyer.common.core.domain.BzData;
import com.bnyer.common.redis.service.RedisService; import com.bnyer.common.redis.service.RedisService;
import com.bnyer.img.service.BzDataService; import com.bnyer.img.service.BzDataService;
import com.xxl.job.core.biz.model.ReturnT; import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.log.XxlJobLogger; import com.xxl.job.core.context.XxlJobHelper;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@ -51,7 +51,7 @@ public class DateSyncTask {
// redisService.deleteObject(key + "UV"); // redisService.deleteObject(key + "UV");
} }
redisService.deleteObject("bzPage_key" + day); redisService.deleteObject("bzPage_key" + day);
XxlJobLogger.log("{} 我执行了同步pv,uv任务", System.currentTimeMillis()); XxlJobHelper.log("{} 我执行了同步pv,uv任务", System.currentTimeMillis());
return ReturnT.SUCCESS; return ReturnT.SUCCESS;
} }
} }

6
bnyer-services/bnyer-img/src/main/java/com/bnyer/img/task/LikeSyncTask.java

@ -2,8 +2,8 @@ package com.bnyer.img.task;
import com.bnyer.img.service.TiktokLikeService; import com.bnyer.img.service.TiktokLikeService;
import com.xxl.job.core.biz.model.ReturnT; import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob; import com.xxl.job.core.handler.annotation.XxlJob;
import com.xxl.job.core.log.XxlJobLogger;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@ -23,14 +23,14 @@ public class LikeSyncTask{
@XxlJob("likeSyncTask") @XxlJob("likeSyncTask")
public ReturnT<String> syncLike(String param) throws Exception { public ReturnT<String> syncLike(String param) throws Exception {
tiktokLikeService.insertRecord(); tiktokLikeService.insertRecord();
XxlJobLogger.log("{} 我执行了同步点赞记录任务", System.currentTimeMillis()); XxlJobHelper.log("{} 我执行了同步点赞记录任务", System.currentTimeMillis());
return ReturnT.SUCCESS; return ReturnT.SUCCESS;
} }
@XxlJob("likeNumSyncTask") @XxlJob("likeNumSyncTask")
public ReturnT<String> syncLikeNum(String param) throws Exception { public ReturnT<String> syncLikeNum(String param) throws Exception {
tiktokLikeService.insertNum(); tiktokLikeService.insertNum();
XxlJobLogger.log("{} 我执行了同步点赞数量任务", System.currentTimeMillis()); XxlJobHelper.log("{} 我执行了同步点赞数量任务", System.currentTimeMillis());
return ReturnT.SUCCESS; return ReturnT.SUCCESS;
} }
} }

6
bnyer-services/bnyer-img/src/main/java/com/bnyer/img/task/UserDownloadSyncTask.java

@ -2,8 +2,8 @@ package com.bnyer.img.task;
import com.bnyer.img.service.CreatorProfitService; import com.bnyer.img.service.CreatorProfitService;
import com.xxl.job.core.biz.model.ReturnT; import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob; import com.xxl.job.core.handler.annotation.XxlJob;
import com.xxl.job.core.log.XxlJobLogger;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@ -23,14 +23,14 @@ public class UserDownloadSyncTask {
@XxlJob("userDownloadSyncTask") @XxlJob("userDownloadSyncTask")
public ReturnT<String> syncUserDownload(String param) throws Exception { public ReturnT<String> syncUserDownload(String param) throws Exception {
creatorProfitService.batchDeleteUserDownloadNum(); creatorProfitService.batchDeleteUserDownloadNum();
XxlJobLogger.log("{} 我执行了批量删除昨日用户下载次数任务", System.currentTimeMillis()); XxlJobHelper.log("{} 我执行了批量删除昨日用户下载次数任务", System.currentTimeMillis());
return ReturnT.SUCCESS; return ReturnT.SUCCESS;
} }
@XxlJob("creatorDownloadSyncTask") @XxlJob("creatorDownloadSyncTask")
public ReturnT<String> syncCreatorUpload(String param) throws Exception { public ReturnT<String> syncCreatorUpload(String param) throws Exception {
creatorProfitService.batchDeleteCreatorUploadNum(); creatorProfitService.batchDeleteCreatorUploadNum();
XxlJobLogger.log("{} 我执行了批量删除昨日用户上传次数任务", System.currentTimeMillis()); XxlJobHelper.log("{} 我执行了批量删除昨日用户上传次数任务", System.currentTimeMillis());
return ReturnT.SUCCESS; return ReturnT.SUCCESS;
} }
} }

Loading…
Cancel
Save