给租户增加字段

This commit is contained in:
季圣华
2021-08-24 01:01:18 +08:00
parent 81bd163d30
commit e95a687ef3
12 changed files with 169 additions and 81 deletions

View File

@@ -313,14 +313,7 @@ public class DepotHeadController {
JSONObject result = ExceptionConstants.standardSuccess();
String beanJson = body.getInfo();
String rows = body.getRows();
Long billsNumLimit = Long.parseLong(redisService.getObjectFromSessionByKey(request,"billsNumLimit").toString());
Long count = depotHeadService.countDepotHead(null,null,null,null,null,null,null,null,null,null,null);
if(count>= billsNumLimit) {
throw new BusinessParamCheckingException(ExceptionConstants.DEPOT_HEAD_OVER_LIMIT_FAILED_CODE,
ExceptionConstants.DEPOT_HEAD_OVER_LIMIT_FAILED_MSG);
} else {
depotHeadService.addDepotHeadAndDetail(beanJson,rows, request);
}
depotHeadService.addDepotHeadAndDetail(beanJson, rows, request);
return result;
}

View File

@@ -123,10 +123,8 @@ public class UserController {
if(tenant!=null) {
Long tenantId = tenant.getTenantId();
Integer userNumLimit = tenant.getUserNumLimit();
Integer billsNumLimit = tenant.getBillsNumLimit();
if(tenantId!=null) {
redisService.storageObjectBySession(token,"userNumLimit",userNumLimit); //用户限制数
redisService.storageObjectBySession(token,"billsNumLimit",billsNumLimit); //单据限制数
}
}
}