Commit 9839b21c by 徐高华

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

刷新好友

See merge request !1387
parents 487f67f1 6d2b677b
...@@ -10,6 +10,7 @@ import com.gic.haoban.manage.api.enums.PreDealTypeEnum; ...@@ -10,6 +10,7 @@ import com.gic.haoban.manage.api.enums.PreDealTypeEnum;
import com.gic.haoban.manage.service.dao.mapper.PreDealLogMapper; import com.gic.haoban.manage.service.dao.mapper.PreDealLogMapper;
import com.gic.haoban.manage.service.entity.TabHaobanPreDealLog; import com.gic.haoban.manage.service.entity.TabHaobanPreDealLog;
import com.gic.haoban.manage.service.service.PreDealService; import com.gic.haoban.manage.service.service.PreDealService;
import com.gic.redis.data.util.RedisUtil;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
...@@ -92,8 +93,16 @@ public class PreDealServiceImpl implements PreDealService { ...@@ -92,8 +93,16 @@ public class PreDealServiceImpl implements PreDealService {
@Override @Override
public boolean checkTask(String taskId, int dataType) { public boolean checkTask(String taskId, int dataType) {
int i = preDealLogMapper.checkTask(taskId, dataType, PreDealStatusEnum.pre.getVal()); String key = taskId+"_checkTask"+dataType ;
return i == 0; Object o = RedisUtil.getCache(key) ;
if(null == o) {
int i = preDealLogMapper.checkTask(taskId, dataType, PreDealStatusEnum.pre.getVal());
boolean flag = (i==0) ;
RedisUtil.setCache(key,flag,60*3l);
return flag ;
}else {
return (boolean) o ;
}
} }
@Override @Override
...@@ -170,14 +179,30 @@ public class PreDealServiceImpl implements PreDealService { ...@@ -170,14 +179,30 @@ public class PreDealServiceImpl implements PreDealService {
@Override @Override
public boolean checkFriendTask(String taskId, int dataType) { public boolean checkFriendTask(String taskId, int dataType) {
int i = preDealLogMapper.checkTaskFriend(taskId, null, dataType); String key = taskId+"_checkFriendTask"+dataType ;
return i == 0; Object o = RedisUtil.getCache(key) ;
if(null == o) {
int i = preDealLogMapper.checkTaskFriend(taskId, null, dataType);
boolean flag = (i==0) ;
RedisUtil.setCache(key,flag,60*3l);
return flag ;
}else {
return (boolean) o ;
}
} }
@Override @Override
public boolean checkFriendTaskByPDataId(String taskId, String pDataId, int dataType) { public boolean checkFriendTaskByPDataId(String taskId, String pDataId, int dataType) {
int i = preDealLogMapper.checkTaskFriend(taskId, pDataId, dataType); String key = taskId+"_checkFriendTaskByPDataId"+dataType ;
return i == 0; Object o = RedisUtil.getCache(key) ;
if(null == o) {
int i = preDealLogMapper.checkTaskFriend(taskId, pDataId, dataType);
boolean flag = (i==0) ;
RedisUtil.setCache(key,flag,60*3l);
return flag ;
}else {
return (boolean) o ;
}
} }
@Override @Override
......
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