From 653e33b21e88a0b9055258eebd4f6063ac3bb4a5 Mon Sep 17 00:00:00 2001 From: memorylkf <312904636@qq.com> Date: Wed, 21 Jan 2026 10:38:12 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20[=E7=B3=BB=E7=BB=9F=E7=AE=A1=E7=90=86]?= =?UTF-8?q?=20=E8=8E=B7=E5=8F=96=E9=83=A8=E9=95=BF=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hxhq/business/controller/PublicController.java | 23 +++++--- .../com/hxhq/business/dto/select/BzListDto.java | 67 ++++++++++++++++++++++ .../java/com/hxhq/system/mapper/SysUserMapper.java | 7 +++ .../com/hxhq/system/service/ISysUserService.java | 7 +++ .../system/service/impl/SysUserServiceImpl.java | 5 ++ .../main/resources/mapper/system/SysUserMapper.xml | 9 +++ 6 files changed, 111 insertions(+), 7 deletions(-) create mode 100644 hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/dto/select/BzListDto.java diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/PublicController.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/PublicController.java index 3577f8c..95597ca 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/PublicController.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/PublicController.java @@ -18,6 +18,7 @@ import com.hxhq.business.service.*; import com.hxhq.common.core.constant.CacheConstants; import com.hxhq.common.core.exception.ServiceException; import com.hxhq.common.core.utils.DateUtils; +import com.hxhq.common.core.utils.StringUtils; import com.hxhq.common.core.web.controller.BaseController; import com.hxhq.common.core.web.domain.AjaxResult; import com.hxhq.common.core.web.page.TableDataInfo; @@ -25,7 +26,6 @@ import com.hxhq.common.redis.service.RedisService; import com.hxhq.common.security.annotation.RequiresPermissions; import com.hxhq.common.security.utils.SecurityUtils; import com.hxhq.system.service.ISysUserService; -import org.apache.commons.lang3.StringUtils; import org.aspectj.weaver.loadtime.Aj; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -144,19 +144,28 @@ public class PublicController extends BaseController { if (study.getStatus() != null && study.getStatus().intValue() > 0) { queryWrapper.eq("status", study.getStatus()); } - if (com.hxhq.common.core.utils.StringUtils.isNoneBlank(study.getName())) { - queryWrapper.like("s.name", study.getName()); + if (StringUtils.isNoneBlank(study.getName())) { + queryWrapper.like("name", study.getName()); } - if (com.hxhq.common.core.utils.StringUtils.isNoneBlank(study.getSn())) { - queryWrapper.like("s.sn", study.getSn()); + if (StringUtils.isNoneBlank(study.getSn())) { + queryWrapper.like("sn", study.getSn()); } - if (study.getLeader() != null && study.getLeader().longValue() > 0) { - queryWrapper.eq("leader", study.getLeader()); + if (StringUtils.isNoneBlank(study.getLeaderName())) { + queryWrapper.like("leader_name", study.getLeaderName()); } List list = studyService.list(queryWrapper); return getDataTable(list); } + /** + * 查询部长列表 + */ + @GetMapping("/bzList") + public AjaxResult bzList() + { + return AjaxResult.success(sysUserService.selectBzList()); + } + /** diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/dto/select/BzListDto.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/dto/select/BzListDto.java new file mode 100644 index 0000000..a7619f2 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/dto/select/BzListDto.java @@ -0,0 +1,67 @@ +package com.hxhq.business.dto.select; + +/** + * @author memory + */ +public class BzListDto { + /** + * 用户id + */ + private Long userId; + /** + * 登录名 + */ + private String userName; + /** + * 姓名 + */ + private String nickName; + /** + * 部门id + */ + private Long deptId; + /** + * 部门名称 + */ + private String deptName; + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getNickName() { + return nickName; + } + + public void setNickName(String nickName) { + this.nickName = nickName; + } + + public Long getDeptId() { + return deptId; + } + + public void setDeptId(Long deptId) { + this.deptId = deptId; + } + + public String getDeptName() { + return deptName; + } + + public void setDeptName(String deptName) { + this.deptName = deptName; + } +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/system/mapper/SysUserMapper.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/system/mapper/SysUserMapper.java index aa2f0b1..efa43c6 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/system/mapper/SysUserMapper.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/system/mapper/SysUserMapper.java @@ -2,6 +2,7 @@ package com.hxhq.system.mapper; import java.util.List; +import com.hxhq.business.dto.select.BzListDto; import com.hxhq.business.dto.select.DeptUserTreeDto; import org.apache.ibatis.annotations.Param; import com.hxhq.system.api.domain.SysUser; @@ -179,4 +180,10 @@ public interface SysUserMapper * @return */ List selectStudyMethodUserIdExcludeCreate(@Param("studyId") Long studyId, @Param("studySubjectId") Long studySubjectId,@Param("deptId") Long deptId,@Param("createUserId") Long createUserId); + + /** + * 获取部长列表 + * @return + */ + List selectBzList(); } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/system/service/ISysUserService.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/system/service/ISysUserService.java index 3b1da28..c15894d 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/system/service/ISysUserService.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/system/service/ISysUserService.java @@ -3,6 +3,7 @@ package com.hxhq.system.service; import java.util.List; import java.util.Map; +import com.hxhq.business.dto.select.BzListDto; import com.hxhq.business.dto.select.DeptUserTreeDto; import com.hxhq.system.api.domain.SysUser; @@ -261,4 +262,10 @@ public interface ISysUserService */ Boolean checkPassword(SysUser user,String password,Boolean needName); + /** + * 获取部长列表 + * @return + */ + List selectBzList(); + } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/system/service/impl/SysUserServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/system/service/impl/SysUserServiceImpl.java index 47f985e..7ae5041 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/system/service/impl/SysUserServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/system/service/impl/SysUserServiceImpl.java @@ -7,6 +7,7 @@ import java.util.Map; import java.util.stream.Collectors; import javax.validation.Validator; +import com.hxhq.business.dto.select.BzListDto; import com.hxhq.business.dto.select.DeptUserTreeDto; import com.hxhq.system.domain.SysPost; import com.hxhq.system.domain.SysUserPost; @@ -602,4 +603,8 @@ public class SysUserServiceImpl implements ISysUserService throw new ServiceException((needName?user.getNickName():"")+"密码错误"); } + @Override + public List selectBzList() { + return userMapper.selectBzList(); + } } diff --git a/hxhq-modules/hxhq-system/src/main/resources/mapper/system/SysUserMapper.xml b/hxhq-modules/hxhq-system/src/main/resources/mapper/system/SysUserMapper.xml index 42c607e..d7b23f3 100644 --- a/hxhq-modules/hxhq-system/src/main/resources/mapper/system/SysUserMapper.xml +++ b/hxhq-modules/hxhq-system/src/main/resources/mapper/system/SysUserMapper.xml @@ -332,4 +332,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + \ No newline at end of file