|
|
@@ -1,8 +1,9 @@
|
|
|
package com.jzg.organization.service.impl;
|
|
|
|
|
|
|
|
|
+import cn.hutool.core.collection.CollUtil;
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
-import com.alibaba.fastjson2.JSONObject;
|
|
|
+import cn.hutool.json.JSONUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
@@ -19,6 +20,8 @@ import com.jzg.commons.util.StringUtils;
|
|
|
import com.jzg.organization.mapper.SysOrganizationMapper;
|
|
|
import com.jzg.organization.service.SysOrganizationService;
|
|
|
import com.jzg.organization.service.SysOrganizationUserLinkService;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
@@ -28,6 +31,7 @@ import java.util.List;
|
|
|
|
|
|
@Service
|
|
|
public class SysOrganizationServiceImpl extends ServiceImpl<SysOrganizationMapper, SysOrganization> implements SysOrganizationService {
|
|
|
+ private static final Logger log = LoggerFactory.getLogger(SysOrganizationServiceImpl.class);
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
@@ -104,8 +108,15 @@ public class SysOrganizationServiceImpl extends ServiceImpl<SysOrganizationMappe
|
|
|
return HttpResult.error("所选团队、渠道、电销组不存在或以删除,请刷新");
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 删除团队、电销、渠道关联的用户
|
|
|
+ *
|
|
|
+ * @param deleteAssociatedUsers 删除所需的参数
|
|
|
+ * @author lipf
|
|
|
+ * @return HttpResult<String>
|
|
|
+ */
|
|
|
@Override
|
|
|
- public HttpResult deleteAssociatedUsers(DeleteAssociatedUsers deleteAssociatedUsers) {
|
|
|
+ public HttpResult<String> deleteAssociatedUsers(DeleteAssociatedUsers deleteAssociatedUsers) {
|
|
|
return sysOrganizationUserLinkService.deleteAssociatedUsers(deleteAssociatedUsers);
|
|
|
}
|
|
|
|
|
|
@@ -126,8 +137,19 @@ public class SysOrganizationServiceImpl extends ServiceImpl<SysOrganizationMappe
|
|
|
HttpResult.ok("删除成功") : HttpResult.error("删除失败");
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 获取团队下的人员列表分页
|
|
|
+ *
|
|
|
+ * @param sysOrganizationUserLinkQueryVo 查询参数
|
|
|
+ * @return Page<SysOrganizationUserLinkVo> 此次分页得到的满足条件的分页数据
|
|
|
+ * @author lipf 维护
|
|
|
+ * @date 2026年4月10日10:09:12
|
|
|
+ */
|
|
|
@Override
|
|
|
public Page<SysOrganizationUserLinkVo> getTeamUserPage(Page page,SysOrganizationUserLinkQueryVo sysOrganizationUserLinkQueryVo) {
|
|
|
- return baseMapper.getTeamUserPage(page,sysOrganizationUserLinkQueryVo);
|
|
|
+ log.info("获取团队下的人员列表分页. sysOrganizationUserLinkQueryVo=[{}], page=[{}]", JSONUtil.toJsonStr(sysOrganizationUserLinkQueryVo), JSONUtil.toJsonStr(page));
|
|
|
+ Page<SysOrganizationUserLinkVo> teamUserPage = baseMapper.getTeamUserPage(page, sysOrganizationUserLinkQueryVo);
|
|
|
+ log.debug("获取团队下的人员列表分页.查询出[{}]个业务员。 sysOrganizationUserLinkQueryVo=[{}], page=[{}]", CollUtil.size(teamUserPage.getRecords()), JSONUtil.toJsonStr(sysOrganizationUserLinkQueryVo), JSONUtil.toJsonStr(page));
|
|
|
+ return teamUserPage;
|
|
|
}
|
|
|
}
|