From f9ad68fceb1acc167159eb440b568e15f1e7bb3e Mon Sep 17 00:00:00 2001
From: wangting <675591594@qq.com>
Date: 星期五, 14 七月 2023 09:42:31 +0800
Subject: [PATCH] 附件列表联动
---
Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/service/impl/UserServiceImpl.java | 42 +++++++++++++++++++++++++++++++++++-------
1 files changed, 35 insertions(+), 7 deletions(-)
diff --git a/Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/service/impl/UserServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/service/impl/UserServiceImpl.java
index 7ce5654..366f031 100644
--- a/Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/service/impl/UserServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-user/src/main/java/com/vci/ubcs/system/user/service/impl/UserServiceImpl.java
@@ -45,6 +45,7 @@
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
+import org.springblade.core.secure.BladeUser;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tenant.BladeTenantProperties;
import org.springblade.core.tool.api.R;
@@ -78,13 +79,16 @@
//鎷垮埌閰嶇疆鐨勮秴绠d
@Value("${user-info.id}")
private String adminUserId;
-
+ @Value("${user-info.tenant-id}")
+ private String tenantId;
@Override
@Transactional(rollbackFor = Exception.class)
public boolean submit(User user) {
if (StringUtil.isBlank(user.getTenantId())) {
- user.setTenantId(BladeConstant.ADMIN_TENANT_ID);
+ // user.setTenantId(BladeConstant.ADMIN_TENANT_ID);
+ // 榛樿璁剧疆涓虹鐞嗙粍涓嬬殑鐢ㄦ埛
+ user.setTenantId(this.tenantId);
}
String tenantId = user.getTenantId();
//Tenant tenant = SysCache.getTenant(tenantId);
@@ -162,6 +166,13 @@
}
@Override
+ public List<User> selectAllUser(User user, Long deptId){
+ List<Long> deptIdList = SysCache.getDeptChildIds(deptId);
+ List<User> users = baseMapper.selectUserPage(user, deptIdList, (AuthUtil.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID) ? StringPool.EMPTY : AuthUtil.getTenantId()));
+ return users;
+ }
+
+ @Override
public IPage<UserVO> selectUserSearch(UserVO user, Query query) {
LambdaQueryWrapper<User> queryWrapper = Wrappers.<User>query().lambda();
String tenantId = AuthUtil.getTenantId();
@@ -206,13 +217,20 @@
@Override
public UserInfo userInfo(String tenantId, String account) {
- User user = baseMapper.getUser(tenantId, account);
+ User user = baseMapper.getUser(tenantId, account,null);
return buildUserInfo(user);
}
@Override
+ public UserInfo userInfo(String tenantId, String account,String name) {
+ User user = baseMapper.getUser(tenantId, account,name);
+ UserInfo userInfo = buildUserInfo(user);
+ return null;
+ }
+
+ @Override
public UserInfo userInfo(String tenantId, String account, UserEnum userEnum) {
- User user = baseMapper.getUser(tenantId, account);
+ User user = baseMapper.getUser(tenantId, account,null);
return buildUserInfo(user, userEnum);
}
@@ -309,6 +327,7 @@
}
//鑾峰彇鐢ㄦ埛閲囩敤鐨勫瘑鐮佺瓥鐣�
Strategy strategy = sysClient.getByUserId(userId).getData();
+ // 鍑犱箮涓嶄細鍑虹幇杩欑鎯呭喌
if(ObjectUtil.isEmpty(strategy)) {
throw new ServiceException("褰撳墠鐢ㄦ埛鏈簲鐢ㄥ瘑鐮佺瓥鐣ワ紒");
}
@@ -323,7 +342,7 @@
if(reqType>=strategy.getRequiredType()){
break;
}
- if(!Func.isEmpty(RegexUtil.findResult(regexs.get(i),newPassword1))){
+ if(RegexUtil.find(regexs.get(i),newPassword1)){
reqType++;
}
}
@@ -331,11 +350,12 @@
if(reqType<strategy.getRequiredType()){
throw new ServiceException(resException);
}
- // 鏄惁灞炰簬缁勫悎鏂瑰紡涓殑绫诲瀷
+ // 鏄惁灞炰簬缁勫悎鏂瑰紡涓殑绫诲瀷,浠ュ墠鏄瘑鐮佸繀椤绘槸鍖呭惈鍦ㄧ粍鍚堟柟寮忎腑鐨勭被鍨�
String regex = sysClient.getRegex(Arrays.asList(strategy.getCombinationIds().split(","))).getData();
regex = "^"+regex+"{"+strategy.getRequiredType()+",}$";
boolean result = RegexUtil.find(regex, newPassword1);
if(!result){
+ throw new ServiceException("瀵嗙爜涓彧鑳藉瓨鍦ㄣ��"+strategy.getCombinationNames()+"銆戜腑鍖呭惈鐨勫瓧绗︼紒");
//throw new ServiceException(resException);
}
//淇敼瀵嗙爜鍚屾椂锛屾敼鍙樼敤鎴蜂俊鎭腑鐨勫瘑鐮佷慨鏀圭姸鎬佸瓧娈�,瀵嗙爜淇敼鏃堕棿
@@ -422,6 +442,7 @@
boolean oauthTemp = userOauthService.updateById(userOauth);
return (userTemp && oauthTemp);
}
+
@Override
public boolean updatePlatform(Long userId, Integer userType, String userExt) {
if (userType.equals(UserEnum.WEB.getCategory())) {
@@ -514,8 +535,15 @@
return this.update(Wrappers.<User>lambdaUpdate().in(User::getId, userIds).set(User::getStrategyUpdateStatus,CommonConstant.IS_DEFAULT));
}
+ @Override
+ public List<UserVO> getByRoleUserList(BladeUser user, String roleName) {
+
+
+ return null;
+ }
+
/**
- * 鏃堕棿鏍煎紡杞ぉ
+ * 鏃ユ湡鏃堕棿鏍煎紡杞ぉ
* @param date
* @return
*/
--
Gitblit v1.9.3