@@ -71,4 +71,9 @@ xueyi-modules/xueyi-tenant/target/ | |||
xueyi-visual/xueyi-monitor/target/ | |||
docker/mysql/data/ | |||
docker/nacos/logs/ | |||
logs/ | |||
logs/ | |||
**/target */ | |||
**/.lck*/ | |||
digtalman-* |
@@ -8,7 +8,7 @@ pipeline { | |||
// 拉取代码 | |||
stage('Pull Code') { | |||
steps { | |||
checkout([$class: 'GitSCM', branches: [[name: '*/${branch}']], extensions: [], userRemoteConfigs: [[credentialsId: '0f6d6eaa8754e735262afa495fe2828d611fca17', url: 'http://39.105.23.186:3000/develop/digimeta-MultiSaas.git']]]) | |||
checkout([$class: 'GitSCM', branches: [[name: '${git_version}']], extensions: [], userRemoteConfigs: [[credentialsId: '0f6d6eaa8754e735262afa495fe2828d611fca17', url: 'http://39.105.23.186:3000/develop/digimeta-MultiSaas.git']]]) | |||
} | |||
} | |||
// 代码静态检查 | |||
@@ -19,13 +19,22 @@ pipeline { | |||
sh "which java" | |||
echo "打包子目录并进行代码检查 ${project_name}" | |||
sh "mvn clean install" | |||
sh "mvn -f ${project_name} clean package -e -U -Dmaven.test.skip=true sonar:sonar" | |||
sh "mvn -f ${project_name} clean package -e -U -Dmaven.test.skip=true -P${build_env} -Dsonar.login=admin -Dsonar.password=Digimeta@2023 sonar:sonar" | |||
} | |||
} | |||
} | |||
stage('Quality Gate') { | |||
steps { | |||
timeout(time: 1, unit: 'HOURS') { | |||
//休息10s等待结果 | |||
sleep(10) | |||
script { | |||
def workspace=pwd() | |||
// 删除所有report报告 | |||
sh "find ${workspace} -name report-task.txt | xargs rm -f" | |||
// 删除所有sonar锁 | |||
sh "find ${workspace} -name .sonar_lock | xargs rm -f" | |||
} | |||
timeout(time: 5, unit: 'MINUTES') { | |||
// Parameter indicates whether to set pipeline to UNSTABLE if Quality Gate fails | |||
// true = set pipeline to UNSTABLE, false = don't waitForQualityGates abortPipeline: true | |||
waitForQualityGate abortPipeline: true | |||
@@ -44,13 +53,13 @@ pipeline { | |||
if ("${project_name}" == 'digimeta-MultiSaas' ) { | |||
echo '仅做代码检查,不打包目录' | |||
} else { | |||
echo "构件微服务 ${modules_name},并推送到镜像仓库" | |||
echo "构件微服务 ${module_name},并推送到镜像仓库" | |||
sh """ | |||
cd ${workspace}/${project_name} | |||
docker login --username=缔智元2023 --password=digimeta@2023 ${ali_registry} | |||
docker build --tag ${ali_registry}/digitalman-multisaas/${modules_name}:${version} . | |||
docker push ${ali_registry}/digitalman-multisaas/${modules_name}:${version} | |||
docker rmi ${ali_registry}/digitalman-multisaas/${modules_name}:${version} | |||
docker build --tag ${ali_registry}/digitalman-multisaas/${module_name}:${git_version}-${build_env} . | |||
docker push ${ali_registry}/digitalman-multisaas/${module_name}:${git_version}-${build_env} | |||
docker rmi ${ali_registry}/digitalman-multisaas/${module_name}:${git_version}-${build_env} | |||
""" | |||
} | |||
} | |||
@@ -0,0 +1,67 @@ | |||
node { | |||
def workspace=pwd() | |||
// 版本 | |||
def tag = "0.8" | |||
def ali_registry = "registry.cn-beijing.aliyuncs.com" | |||
// 镜像仓库的地址 | |||
// def harbor_url = "192.168.81.102:85" | |||
// 镜像仓库的项目,这里建议项目名称和jenkins的item项目名称、以及harbor的项目名称保持一致,否则用一下脚本会出问题 | |||
// def harbor_project = "demo" | |||
def mavenPath="/usr/share/maven" | |||
// 拉取代码 | |||
stage('pull code') { | |||
checkout([$class: 'GitSCM', branches: [[name: '*/${branch}']], extensions: [], userRemoteConfigs: [[credentialsId: '0f6d6eaa8754e735262afa495fe2828d611fca17', url: 'http://39.105.23.186:3000/develop/digimeta-MultiSaas.git']]]) | |||
} | |||
// 代码静态检查 | |||
stage('Maven Package and Sonar') { | |||
if ("${project_name}" == 'digimeta-MultiSaas' ) { | |||
echo '打包根目录' | |||
sh 'mvn clean package sonar:sonar' | |||
} else { | |||
echo "打包子目录并进行代码检查 ${project_name}" | |||
sh "mvn clean install" | |||
sh "mvn -f ${project_name} clean package -e -U -Dmaven.test.skip=true sonar:sonar" | |||
} | |||
//script { | |||
//引入Jenkins SonarQube-Scanner全局工具 "全局配置中以SonarQube-Scanner命名的工具" | |||
// scannerHome = tool 'SonarQube-Scanner' | |||
//} | |||
//引用SonarQube环境 "系统配置中配置的SonarQube servers的name值 " | |||
//withSonarQubeEnv('Sonar') { | |||
//执行sonar-scanner命令 | |||
//sh "${scannerHome}/bin/sonar-scanner" | |||
// $mavenPath/bin/mvn sonar:sonar | |||
//} | |||
} | |||
// build Docker并推送镜像仓库 | |||
stage('build project') { | |||
if ("${project_name}" == 'digimeta-MultiSaas' ) { | |||
echo '仅做代码检查,不打包目录' | |||
} else { | |||
echo "构件微服务 ${project_name},并推送到镜像仓库" | |||
sh """ | |||
cd ${workspace}/${project_name} | |||
docker login --username=缔智元2023 ${ali_registry} | |||
docker build --tag ${ali_registry}/digitalman-multisaas/${project_name}:${version} | |||
docker push ${ali_registry}/digitalman-multisaas/${project_name}:${version} | |||
""" | |||
} | |||
//echo "把jar上传镜像仓库" | |||
//def oldImageName = "${project_name}:latest" | |||
//def newImageName = "${harbor_url}/${harbor_project}/${project_name}:${tag}" | |||
// 改名称 做规范 | |||
//sh "docker tag ${oldImageName} ${newImageName}" | |||
// 删除之前的 镜像 | |||
//sh "docker rmi ${oldImageName}" | |||
// 推送到 dockers仓库 | |||
//withCredentials([usernamePassword(credentialsId: '8a3d7ab1-4cd6-482c-86c9-a12aa6404d98', passwordVariable: 'harbor_password', usernameVariable: 'harbor_account')]) { | |||
// 登录 | |||
//sh "docker login -u ${harbor_account} -p ${harbor_password} ${harbor_url}" | |||
// 上传 | |||
//sh "docker push ${newImageName}" | |||
//echo "镜像推送成功" | |||
//} | |||
} | |||
} |
@@ -166,6 +166,34 @@ services: | |||
depends_on: | |||
- xueyi-nacos | |||
- xueyi-redis | |||
links: | |||
- xueyi-nacos | |||
- xueyi-redis | |||
xueyi-modules-auth: | |||
container_name: xueyi-modules-auth | |||
build: | |||
context: xueyi-modules/xueyi-modules-auth | |||
dockerfile: ./Dockerfile | |||
ports: | |||
- "9970:9970" | |||
depends_on: | |||
- xueyi-nacos | |||
- xueyi-redis | |||
links: | |||
- xueyi-nacos | |||
- xueyi-redis | |||
- | |||
xueyi-nlt: | |||
container_name: xueyi-nlt | |||
build: | |||
context: xueyi-modules/xueyi-nlt | |||
dockerfile: ./Dockerfile | |||
ports: | |||
- "9910:9910" | |||
depends_on: | |||
- xueyi-nacos | |||
- xueyi-redis | |||
links: | |||
- xueyi-nacos | |||
- xueyi-redis |
@@ -46,6 +46,8 @@ | |||
<sonar.java.checkstyle.reportPaths>./target/checkstyle-result.xml</sonar.java.checkstyle.reportPaths> | |||
<sonar.login>admin</sonar.login> | |||
<sonar.password>Digimeta@2023</sonar.password> | |||
<jakarta-json.version>2.0.1</jakarta-json.version> | |||
<elasticsearch.version>8.3.3</elasticsearch.version> | |||
</properties> | |||
<!-- 依赖声明 --> | |||
@@ -163,6 +165,11 @@ | |||
<version>${fastjson2.version}</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>net.logstash.logback</groupId> | |||
<artifactId>logstash-logback-encoder</artifactId> | |||
<version>7.4</version> | |||
</dependency> | |||
<!-- JWT --> | |||
<dependency> | |||
<groupId>io.jsonwebtoken</groupId> | |||
@@ -240,6 +247,13 @@ | |||
<version>${xueyi.version}</version> | |||
</dependency> | |||
<!-- Mqtt服务 --> | |||
<dependency> | |||
<groupId>com.xueyi</groupId> | |||
<artifactId>xueyi-common-mqtt</artifactId> | |||
<version>${xueyi.version}</version> | |||
</dependency> | |||
<!-- 分布式事务 --> | |||
<dependency> | |||
<groupId>com.xueyi</groupId> | |||
@@ -287,6 +301,19 @@ | |||
<version>${xueyi.version}</version> | |||
</dependency> | |||
<!-- 模块auth模块 --> | |||
<dependency> | |||
<groupId>com.xueyi</groupId> | |||
<artifactId>xueyi-api-modules-auth</artifactId> | |||
<version>${xueyi.version}</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>com.xueyi</groupId> | |||
<artifactId>xueyi-api-nlt</artifactId> | |||
<version>${xueyi.version}</version> | |||
</dependency> | |||
<!-- huTool 工具类库 --> | |||
<dependency> | |||
<groupId>cn.hutool</groupId> | |||
@@ -296,6 +323,17 @@ | |||
<scope>import</scope> | |||
</dependency> | |||
<dependency> | |||
<groupId>co.elastic.clients</groupId> | |||
<artifactId>elasticsearch-java</artifactId> | |||
<version>${elasticsearch.version}</version> | |||
</dependency> | |||
<dependency> | |||
<groupId>jakarta.json</groupId> | |||
<artifactId>jakarta.json-api</artifactId> | |||
<version>${jakarta-json.version}</version> | |||
</dependency> | |||
</dependencies> | |||
</dependencyManagement> | |||
@@ -319,6 +357,58 @@ | |||
</dependencies> | |||
<profiles> | |||
<profile> | |||
<id>local</id> | |||
<properties> | |||
<!-- 环境标识,需要与配置文件的名称相对应 --> | |||
<activatedProperties>local</activatedProperties> | |||
<nacos.host>127.0.0.1</nacos.host> | |||
<nacos.port>18848</nacos.port> | |||
<nacos.namespace></nacos.namespace> | |||
</properties> | |||
<activation> | |||
<!-- 默认环境 --> | |||
<!-- <activeByDefault>true</activeByDefault>--> | |||
</activation> | |||
</profile> | |||
<profile> | |||
<id>dev</id> | |||
<properties> | |||
<!-- 环境标识,需要与配置文件的名称相对应 --> | |||
<activatedProperties>dev</activatedProperties> | |||
<nacos.host>39.107.77.235</nacos.host> | |||
<nacos.port>18848</nacos.port> | |||
<nacos.namespace>6d0ee265-2a92-44cc-a6de-f34b3ea104e6</nacos.namespace> | |||
</properties> | |||
<activation> | |||
<!-- 默认环境 --> | |||
<activeByDefault>true</activeByDefault> | |||
</activation> | |||
</profile> | |||
<profile> | |||
<id>test</id> | |||
<properties> | |||
<!-- 环境标识,需要与配置文件的名称相对应 --> | |||
<activatedProperties>test</activatedProperties> | |||
<nacos.host>172.17.0.1</nacos.host> | |||
<nacos.port>18848</nacos.port> | |||
<nacos.namespace></nacos.namespace> | |||
</properties> | |||
</profile> | |||
<profile> | |||
<id>prod</id> | |||
<properties> | |||
<!-- 环境标识,需要与配置文件的名称相对应 --> | |||
<activatedProperties>prod</activatedProperties> | |||
<nacos.host>123.57.75.177</nacos.host> | |||
<nacos.port>18848</nacos.port> | |||
<nacos.namespace></nacos.namespace> | |||
</properties> | |||
</profile> | |||
</profiles> | |||
<build> | |||
<plugins> | |||
<plugin> | |||
@@ -14,6 +14,8 @@ | |||
<module>xueyi-api-tenant</module> | |||
<module>xueyi-api-file</module> | |||
<module>xueyi-api-job</module> | |||
<module>xueyi-api-nlt</module> | |||
<module>xueyi-api-modules-auth</module> | |||
</modules> | |||
@@ -0,0 +1,11 @@ | |||
package com.xueyi.file.api.domain; | |||
import lombok.Data; | |||
@Data | |||
public class DigitalmanLogFile { | |||
String devId; | |||
String logType; | |||
String timestamp; | |||
} |
@@ -12,6 +12,8 @@ import org.springframework.web.bind.annotation.PostMapping; | |||
import org.springframework.web.bind.annotation.RequestPart; | |||
import org.springframework.web.multipart.MultipartFile; | |||
import java.util.List; | |||
/** | |||
* 文件服务 | |||
* | |||
@@ -29,6 +31,15 @@ public interface RemoteFileService { | |||
@PostMapping(value = "/inner/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) | |||
R<SysFile> upload(@RequestPart(value = "file") MultipartFile file); | |||
/** | |||
* 上传pdf文件 | |||
* | |||
* @param file 文件信息 | |||
* @return 结果 | |||
*/ | |||
@PostMapping(value = "/inner/uploadpdf", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) | |||
R<List<SysFile>> uploadPdf(@RequestPart(value = "file") MultipartFile file); | |||
/** | |||
* 删除文件 | |||
* | |||
@@ -8,6 +8,8 @@ import org.springframework.cloud.openfeign.FallbackFactory; | |||
import org.springframework.stereotype.Component; | |||
import org.springframework.web.multipart.MultipartFile; | |||
import java.util.List; | |||
/** | |||
* 文件服务 降级处理 | |||
* | |||
@@ -26,6 +28,11 @@ public class RemoteFileFallbackFactory implements FallbackFactory<RemoteFileServ | |||
return R.fail("上传文件失败:" + throwable.getMessage()); | |||
} | |||
@Override | |||
public R<List<SysFile>> uploadPdf(MultipartFile file) { | |||
return R.fail("上传文件失败:" + throwable.getMessage() ); | |||
} | |||
@Override | |||
public R<Boolean> delete(String url) { | |||
return R.fail("删除文件失败:" + throwable.getMessage()); | |||
@@ -1,113 +0,0 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4"> | |||
<component name="FacetManager"> | |||
<facet type="Spring" name="Spring"> | |||
<configuration /> | |||
</facet> | |||
</component> | |||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_17"> | |||
<output url="file://$MODULE_DIR$/target/classes" /> | |||
<output-test url="file://$MODULE_DIR$/target/test-classes" /> | |||
<content url="file://$MODULE_DIR$"> | |||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> | |||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" /> | |||
<sourceFolder url="file://$MODULE_DIR$/target/generated-sources/annotations" isTestSource="false" generated="true" /> | |||
<excludeFolder url="file://$MODULE_DIR$/target" /> | |||
</content> | |||
<orderEntry type="inheritedJdk" /> | |||
<orderEntry type="sourceFolder" forTests="false" /> | |||
<orderEntry type="module" module-name="xueyi-common-core" /> | |||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-openfeign:3.1.5" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-openfeign-core:3.1.5" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.7.7" level="project" /> | |||
<orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.7" level="project" /> | |||
<orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form-spring:3.8.0" level="project" /> | |||
<orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form:3.8.0" level="project" /> | |||
<orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.4" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-commons:3.1.5" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-crypto:5.7.6" level="project" /> | |||
<orderEntry type="library" name="Maven: io.github.openfeign:feign-core:11.10" level="project" /> | |||
<orderEntry type="library" name="Maven: io.github.openfeign:feign-slf4j:11.10" level="project" /> | |||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.36" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-loadbalancer:3.1.5" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-loadbalancer:3.1.5" level="project" /> | |||
<orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.4.26" level="project" /> | |||
<orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.4" level="project" /> | |||
<orderEntry type="library" name="Maven: io.projectreactor.addons:reactor-extra:3.4.9" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-cache:2.7.7" level="project" /> | |||
<orderEntry type="library" name="Maven: com.stoyanr:evictor:1.0.0" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.3.24" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.3.24" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.3.24" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.3.24" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.3.24" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.3.24" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.3.24" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework:spring-web:5.3.24" level="project" /> | |||
<orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.5.3.Final" level="project" /> | |||
<orderEntry type="library" name="Maven: com.alibaba:transmittable-thread-local:2.14.2" level="project" /> | |||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-boot-starter:3.5.3" level="project" /> | |||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus:3.5.3" level="project" /> | |||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-extension:3.5.3" level="project" /> | |||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-core:3.5.3" level="project" /> | |||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-annotation:3.5.3" level="project" /> | |||
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:4.4" level="project" /> | |||
<orderEntry type="library" name="Maven: org.mybatis:mybatis:3.5.10" level="project" /> | |||
<orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:2.0.7" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.7.7" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.7.7" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.7.7" level="project" /> | |||
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:4.0.3" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.3.24" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework:spring-tx:5.3.24" level="project" /> | |||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.3.2" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-validation:2.7.7" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.7.7" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.7.7" level="project" /> | |||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.11" level="project" /> | |||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.11" level="project" /> | |||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.17.2" level="project" /> | |||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.17.2" level="project" /> | |||
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.36" level="project" /> | |||
<orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" /> | |||
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.30" level="project" /> | |||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.70" level="project" /> | |||
<orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.2.5.Final" level="project" /> | |||
<orderEntry type="library" name="Maven: jakarta.validation:jakarta.validation-api:2.0.2" level="project" /> | |||
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.4.3.Final" level="project" /> | |||
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.5.1" level="project" /> | |||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.13.4.2" level="project" /> | |||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.13.4" level="project" /> | |||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.13.4" level="project" /> | |||
<orderEntry type="library" name="Maven: com.alibaba.fastjson2:fastjson2:2.0.24" level="project" /> | |||
<orderEntry type="library" name="Maven: io.jsonwebtoken:jjwt:0.9.1" level="project" /> | |||
<orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.3.1" level="project" /> | |||
<orderEntry type="library" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" /> | |||
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.12.0" level="project" /> | |||
<orderEntry type="library" name="Maven: commons-io:commons-io:2.11.0" level="project" /> | |||
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:4.1.2" level="project" /> | |||
<orderEntry type="library" name="Maven: org.apache.poi:poi:4.1.2" level="project" /> | |||
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.15" level="project" /> | |||
<orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.4" level="project" /> | |||
<orderEntry type="library" name="Maven: org.apache.commons:commons-math3:3.6.1" level="project" /> | |||
<orderEntry type="library" name="Maven: com.zaxxer:SparseBitSet:1.2" level="project" /> | |||
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml-schemas:4.1.2" level="project" /> | |||
<orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:3.1.0" level="project" /> | |||
<orderEntry type="library" name="Maven: org.apache.commons:commons-compress:1.19" level="project" /> | |||
<orderEntry type="library" name="Maven: com.github.virtuald:curvesapi:1.06" level="project" /> | |||
<orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:4.0.1" level="project" /> | |||
<orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.24" level="project" /> | |||
<orderEntry type="library" name="Maven: cn.hutool:hutool-core:5.8.11" level="project" /> | |||
<orderEntry type="library" name="Maven: cn.hutool:hutool-extra:5.8.11" level="project" /> | |||
<orderEntry type="library" name="Maven: cn.hutool:hutool-setting:5.8.11" level="project" /> | |||
<orderEntry type="library" name="Maven: cn.hutool:hutool-log:5.8.11" level="project" /> | |||
<orderEntry type="library" name="Maven: cn.hutool:hutool-crypto:5.8.11" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-bootstrap:3.1.5" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter:3.1.5" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-context:3.1.5" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-rsa:1.0.11.RELEASE" level="project" /> | |||
<orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.69" level="project" /> | |||
<orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.69" level="project" /> | |||
<orderEntry type="library" name="Maven: org.bouncycastle:bcutil-jdk15on:1.69" level="project" /> | |||
</component> | |||
</module> |
@@ -1,115 +0,0 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4"> | |||
<component name="FacetManager"> | |||
<facet type="Spring" name="Spring"> | |||
<configuration /> | |||
</facet> | |||
</component> | |||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_17"> | |||
<output url="file://$MODULE_DIR$/target/classes" /> | |||
<output-test url="file://$MODULE_DIR$/target/test-classes" /> | |||
<content url="file://$MODULE_DIR$"> | |||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> | |||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" /> | |||
<sourceFolder url="file://$MODULE_DIR$/target/generated-sources/annotations" isTestSource="false" generated="true" /> | |||
<excludeFolder url="file://$MODULE_DIR$/target" /> | |||
</content> | |||
<orderEntry type="inheritedJdk" /> | |||
<orderEntry type="sourceFolder" forTests="false" /> | |||
<orderEntry type="module" module-name="xueyi-common-core" /> | |||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-openfeign:3.1.5" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-openfeign-core:3.1.5" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.7.7" level="project" /> | |||
<orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.7" level="project" /> | |||
<orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form-spring:3.8.0" level="project" /> | |||
<orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form:3.8.0" level="project" /> | |||
<orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.4" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-commons:3.1.5" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-crypto:5.7.6" level="project" /> | |||
<orderEntry type="library" name="Maven: io.github.openfeign:feign-core:11.10" level="project" /> | |||
<orderEntry type="library" name="Maven: io.github.openfeign:feign-slf4j:11.10" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-loadbalancer:3.1.5" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-loadbalancer:3.1.5" level="project" /> | |||
<orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.4.26" level="project" /> | |||
<orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.4" level="project" /> | |||
<orderEntry type="library" name="Maven: io.projectreactor.addons:reactor-extra:3.4.9" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-cache:2.7.7" level="project" /> | |||
<orderEntry type="library" name="Maven: com.stoyanr:evictor:1.0.0" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.3.24" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.3.24" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.3.24" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.3.24" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.3.24" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.3.24" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.3.24" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework:spring-web:5.3.24" level="project" /> | |||
<orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.5.3.Final" level="project" /> | |||
<orderEntry type="library" name="Maven: com.alibaba:transmittable-thread-local:2.14.2" level="project" /> | |||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-boot-starter:3.5.3" level="project" /> | |||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus:3.5.3" level="project" /> | |||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-extension:3.5.3" level="project" /> | |||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-core:3.5.3" level="project" /> | |||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-annotation:3.5.3" level="project" /> | |||
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:4.4" level="project" /> | |||
<orderEntry type="library" name="Maven: org.mybatis:mybatis:3.5.10" level="project" /> | |||
<orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:2.0.7" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.7.7" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.7.7" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.7.7" level="project" /> | |||
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:4.0.3" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.3.24" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework:spring-tx:5.3.24" level="project" /> | |||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.3.2" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-validation:2.7.7" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.7.7" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.7.7" level="project" /> | |||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.11" level="project" /> | |||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.11" level="project" /> | |||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.17.2" level="project" /> | |||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.17.2" level="project" /> | |||
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.36" level="project" /> | |||
<orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" /> | |||
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.30" level="project" /> | |||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.70" level="project" /> | |||
<orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.2.5.Final" level="project" /> | |||
<orderEntry type="library" name="Maven: jakarta.validation:jakarta.validation-api:2.0.2" level="project" /> | |||
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.4.3.Final" level="project" /> | |||
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.5.1" level="project" /> | |||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.13.4.2" level="project" /> | |||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.13.4" level="project" /> | |||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.13.4" level="project" /> | |||
<orderEntry type="library" name="Maven: com.alibaba.fastjson2:fastjson2:2.0.24" level="project" /> | |||
<orderEntry type="library" name="Maven: io.jsonwebtoken:jjwt:0.9.1" level="project" /> | |||
<orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.3.1" level="project" /> | |||
<orderEntry type="library" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" /> | |||
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.12.0" level="project" /> | |||
<orderEntry type="library" name="Maven: commons-io:commons-io:2.11.0" level="project" /> | |||
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:4.1.2" level="project" /> | |||
<orderEntry type="library" name="Maven: org.apache.poi:poi:4.1.2" level="project" /> | |||
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.15" level="project" /> | |||
<orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.4" level="project" /> | |||
<orderEntry type="library" name="Maven: org.apache.commons:commons-math3:3.6.1" level="project" /> | |||
<orderEntry type="library" name="Maven: com.zaxxer:SparseBitSet:1.2" level="project" /> | |||
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml-schemas:4.1.2" level="project" /> | |||
<orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:3.1.0" level="project" /> | |||
<orderEntry type="library" name="Maven: org.apache.commons:commons-compress:1.19" level="project" /> | |||
<orderEntry type="library" name="Maven: com.github.virtuald:curvesapi:1.06" level="project" /> | |||
<orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:4.0.1" level="project" /> | |||
<orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.24" level="project" /> | |||
<orderEntry type="library" name="Maven: cn.hutool:hutool-core:5.8.11" level="project" /> | |||
<orderEntry type="library" name="Maven: cn.hutool:hutool-extra:5.8.11" level="project" /> | |||
<orderEntry type="library" name="Maven: cn.hutool:hutool-setting:5.8.11" level="project" /> | |||
<orderEntry type="library" name="Maven: cn.hutool:hutool-log:5.8.11" level="project" /> | |||
<orderEntry type="library" name="Maven: cn.hutool:hutool-crypto:5.8.11" level="project" /> | |||
<orderEntry type="library" name="Maven: org.quartz-scheduler:quartz:2.3.2" level="project" /> | |||
<orderEntry type="library" name="Maven: com.mchange:mchange-commons-java:0.2.15" level="project" /> | |||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.36" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-bootstrap:3.1.5" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter:3.1.5" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-context:3.1.5" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-rsa:1.0.11.RELEASE" level="project" /> | |||
<orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.69" level="project" /> | |||
<orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.69" level="project" /> | |||
<orderEntry type="library" name="Maven: org.bouncycastle:bcutil-jdk15on:1.69" level="project" /> | |||
</component> | |||
</module> |
@@ -0,0 +1,20 @@ | |||
package com.xueyi.message.api.transfer.domain.vo; | |||
import lombok.Data; | |||
import lombok.NoArgsConstructor; | |||
import lombok.ToString; | |||
@Data | |||
@NoArgsConstructor | |||
@ToString | |||
public class DmDeployScheduleVo { | |||
private String devId; | |||
private String timestamp; | |||
private String sign; | |||
//请求类型(1:人员 2:技能话术 3:数字人信息) | |||
private Integer type; | |||
// 企业id | |||
private String schedule; | |||
} |
@@ -0,0 +1,16 @@ | |||
package com.xueyi.message.api.transfer.domain.vo; | |||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | |||
import lombok.*; | |||
import java.io.Serializable; | |||
@Data | |||
@ToString | |||
@Builder | |||
@NoArgsConstructor | |||
@JsonIgnoreProperties(ignoreUnknown = true) | |||
public class Message implements Serializable,Cloneable{ | |||
} |
@@ -1,15 +1,14 @@ | |||
package com.xueyi.message.api.transfer.feign; | |||
import com.xueyi.common.core.constant.basic.SecurityConstants; | |||
import com.xueyi.common.core.constant.basic.ServiceConstants; | |||
import com.xueyi.common.core.web.result.AjaxResult; | |||
import com.xueyi.common.core.web.result.R; | |||
import com.xueyi.message.api.transfer.feign.factory.RemoteTransferFallbackFactory; | |||
import org.springframework.cloud.openfeign.FeignClient; | |||
import org.springframework.web.bind.annotation.*; | |||
import javax.servlet.http.HttpServletResponse; | |||
import org.springframework.web.bind.annotation.RequestMapping; | |||
import org.springframework.web.bind.annotation.RequestMethod; | |||
import org.springframework.web.bind.annotation.RequestParam; | |||
import org.springframework.web.bind.annotation.ResponseBody; | |||
/** | |||
* 数据源服务 | |||
@@ -21,4 +20,10 @@ public interface RemoteTransferService { | |||
@RequestMapping(value = "/api/device_online_status/{devId}", method = {RequestMethod.GET}) | |||
@ResponseBody | |||
public AjaxResult getDeviceOnlineStatus(@RequestParam(value = "devId") String devId); | |||
@RequestMapping(value = "/api/broadcast", method = {RequestMethod.GET}) | |||
@ResponseBody | |||
public R broadcast(@RequestParam(value = "channel") String channel); | |||
} |
@@ -0,0 +1,28 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |||
xmlns="http://maven.apache.org/POM/4.0.0" | |||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |||
<parent> | |||
<groupId>com.xueyi</groupId> | |||
<artifactId>xueyi-api</artifactId> | |||
<version>2.5.0</version> | |||
</parent> | |||
<modelVersion>4.0.0</modelVersion> | |||
<artifactId>xueyi-api-modules-auth</artifactId> | |||
<description> | |||
xueyi-api-modules-auth管理接口模块 | |||
</description> | |||
<dependencies> | |||
<!-- XueYi Common Core --> | |||
<dependency> | |||
<groupId>com.xueyi</groupId> | |||
<artifactId>xueyi-common-core</artifactId> | |||
</dependency> | |||
</dependencies> | |||
</project> |
@@ -0,0 +1,22 @@ | |||
package com.xueyi.modules.auth.api.domain.vo; | |||
import lombok.Data; | |||
import javax.validation.constraints.NotNull; | |||
/** | |||
* @author yk | |||
* @description 意图请求对象DTO | |||
* @date 2023-07-31 19:50 | |||
*/ | |||
@Data | |||
public class IntentionReqDto { | |||
@NotNull(message = "staffId不能为空") | |||
private String staffId; | |||
private String staffType; | |||
@NotNull(message = "skillCode不能为空") | |||
private String skillCode; | |||
@NotNull(message = "devId不能为空") | |||
private String devId; | |||
} |
@@ -0,0 +1,27 @@ | |||
package com.xueyi.modules.auth.api.feign; | |||
import com.xueyi.common.core.constant.basic.SecurityConstants; | |||
import com.xueyi.common.core.constant.basic.ServiceConstants; | |||
import com.xueyi.common.core.web.result.AjaxResult; | |||
import com.xueyi.modules.auth.api.domain.vo.IntentionReqDto; | |||
import com.xueyi.modules.auth.api.feign.factory.RemoteSkillAuthFallbackFactory; | |||
import org.springframework.cloud.openfeign.FeignClient; | |||
import org.springframework.web.bind.annotation.RequestBody; | |||
import org.springframework.web.bind.annotation.RequestHeader; | |||
import org.springframework.web.bind.annotation.RequestMapping; | |||
import org.springframework.web.bind.annotation.RequestMethod; | |||
import org.springframework.web.bind.annotation.ResponseBody; | |||
import javax.validation.Valid; | |||
/** | |||
* 数据源服务 | |||
* | |||
* @author xueyi | |||
*/ | |||
@FeignClient(contextId = "remoteSkillAuthService", value = ServiceConstants.SYSTEM_SERVICE, fallbackFactory = RemoteSkillAuthFallbackFactory.class) | |||
public interface RemoteSkillAuthService { | |||
@RequestMapping(value = "/skill/inner/auth", method = {RequestMethod.POST}) | |||
@ResponseBody | |||
public AjaxResult skillAuth(@Valid @RequestBody IntentionReqDto intentionSkillAuth, @RequestHeader(SecurityConstants.ENTERPRISE_ID) Long enterpriseId, @RequestHeader(SecurityConstants.SOURCE_NAME) String sourceName, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); | |||
} |
@@ -0,0 +1,22 @@ | |||
package com.xueyi.modules.auth.api.feign.factory; | |||
import com.xueyi.modules.auth.api.feign.RemoteSkillAuthService; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.springframework.cloud.openfeign.FallbackFactory; | |||
import org.springframework.stereotype.Component; | |||
/** | |||
* 数据源服务降级处理 | |||
* | |||
* @author xueyi | |||
*/ | |||
@Slf4j | |||
@Component | |||
public class RemoteSkillAuthFallbackFactory implements FallbackFactory<RemoteSkillAuthService> { | |||
@Override | |||
public RemoteSkillAuthService create(Throwable cause) { | |||
return null; | |||
} | |||
} |
@@ -0,0 +1 @@ | |||
com.xueyi.modules.auth.api.feign.factory.RemoteSkillAuthFallbackFactory |
@@ -0,0 +1,33 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |||
xmlns="http://maven.apache.org/POM/4.0.0" | |||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |||
<parent> | |||
<groupId>com.xueyi</groupId> | |||
<artifactId>xueyi-api</artifactId> | |||
<version>2.5.0</version> | |||
</parent> | |||
<modelVersion>4.0.0</modelVersion> | |||
<artifactId>xueyi-api-nlt</artifactId> | |||
<description> | |||
xueyi-api-nlt模型接入管理模块 | |||
</description> | |||
<dependencies> | |||
<!-- XueYi Common Core --> | |||
<dependency> | |||
<groupId>com.xueyi</groupId> | |||
<artifactId>xueyi-common-core</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>com.xueyi</groupId> | |||
<artifactId>xueyi-api-system</artifactId> | |||
</dependency> | |||
</dependencies> | |||
</project> |
@@ -0,0 +1,15 @@ | |||
package com.xueyi.nlt.api.netty.domain.vo; | |||
import com.alibaba.fastjson2.JSONObject; | |||
import lombok.Data; | |||
import lombok.NoArgsConstructor; | |||
@Data | |||
@NoArgsConstructor | |||
public class DmWebSocketMessageVo { | |||
String devId; | |||
String skillCode; | |||
JSONObject format; | |||
String template; | |||
String operator; | |||
} |
@@ -0,0 +1,20 @@ | |||
package com.xueyi.nlt.api.netty.feign; | |||
import com.alibaba.fastjson2.JSONObject; | |||
import com.xueyi.common.core.constant.basic.SecurityConstants; | |||
import com.xueyi.common.core.constant.basic.ServiceConstants; | |||
import com.xueyi.common.core.web.result.R; | |||
import com.xueyi.nlt.api.netty.domain.vo.DmWebSocketMessageVo; | |||
import com.xueyi.nlt.api.nlt.domain.vo.DmIntentVo; | |||
import com.xueyi.nlt.api.nlt.feign.factory.RemoteIntentFallbackFactory; | |||
import org.springframework.cloud.openfeign.FeignClient; | |||
import org.springframework.web.bind.annotation.PostMapping; | |||
import org.springframework.web.bind.annotation.RequestBody; | |||
import org.springframework.web.bind.annotation.RequestHeader; | |||
@FeignClient(contextId = "remoteWebsocketService", value = ServiceConstants.NLT_SERVICE, fallbackFactory = RemoteIntentFallbackFactory.class) | |||
public interface RemoteWebsocketService { | |||
@PostMapping("websocket/inner/sendMessage") | |||
R sendMessage(@RequestBody DmWebSocketMessageVo message, @RequestHeader(SecurityConstants.ENTERPRISE_ID) Long enterpriseId, @RequestHeader(SecurityConstants.SOURCE_NAME) String sourceName, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); | |||
} |
@@ -0,0 +1,13 @@ | |||
package com.xueyi.nlt.api.nlt.domain.vo; | |||
import com.alibaba.fastjson2.JSONObject; | |||
import lombok.Data; | |||
import lombok.NoArgsConstructor; | |||
@Data | |||
@NoArgsConstructor | |||
public class CoversationSessionVo { | |||
protected String category; | |||
protected String id; | |||
protected JSONObject format; | |||
} |
@@ -0,0 +1,18 @@ | |||
package com.xueyi.nlt.api.nlt.domain.vo; | |||
import lombok.Data; | |||
import lombok.NoArgsConstructor; | |||
@Data | |||
@NoArgsConstructor | |||
public class DmIntentVo { | |||
String devId; | |||
Long operator; | |||
String skillCode; | |||
String content; | |||
String preIntent; | |||
String sign; | |||
String requestId; | |||
/** 模式类型 1:工作模式 2:接待模式 3:闲聊模式 */ | |||
String mode; | |||
} |
@@ -0,0 +1,29 @@ | |||
package com.xueyi.nlt.api.nlt.domain.vo; | |||
import lombok.Data; | |||
import lombok.NoArgsConstructor; | |||
import java.util.ArrayList; | |||
import java.util.List; | |||
@Data | |||
@NoArgsConstructor | |||
public class DmLandingLlmVo { | |||
private String category; | |||
private List<DmLlm> message = new ArrayList<>(); | |||
@Data | |||
@NoArgsConstructor | |||
class DmLlm { | |||
private String role; | |||
private String content; | |||
} | |||
// 定义创建DmLlm的对象方法,并添加到message中 | |||
public void addDmLlm(String role, String content) { | |||
DmLlm dmLlm = new DmLlm(); | |||
dmLlm.setRole(role); | |||
dmLlm.setContent(content); | |||
message.add(dmLlm); | |||
} | |||
} |
@@ -0,0 +1,13 @@ | |||
package com.xueyi.nlt.api.nlt.domain.vo; | |||
import lombok.Data; | |||
import lombok.NoArgsConstructor; | |||
@Data | |||
@NoArgsConstructor | |||
public class DmRecognitionVo { | |||
String devId; | |||
Long personId; | |||
String registered; | |||
String sign; | |||
} |
@@ -0,0 +1,13 @@ | |||
package com.xueyi.nlt.api.nlt.domain.vo; | |||
import lombok.Data; | |||
import lombok.NoArgsConstructor; | |||
@Data | |||
@NoArgsConstructor | |||
public class KnowledgeVo { | |||
private String man_code; | |||
private String question; | |||
private Long tenant_id; | |||
private String trace_id; | |||
} |
@@ -0,0 +1,17 @@ | |||
package com.xueyi.nlt.api.nlt.domain.vo; | |||
import lombok.AllArgsConstructor; | |||
import lombok.Data; | |||
import lombok.NoArgsConstructor; | |||
@Data | |||
@NoArgsConstructor | |||
public class TaskKnowledgeVo { | |||
private Long knowledgeId; | |||
private String content; | |||
private Integer count; | |||
private Long manId; | |||
private Long tenantId; | |||
private int split; | |||
private Long createBy; | |||
} |
@@ -0,0 +1,27 @@ | |||
package com.xueyi.nlt.api.nlt.feign; | |||
import com.alibaba.fastjson2.JSONObject; | |||
import com.xueyi.common.core.constant.basic.SecurityConstants; | |||
import com.xueyi.common.core.constant.basic.ServiceConstants; | |||
import com.xueyi.common.core.web.result.R; | |||
import com.xueyi.nlt.api.netty.domain.vo.DmWebSocketMessageVo; | |||
import com.xueyi.nlt.api.nlt.domain.vo.DmIntentVo; | |||
import com.xueyi.nlt.api.nlt.feign.factory.RemoteIntentFallbackFactory; | |||
import org.springframework.cloud.openfeign.FeignClient; | |||
import org.springframework.web.bind.annotation.PostMapping; | |||
import org.springframework.web.bind.annotation.RequestBody; | |||
import org.springframework.web.bind.annotation.RequestHeader; | |||
import org.springframework.web.bind.annotation.ResponseBody; | |||
@FeignClient(contextId = "remoteIntentService", value = ServiceConstants.NLT_SERVICE, fallbackFactory = RemoteIntentFallbackFactory.class) | |||
public interface RemoteIntentService { | |||
@PostMapping("/intent/inner/conversation") | |||
R<JSONObject> conversationInner(@RequestBody DmIntentVo intent, @RequestHeader(SecurityConstants.ENTERPRISE_ID) Long enterpriseId, @RequestHeader(SecurityConstants.SOURCE_NAME) String sourceName, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); | |||
@PostMapping("/intent/inner/sendMessage") | |||
R sendMessage(@RequestBody DmWebSocketMessageVo message, @RequestHeader(SecurityConstants.ENTERPRISE_ID) Long enterpriseId, @RequestHeader(SecurityConstants.SOURCE_NAME) String sourceName, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); | |||
@PostMapping("/intent/inner/taskGenerativeKnowledge") | |||
public R taskGenerativeKnowledge(); | |||
} |
@@ -0,0 +1,28 @@ | |||
package com.xueyi.nlt.api.nlt.feign; | |||
import com.alibaba.fastjson2.JSONObject; | |||
import com.xueyi.common.core.web.result.AjaxResult; | |||
import com.xueyi.nlt.api.nlt.domain.vo.DmLandingLlmVo; | |||
import com.xueyi.nlt.api.nlt.feign.factory.RemoteLandingLlmFallbackFactory; | |||
import com.xueyi.nlt.api.nlt.feign.factory.RemoteQAFallbackFactory; | |||
import org.springframework.cloud.openfeign.FeignClient; | |||
import org.springframework.web.bind.annotation.*; | |||
/** | |||
* 问答服务 | |||
* @Param man_id 机器人id | |||
* @Param question 问题 | |||
* @Param tenant_id 租户id | |||
* @author yrx | |||
*/ | |||
@FeignClient(url = "${notification.landing-llm.url}",name = "landing-llm", fallbackFactory = RemoteLandingLlmFallbackFactory.class) | |||
public interface RemoteLandingLlmService { | |||
@PostMapping("/search/questionAnswer") | |||
@ResponseBody | |||
JSONObject query(@RequestBody DmLandingLlmVo vo); | |||
@PostMapping("/search/questionAnswer") | |||
@ResponseBody | |||
JSONObject query(@RequestBody JSONObject jsonObject); | |||
} |
@@ -0,0 +1,30 @@ | |||
package com.xueyi.nlt.api.nlt.feign; | |||
import com.alibaba.fastjson.JSONObject; | |||
import com.xueyi.common.core.web.result.AjaxResult; | |||
import com.xueyi.nlt.api.nlt.domain.vo.KnowledgeVo; | |||
import com.xueyi.nlt.api.nlt.feign.factory.RemoteQAFallbackFactory; | |||
import com.xueyi.system.api.sms.domain.vo.SmsReqEntity; | |||
import com.xueyi.system.api.sms.feign.factory.RemoteSmsFallbackFactory; | |||
import org.springframework.cloud.openfeign.FeignClient; | |||
import org.springframework.web.bind.annotation.GetMapping; | |||
import org.springframework.web.bind.annotation.PostMapping; | |||
import org.springframework.web.bind.annotation.RequestBody; | |||
import org.springframework.web.bind.annotation.RequestParam; | |||
/** | |||
* 问答服务 | |||
* @Param man_id 机器人id | |||
* @Param question 问题 | |||
* @Param tenant_id 租户id | |||
* @author yrx | |||
*/ | |||
@FeignClient(url = "${notification.qa.url}",name = "qa", fallbackFactory = RemoteQAFallbackFactory.class) | |||
public interface RemoteQAService { | |||
@GetMapping("/knowledge") | |||
AjaxResult query(@RequestParam(value = "man_code") String manCode, @RequestParam(value = "question") String question, @RequestParam(value = "tenant_id") Long tenantId); | |||
@PostMapping ("/knowledge") | |||
AjaxResult query(@RequestBody KnowledgeVo vo); | |||
} |
@@ -0,0 +1,15 @@ | |||
package com.xueyi.nlt.api.nlt.feign.factory; | |||
import com.xueyi.nlt.api.nlt.feign.RemoteIntentService; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.springframework.cloud.openfeign.FallbackFactory; | |||
import org.springframework.stereotype.Component; | |||
@Slf4j | |||
@Component | |||
public class RemoteIntentFallbackFactory implements FallbackFactory<RemoteIntentService> { | |||
@Override | |||
public RemoteIntentService create(Throwable cause) { | |||
return null; | |||
} | |||
} |
@@ -0,0 +1,42 @@ | |||
package com.xueyi.nlt.api.nlt.feign.factory; | |||
import com.alibaba.fastjson2.JSONObject; | |||
import com.xueyi.common.core.web.result.AjaxResult; | |||
import com.xueyi.nlt.api.nlt.domain.vo.DmLandingLlmVo; | |||
import com.xueyi.nlt.api.nlt.feign.RemoteLandingLlmService; | |||
import com.xueyi.nlt.api.nlt.feign.RemoteQAService; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.springframework.cloud.openfeign.FallbackFactory; | |||
import org.springframework.stereotype.Component; | |||
/** | |||
* 会议室服务 降级处理 | |||
* | |||
* @author xueyi | |||
*/ | |||
@Slf4j | |||
@Component | |||
public class RemoteLandingLlmFallbackFactory implements FallbackFactory<RemoteLandingLlmService> { | |||
@Override | |||
public RemoteLandingLlmService create(Throwable throwable) { | |||
log.error("短信服务调用失败:{}", throwable.getMessage()); | |||
return new RemoteLandingLlmService() { | |||
@Override | |||
public JSONObject query(DmLandingLlmVo vo) { | |||
JSONObject jsonObject = new JSONObject(); | |||
jsonObject.put("status","fail"); | |||
jsonObject.put("data",""); | |||
return jsonObject; | |||
} | |||
@Override | |||
public JSONObject query(JSONObject jsonObject) { | |||
JSONObject jResult = new JSONObject(); | |||
jResult.put("status","fail2"); | |||
jResult.put("data",""); | |||
return jResult; | |||
} | |||
}; | |||
} | |||
} |
@@ -0,0 +1,34 @@ | |||
package com.xueyi.nlt.api.nlt.feign.factory; | |||
import com.xueyi.common.core.web.result.AjaxResult; | |||
import com.xueyi.nlt.api.nlt.domain.vo.KnowledgeVo; | |||
import com.xueyi.nlt.api.nlt.feign.RemoteQAService; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.springframework.cloud.openfeign.FallbackFactory; | |||
import org.springframework.stereotype.Component; | |||
/** | |||
* 会议室服务 降级处理 | |||
* | |||
* @author xueyi | |||
*/ | |||
@Slf4j | |||
@Component | |||
public class RemoteQAFallbackFactory implements FallbackFactory<RemoteQAService> { | |||
@Override | |||
public RemoteQAService create(Throwable throwable) { | |||
log.error("短信服务调用失败:{}", throwable.getMessage()); | |||
return new RemoteQAService() { | |||
@Override | |||
public AjaxResult query(String manCode, String question, Long tenantId) { | |||
return AjaxResult.error("查询失败"); | |||
} | |||
@Override | |||
public AjaxResult query(KnowledgeVo vo) { | |||
return AjaxResult.error("查询失败"); | |||
} | |||
}; | |||
} | |||
} |
@@ -0,0 +1,3 @@ | |||
com.xueyi.nlt.api.nlt.feign.factory.RemoteIntentFallbackFactory | |||
com.xueyi.nlt.api.nlt.feign.factory.RemoteQAFallbackFactory | |||
com.xueyi.nlt.api.nlt.feign.factory.RemoteLandingLlmFallbackFactory |
@@ -3,6 +3,7 @@ package com.xueyi.system.api.digitalmans.domain.dto; | |||
import com.xueyi.system.api.digitalmans.domain.po.DmManDevicePo; | |||
import lombok.Data; | |||
import lombok.EqualsAndHashCode; | |||
import lombok.ToString; | |||
import java.io.Serial; | |||
@@ -12,6 +13,7 @@ import java.io.Serial; | |||
* @author xueyi | |||
*/ | |||
@Data | |||
@ToString(callSuper = true) | |||
@EqualsAndHashCode(callSuper = true) | |||
public class DmManDeviceDto extends DmManDevicePo { | |||
@@ -2,13 +2,14 @@ package com.xueyi.system.api.digitalmans.domain.dto; | |||
import com.xueyi.system.api.digitalmans.domain.po.DmDigitalmanPo; | |||
import com.xueyi.system.api.digitalmans.domain.po.DmDigitalmanWorktimePo; | |||
import com.xueyi.system.api.digitalmans.domain.po.DmModelPo; | |||
import com.xueyi.system.api.digitalmans.domain.vo.DmBroadcastVo; | |||
import com.xueyi.system.api.organize.domain.vo.SysDeptExt; | |||
import com.xueyi.system.api.resource.domain.po.DmResourcesPo; | |||
import lombok.Data; | |||
import lombok.EqualsAndHashCode; | |||
import lombok.NoArgsConstructor; | |||
import java.io.Serial; | |||
import java.util.List; | |||
@Data | |||
@EqualsAndHashCode(callSuper = true) | |||
@@ -21,5 +22,8 @@ public class DmSyncDigitalmanDto extends DmDigitalmanPo { | |||
protected DmResourcesPo icon; | |||
protected DmResourcesPo screenOff; | |||
protected DmDigitalmanWorktimePo worktime; | |||
protected SysDeptExt workdayHour; | |||
protected String iconPos; | |||
protected List<DmBroadcastVo> broadcast; | |||
} |
@@ -22,4 +22,6 @@ public class DmVisitorsDto extends DmVisitorsPo { | |||
public static final Long TYPE_VIP_VISITOR = 9L; | |||
public static final Long TYPE_SPECIAL_VISITOR = 10L; | |||
public String imgUrl; | |||
} |
@@ -26,16 +26,16 @@ public class DmDigitalmanExtPo extends TBaseEntity { | |||
private static final long serialVersionUID = 1L; | |||
/** 数字人id */ | |||
@Excel(name = "会议室ID") | |||
@Excel(name = "数字人扩展表ID") | |||
protected Long id; | |||
/** 访客电话 */ | |||
@Excel(name = "访客电话") | |||
@Excel(name = "snCode") | |||
protected String snCode; | |||
/** 技能信息 */ | |||
@Excel(name = "技能信息") | |||
@Excel(name = "ip地址") | |||
protected String ipAddr; | |||
/** 访客公司 */ | |||
@@ -56,4 +56,12 @@ public class DmManDevicePo extends BaseEntity { | |||
@Excel(name = "状态") | |||
protected String status; | |||
/** 安装状态 */ | |||
@Excel(name = "安装状态") | |||
protected String setupStatus; | |||
/** apk版本 */ | |||
@Excel(name = "apk版本") | |||
protected String apkVersion; | |||
} |
@@ -1,16 +1,15 @@ | |||
package com.xueyi.system.api.digitalmans.domain.po; | |||
import com.xueyi.common.core.web.tenant.base.TBaseEntity; | |||
import com.xueyi.common.core.annotation.Excel; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import com.xueyi.common.core.annotation.Excel; | |||
import com.xueyi.common.core.web.tenant.base.TBaseEntity; | |||
import lombok.Data; | |||
import lombok.EqualsAndHashCode; | |||
import java.io.Serial; | |||
import static com.xueyi.common.core.constant.basic.EntityConstants.STATUS; | |||
import static com.xueyi.common.core.constant.basic.EntityConstants.SORT; | |||
import static com.xueyi.common.core.constant.basic.EntityConstants.REMARK; | |||
import static com.xueyi.common.core.constant.basic.EntityConstants.SORT; | |||
/** | |||
* 访客 持久化对象 | |||
@@ -53,4 +52,6 @@ public class DmSkillPo extends TBaseEntity { | |||
protected Integer firstCall; | |||
protected String auth; | |||
} |
@@ -27,6 +27,10 @@ public class DmVisitRecordsPo extends TBaseEntity { | |||
@Serial | |||
private static final long serialVersionUID = 1L; | |||
public static final Integer STATUS_VISITING = 0; | |||
public static final Integer STATUS_VISITED = 8; | |||
public static final Integer STATUS_EXPIRED = 9; | |||
/** 访客ID */ | |||
@Excel(name = "访客ID") | |||
protected Long visitorId; | |||
@@ -63,4 +67,17 @@ public class DmVisitRecordsPo extends TBaseEntity { | |||
@Excel(name = "所属组织ID") | |||
protected Long deptId; | |||
protected String visitorCode; | |||
private String receiverName; | |||
private String receiverPhone; | |||
public String toString(){ | |||
return new StringBuilder("VisitorId: ").append(visitorId).append(", UserId: ").append(userId).append(", VisitDate: ").append(visitDate).append(", VisitTime: ").append(visitTime).append(", Duration: ").append(duration).append(", RecordStatus: ").append(recordStatus).append(", DeptId: ").append(deptId).append(", Num: ").append(num).toString(); | |||
} | |||
} |
@@ -0,0 +1,22 @@ | |||
package com.xueyi.system.api.digitalmans.domain.vo; | |||
import lombok.Data; | |||
import lombok.NoArgsConstructor; | |||
import java.io.Serial; | |||
import java.io.Serializable; | |||
@Data | |||
@NoArgsConstructor | |||
public class DashboardVo implements Serializable { | |||
@Serial | |||
private static final long serialVersionUID = 1L; | |||
/** | |||
* 数字人数 | |||
*/ | |||
private Integer digitalMans; | |||
private Integer onlineDevices; | |||
private Integer AlertNear7Days; | |||
private Integer onProcessAlert; | |||
} |
@@ -0,0 +1,14 @@ | |||
package com.xueyi.system.api.digitalmans.domain.vo; | |||
import com.alibaba.fastjson2.JSONArray; | |||
import lombok.Data; | |||
import lombok.NoArgsConstructor; | |||
import org.springframework.web.bind.annotation.RequestParam; | |||
@Data | |||
@NoArgsConstructor | |||
public class DmBatchQuestionsVo { | |||
private Long knowledgeId; | |||
private JSONArray questions; | |||
private Long createId; | |||
} |
@@ -0,0 +1,16 @@ | |||
package com.xueyi.system.api.digitalmans.domain.vo; | |||
import com.alibaba.fastjson2.JSONObject; | |||
import lombok.Data; | |||
import lombok.NoArgsConstructor; | |||
import java.util.List; | |||
@Data | |||
@NoArgsConstructor | |||
public class DmBroadcastVo { | |||
Integer recycle; | |||
Integer speed; | |||
Long id; | |||
List<JSONObject> resource; | |||
} |
@@ -0,0 +1,27 @@ | |||
package com.xueyi.system.api.digitalmans.domain.vo; | |||
import lombok.Data; | |||
import lombok.NoArgsConstructor; | |||
import java.io.Serial; | |||
@Data | |||
@NoArgsConstructor | |||
public class DmReceptionVo { | |||
@Serial | |||
private static final long serialVersionUID = 1L; | |||
private String name; | |||
private String date; | |||
private String welcome; | |||
private Long[] guide; | |||
private Long[] first; | |||
private Long[] second; | |||
private Long[] third; | |||
} |
@@ -0,0 +1,21 @@ | |||
package com.xueyi.system.api.digitalmans.domain.vo; | |||
import lombok.Data; | |||
import lombok.NoArgsConstructor; | |||
import java.io.Serial; | |||
import java.io.Serializable; | |||
@Data | |||
@NoArgsConstructor | |||
public class NumberOfAlertToChartVo implements Serializable { | |||
@Serial | |||
private static final long serialVersionUID = 1L; | |||
private String numberOfAlert; | |||
private String date; | |||
} |
@@ -0,0 +1,22 @@ | |||
package com.xueyi.system.api.digitalmans.domain.vo; | |||
import lombok.Data; | |||
import lombok.NoArgsConstructor; | |||
import java.io.Serial; | |||
import java.io.Serializable; | |||
@Data | |||
@NoArgsConstructor | |||
public class NumberOfOnlineToChartVo implements Serializable { | |||
@Serial | |||
private static final long serialVersionUID = 1L; | |||
private String numberOfOnline; | |||
private Integer total; | |||
private String date; | |||
} |
@@ -0,0 +1,24 @@ | |||
package com.xueyi.system.api.digitalmans.feign; | |||
import com.xueyi.common.core.constant.basic.SecurityConstants; | |||
import com.xueyi.common.core.constant.basic.ServiceConstants; | |||
import com.xueyi.common.core.web.result.R; | |||
import com.xueyi.system.api.digitalmans.domain.vo.DmBroadcastVo; | |||
import com.xueyi.system.api.digitalmans.domain.vo.DmReceptionVo; | |||
import com.xueyi.system.api.organize.feign.factory.RemoteUserFallbackFactory; | |||
import org.springframework.cloud.openfeign.FeignClient; | |||
import org.springframework.web.bind.annotation.GetMapping; | |||
import org.springframework.web.bind.annotation.RequestHeader; | |||
import org.springframework.web.bind.annotation.RequestParam; | |||
import java.util.List; | |||
@FeignClient(contextId = "remoteBroadcastService", value = ServiceConstants.SYSTEM_SERVICE, fallbackFactory = RemoteUserFallbackFactory.class) | |||
public interface RemoteBroadcastService { | |||
@GetMapping("/broadcast/inner/list") | |||
public R<List<DmBroadcastVo>> innerlist(@RequestParam("manCode") String manCode, | |||
@RequestHeader(SecurityConstants.ENTERPRISE_ID) Long enterpriseId, @RequestHeader(SecurityConstants.SOURCE_NAME) String sourceName, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); | |||
} |
@@ -0,0 +1,28 @@ | |||
package com.xueyi.system.api.digitalmans.feign; | |||
import com.xueyi.common.core.constant.basic.SecurityConstants; | |||
import com.xueyi.common.core.constant.basic.ServiceConstants; | |||
import com.xueyi.system.api.organize.feign.factory.RemoteUserFallbackFactory; | |||
import org.springframework.cloud.openfeign.FeignClient; | |||
import org.springframework.web.bind.annotation.PostMapping; | |||
import org.springframework.web.bind.annotation.RequestBody; | |||
import org.springframework.web.bind.annotation.RequestHeader; | |||
/** | |||
* 一体机mqtt服务 | |||
* | |||
* @author yk | |||
*/ | |||
@FeignClient(contextId = "remoteDigitalmanMqttService", value = ServiceConstants.SYSTEM_SERVICE, fallbackFactory = RemoteUserFallbackFactory.class) | |||
public interface RemoteDigitalmanMqttService { | |||
@PostMapping("/man/api/mqtt/heartbeat") | |||
public void heartbeat(@RequestBody(required = true) String message,@RequestHeader(SecurityConstants.ENTERPRISE_ID) Long enterpriseId, @RequestHeader(SecurityConstants.SOURCE_NAME) String sourceName, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); | |||
@PostMapping("/man/api/mqtt/log-upload") | |||
public void logUpload(@RequestBody(required = true) String message,@RequestHeader(SecurityConstants.ENTERPRISE_ID) Long enterpriseId, @RequestHeader(SecurityConstants.SOURCE_NAME) String sourceName, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); | |||
} |
@@ -1,17 +1,22 @@ | |||
package com.xueyi.system.api.digitalmans.feign; | |||
import com.alibaba.fastjson2.JSONObject; | |||
import com.xueyi.common.core.constant.basic.SecurityConstants; | |||
import com.xueyi.common.core.constant.basic.ServiceConstants; | |||
import com.xueyi.common.core.web.result.R; | |||
import com.xueyi.system.api.digitalmans.domain.dto.DmManDeviceDto; | |||
import com.xueyi.system.api.digitalmans.domain.dto.DmSyncDigitalmanDto; | |||
import com.xueyi.system.api.digitalmans.domain.po.DmDigitalmanExtPo; | |||
import com.xueyi.system.api.organize.feign.factory.RemoteUserFallbackFactory; | |||
import org.springframework.cloud.openfeign.FeignClient; | |||
import org.springframework.web.bind.annotation.GetMapping; | |||
import org.springframework.web.bind.annotation.PostMapping; | |||
import org.springframework.web.bind.annotation.RequestBody; | |||
import org.springframework.web.bind.annotation.RequestHeader; | |||
import org.springframework.web.bind.annotation.RequestParam; | |||
import java.util.List; | |||
/** | |||
* 用户服务 | |||
* | |||
@@ -35,6 +40,20 @@ public interface RemoteDigitalmanService { | |||
public R<Integer> initInner(@RequestParam(value = "snCode") String snCode, | |||
@RequestHeader(SecurityConstants.ENTERPRISE_ID) Long enterpriseId, @RequestHeader(SecurityConstants.SOURCE_NAME) String sourceName, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); | |||
@PostMapping("/man/inner/sync") | |||
public R<Boolean> sync(@RequestHeader(SecurityConstants.ENTERPRISE_ID) Long enterpriseId, @RequestHeader(SecurityConstants.SOURCE_NAME) String sourceName, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); | |||
@PostMapping("/man/inner/update_device_online") | |||
public R<Boolean> updateDeviceOnline(@RequestParam(value = "deviceId")String deviceId, @RequestHeader(SecurityConstants.ENTERPRISE_ID) Long enterpriseId, @RequestHeader(SecurityConstants.SOURCE_NAME) String sourceName, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); | |||
@PostMapping("/man/inner/sync_ext_isonline") | |||
public R<Integer> syncExtIsonline(@RequestBody List<DmManDeviceDto> devices, @RequestHeader(SecurityConstants.ENTERPRISE_ID) Long enterpriseId, @RequestHeader(SecurityConstants.SOURCE_NAME) String sourceName, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); | |||
@GetMapping("/man/inner-api/devInfo/{devId}") | |||
public R<DmDigitalmanExtPo> devInfo(@RequestParam(value = "devId") String devId, @RequestHeader(SecurityConstants.ENTERPRISE_ID) Long enterpriseId, @RequestHeader(SecurityConstants.SOURCE_NAME) String sourceName, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); | |||
@GetMapping("/man/api/mansInfo") | |||
public R<JSONObject> mansInfo(); | |||
@GetMapping("/man/delRecognizedRecords") | |||
public R<JSONObject> delRecognizedRecords(@RequestParam(value = "day") Integer days); | |||
} |
@@ -29,7 +29,13 @@ public interface RemoteManDeviceService { | |||
@GetMapping("/manDevice/inner/info/{devId}") | |||
R<DmManDeviceDto> manDeviceInfoInner(@RequestParam(value = "devId") String devId); | |||
@PostMapping(value = "/manDevice/inner/sync") | |||
R<Integer> manDeviceListInnerSync(@RequestParam(value = "tenantId") Long tenantId); | |||
@PutMapping(value = "/manDevice/inner/info") | |||
R<Integer> manDeviceInfoInnerUpdate(@RequestBody DmActiveVo vo); | |||
@PostMapping(value = "/manDevice/inner/sync_numbers_of_online") | |||
R<Integer> syncNumbersOfOnline(); | |||
} |
@@ -0,0 +1,22 @@ | |||
package com.xueyi.system.api.digitalmans.feign; | |||
import com.alibaba.fastjson2.JSONArray; | |||
import com.xueyi.common.core.constant.basic.SecurityConstants; | |||
import com.xueyi.common.core.constant.basic.ServiceConstants; | |||
import com.xueyi.common.core.web.result.R; | |||
import com.xueyi.system.api.digitalmans.domain.vo.DmBatchQuestionsVo; | |||
import com.xueyi.system.api.digitalmans.domain.vo.DmReceptionVo; | |||
import com.xueyi.system.api.organize.feign.factory.RemoteUserFallbackFactory; | |||
import org.springframework.cloud.openfeign.FeignClient; | |||
import org.springframework.web.bind.annotation.*; | |||
@FeignClient(contextId = "remoteQuestionanswersService", value = ServiceConstants.SYSTEM_SERVICE, fallbackFactory = RemoteUserFallbackFactory.class) | |||
public interface RemoteQuestionanswersService { | |||
@PostMapping("/questionanswers/inner/batch_insert") | |||
@ResponseBody | |||
public R<DmReceptionVo> batchInsertInner(@RequestBody DmBatchQuestionsVo dmBatchQuestionsVo, | |||
@RequestHeader(SecurityConstants.ENTERPRISE_ID) Long enterpriseId, @RequestHeader(SecurityConstants.SOURCE_NAME) String sourceName, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); | |||
} |
@@ -0,0 +1,21 @@ | |||
package com.xueyi.system.api.digitalmans.feign; | |||
import com.xueyi.common.core.constant.basic.SecurityConstants; | |||
import com.xueyi.common.core.constant.basic.ServiceConstants; | |||
import com.xueyi.common.core.web.result.R; | |||
import com.xueyi.system.api.digitalmans.domain.vo.DmReceptionVo; | |||
import com.xueyi.system.api.organize.feign.factory.RemoteUserFallbackFactory; | |||
import org.springframework.cloud.openfeign.FeignClient; | |||
import org.springframework.web.bind.annotation.GetMapping; | |||
import org.springframework.web.bind.annotation.RequestHeader; | |||
import org.springframework.web.bind.annotation.RequestParam; | |||
@FeignClient(contextId = "remoteReceptionService", value = ServiceConstants.SYSTEM_SERVICE, fallbackFactory = RemoteUserFallbackFactory.class) | |||
public interface RemoteReceptionService { | |||
@GetMapping("/reception/inner/get_reception_task") | |||
public R<DmReceptionVo> getReceptionTaskInner(@RequestParam("manCode") String manCode, | |||
@RequestHeader(SecurityConstants.ENTERPRISE_ID) Long enterpriseId, @RequestHeader(SecurityConstants.SOURCE_NAME) String sourceName, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); | |||
} |
@@ -0,0 +1,11 @@ | |||
package com.xueyi.system.api.exception.domain.merge; | |||
public interface MergeGroup { | |||
/** 设备日志关联 -》 日志 */ | |||
String LOG_DmDevice_GROUP = "LOG_DmDevice_GROUP"; | |||
/** 模块菜单关联 -》 菜单 */ | |||
String MENU_SysModule_GROUP = "MENU_SysModule_GROUP"; | |||
} |
@@ -0,0 +1,11 @@ | |||
package com.xueyi.system.api.holiday.domain.vo; | |||
import lombok.Data; | |||
import lombok.NoArgsConstructor; | |||
@Data | |||
@NoArgsConstructor | |||
public class HolidayRspEntity { | |||
} |
@@ -0,0 +1,24 @@ | |||
package com.xueyi.system.api.holiday.feign; | |||
import com.alibaba.fastjson2.JSONObject; | |||
import com.xueyi.system.api.holiday.feign.factory.RemoteHolidayFallbackFactory; | |||
import com.xueyi.system.api.sms.domain.vo.SmsReqEntity; | |||
import com.xueyi.system.api.sms.feign.factory.RemoteSmsFallbackFactory; | |||
import org.springframework.cloud.openfeign.FeignClient; | |||
import org.springframework.web.bind.annotation.GetMapping; | |||
import org.springframework.web.bind.annotation.PostMapping; | |||
import org.springframework.web.bind.annotation.RequestBody; | |||
/** | |||
* 短信发送服务 | |||
* | |||
* @author yrx | |||
*/ | |||
@FeignClient(url = "${notification.holiday.url}",name = "holiday", fallbackFactory = RemoteHolidayFallbackFactory.class) | |||
public interface RemoteHolidayService { | |||
@GetMapping("/api/holiday/year") | |||
JSONObject getHolidays(); | |||
} |
@@ -0,0 +1,30 @@ | |||
package com.xueyi.system.api.holiday.feign.factory; | |||
import com.alibaba.fastjson2.JSONObject; | |||
import com.xueyi.common.core.web.result.R; | |||
import com.xueyi.system.api.holiday.feign.RemoteHolidayService; | |||
import com.xueyi.system.api.sms.domain.vo.SmsReqEntity; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.springframework.cloud.openfeign.FallbackFactory; | |||
import org.springframework.stereotype.Component; | |||
/** | |||
* 会议室服务 降级处理 | |||
* | |||
* @author xueyi | |||
*/ | |||
@Slf4j | |||
@Component | |||
public class RemoteHolidayFallbackFactory implements FallbackFactory<RemoteHolidayService> { | |||
@Override | |||
public RemoteHolidayService create(Throwable throwable) { | |||
log.error("短信服务调用失败:{}", throwable.getMessage()); | |||
return new RemoteHolidayService() { | |||
@Override | |||
public JSONObject getHolidays() { | |||
return R.fail("工作日服务调用失败:" + throwable.getMessage()).toJson(); | |||
} | |||
}; | |||
} | |||
} |
@@ -33,4 +33,6 @@ public class DmMeetingOrdersDto extends DmMeetingOrdersPo { | |||
private DmMeetingRoomsPo dmMeetingRoomsPo; | |||
private String devId; | |||
} |
@@ -9,10 +9,12 @@ import com.xueyi.system.api.meeting.domain.dto.DmMeetingRoomsDto; | |||
import com.xueyi.system.api.meeting.feign.factory.RemoteMeetingFallbackFactory; | |||
import org.springframework.cloud.openfeign.FeignClient; | |||
import org.springframework.web.bind.annotation.GetMapping; | |||
import org.springframework.web.bind.annotation.PathVariable; | |||
import org.springframework.web.bind.annotation.PostMapping; | |||
import org.springframework.web.bind.annotation.RequestBody; | |||
import org.springframework.web.bind.annotation.RequestHeader; | |||
import org.springframework.web.bind.annotation.RequestParam; | |||
import org.springframework.web.bind.annotation.ResponseBody; | |||
import java.util.List; | |||
@@ -41,7 +43,27 @@ public interface RemoteMeetingService { | |||
@PostMapping(value = "/meeting/inner-api/lists") | |||
JSONObject listsInner(@RequestParam("dateStr") String dateStr, @RequestParam("spaceId") Long spaceId, @RequestHeader(SecurityConstants.ENTERPRISE_ID) Long enterpriseId, @RequestHeader(SecurityConstants.SOURCE_NAME) String sourceName, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); | |||
@GetMapping(value = "/meeting/inner-api/lists") | |||
JSONObject listsAllInner(@RequestHeader(SecurityConstants.ENTERPRISE_ID) Long enterpriseId, @RequestHeader(SecurityConstants.SOURCE_NAME) String sourceName, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); | |||
@PostMapping(value = "/meeting/inner-api/date-lists") | |||
JSONObject listsByDate(@RequestParam("dateStr") String dateStr, @RequestHeader(SecurityConstants.ENTERPRISE_ID) Long enterpriseId, @RequestHeader(SecurityConstants.SOURCE_NAME) String sourceName, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); | |||
@PostMapping(value = "/meeting/inner-api/lists-all") | |||
JSONObject listAllInner(@RequestParam("dateStr") String dateStr, @RequestParam("spaceId") Long spaceId, @RequestHeader(SecurityConstants.ENTERPRISE_ID) Long enterpriseId, @RequestHeader(SecurityConstants.SOURCE_NAME) String sourceName, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); | |||
@GetMapping("/meeting/inner-api/recent/{deptId}/{dateStr}") | |||
@ResponseBody | |||
public List<JSONObject> recent(@PathVariable(value = "deptId") Long deptId, @PathVariable(value = "dateStr") String dateStr, @RequestParam(value = "roomId", required = false) Long roomId,@RequestParam(value = "startTime", required = false) String startTime, @RequestHeader(SecurityConstants.ENTERPRISE_ID) Long enterpriseId, @RequestHeader(SecurityConstants.SOURCE_NAME) String sourceName, @RequestHeader(SecurityConstants.FROM_SOURCE) String source) ; | |||
@GetMapping("/meeting/inner-api/recent/{deptId}") | |||
@ResponseBody | |||
public List<JSONObject> recent(@PathVariable(value = "deptId") Long deptId, @RequestHeader(SecurityConstants.ENTERPRISE_ID) Long enterpriseId, @RequestHeader(SecurityConstants.SOURCE_NAME) String sourceName, @RequestHeader(SecurityConstants.FROM_SOURCE) String source) ; | |||
@GetMapping(value = "/meeting/api/recent/{devId}/{dateStr}") | |||
R<List<JSONObject>> ableOrderList(@PathVariable(value = "devId") String devId, @PathVariable(value = "dateStr",required = false) String dateStr, @RequestParam(value = "roomId", required = false) Long roomId, @RequestParam(value = "startTime", required = false) String startTime); | |||
@GetMapping(value = "/meeting/inner-api/enableOrder/{roomId}/{dateStr}/{startTime}") | |||
JSONObject queryExist(@PathVariable(name = "roomId") Long roomId, @PathVariable(name = "dateStr") String dateStr, @PathVariable(name = "startTime") String startTime, @RequestHeader(SecurityConstants.ENTERPRISE_ID) Long enterpriseId, @RequestHeader(SecurityConstants.SOURCE_NAME) String sourceName, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); | |||
} |
@@ -9,6 +9,7 @@ import lombok.extern.slf4j.Slf4j; | |||
import org.springframework.cloud.openfeign.FallbackFactory; | |||
import org.springframework.stereotype.Component; | |||
import java.util.ArrayList; | |||
import java.util.List; | |||
/** | |||
@@ -33,9 +34,10 @@ public class RemoteMeetingFallbackFactory implements FallbackFactory<RemoteMeeti | |||
@Override | |||
public JSONObject saveInner(DmMeetingOrdersDto order, Long enterpriseId, String sourceName, String source) { | |||
return R.fail("保存会议室预约失败:" + throwable.getMessage()).toJson(); | |||
return null; | |||
} | |||
@Override | |||
public JSONObject delInner(Long id, Long enterpriseId, String sourceName, String source) { | |||
return R.fail("删除会议室预约失败:" + throwable.getMessage()).toJson(); | |||
@@ -51,10 +53,44 @@ public class RemoteMeetingFallbackFactory implements FallbackFactory<RemoteMeeti | |||
return R.fail("获取会议室预约列表失败:" + throwable.getMessage()).toJson(); | |||
} | |||
@Override | |||
public JSONObject listsAllInner( Long enterpriseId, String sourceName, String source) { | |||
return R.fail("获取会议室预约列表失败:" + throwable.getMessage()).toJson(); | |||
} | |||
@Override | |||
public JSONObject listsByDate(String dateStr, Long enterpriseId, String sourceName, String source) { | |||
return R.fail("获取会议室预约列表失败:" + throwable.getMessage()).toJson(); | |||
} | |||
@Override | |||
public JSONObject listAllInner(String dateStr, Long spaceId, Long enterpriseId, String sourceName, String source) { | |||
return R.fail("获取会议室预约列表失败:" + throwable.getMessage()).toJson(); | |||
} | |||
@Override | |||
public List<JSONObject> recent(Long deptId, String dateStr, Long roomId, String startTime, Long enterpriseId, String sourceName, String source) { | |||
List js = new ArrayList<>(); | |||
js.add(R.fail("获取会议室可预约列表失败:" + throwable.getMessage()).toJson()); | |||
return js; | |||
} | |||
@Override | |||
public List<JSONObject> recent(Long deptId, Long enterpriseId, String sourceName, String source) { | |||
List js = new ArrayList<>(); | |||
js.add(R.fail("获取会议室可预约列表失败:" + throwable.getMessage()).toJson()); | |||
return js; | |||
} | |||
@Override | |||
public R<List<JSONObject>> ableOrderList(String devId, String dateStr, Long roomId, String startTime) { | |||
return null; | |||
} | |||
@Override | |||
public JSONObject queryExist(Long roomId, String dateStr, String startTime, Long enterpriseId, String sourceName, String source) { | |||
return null; | |||
} | |||
}; | |||
} | |||
} |
@@ -59,4 +59,12 @@ public class SysUserDto extends SysUserPo { | |||
return StrUtil.equals(AuthorityConstants.UserType.ADMIN.getCode(), userType); | |||
} | |||
@Override | |||
public String toString(){ | |||
return "User{" + | |||
"id=" + id + | |||
", username='" + userName + '\'' + | |||
", nickName='" + nickName + '\'' + | |||
", phone='" + phone + '\''; | |||
} | |||
} |
@@ -95,4 +95,12 @@ public class SysUserPo extends TBaseEntity { | |||
protected LocalDateTime loginDate; | |||
protected String dept; | |||
@Override | |||
public String toString(){ | |||
return "User{" + | |||
"id=" + id + | |||
", username='" + userName + '\'' + | |||
", nickName='" + nickName + '\'' + | |||
", phone='" + phone + '\''; | |||
} | |||
} |
@@ -0,0 +1,26 @@ | |||
package com.xueyi.system.api.organize.domain.vo; | |||
import lombok.Data; | |||
import lombok.NoArgsConstructor; | |||
@Data | |||
@NoArgsConstructor | |||
public class SysDeptExt { | |||
/** Id */ | |||
private Long deptId; | |||
/** 上班打卡开始时间 */ | |||
private String onDutyHourStart; | |||
/** 上班打卡结束时间 */ | |||
private String onDutyHourEnd; | |||
/** 下班打卡开始时间 */ | |||
private String offDutyHourStart; | |||
/** 下班打卡结束时间 */ | |||
private String offDutyHourEnd; | |||
} |
@@ -0,0 +1,28 @@ | |||
package com.xueyi.system.api.organize.feign; | |||
import com.xueyi.common.core.constant.basic.SecurityConstants; | |||
import com.xueyi.common.core.constant.basic.ServiceConstants; | |||
import com.xueyi.common.core.web.result.R; | |||
import com.xueyi.system.api.organize.domain.dto.SysDeptDto; | |||
import com.xueyi.system.api.organize.domain.dto.SysEnterpriseDto; | |||
import com.xueyi.system.api.organize.feign.factory.RemoteDeptFallbackFactory; | |||
import com.xueyi.system.api.organize.feign.factory.RemoteEnterpriseFallbackFactory; | |||
import org.springframework.cloud.openfeign.FeignClient; | |||
import org.springframework.web.bind.annotation.*; | |||
/** | |||
* 部门服务 | |||
* | |||
* @author xueyi | |||
*/ | |||
@FeignClient(contextId = "remoteEnterpriseService", value = ServiceConstants.SYSTEM_SERVICE, fallbackFactory = RemoteEnterpriseFallbackFactory.class) | |||
public interface RemoteEnterpriseService { | |||
/** | |||
* 新增部门 | |||
* | |||
* @return 结果 | |||
*/ | |||
@GetMapping("/enterprise/info") | |||
R<SysEnterpriseDto> getInfo(@RequestParam(value = "enterpriseId") Long enterpriseId); | |||
} |
@@ -0,0 +1,31 @@ | |||
package com.xueyi.system.api.organize.feign.factory; | |||
import com.xueyi.common.core.web.result.R; | |||
import com.xueyi.system.api.organize.domain.dto.SysDeptDto; | |||
import com.xueyi.system.api.organize.domain.dto.SysEnterpriseDto; | |||
import com.xueyi.system.api.organize.feign.RemoteDeptService; | |||
import com.xueyi.system.api.organize.feign.RemoteEnterpriseService; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.springframework.cloud.openfeign.FallbackFactory; | |||
import org.springframework.stereotype.Component; | |||
/** | |||
* 部门服务 降级处理 | |||
* | |||
* @author xueyi | |||
*/ | |||
@Slf4j | |||
@Component | |||
public class RemoteEnterpriseFallbackFactory implements FallbackFactory<RemoteEnterpriseService> { | |||
@Override | |||
public RemoteEnterpriseService create(Throwable throwable) { | |||
log.error("部门服务调用失败:{}", throwable.getMessage()); | |||
return new RemoteEnterpriseService() { | |||
@Override | |||
public R<SysEnterpriseDto> getInfo(Long enterpriseId) { | |||
return R.fail("获取企业信息失败:" + throwable.getMessage()); | |||
} | |||
}; | |||
} | |||
} |
@@ -0,0 +1,32 @@ | |||
package com.xueyi.system.api.pass.domain.dto; | |||
import lombok.Data; | |||
import java.io.Serial; | |||
import java.math.BigDecimal; | |||
import java.util.List; | |||
/** | |||
* 人员识别 数据传输对象 | |||
* | |||
* @author xueyi | |||
*/ | |||
@Data | |||
public class DmRecognizedMultiRecordsDto { | |||
@Serial | |||
private static final long serialVersionUID = 1L; | |||
private String devId; | |||
private BigDecimal timestamp; | |||
private List<DmRecognizedRecordsDto> records; | |||
private String sign; | |||
public final static Integer TYPE_STAFF = 1; | |||
public final static Integer TYPE_STRANGER = 2; | |||
} |
@@ -26,6 +26,6 @@ public class DmRecognizedRecordsDto extends DmRecognizedRecordsPo { | |||
private String sign; | |||
public final static Integer TYPE_STAFF = 1; | |||
public final static Integer TYPE_STRANGER = 2; | |||
public final static Integer TYPE_STRANGER = 6; | |||
} |
@@ -71,4 +71,6 @@ public class DmRecognizedRecordsPo extends TBaseEntity { | |||
@Excel(name = "所属组织ID") | |||
protected Long deptId; | |||
protected Long resourceId; | |||
} |
@@ -4,12 +4,12 @@ import com.alibaba.fastjson2.JSONObject; | |||
import com.xueyi.common.core.constant.basic.SecurityConstants; | |||
import com.xueyi.common.core.constant.basic.ServiceConstants; | |||
import com.xueyi.system.api.organize.feign.factory.RemotePostFallbackFactory; | |||
import com.xueyi.system.api.pass.domain.dto.DmRecognizedMultiRecordsDto; | |||
import com.xueyi.system.api.pass.domain.dto.DmRecognizedRecordsDto; | |||
import org.springframework.cloud.openfeign.FeignClient; | |||
import org.springframework.web.bind.annotation.GetMapping; | |||
import org.springframework.web.bind.annotation.PostMapping; | |||
import org.springframework.web.bind.annotation.RequestBody; | |||
import org.springframework.web.bind.annotation.RequestHeader; | |||
import org.springframework.web.bind.annotation.RequestParam; | |||
/** | |||
* 用户服务 | |||
@@ -19,9 +19,12 @@ import org.springframework.web.bind.annotation.RequestParam; | |||
@FeignClient(contextId = "remoteRecognizedRecordsService", value = ServiceConstants.SYSTEM_SERVICE, fallbackFactory = RemotePostFallbackFactory.class) | |||
public interface RemoteRecognizedRecordsService { | |||
@GetMapping("/pass/inner-api/upload-pass") | |||
@PostMapping("/pass/inner-api/upload-pass") | |||
JSONObject uploadPass(@RequestBody DmRecognizedRecordsDto recognizedRecordsDto, @RequestHeader(SecurityConstants.ENTERPRISE_ID) Long enterpriseId, @RequestHeader(SecurityConstants.SOURCE_NAME) String sourceName, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); | |||
@PostMapping("/pass/inner-api/upload-multi-pass") | |||
JSONObject uploadMultiPass(@RequestBody DmRecognizedMultiRecordsDto recognizedMultiRecordsDto, @RequestHeader(SecurityConstants.ENTERPRISE_ID) Long enterpriseId, @RequestHeader(SecurityConstants.SOURCE_NAME) String sourceName, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); | |||
} |
@@ -2,6 +2,7 @@ package com.xueyi.system.api.pass.feign.factory; | |||
import com.alibaba.fastjson2.JSONObject; | |||
import com.xueyi.common.core.web.result.R; | |||
import com.xueyi.system.api.pass.domain.dto.DmRecognizedMultiRecordsDto; | |||
import com.xueyi.system.api.pass.domain.dto.DmRecognizedRecordsDto; | |||
import com.xueyi.system.api.pass.feign.RemoteRecognizedRecordsService; | |||
import lombok.extern.slf4j.Slf4j; | |||
@@ -26,6 +27,11 @@ public class RemotePassFallbackFactory implements FallbackFactory<RemoteRecogniz | |||
public JSONObject uploadPass(DmRecognizedRecordsDto recognizedRecordsDto, Long enterpriseId, String sourceName, String source) { | |||
return R.fail("通行记录上传失败:" + throwable.getMessage()).toJson(); | |||
} | |||
@Override | |||
public JSONObject uploadMultiPass(DmRecognizedMultiRecordsDto recognizedMultiRecordsDto, Long enterpriseId, String sourceName, String source) { | |||
return R.fail("通行记录上传失败:" + throwable.getMessage()).toJson(); | |||
} | |||
}; | |||
} | |||
} |
@@ -0,0 +1,14 @@ | |||
package com.xueyi.system.api.resource.feign; | |||
import com.xueyi.common.core.constant.basic.ServiceConstants; | |||
import com.xueyi.common.core.web.result.R; | |||
import com.xueyi.system.api.resource.feign.factory.RemoteH5ConfigFallbackFactory; | |||
import org.springframework.cloud.openfeign.FeignClient; | |||
import org.springframework.web.bind.annotation.*; | |||
@FeignClient(contextId = "remoteH5ConfigService", value = ServiceConstants.SYSTEM_SERVICE, fallbackFactory = RemoteH5ConfigFallbackFactory.class) | |||
public interface RemoteH5ConfigService { | |||
@GetMapping("/h5config/inner/syncH5Config") | |||
R<String> syncH5Config(@RequestParam(value = "tId",required = false) String tId); | |||
} |
@@ -0,0 +1,21 @@ | |||
package com.xueyi.system.api.resource.feign.factory; | |||
import com.xueyi.common.core.web.result.R; | |||
import com.xueyi.system.api.resource.feign.RemoteH5ConfigService; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.springframework.cloud.openfeign.FallbackFactory; | |||
import org.springframework.stereotype.Component; | |||
@Slf4j | |||
@Component | |||
public class RemoteH5ConfigFallbackFactory implements FallbackFactory<RemoteH5ConfigService> { | |||
@Override | |||
public RemoteH5ConfigService create(Throwable cause) { | |||
return new RemoteH5ConfigService() { | |||
@Override | |||
public R<String> syncH5Config(String tId) { | |||
return R.fail("同步配置文件失败"); | |||
} | |||
}; | |||
} | |||
} |
@@ -0,0 +1,24 @@ | |||
package com.xueyi.system.api.sms.domain.vo; | |||
import com.alibaba.fastjson.JSONObject; | |||
import lombok.Data; | |||
import javax.validation.constraints.NotBlank; | |||
@Data | |||
public class DingdingReqEntity { | |||
@NotBlank(message = "msgtype不能为空") | |||
private String msgtype; | |||
@NotBlank(message = "text不能为空") | |||
private JSONObject text; | |||
public JSONObject toJson(){ | |||
JSONObject json = new JSONObject(true); | |||
json.put("msgtype", msgtype); | |||
json.put("text", text); | |||
return json; | |||
} | |||
} |
@@ -0,0 +1,25 @@ | |||
package com.xueyi.system.api.sms.feign; | |||
import com.alibaba.fastjson.JSONObject; | |||
import com.xueyi.system.api.sms.domain.vo.DingdingReqEntity; | |||
import com.xueyi.system.api.sms.domain.vo.SmsReqEntity; | |||
import com.xueyi.system.api.sms.feign.factory.RemoteDingdingFallbackFactory; | |||
import com.xueyi.system.api.sms.feign.factory.RemoteSmsFallbackFactory; | |||
import org.springframework.cloud.openfeign.FeignClient; | |||
import org.springframework.web.bind.annotation.PostMapping; | |||
import org.springframework.web.bind.annotation.RequestBody; | |||
import org.springframework.web.bind.annotation.RequestParam; | |||
/** | |||
* 短信发送服务 | |||
* | |||
* @author yrx | |||
*/ | |||
@FeignClient(url = "${notification.dingding.url}",name = "dingding", fallbackFactory = RemoteDingdingFallbackFactory.class) | |||
public interface RemoteDingdingService { | |||
@PostMapping("/robot/send") | |||
JSONObject send(@RequestParam(value = "access_token")String token, @RequestBody DingdingReqEntity smsReqEntity); | |||
} |
@@ -0,0 +1,33 @@ | |||
package com.xueyi.system.api.sms.feign.factory; | |||
import com.alibaba.fastjson.JSONObject; | |||
import com.xueyi.common.core.web.result.R; | |||
import com.xueyi.system.api.sms.domain.vo.DingdingReqEntity; | |||
import com.xueyi.system.api.sms.domain.vo.SmsReqEntity; | |||
import com.xueyi.system.api.sms.feign.RemoteDingdingService; | |||
import com.xueyi.system.api.sms.feign.RemoteSmsService; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.springframework.cloud.openfeign.FallbackFactory; | |||
import org.springframework.stereotype.Component; | |||
/** | |||
* 会议室服务 降级处理 | |||
* | |||
* @author xueyi | |||
*/ | |||
@Slf4j | |||
@Component | |||
public class RemoteDingdingFallbackFactory implements FallbackFactory<RemoteDingdingService> { | |||
@Override | |||
public RemoteDingdingService create(Throwable throwable) { | |||
log.error("短信服务调用失败:{}", throwable.getMessage()); | |||
return new RemoteDingdingService() { | |||
@Override | |||
public JSONObject send(String token, DingdingReqEntity smsReqEntity) { | |||
return R.fail("钉钉服务调用失败:" + throwable.getMessage()).toJson1(); | |||
} | |||
}; | |||
} | |||
} |
@@ -0,0 +1,36 @@ | |||
package com.xueyi.system.api.staff.domain.dto; | |||
import lombok.Data; | |||
/** | |||
* 熟人介绍的生人数据的 数据传输对象 | |||
* | |||
* @author xueyi | |||
*/ | |||
@Data | |||
public class DmStaffCommonDto { | |||
public static final String TYPE_STRANGER = "6"; | |||
public static final String TYPE_VIP_STRANGER = "9"; | |||
private String staffName; | |||
protected String staffType; | |||
protected Integer gender; | |||
private String staffBase64Img; | |||
private String devId; | |||
@Override | |||
public String toString() { | |||
return | |||
"staffName:" + staffName + | |||
"\nstaffType:" + staffType + | |||
"\nstaffBase64Img:" + staffBase64Img + | |||
"\ndevId:" + devId + | |||
"\n"; | |||
} | |||
} |
@@ -30,6 +30,10 @@ public class DmVisitCommonDto { | |||
private String reason; | |||
private Long recordId; | |||
private String visitorBase64Img; | |||
@Override | |||
public String toString() { | |||
@@ -87,4 +87,12 @@ public class DmStaffPo extends TBaseEntity { | |||
@Excel(name = "所属组织ID") | |||
protected Long resourceId; | |||
/** 生日日期 */ | |||
@Excel(name = "生日日期") | |||
protected Date birthDate; | |||
/** 入职日期 */ | |||
@Excel(name = "入职日期") | |||
protected Date hireDate; | |||
} |
@@ -1,8 +1,11 @@ | |||
package com.xueyi.system.api.staff.domain.vo; | |||
import cn.hutool.core.date.DateTime; | |||
import lombok.Data; | |||
import lombok.NoArgsConstructor; | |||
import net.sf.jsqlparser.expression.DateTimeLiteralExpression; | |||
import java.time.LocalDateTime; | |||
import java.util.List; | |||
@Data | |||
@@ -14,6 +17,7 @@ public class DmStaffFeature { | |||
private String typeId; | |||
private String nickName; | |||
private int isDel; | |||
private LocalDateTime syncTime; | |||
private String feature; | |||
private List<Double> dFeatures; | |||
@@ -1,15 +1,20 @@ | |||
package com.xueyi.system.api.staff.feign; | |||
import com.alibaba.fastjson2.JSONObject; | |||
import com.xueyi.common.core.constant.basic.SecurityConstants; | |||
import com.xueyi.common.core.constant.basic.ServiceConstants; | |||
import com.xueyi.common.core.web.result.AjaxResult; | |||
import com.xueyi.common.core.web.result.R; | |||
import com.xueyi.system.api.organize.domain.dto.SysEnterpriseDto; | |||
import com.xueyi.system.api.organize.feign.factory.RemoteUserFallbackFactory; | |||
import com.xueyi.system.api.staff.domain.po.DmStaffPo; | |||
import com.xueyi.system.api.staff.domain.dto.DmStaffCommonDto; | |||
import com.xueyi.system.api.staff.domain.vo.DmStaffFeature; | |||
import org.springframework.cloud.openfeign.FeignClient; | |||
import org.springframework.web.bind.annotation.*; | |||
import org.springframework.web.bind.annotation.GetMapping; | |||
import org.springframework.web.bind.annotation.PostMapping; | |||
import org.springframework.web.bind.annotation.RequestBody; | |||
import org.springframework.web.bind.annotation.RequestHeader; | |||
import org.springframework.web.bind.annotation.RequestParam; | |||
import org.springframework.web.bind.annotation.ResponseBody; | |||
import java.util.List; | |||
@@ -21,19 +26,18 @@ import java.util.List; | |||
@FeignClient(contextId = "remoteStaffService", value = ServiceConstants.SYSTEM_SERVICE, fallbackFactory = RemoteUserFallbackFactory.class) | |||
public interface RemoteStaffService { | |||
/** | |||
* 新增用户 | |||
* | |||
* @param user 用户对象 | |||
* @param enterpriseId 企业Id | |||
* @param sourceName 策略源 | |||
* @param source 请求来源 | |||
* @return 结果 | |||
*/ | |||
@GetMapping("/staff/inner/{devId}/{timestamp}") | |||
R<List<DmStaffFeature>> listInner(@RequestParam(value = "devId") String devId, @RequestParam(value = "timestamp") String timestamp, | |||
@RequestHeader(SecurityConstants.ENTERPRISE_ID) Long enterpriseId, @RequestHeader(SecurityConstants.SOURCE_NAME) String sourceName, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); | |||
@GetMapping("/staff/inner-api/selectOne/{staffId}") | |||
JSONObject fetchStaff(@RequestParam(value = "staffId") String staffId, @RequestHeader(SecurityConstants.ENTERPRISE_ID) Long enterpriseId, @RequestHeader(SecurityConstants.SOURCE_NAME) String sourceName, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); | |||
@GetMapping("/staff/inner/tenantId/{enterpriseName}") | |||
public R<SysEnterpriseDto> tenantIdInner(@RequestParam(value = "enterpriseName") String enterpriseName) ; | |||
@PostMapping(value = "/staff/inner-api/new-staff") | |||
@ResponseBody | |||
public com.alibaba.fastjson2.JSONObject addStaff(@RequestBody DmStaffCommonDto commonDto,@RequestHeader(SecurityConstants.ENTERPRISE_ID) Long enterpriseId, @RequestHeader(SecurityConstants.SOURCE_NAME) String sourceName, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); | |||
} |
@@ -6,6 +6,7 @@ import com.xueyi.common.core.constant.basic.ServiceConstants; | |||
import com.xueyi.system.api.organize.feign.factory.RemoteUserFallbackFactory; | |||
import com.xueyi.system.api.staff.domain.dto.DmVisitCommonDto; | |||
import org.springframework.cloud.openfeign.FeignClient; | |||
import org.springframework.web.bind.annotation.DeleteMapping; | |||
import org.springframework.web.bind.annotation.GetMapping; | |||
import org.springframework.web.bind.annotation.PostMapping; | |||
import org.springframework.web.bind.annotation.RequestBody; | |||
@@ -13,7 +14,7 @@ import org.springframework.web.bind.annotation.RequestHeader; | |||
import org.springframework.web.bind.annotation.RequestParam; | |||
/** | |||
* 用户服务 | |||
* 访客服务 | |||
* | |||
* @author yrx | |||
*/ | |||
@@ -29,10 +30,24 @@ public interface RemoteVisitorService { | |||
public JSONObject newVisit(@RequestBody DmVisitCommonDto commonDto, | |||
@RequestHeader(SecurityConstants.ENTERPRISE_ID) Long enterpriseId, @RequestHeader(SecurityConstants.SOURCE_NAME) String sourceName, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); | |||
@DeleteMapping(value = "/visit/inner-api/del-visitor") | |||
public JSONObject delVisit(@RequestBody DmVisitCommonDto commonDto, | |||
@RequestHeader(SecurityConstants.ENTERPRISE_ID) Long enterpriseId, @RequestHeader(SecurityConstants.SOURCE_NAME) String sourceName, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); | |||
@GetMapping(value = "/visit/inner-api/sms-config") | |||
public JSONObject smsConfig(@RequestParam(value = "devId") String devId, @RequestHeader(SecurityConstants.ENTERPRISE_ID) Long enterpriseId, @RequestHeader(SecurityConstants.SOURCE_NAME) String sourceName, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); | |||
@GetMapping(value = "/visit/inner-api/list") | |||
public JSONObject visitList(@RequestParam(value = "empId") Long empId, | |||
@RequestHeader(SecurityConstants.ENTERPRISE_ID) Long enterpriseId, @RequestHeader(SecurityConstants.SOURCE_NAME) String sourceName, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); | |||
@GetMapping(value = "/visit/inner-api/list-all") | |||
public JSONObject visitListAll(@RequestHeader(SecurityConstants.ENTERPRISE_ID) Long enterpriseId, @RequestHeader(SecurityConstants.SOURCE_NAME) String sourceName, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); | |||
@PostMapping(value = "/visit/inner-api/send-sms") | |||
public JSONObject sendSms(@RequestParam(value = "type") Integer type, @RequestHeader(SecurityConstants.ENTERPRISE_ID) Long enterpriseId, @RequestHeader(SecurityConstants.SOURCE_NAME) String sourceName, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); | |||
@GetMapping(value = "/visit/inner-api/sms-users") | |||
public JSONObject smsUserConfig(@RequestHeader(SecurityConstants.ENTERPRISE_ID) Long enterpriseId, @RequestHeader(SecurityConstants.SOURCE_NAME) String sourceName, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); | |||
} |
@@ -0,0 +1,18 @@ | |||
package com.xueyi.system.api.version.domain.vo; | |||
import com.fasterxml.jackson.annotation.JsonFormat; | |||
import lombok.Data; | |||
import lombok.NoArgsConstructor; | |||
import java.time.LocalDateTime; | |||
@Data | |||
@NoArgsConstructor | |||
public class ApkDeployNotifyVo { | |||
private String apkVersionName; | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
private LocalDateTime releaseTime; | |||
private String path; | |||
private LocalDateTime setupTime; | |||
} |
@@ -0,0 +1,19 @@ | |||
package com.xueyi.system.api.version.domain.vo; | |||
import com.fasterxml.jackson.annotation.JsonFormat; | |||
import lombok.Data; | |||
import lombok.NoArgsConstructor; | |||
import java.time.LocalDateTime; | |||
@Data | |||
@NoArgsConstructor | |||
public class ApkReleaseVo { | |||
private String apkVersionName; | |||
private String CodeVersionName; | |||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | |||
private LocalDateTime releaseTime; | |||
private String path; | |||
private String comment; | |||
} |
@@ -0,0 +1,17 @@ | |||
package com.xueyi.system.api.version.feign; | |||
import com.xueyi.common.core.constant.basic.ServiceConstants; | |||
import com.xueyi.common.core.web.result.R; | |||
import com.xueyi.message.api.transfer.domain.vo.DmDeployScheduleVo; | |||
import com.xueyi.system.api.organize.feign.factory.RemoteUserFallbackFactory; | |||
import org.springframework.cloud.openfeign.FeignClient; | |||
import org.springframework.web.bind.annotation.GetMapping; | |||
import org.springframework.web.bind.annotation.PostMapping; | |||
import org.springframework.web.bind.annotation.RequestBody; | |||
@FeignClient(contextId = "remoteReleaseManagerService", value = ServiceConstants.SYSTEM_SERVICE, fallbackFactory = RemoteUserFallbackFactory.class) | |||
public interface RemoteReleaseManagerService { | |||
@PostMapping("/releaseManager/inner/reply") | |||
R<Integer> syncDeployStatus(@RequestBody DmDeployScheduleVo vo); | |||
} |
@@ -1,8 +1,11 @@ | |||
com.xueyi.system.api.organize.feign.factory.RemoteDeptFallbackFactory | |||
com.xueyi.system.api.organize.feign.factory.RemotePostFallbackFactory | |||
com.xueyi.system.api.organize.feign.factory.RemoteUserFallbackFactory | |||
com.xueyi.system.api.organize.feign.factory.RemoteEnterpriseFallbackFactory | |||
com.xueyi.system.api.authority.feign.factory.RemoteLoginFallbackFactory | |||
com.xueyi.system.api.authority.feign.factory.RemoteMenuFallbackFactory | |||
com.xueyi.system.api.authority.feign.factory.RemoteAuthFallbackFactory | |||
com.xueyi.system.api.dict.feign.factory.RemoteConfigFallbackFactory | |||
com.xueyi.system.api.log.feign.factory.RemoteLogFallbackFactory | |||
com.xueyi.system.api.meeting.feign.factory.RemoteMeetingFallbackFactory | |||
com.xueyi.system.api.resource.feign.factory.RemoteH5ConfigFallbackFactory |
@@ -1,113 +0,0 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4"> | |||
<component name="FacetManager"> | |||
<facet type="Spring" name="Spring"> | |||
<configuration /> | |||
</facet> | |||
</component> | |||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_17"> | |||
<output url="file://$MODULE_DIR$/target/classes" /> | |||
<output-test url="file://$MODULE_DIR$/target/test-classes" /> | |||
<content url="file://$MODULE_DIR$"> | |||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> | |||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" /> | |||
<sourceFolder url="file://$MODULE_DIR$/target/generated-sources/annotations" isTestSource="false" generated="true" /> | |||
<excludeFolder url="file://$MODULE_DIR$/target" /> | |||
</content> | |||
<orderEntry type="inheritedJdk" /> | |||
<orderEntry type="sourceFolder" forTests="false" /> | |||
<orderEntry type="module" module-name="xueyi-common-core" /> | |||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-openfeign:3.1.5" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-openfeign-core:3.1.5" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.7.7" level="project" /> | |||
<orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.7" level="project" /> | |||
<orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form-spring:3.8.0" level="project" /> | |||
<orderEntry type="library" name="Maven: io.github.openfeign.form:feign-form:3.8.0" level="project" /> | |||
<orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.4" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-commons:3.1.5" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-crypto:5.7.6" level="project" /> | |||
<orderEntry type="library" name="Maven: io.github.openfeign:feign-core:11.10" level="project" /> | |||
<orderEntry type="library" name="Maven: io.github.openfeign:feign-slf4j:11.10" level="project" /> | |||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.36" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-loadbalancer:3.1.5" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-loadbalancer:3.1.5" level="project" /> | |||
<orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.4.26" level="project" /> | |||
<orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.4" level="project" /> | |||
<orderEntry type="library" name="Maven: io.projectreactor.addons:reactor-extra:3.4.9" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-cache:2.7.7" level="project" /> | |||
<orderEntry type="library" name="Maven: com.stoyanr:evictor:1.0.0" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.3.24" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.3.24" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.3.24" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.3.24" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.3.24" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.3.24" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.3.24" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework:spring-web:5.3.24" level="project" /> | |||
<orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.5.3.Final" level="project" /> | |||
<orderEntry type="library" name="Maven: com.alibaba:transmittable-thread-local:2.14.2" level="project" /> | |||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-boot-starter:3.5.3" level="project" /> | |||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus:3.5.3" level="project" /> | |||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-extension:3.5.3" level="project" /> | |||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-core:3.5.3" level="project" /> | |||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-annotation:3.5.3" level="project" /> | |||
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:4.4" level="project" /> | |||
<orderEntry type="library" name="Maven: org.mybatis:mybatis:3.5.10" level="project" /> | |||
<orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:2.0.7" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.7.7" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.7.7" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.7.7" level="project" /> | |||
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:4.0.3" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.3.24" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework:spring-tx:5.3.24" level="project" /> | |||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.3.2" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-validation:2.7.7" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.7.7" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.7.7" level="project" /> | |||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.11" level="project" /> | |||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.11" level="project" /> | |||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.17.2" level="project" /> | |||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.17.2" level="project" /> | |||
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.36" level="project" /> | |||
<orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" /> | |||
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.30" level="project" /> | |||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.70" level="project" /> | |||
<orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.2.5.Final" level="project" /> | |||
<orderEntry type="library" name="Maven: jakarta.validation:jakarta.validation-api:2.0.2" level="project" /> | |||
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.4.3.Final" level="project" /> | |||
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.5.1" level="project" /> | |||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.13.4.2" level="project" /> | |||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.13.4" level="project" /> | |||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.13.4" level="project" /> | |||
<orderEntry type="library" name="Maven: com.alibaba.fastjson2:fastjson2:2.0.24" level="project" /> | |||
<orderEntry type="library" name="Maven: io.jsonwebtoken:jjwt:0.9.1" level="project" /> | |||
<orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.3.1" level="project" /> | |||
<orderEntry type="library" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" /> | |||
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.12.0" level="project" /> | |||
<orderEntry type="library" name="Maven: commons-io:commons-io:2.11.0" level="project" /> | |||
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:4.1.2" level="project" /> | |||
<orderEntry type="library" name="Maven: org.apache.poi:poi:4.1.2" level="project" /> | |||
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.15" level="project" /> | |||
<orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.4" level="project" /> | |||
<orderEntry type="library" name="Maven: org.apache.commons:commons-math3:3.6.1" level="project" /> | |||
<orderEntry type="library" name="Maven: com.zaxxer:SparseBitSet:1.2" level="project" /> | |||
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml-schemas:4.1.2" level="project" /> | |||
<orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:3.1.0" level="project" /> | |||
<orderEntry type="library" name="Maven: org.apache.commons:commons-compress:1.19" level="project" /> | |||
<orderEntry type="library" name="Maven: com.github.virtuald:curvesapi:1.06" level="project" /> | |||
<orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:4.0.1" level="project" /> | |||
<orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.24" level="project" /> | |||
<orderEntry type="library" name="Maven: cn.hutool:hutool-core:5.8.11" level="project" /> | |||
<orderEntry type="library" name="Maven: cn.hutool:hutool-extra:5.8.11" level="project" /> | |||
<orderEntry type="library" name="Maven: cn.hutool:hutool-setting:5.8.11" level="project" /> | |||
<orderEntry type="library" name="Maven: cn.hutool:hutool-log:5.8.11" level="project" /> | |||
<orderEntry type="library" name="Maven: cn.hutool:hutool-crypto:5.8.11" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-bootstrap:3.1.5" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter:3.1.5" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-context:3.1.5" level="project" /> | |||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-rsa:1.0.11.RELEASE" level="project" /> | |||
<orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.69" level="project" /> | |||
<orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.69" level="project" /> | |||
<orderEntry type="library" name="Maven: org.bouncycastle:bcutil-jdk15on:1.69" level="project" /> | |||
</component> | |||
</module> |
@@ -7,6 +7,7 @@ MAINTAINER xueyi | |||
VOLUME /home/xueyi | |||
# 创建目录 | |||
RUN mkdir -p /home/xueyi | |||
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime | |||
# 指定路径 | |||
WORKDIR /home/xueyi | |||
# 复制jar文件到路径 | |||
@@ -68,7 +68,21 @@ | |||
</execution> | |||
</executions> | |||
</plugin> | |||
<plugin> | |||
<artifactId>maven-resources-plugin</artifactId> | |||
<groupId>org.apache.maven.plugins</groupId> | |||
<configuration> | |||
<delimiters>@</delimiters> | |||
<useDefaultDelimiters>false</useDefaultDelimiters> | |||
</configuration> | |||
</plugin> | |||
</plugins> | |||
<resources> | |||
<resource> | |||
<directory>src/main/resources</directory> | |||
<filtering>true</filtering> | |||
</resource> | |||
</resources> | |||
</build> | |||
</project> |
@@ -9,18 +9,21 @@ spring: | |||
name: xueyi-auth | |||
profiles: | |||
# 环境配置 | |||
active: dev | |||
active: @activatedProperties@ | |||
cloud: | |||
nacos: | |||
discovery: | |||
# 服务注册地址 | |||
server-addr: 172.17.0.1:18848 | |||
server-addr: @nacos.host@:@nacos.port@ | |||
namespace: @nacos.namespace@ | |||
config: | |||
# 配置中心地址 | |||
server-addr: 172.17.0.1:18848 | |||
server-addr: @nacos.host@:@nacos.port@ | |||
namespace: @nacos.namespace@ | |||
# 配置文件格式 | |||
file-extension: yml | |||
# 共享配置 | |||
shared-configs: | |||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} | |||
- application-secret-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} | |||
- application-datasource-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} |
@@ -20,6 +20,7 @@ | |||
<module>xueyi-common-datascope</module> | |||
<module>xueyi-common-datasource</module> | |||
<module>xueyi-common-sms</module> | |||
<module>xueyi-common-mqtt</module> | |||
</modules> | |||
<artifactId>xueyi-common</artifactId> | |||
@@ -77,6 +77,12 @@ | |||
<artifactId>jackson-databind</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>com.fasterxml.jackson.datatype</groupId> | |||
<artifactId>jackson-datatype-jsr310</artifactId> | |||
<version>2.13.0</version> | |||
</dependency> | |||
<!-- Alibaba Fastjson --> | |||
<dependency> | |||
<groupId>com.alibaba.fastjson2</groupId> | |||
@@ -149,6 +155,13 @@ | |||
<artifactId>hutool-crypto</artifactId> | |||
</dependency> | |||
<dependency> | |||
<groupId>co.elastic.clients</groupId> | |||
<artifactId>elasticsearch-java</artifactId> | |||
<version>8.3.3</version> | |||
</dependency> | |||
</dependencies> | |||
</project> |
@@ -25,6 +25,9 @@ public class ServiceConstants { | |||
/** 系统模块的serviceId */ | |||
public static final String MESSAGE_SERVICE = "xueyi-message"; | |||
public static final String MODULES_AUTH_SERVICE = "xueyi-modules-auth"; | |||
public static final String NLT_SERVICE = "xueyi-nlt"; | |||
/** 定时任务模块的serviceId */ | |||
public static final String JOB_SERVICE = "xueyi-job"; | |||
/** 定时任务模块的serviceId */ | |||
@@ -11,9 +11,9 @@ public class InitConstants { | |||
public static final String DEFAULT_NAME = "小智"; | |||
public static final Integer DEFAULT_CLOTH = 1; | |||
public static final String DEFAULT_CLOTH_URL = "http://39.107.77.235:9000/dgmeta/init_digital_mans/cloth/default_cloth.jpg"; | |||
public static final String DEFAULT_CLOTH_URL = "http://39.107.77.235:9000/dgmeta/init_digital_mans/cloth/default_cloth_vi.png"; | |||
public static final Integer DEFAULT_MODEL = 1; | |||
public static final String DEFAULT_MODEL_URL = "http://39.107.77.235:9000/dgmeta/init_digital_mans/model/default_model2.jpg"; | |||
public static final String DEFAULT_MODEL_URL = "http://39.107.77.235:9000/dgmeta/init_digital_mans/model/default_model_v1.png"; | |||
public static final Long DEFAULT_BACKGROUND_ID = 749L; | |||
public static final String DEFAULT_BACKGROUND_URL = "http://39.107.77.235:9000/dgmeta/init_digital_mans/background/default_background.jpg"; | |||
@@ -23,6 +23,8 @@ public class InitConstants { | |||
public static final Long DEFAULT_SCREEN_OFF_ID = 1L; | |||
public static final String[] DEFAULT_BACKGROUND_URLs = | |||
new String[]{"http://39.107.77.235:9000/dgmeta/init_digital_mans/background/default_background.jpg"}; | |||
public static final String[] DEFAULT_SCREEN_OFF_URLs = | |||
new String[]{"http://39.107.77.235:9000/dgmeta/init_digital_mans/screenoff/01.jpeg","http://39.107.77.235:9000/dgmeta/init_digital_mans/screenoff/02.jpg" | |||
,"http://39.107.77.235:9000/dgmeta/init_digital_mans/screenoff/03.jpg","http://39.107.77.235:9000/dgmeta/init_digital_mans/screenoff/04.jpg","http://39.107.77.235:9000/dgmeta/init_digital_mans/screenoff/05.jpg"}; | |||
@@ -38,5 +40,7 @@ public class InitConstants { | |||
public static final String DEVICE_ACTIVATE_STATUS_NOT_ACTIVATE = "0"; | |||
public static final String DEVICE_ACTIVATE_STATUS_ONLINE = "1"; | |||
public static final String DEVICE_ACTIVATE_STATUS_OFFLINE = "2"; | |||
public static final String DEVICE_ACTIVATE_STATUS_APP_RESTART = "3"; | |||
public static final String DEVICE_ACTIVATE_STATUS_DEVICE_REBOOT = "4"; | |||
} |
@@ -16,12 +16,66 @@ public class MessageConstants { | |||
/** 数字人同步 */ | |||
public static final Long MODEL_SYNC = 2L; | |||
public static final Long H5_CONFIG_SYNC = 4L; | |||
/** 数字人场景 */ | |||
public static final String MODE_WORK = "1"; // 工作模式 | |||
public static final String MODE_RECEPTION = "2"; // 接待模式 | |||
public static final String MODE_FREE_CHAT = "3"; // 闲聊模式 | |||
/** 缓存数据头 */ | |||
public static final String REDIS_GROUP_HEADER = "group:dgman:"; | |||
public static final String REDIS_GROUP_DEVICE_HEADER = "group:dgman:device:"; | |||
public static final String MSG_MAN_ACTIVATE_MANCODE_ERROR = "激活码输入错误,请重新输入。"; | |||
public static final Integer SYS_DICT_DATA_RELEASE_UPDATING = 0; | |||
public static final Integer SYS_DICT_DATA_RELEASE_DOWNLOAD_SUC = 1; | |||
public static final Integer SYS_DICT_DATA_RELEASE_DOWNLOADING = 2; | |||
public static final Integer SYS_DICT_DATA_RELEASE_START_DOWNLOAD = 3; | |||
public static final Integer SYS_DICT_DATA_RELEASE_UPDATE_REQUEST_PASSED = 4; | |||
public static final Integer SYS_DICT_DATA_RELEASE_USING = 5; | |||
public static final Integer SYS_DICT_DATA_RELEASE_UPDATE_FAILED = 6; | |||
public static final Integer SYS_DICT_DATA_RELEASE_UPDATE_UPDATING = 7; | |||
public static final Integer SYS_DICT_DATA_RESTART_DEVICE = 0; | |||
public static final Integer SYS_DICT_DATA_RESTART_APP = 1; | |||
public static final Integer SYS_DICT_DATA_SPLITED = 1; | |||
public enum RestartEnum { | |||
RESTART_DEVICE(0, "重启设备"), | |||
RESTART_APP(1, "重启应用"); | |||
private final Integer code; | |||
private final String info; | |||
RestartEnum(Integer code, String info) { | |||
this.code = code; | |||
this.info = info; | |||
} | |||
public Integer getCode() { | |||
return code; | |||
} | |||
public String getInfo() { | |||
return info; | |||
} | |||
/** | |||
* 提前判断,用于解决 | |||
* Case中出现的Constant expression required | |||
* | |||
* @param value | |||
* @return | |||
*/ | |||
public static RestartEnum getEnum(Integer value) { | |||
for (RestartEnum e : RestartEnum.values()) { | |||
if (e.getCode().equals(value)) { | |||
return e; | |||
} | |||
} | |||
return null; | |||
} | |||
} | |||
} |
@@ -0,0 +1,7 @@ | |||
package com.xueyi.common.core.constant.digitalman; | |||
public class RedisDefinitionConstants { | |||
/** 通用-当前在线数(List) */ | |||
public static final String GENERAL_CURRENT_NUMBER_OF_ONLINE = "general:current_number_of_online"; | |||
} |
@@ -0,0 +1,29 @@ | |||
package com.xueyi.common.core.constant.digitalman; | |||
import lombok.AllArgsConstructor; | |||
import lombok.Getter; | |||
/** | |||
* 技能配置通用常量 | |||
* | |||
* @author yinruoxi | |||
*/ | |||
public class SkillConstants { | |||
/** 技能配置 */ | |||
@Getter | |||
@AllArgsConstructor | |||
public enum SkillType { | |||
GENERATION("0", "通用问答"), | |||
BOOK_MEETING_ROOM("1", "会议室预定"), | |||
CREATE_VISITOR_INFO("2", "访客预约登记"), | |||
REGISTER_VISITOR("3", "访客到访登记"), | |||
INTRODUCE_STRANGER("24", "熟人介绍生人"), | |||
BROADCAST_DISPLAY("25", "播报展示"), | |||
OPEN_DOOR("26", "开门"); | |||
private final String code; | |||
private final String info; | |||
} | |||
} |
@@ -0,0 +1,6 @@ | |||
package com.xueyi.common.core.constant.nacos; | |||
public class NacosConstants { | |||
public static final String DEFAULT_CONFIG_PATH = "config.json"; | |||
public static final String DEFAULT_GROUP = "DEFAULT_GROUP"; | |||
} |
@@ -5,7 +5,12 @@ import org.apache.commons.lang3.time.DateFormatUtils; | |||
import java.lang.management.ManagementFactory; | |||
import java.text.ParseException; | |||
import java.text.SimpleDateFormat; | |||
import java.time.*; | |||
import java.time.LocalDate; | |||
import java.time.LocalDateTime; | |||
import java.time.LocalTime; | |||
import java.time.ZoneId; | |||
import java.time.ZonedDateTime; | |||
import java.time.format.DateTimeFormatter; | |||
import java.util.Date; | |||
/** | |||
@@ -25,11 +30,14 @@ public class DateUtil extends org.apache.commons.lang3.time.DateUtils { | |||
public static final String YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss"; | |||
private static final String[] parsePatterns = { | |||
"yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy-MM", | |||
"yyyy/MM/dd", "yyyy/MM/dd HH:mm:ss", "yyyy/MM/dd HH:mm", "yyyy/MM", | |||
"yyyy.MM.dd", "yyyy.MM.dd HH:mm:ss", "yyyy.MM.dd HH:mm", "yyyy.MM"}; | |||
public static final DateTimeFormatter DEFAULT_DATETIME_PATTERN = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); | |||
/** | |||
* 获取当前Date型日期 | |||
* | |||
@@ -0,0 +1,54 @@ | |||
package com.xueyi.common.core.utils; | |||
import java.net.InetAddress; | |||
import java.net.NetworkInterface; | |||
import java.net.UnknownHostException; | |||
import java.util.Enumeration; | |||
/** | |||
* @author yinruoxi | |||
* @version V1.0 | |||
* @className InetAddressUtils | |||
* @description TO DO | |||
* @Date 2023/8/10 14:19 PM | |||
*/ | |||
public class InetAddressUtils { | |||
public static InetAddress getLocalHostLANAddress() throws UnknownHostException { | |||
try { | |||
InetAddress candidateAddress = null; | |||
// 遍历所有的网络接口 | |||
for (Enumeration ifaces = NetworkInterface.getNetworkInterfaces(); ifaces.hasMoreElements();) { | |||
NetworkInterface iface = (NetworkInterface) ifaces.nextElement(); | |||
// 在所有的接口下再遍历IP | |||
for (Enumeration inetAddrs = iface.getInetAddresses(); inetAddrs.hasMoreElements();) { | |||
InetAddress inetAddr = (InetAddress) inetAddrs.nextElement(); | |||
if (!inetAddr.isLoopbackAddress()) {// 排除loopback类型地址 | |||
if (inetAddr.isSiteLocalAddress()) { | |||
// 如果是site-local地址,就是它了 | |||
return inetAddr; | |||
} else if (candidateAddress == null) { | |||
// site-local类型的地址未被发现,先记录候选地址 | |||
candidateAddress = inetAddr; | |||
} | |||
} | |||
} | |||
} | |||
if (candidateAddress != null) { | |||
return candidateAddress; | |||
} | |||
// 如果没有发现 non-loopback地址.只能用最次选的方案 | |||
InetAddress jdkSuppliedAddress = InetAddress.getLocalHost(); | |||
if (jdkSuppliedAddress == null) { | |||
throw new UnknownHostException("The JDK InetAddress.getLocalHost() method unexpectedly returned null."); | |||
} | |||
return jdkSuppliedAddress; | |||
} catch (Exception e) { | |||
UnknownHostException unknownHostException = new UnknownHostException( | |||
"Failed to determine LAN address: " + e); | |||
unknownHostException.initCause(e); | |||
throw unknownHostException; | |||
} | |||
} | |||
} |