wuzhen update
This commit is contained in:
1 parent
edaf8dbacf
commit
48da578546
86 files changed
+2101
-1849
No files matched your search
+6
@@ -1,6 +1,7 @@
|
||||
package org.dromara.cw.mapper;
|
||||
|
||||
import org.dromara.cw.domain.CwProjectAuditor;
|
||||
import org.dromara.cw.domain.UserWithDeptInfo;
|
||||
import org.dromara.cw.domain.vo.CwProjectAuditorVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@@ -25,4 +26,9 @@ public interface CwProjectAuditorMapper extends BaseMapperPlus<CwProjectAuditor,
|
||||
*/
|
||||
List<CwProjectAuditorVo> selectAuditorStatistics();
|
||||
|
||||
/**
|
||||
* 查询完整的用户信息(包含部门信息)用于批量添加
|
||||
*/
|
||||
List<UserWithDeptInfo> selectUsersWithDeptInfo(@Param("userIds") List<Long> userIds);
|
||||
|
||||
}
|
||||
+4
-3
@@ -14,6 +14,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import org.dromara.cw.domain.bo.CwProjectAuditorBo;
|
||||
import org.dromara.cw.domain.vo.CwProjectAuditorVo;
|
||||
import org.dromara.cw.domain.CwProjectAuditor;
|
||||
import org.dromara.cw.domain.UserWithDeptInfo;
|
||||
import org.dromara.cw.mapper.CwProjectAuditorMapper;
|
||||
import org.dromara.cw.service.ICwProjectAuditorService;
|
||||
import org.dromara.system.service.ISysUserService;
|
||||
@@ -150,8 +151,8 @@ public class CwProjectAuditorServiceImpl implements ICwProjectAuditorService {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 1. 获取用户信息
|
||||
List<SysUserVo> users = sysUserService.selectUserByIds(userIds, null);
|
||||
// 1. 获取完整的用户信息(包含部门信息)
|
||||
List<UserWithDeptInfo> users = baseMapper.selectUsersWithDeptInfo(userIds);
|
||||
if (users.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
@@ -163,7 +164,7 @@ public class CwProjectAuditorServiceImpl implements ICwProjectAuditorService {
|
||||
|
||||
// 3. 构建新增审核人列表
|
||||
List<CwProjectAuditor> auditors = new ArrayList<>();
|
||||
for (SysUserVo user : users) {
|
||||
for (UserWithDeptInfo user : users) {
|
||||
if (!existingUserIds.contains(user.getUserId())) {
|
||||
CwProjectAuditor auditor = new CwProjectAuditor();
|
||||
auditor.setUserId(user.getUserId());
|
||||
|
||||
@@ -111,4 +111,25 @@
|
||||
and deleted = 0
|
||||
</update>
|
||||
|
||||
<!-- 查询完整的用户信息(包含部门信息)用于批量添加 -->
|
||||
<select id="selectUsersWithDeptInfo" resultType="org.dromara.cw.domain.UserWithDeptInfo">
|
||||
select
|
||||
u.user_id as userId,
|
||||
u.user_name as userName,
|
||||
u.nick_name as nickName,
|
||||
u.dept_id as deptId,
|
||||
d.dept_name as deptName,
|
||||
u.phonenumber as phonenumber,
|
||||
u.email as email,
|
||||
u.status as status
|
||||
from sys_user u
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
where u.status = '0'
|
||||
and u.user_id in
|
||||
<foreach item="userId" collection="userIds" open="(" separator="," close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
order by u.dept_id, u.user_name
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in new issue
Block a user