|
@@ -1819,6 +1819,32 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
|
|
|
|
|
return msg;
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public HttpRespMsg setActiveByIds(String ids, int isActive) {
|
|
|
+ HttpRespMsg msg = new HttpRespMsg();
|
|
|
+ if (!StringUtils.isEmpty(ids)){
|
|
|
+ List<String> array = JSONArray.parseArray(ids, String.class);
|
|
|
+ if (array.size()>0){
|
|
|
+ //判断人数
|
|
|
+ String token = request.getHeader("Token");
|
|
|
+ User user = userMapper.selectById(token);
|
|
|
+ if (isActive == 1 && userMapper.selectCount(new QueryWrapper<User>()
|
|
|
+ .eq("company_id", user.getCompanyId()).eq("is_active", 1)) >=
|
|
|
+ (companyMapper.selectById(user.getCompanyId()).getStaffCountMax())) {
|
|
|
+ //msg.setError("公司人员已达上限,无法启用");
|
|
|
+ msg.setError(MessageUtils.message("register.fullError"));
|
|
|
+ } else {
|
|
|
+ userMapper.updateActiveByIds(array,isActive);
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ msg.setError(MessageUtils.message("other.peopleNull"));
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ msg.setError(MessageUtils.message("other.peopleNull"));
|
|
|
+ }
|
|
|
+ return msg;
|
|
|
+ }
|
|
|
//
|
|
|
// private String getAccessToken(String code) {
|
|
|
// String accessToken = "";
|
|
@@ -3369,7 +3395,6 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
|
|
}
|
|
|
return new HttpRespMsg();
|
|
|
}
|
|
|
-
|
|
|
public LdapContext adLogin() {
|
|
|
|
|
|
LdapContext ldapContext = null;
|