配置文件
parent
ecb8d4f647
commit
1a3365b921
|
|
@ -3,4 +3,8 @@ spring:
|
|||
import:
|
||||
- classpath:nacos.yml
|
||||
- classpath:sdk.yml
|
||||
# - classpath:nacos-prod.yml
|
||||
# - classpath:sdk-prod.yml
|
||||
# - classpath:nacos-prod.yml
|
||||
# - classpath:sdk-prod2.yml
|
||||
- classpath:swagger.yml
|
||||
|
|
|
|||
|
|
@ -0,0 +1,44 @@
|
|||
nacos:
|
||||
url: prod-nacos:8848
|
||||
namespace: jjb-dragon
|
||||
application:
|
||||
name: jjb-saas-zcloud-edu
|
||||
version:
|
||||
gateway: edu
|
||||
cn-name: 教育中心
|
||||
spring:
|
||||
application:
|
||||
name: ${application.name}${application.version}
|
||||
profiles:
|
||||
# 环境配置
|
||||
active: prod
|
||||
cloud:
|
||||
nacos:
|
||||
config:
|
||||
username: nacos
|
||||
password: u9Hc7tLFBY
|
||||
namespace: ${nacos.namespace}
|
||||
server-addr: ${nacos.url}
|
||||
file-extension: yml
|
||||
shared-configs:
|
||||
- config-common.yml
|
||||
- config-port.yml
|
||||
- config-mq.yml
|
||||
- config-log.yml
|
||||
- config-sdk-server.yml
|
||||
- config-actuator.yml
|
||||
- config-job.yml
|
||||
- config-mysql.yml
|
||||
- config-redis.yml
|
||||
- config-cache.yml
|
||||
- config-spring.yml
|
||||
- config-mybatis.yml
|
||||
- config-sdk.yml
|
||||
- config-flyway.yml
|
||||
discovery:
|
||||
server-addr: ${spring.cloud.nacos.config.server-addr}
|
||||
namespace: ${spring.cloud.nacos.config.namespace}
|
||||
username: nacos
|
||||
password: u9Hc7tLFBY
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
sdk:
|
||||
server:
|
||||
app-key: 29498a8363594a4cbc5aafcd906ab72e
|
||||
client:
|
||||
gateway:
|
||||
url: ${common.gateway.network.http.external}
|
||||
route:
|
||||
- client:
|
||||
system-code: ${application.name}
|
||||
name: ${application.cn-name}-后端
|
||||
group-code: public_api
|
||||
service:
|
||||
system-code: ${application.name}
|
||||
name: ${application.cn-name}-后端
|
||||
group-code: public_api
|
||||
strip-prefix: 0
|
||||
uri: http://${application.name}
|
||||
path: /${application.gateway}/**
|
||||
- client:
|
||||
system-code: ${application.name}-container
|
||||
name: ${application.cn-name}-前端
|
||||
group-code: public_api
|
||||
service:
|
||||
system-code: ${application.name}-container
|
||||
name: ${application.cn-name}-前端
|
||||
group-code: public_api
|
||||
strip-prefix: 0
|
||||
uri: http://jjb-saas-base
|
||||
path: /${application.gateway}/container/**
|
||||
order: -2
|
||||
openapi:
|
||||
appId: 1871106785124999168
|
||||
appKey: 7314ecfc11ff4d5fad1ac19284ed2ac3
|
||||
appSecret: 7565ab15-a2ae-4830-9b4d-fb382cd5fb30
|
||||
appPublicKey: 3059301306072a8648ce3d020106082a811ccf5501822d03420004f339671110a06681fcfd968ad9247bd3cd0d2ec6b2159d1d4b775e7ed5566b3297d82cf14b626ef11fdd6bc7ecb6bcfb3ea94ccd1f381f4116f43367be4b360f
|
||||
appPrivateKey: 308193020100301306072a8648ce3d020106082a811ccf5501822d0479307702010104206b6abc8e717b7d042f1e8531190a7c18113e4a701417f2770d2150d33ba97779a00a06082a811ccf5501822da14403420004f339671110a06681fcfd968ad9247bd3cd0d2ec6b2159d1d4b775e7ed5566b3297d82cf14b626ef11fdd6bc7ecb6bcfb3ea94ccd1f381f4116f43367be4b360f
|
||||
encryptType: SM2
|
||||
platform:
|
||||
- name: default
|
||||
openPublicKey: 3059301306072a8648ce3d020106082a811ccf5501822d034200045b5d8fcad91e113910406db4caf0f5c6688048e0f46742d55f872a25855316803ddb177cc9bb5906ff0b2ad4d6b1f1378a49109104613e79b5b5512e3710e88f
|
||||
url: ${common.gateway.network.http.intranet}
|
||||
protocol: HTTP
|
||||
defaultPlatform: true
|
||||
##ciphertext plaintext
|
||||
type: plaintext
|
||||
apiPlatform:
|
||||
- name: default
|
||||
#多个可以逗号隔开
|
||||
apiCode: test:01
|
||||
#多个可以逗号隔开,可以为空
|
||||
tenantIds: 1838408702262321152
|
||||
smb:
|
||||
host: 39.100.115.58
|
||||
port: 22
|
||||
user: root
|
||||
password: '@EwLEkf56oTYP-gU'
|
||||
basePath: /mnt/gbsfile/gwj/file/
|
||||
archives:
|
||||
async:
|
||||
pool:
|
||||
maxPoolSize: 2
|
||||
corePoolSize: 1
|
||||
queueCapacity: 60
|
||||
namePrefix: upload-archives-file-task-
|
||||
keepAliveSeconds: 60
|
||||
file:
|
||||
url: https://jpfz.qhdsafety.com/gbsFileTest/
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
sdk:
|
||||
server:
|
||||
app-key: 29498a8363594a4cbc5aafcd906ab72e
|
||||
client:
|
||||
gateway:
|
||||
url: ${common.gateway.network.http.external}
|
||||
route:
|
||||
- client:
|
||||
system-code: ${application.name}
|
||||
name: ${application.cn-name}-后端
|
||||
group-code: public_api
|
||||
service:
|
||||
system-code: ${application.name}
|
||||
name: ${application.cn-name}-后端
|
||||
group-code: public_api
|
||||
strip-prefix: 0
|
||||
uri: http://${application.name}
|
||||
path: /${application.gateway}/**
|
||||
- client:
|
||||
system-code: ${application.name}-container
|
||||
name: ${application.cn-name}-前端
|
||||
group-code: public_api
|
||||
service:
|
||||
system-code: ${application.name}-container
|
||||
name: ${application.cn-name}-前端
|
||||
group-code: public_api
|
||||
strip-prefix: 0
|
||||
uri: http://jjb-saas-base
|
||||
path: /${application.gateway}/container/**
|
||||
order: -2
|
||||
openapi:
|
||||
appId: 1871106785124999168
|
||||
appKey: 7314ecfc11ff4d5fad1ac19284ed2ac3
|
||||
appSecret: 7565ab15-a2ae-4830-9b4d-fb382cd5fb30
|
||||
appPublicKey: 3059301306072a8648ce3d020106082a811ccf5501822d03420004f339671110a06681fcfd968ad9247bd3cd0d2ec6b2159d1d4b775e7ed5566b3297d82cf14b626ef11fdd6bc7ecb6bcfb3ea94ccd1f381f4116f43367be4b360f
|
||||
appPrivateKey: 308193020100301306072a8648ce3d020106082a811ccf5501822d0479307702010104206b6abc8e717b7d042f1e8531190a7c18113e4a701417f2770d2150d33ba97779a00a06082a811ccf5501822da14403420004f339671110a06681fcfd968ad9247bd3cd0d2ec6b2159d1d4b775e7ed5566b3297d82cf14b626ef11fdd6bc7ecb6bcfb3ea94ccd1f381f4116f43367be4b360f
|
||||
encryptType: SM2
|
||||
platform:
|
||||
- name: default
|
||||
openPublicKey: 3059301306072a8648ce3d020106082a811ccf5501822d034200045b5d8fcad91e113910406db4caf0f5c6688048e0f46742d55f872a25855316803ddb177cc9bb5906ff0b2ad4d6b1f1378a49109104613e79b5b5512e3710e88f
|
||||
url: ${common.gateway.network.http.intranet}
|
||||
protocol: HTTP
|
||||
defaultPlatform: true
|
||||
##ciphertext plaintext
|
||||
type: plaintext
|
||||
apiPlatform:
|
||||
- name: default
|
||||
#多个可以逗号隔开
|
||||
apiCode: test:01
|
||||
#多个可以逗号隔开,可以为空
|
||||
tenantIds: 1838408702262321152
|
||||
smb:
|
||||
host: 192.168.192.201
|
||||
port: 22
|
||||
user: root
|
||||
password: 'SJSKaqhb@20240131'
|
||||
basePath: /mnt/vdc2/qask/file/uploadFiles2/
|
||||
archives:
|
||||
async:
|
||||
pool:
|
||||
maxPoolSize: 2
|
||||
corePoolSize: 1
|
||||
queueCapacity: 60
|
||||
namePrefix: upload-archives-file-task-
|
||||
keepAliveSeconds: 60
|
||||
file:
|
||||
url: http://192.168.192.201:8991/file/uploadFiles2/
|
||||
|
|
@ -49,3 +49,7 @@ openapi:
|
|||
apiCode: test:01
|
||||
#多个可以逗号隔开,可以为空
|
||||
tenantIds: 1838408702262321152
|
||||
face:
|
||||
accessKeyId: 04eb3ba66013572f60d88339cc093086229ab76596d41c182080d074d2215d1206438ab4c87c11e8eaa82cad24b0a0249f281613fe07cc98ae7988864ae4f13c9a3ff109501a5c2c897c16f14345235198c59247d85fe2c9aaaf41af36cbed7eb6d8d651e6748574572c4b75ea6c07c62f74a9ae4c9187a8a5
|
||||
accessKeySecret: 04b9fedfe6c3c0cb51f7edc38764a30cacf4cc965996396d5704c64bb4abdce53e21bd71b32ea8a6a16b2296b34d239546f80981f28a36871eab437f8a3df4931103393bf0908ef9beb44278531cd9c98badf866010a8a37cd02fff2a907e799e901200bed4111602a4c322df29323c8d0d60e94e30363e24c3243dd847986
|
||||
endpoint: facebody.cn-shanghai.aliyuncs.com
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import com.zcloud.gbscommon.zcloudqualifications.response.EduProjectUserDO;
|
|||
import lombok.AllArgsConstructor;
|
||||
import org.apache.commons.beanutils.PropertyUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
|
|
@ -55,6 +56,7 @@ public class TrainingUserQueryExe {
|
|||
qry.stream().forEach(eduProjectUserDO -> {
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||
TrainingUserDO trainingUser = existingUserMap.get(eduProjectUserDO.getPhone());
|
||||
if(trainingUser != null){
|
||||
if(trainingUser.getStartTime() != null){
|
||||
eduProjectUserDO.setStartTrainingTime(trainingUser.getStartTime().format(formatter));
|
||||
}
|
||||
|
|
@ -62,6 +64,10 @@ public class TrainingUserQueryExe {
|
|||
eduProjectUserDO.setEndTrainingTime(trainingUser.getEndTime().format(formatter));
|
||||
}
|
||||
eduProjectUserDO.setTrainingState(String.valueOf(trainingUser.getStateFlag()));
|
||||
} else {
|
||||
eduProjectUserDO.setTrainingState("0");
|
||||
}
|
||||
|
||||
});
|
||||
return qry;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ public class FileUrlConfig {
|
|||
prefixUrl = prefixUrlProperties;
|
||||
}
|
||||
public String getPrefixUrl() {
|
||||
return "http://192.168.192.201:8991/file/uploadFiles2/";
|
||||
// return prefixUrl;
|
||||
// return "http://192.168.192.201:8991/file/uploadFiles2/";
|
||||
return prefixUrl;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
package com.zcloud.edu.domain.model.study;
|
||||
|
||||
import com.alibaba.cola.exception.BizException;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.jjb.saas.framework.domain.model.BaseE;
|
||||
import com.zcloud.gbscommon.utils.Base64Util;
|
||||
import com.zcloud.gbscommon.utils.FaceUtil;
|
||||
|
|
@ -69,22 +72,22 @@ public class StudentSignE extends BaseE {
|
|||
|
||||
public void compareFace(String templateFaceUrl, String faceUrl, String prefixUrl) throws Exception {
|
||||
try {
|
||||
System.out.println("第7步-----------------------------" + prefixUrl + templateFaceUrl);
|
||||
String templateFace = Base64Util.urlToBase64(prefixUrl + templateFaceUrl);
|
||||
System.out.println("第8步-----------------------------" + System.currentTimeMillis());
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
map.put("pic1", templateFace);
|
||||
map.put("pic2", faceUrl);
|
||||
String jsonParam = JSON.toJSONString(map);
|
||||
// 正式环境
|
||||
// String compareResult = HttpRequestUtil.doPost("http://192.168.192.201:8971/gbs-face/face/compareFace", jsonParam);
|
||||
// JSONObject jsonObject = JSONObject.parseObject(compareResult);
|
||||
// jsonObject.getJSONObject("info").getString("confidence");
|
||||
// String compareResultStr = jsonObject.getJSONObject("info").getString("confidence");
|
||||
|
||||
System.out.println("第2229步-----------------------------" + System.currentTimeMillis());
|
||||
String compareResult = HttpRequestUtil.doPost("http://192.168.151.32:8893/face/compareFace", map.toString());
|
||||
System.out.println(compareResult + "--------------8888888888888888888888888888888888888888888");
|
||||
String confidence = FaceUtil.compareFace(templateFace, faceUrl);
|
||||
System.out.println("第9步-----------------------------"+ System.currentTimeMillis());
|
||||
// if (Double.valueOf(compareResult) < 75) {
|
||||
// throw new BizException("人脸不匹配");
|
||||
// }
|
||||
|
||||
// 测试环境
|
||||
String compareResultStr = FaceUtil.compareFace(templateFace, faceUrl);
|
||||
if (Double.valueOf(compareResultStr) < 75) {
|
||||
throw new BizException("人脸不匹配");
|
||||
}
|
||||
this.setStudentSignId(Tools.get32UUID());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
|
@ -92,6 +95,7 @@ public class StudentSignE extends BaseE {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
public void init(String studentId, String classId, long corpinfoId) {
|
||||
this.setStudentId(studentId);
|
||||
this.setClassId(classId);
|
||||
|
|
|
|||
Loading…
Reference in New Issue