Commit 8b8bbf58 authored by huyuchen's avatar huyuchen

缴费库推送优化

parent 2c7202f9
...@@ -418,8 +418,7 @@ public class TPaymentInfoController { ...@@ -418,8 +418,7 @@ public class TPaymentInfoController {
@SysLog("手动推送社保缴费库明细的数据") @SysLog("手动推送社保缴费库明细的数据")
@PostMapping("/pushPaymentSocialFundInfo") @PostMapping("/pushPaymentSocialFundInfo")
public R<Boolean> pushPaymentSocialFundInfo(@RequestBody TPaymentInfoSearchVo searchVo) { public R<Boolean> pushPaymentSocialFundInfo(@RequestBody TPaymentInfoSearchVo searchVo) {
tPaymentInfoService.pushPaymentSocialFundInfo(searchVo); return tPaymentInfoService.pushPaymentSocialFundInfo(searchVo);
return R.ok();
} }
/** /**
......
...@@ -149,7 +149,7 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> { ...@@ -149,7 +149,7 @@ public interface TPaymentInfoService extends IService<TPaymentInfo> {
TPaymentVo getPaymentSocialAndFound(TPaymentInfo info); TPaymentVo getPaymentSocialAndFound(TPaymentInfo info);
void pushPaymentSocialFundInfo(TPaymentInfoSearchVo searchVo); R<Boolean> pushPaymentSocialFundInfo(TPaymentInfoSearchVo searchVo);
/** /**
* 批量标识可以推送的数据 * 批量标识可以推送的数据
......
...@@ -2811,10 +2811,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2811,10 +2811,14 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
} }
@Override @Override
public void pushPaymentSocialFundInfo(TPaymentInfoSearchVo searchVo) { public R<Boolean> pushPaymentSocialFundInfo(TPaymentInfoSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
String key = user.getId() + CommonConstants.DOWN_LINE_STRING + CommonConstants.PAYMENT_SOCIAL_PUSH; String key = user.getId() + CommonConstants.DOWN_LINE_STRING + CommonConstants.PAYMENT_SOCIAL_PUSH;
redisUtil.set(key, user.getId(), 36000L); if (Common.isNotNull(redisUtil.get(key))) {
return R.failed("用户正在推送实缴数据中,禁止重复推送!");
} else {
redisUtil.set(key, user.getId(), 360L);
}
Map<String, TSettleDomainSelectVo> mapSelectVo = this.getSelectVoMap(); Map<String, TSettleDomainSelectVo> mapSelectVo = this.getSelectVoMap();
//手动推送未推送的社保公积金明细数据 //手动推送未推送的社保公积金明细数据
...@@ -2833,6 +2837,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -2833,6 +2837,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
redisUtil.remove(redisKey); redisUtil.remove(redisKey);
} }
redisUtil.remove(key); redisUtil.remove(key);
return R.ok();
} }
@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