Commit 2fdf4328 authored by fangxinjiang's avatar fangxinjiang

实缴查询优化-fxj

parent 0dff6e7b
...@@ -83,8 +83,12 @@ public class TPaymentInfoController { ...@@ -83,8 +83,12 @@ public class TPaymentInfoController {
@Operation(description = "简单分页查询") @Operation(description = "简单分页查询")
@GetMapping("/page") @GetMapping("/page")
public R<IPage<TPaymentInfo>> getTPaymentInfoPage(Page<TPaymentInfo> page, TPaymentInfoSearchVo tPaymentInfo) { public R<IPage<TPaymentInfo>> getTPaymentInfoPage(Page<TPaymentInfo> page, TPaymentInfoSearchVo tPaymentInfo) {
YifuUser user = SecurityUtils.getUser();
if (Common.isEmpty(user)){
return R.failed(CommonConstants.USER_FAIL);
}
// 获取redis分布式事务锁 // 获取redis分布式事务锁
String key = CacheConstants.PAYMENT_SEARCH_REPEAT + CommonConstants.DOWN_LINE_STRING; String key = CacheConstants.PAYMENT_SEARCH_REPEAT + CommonConstants.DOWN_LINE_STRING + user.getId();
String requestId; String requestId;
try { try {
requestId = RedisDistributedLock.getLock(key,"10"); requestId = RedisDistributedLock.getLock(key,"10");
...@@ -115,8 +119,12 @@ public class TPaymentInfoController { ...@@ -115,8 +119,12 @@ public class TPaymentInfoController {
@Operation(description = "简单分页查询") @Operation(description = "简单分页查询")
@GetMapping("/newPage") @GetMapping("/newPage")
public R<IPage<TPaymentInfoNewVo>> getTPaymentInfoNewPage(Page<TPaymentInfo> page, TPaymentInfoSearchVo tPaymentInfo) { public R<IPage<TPaymentInfoNewVo>> getTPaymentInfoNewPage(Page<TPaymentInfo> page, TPaymentInfoSearchVo tPaymentInfo) {
YifuUser user = SecurityUtils.getUser();
if (Common.isEmpty(user)){
return R.failed(CommonConstants.USER_FAIL);
}
// 获取redis分布式事务锁 // 获取redis分布式事务锁
String key = CacheConstants.PAYMENT_SEARCH_REPEAT + CommonConstants.DOWN_LINE_STRING; String key = CacheConstants.PAYMENT_SEARCH_REPEAT + CommonConstants.DOWN_LINE_STRING + user.getId();
String requestId; String requestId;
try { try {
requestId = RedisDistributedLock.getLock(key,"10"); requestId = RedisDistributedLock.getLock(key,"10");
...@@ -126,7 +134,6 @@ public class TPaymentInfoController { ...@@ -126,7 +134,6 @@ public class TPaymentInfoController {
try { try {
if (Common.isNotNull(requestId)) { if (Common.isNotNull(requestId)) {
//查询数据 //查询数据
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, tPaymentInfo); menuUtil.setAuthSql(user, tPaymentInfo);
if (Common.isNotNull(tPaymentInfo.getAuthSql())) { if (Common.isNotNull(tPaymentInfo.getAuthSql())) {
if (tPaymentInfo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) { if (tPaymentInfo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) {
...@@ -367,8 +374,12 @@ public class TPaymentInfoController { ...@@ -367,8 +374,12 @@ public class TPaymentInfoController {
@Operation(description = "导出缴费库检测 ") @Operation(description = "导出缴费库检测 ")
@PostMapping("/exportCheck") @PostMapping("/exportCheck")
public R<Integer> exportCheck(HttpServletResponse response, @RequestBody TPaymentInfoSearchVo searchVo) { public R<Integer> exportCheck(HttpServletResponse response, @RequestBody TPaymentInfoSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
if (Common.isEmpty(user)){
return R.failed(CommonConstants.USER_FAIL);
}
// 获取redis分布式事务锁 // 获取redis分布式事务锁
String key = CacheConstants.PAYMENT_EXPORT_REPEAT + CommonConstants.DOWN_LINE_STRING; String key = CacheConstants.PAYMENT_EXPORT_REPEAT + CommonConstants.DOWN_LINE_STRING + user.getId();
String requestId; String requestId;
try { try {
requestId = RedisDistributedLock.getLock(key,"10"); requestId = RedisDistributedLock.getLock(key,"10");
...@@ -414,8 +425,12 @@ public class TPaymentInfoController { ...@@ -414,8 +425,12 @@ public class TPaymentInfoController {
@Operation(description = "合并导出缴费库检测") @Operation(description = "合并导出缴费库检测")
@PostMapping("/sumExportCheck") @PostMapping("/sumExportCheck")
public R<Integer> sumExportCheck(HttpServletResponse response, @RequestBody TPaymentInfoSearchVo searchVo) { public R<Integer> sumExportCheck(HttpServletResponse response, @RequestBody TPaymentInfoSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
if (Common.isEmpty(user)){
return R.failed(CommonConstants.USER_FAIL);
}
// 获取redis分布式事务锁 // 获取redis分布式事务锁
String key = CacheConstants.PAYMENT_EXPORT_REPEAT + CommonConstants.DOWN_LINE_STRING; String key = CacheConstants.PAYMENT_EXPORT_REPEAT + CommonConstants.DOWN_LINE_STRING+user.getId();
String requestId; String requestId;
try { try {
requestId = RedisDistributedLock.getLock(key,"10"); requestId = RedisDistributedLock.getLock(key,"10");
...@@ -471,8 +486,12 @@ public class TPaymentInfoController { ...@@ -471,8 +486,12 @@ public class TPaymentInfoController {
@PostMapping("/sumSearchExportCheck") @PostMapping("/sumSearchExportCheck")
@SysLog("实缴查询列表合并导出检测") @SysLog("实缴查询列表合并导出检测")
public R<Integer> sumSearchExportCheck(HttpServletResponse response, @RequestBody TPaymentInfoSearchVo searchVo) { public R<Integer> sumSearchExportCheck(HttpServletResponse response, @RequestBody TPaymentInfoSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
if (Common.isEmpty(user)){
return R.failed(CommonConstants.USER_FAIL);
}
// 获取redis分布式事务锁 // 获取redis分布式事务锁
String key = CacheConstants.PAYMENT_EXPORT_REPEAT + CommonConstants.DOWN_LINE_STRING; String key = CacheConstants.PAYMENT_EXPORT_REPEAT + CommonConstants.DOWN_LINE_STRING + user.getId();
String requestId; String requestId;
try { try {
requestId = RedisDistributedLock.getLock(key,"10"); requestId = RedisDistributedLock.getLock(key,"10");
...@@ -482,7 +501,6 @@ public class TPaymentInfoController { ...@@ -482,7 +501,6 @@ public class TPaymentInfoController {
try { try {
if (Common.isNotNull(requestId)) { if (Common.isNotNull(requestId)) {
//查询数据 //查询数据
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, searchVo); menuUtil.setAuthSql(user, searchVo);
if (Common.isNotNull(searchVo.getAuthSql())) { if (Common.isNotNull(searchVo.getAuthSql())) {
if (searchVo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) { if (searchVo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) {
......
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