Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
8timerv2
8timerapiv200
Commits
b536645a
Commit
b536645a
authored
May 05, 2020
by
邓实川
Committed by
chenzg
Jul 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
参数bug修复
parent
cc848583
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
22 deletions
+21
-22
src/main/java/cn/timer/api/controller/dzht/DzhtController.java
+0
-2
src/main/java/cn/timer/api/controller/dzht/cn/tign/hz/constant/ConfigConstant.java
+16
-19
src/main/java/cn/timer/api/utils/aliyun/OSSUtil.java
+5
-1
No files found.
src/main/java/cn/timer/api/controller/dzht/DzhtController.java
View file @
b536645a
...
@@ -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
());
...
...
src/main/java/cn/timer/api/controller/dzht/cn/tign/hz/constant/ConfigConstant.java
View file @
b536645a
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
)
{
...
...
src/main/java/cn/timer/api/utils/aliyun/OSSUtil.java
View file @
b536645a
...
@@ -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对象。
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment