From 19891ca345ef52eb8f6fb418ba3b916d37c73591 Mon Sep 17 00:00:00 2001
From: Mr.Shi <1878285526@qq.com>
Date: 星期四, 14 九月 2023 10:21:20 +0800
Subject: [PATCH] 小程序
---
server/src/main/java/doumeemes/biz/system/impl/SystemUserBizImpl.java | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/server/src/main/java/doumeemes/biz/system/impl/SystemUserBizImpl.java b/server/src/main/java/doumeemes/biz/system/impl/SystemUserBizImpl.java
index 3b1a1a6..f6ea8f1 100644
--- a/server/src/main/java/doumeemes/biz/system/impl/SystemUserBizImpl.java
+++ b/server/src/main/java/doumeemes/biz/system/impl/SystemUserBizImpl.java
@@ -166,6 +166,18 @@
if(plansList == null || plansList.size()==0){
throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(), "瀵煎叆鏁版嵁鍐呭鏈夎锛�");
}
+ //娣诲姞浼佷笟鍛樺伐鍏宠仈鍏崇郴
+ CompanyUser cuw = new CompanyUser();
+ cuw.setDeleted(Constants.ZERO);
+ cuw.setRootDepartId(user.getRootDepartment().getId());
+ Company company = companyMapper.selectById(user.getCompany().getId());
+ if(company.getOpenUserNum() > 0){
+ //浜烘暟闄愬埗杈撳叆0锛岃〃绀轰笉闄愬埗浜烘暟
+ if(companyUserExtMapper.selectCount(new QueryWrapper<>(cuw)) + plansList.size() > company.getOpenUserNum() ){
+ throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鐢ㄦ埛鏁伴噺瓒呰繃璐拱鏁伴噺锛岃鑱旂郴涓氬姟缁忕悊缁喘!");
+ }
+ }
+
CompanyPosition cp = new CompanyPosition();
cp.setDeleted(Constants.ZERO);
cp.setCompanyId(user.getCompany().getId());
--
Gitblit v1.9.3