fix:钱包查询bug
This commit is contained in:
1 parent
62cecbcff9
commit
efc7f1bf27
1 file changed
+16
-10
+16
-10
@@ -5,6 +5,7 @@ import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.common.data.datascope.DataScope;
|
||||
import com.bsd.pjcloud.common.data.datascope.DataScopeFuncEnum;
|
||||
import com.bsd.pjcloud.common.log.annotation.SysLog;
|
||||
import com.bsd.pjcloud.common.security.annotation.Inner;
|
||||
import com.bsd.pjcloud.common.security.service.PjcloudUser;
|
||||
@@ -191,7 +192,7 @@ public class WalletTransactionController {
|
||||
dto.setBizTypes(WalletBizEnum.getTopUpCodes());
|
||||
dto.setType(WalletTransactionDto.TYPE_INCOME);
|
||||
|
||||
DataScope dataScope = DataScope.of();
|
||||
DataScope dataScope = null;
|
||||
Long count = walletTransactionMapper.count(dto, dataScope);
|
||||
if (count > 5000) throw new RuntimeException("导出数据超出5000条,请缩小查询范围");
|
||||
|
||||
@@ -204,7 +205,8 @@ public class WalletTransactionController {
|
||||
public R<WalletTypeTotalVo> czTotal(@RequestBody WalletTransactionDto dto) {
|
||||
dto.setBizTypes(WalletBizEnum.getTopUpCodes());
|
||||
dto.setType(WalletTransactionDto.TYPE_INCOME);
|
||||
return R.ok(walletTransactionService.walletTypetotal(dto, DataScope.of()));
|
||||
DataScope dataScope = null;
|
||||
return R.ok(walletTransactionService.walletTypetotal(dto, dataScope));
|
||||
}
|
||||
|
||||
@Operation(summary = "记账扣款导出", description = "记账扣款导出")
|
||||
@@ -214,7 +216,7 @@ public class WalletTransactionController {
|
||||
dto.setBizTypes(WalletBizEnum.getTopUpCodes());
|
||||
dto.setType(WalletTransactionDto.TYPE_EXPENSE);
|
||||
|
||||
DataScope dataScope = DataScope.of();
|
||||
DataScope dataScope = null;
|
||||
Long count = walletTransactionMapper.count(dto, dataScope);
|
||||
if (count > 5000) throw new RuntimeException("导出数据超出5000条,请缩小查询范围");
|
||||
|
||||
@@ -227,7 +229,8 @@ public class WalletTransactionController {
|
||||
public R<WalletTypeTotalVo> jzTotal(@RequestBody WalletTransactionDto dto) {
|
||||
dto.setBizTypes(WalletBizEnum.getTopUpCodes());
|
||||
dto.setType(WalletTransactionDto.TYPE_EXPENSE);
|
||||
return R.ok(walletTransactionService.walletTypetotal(dto, DataScope.of()));
|
||||
DataScope dataScope = null;
|
||||
return R.ok(walletTransactionService.walletTypetotal(dto, dataScope));
|
||||
}
|
||||
|
||||
|
||||
@@ -237,7 +240,7 @@ public class WalletTransactionController {
|
||||
public void exportXf(HttpServletResponse response, @RequestBody WalletTransactionDto dto) {
|
||||
dto.setBizTypes(List.of(WalletBizEnum.PAYMENT.getCode()));
|
||||
|
||||
DataScope dataScope = DataScope.of();
|
||||
DataScope dataScope = null;
|
||||
Long count = walletTransactionMapper.count(dto, dataScope);
|
||||
if (count > 5000) throw new RuntimeException("导出数据超出5000条,请缩小查询范围");
|
||||
|
||||
@@ -249,7 +252,8 @@ public class WalletTransactionController {
|
||||
@PostMapping("/xf-total")
|
||||
public R<WalletTypeTotalVo> xfTotal(@RequestBody WalletTransactionDto dto) {
|
||||
dto.setBizTypes(List.of(WalletBizEnum.PAYMENT.getCode()));
|
||||
return R.ok(walletTransactionService.walletTypetotal(dto, DataScope.of()));
|
||||
DataScope dataScope = null;
|
||||
return R.ok(walletTransactionService.walletTypetotal(dto, dataScope));
|
||||
}
|
||||
|
||||
@Operation(summary = "退款导出", description = "退款导出")
|
||||
@@ -259,7 +263,7 @@ public class WalletTransactionController {
|
||||
dto.setBizTypes(List.of(WalletBizEnum.REFUND.getCode()));
|
||||
dto.setIsFindOrder(true);
|
||||
|
||||
DataScope dataScope = DataScope.of();
|
||||
DataScope dataScope = null;
|
||||
Long count = walletTransactionMapper.count(dto, dataScope);
|
||||
if (count > 5000) throw new RuntimeException("导出数据超出5000条,请缩小查询范围");
|
||||
|
||||
@@ -272,7 +276,8 @@ public class WalletTransactionController {
|
||||
public R<WalletTypeTotalVo> tkTotal(@RequestBody WalletTransactionDto dto) {
|
||||
dto.setBizTypes(List.of(WalletBizEnum.REFUND.getCode()));
|
||||
dto.setIsFindOrder(true);
|
||||
return R.ok(walletTransactionService.walletTypetotal(dto, DataScope.of()));
|
||||
DataScope dataScope = null;
|
||||
return R.ok(walletTransactionService.walletTypetotal(dto, dataScope));
|
||||
}
|
||||
|
||||
@Operation(summary = "后台退还各自食堂记录导出", description = "后台退还各自食堂记录导出")
|
||||
@@ -282,7 +287,7 @@ public class WalletTransactionController {
|
||||
dto.setBizTypes(List.of(WalletBizEnum.RETURN_CANTEEN.getCode()));
|
||||
dto.setIsFindOrder(false);
|
||||
|
||||
DataScope dataScope = DataScope.of();
|
||||
DataScope dataScope = null;
|
||||
Long count = walletTransactionMapper.count(dto, dataScope);
|
||||
if (count > 5000) throw new RuntimeException("导出数据超出5000条,请缩小查询范围");
|
||||
|
||||
@@ -295,7 +300,8 @@ public class WalletTransactionController {
|
||||
public R<WalletTypeTotalVo> thTotal(@RequestBody WalletTransactionDto dto) {
|
||||
dto.setBizTypes(List.of(WalletBizEnum.RETURN_CANTEEN.getCode()));
|
||||
dto.setIsFindOrder(false);
|
||||
return R.ok(walletTransactionService.walletTypetotal(dto, DataScope.of()));
|
||||
DataScope dataScope = null;
|
||||
return R.ok(walletTransactionService.walletTypetotal(dto, dataScope));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user