用户管理及下拉选查询接口开发

This commit is contained in:
haozq 2025-12-10 10:50:43 +08:00
parent 4bd1350bb2
commit 78f354ed7c
7 changed files with 211 additions and 66 deletions

View File

@ -6,7 +6,12 @@
<component name="ChangeListManager">
<list default="true" id="30706c6d-35cd-44ba-b6ec-9865ccea7a75" name="Changes" comment="用户管理及下拉选查询接口开发">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/HnRealNameBmw/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/HnRealNameBmw/pom.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/hn-czl-service/src/main/java/com/bonus/hn/bearing/capacity/backstage/manager/service/UserService.java" beforeDir="false" afterPath="$PROJECT_DIR$/hn-czl-service/src/main/java/com/bonus/hn/bearing/capacity/backstage/manager/service/UserService.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/hn-czl-service/src/main/java/com/bonus/hn/bearing/capacity/backstage/manager/service/impl/UserServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/hn-czl-service/src/main/java/com/bonus/hn/bearing/capacity/backstage/manager/service/impl/UserServiceImpl.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/hn-ldlz/ldlz-admin/src/main/java/com/bns/ldlz/controller/PublicLoginController.java" beforeDir="false" afterPath="$PROJECT_DIR$/hn-ldlz/ldlz-admin/src/main/java/com/bns/ldlz/controller/PublicLoginController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/hn-ldlz/ldlz-common/src/main/java/com/bns/common/core/domain/entity/SysDept.java" beforeDir="false" afterPath="$PROJECT_DIR$/hn-ldlz/ldlz-common/src/main/java/com/bns/common/core/domain/entity/SysDept.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/hn-ldlz/ldlz-system/src/main/java/com/bns/system/service/ISysDeptService.java" beforeDir="false" afterPath="$PROJECT_DIR$/hn-ldlz/ldlz-system/src/main/java/com/bns/system/service/ISysDeptService.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/hn-ldlz/ldlz-system/src/main/java/com/bns/system/service/impl/SysDeptServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/hn-ldlz/ldlz-system/src/main/java/com/bns/system/service/impl/SysDeptServiceImpl.java" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -41,44 +46,45 @@
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">{
&quot;keyToString&quot;: {
&quot;Maven.HnRealNameBmw [clean].executor&quot;: &quot;Run&quot;,
&quot;Maven.HnRealNameBmw [install].executor&quot;: &quot;Run&quot;,
&quot;Maven.ldlz [clean].executor&quot;: &quot;Run&quot;,
&quot;Maven.ldlz [install].executor&quot;: &quot;Run&quot;,
&quot;Maven.realname-app [clean].executor&quot;: &quot;Run&quot;,
&quot;Maven.realname-app [install].executor&quot;: &quot;Run&quot;,
&quot;RequestMappingsPanelOrder0&quot;: &quot;0&quot;,
&quot;RequestMappingsPanelOrder1&quot;: &quot;1&quot;,
&quot;RequestMappingsPanelWidth0&quot;: &quot;75&quot;,
&quot;RequestMappingsPanelWidth1&quot;: &quot;75&quot;,
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
&quot;RunOnceActivity.git.unshallow&quot;: &quot;true&quot;,
&quot;SONARLINT_PRECOMMIT_ANALYSIS&quot;: &quot;true&quot;,
&quot;Spring Boot.BonusGatewayApplication.executor&quot;: &quot;Debug&quot;,
&quot;Spring Boot.CzlScreenApplication.executor&quot;: &quot;Debug&quot;,
&quot;Spring Boot.CzlServiceApplication.executor&quot;: &quot;Debug&quot;,
&quot;Spring Boot.HnRealNameBmwApplication.executor&quot;: &quot;Debug&quot;,
&quot;Spring Boot.LdlzApplication.executor&quot;: &quot;Debug&quot;,
&quot;Spring Boot.RnamaApplication.executor&quot;: &quot;Run&quot;,
&quot;Spring Boot.RnmwApplication.executor&quot;: &quot;Debug&quot;,
&quot;git-widget-placeholder&quot;: &quot;main&quot;,
&quot;kotlin-language-version-configured&quot;: &quot;true&quot;,
&quot;last_opened_file_path&quot;: &quot;F:/workspace/idea/hn_cloud_service/hn-ldlz/ldlz-admin/src/main/resources/mapper/ldlz/slave&quot;,
&quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
&quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
&quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
&quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
&quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
&quot;project.structure.last.edited&quot;: &quot;Project&quot;,
&quot;project.structure.proportion&quot;: &quot;0.0&quot;,
&quot;project.structure.side.proportion&quot;: &quot;0.43843496&quot;,
&quot;run.configurations.included.in.services&quot;: &quot;true&quot;,
&quot;settings.editor.selected.configurable&quot;: &quot;MavenSettings&quot;,
&quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
<component name="PropertiesComponent"><![CDATA[{
"keyToString": {
"Maven.HnRealNameBmw [clean].executor": "Run",
"Maven.HnRealNameBmw [install].executor": "Run",
"Maven.ldlz [clean].executor": "Run",
"Maven.ldlz [install].executor": "Run",
"Maven.realname-app [clean].executor": "Run",
"Maven.realname-app [install].executor": "Run",
"RequestMappingsPanelOrder0": "0",
"RequestMappingsPanelOrder1": "1",
"RequestMappingsPanelWidth0": "75",
"RequestMappingsPanelWidth1": "75",
"RunOnceActivity.ShowReadmeOnStart": "true",
"RunOnceActivity.git.unshallow": "true",
"SONARLINT_PRECOMMIT_ANALYSIS": "true",
"Spring Boot.BonusGatewayApplication.executor": "Run",
"Spring Boot.CzlScreenApplication.executor": "Debug",
"Spring Boot.CzlServiceApplication.executor": "Debug",
"Spring Boot.HnRealNameBmwApplication.executor": "Run",
"Spring Boot.LdlzApplication.executor": "Debug",
"Spring Boot.RealNameAppApplication.executor": "Debug",
"Spring Boot.RnamaApplication.executor": "Run",
"Spring Boot.RnmwApplication.executor": "Debug",
"git-widget-placeholder": "main",
"kotlin-language-version-configured": "true",
"last_opened_file_path": "F:/workspace/idea/hn_cloud_service/hn-ldlz/ldlz-admin/src/main/resources/mapper/ldlz/slave",
"node.js.detected.package.eslint": "true",
"node.js.detected.package.tslint": "true",
"node.js.selected.package.eslint": "(autodetect)",
"node.js.selected.package.tslint": "(autodetect)",
"nodejs_package_manager_path": "npm",
"project.structure.last.edited": "Project",
"project.structure.proportion": "0.0",
"project.structure.side.proportion": "0.43843496",
"run.configurations.included.in.services": "true",
"settings.editor.selected.configurable": "MavenSettings",
"vue.rearranger.settings.migration": "true"
}
}</component>
}]]></component>
<component name="ReactorSettings">
<option name="notificationShown" value="true" />
</component>
@ -111,61 +117,85 @@
</set>
</option>
</component>
<component name="RunManager" selected="Spring Boot.LdlzApplication">
<configuration name="BonusGatewayApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" nameIsGenerated="true">
<component name="RunManager" selected="Spring Boot.CzlScreenApplication">
<configuration name="BonusGatewayApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" temporary="true" nameIsGenerated="true">
<module name="bonus-gateway" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.bonus.gateway.BonusGatewayApplication" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="com.bonus.gateway.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="CzlScreenApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" nameIsGenerated="true">
<configuration name="CzlScreenApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" temporary="true" nameIsGenerated="true">
<option name="FRAME_DEACTIVATION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<module name="hn_czl_screen" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.bonus.hn.bearing.capacity.screen.CzlScreenApplication" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="com.bonus.hn.bearing.capacity.screen.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="CzlServiceApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" nameIsGenerated="true">
<configuration name="CzlServiceApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" temporary="true" nameIsGenerated="true">
<option name="FRAME_DEACTIVATION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<module name="hn-czl-service" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.bonus.hn.bearing.capacity.backstage.CzlServiceApplication" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="com.bonus.hn.bearing.capacity.backstage.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="HnRealNameBmwApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" nameIsGenerated="true">
<option name="FRAME_DEACTIVATION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<module name="HnRealNameBmw" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.bonus.hnrn.rnbmw.HnRealNameBmwApplication" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="LdlzApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" nameIsGenerated="true">
<configuration name="LdlzApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" temporary="true" nameIsGenerated="true">
<option name="FRAME_DEACTIVATION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<module name="ldlz-admin" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.bns.LdlzApplication" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="com.bns.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="RealNameAppApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" nameIsGenerated="true">
<module name="realname-app" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.bonus.hnrn.rnama.RealNameAppApplication" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="RnmwApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" nameIsGenerated="true">
<configuration name="RnmwApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" temporary="true" nameIsGenerated="true">
<option name="FRAME_DEACTIVATION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<module name="HnRealNameMmw" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.bonus.hnrn.rnmw.RnmwApplication" />
<extension name="coverage">
<pattern>
<option name="PATTERN" value="com.bonus.hnrn.rnmw.*" />
<option name="ENABLED" value="true" />
</pattern>
</extension>
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<recent_temporary>
<list>
<item itemvalue="Spring Boot.LdlzApplication" />
<item itemvalue="Spring Boot.CzlServiceApplication" />
<item itemvalue="Spring Boot.BonusGatewayApplication" />
<item itemvalue="Spring Boot.CzlScreenApplication" />
<item itemvalue="Spring Boot.RnmwApplication" />
</list>
</recent_temporary>
</component>
<component name="SharedIndexes">
<attachedChunks>
@ -186,7 +216,7 @@
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1764900432287</updated>
<workItem from="1764900434133" duration="40712000" />
<workItem from="1764900434133" duration="65803000" />
</task>
<task id="LOCAL-00001" summary="修改新增用户">
<option name="closed" value="true" />
@ -228,7 +258,63 @@
<option name="project" value="LOCAL" />
<updated>1765188205686</updated>
</task>
<option name="localTasksCounter" value="6" />
<task id="LOCAL-00006" summary="用户管理及下拉选查询接口开发">
<option name="closed" value="true" />
<created>1765188754100</created>
<option name="number" value="00006" />
<option name="presentableId" value="LOCAL-00006" />
<option name="project" value="LOCAL" />
<updated>1765188754100</updated>
</task>
<task id="LOCAL-00007" summary="用户管理及下拉选查询接口开发">
<option name="closed" value="true" />
<created>1765259651388</created>
<option name="number" value="00007" />
<option name="presentableId" value="LOCAL-00007" />
<option name="project" value="LOCAL" />
<updated>1765259651388</updated>
</task>
<task id="LOCAL-00008" summary="用户管理及下拉选查询接口开发">
<option name="closed" value="true" />
<created>1765261655790</created>
<option name="number" value="00008" />
<option name="presentableId" value="LOCAL-00008" />
<option name="project" value="LOCAL" />
<updated>1765261655790</updated>
</task>
<task id="LOCAL-00009" summary="用户管理及下拉选查询接口开发">
<option name="closed" value="true" />
<created>1765264085977</created>
<option name="number" value="00009" />
<option name="presentableId" value="LOCAL-00009" />
<option name="project" value="LOCAL" />
<updated>1765264085977</updated>
</task>
<task id="LOCAL-00010" summary="用户管理及下拉选查询接口开发">
<option name="closed" value="true" />
<created>1765267339696</created>
<option name="number" value="00010" />
<option name="presentableId" value="LOCAL-00010" />
<option name="project" value="LOCAL" />
<updated>1765267339696</updated>
</task>
<task id="LOCAL-00011" summary="用户管理及下拉选查询接口开发">
<option name="closed" value="true" />
<created>1765281904536</created>
<option name="number" value="00011" />
<option name="presentableId" value="LOCAL-00011" />
<option name="project" value="LOCAL" />
<updated>1765281904536</updated>
</task>
<task id="LOCAL-00012" summary="用户管理及下拉选查询接口开发">
<option name="closed" value="true" />
<created>1765330815942</created>
<option name="number" value="00012" />
<option name="presentableId" value="LOCAL-00012" />
<option name="project" value="LOCAL" />
<updated>1765330815942</updated>
</task>
<option name="localTasksCounter" value="13" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
@ -262,9 +348,29 @@
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/hn-czl-service/src/main/java/com/bonus/hn/bearing/capacity/backstage/manager/service/impl/UserServiceImpl.java</url>
<line>126</line>
<line>132</line>
<option name="timeStamp" value="6" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/HnRealNameBmw/src/main/java/com/bonus/hnrn/rnbmw/person/controller/FaceContrastController.java</url>
<line>70</line>
<option name="timeStamp" value="40" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/HnRealNameBmw/src/main/java/com/bonus/hnrn/rnbmw/smallSubManagement/service/impl/DataCountServiceImpl.java</url>
<line>242</line>
<option name="timeStamp" value="41" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/HnRealNameBmw/src/main/java/com/bonus/hnrn/rnbmw/basic/controller/SubContractorController.java</url>
<line>221</line>
<option name="timeStamp" value="43" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/hn-czl-service/src/main/java/com/bonus/hn/bearing/capacity/backstage/login/controller/PublicLoginController.java</url>
<line>61</line>
<option name="timeStamp" value="53" />
</line-breakpoint>
<line-breakpoint enabled="true" type="java-method">
<url>file://$PROJECT_DIR$/hn-ldlz/ldlz-system/src/main/java/com/bns/system/mapper/SysUserPostMapper.java</url>
<line>42</line>
@ -277,4 +383,9 @@
</breakpoints>
</breakpoint-manager>
</component>
<component name="com.intellij.coverage.CoverageDataManagerImpl">
<SUITE FILE_PATH="coverage/hn_cloud_service$HnRealNameBmwApplication.ic" NAME="HnRealNameBmwApplication Coverage Results" MODIFIED="1765261800553" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="true">
<FILTER>com.bonus.hnrn.rnbmw.*</FILTER>
</SUITE>
</component>
</project>

View File

@ -25,6 +25,8 @@ public interface UserService {
List<ZNode> getDepartmentTree();
List<ZNode> getPublicDepartmentTree();
List<MapBean> getRole();
int addInfo(SysUser bean);

View File

@ -113,6 +113,12 @@ public class UserServiceImpl implements UserService {
return userDao.getDepartmentTree(o);
}
@Override
public List<ZNode> getPublicDepartmentTree() {
ZNode o = new ZNode();
return userDao.getDepartmentTree(o);
}
@Override
public List<MapBean> getRole() {
return userDao.getRole();

View File

@ -63,7 +63,13 @@ public class PublicLoginController {
@PostMapping("getDeptTree")
@ApiOperation(value = "获取部门树")
public AjaxResult getDeptTree(SysDept dept) {
List<TreeSelect> list=deptService.selectPublicDeptTreeList(dept);
List<SysDept> list=deptService.selectPublicDeptTreeList(dept);
if(list.size()>0){
list.forEach(item->{
item.setpId(item.getParentId());
item.setId(item.getDeptId());
});
}
return AjaxResult.success(list);
}

View File

@ -19,9 +19,13 @@ import com.bns.common.core.domain.BaseEntity;
public class SysDept extends BaseEntity {
private static final long serialVersionUID = 1L;
private Long id;
/** 部门ID */
private Long deptId;
private Long pId;
/** 父部门ID */
private Long parentId;
@ -61,10 +65,26 @@ public class SysDept extends BaseEntity {
/** 子部门 */
private List<SysDept> children = new ArrayList<SysDept>();
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getDeptId() {
return deptId;
}
public Long getpId() {
return pId;
}
public void setpId(Long pId) {
this.pId =pId;
}
public void setDeptId(Long deptId) {
this.deptId = deptId;
}

View File

@ -36,7 +36,7 @@ public interface ISysDeptService
*/
public List<TreeSelect> selectDeptTreeList(SysDept dept);
public List<TreeSelect> selectPublicDeptTreeList(SysDept dept);
public List<SysDept> selectPublicDeptTreeList(SysDept dept);
public List<TreeSelect4DeptUser> selectDeptUserTreeList(SysUser user);
public List<TreeSelect4DeptUser> selectDeptOkUserTreeList(String userIds);

View File

@ -82,10 +82,10 @@ public class SysDeptServiceImpl implements ISysDeptService
* @return 部门树信息集合
*/
@Override
public List<TreeSelect> selectPublicDeptTreeList(SysDept dept)
public List<SysDept> selectPublicDeptTreeList(SysDept dept)
{
List<SysDept> depts = SpringUtils.getAopProxy(this).selectPublicDeptList(dept);
return buildDeptTreeSelect(depts);
return depts;
}