Commit b536645a by 邓实川 Committed by chenzg

参数bug修复

parent cc848583
...@@ -37,7 +37,6 @@ import cn.timer.api.bean.dzht.DzhtAssoHtwj; ...@@ -37,7 +37,6 @@ import cn.timer.api.bean.dzht.DzhtAssoHtwj;
import cn.timer.api.bean.dzht.DzhtAssoQyrz; import cn.timer.api.bean.dzht.DzhtAssoQyrz;
import cn.timer.api.bean.qyzx.QyzxEmpEntAsso; import cn.timer.api.bean.qyzx.QyzxEmpEntAsso;
import cn.timer.api.bean.qyzx.QyzxEntInfoM; import cn.timer.api.bean.qyzx.QyzxEntInfoM;
import cn.timer.api.bean.yggl.YgglMainEmp; import cn.timer.api.bean.yggl.YgglMainEmp;
import cn.timer.api.config.annotation.CurrentUser; import cn.timer.api.config.annotation.CurrentUser;
import cn.timer.api.config.annotation.UserBean; import cn.timer.api.config.annotation.UserBean;
...@@ -607,7 +606,6 @@ public class DzhtController { ...@@ -607,7 +606,6 @@ public class DzhtController {
String ossUrl = htmb.getOssUrl(); String ossUrl = htmb.getOssUrl();
String fileName = System.currentTimeMillis() + UUID.randomUUID().toString() String fileName = System.currentTimeMillis() + UUID.randomUUID().toString()
+ ossUrl.substring(ossUrl.lastIndexOf(".")); + ossUrl.substring(ossUrl.lastIndexOf("."));
String filePath = null; String filePath = null;
try { try {
filePath = FileHelper.downLoadFromUrl(ossUrl, fileName, savePath()); filePath = FileHelper.downLoadFromUrl(ossUrl, fileName, savePath());
......
package cn.timer.api.controller.dzht.cn.tign.hz.constant; package cn.timer.api.controller.dzht.cn.tign.hz.constant;
import javax.annotation.PostConstruct;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
/** /**
* @version 2.0 * @version 2.0
...@@ -11,22 +8,22 @@ import org.springframework.beans.factory.annotation.Value; ...@@ -11,22 +8,22 @@ import org.springframework.beans.factory.annotation.Value;
*/ */
public class ConfigConstant { public class ConfigConstant {
public static String host; public static String host = "https://smlopenapi.esign.cn";
public static String PROJECT_ID; public static String PROJECT_ID = "4438775940";
public static String PROJECT_SECRET; public static String PROJECT_SECRET = "7b100813cca2746081c57837855ac5af";
@Value("${config-8timer.esign.host}") // @Value("${config-8timer.esign.host}")
private String host_s; // private String host_s;
@Value("${config-8timer.esign.PROJECT_ID}") // @Value("${config-8timer.esign.PROJECT_ID}")
private String PROJECT_ID_s; // private String PROJECT_ID_s;
@Value("${config-8timer.esign.PROJECT_SECRET}") // @Value("${config-8timer.esign.PROJECT_SECRET}")
private String PROJECT_SECRET_s; // private String PROJECT_SECRET_s;
//
@PostConstruct // @PostConstruct
public void init() { // public void init() {
host = host_s; // host = host_s;
PROJECT_ID = PROJECT_ID_s; // PROJECT_ID = PROJECT_ID_s;
PROJECT_SECRET = PROJECT_SECRET_s; // PROJECT_SECRET = PROJECT_SECRET_s;
} // }
// 机构认证地址 // 机构认证地址
public static final String getJgrz_URL(String accountId) { public static final String getJgrz_URL(String accountId) {
......
...@@ -35,7 +35,7 @@ import cn.timer.api.utils.ResultUtil; ...@@ -35,7 +35,7 @@ import cn.timer.api.utils.ResultUtil;
@Component @Component
public class OSSUtil { public class OSSUtil {
@Value("${config-8timer.Aliyun.PROJECT_NAME}") @Value("${config-8timer.Aliyun.endpoint}")
private String endpoint; private String endpoint;
@Value("${config-8timer.Aliyun.ACCESSKEY_ID}") @Value("${config-8timer.Aliyun.ACCESSKEY_ID}")
...@@ -70,6 +70,7 @@ public class OSSUtil { ...@@ -70,6 +70,7 @@ public class OSSUtil {
// 阿里云主账号AccessKey拥有所有API的访问权限,风险很高。强烈建议您创建并使用RAM账号进行API访问或日常运维,请登录 // 阿里云主账号AccessKey拥有所有API的访问权限,风险很高。强烈建议您创建并使用RAM账号进行API访问或日常运维,请登录
// https://ram.console.aliyun.com 创建RAM账号。 // https://ram.console.aliyun.com 创建RAM账号。
// 创建OSSClient实例。 // 创建OSSClient实例。
OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret); OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);
// 创建存储空间。 // 创建存储空间。
ossClient.createBucket(bucketName); ossClient.createBucket(bucketName);
...@@ -92,6 +93,9 @@ public class OSSUtil { ...@@ -92,6 +93,9 @@ public class OSSUtil {
// <yourObjectName>上传文件到OSS时需要指定包含文件后缀在内的完整路径,例如abc/efg/123.jpg。 // <yourObjectName>上传文件到OSS时需要指定包含文件后缀在内的完整路径,例如abc/efg/123.jpg。
// String objectName = "8time-v2/test/123.jpg"; // String objectName = "8time-v2/test/123.jpg";
// 创建OSSClient实例。 // 创建OSSClient实例。
System.err.println(endpoint);
System.err.println(accessKeyId);
System.err.println(accessKeySecret);
OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret); OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);
// 创建PutObjectRequest对象。 // 创建PutObjectRequest对象。
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment