初始化
commit
723b53aa73
|
|
@ -0,0 +1,39 @@
|
|||
target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
!**/src/main/**/target/
|
||||
!**/src/test/**/target/
|
||||
.kotlin
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea/modules.xml
|
||||
.idea/jarRepositories.xml
|
||||
.idea/compiler.xml
|
||||
.idea/libraries/
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### Eclipse ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
build/
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
|
||||
### Mac OS ###
|
||||
.DS_Store
|
||||
Binary file not shown.
|
|
@ -0,0 +1,10 @@
|
|||
# 默认忽略的文件
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# 已忽略包含查询文件的默认文件夹
|
||||
/queries/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
# 基于编辑器的 HTTP 客户端请求
|
||||
/httpRequests/
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ApifoxUploaderProjectSetting">
|
||||
<option name="apiAccessToken" value="APS-1vDOYttVhEArxap4mRub3kWKNPeZVqvS" />
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="cn.fjdmy.uniapp.UniappProjectDataService">
|
||||
<option name="generalBasePath" value="$PROJECT_DIR$" />
|
||||
<option name="manifestPath" value="$PROJECT_DIR$/manifest.json" />
|
||||
<option name="pagesPath" value="$PROJECT_DIR$/pages.json" />
|
||||
<option name="scanNum" value="1" />
|
||||
<option name="type" value="store" />
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CheckStyle-IDEA" serialisationVersion="2">
|
||||
<checkstyleVersion>13.4.0</checkstyleVersion>
|
||||
<scanScope>JavaOnly</scanScope>
|
||||
<copyLibs>true</copyLibs>
|
||||
<option name="thirdPartyClasspath" />
|
||||
<option name="activeLocationIds" />
|
||||
<option name="locations">
|
||||
<list>
|
||||
<ConfigurationLocation id="bundled-sun-checks" type="BUNDLED" scope="All" description="Sun Checks">(bundled)</ConfigurationLocation>
|
||||
<ConfigurationLocation id="bundled-google-checks" type="BUNDLED" scope="All" description="Google Checks">(bundled)</ConfigurationLocation>
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ClaudeCodeTabState">
|
||||
<option name="tabSessions">
|
||||
<map>
|
||||
<entry key="0">
|
||||
<value>
|
||||
<TabSessionState>
|
||||
<option name="provider" value="claude" />
|
||||
<option name="cwd" value="$PROJECT_DIR$" />
|
||||
<option name="model" value="claude-sonnet-4-6" />
|
||||
<option name="permissionMode" value="default" />
|
||||
<option name="reasoningEffort" value="high" />
|
||||
</TabSessionState>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
|
||||
<data-source source="LOCAL" name="GBS测试环境" uuid="8b9a2ee1-6641-4ecb-8ed5-f9fb28b04a08">
|
||||
<driver-ref>mysql.8</driver-ref>
|
||||
<synchronize>true</synchronize>
|
||||
<jdbc-driver>com.mysql.cj.jdbc.Driver</jdbc-driver>
|
||||
<jdbc-url>jdbc:mysql://nlb-kd2xz70qhllfet2koj.cn-beijing.nlb.aliyuncsslb.com:33068</jdbc-url>
|
||||
<jdbc-additional-properties>
|
||||
<property name="com.intellij.clouds.kubernetes.db.host.port" />
|
||||
<property name="com.intellij.clouds.kubernetes.db.enabled" value="false" />
|
||||
<property name="com.intellij.clouds.kubernetes.db.container.port" />
|
||||
</jdbc-additional-properties>
|
||||
<working-dir>$ProjectFileDir$</working-dir>
|
||||
</data-source>
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,445 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="EasyCodeTableSetting">
|
||||
<option name="tableInfoMap">
|
||||
<map>
|
||||
<entry key="qa_ai.bus_identify_log">
|
||||
<value>
|
||||
<TableInfoDTO>
|
||||
<option name="comment" value="识别记录" />
|
||||
<option name="fullColumn">
|
||||
<list>
|
||||
<ColumnInfoDTO>
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="identifyLogId" />
|
||||
<option name="type" value="java.lang.Object" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="图片路径" />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="imgPath" />
|
||||
<option name="type" value="java.lang.String" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="识别结果" />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="resultJson" />
|
||||
<option name="type" value="java.lang.String" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="创建者ID" />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="creator" />
|
||||
<option name="type" value="java.lang.String" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="创建时间" />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="createTime" />
|
||||
<option name="type" value="java.lang.String" />
|
||||
</ColumnInfoDTO>
|
||||
</list>
|
||||
</option>
|
||||
<option name="name" value="BusIdentifyLog" />
|
||||
<option name="preName" value="" />
|
||||
<option name="saveModelName" value="" />
|
||||
<option name="savePackageName" value="" />
|
||||
<option name="savePath" value="" />
|
||||
<option name="templateGroupName" value="" />
|
||||
</TableInfoDTO>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="videoresource.bus_banner">
|
||||
<value>
|
||||
<TableInfoDTO>
|
||||
<option name="comment" value="è½®æ’å›? />
|
||||
<option name="fullColumn">
|
||||
<list>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="ID" />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="bannerId" />
|
||||
<option name="type" value="java.lang.Integer" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="è½®æ’图å<C2BE><C3A5>" />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="name" />
|
||||
<option name="type" value="java.lang.String" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="是å<C2AF>¦æ˜¾ç¤º0å<30>?æ˜? />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="isShow" />
|
||||
<option name="type" value="java.lang.Integer" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="排åº<C3A5>" />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="sort" />
|
||||
<option name="type" value="java.lang.Integer" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="开始显示时� />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="startTime" />
|
||||
<option name="type" value="java.lang.String" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="结æ<E2809C>Ÿæ˜¾ç¤ºæ—¶é—´" />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="endTime" />
|
||||
<option name="type" value="java.lang.String" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="图片" />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="fileUrl" />
|
||||
<option name="type" value="java.lang.String" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="是å<C2AF>¦åˆ 除(0:有效 1ï¼šåˆ é™?" />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="isDelete" />
|
||||
<option name="type" value="java.lang.Integer" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="æ·»åŠ äº? />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="creator" />
|
||||
<option name="type" value="java.lang.String" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="æ·»åŠ æ—¶é—´" />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="createTime" />
|
||||
<option name="type" value="java.lang.String" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="修改� />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="operator" />
|
||||
<option name="type" value="java.lang.String" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="修改时间" />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="operatTime" />
|
||||
<option name="type" value="java.lang.String" />
|
||||
</ColumnInfoDTO>
|
||||
</list>
|
||||
</option>
|
||||
<option name="name" value="BusBanner" />
|
||||
<option name="preName" value="" />
|
||||
<option name="saveModelName" value="edu_videoresource" />
|
||||
<option name="savePackageName" value="com.zcloud.modules.mall" />
|
||||
<option name="savePath" value="./src/main/java/com/zcloud/modules/mall" />
|
||||
<option name="templateGroupName" value="zcloud" />
|
||||
</TableInfoDTO>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="videoresource.bus_order_sales_records">
|
||||
<value>
|
||||
<TableInfoDTO>
|
||||
<option name="comment" value="订å<C2A2>•和客户è´ä¹°è¯¾ç¨?å…³è<C2B3>”è¡? />
|
||||
<option name="fullColumn">
|
||||
<list>
|
||||
<ColumnInfoDTO>
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="orderSalesRecordsId" />
|
||||
<option name="type" value="java.lang.Integer" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="orderId" />
|
||||
<option name="type" value="java.lang.Integer" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="ï¼ˆæ— ç”¨ï¼Œå<C592>ŽæœŸåˆ 除ï¼? />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="curriculumSalesRecordsId" />
|
||||
<option name="type" value="java.lang.String" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="有效� />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="validDate" />
|
||||
<option name="type" value="java.lang.String" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="销售金� />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="money" />
|
||||
<option name="type" value="java.lang.Double" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="是å<C2AF>¦åˆ 除(0:有效 1ï¼šåˆ é™?" />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="isDelete" />
|
||||
<option name="type" value="java.lang.Integer" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="æ·»åŠ äº? />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="creator" />
|
||||
<option name="type" value="java.lang.String" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="æ·»åŠ æ—¶é—´" />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="createTime" />
|
||||
<option name="type" value="java.lang.String" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="修改� />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="operator" />
|
||||
<option name="type" value="java.lang.String" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="修改时间" />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="operatTime" />
|
||||
<option name="type" value="java.lang.String" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="课程id" />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="curriculumId" />
|
||||
<option name="type" value="java.lang.String" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="版本å<C2AC>? />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="version" />
|
||||
<option name="type" value="java.lang.Double" />
|
||||
</ColumnInfoDTO>
|
||||
</list>
|
||||
</option>
|
||||
<option name="name" value="BusOrderSalesRecords" />
|
||||
<option name="preName" value="" />
|
||||
<option name="saveModelName" value="edu_developer" />
|
||||
<option name="savePackageName" value="com.zcloud.modules.goods" />
|
||||
<option name="savePath" value="./src/main/java/com/zcloud/modules/goods" />
|
||||
<option name="templateGroupName" value="zcloud" />
|
||||
</TableInfoDTO>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="videoresource.bus_promotion_curriculum">
|
||||
<value>
|
||||
<TableInfoDTO>
|
||||
<option name="comment" value="çƒé—¨è¯¾ç¨‹" />
|
||||
<option name="fullColumn">
|
||||
<list>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="ID" />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="promotionCurriculumId" />
|
||||
<option name="type" value="java.lang.Integer" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="课程" />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="curriculumId" />
|
||||
<option name="type" value="java.lang.String" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="ä¿ƒé”€ä»·æ ¼" />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="promotionPrice" />
|
||||
<option name="type" value="java.lang.Double" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="是å<C2AF>¦æ˜¾ç¤º0å<30>?æ˜? />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="isShow" />
|
||||
<option name="type" value="java.lang.Integer" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="排åº<C3A5>" />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="sort" />
|
||||
<option name="type" value="java.lang.Integer" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="开始显示时� />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="startTime" />
|
||||
<option name="type" value="java.lang.String" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="结æ<E2809C>Ÿæ˜¾ç¤ºæ—¶é—´" />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="endTime" />
|
||||
<option name="type" value="java.lang.String" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="是å<C2AF>¦åˆ 除(0:有效 1ï¼šåˆ é™?" />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="isDelete" />
|
||||
<option name="type" value="java.lang.Integer" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="æ·»åŠ äº? />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="creator" />
|
||||
<option name="type" value="java.lang.String" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="æ·»åŠ æ—¶é—´" />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="createTime" />
|
||||
<option name="type" value="java.lang.String" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="修改� />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="operator" />
|
||||
<option name="type" value="java.lang.String" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="修改时间" />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="operatTime" />
|
||||
<option name="type" value="java.lang.String" />
|
||||
</ColumnInfoDTO>
|
||||
</list>
|
||||
</option>
|
||||
<option name="name" value="BusPromotionCurriculum" />
|
||||
<option name="preName" value="" />
|
||||
<option name="saveModelName" value="edu_videoresource" />
|
||||
<option name="savePackageName" value="com.zcloud.modules.mall" />
|
||||
<option name="savePath" value="./src/main/java/com/zcloud/modules/mall" />
|
||||
<option name="templateGroupName" value="zcloud" />
|
||||
</TableInfoDTO>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="videoresource.vi_order_records">
|
||||
<value>
|
||||
<TableInfoDTO>
|
||||
<option name="fullColumn">
|
||||
<list>
|
||||
<ColumnInfoDTO>
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="orderSalesRecordsId" />
|
||||
<option name="type" value="java.lang.Integer" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="orderId" />
|
||||
<option name="type" value="java.lang.Integer" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="销售金� />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="money" />
|
||||
<option name="type" value="java.lang.Double" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="版本å<C2AC>? />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="version" />
|
||||
<option name="type" value="java.lang.Double" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="课程å<E280B9><C3A5>ç§°" />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="curriculumName" />
|
||||
<option name="type" value="java.lang.String" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="课程æ<E280B9><C3A6>è¿°" />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="curriculumIntroduce" />
|
||||
<option name="type" value="java.lang.String" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="总课� />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="classHour" />
|
||||
<option name="type" value="java.lang.Double" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="å°<C3A5>é<EFBFBD>¢è·¯å¾„" />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="coverPath" />
|
||||
<option name="type" value="java.lang.String" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="总视频时� />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="videoTime" />
|
||||
<option name="type" value="java.lang.Double" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="视频� />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="videoNum" />
|
||||
<option name="type" value="java.lang.Integer" />
|
||||
</ColumnInfoDTO>
|
||||
</list>
|
||||
</option>
|
||||
<option name="name" value="ViOrderRecords" />
|
||||
<option name="preName" value="" />
|
||||
<option name="saveModelName" value="edu_developer" />
|
||||
<option name="savePackageName" value="com.zcloud.modules.goods" />
|
||||
<option name="savePath" value="./src/main/java/com/zcloud/modules/goods" />
|
||||
<option name="templateGroupName" value="zcloud" />
|
||||
</TableInfoDTO>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding" defaultCharsetForPropertiesFiles="UTF-8">
|
||||
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/start/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/web-adapter/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/web-adapter/src/main/resources" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/web-app/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/web-client/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/web-domain/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/web-infrastructure/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/../zcloud_gbs_common/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/../zcloud_gbs_common/src/main/resources" charset="UTF-8" />
|
||||
<file url="PROJECT" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="AliAccessStaticViaInstance" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AliArrayNamingShouldHaveBracket" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AliControlFlowStatementWithoutBraces" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AliDeprecation" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AliEqualsAvoidNull" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AliLongLiteralsEndingWithLowercaseL" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AliMissingOverrideAnnotation" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="AliWrapperTypeEquality" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="MapOrSetKeyShouldOverrideHashCodeEquals" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
</profile>
|
||||
</component>
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="KubernetesApiSettings">
|
||||
<option name="configPaths">
|
||||
<list>
|
||||
<option value="file://$PROJECT_DIR$/../conf" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="MavenProjectsManager">
|
||||
<option name="originalFiles">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/../zcloud_gbs_common/pom.xml" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
|
||||
</project>
|
||||
|
|
@ -0,0 +1,124 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Palette2">
|
||||
<group name="Swing">
|
||||
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
|
||||
</item>
|
||||
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
|
||||
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
|
||||
<initial-values>
|
||||
<property name="text" value="Button" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="RadioButton" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="CheckBox" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="Label" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
|
||||
<preferred-size width="-1" height="20" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
|
||||
</item>
|
||||
</group>
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/../zcloud_gbs_common" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
FROM jjb-registry-registry.cn-hangzhou.cr.aliyuncs.com/pub/jdk:1.8.0_202
|
||||
|
||||
ENV TZ=Asia/Shanghai
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
COPY ./start/target/start.jar /opt/app.jar
|
||||
|
||||
|
||||
ENTRYPOINT ["java", "-jar", "/opt/app.jar"]
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>com.jjb.saas</groupId>
|
||||
<artifactId>jjb-saas-parent</artifactId>
|
||||
<version>2.2.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<groupId>com.zcloud.human.user</groupId>
|
||||
<artifactId>zcloud_gbs_human_user</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<name>zcloud_gbs_human_user</name>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.zcloud.gbscommon</groupId>
|
||||
<artifactId>zcloud_gbscommon</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.jjb.saas</groupId>
|
||||
<artifactId>jjb-saas-system-client</artifactId>
|
||||
<version>1.7.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<!--Project modules-->
|
||||
<dependency>
|
||||
<groupId>com.zcloud.human.user</groupId>
|
||||
<artifactId>web-adapter</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zcloud.human.user</groupId>
|
||||
<artifactId>web-client</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zcloud.human.user</groupId>
|
||||
<artifactId>web-app</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zcloud.human.user</groupId>
|
||||
<artifactId>web-domain</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zcloud.human.user</groupId>
|
||||
<artifactId>web-infrastructure</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>2.6.6</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-archetype-plugin</artifactId>
|
||||
<version>3.4.1</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<modules>
|
||||
<module>web-client</module>
|
||||
<module>web-adapter</module>
|
||||
<module>web-app</module>
|
||||
<module>web-domain</module>
|
||||
<module>web-infrastructure</module>
|
||||
<module>start</module>
|
||||
</modules>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.zcloud.human.user</groupId>
|
||||
<artifactId>zcloud_gbs_human_user</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>start</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>start</name>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.zcloud.human.user</groupId>
|
||||
<artifactId>web-adapter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.flywaydb</groupId>
|
||||
<artifactId>flyway-mysql</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.jjb.saas</groupId>
|
||||
<artifactId>jjb-saas-gateway-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.jjb.saas</groupId>
|
||||
<artifactId>jjb-saas-framework-web</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<mainClass>com.zcloud.human.user.Application</mainClass>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
package com.zcloud.human.user;
|
||||
|
||||
import com.jjb.saas.base.starter.bootstart.JJBSpringbootApplication;
|
||||
import com.jjb.saas.facade.starter.annotation.EnableFacadeRpcClient;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
|
||||
/**
|
||||
* Spring Boot Starter
|
||||
*
|
||||
* @author lin
|
||||
* @Date 2025-01-01
|
||||
*/
|
||||
@JJBSpringbootApplication(
|
||||
scanBasePackages = {"com.zcloud", "com.jjb"},
|
||||
mapperPackages = {"com.zcloud.human.user.persistence.mapper"}
|
||||
)
|
||||
@EnableFacadeRpcClient
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(Application.class, args);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package com.zcloud.human.user.config;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.scheduling.annotation.EnableAsync;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
|
||||
@Configuration
|
||||
@EnableAsync
|
||||
@Slf4j
|
||||
public class AsyncConfig {
|
||||
|
||||
@Bean("syncTaskExecutor")
|
||||
public Executor syncTaskExecutor() {
|
||||
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
||||
executor.setCorePoolSize(2);
|
||||
executor.setMaxPoolSize(5);
|
||||
executor.setQueueCapacity(100);
|
||||
executor.setThreadNamePrefix("sync-task-");
|
||||
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
|
||||
executor.setWaitForTasksToCompleteOnShutdown(true);
|
||||
executor.setAwaitTerminationSeconds(60);
|
||||
executor.initialize();
|
||||
log.info("异步任务线程池初始化完成");
|
||||
return executor;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
spring:
|
||||
config:
|
||||
import:
|
||||
# - classpath:nacos.yml
|
||||
# - classpath:sdk.yml
|
||||
- classpath:nacos-prod.yml
|
||||
- classpath:sdk-prod.yml
|
||||
- classpath:swagger.yml
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
nacos:
|
||||
url: prod-nacos:8848
|
||||
namespace: jjb-dragon
|
||||
application:
|
||||
name: jjb-saas-zcloud-human-user
|
||||
version:
|
||||
gateway: humanUser
|
||||
cn-name: 人力资源用户管理
|
||||
spring:
|
||||
application:
|
||||
name: ${application.name}${application.version}
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: prod
|
||||
cloud:
|
||||
nacos:
|
||||
config:
|
||||
username: nacos
|
||||
password: u9Hc7tLFBY
|
||||
namespace: ${nacos.namespace}
|
||||
server-addr: ${nacos.url}
|
||||
file-extension: yml
|
||||
shared-configs:
|
||||
- config-common.yml
|
||||
- config-port.yml
|
||||
- config-mq.yml
|
||||
- config-log.yml
|
||||
- config-sdk-server.yml
|
||||
- config-actuator.yml
|
||||
- config-job.yml
|
||||
- config-mysql.yml
|
||||
- config-redis.yml
|
||||
- config-cache.yml
|
||||
- config-spring.yml
|
||||
- config-mybatis.yml
|
||||
- config-sdk.yml
|
||||
- config-flyway.yml
|
||||
discovery:
|
||||
server-addr: ${spring.cloud.nacos.config.server-addr}
|
||||
namespace: ${spring.cloud.nacos.config.namespace}
|
||||
username: nacos
|
||||
password: u9Hc7tLFBY
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
nacos:
|
||||
url: 192.168.20.100:30290
|
||||
namespace: jjb-dragon
|
||||
application:
|
||||
name: jjb-saas-zcloud-human-user
|
||||
version:
|
||||
gateway: humanUser
|
||||
cn-name: 人力资源用户管理
|
||||
spring:
|
||||
application:
|
||||
name: ${application.name}${application.version}
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: test
|
||||
cloud:
|
||||
nacos:
|
||||
config:
|
||||
namespace: ${nacos.namespace}
|
||||
server-addr: ${nacos.url}
|
||||
file-extension: yml
|
||||
shared-configs:
|
||||
- config-common.yml
|
||||
- config-port.yml
|
||||
- config-mq.yml
|
||||
- config-log.yml
|
||||
- config-sdk-server.yml
|
||||
- config-actuator.yml
|
||||
- config-job.yml
|
||||
- config-mysql.yml
|
||||
- config-redis.yml
|
||||
- config-cache.yml
|
||||
- config-spring.yml
|
||||
- config-mybatis.yml
|
||||
- config-sdk.yml
|
||||
- config-flyway.yml
|
||||
discovery:
|
||||
server-addr: ${spring.cloud.nacos.config.server-addr}
|
||||
namespace: ${spring.cloud.nacos.config.namespace}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
management:
|
||||
endpoints:
|
||||
web:
|
||||
base-path: /${application.gateway}${application.version}/actuator
|
||||
enabled-by-default: true
|
||||
endpoint:
|
||||
health:
|
||||
enabled: true
|
||||
info:
|
||||
enabled: false
|
||||
auditevents:
|
||||
enabled: false
|
||||
metrics:
|
||||
enabled: false
|
||||
loggers:
|
||||
enabled: false
|
||||
logfile:
|
||||
enabled: false
|
||||
httptrace:
|
||||
enabled: false
|
||||
env:
|
||||
enabled: false
|
||||
flyway:
|
||||
enabled: false
|
||||
liquidbase:
|
||||
enabled: false
|
||||
shutdown:
|
||||
enabled: false
|
||||
mappings:
|
||||
enabled: false
|
||||
scheduledtasks:
|
||||
enabled: false
|
||||
threaddump:
|
||||
enabled: false
|
||||
heapdump:
|
||||
enabled: false
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
spring:
|
||||
cache:
|
||||
redis:
|
||||
time-to-live: 1800s
|
||||
|
||||
|
||||
# 鈭𣬚漣蝻枏<E89DBB><E69E8F>滨蔭
|
||||
# 瘜剁<E7989C>caffeine 銝漤<E98A9D><E6BCA4>鍂鈭擧㺭<E693A7>桅<EFBFBD>憭改<E686AD>撟嗡<E6929F>蝻枏<E89DBB><E69E8F>賭葉<E8B3AD><E89189><EFBFBD>雿𡒊<E99BBF>銝𡁜𦛚<F0A1819C>箸艶嚗<E889B6><E59A97><EFBFBD>冽<EFBFBD>蝏游漲<E6B8B8><E6BCB2><EFBFBD>摮塩<E691AE><E5A1A9>窈<EFBFBD>𡡞<EFBFBD><F0A1A19E>㗇𥋘<E39787>?l2cache:
|
||||
config:
|
||||
# <20>臬炏摮睃<E691AE>蝛箏<E89D9B>潘<EFBFBD>暺䁅恕true嚗屸俈甇Y<E79487>摮条忽<E69DA1>? allowNullValues: true
|
||||
# 蝏<><E89D8F>蝻枏<E89DBB><E69E8F>滨蔭
|
||||
composite:
|
||||
# <20>臬炏<E887AC>券<EFBFBD><E588B8>舐鍂銝<E98D82>蝥抒<E89DA5>摮矋<E691AE>暺䁅恕false
|
||||
l1AllOpen: false
|
||||
# 銝<>蝥抒<E89DA5>摮? caffeine:
|
||||
# <20>臬炏<E887AC>芸𢆡<E88AB8>瑟鰵餈<E9B0B5><E9A488>蝻枏<E89DBB> true <20>?false <20>? autoRefreshExpireCache: false
|
||||
# 蝻枏<E89DBB><E69E8F>瑟鰵靚<E9B0B5>漲蝥輻<E89DA5>瘙删<E79899>憭批<E686AD>
|
||||
refreshPoolSize: 2
|
||||
# 蝻枏<E89DBB><E69E8F>瑟鰵<E7919F><E9B0B5><EFBFBD><EFBFBD>?蝘?
|
||||
refreshPeriod: 10
|
||||
# <20>坔<EFBFBD><E59D94>舘<EFBFBD><E88898><EFBFBD>𧒄<EFBFBD>?蝘?
|
||||
expireAfterWrite: 180
|
||||
# 霈輸䔮<E8BCB8>舘<EFBFBD><E88898><EFBFBD>𧒄<EFBFBD>?蝘?
|
||||
expireAfterAccess: 180
|
||||
# <20>嘥<EFBFBD><E598A5>硋之撠? initialCapacity: 1
|
||||
# <20><>憭抒<E686AD>摮睃笆鞊∩葵<E288A9>堆<EFBFBD>頞<EFBFBD><E9A09E>甇斗㺭<E69697>𤩺𧒄銋见<E98A8B><E8A781>曉<EFBFBD><E69B89><EFBFBD><EFBFBD>摮睃<E691AE>憭望<E686AD>
|
||||
maximumSize: 3
|
||||
|
||||
# 鈭𣬚漣蝻枏<E89DBB>
|
||||
redis:
|
||||
# <20>典<EFBFBD>餈<EFBFBD><E9A488><EFBFBD>園𡢿嚗<F0A1A2BF><E59A97>雿齿神蝘𡜐<E89D98>暺䁅恕銝滩<E98A9D><E6BBA9>? defaultExpiration: 1800000
|
||||
# 蝻枏<E89DBB><E69E8F>湔鰵<E6B994>園<EFBFBD>𡁶䰻<F0A181B6>嗡<EFBFBD><E597A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>opic<69>滨妍 暺䁅恕 cache:redis:caffeine:topic
|
||||
topic: cache:redis:caffeine:topic
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
common:
|
||||
mysql:
|
||||
host: 192.168.2.166
|
||||
port: 3306
|
||||
username: root
|
||||
password: root
|
||||
redis:
|
||||
host: 10.43.253.4
|
||||
password: jjb123456
|
||||
port: 6379
|
||||
mq:
|
||||
host: 10.43.163.23:9876
|
||||
xxl-job:
|
||||
address: http://10.43.98.135:8080/xxl-job-admin/
|
||||
username: admin
|
||||
password: jjb123456
|
||||
gateway:
|
||||
network:
|
||||
http:
|
||||
#网关的外网访问地址 必须配置为HTTPS协议
|
||||
external: https://testdragon.cqjjb.cn
|
||||
#网关的内网访问地址 固定配置为http://jjb-saas-gateway
|
||||
intranet: http://10.43.250.65
|
||||
wx:
|
||||
#webSocket外网地址
|
||||
external: wx://testdragon.cqjjb.cn
|
||||
swagger:
|
||||
#是否打开swagger 测试及UAT配置为true,生产环境配置为false
|
||||
enabled: true
|
||||
base:
|
||||
# base应用访问外网访问地址
|
||||
host-url: http://10.43.12.158
|
||||
desk:
|
||||
# desk工程的外网地址
|
||||
host-url: http://10.43.12.158
|
||||
login:
|
||||
# login工程的外网访问地址
|
||||
host-url: http://10.43.12.158
|
||||
|
||||
#所有的前端域名配置 避免iframe跨域
|
||||
x-frame-options: ${common.desk.host-url}/ ${common.login.host-url}/ ${common.base.host-url}/ ${common.gateway.network.http.external}/ http://10.43.250.65/
|
||||
|
||||
k8s:
|
||||
namespace: test-dragon
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
# JOB 配置
|
||||
xxl-job:
|
||||
admin:
|
||||
address: ${common.xxl-job.address}
|
||||
username: ${common.xxl-job.username}
|
||||
password: ${common.xxl-job.password}
|
||||
executor:
|
||||
app-name: ${spring.application.name}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
common:
|
||||
log:
|
||||
jjb-saas-system:
|
||||
- com.jjb:info
|
||||
jjb-saas-auth1:
|
||||
- com.jjb:info
|
||||
jjb-saas-user:
|
||||
- com.jjb:info
|
||||
gray:
|
||||
log:
|
||||
host: 192.168.1.1
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
mq:
|
||||
topic: springcloudStream-jjb-dragon-test
|
||||
server: ${common.mq.host}
|
||||
spring:
|
||||
cloud:
|
||||
stream:
|
||||
bindings:
|
||||
input:
|
||||
destination: springcloudStream-jjb-dragon-test
|
||||
group: ${spring.application.name}-${spring.profiles.active}
|
||||
output:
|
||||
destination: springcloudStream-jjb-dragon-test
|
||||
group: ${spring.application.name}-${spring.profiles.active}
|
||||
rocketmq:
|
||||
binder:
|
||||
name-server: ${common.mq.host}
|
||||
group: ${spring.application.name}-${spring.profiles.active}
|
||||
bindings:
|
||||
input:
|
||||
consumer:
|
||||
tags: a
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
mybatis-plus:
|
||||
mapper-locations: classpath*:mapper/*.xml,classpath*:mapper/**/*Mapper.xml
|
||||
type-handlers-package: com.jjb.saas.framework.datascope.handler
|
||||
global-config:
|
||||
banner: false
|
||||
db-config:
|
||||
id-type: assign_id
|
||||
logic-delete-value: 1
|
||||
logic-not-delete-value: 0
|
||||
configuration:
|
||||
log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
mysql:
|
||||
db: ${spring.application.name}
|
||||
spring:
|
||||
shardingsphere:
|
||||
druid:
|
||||
username: admin
|
||||
password: jjb123456
|
||||
allows:
|
||||
denys:
|
||||
props:
|
||||
sql:
|
||||
show: true
|
||||
enabled: true
|
||||
masterslave:
|
||||
name: ms # <20>滚<EFBFBD>嚗䔶遙<E494B6>𧶏<EFBFBD><F0A7B68F><EFBFBD>閬<EFBFBD><E996AC>霂<EFBFBD>𣈲銝<F0A388B2>
|
||||
master-data-source-name: master # 銝餃<E98A9D><E9A483>唳旿皞? slave-data-source-names: slave-1 # 隞𤾸<E99A9E><F0A4BEB8>唳旿皞? datasource:
|
||||
names: master,slave-1
|
||||
master:
|
||||
#url: jdbc:mysql://10.43.123.226:3306/${spring.application.name}?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&allowMultiQueries=true&serverTimezone=Asia/Shanghai
|
||||
url: jdbc:mysql://${common.mysql.host}:${common.mysql.port}/${mysql.db}?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&allowMultiQueries=true&serverTimezone=Asia/Shanghai
|
||||
username: ${common.mysql.username}
|
||||
password: ${common.mysql.password}
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
initial-size: 6
|
||||
min-idle: 4
|
||||
maxActive: 40
|
||||
# <20>滨蔭<E6BBA8>瑕<EFBFBD>餈墧𦻖蝑匧<E89D91>頞<EFBFBD>𧒄<EFBFBD><F0A79284>𧒄<EFBFBD>? maxWait: 60000
|
||||
# <20>滨蔭<E6BBA8>湧<EFBFBD>憭帋<E686AD><E5B88B>滩<EFBFBD>銵䔶<E98AB5>甈⊥<E79488>瘚页<E7989A>璉<EFBFBD>瘚钅<E7989A>閬<EFBFBD><E996AC><EFBFBD>剔<EFBFBD>蝛粹𤦭餈墧𦻖嚗<F0A6BB96><E59A97>雿齿糓瘥怎<E798A5>
|
||||
timeBetweenEvictionRunsMillis: 60000
|
||||
# <20>滨蔭銝<E894AD>銝芾<E98A9D><E88ABE>亙銁瘙牐葉<E78990><E89189>撠讐<E692A0>摮条<E691AE><E69DA1>園𡢿嚗<F0A1A2BF><E59A97>雿齿糓瘥怎<E798A5>
|
||||
minEvictableIdleTimeMillis: 300000
|
||||
#Oracle<6C><65>閬<EFBFBD><E996AC>撘<EFBFBD>瘜券<E7989C>
|
||||
#validationQuery: SELECT 1 FROM DUAL
|
||||
testWhileIdle: true
|
||||
testOnBorrow: false
|
||||
testOnReturn: false
|
||||
# <20>枏<EFBFBD>PSCache嚗<65>僎銝娍<E98A9D>摰𡁏<E691B0>銝芾<E98A9D><E88ABE>乩<EFBFBD>PSCache<68><65>之撠? poolPreparedStatements: true
|
||||
maxPoolPreparedStatementPerConnectionSize: 20
|
||||
# <20>滨蔭<E6BBA8>烐綉蝏蠘恣<E8A098>行⏛<E8A18C><E28F9B>ilters嚗<73>縧<EFBFBD>匧<EFBFBD><E58CA7>烐綉<E78390>屸𢒰sql<71>䭾<EFBFBD>蝏蠘恣嚗?wall'<27>其<EFBFBD><E585B6>脩<EFBFBD>憓? filters: slf4j
|
||||
# <20>朞<EFBFBD>connectProperties撅墧<E69285>扳䔉<E689B3>枏<EFBFBD>mergeSql<71>蠘<EFBFBD>嚗𥟇<E59A97>SQL霈啣<E99C88>
|
||||
connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
|
||||
wall:
|
||||
multi-statement-allow: true
|
||||
slave-1:
|
||||
# url: jdbc:mysql://10.43.123.226:3306/${spring.application.name}?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&allowMultiQueries=true&serverTimezone=Asia/Shanghai
|
||||
url: jdbc:mysql://${common.mysql.host}:${common.mysql.port}/${mysql.db}?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&allowMultiQueries=true&serverTimezone=Asia/Shanghai
|
||||
username: ${common.mysql.username}
|
||||
password: ${common.mysql.password}
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
initial-size: 6
|
||||
min-idle: 4
|
||||
maxActive: 20
|
||||
# <20>滨蔭<E6BBA8>瑕<EFBFBD>餈墧𦻖蝑匧<E89D91>頞<EFBFBD>𧒄<EFBFBD><F0A79284>𧒄<EFBFBD>? maxWait: 60000
|
||||
# <20>滨蔭<E6BBA8>湧<EFBFBD>憭帋<E686AD><E5B88B>滩<EFBFBD>銵䔶<E98AB5>甈⊥<E79488>瘚页<E7989A>璉<EFBFBD>瘚钅<E7989A>閬<EFBFBD><E996AC><EFBFBD>剔<EFBFBD>蝛粹𤦭餈墧𦻖嚗<F0A6BB96><E59A97>雿齿糓瘥怎<E798A5>
|
||||
timeBetweenEvictionRunsMillis: 60000
|
||||
# <20>滨蔭銝<E894AD>銝芾<E98A9D><E88ABE>亙銁瘙牐葉<E78990><E89189>撠讐<E692A0>摮条<E691AE><E69DA1>園𡢿嚗<F0A1A2BF><E59A97>雿齿糓瘥怎<E798A5>
|
||||
minEvictableIdleTimeMillis: 300000
|
||||
#Oracle<6C><65>閬<EFBFBD><E996AC>撘<EFBFBD>瘜券<E7989C>
|
||||
#validationQuery: SELECT 1 FROM DUAL
|
||||
testWhileIdle: true
|
||||
testOnBorrow: false
|
||||
testOnReturn: false
|
||||
# <20>枏<EFBFBD>PSCache嚗<65>僎銝娍<E98A9D>摰𡁏<E691B0>銝芾<E98A9D><E88ABE>乩<EFBFBD>PSCache<68><65>之撠? poolPreparedStatements: true
|
||||
maxPoolPreparedStatementPerConnectionSize: 20
|
||||
# <20>滨蔭<E6BBA8>烐綉蝏蠘恣<E8A098>行⏛<E8A18C><E28F9B>ilters嚗<73>縧<EFBFBD>匧<EFBFBD><E58CA7>烐綉<E78390>屸𢒰sql<71>䭾<EFBFBD>蝏蠘恣嚗?wall'<27>其<EFBFBD><E585B6>脩<EFBFBD>憓?stat撌脣縧<E884A3>? filters: slf4j
|
||||
# <20>朞<EFBFBD>connectProperties撅墧<E69285>扳䔉<E689B3>枏<EFBFBD>mergeSql<71>蠘<EFBFBD>嚗𥟇<E59A97>SQL霈啣<E99C88>
|
||||
connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
|
||||
wall:
|
||||
multi-statement-allow: true
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
server:
|
||||
port: 80
|
||||
debug: true
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
spring:
|
||||
redis:
|
||||
host: ${common.redis.host}
|
||||
password: ${common.redis.password}
|
||||
port: ${common.redis.port}
|
||||
timeout: 15000
|
||||
database: 0
|
||||
prefix: dragon
|
||||
jedis:
|
||||
pool:
|
||||
max-active: 600
|
||||
max-idle: 300
|
||||
max-wait: 15000
|
||||
min-idle: 10
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
sdk:
|
||||
server:
|
||||
symmetry-url: jjb-saas-application/application/applications/server/secure/
|
||||
app-key: jjb-saas-dragon
|
||||
client:
|
||||
security:
|
||||
gateway: ${gateway.network.http.external}
|
||||
appKey: ${sdk.client.app-key}
|
||||
desensitization:
|
||||
symmetric-key: 1234567887654321
|
||||
logging:
|
||||
gateway: ${sdk.client.security.gateway}
|
||||
appKey: ${sdk.client.security.app-key}
|
||||
clientLoggingEnable: true
|
||||
level: debug
|
||||
username: user
|
||||
password: 123456
|
||||
showConsoleLog: true
|
||||
formatConsoleLogJson: true
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
spring:
|
||||
zipkin:
|
||||
#zipkin<69>滚𦛚<E6BB9A><F0A69B9A><EFBFBD>典𧑐<E585B8><F0A79190>
|
||||
base-url: http://jjb-saas-zipkin/
|
||||
sender:
|
||||
type: web #雿輻鍂http<74><70>䲮撘譍<E69298>颲𤘪㺭<F0A498AA>? #<23>滨蔭<E6BBA8><E894AD>甅<EFBFBD>曉<EFBFBD>瘥? sleuth:
|
||||
sampler:
|
||||
probability: 1 # 撠<><E692A0><EFBFBD>瑟<EFBFBD>靘贝挽蝵桐蛹 1.0嚗䔶<EFBFBD>撠望糓<EFBFBD>券<EFBFBD><EFBFBD>賡<EFBFBD>閬<EFBFBD><EFBFBD><EFBFBD><EFBFBD>霈斗糓0.1銋笔停<EFBFBD>?0%嚗䔶<E59A97><E494B6>祆<EFBFBD><E7A586>萎<EFBFBD>嚗?0%撠勗<E692A0><E58B97>其<EFBFBD>
|
||||
web:
|
||||
resources:
|
||||
cache:
|
||||
cachecontrol:
|
||||
no-store: false
|
||||
max-age: 10000
|
||||
no-cache: false
|
||||
autoconfigure:
|
||||
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
|
||||
main:
|
||||
allow-bean-definition-overriding: true
|
||||
mvc:
|
||||
pathmatch:
|
||||
matching-strategy: ant_path_matcher
|
||||
messages:
|
||||
basename: i18n.message
|
||||
encoding: UTF-8
|
||||
flyway:
|
||||
# <20>臬炏<E887AC>舐鍂flyway
|
||||
enabled: true
|
||||
# 蝻𣇉<E89DBB><F0A38789>澆<EFBFBD>嚗屸<E59A97>霈下TF-8
|
||||
encoding: UTF-8
|
||||
# 餈<>宏sql<71>𡁏𧋦<F0A1818F><F0A78BA6>辣摮䀹𦆮頝臬<E9A09D>嚗屸<E59A97>霈千b/migration
|
||||
locations: classpath:db/migration
|
||||
# 餈<>宏sql<71>𡁏𧋦<F0A1818F><F0A78BA6>辣<EFBFBD>滨妍<E6BBA8><E5A68D><EFBFBD>蝻<EFBFBD>嚗屸<E59A97>霈丈
|
||||
sql-migration-prefix: V
|
||||
# 餈<>宏sql<71>𡁏𧋦<F0A1818F><F0A78BA6>辣<EFBFBD>滨妍<E6BBA8><E5A68D><EFBFBD><EFBFBD>𠉛泵嚗屸<E59A97>霈?銝芯<E98A9D><E88AAF>垍瑪__
|
||||
sql-migration-separator: __
|
||||
# 餈<>宏sql<71>𡁏𧋦<F0A1818F><F0A78BA6>辣<EFBFBD>滨妍<E6BBA8><E5A68D><EFBFBD>蝻<EFBFBD>
|
||||
sql-migration-suffixes: .sql
|
||||
# 餈<>宏<EFBFBD>嗆糓<E59786>西<EFBFBD>銵峕嵗撉䕘<E69289>暺䁅恕true
|
||||
validate-on-migrate: true
|
||||
# 敶栞<E695B6>蝘餃<E89D98><E9A483>唳㺭<E594B3>桀<EFBFBD><E6A180>䂿征銝𥪜<E98A9D><F0A5AA9C>冽瓷<E586BD>匧<EFBFBD><E58CA7>唳旿<E594B3><E697BF>”<EFBFBD>塚<EFBFBD><E5A19A>芸𢆡<E88AB8>扯<EFBFBD><E689AF>箏<EFBFBD>餈<EFBFBD>宏嚗峕鰵撱漳chema_version銵? baseline-on-migrate: true
|
||||
server:
|
||||
tomcat:
|
||||
max-http-post-size: 200MB
|
||||
connection-timeout: 180000
|
||||
fastjson:
|
||||
parser:
|
||||
safeMode: true
|
||||
mvc:
|
||||
pathmatch:
|
||||
matching-strategy: ANT_PATH_MATCHER
|
||||
thymeleaf:
|
||||
prefix: classpath:/templates/
|
||||
cache: false
|
||||
dubbo:
|
||||
application:
|
||||
name: ${spring.application.name}
|
||||
registry:
|
||||
timeout: 20000
|
||||
address: nacos://${spring.cloud.nacos.config.server-addr}?namespace=${spring.cloud.nacos.config.namespace}-facade
|
||||
check: false
|
||||
filter: providerContextFilter
|
||||
protocol:
|
||||
port: -1
|
||||
name: dubbo
|
||||
consumer:
|
||||
timeout: 20000
|
||||
check: false
|
||||
filter: consumerContextFilter
|
||||
logging:
|
||||
config: classpath:jjb-saas-logback-spring.xml
|
||||
level:
|
||||
com.alibaba.nacos.client.naming: OFF
|
||||
com.alibaba.nacos.client.config.impl: OFF
|
||||
com.alibaba.nacos.common.remote.client: OFF
|
||||
|
||||
datapermssion:
|
||||
tenantcondition:
|
||||
defaultversion: NEWERSION
|
||||
|
||||
easy-retry:
|
||||
server:
|
||||
host: http://jjb-saas-config
|
||||
port: 1788
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
sdk:
|
||||
client:
|
||||
app-key: e6ab3c9abda747b39d7cc12b6dc0f5a0
|
||||
gateway:
|
||||
url: ${common.gateway.network.http.intranet}
|
||||
swagger:
|
||||
enabled: ${common.swagger.enabled}
|
||||
title: 例子
|
||||
description: 这是例子项目
|
||||
version: ${application.version}
|
||||
group-name: 例子
|
||||
springfox:
|
||||
documentation:
|
||||
swagger-ui:
|
||||
base-url: ${application.gateway}
|
||||
swagger:
|
||||
v2:
|
||||
path: /${application.gateway}/v2/api-docs
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
sdk:
|
||||
server:
|
||||
app-key: cac3895f7d9c4b538ec3605152681e90
|
||||
client:
|
||||
gateway:
|
||||
url: ${common.gateway.network.http.external}
|
||||
route:
|
||||
- client:
|
||||
system-code: ${application.name}
|
||||
name: ${application.cn-name}-后端
|
||||
group-code: public_api
|
||||
service:
|
||||
system-code: ${application.name}
|
||||
name: ${application.cn-name}-后端
|
||||
group-code: public_api
|
||||
strip-prefix: 0
|
||||
uri: http://${application.name}
|
||||
path: /${application.gateway}/**
|
||||
- client:
|
||||
system-code: ${application.name}-container
|
||||
name: ${application.cn-name}-前端
|
||||
group-code: public_api
|
||||
service:
|
||||
system-code: ${application.name}-container
|
||||
name: ${application.cn-name}-前端
|
||||
group-code: public_api
|
||||
strip-prefix: 0
|
||||
uri: http://jjb-saas-base
|
||||
path: /${application.gateway}/container/**
|
||||
order: -2
|
||||
archives:
|
||||
async:
|
||||
pool:
|
||||
maxPoolSize: 2
|
||||
corePoolSize: 1
|
||||
queueCapacity: 60
|
||||
namePrefix: async-task-
|
||||
keepAliveSeconds: 60
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
sdk:
|
||||
server:
|
||||
app-key: cac3895f7d9c4b538ec3605152681e90
|
||||
client:
|
||||
gateway:
|
||||
url: ${common.gateway.network.http.external}
|
||||
route:
|
||||
- client:
|
||||
system-code: ${application.name}
|
||||
name: ${application.cn-name}-后端
|
||||
group-code: public_api
|
||||
service:
|
||||
system-code: ${application.name}
|
||||
name: ${application.cn-name}-后端
|
||||
group-code: public_api
|
||||
strip-prefix: 0
|
||||
uri: lb://${application.name}
|
||||
path: /${application.gateway}/**
|
||||
- client:
|
||||
system-code: ${application.name}-container
|
||||
name: ${application.cn-name}-前端
|
||||
group-code: public_api
|
||||
service:
|
||||
system-code: ${application.name}-container
|
||||
name: ${application.cn-name}-前端
|
||||
group-code: public_api
|
||||
strip-prefix: 0
|
||||
uri: lb://jjb-saas-base
|
||||
path: /${application.gateway}/container/**
|
||||
order: -2
|
||||
openapi:
|
||||
appId: 1871106785124999168
|
||||
appKey: 7314ecfc11ff4d5fad1ac19284ed2ac3
|
||||
appSecret: 7565ab15-a2ae-4830-9b4d-fb382cd5fb30
|
||||
appPublicKey: 3059301306072a8648ce3d020106082a811ccf5501822d03420004f339671110a06681fcfd968ad9247bd3cd0d2ec6b2159d1d4b775e7ed5566b3297d82cf14b626ef11fdd6bc7ecb6bcfb3ea94ccd1f381f4116f43367be4b360f
|
||||
appPrivateKey: 308193020100301306072a8648ce3d020106082a811ccf5501822d0479307702010104206b6abc8e717b7d042f1e8531190a7c18113e4a701417f2770d2150d33ba97779a00a06082a811ccf5501822da14403420004f339671110a06681fcfd968ad9247bd3cd0d2ec6b2159d1d4b775e7ed5566b3297d82cf14b626ef11fdd6bc7ecb6bcfb3ea94ccd1f381f4116f43367be4b360f
|
||||
encryptType: SM2
|
||||
platform:
|
||||
- name: default
|
||||
openPublicKey: 3059301306072a8648ce3d020106082a811ccf5501822d034200045b5d8fcad91e113910406db4caf0f5c6688048e0f46742d55f872a25855316803ddb177cc9bb5906ff0b2ad4d6b1f1378a49109104613e79b5b5512e3710e88f
|
||||
url: ${common.gateway.network.http.intranet}
|
||||
protocol: HTTP
|
||||
defaultPlatform: true
|
||||
##ciphertext plaintext
|
||||
type: plaintext
|
||||
apiPlatform:
|
||||
- name: default
|
||||
#多个可以逗号隔开
|
||||
apiCode: test:01
|
||||
#多个可以逗号隔开,可以为空
|
||||
tenantIds: 1838408702262321152
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
swagger:
|
||||
enabled: ${common.swagger.enabled}
|
||||
title: ${application.cn-name}
|
||||
description: ${application.cn-name},一切皆有可能
|
||||
version: 1.0.0
|
||||
group-name: ${application.cn-name}
|
||||
springfox:
|
||||
documentation:
|
||||
swagger-ui:
|
||||
base-url: ${application.gateway}
|
||||
swagger:
|
||||
v2:
|
||||
path: /${application.gateway}/v2/api-docs
|
||||
open-doc:
|
||||
brief-introduction-url: https://ipaas-gateway.cqjjb.cn/document-foreground/container/document/detail?siteId=1729854594279215106&docTypeId=1744908406080786434&dirId=1745034145606258688
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<!doctype html><html lang="zh"><head data-built-info="@cqsjjb/scripts@2.0.0-alpha-1 Env/production (2025/10/17 11:07:53) App/risk"><meta charset="UTF-8"/><meta name="renderer" content="webkit"/><meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1"/><meta name="viewport" content="width=device-width,minimum-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover"><title>--</title><script>(function () {
|
||||
const APP_ENV = {
|
||||
antd: {
|
||||
'ant-prefix': 'micro-temp',
|
||||
fontFamily: 'PingFangSC-Regular',
|
||||
colorPrimary: '#1677ff',
|
||||
borderRadius: parseInt('2')
|
||||
},
|
||||
appKey: '',
|
||||
basename: 'risk',
|
||||
API_HOST: ''
|
||||
};
|
||||
APP_ENV.API_HOST = sessionStorage.API_HOST || APP_ENV.API_HOST || window.location.origin;
|
||||
window.process = {
|
||||
env: { app: APP_ENV },
|
||||
NODE_ENV: 'production'
|
||||
};
|
||||
window.__JJB_ENVIRONMENT__ = {
|
||||
API_HOST: APP_ENV.API_HOST,
|
||||
redirect: '',
|
||||
FRAMEWORK: APP_ENV.antd
|
||||
};
|
||||
})();</script><script defer="defer" src="/risk/static/js/295.21df88c875577274cecb.js"></script><script defer="defer" src="/risk/static/js/main.4c0885586ad9a06ab444.js"></script><link href="/risk/static/css/main.40fc518bb0818fe8b8ea.css" rel="stylesheet"></head><body style="overflow: hidden"><noscript>此网页需要开启JavaScript功能。</noscript><div id="root" style="width: 100%; height: 100%; position: relative"></div><script type="text/javascript">/* @cqsjjb/script 输出当前应用基本信息、构建时间 */console.log("%c@cqsjjb/scripts@2.0.0-alpha-1 Env/production (2025/10/17 11:07:53) App/risk Version/master Java/<branch-name>", "color: #1890ff; border-radius: 2px; padding: 0 4px; border: 1px solid #1890ff; background: #f9fcff")</script></body></html>
|
||||
|
|
@ -0,0 +1 @@
|
|||
body,html{height:100%;width:100%}input::-ms-clear,input::-ms-reveal{display:none}*,:after,:before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:rgba(0,0,0,0)}@-ms-viewport{width:device-width}body{margin:0}[tabindex="-1"]:focus{outline:none}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{font-weight:500;margin-bottom:.5em;margin-top:0}p{margin-bottom:1em;margin-top:0}abbr[data-original-title],abbr[title]{border-bottom:0;cursor:help;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}address{font-style:normal;line-height:inherit;margin-bottom:1em}input[type=number],input[type=password],input[type=text],textarea{-webkit-appearance:none}dl,ol,ul{margin-bottom:1em;margin-top:0}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:500}dd{margin-bottom:.5em;margin-left:0}blockquote{margin:0 0 1em}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}code,kbd,pre,samp{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace;font-size:1em}pre{margin-bottom:1em;margin-top:0;overflow:auto}figure{margin:0 0 1em}img{border-style:none;vertical-align:middle}[role=button],a,area,button,input:not([type=range]),label,select,summary,textarea{touch-action:manipulation}table{border-collapse:collapse}caption{caption-side:bottom;padding-bottom:.3em;padding-top:.75em;text-align:left}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-size:inherit;line-height:inherit;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{border:0;margin:0;min-width:0;padding:0}legend{color:inherit;display:block;font-size:1.5em;line-height:inherit;margin-bottom:.5em;max-width:100%;padding:0;white-space:normal;width:100%}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:none;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}output{display:inline-block}summary{display:list-item}template{display:none}[hidden]{display:none!important}mark{background-color:#feffe6;padding:.2em}
|
||||
|
|
@ -0,0 +1 @@
|
|||
module.exports={compact:!1,plugins:[["@babel/plugin-proposal-decorators",{legacy:!0}]],presets:[["@babel/preset-env",{targets:{browsers:["ie >= 10"]}}],["@babel/preset-react",{runtime:"automatic"}]]};
|
||||
|
|
@ -0,0 +1 @@
|
|||
module.exports={javaGit:"<git-url>",javaGitName:"<git-name>",environment:{development:{javaGitBranch:"<branch-name>",API_HOST:"http://192.168.20.100:30140/demo2"},production:{javaGitBranch:"<branch-name>",API_HOST:""}},appIdentifier:"risk",contextInject:{appKey:""},windowInject:{title:"微应用模板",links:[],element:{root:{id:"root"}},scripts:[]},server:{port:"8080",host:"127.0.0.1",open:!0},framework:{antd:{"ant-prefix":"micro-temp",fontFamily:"PingFangSC-Regular",colorPrimary:"#1677ff",borderRadius:2}},webpackConfig:{htmlWebpackPluginOption:{inject:!0}}};
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,135 @@
|
|||
/*!
|
||||
Copyright (c) 2018 Jed Watson.
|
||||
Licensed under the MIT License (MIT), see
|
||||
http://jedwatson.github.io/classnames
|
||||
*/
|
||||
|
||||
/*!
|
||||
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
||||
*
|
||||
* Copyright (c) 2014-2017, Jon Schlinkert.
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* isobject <https://github.com/jonschlinkert/isobject>
|
||||
*
|
||||
* Copyright (c) 2014-2017, Jon Schlinkert.
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* react-dom.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* react-is.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* react-jsx-runtime.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* react.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* scheduler.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/** @license React v16.13.1
|
||||
* react-is.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/** @license React v17.0.2
|
||||
* react-is.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/** @preserve
|
||||
* Counter block mode compatible with Dr Brian Gladman fileenc.c
|
||||
* derived from CryptoJS.mode.CTR
|
||||
* Jan Hruby jhruby.web@gmail.com
|
||||
*/
|
||||
|
||||
/** @preserve
|
||||
(c) 2012 by Cédric Mesnil. All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
|
||||
/** */
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1 @@
|
|||
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
"name": "micro-app",
|
||||
"version": "2.0.0",
|
||||
"description": "建教帮微应用模板",
|
||||
"author": "JJB",
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"serve": "node node_modules/@cqsjjb/scripts/webpack.dev.server.js",
|
||||
"build": "node node_modules/@cqsjjb/scripts/webpack.build.js",
|
||||
"push": "jjb-cmd push java production",
|
||||
"clean-cache": "rimraf node_modules/.cache/webpack",
|
||||
"serve:development": "cross-env NODE_ENV=development npm run serve",
|
||||
"serve:production": "cross-env NODE_ENV=production npm run serve",
|
||||
"build:development": "cross-env NODE_ENV=development npm run build",
|
||||
"build:production": "cross-env NODE_ENV=production npm run build",
|
||||
"code-optimization": "node node_modules/@cqsjjb/scripts/code-optimization.js",
|
||||
"lint": "eslint --ext .js,.jsx,.tsx --fix src"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ant-design/icons": "latest",
|
||||
"@cqsjjb/jjb-common-decorator": "latest",
|
||||
"@cqsjjb/jjb-common-lib": "latest",
|
||||
"@cqsjjb/jjb-dva-runtime": "latest",
|
||||
"@cqsjjb/jjb-react-admin-component": "latest",
|
||||
"ahooks": "^3.9.5",
|
||||
"antd": "latest",
|
||||
"dayjs": "^1.11.7",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antfu/eslint-config": "^5.4.1",
|
||||
"@babel/plugin-proposal-decorators": "^7.19.3",
|
||||
"@cqsjjb/scripts": "latest",
|
||||
"@eslint-react/eslint-plugin": "^2.2.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^9.37.0",
|
||||
"eslint-plugin-format": "^1.0.2",
|
||||
"eslint-plugin-react-hooks": "^7.0.0",
|
||||
"eslint-plugin-react-refresh": "^0.4.23",
|
||||
"typescript": "^5.9.3"
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.zcloud.human.user</groupId>
|
||||
<artifactId>zcloud_gbs_human_user</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>web-adapter</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>web-adapter</name>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.jjb.saas</groupId>
|
||||
<artifactId>jjb-saas-framework-adapter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zcloud.human.user</groupId>
|
||||
<artifactId>web-app</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zcloud.human.user</groupId>
|
||||
<artifactId>web-client</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.jjb.saas</groupId>
|
||||
<artifactId>jjb-saas-framework-job</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
package com.zcloud.human.user.plan;
|
||||
|
||||
import com.jjb.saas.framework.job.Job;
|
||||
import com.xxl.job.core.biz.model.ReturnT;
|
||||
import com.xxl.job.core.context.XxlJobHelper;
|
||||
import com.zcloud.human.user.command.HumanDeptSyncExe;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 人资部门数据同步定时任务
|
||||
*
|
||||
* @author zhaolei
|
||||
* @Date 2026-06-02
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Component
|
||||
@Slf4j
|
||||
public class HumanDeptSyncJob implements Job {
|
||||
|
||||
private final HumanDeptSyncExe humanDeptSyncExe;
|
||||
|
||||
@Override
|
||||
public ReturnT<String> execute(String param) {
|
||||
XxlJobHelper.log("============人资部门数据同步任务开始==========");
|
||||
|
||||
try {
|
||||
String result = humanDeptSyncExe.execute(param);
|
||||
XxlJobHelper.log("同步结果:{}", result);
|
||||
XxlJobHelper.log("============人资部门数据同步任务结束==========");
|
||||
return new ReturnT<>(ReturnT.SUCCESS_CODE, result);
|
||||
} catch (Exception e) {
|
||||
XxlJobHelper.log("同步任务执行失败:{}", e.getMessage());
|
||||
return new ReturnT<>(ReturnT.FAIL_CODE, "同步任务执行失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
package com.zcloud.human.user.plan;
|
||||
|
||||
import com.jjb.saas.framework.job.Job;
|
||||
import com.xxl.job.core.biz.model.ReturnT;
|
||||
import com.xxl.job.core.context.XxlJobHelper;
|
||||
import com.zcloud.human.user.command.HumanUserDeptCompareSyncExe;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 人资用户部门对比同步定时任务
|
||||
* <p>
|
||||
* 定时对比统一用户管理与人员每日变动记录表中的部门信息,
|
||||
* 找出部门发生变化的人员并记录变动。
|
||||
* <p>
|
||||
* 执行流程:
|
||||
* 1. 根据企业名称获取企业ID
|
||||
* 2. 根据企业ID查询统一用户管理中的用户
|
||||
* 3. 查询人资每日变动记录表中的记录
|
||||
* 4. 对比部门信息,找出部门变化的人员
|
||||
* 5. 记录部门变动到变动记录表
|
||||
*
|
||||
* @author zhaolei
|
||||
* @Date 2026-06-08
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Component
|
||||
@Slf4j
|
||||
public class HumanUserDeptCompareSyncJob implements Job {
|
||||
|
||||
private final HumanUserDeptCompareSyncExe humanUserDeptCompareSyncExe;
|
||||
|
||||
@Override
|
||||
public ReturnT<String> execute(String param) {
|
||||
XxlJobHelper.log("============人资用户部门对比同步任务开始==========");
|
||||
|
||||
try {
|
||||
String result = humanUserDeptCompareSyncExe.execute(param);
|
||||
XxlJobHelper.log("同步结果:{}", result);
|
||||
XxlJobHelper.log("============人资用户部门对比同步任务结束==========");
|
||||
return new ReturnT<>(ReturnT.SUCCESS_CODE, result);
|
||||
} catch (Exception e) {
|
||||
XxlJobHelper.log("同步任务执行失败:{}", e.getMessage());
|
||||
return new ReturnT<>(ReturnT.FAIL_CODE, "同步任务执行失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
package com.zcloud.human.user.plan;
|
||||
|
||||
import com.jjb.saas.framework.job.Job;
|
||||
import com.xxl.job.core.biz.model.ReturnT;
|
||||
import com.xxl.job.core.context.XxlJobHelper;
|
||||
import com.zcloud.human.user.command.HumanUserSyncExe;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 人资人员数据同步定时任务
|
||||
* <p>
|
||||
* 定时从第三方人资接口获取人员数据并同步到本系统,
|
||||
* 通过Dubbo调用底座UserFacade实现人员数据写入
|
||||
*
|
||||
* @author zhaolei
|
||||
* @Date 2026-06-01
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Component
|
||||
@Slf4j
|
||||
public class HumanUserSyncJob implements Job {
|
||||
|
||||
private final HumanUserSyncExe humanUserSyncExe;
|
||||
|
||||
@Override
|
||||
public ReturnT<String> execute(String param) {
|
||||
XxlJobHelper.log("============人资人员数据同步任务开始==========");
|
||||
|
||||
try {
|
||||
String result = humanUserSyncExe.execute(param);
|
||||
XxlJobHelper.log("同步结果:{}", result);
|
||||
XxlJobHelper.log("============人资人员数据同步任务结束==========");
|
||||
return new ReturnT<>(ReturnT.SUCCESS_CODE, result);
|
||||
} catch (Exception e) {
|
||||
XxlJobHelper.log("同步任务执行失败:{}", e.getMessage());
|
||||
return new ReturnT<>(ReturnT.FAIL_CODE, "同步任务执行失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
package com.zcloud.human.user.web;
|
||||
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.zcloud.human.user.service.AsyncSyncService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* HumanUser 控制器
|
||||
* <p>
|
||||
* 提供用户的增删改查接口,以及人资数据同步接口。
|
||||
*
|
||||
* @author zhaolei
|
||||
* @Date 2026-06-01
|
||||
*/
|
||||
@Api(tags = "人资用户管理")
|
||||
@RequestMapping("/${application.gateway}/user")
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@Slf4j
|
||||
public class HumanUserController {
|
||||
|
||||
private final AsyncSyncService asyncSyncService;
|
||||
|
||||
/**
|
||||
* 异步同步人资用户信息
|
||||
*/
|
||||
@ApiOperation("同步用户信息-手动调用定时任务")
|
||||
@PostMapping("/asyncSyncHumanUser")
|
||||
public SingleResponse<String> asyncSyncHumanUser() {
|
||||
asyncSyncService.asyncSyncHumanUser("manual");
|
||||
return SingleResponse.of("用户同步任务已提交,请查看日志了解进度");
|
||||
}
|
||||
|
||||
/**
|
||||
* 异步同步人资部门信息
|
||||
*/
|
||||
@ApiOperation("同步部门信息-手动调用定时任务")
|
||||
@PostMapping("/asyncSyncHumanDept")
|
||||
public SingleResponse<String> asyncSyncHumanDept() {
|
||||
asyncSyncService.asyncSyncHumanDept("manual");
|
||||
return SingleResponse.of("部门同步任务已提交,请查看日志了解进度");
|
||||
}
|
||||
|
||||
/**
|
||||
* 异步部门对比同步
|
||||
*/
|
||||
@ApiOperation("部门对比-手动调用定时任务")
|
||||
@PostMapping("/asyncSyncDeptCompare")
|
||||
public SingleResponse<String> asyncSyncDeptCompare() {
|
||||
asyncSyncService.asyncSyncDeptCompare("manual");
|
||||
return SingleResponse.of("部门对比同步任务已提交,请查看日志了解进度");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.zcloud.human.user</groupId>
|
||||
<artifactId>zcloud_gbs_human_user</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>web-app</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>web-app</name>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.zcloud.human.user</groupId>
|
||||
<artifactId>web-client</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zcloud.human.user</groupId>
|
||||
<artifactId>web-infrastructure</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>8</source>
|
||||
<target>8</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,396 @@
|
|||
package com.zcloud.human.user.command;
|
||||
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.json.JSONArray;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.cloud.commons.lang.StringUtils;
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.zcloud.gbscommon.zcloudcorp.face.ZcloudCorpFacade;
|
||||
import com.zcloud.gbscommon.zcloudcorp.response.ZcloudCorpInfoCO;
|
||||
import com.zcloud.gbscommon.zclouddepartment.face.ZcloudDepartmentFacade;
|
||||
import com.zcloud.gbscommon.zclouddepartment.request.ZcloudDepartmentAddCmd;
|
||||
import com.zcloud.gbscommon.zclouddepartment.response.ZcloudDepartmentInfoCo;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* 人资部门数据同步执行器
|
||||
* <p>
|
||||
* 第三方仅提供一个全量人员数据接口,其中包含公司和部门信息。
|
||||
* 本执行器从全量人员数据中提取部门树形数据,根据公司名称匹配目标公司后,递归同步部门到本系统。
|
||||
*
|
||||
* @author zhaolei
|
||||
* @Date 2026-06-02
|
||||
*/
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class HumanDeptSyncExe {
|
||||
|
||||
/**
|
||||
* 本系统公司名称,用于查询本系统企业ID和根部门。
|
||||
*/
|
||||
private static final String SYSTEM_CORP_NAME = "秦皇岛港股份有限公司";
|
||||
|
||||
/**
|
||||
* 第三方数据中要查找的目标部门名称。
|
||||
*/
|
||||
private static final String TARGET_DEPT_NAME = "秦港股份";
|
||||
|
||||
/**
|
||||
* 第三方全量人员数据接口地址。
|
||||
*/
|
||||
private static final String USER_INFO_URL = "http://192.168.10.56:8090";
|
||||
|
||||
@DubboReference
|
||||
private ZcloudDepartmentFacade zcloudDepartmentFacade;
|
||||
|
||||
@DubboReference
|
||||
private ZcloudCorpFacade zcloudCorpFacade;
|
||||
|
||||
/**
|
||||
* 执行同步
|
||||
*
|
||||
* @param param 同步参数(预留扩展)
|
||||
* @return 同步结果描述
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public String execute(String param) {
|
||||
log.info("============获取人资部门数据开始==========");
|
||||
|
||||
Long corpId = getTargetCorpId();
|
||||
if (corpId == null) {
|
||||
log.warn("本系统不存在公司:{},终止同步", SYSTEM_CORP_NAME);
|
||||
return "同步终止:本系统不存在公司" + SYSTEM_CORP_NAME;
|
||||
}
|
||||
|
||||
String result = "";
|
||||
if("manual".equals(param)){
|
||||
result = getSimulationData();
|
||||
}else{
|
||||
result = getThirdPartyData();
|
||||
}
|
||||
JSONObject rootDept = parseTargetDeptTree(result);
|
||||
if (rootDept == null) {
|
||||
log.warn("未找到公司:{} 的部门数据,终止同步", SYSTEM_CORP_NAME);
|
||||
return "同步终止:未找到公司" + SYSTEM_CORP_NAME + "的部门数据";
|
||||
}
|
||||
|
||||
Long gbsRootDeptId = findGbsRootDeptId(corpId);
|
||||
if (gbsRootDeptId == null) {
|
||||
log.warn("本系统公司:{} 下没有根部门,终止同步", SYSTEM_CORP_NAME);
|
||||
return "同步终止:本系统公司" + SYSTEM_CORP_NAME + "下没有根部门";
|
||||
}
|
||||
|
||||
JSONArray children = rootDept.getJSONArray("children");
|
||||
if (children == null || children.isEmpty()) {
|
||||
log.info("公司:{} 下没有子部门需要同步", SYSTEM_CORP_NAME);
|
||||
return "同步完成:公司" + SYSTEM_CORP_NAME + "下没有子部门需要同步";
|
||||
}
|
||||
|
||||
int[] syncResult = syncDeptTreeChildren(children, gbsRootDeptId);
|
||||
String message = String.format("同步完成:成功 %d 个,跳过 %d 个,失败 %d 个",
|
||||
syncResult[0], syncResult[1], syncResult[2]);
|
||||
log.info("============获取人资部门数据结束==========");
|
||||
log.info(message);
|
||||
return message;
|
||||
}
|
||||
|
||||
/**
|
||||
* 同步部门子节点列表(跳过根节点,从子节点开始同步)
|
||||
*
|
||||
* @param children 第三方部门子节点列表
|
||||
* @param gbsDeptId 本系统父部门ID
|
||||
* @return int[] {成功数, 跳过数, 失败数}
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int[] syncDeptTreeChildren(JSONArray children, Long gbsDeptId) {
|
||||
int successCount = 0;
|
||||
int skipCount = 0;
|
||||
int failCount = 0;
|
||||
|
||||
for (int i = 0; i < children.size(); i++) {
|
||||
int[] childResult = syncDeptTree(children.getJSONObject(i), gbsDeptId);
|
||||
successCount += childResult[0];
|
||||
skipCount += childResult[1];
|
||||
failCount += childResult[2];
|
||||
}
|
||||
|
||||
return new int[]{successCount, skipCount, failCount};
|
||||
}
|
||||
|
||||
/**
|
||||
* 同步部门树(递归)
|
||||
*
|
||||
* 核心逻辑:第三方部门ID与本系统部门ID不同,因此:
|
||||
* 1. 根据父部门ID(本系统)+ 部门名称判断是否存在
|
||||
* 2. 如果存在,获取本系统的部门ID作为子部门的父ID
|
||||
* 3. 如果不存在,创建新部门并使用新ID作为子部门的父ID
|
||||
*
|
||||
* @param deptNode 第三方部门节点
|
||||
* @param gbsDeptId 本系统父部门ID
|
||||
* @return int[] {成功数, 跳过数, 失败数}
|
||||
*/
|
||||
private int[] syncDeptTree(JSONObject deptNode, Long gbsDeptId) {
|
||||
int successCount = 0;
|
||||
int skipCount = 0;
|
||||
int failCount = 0;
|
||||
|
||||
String deptName = deptNode.getStr("dept_name");
|
||||
if (StringUtils.isEmpty(deptName)) {
|
||||
skipCount++;
|
||||
return new int[]{successCount, skipCount, failCount};
|
||||
}
|
||||
|
||||
Long existingDeptId = getDeptIdByName(gbsDeptId, deptName);
|
||||
if (existingDeptId != null) {
|
||||
log.debug("部门已存在:{},使用已有ID:{}", deptName, existingDeptId);
|
||||
skipCount++;
|
||||
gbsDeptId = existingDeptId;
|
||||
} else {
|
||||
Long newDeptId = addDept(deptName, gbsDeptId);
|
||||
if (newDeptId != null) {
|
||||
successCount++;
|
||||
log.debug("新增部门成功:{},新ID:{}", deptName, newDeptId);
|
||||
gbsDeptId = newDeptId;
|
||||
} else {
|
||||
failCount++;
|
||||
log.error("新增部门失败:{}", deptName);
|
||||
return new int[]{successCount, skipCount, failCount};
|
||||
}
|
||||
}
|
||||
|
||||
JSONArray children = deptNode.getJSONArray("children");
|
||||
if (children != null && !children.isEmpty()) {
|
||||
for (int i = 0; i < children.size(); i++) {
|
||||
int[] childResult = syncDeptTree(children.getJSONObject(i), gbsDeptId);
|
||||
successCount += childResult[0];
|
||||
skipCount += childResult[1];
|
||||
failCount += childResult[2];
|
||||
}
|
||||
}
|
||||
|
||||
return new int[]{successCount, skipCount, failCount};
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据父部门ID和部门名称判断部门是否已经存在。
|
||||
*/
|
||||
private boolean isDeptExists(Long parentId, String deptName) {
|
||||
return getDeptIdByName(parentId, deptName) != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据父部门ID和部门名称获取本系统的部门ID。
|
||||
*
|
||||
* @param parentId 本系统父部门ID
|
||||
* @param deptName 部门名称
|
||||
* @return 本系统部门ID,如果不存在返回null
|
||||
*/
|
||||
private Long getDeptIdByName(Long parentId, String deptName) {
|
||||
MultiResponse<ZcloudDepartmentInfoCo> response = zcloudDepartmentFacade.getDeptList();
|
||||
if (response == null || !response.isSuccess() || response.getData() == null) {
|
||||
return null;
|
||||
}
|
||||
return response.getData().stream()
|
||||
.filter(dept -> parentId.equals(dept.getParentId()) && deptName.equals(dept.getName()))
|
||||
.map(ZcloudDepartmentInfoCo::getId)
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增部门到系统。
|
||||
*/
|
||||
private Long addDept(String deptName, Long parentId) {
|
||||
try {
|
||||
ZcloudDepartmentAddCmd cmd = new ZcloudDepartmentAddCmd();
|
||||
cmd.setName(deptName);
|
||||
cmd.setParentId(parentId);
|
||||
cmd.setCorpinfoId(getTargetCorpId());
|
||||
cmd.setDepOrder(9);
|
||||
cmd.setSuperviseFlag(0);
|
||||
SingleResponse<Long> response = zcloudDepartmentFacade.addHumanUserDept(cmd);
|
||||
|
||||
if (response != null && response.isSuccess() && response.getData() != null) {
|
||||
log.debug("新增部门成功:{},ID:{}", deptName, response.getData());
|
||||
return response.getData();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("新增部门异常:{},错误:{}", deptName, e.getMessage());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取公司ID。
|
||||
*/
|
||||
private Long getTargetCorpId() {
|
||||
MultiResponse<ZcloudCorpInfoCO> response = zcloudCorpFacade.getCorpList();
|
||||
if (response == null || !response.isSuccess() || response.getData() == null) {
|
||||
return null;
|
||||
}
|
||||
return response.getData().stream()
|
||||
.filter(corp -> SYSTEM_CORP_NAME.equals(corp.getCorpName()))
|
||||
.map(ZcloudCorpInfoCO::getId)
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据企业ID获取公司的根部门ID。
|
||||
*
|
||||
* @param corpId 企业ID
|
||||
* @return 根部门ID
|
||||
*/
|
||||
private Long findGbsRootDeptId(Long corpId) {
|
||||
MultiResponse<ZcloudDepartmentInfoCo> response = zcloudDepartmentFacade.getDeptList();
|
||||
if (response == null || !response.isSuccess() || response.getData() == null) {
|
||||
return null;
|
||||
}
|
||||
return response.getData().stream()
|
||||
.filter(dept -> corpId.equals(dept.getCorpinfoId()))
|
||||
.filter(dept -> SYSTEM_CORP_NAME.equals(dept.getName()))
|
||||
.map(ZcloudDepartmentInfoCo::getId)
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 从第三方全量数据中解析目标公司的部门树。
|
||||
* 支持两种格式:
|
||||
* 1. 根节点是数组:[{...}, {...}] - 全量人员数据格式
|
||||
* 2. 根节点是对象:{...} - 部门树结构格式
|
||||
* <p>
|
||||
* 解析逻辑:直接在整个数据中递归查找 TARGET_DEPT_NAME 对应的部门子树
|
||||
*/
|
||||
private JSONObject parseTargetDeptTree(String result) {
|
||||
if (StringUtils.isEmpty(result)) {
|
||||
return null;
|
||||
}
|
||||
Object json = JSONUtil.parse(result);
|
||||
|
||||
// 直接在整个数据中递归查找目标部门
|
||||
if (json instanceof JSONObject) {
|
||||
return findDeptNodeByName((JSONObject) json, TARGET_DEPT_NAME);
|
||||
} else if (json instanceof JSONArray) {
|
||||
JSONArray array = (JSONArray) json;
|
||||
for (int i = 0; i < array.size(); i++) {
|
||||
JSONObject found = findDeptNodeByName(array.getJSONObject(i), TARGET_DEPT_NAME);
|
||||
if (found != null) {
|
||||
return found;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 在部门树中递归查找指定名称的节点。
|
||||
*
|
||||
* @param parent 父节点
|
||||
* @param deptName 目标部门名称
|
||||
* @return 找到的部门节点,如果未找到返回 null
|
||||
*/
|
||||
private JSONObject findDeptNodeByName(JSONObject parent, String deptName) {
|
||||
if (parent == null || StringUtils.isEmpty(deptName)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// 检查当前节点的 dept_name 是否匹配
|
||||
if (deptName.equals(parent.getStr("dept_name"))) {
|
||||
return parent;
|
||||
}
|
||||
|
||||
// 递归在子节点中查找
|
||||
JSONArray children = parent.getJSONArray("children");
|
||||
if (children != null && !children.isEmpty()) {
|
||||
for (int i = 0; i < children.size(); i++) {
|
||||
JSONObject found = findDeptNodeByName(children.getJSONObject(i), deptName);
|
||||
if (found != null) {
|
||||
return found;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取第三方全量人员数据。
|
||||
*/
|
||||
private String getThirdPartyData() {
|
||||
try {
|
||||
String result = HttpRequest.post(USER_INFO_URL)
|
||||
.timeout(30000)
|
||||
.execute()
|
||||
.body();
|
||||
log.debug("获取第三方全量数据成功");
|
||||
return result;
|
||||
} catch (Exception e) {
|
||||
log.error("获取第三方全量数据失败:{}", e.getMessage());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 模拟数据
|
||||
* @return
|
||||
*/
|
||||
private String getSimulationData(){
|
||||
return "{\n" +
|
||||
"\t\"corporation_code\": \"7f304de353c358egcfg267f023db8f25\",\n" +
|
||||
"\t\"corporation_name\": \"河港集团\",\n" +
|
||||
"\t\"dept_name\": \"子公司\",\n" +
|
||||
"\t\"dept_code\": \"28bd895f27934aa7a9acf665d73ead8d\",\n" +
|
||||
"\t\"dept_level\": \"1\",\n" +
|
||||
"\t\"dept_code_path\": \"7f304de353c358egcfg267f023db8f25-28bd895f27934aa7a9acf665d73ead8d\",\n" +
|
||||
"\t\"superior_organization_code\": \"7f304de353c358egcfg267f023db8f25\",\n" +
|
||||
"\t\"children\": [{\n" +
|
||||
"\t\t\"corporation_code\": \"1976974388809424896\",\n" +
|
||||
"\t\t\"corporation_name\": \"秦皇岛港股份有限公司\",\n" +
|
||||
"\t\t\"dept_name\": \"秦皇岛港股份有限公司\",\n" +
|
||||
"\t\t\"dept_code\": \"00138af59c8f4505a87e7653447381b4\",\n" +
|
||||
"\t\t\"dept_level\": \"0\",\n" +
|
||||
"\t\t\"dept_code_path\": \"root-001\",\n" +
|
||||
"\t\t\"superior_organization_code\": \"\",\n" +
|
||||
"\t\t\"children\": [{\n" +
|
||||
"\t\t\t\"corporation_code\": \"1976974388809424896\",\n" +
|
||||
"\t\t\t\"corporation_name\": \"秦皇岛港股份有限公司\",\n" +
|
||||
"\t\t\t\"dept_name\": \"安全监督部\",\n" +
|
||||
"\t\t\t\"dept_code\": \"0c26b24b536d4a76819b658ba5d48fa6\",\n" +
|
||||
"\t\t\t\"dept_level\": \"1\",\n" +
|
||||
"\t\t\t\"dept_code_path\": \"root-001-dept-001\",\n" +
|
||||
"\t\t\t\"superior_organization_code\": \"root-001\",\n" +
|
||||
"\t\t\t\"children\": [{\n" +
|
||||
"\t\t\t\t\"corporation_code\": \"1976974388809424896\",\n" +
|
||||
"\t\t\t\t\"corporation_name\": \"秦皇岛港股份有限公司\",\n" +
|
||||
"\t\t\t\t\"dept_name\": \"安监一部\",\n" +
|
||||
"\t\t\t\t\"dept_code\": \"2008702109245157376\",\n" +
|
||||
"\t\t\t\t\"dept_level\": \"2\",\n" +
|
||||
"\t\t\t\t\"dept_code_path\": \"root-001-dept-001-dept-001-001\",\n" +
|
||||
"\t\t\t\t\"superior_organization_code\": \"dept-001\",\n" +
|
||||
"\t\t\t\t\"children\": []\n" +
|
||||
"\t\t\t}, {\n" +
|
||||
"\t\t\t\t\"corporation_code\": \"1976974388809424896\",\n" +
|
||||
"\t\t\t\t\"corporation_name\": \"秦皇岛港股份有限公司\",\n" +
|
||||
"\t\t\t\t\"dept_name\": \"安监五部\",\n" +
|
||||
"\t\t\t\t\"dept_code\": \"2008702109245157375\",\n" +
|
||||
"\t\t\t\t\"dept_level\": \"3\",\n" +
|
||||
"\t\t\t\t\"dept_code_path\": \"root-001-dept-001-dept-001-001\",\n" +
|
||||
"\t\t\t\t\"superior_organization_code\": \"dept-001\",\n" +
|
||||
"\t\t\t\t\"children\": []\n" +
|
||||
"\t\t\t}]\n" +
|
||||
"\t\t}]\n" +
|
||||
"\t}]\n" +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
package com.zcloud.human.user.command;
|
||||
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.jjb.saas.system.client.user.facade.UserFacade;
|
||||
import com.jjb.saas.system.client.user.request.UserAddCmd;
|
||||
import com.zcloud.human.user.dto.HumanUserAddCmd;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* HumanUser 新增执行器
|
||||
* <p>
|
||||
* 通过Dubbo调用UserFacade.add实现人员新增。
|
||||
*
|
||||
* @author zhaolei
|
||||
* @Date 2026-06-02
|
||||
*/
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class HumanUserAddExe {
|
||||
|
||||
@DubboReference
|
||||
private UserFacade userFacade;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void execute(UserAddCmd cmd) {
|
||||
log.info("开始新增人员信息,用户名:{}", cmd.getName());
|
||||
SingleResponse<Long> response = userFacade.add(cmd);
|
||||
if (response == null || !response.isSuccess()) {
|
||||
throw new BizException("新增人员信息失败");
|
||||
}
|
||||
|
||||
log.info("新增人员信息成功,用户ID:{},用户名:{}", response.getData(), cmd.getName());
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,193 @@
|
|||
package com.zcloud.human.user.command;
|
||||
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.zcloud.gbscommon.utils.Tools;
|
||||
import com.zcloud.gbscommon.zcloudcorp.face.ZcloudCorpFacade;
|
||||
import com.zcloud.gbscommon.zcloudcorp.response.ZcloudCorpInfoCO;
|
||||
import com.zcloud.gbscommon.zclouduser.facade.ZcloudUserFacade;
|
||||
import com.zcloud.gbscommon.zclouduser.request.ZcloudUserQry;
|
||||
import com.zcloud.gbscommon.zclouduser.response.ZcloudUserCo;
|
||||
import com.zcloud.human.user.domain.gateway.HumanUserRecordGateway;
|
||||
import com.zcloud.human.user.domain.model.HumanUserRecordE;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 人资用户部门对比同步执行器
|
||||
* <p>
|
||||
* 用于对比统一用户管理与人员每日变动记录表中的部门信息,
|
||||
* 找出部门发生变化的人员并记录变动。
|
||||
* <p>
|
||||
* 执行流程:
|
||||
* 1. 根据企业名称获取企业ID
|
||||
* 2. 根据企业ID查询统一用户管理中的用户
|
||||
* 3. 查询人资每日变动记录表中的记录
|
||||
* 4. 对比部门信息,找出部门变化的人员
|
||||
* 5. 记录部门变动到变动记录表
|
||||
*
|
||||
* @author zhaolei
|
||||
* @Date 2026-06-09
|
||||
*/
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class HumanUserDeptCompareSyncExe {
|
||||
|
||||
/**
|
||||
* 同步目标公司名称。
|
||||
*/
|
||||
private static final String TARGET_CORP_NAME = "秦皇岛港股份有限公司";
|
||||
|
||||
private final HumanUserRecordGateway humanUserRecordGateway;
|
||||
|
||||
@DubboReference
|
||||
private ZcloudCorpFacade zcloudCorpFacade;
|
||||
|
||||
@DubboReference
|
||||
private ZcloudUserFacade zcloudUserFacade;
|
||||
|
||||
/**
|
||||
* 执行部门对比同步
|
||||
*
|
||||
* @param param 同步参数(预留扩展)
|
||||
* @return 同步结果描述
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public String execute(String param) {
|
||||
log.info("============人资用户部门对比同步开始==========");
|
||||
|
||||
// 1. 根据企业名称获取企业ID
|
||||
Long corpId = getTargetCorpId();
|
||||
if (corpId == null) {
|
||||
log.warn("未找到目标企业:{},终止同步", TARGET_CORP_NAME);
|
||||
return "同步终止:未找到目标企业" + TARGET_CORP_NAME;
|
||||
}
|
||||
log.info("找到目标企业ID:{}", corpId);
|
||||
|
||||
// 2. 根据企业ID查询统一用户管理中的用户
|
||||
List<ZcloudUserCo> userList = getUserListByCorpId(corpId);
|
||||
if (CollectionUtils.isEmpty(userList)) {
|
||||
log.warn("企业:{} 下没有用户", TARGET_CORP_NAME);
|
||||
return "同步完成:企业" + TARGET_CORP_NAME + "下没有用户";
|
||||
}
|
||||
log.info("查询到 {} 个用户", userList.size());
|
||||
|
||||
// 3. 查询人资每日变动记录表中指定企业的记录
|
||||
Map<String, Object> queryMap = new HashMap<>();
|
||||
queryMap.put("corporationName", TARGET_CORP_NAME);
|
||||
List<HumanUserRecordE> recordList = humanUserRecordGateway.list(queryMap);
|
||||
if (CollectionUtils.isEmpty(recordList)) {
|
||||
log.warn("人资每日变动记录表中没有企业:{} 的数据", TARGET_CORP_NAME);
|
||||
return "同步完成:人资变动记录表中没有企业" + TARGET_CORP_NAME + "的数据";
|
||||
}
|
||||
log.info("查询到 {} 条变动记录", recordList.size());
|
||||
|
||||
// 4. 构建人员ID到部门名称的映射(从人资变动记录表)
|
||||
Map<Long, String> recordUserIdDeptMap = buildUserIdDeptMap(recordList);
|
||||
log.info("构建了 {} 个人员的部门映射", recordUserIdDeptMap.size());
|
||||
|
||||
// 5. 对比部门信息
|
||||
int changeCount = 0;
|
||||
int successCount = 0;
|
||||
int failCount = 0;
|
||||
|
||||
for (ZcloudUserCo user : userList) {
|
||||
Long userId = user.getId();
|
||||
String currentDeptName = user.getDepartmentName();
|
||||
String recordDeptName = recordUserIdDeptMap.get(userId);
|
||||
|
||||
if (recordDeptName != null && !recordDeptName.equals(currentDeptName)) {
|
||||
log.info("人员:{}(ID: {})部门发生变化,原部门:{},新部门:{}",
|
||||
user.getName(), userId, recordDeptName, currentDeptName);
|
||||
changeCount++;
|
||||
|
||||
// 记录部门变动到变动记录表
|
||||
try {
|
||||
HumanUserRecordE record = new HumanUserRecordE();
|
||||
record.setUserRecordId(Tools.get32UUID());
|
||||
record.setUserId(userId);
|
||||
record.setEmployeeName(user.getName());
|
||||
record.setDeptName(currentDeptName);
|
||||
record.setPhoneNumber(user.getPhone());
|
||||
record.setDeptCode(String.valueOf(user.getDepartmentId()));
|
||||
humanUserRecordGateway.add(record);
|
||||
successCount++;
|
||||
} catch (Exception e) {
|
||||
log.error("记录部门变动失败:{},错误:{}", user.getName(), e.getMessage());
|
||||
failCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
String message = String.format("同步完成:发现 %d 人部门变化,成功记录 %d 条,失败 %d 条",
|
||||
changeCount, successCount, failCount);
|
||||
log.info("============人资用户部门对比同步结束==========");
|
||||
log.info(message);
|
||||
return message;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据企业名称获取企业ID
|
||||
*
|
||||
* @return 企业ID,如果未找到返回null
|
||||
*/
|
||||
private Long getTargetCorpId() {
|
||||
try {
|
||||
MultiResponse<ZcloudCorpInfoCO> response = zcloudCorpFacade.getCorpList();
|
||||
if (response != null && response.isSuccess() && response.getData() != null) {
|
||||
for (ZcloudCorpInfoCO corp : response.getData()) {
|
||||
if (TARGET_CORP_NAME.equals(corp.getCorpName())) {
|
||||
return corp.getId();
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("获取企业列表失败:{}", e.getMessage());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据企业ID查询统一用户管理中的用户
|
||||
*
|
||||
* @param corpId 企业ID
|
||||
* @return 用户列表
|
||||
*/
|
||||
private List<ZcloudUserCo> getUserListByCorpId(Long corpId) {
|
||||
try {
|
||||
ZcloudUserQry zcloudUserQry = new ZcloudUserQry();
|
||||
zcloudUserQry.setCorpinfoId(corpId);
|
||||
MultiResponse<ZcloudUserCo> response = zcloudUserFacade.listUserByCorpInfoId(zcloudUserQry);
|
||||
if (response != null && response.isSuccess() && response.getData() != null) {
|
||||
return response.getData();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("获取用户列表失败:{}", e.getMessage());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建人员ID到部门名称的映射
|
||||
*
|
||||
* @param recordList 变动记录列表
|
||||
* @return 人员ID到部门名称的映射
|
||||
*/
|
||||
private Map<Long, String> buildUserIdDeptMap(List<HumanUserRecordE> recordList) {
|
||||
Map<Long, String> map = new HashMap<>();
|
||||
for (HumanUserRecordE record : recordList) {
|
||||
if (record.getUserId() != null && record.getDeptName() != null) {
|
||||
map.put(record.getUserId(), record.getDeptName());
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
package com.zcloud.human.user.command;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.jjb.saas.system.client.user.facade.UserFacade;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* HumanUser 删除执行器
|
||||
* <p>
|
||||
* 通过Dubbo调用UserFacade.delete实现人员删除。
|
||||
*
|
||||
* @author zhaolei
|
||||
* @Date 2026-06-02
|
||||
*/
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class HumanUserRemoveExe {
|
||||
|
||||
@DubboReference
|
||||
private UserFacade userFacade;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void execute(Long id) {
|
||||
log.info("开始删除人员信息,ID:{}", id);
|
||||
|
||||
try {
|
||||
userFacade.delete(id);
|
||||
} catch (Exception e) {
|
||||
throw new BizException("删除人员信息失败:" + e.getMessage());
|
||||
}
|
||||
|
||||
log.info("删除人员信息成功,ID:{}", id);
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void execute(Long[] ids) {
|
||||
log.info("开始批量删除人员信息,数量:{}", ids.length);
|
||||
for (Long id : ids) {
|
||||
execute(id);
|
||||
}
|
||||
log.info("批量删除人员信息成功,数量:{}", ids.length);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,487 @@
|
|||
package com.zcloud.human.user.command;
|
||||
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.json.JSONArray;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.cloud.commons.lang.StringUtils;
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.jjb.saas.system.client.role.facade.RoleFacade;
|
||||
import com.jjb.saas.system.client.role.response.RoleCO;
|
||||
import com.jjb.saas.system.client.user.facade.UserFacade;
|
||||
import com.jjb.saas.system.client.user.request.RoleDeptAddCmd;
|
||||
import com.jjb.saas.system.client.user.request.UserAddCmd;
|
||||
import com.jjb.saas.system.client.user.response.UserCO;
|
||||
import com.zcloud.gbscommon.zcloudcorp.face.ZcloudCorpFacade;
|
||||
import com.zcloud.gbscommon.zcloudcorp.response.ZcloudCorpInfoCO;
|
||||
import com.zcloud.gbscommon.zclouddepartment.face.ZcloudDepartmentFacade;
|
||||
import com.zcloud.gbscommon.zclouddepartment.response.ZcloudDepartmentInfoCo;
|
||||
import com.zcloud.gbscommon.zclouduser.facade.ZcloudUserFacade;
|
||||
import com.zcloud.gbscommon.zclouduser.request.ZcloudUserAddCmd;
|
||||
import com.zcloud.human.user.domain.gateway.HumanUserGateway;
|
||||
import com.zcloud.human.user.domain.gateway.HumanUserRecordGateway;
|
||||
import com.zcloud.human.user.domain.model.HumanUserE;
|
||||
import com.zcloud.human.user.domain.model.HumanUserRecordE;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 人资人员数据同步执行器
|
||||
* <p>
|
||||
* 第三方仅提供一个全量人员数据接口,先一次性获取全量数据,再按本系统公司、部门、人员存在性校验后同步到底座用户中心。
|
||||
*
|
||||
* @author zhaolei
|
||||
* @Date 2026-06-01
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
@Slf4j
|
||||
public class HumanUserSyncExe {
|
||||
|
||||
/**
|
||||
* 本系统公司名称,用于查询本系统企业ID和部门。
|
||||
*/
|
||||
private static final String SYSTEM_CORP_NAME = "秦皇岛港股份有限公司";
|
||||
|
||||
/**
|
||||
* 第三方数据中要查找的目标企业名称,用于过滤人员数据。
|
||||
*/
|
||||
private static final String TARGET_CORP_NAME = "秦港股份";
|
||||
|
||||
/**
|
||||
* 第三方全量人员数据接口地址。
|
||||
*/
|
||||
private static final String USER_INFO_URL = "http://192.168.10.56:8090";
|
||||
|
||||
@DubboReference
|
||||
private UserFacade userFacade;
|
||||
|
||||
@DubboReference
|
||||
private RoleFacade roleFacade;
|
||||
|
||||
@DubboReference
|
||||
private ZcloudUserFacade zcloudUserFacade;
|
||||
|
||||
@DubboReference
|
||||
private ZcloudDepartmentFacade deptFacade;
|
||||
|
||||
@DubboReference
|
||||
private ZcloudCorpFacade zcloudCorpFacade;
|
||||
|
||||
private final HumanUserGateway humanUserGateway;
|
||||
private final HumanUserRecordGateway humanUserRecordGateway;
|
||||
|
||||
/**
|
||||
* 执行同步
|
||||
*
|
||||
* @param param 同步参数(预留扩展)
|
||||
* @return 同步结果描述
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public String execute(String param) {
|
||||
log.info("============获取人资全量人员信息开始==========");
|
||||
|
||||
Long corpId = getTargetCorpId();
|
||||
if (corpId == null) {
|
||||
log.warn("本系统不存在公司:{},终止同步", SYSTEM_CORP_NAME);
|
||||
return "同步终止:本系统不存在公司" + SYSTEM_CORP_NAME;
|
||||
}
|
||||
|
||||
Map<String, Long> deptNameIdMap = getTargetCorpDeptNameIdMap(corpId);
|
||||
if (deptNameIdMap.isEmpty()) {
|
||||
log.warn("本系统公司:{} 下没有可用部门,终止同步", SYSTEM_CORP_NAME);
|
||||
return "同步终止:本系统公司" + SYSTEM_CORP_NAME + "下没有可用部门";
|
||||
}
|
||||
|
||||
String result = "";
|
||||
if("manual".equals(param)){
|
||||
result = getSimulationData();
|
||||
}else{
|
||||
result = getUserInfo();
|
||||
}
|
||||
JSONArray userArray = parseUserArray(result);
|
||||
int userInfoCount = userArray.size();
|
||||
log.info("人资人员信息总数:{}", userInfoCount);
|
||||
|
||||
if (userInfoCount == 0) {
|
||||
log.info("无人员数据需要同步");
|
||||
return "无人员数据需要同步";
|
||||
}
|
||||
|
||||
int[] syncResult = syncUserData(userArray, corpId, deptNameIdMap);
|
||||
String message = String.format("同步完成:成功 %d 条,跳过 %d 条,失败 %d 条",
|
||||
syncResult[0], syncResult[1], syncResult[2]);
|
||||
log.info("============获取人资全量人员信息结束==========");
|
||||
log.info(message);
|
||||
return message;
|
||||
}
|
||||
|
||||
/**
|
||||
* 同步用户数据
|
||||
*
|
||||
* @param jsonArray 第三方人员JSON数组
|
||||
* @param corpId 本系统公司ID
|
||||
* @param deptNameIdMap 本系统公司、部门名称与ID映射
|
||||
* @return int[] {成功数, 跳过数, 失败数}
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int[] syncUserData(JSONArray jsonArray, Long corpId, Map<String, Long> deptNameIdMap) {
|
||||
int successCount = 0;
|
||||
int skipCount = 0;
|
||||
int failCount = 0;
|
||||
|
||||
for (int i = 0; i < jsonArray.size(); i++) {
|
||||
try {
|
||||
JSONObject jsonObject = jsonArray.getJSONObject(i);
|
||||
String employeeName = jsonObject.getStr("employee_name");
|
||||
String corporationName = jsonObject.getStr("corporation_name");
|
||||
String deptName = jsonObject.getStr("dept_name");
|
||||
String idCardNumber = jsonObject.getStr("id_card_number");
|
||||
// TODO 岗位留白
|
||||
|
||||
if (StringUtils.isEmpty(employeeName) || StringUtils.isEmpty(corporationName) || StringUtils.isEmpty(deptName)) {
|
||||
log.warn("跳过无效人员数据:公司、部门或姓名为空,原始数据:{}", jsonObject);
|
||||
skipCount++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!TARGET_CORP_NAME.equals(corporationName)) {
|
||||
log.debug("跳过非目标公司人员:{},公司:{}", employeeName, corporationName);
|
||||
skipCount++;
|
||||
continue;
|
||||
}
|
||||
|
||||
Long deptId = deptNameIdMap.get(deptName);
|
||||
if (deptId == null) {
|
||||
log.warn("跳过人员:{},本系统公司:{} 下不存在部门:{}", employeeName, SYSTEM_CORP_NAME, deptName);
|
||||
skipCount++;
|
||||
continue;
|
||||
}
|
||||
|
||||
// 步骤1:通过身份证号查询人资用户表,判断人员是否已存在
|
||||
HumanUserE existingHumanUser = humanUserGateway.getByIdCardNumber(idCardNumber);
|
||||
if (existingHumanUser != null) {
|
||||
// 人员已存在于human_user表
|
||||
String existingDeptName = existingHumanUser.getDeptName();
|
||||
if (!deptName.equals(existingDeptName)) {
|
||||
// 步骤2:部门发生变更
|
||||
log.info("人员:{} 部门变更,原部门:{},新部门:{}", employeeName, existingDeptName, deptName);
|
||||
// 2.1 保存人资每日变动记录
|
||||
HumanUserRecordE record = buildHumanUserRecord(jsonObject, null);
|
||||
humanUserRecordGateway.add(record);
|
||||
|
||||
// 2.2 更新人资用户表中的部门信息
|
||||
existingHumanUser.setDeptName(deptName);
|
||||
existingHumanUser.setDeptCode(jsonObject.getStr("dept_code"));
|
||||
existingHumanUser.setUpdateTime(LocalDateTime.now());
|
||||
humanUserGateway.update(existingHumanUser);
|
||||
successCount++;
|
||||
} else {
|
||||
// 部门未变更,跳过处理
|
||||
log.debug("人员:{} 信息未变更,跳过", employeeName);
|
||||
skipCount++;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
// 步骤3:判断统一用户管理(user表)是否存在该人员
|
||||
Long existingUserId = isUserExists(deptId, employeeName);
|
||||
if (existingUserId != null) {
|
||||
// 人员不存在于human_user表,保存新人资用户
|
||||
HumanUserE newHumanUser = buildHumanUser(jsonObject);
|
||||
newHumanUser.setUserId(existingUserId);
|
||||
humanUserGateway.add(newHumanUser);
|
||||
log.debug("保存人资用户表:{},身份证号:{}", employeeName, idCardNumber);
|
||||
// 统一用户已存在,保存变动记录(关联已存在的用户ID)
|
||||
log.info("统一用户管理已存在人员:{},用户ID:{},保存变动记录", employeeName, existingUserId);
|
||||
HumanUserRecordE record = buildHumanUserRecord(jsonObject, existingUserId);
|
||||
humanUserRecordGateway.add(record);
|
||||
skipCount++;
|
||||
} else {
|
||||
// 统一用户不存在,创建新账号
|
||||
Long newUserId = addThirdPartyUser(jsonObject, corpId, deptId);
|
||||
if (newUserId != null) {
|
||||
// 人员不存在于human_user表,保存新人资用户
|
||||
HumanUserE newHumanUser = buildHumanUser(jsonObject);
|
||||
newHumanUser.setUserId(newUserId);
|
||||
humanUserGateway.add(newHumanUser);
|
||||
log.debug("新增统一用户管理账号成功:{},身份证号:{},用户ID:{}", employeeName, idCardNumber, newUserId);
|
||||
// 保存变动记录(关联新创建的用户ID)
|
||||
HumanUserRecordE record = buildHumanUserRecord(jsonObject, newUserId);
|
||||
humanUserRecordGateway.add(record);
|
||||
successCount++;
|
||||
} else {
|
||||
failCount++;
|
||||
log.error("新增统一用户管理账号失败:{},身份证号:{}", employeeName, idCardNumber);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("同步用户数据失败:{}", e.getMessage());
|
||||
failCount++;
|
||||
}
|
||||
}
|
||||
|
||||
return new int[]{successCount, skipCount, failCount};
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增第三方人员到底座用户中心
|
||||
*
|
||||
* @param jsonObject 第三方人员JSON数据
|
||||
* @param corpId 本系统公司ID
|
||||
* @param deptId 本系统部门ID
|
||||
* @return 新增人员在统一用户管理中的ID,如果失败返回null
|
||||
*/
|
||||
private Long addThirdPartyUser(JSONObject jsonObject, Long corpId, Long deptId) {
|
||||
try {
|
||||
String employeeName = jsonObject.getStr("employee_name");
|
||||
String phone = jsonObject.getStr("phone_number");
|
||||
|
||||
ZcloudUserAddCmd cmd = new ZcloudUserAddCmd();
|
||||
cmd.setPhone(phone);
|
||||
cmd.setName(employeeName);
|
||||
cmd.setCorpinfoId(corpId);
|
||||
cmd.setCorpinfoName(SYSTEM_CORP_NAME);
|
||||
cmd.setDepartmentId(deptId);
|
||||
cmd.setRoleId(getDefaultRoleId());
|
||||
// TODO 暂留岗位
|
||||
// cmd.setPostId(postId);
|
||||
SingleResponse<Long> result = zcloudUserFacade.addHumanUser(cmd);
|
||||
if (result.getData() != null) {
|
||||
return result.getData();
|
||||
}
|
||||
return null;
|
||||
} catch (Exception e) {
|
||||
log.error("新增第三方人员失败:{}", e.getMessage());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取默认角色ID。
|
||||
*/
|
||||
public Long getDefaultRoleId() {
|
||||
MultiResponse<RoleCO> multiResponse = roleFacade.listRoles();
|
||||
if (multiResponse.isSuccess()) {
|
||||
List<RoleCO> roleCOList = multiResponse.getData();
|
||||
for (RoleCO roleCO : roleCOList) {
|
||||
if (roleCO.getRoleName().contains("普通用户") || roleCO.getRoleName().contains("个人账号")) {
|
||||
return roleCO.getId();
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
/**
|
||||
* 获取公司ID。
|
||||
*/
|
||||
private Long getTargetCorpId() {
|
||||
MultiResponse<ZcloudCorpInfoCO> response = zcloudCorpFacade.getCorpList();
|
||||
if (response == null || !response.isSuccess() || response.getData() == null) {
|
||||
return null;
|
||||
}
|
||||
return response.getData().stream()
|
||||
.filter(corp -> SYSTEM_CORP_NAME.equals(corp.getCorpName()))
|
||||
.map(ZcloudCorpInfoCO::getId)
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据企业ID获取该企业下的部门名称与部门ID映射。
|
||||
*
|
||||
* @param corpId 企业ID
|
||||
* @return 部门名称与ID的映射
|
||||
*/
|
||||
private Map<String, Long> getTargetCorpDeptNameIdMap(Long corpId) {
|
||||
MultiResponse<ZcloudDepartmentInfoCo> response = deptFacade.getDeptList();
|
||||
if (response == null || !response.isSuccess() || response.getData() == null) {
|
||||
log.warn("获取部门列表失败");
|
||||
return Collections.emptyMap();
|
||||
}
|
||||
|
||||
Map<String, Long> result = new HashMap<>();
|
||||
for (ZcloudDepartmentInfoCo dept : response.getData()) {
|
||||
if (corpId.equals(dept.getCorpinfoId())) {
|
||||
result.put(dept.getName(), dept.getId());
|
||||
log.debug("找到企业[{}]下的部门:{} (ID: {})", corpId, dept.getName(), dept.getId());
|
||||
}
|
||||
}
|
||||
|
||||
log.info("企业[{}]下共找到 {} 个部门", corpId, result.size());
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据部门ID和人员姓名判断人员是否已经存在,并返回人员ID。
|
||||
*
|
||||
* @param deptId 部门ID
|
||||
* @param employeeName 人员姓名
|
||||
* @return 人员ID,如果不存在返回null
|
||||
*/
|
||||
private Long isUserExists(Long deptId, String employeeName) {
|
||||
MultiResponse<UserCO> response = userFacade.listByOrgId(deptId);
|
||||
if (response == null || !response.isSuccess() || response.getData() == null) {
|
||||
return null;
|
||||
}
|
||||
return response.getData().stream()
|
||||
.filter(user -> employeeName.equals(user.getName()))
|
||||
.map(UserCO::getId)
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取人资全量人员信息
|
||||
*
|
||||
* @return 第三方接口原始响应JSON字符串
|
||||
*/
|
||||
public static String getUserInfo() {
|
||||
try {
|
||||
String result = HttpRequest.post(USER_INFO_URL)
|
||||
.timeout(30000)
|
||||
.execute()
|
||||
.body();
|
||||
|
||||
log.debug("获取人资全量人员数据成功");
|
||||
return result;
|
||||
} catch (Exception e) {
|
||||
log.error("获取人资全量人员信息失败:{}", e.getMessage());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 从第三方返回结果中解析人员数组。
|
||||
* <p>
|
||||
* 兼容以下结构:
|
||||
* 1. 根节点就是数组:[...]
|
||||
* 2. 根节点对象中包含 data/list/records/rows 任一数组字段
|
||||
* 3. data 是对象,data 中包含 list/records/rows 任一数组字段
|
||||
*
|
||||
* @param result 第三方接口原始响应
|
||||
* @return 人员数组
|
||||
*/
|
||||
private static JSONArray parseUserArray(String result) {
|
||||
if (StringUtils.isEmpty(result)) {
|
||||
return new JSONArray();
|
||||
}
|
||||
|
||||
Object json = JSONUtil.parse(result);
|
||||
if (json instanceof JSONArray) {
|
||||
return (JSONArray) json;
|
||||
}
|
||||
|
||||
if (!(json instanceof JSONObject)) {
|
||||
return new JSONArray();
|
||||
}
|
||||
|
||||
JSONObject root = (JSONObject) json;
|
||||
JSONArray array = getArray(root, "data", "list", "records", "rows");
|
||||
if (array != null) {
|
||||
return array;
|
||||
}
|
||||
|
||||
JSONObject dataObject = root.getJSONObject("data");
|
||||
if (dataObject != null) {
|
||||
array = getArray(dataObject, "list", "records", "rows");
|
||||
if (array != null) {
|
||||
return array;
|
||||
}
|
||||
}
|
||||
|
||||
return new JSONArray();
|
||||
}
|
||||
|
||||
private static JSONArray getArray(JSONObject object, String... keys) {
|
||||
for (String key : keys) {
|
||||
JSONArray array = object.getJSONArray(key);
|
||||
if (array != null) {
|
||||
return array;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 从JSON对象构建HumanUserE实体
|
||||
*
|
||||
* @param jsonObject 第三方人员JSON数据
|
||||
* @return HumanUserE实体
|
||||
*/
|
||||
private HumanUserE buildHumanUser(JSONObject jsonObject) {
|
||||
HumanUserE humanUserE = new HumanUserE();
|
||||
humanUserE.initFromJson(jsonObject);
|
||||
humanUserE.setCreateTime(LocalDateTime.now());
|
||||
humanUserE.setUpdateTime(LocalDateTime.now());
|
||||
return humanUserE;
|
||||
}
|
||||
|
||||
/**
|
||||
* 从JSON对象构建HumanUserRecordE实体(变动记录)
|
||||
*
|
||||
* @param jsonObject 第三方人员JSON数据
|
||||
* @param userId 统一用户管理用户ID(可为null)
|
||||
* @return HumanUserRecordE实体
|
||||
*/
|
||||
private HumanUserRecordE buildHumanUserRecord(JSONObject jsonObject, Long userId) {
|
||||
HumanUserRecordE recordE = new HumanUserRecordE();
|
||||
recordE.initFromJson(jsonObject);
|
||||
recordE.setUserId(userId);
|
||||
|
||||
return recordE;
|
||||
}
|
||||
|
||||
/**
|
||||
* 模拟数据
|
||||
*/
|
||||
private String getSimulationData(){
|
||||
return "[\n" +
|
||||
"\t{\n" +
|
||||
"\t\t\"corporation_code\": \"1976974388809424896\",\n" +
|
||||
"\t\t\"corporation_name\": \"秦皇岛港股份有限公司\",\n" +
|
||||
"\t\t\"dept_name\": \"安全监督部\",\n" +
|
||||
"\t\t\"dept_code\": \"0c26b24b536d4a76819b658ba5d48fa6\",\n" +
|
||||
"\t\t\"dept_level\": \"1\",\n" +
|
||||
"\t\t\"dept_code_path\": \"qhd-port-corp-dept-001\",\n" +
|
||||
"\t\t\"superior_organization_code\": \"qhd-port-corp\",\n" +
|
||||
"\t\t\"employee_name\": \"张伟\",\n" +
|
||||
"\t\t\"employee_gender\": \"男\",\n" +
|
||||
"\t\t\"employee_age\": 35,\n" +
|
||||
"\t\t\"position_name\": \"总经理\",\n" +
|
||||
"\t\t\"job_name\": \"总经理\",\n" +
|
||||
"\t\t\"entry_time\": \"2020-01-15 00:00:00\",\n" +
|
||||
"\t\t\"employee_status\": \"在职\",\n" +
|
||||
"\t\t\"id_card_number\": \"13030019890115001X\",\n" +
|
||||
"\t\t\"phone_number\": \"13800138001\"\n" +
|
||||
"\t},\n" +
|
||||
"\t{\n" +
|
||||
"\t\t\"corporation_code\": \"1976974388809424896\",\n" +
|
||||
"\t\t\"corporation_name\": \"秦皇岛港股份有限公司\",\n" +
|
||||
"\t\t\"dept_name\": \"安监一部\",\n" +
|
||||
"\t\t\"dept_code\": \"249b740d75bb44278a2538d3c4d8d65b\",\n" +
|
||||
"\t\t\"dept_level\": \"1\",\n" +
|
||||
"\t\t\"dept_code_path\": \"qhd-port-corp-dept-001\",\n" +
|
||||
"\t\t\"superior_organization_code\": \"qhd-port-corp\",\n" +
|
||||
"\t\t\"employee_name\": \"九九\",\n" +
|
||||
"\t\t\"employee_gender\": \"男\",\n" +
|
||||
"\t\t\"employee_age\": 35,\n" +
|
||||
"\t\t\"position_name\": \"总经理\",\n" +
|
||||
"\t\t\"job_name\": \"总经理\",\n" +
|
||||
"\t\t\"entry_time\": \"2020-01-15 00:00:00\",\n" +
|
||||
"\t\t\"employee_status\": \"在职\",\n" +
|
||||
"\t\t\"id_card_number\": \"13030019890115002X\",\n" +
|
||||
"\t\t\"phone_number\": \"13800138002\"\n" +
|
||||
"\t}\n" +
|
||||
"]";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
package com.zcloud.human.user.command;
|
||||
|
||||
import com.alibaba.cola.dto.Response;
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.jjb.saas.system.client.user.facade.UserFacade;
|
||||
import com.jjb.saas.system.client.user.request.UserUpdateCmd;
|
||||
import com.zcloud.human.user.dto.HumanUserUpdateCmd;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* HumanUser 更新执行器
|
||||
* <p>
|
||||
* 通过Dubbo调用UserFacade.update实现人员修改。
|
||||
*
|
||||
* @author zhaolei
|
||||
* @Date 2026-06-02
|
||||
*/
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class HumanUserUpdateExe {
|
||||
|
||||
@DubboReference
|
||||
private UserFacade userFacade;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void execute(UserUpdateCmd cmd) {
|
||||
log.info("开始更新人员信息,ID:{}", cmd.getId());
|
||||
Response response = userFacade.update(cmd);
|
||||
if (response == null || !response.isSuccess()) {
|
||||
throw new BizException("更新人员信息失败");
|
||||
}
|
||||
|
||||
log.info("更新人员信息成功,ID:{}", cmd.getId());
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
package com.zcloud.human.user.command.query;
|
||||
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.jjb.saas.system.client.user.facade.UserFacade;
|
||||
import com.jjb.saas.system.client.user.response.UserCO;
|
||||
import com.jjb.saas.system.client.user.response.UserDetailCO;
|
||||
import com.zcloud.human.user.dto.HumanUserListQry;
|
||||
import com.zcloud.human.user.dto.HumanUserPageQry;
|
||||
import com.zcloud.human.user.dto.clientobject.HumanUserCO;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
/**
|
||||
* HumanUser 查询执行器
|
||||
* <p>
|
||||
* 当前需求仅要求使用UserFacade实现新增、删除、修改,查询接口保留空结果实现。
|
||||
*
|
||||
* @author zhaolei
|
||||
* @Date 2026-06-02
|
||||
*/
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class HumanUserQueryExe {
|
||||
@DubboReference
|
||||
private UserFacade userFacade;
|
||||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
public PageResponse<HumanUserCO> execute(HumanUserPageQry qry) {
|
||||
return PageResponse.of(Collections.emptyList(), 0, qry.getPageSize(), qry.getPageIndex());
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有
|
||||
*/
|
||||
public MultiResponse<HumanUserCO> execute(HumanUserListQry qry) {
|
||||
return MultiResponse.of(Collections.emptyList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID查询
|
||||
*/
|
||||
public SingleResponse<UserDetailCO> execute(Long id) {
|
||||
return userFacade.getDetail(id);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
package com.zcloud.human.user.service;
|
||||
|
||||
import com.zcloud.human.user.command.HumanDeptSyncExe;
|
||||
import com.zcloud.human.user.command.HumanUserDeptCompareSyncExe;
|
||||
import com.zcloud.human.user.command.HumanUserSyncExe;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class AsyncSyncService {
|
||||
|
||||
private final HumanUserSyncExe humanUserSyncExe;
|
||||
private final HumanDeptSyncExe humanDeptSyncExe;
|
||||
private final HumanUserDeptCompareSyncExe humanUserDeptCompareSyncExe;
|
||||
|
||||
@Async("syncTaskExecutor")
|
||||
public void asyncSyncHumanUser(String param) {
|
||||
log.info("开始异步同步人资人员信息");
|
||||
try {
|
||||
String result = humanUserSyncExe.execute(param);
|
||||
log.info("异步同步人资人员信息完成:{}", result);
|
||||
} catch (Exception e) {
|
||||
log.error("异步同步人资人员信息失败:{}", e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
@Async("syncTaskExecutor")
|
||||
public void asyncSyncHumanDept(String param) {
|
||||
log.info("开始异步同步人资部门信息");
|
||||
try {
|
||||
String result = humanDeptSyncExe.execute(param);
|
||||
log.info("异步同步人资部门信息完成:{}", result);
|
||||
} catch (Exception e) {
|
||||
log.error("异步同步人资部门信息失败:{}", e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
@Async("syncTaskExecutor")
|
||||
public void asyncSyncDeptCompare(String param) {
|
||||
log.info("开始异步同步人资部门对比");
|
||||
try {
|
||||
String result = humanUserDeptCompareSyncExe.execute(param);
|
||||
log.info("异步同步人资部门对比完成:{}", result);
|
||||
} catch (Exception e) {
|
||||
log.error("异步同步人资部门对比失败:{}", e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
package com.zcloud.human.user.service;
|
||||
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.jjb.saas.system.client.user.request.UserAddCmd;
|
||||
import com.jjb.saas.system.client.user.request.UserUpdateCmd;
|
||||
import com.jjb.saas.system.client.user.response.UserDetailCO;
|
||||
import com.zcloud.human.user.api.HumanUserServiceI;
|
||||
import com.zcloud.human.user.command.HumanUserAddExe;
|
||||
import com.zcloud.human.user.command.HumanUserRemoveExe;
|
||||
import com.zcloud.human.user.command.HumanDeptSyncExe;
|
||||
import com.zcloud.human.user.command.HumanUserSyncExe;
|
||||
import com.zcloud.human.user.command.HumanUserUpdateExe;
|
||||
import com.zcloud.human.user.command.query.HumanUserQueryExe;
|
||||
import com.zcloud.human.user.dto.HumanUserListQry;
|
||||
import com.zcloud.human.user.dto.HumanUserPageQry;
|
||||
import com.zcloud.human.user.dto.clientobject.HumanUserCO;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* HumanUser 服务实现
|
||||
* <p>
|
||||
* 增删改操作通过Dubbo调用底座UserFacade实现
|
||||
*
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
@Slf4j
|
||||
public class HumanUserServiceImpl implements HumanUserServiceI {
|
||||
|
||||
private final HumanUserAddExe humanUserAddExe;
|
||||
private final HumanUserUpdateExe humanUserUpdateExe;
|
||||
private final HumanUserRemoveExe humanUserRemoveExe;
|
||||
private final HumanUserQueryExe humanUserQueryExe;
|
||||
private final HumanUserSyncExe humanUserSyncExe;
|
||||
private final HumanDeptSyncExe humanDeptSyncExe;
|
||||
|
||||
@Override
|
||||
public PageResponse<HumanUserCO> listPage(HumanUserPageQry qry) {
|
||||
return humanUserQueryExe.execute(qry);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MultiResponse<HumanUserCO> list(HumanUserListQry qry) {
|
||||
return humanUserQueryExe.execute(qry);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SingleResponse<UserDetailCO> getInfoById(Long id) {
|
||||
return humanUserQueryExe.execute(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SingleResponse<HumanUserCO> add(UserAddCmd cmd) {
|
||||
humanUserAddExe.execute(cmd);
|
||||
return SingleResponse.buildSuccess();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void edit(UserUpdateCmd cmd) {
|
||||
humanUserUpdateExe.execute(cmd);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove(Long id) {
|
||||
humanUserRemoveExe.execute(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeBatch(Long[] ids) {
|
||||
humanUserRemoveExe.execute(ids);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.zcloud.human.user</groupId>
|
||||
<artifactId>zcloud_gbs_human_user</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>web-client</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>web-client</name>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.zcloud.human.user</groupId>
|
||||
<artifactId>web-domain</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.jjb.saas</groupId>
|
||||
<artifactId>jjb-saas-application-client</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.jjb.saas</groupId>
|
||||
<artifactId>jjb-saas-system-client</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.jjb.saas</groupId>
|
||||
<artifactId>jjb-saas-framework-enums</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.jjb.saas</groupId>
|
||||
<artifactId>jjb-saas-open-platform-sdk</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.jjb.saas</groupId>
|
||||
<artifactId>jjb-saas-framework-client</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.validation</groupId>
|
||||
<artifactId>validation-api</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
package com.zcloud.human.user.api;
|
||||
|
||||
import com.alibaba.cola.dto.MultiResponse;
|
||||
import com.alibaba.cola.dto.PageResponse;
|
||||
import com.alibaba.cola.dto.Response;
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.jjb.saas.system.client.user.request.UserAddCmd;
|
||||
import com.jjb.saas.system.client.user.request.UserUpdateCmd;
|
||||
import com.jjb.saas.system.client.user.response.UserDetailCO;
|
||||
import com.zcloud.human.user.dto.HumanUserAddCmd;
|
||||
import com.zcloud.human.user.dto.HumanUserListQry;
|
||||
import com.zcloud.human.user.dto.HumanUserPageQry;
|
||||
import com.zcloud.human.user.dto.HumanUserUpdateCmd;
|
||||
import com.zcloud.human.user.dto.clientobject.HumanUserCO;
|
||||
|
||||
/**
|
||||
* HumanUser 服务接口
|
||||
* <p>
|
||||
* 提供人员的增删改查接口,以及人资数据同步接口。
|
||||
* 增删改操作通过Dubbo调用底座UserFacade实现。
|
||||
*
|
||||
* @author zhaolei
|
||||
* @Date 2026-06-02
|
||||
*/
|
||||
public interface HumanUserServiceI {
|
||||
|
||||
/**
|
||||
* 分页查询人员列表
|
||||
*
|
||||
* @param qry 查询条件
|
||||
* @return 人员分页结果
|
||||
*/
|
||||
PageResponse<HumanUserCO> listPage(HumanUserPageQry qry);
|
||||
|
||||
/**
|
||||
* 查询所有人员列表
|
||||
*
|
||||
* @param qry 查询条件
|
||||
* @return 人员列表
|
||||
*/
|
||||
MultiResponse<HumanUserCO> list(HumanUserListQry qry);
|
||||
|
||||
/**
|
||||
* 根据ID获取人员详情
|
||||
*
|
||||
* @param id 主键ID
|
||||
* @return 人员详情
|
||||
*/
|
||||
SingleResponse<UserDetailCO> getInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 新增人员信息
|
||||
*
|
||||
* @param cmd 新增命令
|
||||
* @return 新增结果
|
||||
*/
|
||||
SingleResponse<HumanUserCO> add(UserAddCmd cmd);
|
||||
|
||||
/**
|
||||
* 修改人员信息
|
||||
*
|
||||
* @param cmd 修改命令
|
||||
*/
|
||||
void edit(UserUpdateCmd cmd);
|
||||
|
||||
/**
|
||||
* 删除人员信息
|
||||
*
|
||||
* @param id 主键ID
|
||||
*/
|
||||
void remove(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除人员信息
|
||||
*
|
||||
* @param ids ID数组
|
||||
*/
|
||||
void removeBatch(Long[] ids);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,162 @@
|
|||
package com.zcloud.human.user.dto;
|
||||
|
||||
import com.alibaba.cola.dto.Command;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* HumanUser 新增命令
|
||||
*
|
||||
* @author zhaolei
|
||||
* @Date 2026-06-02
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class HumanUserAddCmd extends Command {
|
||||
|
||||
@ApiModelProperty(value = "业务主键id老系统id", name = "userId")
|
||||
private String userId;
|
||||
|
||||
@ApiModelProperty(value = "登录账号", name = "username", required = true)
|
||||
private String username;
|
||||
|
||||
@ApiModelProperty(value = "姓名", name = "name", required = true)
|
||||
@NotEmpty(message = "姓名不能为空")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "企业id", name = "corpinfoId", required = true)
|
||||
private Long corpinfoId;
|
||||
|
||||
@ApiModelProperty(value = "是否主账号1是0否", name = "mainCorpFlag", required = true)
|
||||
@NotNull(message = "是否主账号1是0否不能为空")
|
||||
private Integer mainCorpFlag;
|
||||
|
||||
@ApiModelProperty(value = "用户类型,1监管2企业3相关方", name = "userType", required = true)
|
||||
@NotNull(message = "用户类型,1监管2企业3相关方不能为空")
|
||||
private Integer userType;
|
||||
|
||||
@ApiModelProperty(value = "部门id", name = "departmentId", required = true)
|
||||
@NotNull(message = "部门id不能为空")
|
||||
private Long departmentId;
|
||||
|
||||
@ApiModelProperty(value = "岗位id", name = "postId")
|
||||
private Long postId;
|
||||
|
||||
@ApiModelProperty(value = "角色id", name = "roleId", required = true)
|
||||
private Long roleId;
|
||||
|
||||
@ApiModelProperty(value = "邮箱", name = "email")
|
||||
private String email;
|
||||
|
||||
@ApiModelProperty(value = "手机号", name = "phone")
|
||||
@NotEmpty(message = "手机号不能为空")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty(value = "人员类型编码(主要负责人等)", name = "personnelType", required = true)
|
||||
private String personnelType;
|
||||
|
||||
@ApiModelProperty(value = "人员类型翻译", name = "personnelTypeName", required = true)
|
||||
private String personnelTypeName;
|
||||
|
||||
@ApiModelProperty(value = "民族编码", name = "nation")
|
||||
private String nation;
|
||||
|
||||
@ApiModelProperty(value = "民族名称", name = "nationName")
|
||||
private String nationName;
|
||||
|
||||
@ApiModelProperty(value = "身份证号", name = "userIdCard")
|
||||
@NotEmpty(message = "身份证号不能为空")
|
||||
private String userIdCard;
|
||||
|
||||
@ApiModelProperty(value = "人脸头像url", name = "userAvatarUrl")
|
||||
private String userAvatarUrl;
|
||||
|
||||
@ApiModelProperty(value = "现住址", name = "currentAddress")
|
||||
private String currentAddress;
|
||||
|
||||
@ApiModelProperty(value = "户口所在地", name = "locationAddress")
|
||||
private String locationAddress;
|
||||
@ApiModelProperty(value = "职级", name = "rankLevel")
|
||||
private String rankLevel;
|
||||
@ApiModelProperty(value = "职级名称", name = "rankLevelName")
|
||||
private String rankLevelName;
|
||||
|
||||
// TODO 待确认企业端和监管端是否必填
|
||||
@ApiModelProperty(value = "人员在部门中的排序", name = "sort")
|
||||
private Integer sort;
|
||||
|
||||
@ApiModelProperty(value = "描述", name = "remarks")
|
||||
private String remarks;
|
||||
@ApiModelProperty(value = "是否部门领导0否1是", name = "departmentLeaderFlag")
|
||||
@NotNull(message = "是否部门领导不能为空")
|
||||
private Integer departmentLeaderFlag;
|
||||
|
||||
@ApiModelProperty(value = "是否分管领导0否1是", name = "deputyLeaderFlag")
|
||||
private Integer deputyLeaderFlag;
|
||||
|
||||
@ApiModelProperty(value = "文化程度 数据字典", name = "culturalLevel")
|
||||
private String culturalLevel;
|
||||
|
||||
@ApiModelProperty(value = "文化程度名称", name = "culturalLevelName")
|
||||
private String culturalLevelName;
|
||||
|
||||
@ApiModelProperty(value = "婚姻状态", name = "maritalStatus")
|
||||
private String maritalStatus;
|
||||
|
||||
@ApiModelProperty(value = "婚姻状态名称", name = "maritalStatusName")
|
||||
private String maritalStatusName;
|
||||
|
||||
@ApiModelProperty(value = "政治面貌", name = "politicalAffiliation")
|
||||
private String politicalAffiliation;
|
||||
|
||||
@ApiModelProperty(value = "政治面貌名称", name = "politicalAffiliationName")
|
||||
private String politicalAffiliationName;
|
||||
|
||||
@ApiModelProperty(value = "企业名称")
|
||||
private String corpinfoName;
|
||||
@ApiModelProperty(value = "部门名称")
|
||||
private String departmentName;
|
||||
@ApiModelProperty(value = "岗位名称")
|
||||
private String postName;
|
||||
|
||||
// 入职状态
|
||||
@ApiModelProperty(value = "是否流动人员,1-流动,0-固定人员")
|
||||
private Integer flowFlag;
|
||||
// 微信openid
|
||||
@ApiModelProperty(value = "微信openid")
|
||||
private String openId;
|
||||
|
||||
@ApiModelProperty(value = "是否特殊工种")
|
||||
private Integer isSpecialJob;
|
||||
@ApiModelProperty(value = "是否为部门负责人")
|
||||
private Integer isDepaRrtmentHead;
|
||||
@ApiModelProperty(value = "是否参加三级安全培训")
|
||||
private Integer isLevelThree;
|
||||
@ApiModelProperty(value = "是否签订劳动合同")
|
||||
private Integer isSignLabor;
|
||||
@ApiModelProperty(value = "是否缴纳商业保险")
|
||||
private Integer isPay;
|
||||
@ApiModelProperty(value = "是否缴纳社保")
|
||||
private Integer isSocial;
|
||||
@ApiModelProperty(value = "社会保障号码")
|
||||
private String socialNumber;
|
||||
@ApiModelProperty(value = "是否按期缴纳工伤保险")
|
||||
private Integer isInjuriesPay;
|
||||
@ApiModelProperty(value = "工伤保险有效期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private LocalDate isInjuriesPayTime;
|
||||
@ApiModelProperty(value = "商业保险单号")
|
||||
private String payNumber;
|
||||
@ApiModelProperty(value = "是否缴纳其他人身伤害保险")
|
||||
private Integer isBf;
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package com.zcloud.human.user.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* HumanUser 列表查询
|
||||
*
|
||||
* @author zhaolei
|
||||
* @Date 2026-06-02
|
||||
*/
|
||||
@Data
|
||||
public class HumanUserListQry {
|
||||
|
||||
@ApiModelProperty(value = "用户名", name = "employeeName")
|
||||
private String employeeName;
|
||||
|
||||
@ApiModelProperty(value = "企业编码", name = "corporationCode")
|
||||
private String corporationCode;
|
||||
|
||||
@ApiModelProperty(value = "企业名称", name = "corporationName")
|
||||
private String corporationName;
|
||||
|
||||
@ApiModelProperty(value = "部门编码", name = "deptCode")
|
||||
private String deptCode;
|
||||
|
||||
@ApiModelProperty(value = "部门名称", name = "deptName")
|
||||
private String deptName;
|
||||
|
||||
@ApiModelProperty(value = "身份证号", name = "idCardNumber")
|
||||
private String idCardNumber;
|
||||
|
||||
@ApiModelProperty(value = "状态", name = "employeeStatus")
|
||||
private String employeeStatus;
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
package com.zcloud.human.user.dto;
|
||||
|
||||
import com.alibaba.cola.dto.PageQuery;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* HumanUser 分页查询
|
||||
*
|
||||
* @author zhaolei
|
||||
* @Date 2026-06-02
|
||||
*/
|
||||
@Data
|
||||
public class HumanUserPageQry extends PageQuery {
|
||||
|
||||
@ApiModelProperty(value = "用户名", name = "employeeName")
|
||||
private String employeeName;
|
||||
|
||||
@ApiModelProperty(value = "企业编码", name = "corporationCode")
|
||||
private String corporationCode;
|
||||
|
||||
@ApiModelProperty(value = "企业名称", name = "corporationName")
|
||||
private String corporationName;
|
||||
|
||||
@ApiModelProperty(value = "部门编码", name = "deptCode")
|
||||
private String deptCode;
|
||||
|
||||
@ApiModelProperty(value = "部门名称", name = "deptName")
|
||||
private String deptName;
|
||||
|
||||
@ApiModelProperty(value = "身份证号", name = "idCardNumber")
|
||||
private String idCardNumber;
|
||||
|
||||
@ApiModelProperty(value = "状态", name = "employeeStatus")
|
||||
private String employeeStatus;
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package com.zcloud.human.user.dto;
|
||||
|
||||
import com.alibaba.cola.dto.Command;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* HumanUser 删除命令
|
||||
*
|
||||
* @author zhaolei
|
||||
* @Date 2026-06-02
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class HumanUserRemoveCmd extends Command {
|
||||
|
||||
@ApiModelProperty(value = "ID数组", name = "ids", required = true)
|
||||
private Long[] ids;
|
||||
}
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
package com.zcloud.human.user.dto;
|
||||
|
||||
import com.alibaba.cola.dto.Command;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* HumanUser 更新命令
|
||||
*
|
||||
* @author zhaolei
|
||||
* @Date 2026-06-02
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class HumanUserUpdateCmd extends Command {
|
||||
|
||||
@ApiModelProperty(value = "主键ID", name = "id", required = true)
|
||||
@NotNull(message = "主键ID不能为空")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "用户名", name = "employeeName", required = true)
|
||||
@NotEmpty(message = "用户名不能为空")
|
||||
private String employeeName;
|
||||
|
||||
@ApiModelProperty(value = "用户性别", name = "employeeGender")
|
||||
private String employeeGender;
|
||||
|
||||
@ApiModelProperty(value = "年龄", name = "employeeAge")
|
||||
private Integer employeeAge;
|
||||
|
||||
@ApiModelProperty(value = "入职时间", name = "entryTime")
|
||||
private String entryTime;
|
||||
|
||||
@ApiModelProperty(value = "状态", name = "employeeStatus")
|
||||
private String employeeStatus;
|
||||
|
||||
@ApiModelProperty(value = "职务", name = "jobName")
|
||||
private String jobName;
|
||||
|
||||
@ApiModelProperty(value = "职务级别", name = "jobLevel")
|
||||
private String jobLevel;
|
||||
|
||||
@ApiModelProperty(value = "部门名称", name = "deptName", required = true)
|
||||
@NotEmpty(message = "部门名称不能为空")
|
||||
private String deptName;
|
||||
|
||||
@ApiModelProperty(value = "部门编码", name = "deptCode", required = true)
|
||||
@NotEmpty(message = "部门编码不能为空")
|
||||
private String deptCode;
|
||||
|
||||
@ApiModelProperty(value = "岗位", name = "positionName")
|
||||
private String positionName;
|
||||
|
||||
@ApiModelProperty(value = "手机号码", name = "phoneNumber", required = true)
|
||||
@NotEmpty(message = "手机号码不能为空")
|
||||
private String phoneNumber;
|
||||
|
||||
@ApiModelProperty(value = "身份证号", name = "idCardNumber", required = true)
|
||||
@NotEmpty(message = "身份证号不能为空")
|
||||
private String idCardNumber;
|
||||
|
||||
@ApiModelProperty(value = "员工照片编码", name = "employeeImagesCode")
|
||||
private String employeeImagesCode;
|
||||
|
||||
@ApiModelProperty(value = "员工照片(base64格式)", name = "employeeImages")
|
||||
private String employeeImages;
|
||||
|
||||
@ApiModelProperty(value = "企业编码", name = "corporationCode", required = true)
|
||||
@NotEmpty(message = "企业编码不能为空")
|
||||
private String corporationCode;
|
||||
|
||||
@ApiModelProperty(value = "企业名称", name = "corporationName", required = true)
|
||||
@NotEmpty(message = "企业名称不能为空")
|
||||
private String corporationName;
|
||||
}
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
package com.zcloud.human.user.dto.clientobject;
|
||||
|
||||
import com.alibaba.cola.dto.ClientObject;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* HumanUser 客户端对象
|
||||
*
|
||||
* @author zhaolei
|
||||
* @Date 2026-06-02
|
||||
*/
|
||||
@Data
|
||||
public class HumanUserCO extends ClientObject {
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "业务主键id")
|
||||
private String humanUserId;
|
||||
|
||||
@ApiModelProperty(value = "用户名")
|
||||
private String employeeName;
|
||||
|
||||
@ApiModelProperty(value = "用户性别")
|
||||
private String employeeGender;
|
||||
|
||||
@ApiModelProperty(value = "年龄")
|
||||
private Integer employeeAge;
|
||||
|
||||
@ApiModelProperty(value = "入职时间")
|
||||
private String entryTime;
|
||||
|
||||
@ApiModelProperty(value = "状态")
|
||||
private String employeeStatus;
|
||||
|
||||
@ApiModelProperty(value = "职务")
|
||||
private String jobName;
|
||||
|
||||
@ApiModelProperty(value = "职务级别")
|
||||
private String jobLevel;
|
||||
|
||||
@ApiModelProperty(value = "部门名称")
|
||||
private String deptName;
|
||||
|
||||
@ApiModelProperty(value = "部门编码")
|
||||
private String deptCode;
|
||||
|
||||
@ApiModelProperty(value = "岗位")
|
||||
private String positionName;
|
||||
|
||||
@ApiModelProperty(value = "手机号码")
|
||||
private String phoneNumber;
|
||||
|
||||
@ApiModelProperty(value = "身份证号")
|
||||
private String idCardNumber;
|
||||
|
||||
@ApiModelProperty(value = "员工照片编码")
|
||||
private String employeeImagesCode;
|
||||
|
||||
@ApiModelProperty(value = "员工照片(base64格式)")
|
||||
private String employeeImages;
|
||||
|
||||
@ApiModelProperty(value = "企业编码")
|
||||
private String corporationCode;
|
||||
|
||||
@ApiModelProperty(value = "企业名称")
|
||||
private String corporationName;
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.zcloud.human.user</groupId>
|
||||
<artifactId>zcloud_gbs_human_user</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>web-domain</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>web-domain</name>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.jjb.saas</groupId>
|
||||
<artifactId>jjb-saas-framework-domain</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.jjb.saas</groupId>
|
||||
<artifactId>jjb-saas-base-starter</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
package com.zcloud.human.user.domain.gateway;
|
||||
|
||||
import com.zcloud.human.user.domain.model.HumanUserE;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* HumanUser Gateway接口
|
||||
* 人资用户表数据访问接口
|
||||
* <p>
|
||||
* 提供人资用户表的增删改查操作,用于管理从第三方接口同步过来的人员信息。
|
||||
*
|
||||
* @author zhaolei
|
||||
* @Date 2026-06-02
|
||||
*/
|
||||
public interface HumanUserGateway {
|
||||
|
||||
/**
|
||||
* 查询用户列表
|
||||
*
|
||||
* @param qry 查询条件
|
||||
* @return 用户列表
|
||||
*/
|
||||
List<HumanUserE> list(Object qry);
|
||||
|
||||
/**
|
||||
* 根据主键ID获取用户
|
||||
*
|
||||
* @param id 主键ID
|
||||
* @return 用户实体
|
||||
*/
|
||||
HumanUserE getById(Long id);
|
||||
|
||||
/**
|
||||
* 根据身份证号获取用户
|
||||
*
|
||||
* @param idCardNumber 身份证号
|
||||
* @return 用户实体
|
||||
*/
|
||||
HumanUserE getByIdCardNumber(String idCardNumber);
|
||||
|
||||
/**
|
||||
* 新增用户
|
||||
*
|
||||
* @param humanUserE 用户实体
|
||||
* @return 是否成功
|
||||
*/
|
||||
boolean add(HumanUserE humanUserE);
|
||||
|
||||
/**
|
||||
* 更新用户
|
||||
*
|
||||
* @param humanUserE 用户实体
|
||||
* @return 是否成功
|
||||
*/
|
||||
boolean update(HumanUserE humanUserE);
|
||||
|
||||
/**
|
||||
* 删除用户
|
||||
*
|
||||
* @param id 主键ID
|
||||
* @return 是否成功
|
||||
*/
|
||||
boolean remove(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除用户
|
||||
*
|
||||
* @param ids 主键ID数组
|
||||
* @return 是否成功
|
||||
*/
|
||||
boolean removeBatch(Long[] ids);
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
package com.zcloud.human.user.domain.gateway;
|
||||
|
||||
import com.zcloud.human.user.domain.model.HumanUserRecordE;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* HumanUserRecord Gateway接口
|
||||
* 人资每日变动记录数据访问接口
|
||||
* <p>
|
||||
* 提供人资每日变动记录的增删改查操作,用于记录人员信息的每日变动情况。
|
||||
*
|
||||
* @author zhaolei
|
||||
* @Date 2026-06-02
|
||||
*/
|
||||
public interface HumanUserRecordGateway {
|
||||
|
||||
/**
|
||||
* 查询变动记录列表
|
||||
*
|
||||
* @param qry 查询条件
|
||||
* @return 变动记录列表
|
||||
*/
|
||||
List<HumanUserRecordE> list(Object qry);
|
||||
|
||||
/**
|
||||
* 根据主键ID获取变动记录
|
||||
*
|
||||
* @param id 主键ID
|
||||
* @return 变动记录实体
|
||||
*/
|
||||
HumanUserRecordE getById(Long id);
|
||||
|
||||
/**
|
||||
* 新增变动记录
|
||||
*
|
||||
* @param humanUserRecordE 变动记录实体
|
||||
* @return 是否成功
|
||||
*/
|
||||
boolean add(HumanUserRecordE humanUserRecordE);
|
||||
|
||||
/**
|
||||
* 更新变动记录
|
||||
*
|
||||
* @param humanUserRecordE 变动记录实体
|
||||
* @return 是否成功
|
||||
*/
|
||||
boolean update(HumanUserRecordE humanUserRecordE);
|
||||
|
||||
/**
|
||||
* 删除变动记录
|
||||
*
|
||||
* @param id 主键ID
|
||||
* @return 是否成功
|
||||
*/
|
||||
boolean remove(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除变动记录
|
||||
*
|
||||
* @param ids 主键ID数组
|
||||
* @return 是否成功
|
||||
*/
|
||||
boolean removeBatch(Long[] ids);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,218 @@
|
|||
package com.zcloud.human.user.domain.model;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import com.zcloud.gbscommon.utils.Tools;
|
||||
import lombok.Data;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* HumanUser 领域实体
|
||||
* 人资用户表实体
|
||||
* <p>
|
||||
* 用于存储从第三方接口同步过来的人员信息,作为人资数据的本地缓存。
|
||||
*
|
||||
* @author zhaolei
|
||||
* @Date 2026-06-02
|
||||
*/
|
||||
@Data
|
||||
public class HumanUserE {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 统一用户管理用户ID(关联底座user表)
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 业务主键ID
|
||||
*/
|
||||
private String humanUserId;
|
||||
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
private String employeeName;
|
||||
|
||||
/**
|
||||
* 用户性别
|
||||
*/
|
||||
private String employeeGender;
|
||||
|
||||
/**
|
||||
* 年龄
|
||||
*/
|
||||
private Integer employeeAge;
|
||||
|
||||
/**
|
||||
* 入职时间
|
||||
*/
|
||||
private LocalDateTime entryTime;
|
||||
|
||||
/**
|
||||
* 状态(未入职、实习生、实习结束、在职、离职、退休、劳务派遣、劳务派遣结束)
|
||||
*/
|
||||
private String employeeStatus;
|
||||
|
||||
/**
|
||||
* 职务
|
||||
*/
|
||||
private String jobName;
|
||||
|
||||
/**
|
||||
* 职务级别
|
||||
*/
|
||||
private String jobLevel;
|
||||
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 部门编码
|
||||
*/
|
||||
private String deptCode;
|
||||
|
||||
/**
|
||||
* 岗位
|
||||
*/
|
||||
private String positionName;
|
||||
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
private String phoneNumber;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
private String idCardNumber;
|
||||
|
||||
/**
|
||||
* 员工照片编码
|
||||
*/
|
||||
private String employeeImagesCode;
|
||||
|
||||
/**
|
||||
* 员工照片(base64格式,图片格式:jpg)
|
||||
*/
|
||||
private String employeeImages;
|
||||
|
||||
/**
|
||||
* 企业编码
|
||||
*/
|
||||
private String corporationCode;
|
||||
|
||||
/**
|
||||
* 企业名称
|
||||
*/
|
||||
private String corporationName;
|
||||
|
||||
/**
|
||||
* 是否确认
|
||||
*/
|
||||
private String isConfirm;
|
||||
|
||||
/**
|
||||
* 确认状态(0:未确认,1:自动确认,2:用户手动确认)
|
||||
*/
|
||||
private String confirmStatus;
|
||||
|
||||
/**
|
||||
* 乐观锁
|
||||
*/
|
||||
private Integer version;
|
||||
|
||||
/**
|
||||
* 创建人ID
|
||||
*/
|
||||
private Long createId;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
private String createName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新人ID
|
||||
*/
|
||||
private Long updateId;
|
||||
|
||||
/**
|
||||
* 修改人名称
|
||||
*/
|
||||
private String updateName;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
private String deleteEnum;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private Long tenantId;
|
||||
|
||||
/**
|
||||
* 机构ID
|
||||
*/
|
||||
private Long orgId;
|
||||
|
||||
/**
|
||||
* 环境
|
||||
*/
|
||||
private String env;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* 从JSON对象初始化实体
|
||||
*
|
||||
* @param jsonObject 第三方人员JSON数据
|
||||
*/
|
||||
public void initFromJson(JSONObject jsonObject) {
|
||||
this.setHumanUserId(Tools.get32UUID());
|
||||
this.setEmployeeName(jsonObject.getStr("employee_name"));
|
||||
this.setEmployeeGender(jsonObject.getStr("employee_gender"));
|
||||
this.setEmployeeAge(jsonObject.getInt("employee_age"));
|
||||
String entryTimeStr = jsonObject.getStr("entry_time");
|
||||
if (StringUtils.hasText(entryTimeStr)) {
|
||||
try {
|
||||
this.setEntryTime(java.time.LocalDateTime.parse(entryTimeStr,
|
||||
java.time.format.DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
|
||||
} catch (Exception e) {
|
||||
this.setEntryTime(java.time.LocalDateTime.now());
|
||||
}
|
||||
}
|
||||
this.setEmployeeStatus(jsonObject.getStr("employee_status"));
|
||||
this.setJobName(jsonObject.getStr("job_name"));
|
||||
this.setDeptName(jsonObject.getStr("dept_name"));
|
||||
this.setDeptCode(jsonObject.getStr("dept_code"));
|
||||
this.setPositionName(jsonObject.getStr("position_name"));
|
||||
this.setPhoneNumber(jsonObject.getStr("phone_number"));
|
||||
this.setIdCardNumber(jsonObject.getStr("id_card_number"));
|
||||
this.setEmployeeImagesCode(jsonObject.getStr("employee_images_code"));
|
||||
this.setEmployeeImages(jsonObject.getStr("employee_images"));
|
||||
this.setCorporationCode(jsonObject.getStr("corporation_code"));
|
||||
this.setCorporationName(jsonObject.getStr("corporation_name"));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,169 @@
|
|||
package com.zcloud.human.user.domain.model;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import com.zcloud.gbscommon.utils.Tools;
|
||||
import lombok.Data;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* HumanUserRecord 领域实体
|
||||
* 人资每日变动记录
|
||||
* <p>
|
||||
* 用于记录人员信息的每日变动情况,包括新增、部门变更等操作记录。
|
||||
*
|
||||
* @author zhaolei
|
||||
* @Date 2026-06-02
|
||||
*/
|
||||
@Data
|
||||
public class HumanUserRecordE {
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 业务主键ID
|
||||
*/
|
||||
private String userRecordId;
|
||||
|
||||
/**
|
||||
* 统一用户管理用户ID(关联底座user表)
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
private String employeeName;
|
||||
|
||||
/**
|
||||
* 性别
|
||||
*/
|
||||
private String employeeGender;
|
||||
|
||||
/**
|
||||
* 年龄
|
||||
*/
|
||||
private String employeeAge;
|
||||
|
||||
/**
|
||||
* 入职时间
|
||||
*/
|
||||
private LocalDateTime entryTime;
|
||||
|
||||
/**
|
||||
* 人员状态(未入职、实习生、实习结束、在职、离职、退休、劳务派遣、劳务派遣结束)
|
||||
*/
|
||||
private String employeeStatus;
|
||||
|
||||
/**
|
||||
* 职务
|
||||
*/
|
||||
private String jobName;
|
||||
|
||||
/**
|
||||
* 职务级别
|
||||
*/
|
||||
private String jobLevel;
|
||||
|
||||
/**
|
||||
* 部门名称
|
||||
*/
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* 部门编码
|
||||
*/
|
||||
private String deptCode;
|
||||
|
||||
/**
|
||||
* 岗位
|
||||
*/
|
||||
private String positionName;
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
private String phoneNumber;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
private String idCardNumber;
|
||||
|
||||
/**
|
||||
* 图片编码
|
||||
*/
|
||||
private String employeeImagesCode;
|
||||
|
||||
/**
|
||||
* 图片base64编码
|
||||
*/
|
||||
private String employeeImages;
|
||||
|
||||
/**
|
||||
* 企业编码
|
||||
*/
|
||||
private String corporationCode;
|
||||
|
||||
/**
|
||||
* 企业名称
|
||||
*/
|
||||
private String corporationName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 创建人ID
|
||||
*/
|
||||
private Long createId;
|
||||
|
||||
/**
|
||||
* 更新人ID
|
||||
*/
|
||||
private Long updateId;
|
||||
|
||||
/**
|
||||
* 从JSON对象初始化实体
|
||||
*
|
||||
* @param jsonObject 第三方人员JSON数据
|
||||
*/
|
||||
public void initFromJson(JSONObject jsonObject) {
|
||||
this.setUserRecordId(Tools.get32UUID());
|
||||
this.setEmployeeName(jsonObject.getStr("employee_name"));
|
||||
this.setEmployeeGender(jsonObject.getStr("employee_gender"));
|
||||
this.setEmployeeAge(jsonObject.getStr("employee_age"));
|
||||
String entryTimeStr = jsonObject.getStr("entry_time");
|
||||
if (StringUtils.hasText(entryTimeStr)) {
|
||||
try {
|
||||
this.setEntryTime(java.time.LocalDateTime.parse(entryTimeStr,
|
||||
java.time.format.DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
|
||||
} catch (Exception e) {
|
||||
this.setEntryTime(java.time.LocalDateTime.now());
|
||||
}
|
||||
}
|
||||
this.setEmployeeStatus(jsonObject.getStr("employee_status"));
|
||||
this.setJobName(jsonObject.getStr("job_name"));
|
||||
this.setJobLevel(jsonObject.getStr("job_level"));
|
||||
this.setDeptName(jsonObject.getStr("dept_name"));
|
||||
this.setDeptCode(jsonObject.getStr("dept_code"));
|
||||
this.setPositionName(jsonObject.getStr("position_name"));
|
||||
this.setPhoneNumber(jsonObject.getStr("phone_number"));
|
||||
this.setIdCardNumber(jsonObject.getStr("id_card_number"));
|
||||
this.setEmployeeImagesCode(jsonObject.getStr("employee_images_code"));
|
||||
this.setEmployeeImages(jsonObject.getStr("employee_images"));
|
||||
this.setCorporationCode(jsonObject.getStr("corporation_code"));
|
||||
this.setCorporationName(jsonObject.getStr("corporation_name"));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.zcloud.human.user</groupId>
|
||||
<artifactId>zcloud_gbs_human_user</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<zcloudGbs.service.version>1.0.0-SNAPSHOT</zcloudGbs.service.version>
|
||||
</properties>
|
||||
|
||||
<artifactId>web-infrastructure</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>web-infrastructure</name>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.zcloud.human.user</groupId>
|
||||
<artifactId>web-domain</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.jjb.saas</groupId>
|
||||
<artifactId>jjb-saas-application-client</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.jjb.saas</groupId>
|
||||
<artifactId>jjb-saas-system-client</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.jjb.saas</groupId>
|
||||
<artifactId>jjb-saas-auth-client</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.jjb.saas</groupId>
|
||||
<artifactId>jjb-saas-framework-facade</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
package com.zcloud.human.user.gatewayimpl;
|
||||
|
||||
import com.zcloud.human.user.domain.gateway.HumanUserGateway;
|
||||
import com.zcloud.human.user.domain.model.HumanUserE;
|
||||
import com.zcloud.human.user.persistence.dataobject.HumanUserDO;
|
||||
import com.zcloud.human.user.persistence.repository.HumanUserRepository;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* HumanUser Gateway实现
|
||||
*
|
||||
* @author lin
|
||||
* @Date 2025-01-01
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class HumanUserGatewayImpl implements HumanUserGateway {
|
||||
|
||||
private final HumanUserRepository humanUserRepository;
|
||||
|
||||
@Override
|
||||
public List<HumanUserE> list(Object qry) {
|
||||
return humanUserRepository.list(qry).stream()
|
||||
.map(this::convertToE)
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public HumanUserE getById(Long id) {
|
||||
HumanUserDO humanUserDO = humanUserRepository.getById(id);
|
||||
return convertToE(humanUserDO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HumanUserE getByIdCardNumber(String idCardNumber) {
|
||||
HumanUserDO humanUserDO = humanUserRepository.getByIdCardNumber(idCardNumber);
|
||||
return convertToE(humanUserDO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean add(HumanUserE humanUserE) {
|
||||
HumanUserDO humanUserDO = convertToDO(humanUserE);
|
||||
humanUserRepository.save(humanUserDO);
|
||||
humanUserE.setId(humanUserDO.getId());
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean update(HumanUserE humanUserE) {
|
||||
HumanUserDO humanUserDO = convertToDO(humanUserE);
|
||||
humanUserRepository.updateById(humanUserDO);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean remove(Long id) {
|
||||
return humanUserRepository.removeById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean removeBatch(Long[] ids) {
|
||||
return humanUserRepository.removeByIds(Arrays.asList(ids));
|
||||
}
|
||||
|
||||
private HumanUserE convertToE(HumanUserDO humanUserDO) {
|
||||
if (humanUserDO == null) {
|
||||
return null;
|
||||
}
|
||||
HumanUserE humanUserE = new HumanUserE();
|
||||
BeanUtils.copyProperties(humanUserDO, humanUserE);
|
||||
return humanUserE;
|
||||
}
|
||||
|
||||
private HumanUserDO convertToDO(HumanUserE humanUserE) {
|
||||
if (humanUserE == null) {
|
||||
return null;
|
||||
}
|
||||
HumanUserDO humanUserDO = new HumanUserDO();
|
||||
BeanUtils.copyProperties(humanUserE, humanUserDO);
|
||||
return humanUserDO;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
package com.zcloud.human.user.gatewayimpl;
|
||||
|
||||
import com.zcloud.human.user.domain.gateway.HumanUserRecordGateway;
|
||||
import com.zcloud.human.user.domain.model.HumanUserRecordE;
|
||||
import com.zcloud.human.user.persistence.dataobject.HumanUserRecordDO;
|
||||
import com.zcloud.human.user.persistence.repository.HumanUserRecordRepository;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* HumanUserRecord Gateway实现
|
||||
* 人资每日变动记录数据访问实现
|
||||
*
|
||||
* @author lin
|
||||
* @Date 2025-01-01
|
||||
*/
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class HumanUserRecordGatewayImpl implements HumanUserRecordGateway {
|
||||
|
||||
private final HumanUserRecordRepository humanUserRecordRepository;
|
||||
|
||||
@Override
|
||||
public List<HumanUserRecordE> list(Object qry) {
|
||||
return humanUserRecordRepository.list(qry).stream()
|
||||
.map(this::convertToE)
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public HumanUserRecordE getById(Long id) {
|
||||
HumanUserRecordDO humanUserRecordDO = humanUserRecordRepository.getById(id);
|
||||
return convertToE(humanUserRecordDO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean add(HumanUserRecordE humanUserRecordE) {
|
||||
HumanUserRecordDO humanUserRecordDO = convertToDO(humanUserRecordE);
|
||||
humanUserRecordRepository.save(humanUserRecordDO);
|
||||
humanUserRecordE.setId(humanUserRecordDO.getId());
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean update(HumanUserRecordE humanUserRecordE) {
|
||||
HumanUserRecordDO humanUserRecordDO = convertToDO(humanUserRecordE);
|
||||
humanUserRecordRepository.updateById(humanUserRecordDO);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean remove(Long id) {
|
||||
return humanUserRecordRepository.removeById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean removeBatch(Long[] ids) {
|
||||
return humanUserRecordRepository.removeByIds(Arrays.asList(ids));
|
||||
}
|
||||
|
||||
private HumanUserRecordE convertToE(HumanUserRecordDO humanUserRecordDO) {
|
||||
if (humanUserRecordDO == null) {
|
||||
return null;
|
||||
}
|
||||
HumanUserRecordE humanUserRecordE = new HumanUserRecordE();
|
||||
BeanUtils.copyProperties(humanUserRecordDO, humanUserRecordE);
|
||||
return humanUserRecordE;
|
||||
}
|
||||
|
||||
private HumanUserRecordDO convertToDO(HumanUserRecordE humanUserRecordE) {
|
||||
if (humanUserRecordE == null) {
|
||||
return null;
|
||||
}
|
||||
HumanUserRecordDO humanUserRecordDO = new HumanUserRecordDO();
|
||||
BeanUtils.copyProperties(humanUserRecordE, humanUserRecordDO);
|
||||
return humanUserRecordDO;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
package com.zcloud.human.user.persistence.dataobject;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.jjb.saas.framework.repository.basedo.BaseDO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* HumanUser 数据对象
|
||||
*
|
||||
* @author lin
|
||||
* @Date 2025-01-01
|
||||
*/
|
||||
@Data
|
||||
@TableName("human_user")
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class HumanUserDO extends BaseDO{
|
||||
|
||||
private Long id;
|
||||
private Long userId;
|
||||
private String humanUserId;
|
||||
private String employeeName;
|
||||
private String employeeGender;
|
||||
private Integer employeeAge;
|
||||
private LocalDateTime entryTime;
|
||||
private String employeeStatus;
|
||||
private String jobName;
|
||||
private String jobLevel;
|
||||
private String deptName;
|
||||
private String deptCode;
|
||||
private String positionName;
|
||||
private String phoneNumber;
|
||||
private String idCardNumber;
|
||||
private String employeeImagesCode;
|
||||
private String employeeImages;
|
||||
private String corporationCode;
|
||||
private String corporationName;
|
||||
private String isConfirm;
|
||||
private String confirmStatus;
|
||||
private Integer version;
|
||||
private Long createId;
|
||||
private String createName;
|
||||
private LocalDateTime createTime;
|
||||
private Long updateId;
|
||||
private String updateName;
|
||||
private LocalDateTime updateTime;
|
||||
private String deleteEnum;
|
||||
private Long tenantId;
|
||||
private Long orgId;
|
||||
private String env;
|
||||
private String remarks;
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
package com.zcloud.human.user.persistence.dataobject;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.jjb.saas.framework.repository.basedo.BaseDO;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* HumanUserRecord 数据对象
|
||||
* 人资每日变动记录
|
||||
*
|
||||
* @author lin
|
||||
* @Date 2025-01-01
|
||||
*/
|
||||
@Data
|
||||
@TableName("human_user_record")
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class HumanUserRecordDO extends BaseDO {
|
||||
|
||||
private Long id;
|
||||
private String userRecordId;
|
||||
private Long userId;
|
||||
private String employeeName;
|
||||
private String employeeGender;
|
||||
private Integer employeeAge;
|
||||
private LocalDateTime entryTime;
|
||||
private String employeeStatus;
|
||||
private String jobName;
|
||||
private String jobLevel;
|
||||
private String deptName;
|
||||
private String deptCode;
|
||||
private String positionName;
|
||||
private String phoneNumber;
|
||||
private String idCardNumber;
|
||||
private String employeeImagesCode;
|
||||
private String employeeImages;
|
||||
private String corporationCode;
|
||||
private String corporationName;
|
||||
private LocalDateTime createTime;
|
||||
private LocalDateTime updateTime;
|
||||
private Long createId;
|
||||
private Long updateId;
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.zcloud.human.user.persistence.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.zcloud.human.user.persistence.dataobject.HumanUserDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* HumanUser Mapper接口
|
||||
*
|
||||
* @author lin
|
||||
* @Date 2025-01-01
|
||||
*/
|
||||
@Mapper
|
||||
public interface HumanUserMapper extends BaseMapper<HumanUserDO> {
|
||||
|
||||
List<HumanUserDO> list(@Param("qry") Object qry);
|
||||
|
||||
HumanUserDO getByIdCardNumber(@Param("idCardNumber") String idCardNumber);
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
package com.zcloud.human.user.persistence.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.zcloud.human.user.persistence.dataobject.HumanUserRecordDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 人资用户变动记录Mapper接口
|
||||
*
|
||||
* @author lin
|
||||
* @Date 2025-01-01
|
||||
*/
|
||||
@Mapper
|
||||
public interface HumanUserRecordMapper extends BaseMapper<HumanUserRecordDO> {
|
||||
|
||||
List<HumanUserRecordDO> list(@Param("qry") Object qry);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.zcloud.human.user.persistence.repository;
|
||||
|
||||
import com.zcloud.human.user.persistence.dataobject.HumanUserRecordDO;
|
||||
import com.jjb.saas.framework.repository.repo.BaseRepository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 人资用户变动记录数据访问接口
|
||||
*
|
||||
* @author lin
|
||||
* @Date 2025-01-01
|
||||
*/
|
||||
public interface HumanUserRecordRepository extends BaseRepository<HumanUserRecordDO> {
|
||||
|
||||
List<HumanUserRecordDO> list(Object params);
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package com.zcloud.human.user.persistence.repository;
|
||||
|
||||
import com.jjb.saas.framework.repository.repo.BaseRepository;
|
||||
import com.zcloud.human.user.persistence.dataobject.HumanUserDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 人资用户数据访问接口
|
||||
*
|
||||
* @author lin
|
||||
* @Date 2025-01-01
|
||||
*/
|
||||
public interface HumanUserRepository extends BaseRepository<HumanUserDO> {
|
||||
|
||||
List<HumanUserDO> list(Object params);
|
||||
|
||||
HumanUserDO getByIdCardNumber(String idCardNumber);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package com.zcloud.human.user.persistence.repository.impl;
|
||||
|
||||
import com.alibaba.cola.dto.SingleResponse;
|
||||
import com.jjb.saas.framework.repository.repo.impl.BaseRepositoryImpl;
|
||||
import com.zcloud.human.user.persistence.dataobject.HumanUserRecordDO;
|
||||
import com.zcloud.human.user.persistence.mapper.HumanUserRecordMapper;
|
||||
import com.zcloud.human.user.persistence.repository.HumanUserRecordRepository;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* HumanUserRecord Repository实现类
|
||||
*
|
||||
* @author lin
|
||||
* @Date 2025-01-01
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class HumanUserRecordRepositoryImpl extends BaseRepositoryImpl<HumanUserRecordMapper, HumanUserRecordDO> implements HumanUserRecordRepository {
|
||||
|
||||
private final HumanUserRecordMapper humanUserRecordMapper;
|
||||
|
||||
@Override
|
||||
public List<HumanUserRecordDO> list(Object params) {
|
||||
|
||||
Object qry = params;
|
||||
System.out.println(qry);
|
||||
return humanUserRecordMapper.list(params);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package com.zcloud.human.user.persistence.repository.impl;
|
||||
|
||||
import com.jjb.saas.framework.repository.repo.impl.BaseRepositoryImpl;
|
||||
import com.zcloud.human.user.persistence.dataobject.HumanUserDO;
|
||||
import com.zcloud.human.user.persistence.mapper.HumanUserMapper;
|
||||
import com.zcloud.human.user.persistence.repository.HumanUserRepository;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* HumanUser Repository实现类
|
||||
*
|
||||
* @author lin
|
||||
* @Date 2025-01-01
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class HumanUserRepositoryImpl extends BaseRepositoryImpl<HumanUserMapper, HumanUserDO> implements HumanUserRepository {
|
||||
|
||||
private final HumanUserMapper humanUserMapper;
|
||||
|
||||
@Override
|
||||
public List<HumanUserDO> list(Object params) {
|
||||
return humanUserMapper.list(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HumanUserDO getByIdCardNumber(String idCardNumber) {
|
||||
return humanUserMapper.getByIdCardNumber(idCardNumber);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
package com.zcloud.human.user.utils;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* 分页查询辅助工具
|
||||
*
|
||||
* @author lin
|
||||
* @Date 2025-01-01
|
||||
*/
|
||||
public class PageQueryHelper {
|
||||
private static final Pattern PATTERN = Pattern.compile("([a-z])([A-Z])");
|
||||
|
||||
/**
|
||||
* 创建分页查询包装器
|
||||
*
|
||||
* @param queryWrapper 查询包装器
|
||||
* @param pageQuery 分页查询参数
|
||||
* @return 构建好查询条件的QueryWrapper
|
||||
*/
|
||||
public static <T> QueryWrapper<T> createPageQueryWrapper(QueryWrapper<T> queryWrapper, Map<String, Object> pageQuery) {
|
||||
if (pageQuery == null || pageQuery.isEmpty()) {
|
||||
return queryWrapper;
|
||||
}
|
||||
|
||||
for (Map.Entry<String, Object> entry : pageQuery.entrySet()) {
|
||||
String key = entry.getKey();
|
||||
Object value = entry.getValue();
|
||||
|
||||
// 忽略空值
|
||||
if (value == null || StringUtils.isBlank(value.toString())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// 处理不同类型的查询条件
|
||||
if (key.startsWith("like")) {
|
||||
String columnName = toUnderlineName(key.substring(4));
|
||||
queryWrapper.like(columnName, value);
|
||||
} else if (key.startsWith("eq")) {
|
||||
String columnName = toUnderlineName(key.substring(2));
|
||||
queryWrapper.eq(columnName, value);
|
||||
} else if (key.startsWith("gt")) {
|
||||
String columnName = toUnderlineName(key.substring(2));
|
||||
queryWrapper.gt(columnName, value);
|
||||
} else if (key.startsWith("lt")) {
|
||||
String columnName = toUnderlineName(key.substring(2));
|
||||
queryWrapper.lt(columnName, value);
|
||||
} else if (key.startsWith("ge")) {
|
||||
String columnName = toUnderlineName(key.substring(2));
|
||||
queryWrapper.ge(columnName, value);
|
||||
} else if (key.startsWith("le")) {
|
||||
String columnName = toUnderlineName(key.substring(2));
|
||||
queryWrapper.le(columnName, value);
|
||||
} else if (key.startsWith("ne")) {
|
||||
String columnName = toUnderlineName(key.substring(2));
|
||||
queryWrapper.ne(columnName, value);
|
||||
}
|
||||
}
|
||||
|
||||
return queryWrapper;
|
||||
}
|
||||
|
||||
/**
|
||||
* 将驼峰命名转换为下划线命名
|
||||
*
|
||||
* @param camelCaseName 驼峰命名字符串
|
||||
* @return 下划线命名字符串
|
||||
*/
|
||||
private static String toUnderlineName(String camelCaseName) {
|
||||
Matcher matcher = PATTERN.matcher(camelCaseName);
|
||||
StringBuffer sb = new StringBuffer();
|
||||
while (matcher.find()) {
|
||||
matcher.appendReplacement(sb, matcher.group(1) + "_" + matcher.group(2).toLowerCase());
|
||||
}
|
||||
matcher.appendTail(sb);
|
||||
return sb.toString().toLowerCase();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
package com.zcloud.human.user.utils;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.metadata.OrderItem;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 查询参数工具
|
||||
*
|
||||
* @author lin
|
||||
* @Date 2025-01-01
|
||||
*/
|
||||
public class Query<T> {
|
||||
|
||||
public IPage<T> getPage(Map<String, Object> params) {
|
||||
return this.getPage(params, null, false);
|
||||
}
|
||||
|
||||
public IPage<T> getPage(Map<String, Object> params, String defaultOrderField, boolean isAsc) {
|
||||
// 分页参数
|
||||
long curPage = 1;
|
||||
long limit = 10;
|
||||
|
||||
if (params.get("pageIndex") != null) {
|
||||
curPage = Long.parseLong(params.get("pageIndex").toString());
|
||||
}
|
||||
if (params.get("pageSize") != null) {
|
||||
limit = Long.parseLong(params.get("pageSize").toString());
|
||||
}
|
||||
|
||||
// 分页对象
|
||||
Page<T> page = new Page<>(curPage, limit);
|
||||
|
||||
// 没有排序字段,则不排序
|
||||
if (StringUtils.isBlank(defaultOrderField)) {
|
||||
return page;
|
||||
}
|
||||
|
||||
// 默认排序
|
||||
if (isAsc) {
|
||||
page.addOrder(OrderItem.asc(defaultOrderField));
|
||||
} else {
|
||||
page.addOrder(OrderItem.desc(defaultOrderField));
|
||||
}
|
||||
|
||||
return page;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,114 @@
|
|||
package com.zcloud.human.user.utils;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.cola.dto.Response;
|
||||
import org.slf4j.MDC;
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
/**
|
||||
* 同步分页响应
|
||||
*
|
||||
* @author lin
|
||||
* @Date 2025-01-01
|
||||
*/
|
||||
public class SyncPageResponse extends Response {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private int totalCount = 0;
|
||||
private int pageSize = 1;
|
||||
private int pageIndex = 1;
|
||||
private Object data;
|
||||
|
||||
public SyncPageResponse() {
|
||||
}
|
||||
|
||||
public int getTotalCount() {
|
||||
return this.totalCount;
|
||||
}
|
||||
|
||||
public void setTotalCount(int totalCount) {
|
||||
this.totalCount = totalCount;
|
||||
}
|
||||
|
||||
public int getPageSize() {
|
||||
return this.pageSize < 1 ? 1 : this.pageSize;
|
||||
}
|
||||
|
||||
public void setPageSize(int pageSize) {
|
||||
if (pageSize < 1) {
|
||||
this.pageSize = 1;
|
||||
} else {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
}
|
||||
|
||||
public int getPageIndex() {
|
||||
return this.pageIndex < 1 ? 1 : this.pageIndex;
|
||||
}
|
||||
|
||||
public void setPageIndex(int pageIndex) {
|
||||
if (pageIndex < 1) {
|
||||
this.pageIndex = 1;
|
||||
} else {
|
||||
this.pageIndex = pageIndex;
|
||||
}
|
||||
}
|
||||
|
||||
public Object getData() {
|
||||
return this.data;
|
||||
}
|
||||
|
||||
public void setData(Object data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public int getTotalPages() {
|
||||
return this.totalCount % this.pageSize == 0 ? this.totalCount / this.pageSize : this.totalCount / this.pageSize + 1;
|
||||
}
|
||||
|
||||
public boolean isEmpty() {
|
||||
return ObjectUtil.isEmpty(this.data);
|
||||
}
|
||||
|
||||
public boolean isNotEmpty() {
|
||||
return !this.isEmpty();
|
||||
}
|
||||
|
||||
public static SyncPageResponse buildSuccess() {
|
||||
SyncPageResponse response = new SyncPageResponse();
|
||||
response.setSuccess(true);
|
||||
response.setTraceId(MDC.get("tlogTraceId"));
|
||||
return response;
|
||||
}
|
||||
|
||||
public static SyncPageResponse buildFailure(String errCode, String errMessage) {
|
||||
SyncPageResponse response = new SyncPageResponse();
|
||||
response.setSuccess(false);
|
||||
response.setErrCode(errCode);
|
||||
response.setErrMessage(errMessage);
|
||||
response.setTraceId(MDC.get("tlogTraceId"));
|
||||
return response;
|
||||
}
|
||||
|
||||
public static <T> SyncPageResponse of(int pageSize, int pageIndex) {
|
||||
SyncPageResponse response = new SyncPageResponse();
|
||||
response.setSuccess(true);
|
||||
response.setData(Collections.emptyList());
|
||||
response.setTotalCount(0);
|
||||
response.setPageSize(pageSize);
|
||||
response.setPageIndex(pageIndex);
|
||||
response.setTraceId(MDC.get("tlogTraceId"));
|
||||
return response;
|
||||
}
|
||||
|
||||
public static <T> SyncPageResponse of(Object data, int totalCount, int pageSize, int pageIndex) {
|
||||
SyncPageResponse response = new SyncPageResponse();
|
||||
response.setSuccess(true);
|
||||
response.setData(data);
|
||||
response.setTotalCount(totalCount);
|
||||
response.setPageSize(pageSize);
|
||||
response.setPageIndex(pageIndex);
|
||||
response.setTraceId(MDC.get("tlogTraceId"));
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
CREATE TABLE `human_user` (
|
||||
`id` bigint NOT NULL COMMENT '主键',
|
||||
`human_user_id` varchar(35) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '业务主键id',
|
||||
`user_id` bigint DEFAULT NULL COMMENT '统一用户管理用户ID(关联底座user表)',
|
||||
`employee_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '用户名',
|
||||
`employee_gender` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '用户性别',
|
||||
`employee_age` int DEFAULT NULL COMMENT '年龄',
|
||||
`entry_time` datetime DEFAULT NULL COMMENT '入职时间',
|
||||
`employee_status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '状态(未入职、实习生、实习结束、在职、离职、退休、劳务派遣、劳务派遣结束)',
|
||||
`job_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '职务',
|
||||
`job_level` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '职务级别',
|
||||
`dept_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '部门名称',
|
||||
`dept_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '部门编码',
|
||||
`position_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '岗位',
|
||||
`phone_number` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '手机号码',
|
||||
`id_card_number` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '身份证号',
|
||||
`employee_images_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '员工照片编码',
|
||||
`employee_images` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '员工照片(base64 格式,图片格式:jpg)',
|
||||
`corporation_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '企业编码',
|
||||
`corporation_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '企业名称',
|
||||
`is_confirm` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '是否确认',
|
||||
`confirm_status` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '确认状态(0:未确认,1:自动确认,2:用户手动确认)',
|
||||
`version` int DEFAULT NULL COMMENT '乐观锁',
|
||||
`create_id` bigint DEFAULT NULL COMMENT '创建人',
|
||||
`create_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '创建人姓名',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_id` bigint DEFAULT NULL COMMENT '更新人',
|
||||
`update_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '修改人名称',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`delete_enum` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '是否删除',
|
||||
`tenant_id` bigint DEFAULT NULL COMMENT '租户id',
|
||||
`org_id` bigint DEFAULT NULL COMMENT '机构id',
|
||||
`env` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '环境',
|
||||
`remarks` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '描述',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
KEY `idx_employee_phone` (`employee_name`,`phone_number`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='人资用户表';
|
||||
|
||||
|
||||
CREATE TABLE `human_user_record` (
|
||||
`id` bigint NOT NULL COMMENT '主键',
|
||||
`user_record_id` varchar(35) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '业务主键id',
|
||||
`user_id` bigint DEFAULT NULL COMMENT '统一用户管理用户ID(关联底座user表)',
|
||||
`employee_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '姓名',
|
||||
`employee_gender` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '性别',
|
||||
`employee_age` int DEFAULT NULL COMMENT '年龄',
|
||||
`entry_time` datetime DEFAULT NULL COMMENT '入职时间',
|
||||
`employee_status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '人员状态',
|
||||
`job_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '职务',
|
||||
`job_level` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '职务级别',
|
||||
`dept_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '部门名称',
|
||||
`dept_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '部门编码',
|
||||
`position_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '岗位',
|
||||
`phone_number` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '手机号',
|
||||
`id_card_number` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '身份证号',
|
||||
`employee_images_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '图片编码',
|
||||
`employee_images` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '图片base64编码',
|
||||
`corporation_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '企业编码',
|
||||
`corporation_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '企业名称',
|
||||
`version` int DEFAULT NULL COMMENT '乐观锁',
|
||||
`create_id` bigint DEFAULT NULL COMMENT '创建人',
|
||||
`create_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '创建人姓名',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_id` bigint DEFAULT NULL COMMENT '更新人',
|
||||
`update_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '修改人名称',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`remarks` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '描述',
|
||||
`delete_enum` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '是否删除',
|
||||
`tenant_id` bigint DEFAULT NULL COMMENT '租户ID',
|
||||
`org_id` bigint DEFAULT NULL COMMENT '机构ID',
|
||||
`env` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '环境',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='人资每日变动记录';
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.zcloud.human.user.persistence.mapper.HumanUserMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.zcloud.human.user.persistence.dataobject.HumanUserDO">
|
||||
<id column="id" property="id"/>
|
||||
<result column="user_id" property="userId"/>
|
||||
<result column="human_user_id" property="humanUserId"/>
|
||||
<result column="employee_name" property="employeeName"/>
|
||||
<result column="employee_gender" property="employeeGender"/>
|
||||
<result column="employee_age" property="employeeAge"/>
|
||||
<result column="entry_time" property="entryTime" jdbcType="TIMESTAMP"/>
|
||||
<result column="employee_status" property="employeeStatus"/>
|
||||
<result column="job_name" property="jobName"/>
|
||||
<result column="job_level" property="jobLevel"/>
|
||||
<result column="dept_name" property="deptName"/>
|
||||
<result column="dept_code" property="deptCode"/>
|
||||
<result column="position_name" property="positionName"/>
|
||||
<result column="phone_number" property="phoneNumber"/>
|
||||
<result column="id_card_number" property="idCardNumber"/>
|
||||
<result column="employee_images_code" property="employeeImagesCode"/>
|
||||
<result column="employee_images" property="employeeImages"/>
|
||||
<result column="corporation_code" property="corporationCode"/>
|
||||
<result column="corporation_name" property="corporationName"/>
|
||||
<result column="is_confirm" property="isConfirm"/>
|
||||
<result column="confirm_status" property="confirmStatus"/>
|
||||
<result column="version" property="version"/>
|
||||
<result column="create_id" property="createId"/>
|
||||
<result column="create_name" property="createName"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="update_id" property="updateId"/>
|
||||
<result column="update_name" property="updateName"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
<result column="delete_enum" property="deleteEnum"/>
|
||||
<result column="tenant_id" property="tenantId"/>
|
||||
<result column="org_id" property="orgId"/>
|
||||
<result column="env" property="env"/>
|
||||
<result column="remarks" property="remarks"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id, user_id, human_user_id, employee_name, employee_gender, employee_age, entry_time,
|
||||
employee_status, job_name, job_level, dept_name, dept_code, position_name,
|
||||
phone_number, id_card_number, employee_images_code, employee_images,
|
||||
corporation_code, corporation_name, is_confirm, confirm_status, version,
|
||||
create_id, create_name, create_time, update_id, update_name, update_time,
|
||||
delete_enum, tenant_id, org_id, env, remarks
|
||||
</sql>
|
||||
|
||||
<select id="list" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"/>
|
||||
FROM human_user
|
||||
<where>
|
||||
<if test="qry.employeeName != null and qry.employeeName != ''">
|
||||
AND employee_name LIKE CONCAT('%', #{qry.employeeName}, '%')
|
||||
</if>
|
||||
<if test="qry.employeeStatus != null and qry.employeeStatus != ''">
|
||||
AND employee_status = #{qry.employeeStatus}
|
||||
</if>
|
||||
<if test="qry.deptCode != null and qry.deptCode != ''">
|
||||
AND dept_code = #{qry.deptCode}
|
||||
</if>
|
||||
<if test="qry.corporationCode != null and qry.corporationCode != ''">
|
||||
AND corporation_code = #{qry.corporationCode}
|
||||
</if>
|
||||
<if test="qry.deleteEnum == null or qry.deleteEnum == ''">
|
||||
AND (delete_enum IS NULL OR delete_enum != 'Y')
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="getByIdCardNumber" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"/>
|
||||
FROM human_user
|
||||
WHERE id_card_number = #{idCardNumber}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.zcloud.human.user.persistence.mapper.HumanUserRecordMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.zcloud.human.user.persistence.dataobject.HumanUserRecordDO">
|
||||
<id column="id" property="id"/>
|
||||
<result column="user_record_id" property="userRecordId"/>
|
||||
<result column="user_id" property="userId"/>
|
||||
<result column="employee_name" property="employeeName"/>
|
||||
<result column="employee_gender" property="employeeGender"/>
|
||||
<result column="employee_age" property="employeeAge"/>
|
||||
<result column="entry_time" property="entryTime" jdbcType="TIMESTAMP"/>
|
||||
<result column="employee_status" property="employeeStatus"/>
|
||||
<result column="job_name" property="jobName"/>
|
||||
<result column="job_level" property="jobLevel"/>
|
||||
<result column="dept_name" property="deptName"/>
|
||||
<result column="dept_code" property="deptCode"/>
|
||||
<result column="position_name" property="positionName"/>
|
||||
<result column="phone_number" property="phoneNumber"/>
|
||||
<result column="id_card_number" property="idCardNumber"/>
|
||||
<result column="employee_images_code" property="employeeImagesCode"/>
|
||||
<result column="employee_images" property="employeeImages"/>
|
||||
<result column="corporation_code" property="corporationCode"/>
|
||||
<result column="corporation_name" property="corporationName"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
<result column="create_id" property="createId"/>
|
||||
<result column="update_id" property="updateId"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id, user_record_id, user_id, employee_name, employee_gender, employee_age, entry_time,
|
||||
employee_status, job_name, job_level, dept_name, dept_code, position_name,
|
||||
phone_number, id_card_number, employee_images_code, employee_images,
|
||||
corporation_code, corporation_name, create_time, update_time, create_id, update_id
|
||||
</sql>
|
||||
|
||||
<select id="list" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"/>
|
||||
FROM human_user_record
|
||||
<where>
|
||||
<if test="qry.employeeName != null and qry.employeeName != ''">
|
||||
AND employee_name LIKE CONCAT('%', #{qry.employeeName}, '%')
|
||||
</if>
|
||||
<if test="qry.deptCode != null and qry.deptCode != ''">
|
||||
AND dept_code = #{qry.deptCode}
|
||||
</if>
|
||||
<if test="qry.corporationCode != null and qry.corporationCode != ''">
|
||||
AND corporation_code = #{qry.corporationCode}
|
||||
</if>
|
||||
<if test="qry.corporationName != null and qry.corporationName != ''">
|
||||
AND corporation_name = #{qry.corporationName}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!-- mybatis的配置文<E7BDAE>?-->
|
||||
<!DOCTYPE configuration
|
||||
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-config.dtd">
|
||||
<configuration>
|
||||
<mappers>
|
||||
<mapper resource="mybatis/customer-mapper.xml"/>
|
||||
</mappers>
|
||||
</configuration>
|
||||
Loading…
Reference in New Issue