Commit 643a93aa authored by huyuchen's avatar huyuchen

优化修改

parent 9ed179bd
...@@ -27,6 +27,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil; ...@@ -27,6 +27,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.ErrorDetailVO; import com.yifu.cloud.plus.v1.yifu.common.core.vo.ErrorDetailVO;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser; import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.MenuUtil;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog; import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner; import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils; import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
...@@ -66,6 +67,8 @@ public class TPaymentInfoController { ...@@ -66,6 +67,8 @@ public class TPaymentInfoController {
private final TPaymentInfoService tPaymentInfoService; private final TPaymentInfoService tPaymentInfoService;
private final MenuUtil menuUtil;
/** /**
* 简单分页查询 * 简单分页查询
* *
...@@ -89,6 +92,16 @@ public class TPaymentInfoController { ...@@ -89,6 +92,16 @@ 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();
menuUtil.setAuthSql(user, tPaymentInfo);
if (Common.isNotNull(tPaymentInfo.getAuthSql())) {
if (tPaymentInfo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) {
tPaymentInfo.setAuthSql(tPaymentInfo.getAuthSql().replace(CommonConstants.A_DEPT_ID, "a.SETTLE_DOMAIN"));
}
if (tPaymentInfo.getAuthSql().contains("1=2 EXISTS")) {
tPaymentInfo.setAuthSql(tPaymentInfo.getAuthSql().replace("1=2 EXISTS", "EXISTS"));
}
}
return new R<>(tPaymentInfoService.getTPaymentInfoNewPage(page, tPaymentInfo)); return new R<>(tPaymentInfoService.getTPaymentInfoNewPage(page, tPaymentInfo));
} }
...@@ -101,6 +114,16 @@ public class TPaymentInfoController { ...@@ -101,6 +114,16 @@ public class TPaymentInfoController {
@Operation(description = "简单分页查询") @Operation(description = "简单分页查询")
@GetMapping("/newPageInfo") @GetMapping("/newPageInfo")
public R<TPaymentInfoNewVo> getTPaymentInfoNewPageInfo(TPaymentInfoSearchVo tPaymentInfo) { public R<TPaymentInfoNewVo> getTPaymentInfoNewPageInfo(TPaymentInfoSearchVo tPaymentInfo) {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, tPaymentInfo);
if (Common.isNotNull(tPaymentInfo.getAuthSql())) {
if (tPaymentInfo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) {
tPaymentInfo.setAuthSql(tPaymentInfo.getAuthSql().replace(CommonConstants.A_DEPT_ID, "a.SETTLE_DOMAIN"));
}
if (tPaymentInfo.getAuthSql().contains("1=2 EXISTS")) {
tPaymentInfo.setAuthSql(tPaymentInfo.getAuthSql().replace("1=2 EXISTS", "EXISTS"));
}
}
return R.ok(tPaymentInfoService.getTPaymentInfoNewPageInfo(tPaymentInfo)); return R.ok(tPaymentInfoService.getTPaymentInfoNewPageInfo(tPaymentInfo));
} }
...@@ -313,6 +336,16 @@ public class TPaymentInfoController { ...@@ -313,6 +336,16 @@ public class TPaymentInfoController {
@PostMapping("/sumSearchExport") @PostMapping("/sumSearchExport")
@PreAuthorize("@pms.hasPermission('social_tpaymentinfo_export')") @PreAuthorize("@pms.hasPermission('social_tpaymentinfo_export')")
public void sumSearchExport(HttpServletResponse response, @RequestBody TPaymentInfoSearchVo searchVo) { public void sumSearchExport(HttpServletResponse response, @RequestBody TPaymentInfoSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
menuUtil.setAuthSql(user, searchVo);
if (Common.isNotNull(searchVo.getAuthSql())) {
if (searchVo.getAuthSql().contains(CommonConstants.A_DEPT_ID)) {
searchVo.setAuthSql(searchVo.getAuthSql().replace(CommonConstants.A_DEPT_ID, "a.SETTLE_DOMAIN"));
}
if (searchVo.getAuthSql().contains("1=2 EXISTS")) {
searchVo.setAuthSql(searchVo.getAuthSql().replace("1=2 EXISTS", "EXISTS"));
}
}
tPaymentInfoService.sumSearchExport(response, searchVo); tPaymentInfoService.sumSearchExport(response, searchVo);
} }
......
...@@ -809,6 +809,9 @@ ...@@ -809,6 +809,9 @@
AND a.SOCIAL_TOWN = '${tPaymentInfo.socialTown}' AND a.SOCIAL_TOWN = '${tPaymentInfo.socialTown}'
</if> </if>
</if> </if>
<if test="tPaymentInfo.authSql != null and tPaymentInfo.authSql.trim() != ''">
${tPaymentInfo.authSql}
</if>
<!-- 区域 默认精准查询 0 包含下级查询 1 结束 2023-03-02 fxj --> <!-- 区域 默认精准查询 0 包含下级查询 1 结束 2023-03-02 fxj -->
</if> </if>
</if> </if>
...@@ -878,6 +881,9 @@ ...@@ -878,6 +881,9 @@
AND a.FUND_TOWN = '${tPaymentInfo.socialTown}' AND a.FUND_TOWN = '${tPaymentInfo.socialTown}'
</if> </if>
</if> </if>
<if test="tPaymentInfo.authSql != null and tPaymentInfo.authSql.trim() != ''">
${tPaymentInfo.authSql}
</if>
<!-- 区域 默认精准查询 0 包含下级查询 1 结束 2023-03-02 fxj --> <!-- 区域 默认精准查询 0 包含下级查询 1 结束 2023-03-02 fxj -->
</if> </if>
</if> </if>
......
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