|
|
@@ -1,6 +1,7 @@
|
|
|
package com.jzg.organization.service.impl;
|
|
|
|
|
|
import cn.hutool.core.collection.CollectionUtil;
|
|
|
+import cn.hutool.json.JSONUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
@@ -29,6 +30,8 @@ import com.jzg.organization.state.listener.UserStateListener;
|
|
|
import jakarta.annotation.Resource;
|
|
|
import lombok.Setter;
|
|
|
import org.redisson.api.RedissonClient;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Qualifier;
|
|
|
@@ -44,11 +47,13 @@ import java.util.stream.Collectors;
|
|
|
/**
|
|
|
* @author Administrator
|
|
|
* @description 针对表【sys_area(省市县代码)】的数据库操作Service实现
|
|
|
- * @createDate 2023-11-15 11:23:28
|
|
|
+ * @date 2023-11-15 11:23:28
|
|
|
*/
|
|
|
@Service
|
|
|
public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements SysUserService, HistoryDataService {
|
|
|
|
|
|
+ private static final Logger log = LoggerFactory.getLogger(SysUserServiceImpl.class);
|
|
|
+
|
|
|
@Value("${minio.bucket-name}")
|
|
|
private String bucketName;
|
|
|
|
|
|
@@ -688,9 +693,17 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|
|
return userJzgInfo != null ? userJzgInfo.getId() : null;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 用户的启用/禁用/删除操作
|
|
|
+ *
|
|
|
+ * @author lipf
|
|
|
+ * @date 2026/4/10 9:25
|
|
|
+ */
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public HttpResult<Boolean> isEnableUser(IsEnableVo isEnableVo) {
|
|
|
+ log.info("业务团队下用户的启用/停用操作。isEnableVo=[{}]", JSONUtil.toJsonStr(isEnableVo));
|
|
|
+ HttpResult<Boolean> res = new HttpResult<>();
|
|
|
if (isEnableVo.getGetAll() == 1) {
|
|
|
List<SysUserJzgInfo> sysUserJzgInfoList = sysUserJzgInfoService.list();
|
|
|
for (SysUserJzgInfo sysUserJzgInfo : sysUserJzgInfoList) {
|
|
|
@@ -698,6 +711,13 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|
|
}
|
|
|
sysUserJzgInfoService.updateBatchById(sysUserJzgInfoList);
|
|
|
} else {
|
|
|
+ List<String> ids = isEnableVo.getIds();
|
|
|
+ if(CollectionUtil.isEmpty(ids)) {
|
|
|
+ log.info("勾选的用户信息为空");
|
|
|
+ res.setData(Boolean.FALSE);
|
|
|
+ res.setMsg("请勾选要操作的数据");
|
|
|
+ return res;
|
|
|
+ }
|
|
|
for (String id : isEnableVo.getIds()) {
|
|
|
SysUserJzgInfo sysUserJzgInfo = sysUserJzgInfoService.getById(id);
|
|
|
if (sysUserJzgInfo == null) {
|