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
bf2a48bd
Commit
bf2a48bd
authored
May 05, 2020
by
邓实川
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
参数bug修复
parent
75b48506
Hide 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 @
bf2a48bd
...
...
@@ -37,7 +37,6 @@ import cn.timer.api.bean.dzht.DzhtAssoHtwj;
import
cn.timer.api.bean.dzht.DzhtAssoQyrz
;
import
cn.timer.api.bean.qyzx.QyzxEmpEntAsso
;
import
cn.timer.api.bean.qyzx.QyzxEntInfoM
;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.UserBean
;
...
...
@@ -607,7 +606,6 @@ public class DzhtController {
String
ossUrl
=
htmb
.
getOssUrl
();
String
fileName
=
System
.
currentTimeMillis
()
+
UUID
.
randomUUID
().
toString
()
+
ossUrl
.
substring
(
ossUrl
.
lastIndexOf
(
"."
));
String
filePath
=
null
;
try
{
filePath
=
FileHelper
.
downLoadFromUrl
(
ossUrl
,
fileName
,
savePath
());
...
...
src/main/java/cn/timer/api/controller/dzht/cn/tign/hz/constant/ConfigConstant.java
View file @
bf2a48bd
package
cn
.
timer
.
api
.
controller
.
dzht
.
cn
.
tign
.
hz
.
constant
;
import
javax.annotation.PostConstruct
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Value
;
/**
* @version 2.0
...
...
@@ -11,22 +8,22 @@ import org.springframework.beans.factory.annotation.Value;
*/
public
class
ConfigConstant
{
public
static
String
host
;
public
static
String
PROJECT_ID
;
public
static
String
PROJECT_SECRET
;
@Value
(
"${config-8timer.esign.host}"
)
private
String
host_s
;
@Value
(
"${config-8timer.esign.PROJECT_ID}"
)
private
String
PROJECT_ID_s
;
@Value
(
"${config-8timer.esign.PROJECT_SECRET}"
)
private
String
PROJECT_SECRET_s
;
@PostConstruct
public
void
init
()
{
host
=
host_s
;
PROJECT_ID
=
PROJECT_ID_s
;
PROJECT_SECRET
=
PROJECT_SECRET_s
;
}
public
static
String
host
=
"https://smlopenapi.esign.cn"
;
public
static
String
PROJECT_ID
=
"4438775940"
;
public
static
String
PROJECT_SECRET
=
"7b100813cca2746081c57837855ac5af"
;
//
@Value("${config-8timer.esign.host}")
//
private String host_s;
//
@Value("${config-8timer.esign.PROJECT_ID}")
//
private String PROJECT_ID_s;
//
@Value("${config-8timer.esign.PROJECT_SECRET}")
//
private String PROJECT_SECRET_s;
//
//
@PostConstruct
//
public void init() {
//
host = host_s;
//
PROJECT_ID = PROJECT_ID_s;
//
PROJECT_SECRET = PROJECT_SECRET_s;
//
}
// 机构认证地址
public
static
final
String
getJgrz_URL
(
String
accountId
)
{
...
...
src/main/java/cn/timer/api/utils/aliyun/OSSUtil.java
View file @
bf2a48bd
...
...
@@ -35,7 +35,7 @@ import cn.timer.api.utils.ResultUtil;
@Component
public
class
OSSUtil
{
@Value
(
"${config-8timer.Aliyun.
PROJECT_NAME
}"
)
@Value
(
"${config-8timer.Aliyun.
endpoint
}"
)
private
String
endpoint
;
@Value
(
"${config-8timer.Aliyun.ACCESSKEY_ID}"
)
...
...
@@ -70,6 +70,7 @@ public class OSSUtil {
// 阿里云主账号AccessKey拥有所有API的访问权限,风险很高。强烈建议您创建并使用RAM账号进行API访问或日常运维,请登录
// https://ram.console.aliyun.com 创建RAM账号。
// 创建OSSClient实例。
OSS
ossClient
=
new
OSSClientBuilder
().
build
(
endpoint
,
accessKeyId
,
accessKeySecret
);
// 创建存储空间。
ossClient
.
createBucket
(
bucketName
);
...
...
@@ -92,6 +93,9 @@ public class OSSUtil {
// <yourObjectName>上传文件到OSS时需要指定包含文件后缀在内的完整路径,例如abc/efg/123.jpg。
// String objectName = "8time-v2/test/123.jpg";
// 创建OSSClient实例。
System
.
err
.
println
(
endpoint
);
System
.
err
.
println
(
accessKeyId
);
System
.
err
.
println
(
accessKeySecret
);
OSS
ossClient
=
new
OSSClientBuilder
().
build
(
endpoint
,
accessKeyId
,
accessKeySecret
);
// 创建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