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
b013fccf
Commit
b013fccf
authored
Apr 27, 2020
by
邓实川
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
细节整理
parent
d8bb2296
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
82 deletions
+52
-82
src/main/java/cn/timer/api/controller/LoginController.java
+52
-80
src/main/java/cn/timer/api/controller/oss/OSSController.java
+0
-2
src/main/resources/application-dev.yml
+0
-0
src/main/resources/application-pro.yml
+0
-0
src/main/resources/application-test.yml
+0
-0
No files found.
src/main/java/cn/timer/api/controller/LoginController.java
View file @
b013fccf
...
...
@@ -3,12 +3,9 @@ package cn.timer.api.controller;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Stream
;
import
javax.annotation.PostConstruct
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpSession
;
...
...
@@ -16,7 +13,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.interceptor.TransactionAspectSupport
;
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.RequestMapping
;
...
...
@@ -62,82 +58,58 @@ public class LoginController {
@Value
(
"${config-8timer.register-free-time}"
)
public
Integer
offset
;
// 系统赠送时间
@Value
(
"${config-8timer.Aliyun.PROJECT_NAME}"
)
private
String
PROJECT_NAME
;
@Value
(
"${config-8timer.Aliyun.REGION_ID}"
)
private
String
REGION_ID
;
@Value
(
"${config-8timer.Aliyun.ACCESSKEY_ID}"
)
private
String
ACCESSKEY_ID
;
@Value
(
"${config-8timer.Aliyun.SECRET}"
)
private
String
SECRET
;
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
;
}
@Value
(
"${config-8timer.Aliyun.PROJECT_NAME}"
)
private
String
endpoint
;
@Value
(
"${config-8timer.Aliyun.ACCESSKEY_ID}"
)
private
String
accessKeyId
;
@Value
(
"${config-8timer.Aliyun.SECRET}"
)
private
String
accessKeySecret
;
@Value
(
"${config-8timer.Aliyun.bucketName}"
)
private
String
bucketName
;
@Value
(
"${config-8timer.Aliyun.bucketName_pri}"
)
private
String
bucketName_pri
;
@Value
(
"${config-8timer.Aliyun.project_package}"
)
private
String
project_package
;
@Value
(
"${config-8timer.Aliyun.expirationTime}"
)
private
String
expirationTime
;
@Value
(
"${config-8timer.Aliyun.expirationTime_pri}"
)
private
String
expirationTime_pri
;
@GetMapping
(
value
=
"/test"
)
public
Map
<
String
,
Object
>
test
()
{
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
"1"
,
offset
);
map
.
put
(
"2"
,
PROJECT_NAME
);
map
.
put
(
"3"
,
REGION_ID
);
map
.
put
(
"4"
,
ACCESSKEY_ID
);
map
.
put
(
"5"
,
SECRET
);
map
.
put
(
"6"
,
host
);
map
.
put
(
"7"
,
PROJECT_ID
);
map
.
put
(
"8"
,
PROJECT_SECRET
);
map
.
put
(
"9"
,
endpoint
);
map
.
put
(
"10"
,
accessKeyId
);
map
.
put
(
"11"
,
accessKeySecret
);
map
.
put
(
"12"
,
bucketName
);
map
.
put
(
"13"
,
bucketName_pri
);
map
.
put
(
"14"
,
project_package
);
map
.
put
(
"15"
,
expirationTime
);
map
.
put
(
"16"
,
expirationTime_pri
);
return
map
;
}
/*
* @Value("${config-8timer.Aliyun.PROJECT_NAME}") private String PROJECT_NAME;
*
* @Value("${config-8timer.Aliyun.REGION_ID}") private String REGION_ID;
*
* @Value("${config-8timer.Aliyun.ACCESSKEY_ID}") private String ACCESSKEY_ID;
*
* @Value("${config-8timer.Aliyun.SECRET}") private String SECRET;
*
* 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; }
*
* @Value("${config-8timer.Aliyun.PROJECT_NAME}") private String endpoint;
*
* @Value("${config-8timer.Aliyun.ACCESSKEY_ID}") private String accessKeyId;
*
* @Value("${config-8timer.Aliyun.SECRET}") private String accessKeySecret;
*
* @Value("${config-8timer.Aliyun.bucketName}") private String bucketName;
*
* @Value("${config-8timer.Aliyun.bucketName_pri}") private String
* bucketName_pri;
*
* @Value("${config-8timer.Aliyun.project_package}") private String
* project_package;
*
* @Value("${config-8timer.Aliyun.expirationTime}") private String
* expirationTime;
*
* @Value("${config-8timer.Aliyun.expirationTime_pri}") private String
* expirationTime_pri;
*
* @GetMapping(value = "/test") public Map<String, Object> test() { Map<String,
* Object> map = new HashMap<String, Object>(); map.put("1", offset);
* map.put("2", PROJECT_NAME); map.put("3", REGION_ID); map.put("4",
* ACCESSKEY_ID); map.put("5", SECRET); map.put("6", host); map.put("7",
* PROJECT_ID); map.put("8", PROJECT_SECRET); map.put("9", endpoint);
* map.put("10", accessKeyId); map.put("11", accessKeySecret); map.put("12",
* bucketName); map.put("13", bucketName_pri); map.put("14", project_package);
* map.put("15", expirationTime); map.put("16", expirationTime_pri); return map;
* }
*/
@Autowired
private
HttpSession
session
;
...
...
src/main/java/cn/timer/api/controller/oss/OSSController.java
View file @
b013fccf
...
...
@@ -34,8 +34,6 @@ public class OSSController {
*
* @param userBean
* @param moudle
*
* @param moudle
*/
@PostMapping
(
value
=
"/upload"
)
@ApiOperation
(
value
=
"上传普通文件"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
...
...
src/main/resources/application-dev.yml
View file @
b013fccf
src/main/resources/application-pro.yml
View file @
b013fccf
src/main/resources/application-test.yml
View file @
b013fccf
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