Commit 7508ef58 by 徐高华

Merge branch 'feature/订单储值' into 'master'

刷新好友

See merge request !1388
parents 9839b21c ea7cfc40
......@@ -92,6 +92,8 @@ public interface PreDealService {
*/
public int countByTaskId(String taskId, int dataType, int status);
public int countByTaskId(String taskId);
/**
* 获取任务数量
*
......
......@@ -116,6 +116,19 @@ public class PreDealServiceImpl implements PreDealService {
}
@Override
public int countByTaskId(String taskId) {
String key = taskId+"countByTaskId" ;
Object o = RedisUtil.getCache(key) ;
if(null == o) {
int count = this.preDealLogMapper.countByTaskId(taskId,-1,0) ;
RedisUtil.setCache(key,count,60*3l);
return count ;
}else {
return (int) o ;
}
}
@Override
public int countExcepAndPreByTaskId(String taskId, int dataType) {
return preDealLogMapper.countExcepAndPreByTaskId(taskId, dataType);
}
......
......@@ -459,6 +459,14 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ
return syncCheckDTO;
}
TabHaobanSyncTask syncTask = syncTaskService.getSyncTask(taskId);
int status = syncTask.getStatusFlag() ;
if(status != 4) {
int count = this.preDealService.countByTaskId(taskId) ;
if(count <= 0) {
this.syncTaskService.updateTaskStatus(taskId,4) ;
}
}
syncCheckDTO.setSyncStatus(syncTask.getStatusFlag());
PreDealLogInfoDTO dealLogInfoDTO = preDealService.getLastPreDataByTaskId(taskId);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment