Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
map-parent
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
常超
map-parent
Commits
fa8a6cb3
Commit
fa8a6cb3
authored
Mar 23, 2021
by
chentian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
2ffb855c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
14 deletions
+21
-14
common/common_utils/src/main/resources/token.properties
+7
-2
serviceapi/imageapi/src/main/java/com/founder/imageapi/ImageApiApplication.java
+1
-3
serviceapi/imageapi/src/main/java/com/founder/imageapi/controller/ImageController.java
+11
-7
serviceapi/imageapi/src/main/java/com/founder/imageapi/mapper/TbStAsjBzMapper.java
+1
-1
serviceapi/imageapi/src/main/java/com/founder/imageapi/mapper/xml/TbStAsjBzMapper.xml
+1
-1
No files found.
common/common_utils/src/main/resources/token.properties
View file @
fa8a6cb3
####################云天请求token配置参数##开始#################
####################云天
励飞
请求token配置参数##开始#################
token_url
=
http://26.3.12.56:8083/api/oauth/token
#header
Authorization
=
Basic Y2xpZW50YXBwOjEyMzQ1Ng==
...
...
@@ -14,6 +14,11 @@ client_id=clientapp
token
=
#\u8FC7\u671F\u65F6\u95F4
expiration
=
####################云天请求token配置参数##结束#################
####################云天励飞请求token配置参数##结束#################
####################云天励飞开始########################
image_url
=
http://26.3.12.56:8083
####################云天励飞结束########################
serviceapi/imageapi/src/main/java/com/founder/
ytlf
/ImageApiApplication.java
→
serviceapi/imageapi/src/main/java/com/founder/
imageapi
/ImageApiApplication.java
View file @
fa8a6cb3
package
com
.
founder
.
ytlf
;
package
com
.
founder
.
imageapi
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.context.annotation.ComponentScan
;
@SpringBootApplication
@ComponentScan
(
basePackages
=
{
"com.founder"
})
@EnableDiscoveryClient
public
class
ImageApiApplication
{
public
static
void
main
(
String
[]
args
)
{
...
...
serviceapi/imageapi/src/main/java/com/founder/
ytlf/controller/Ytlf
Controller.java
→
serviceapi/imageapi/src/main/java/com/founder/
imageapi/controller/Image
Controller.java
View file @
fa8a6cb3
package
com
.
founder
.
ytlf
.
controller
;
package
com
.
founder
.
imageapi
.
controller
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
...
...
@@ -11,6 +11,7 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.http.impl.client.CloseableHttpClient
;
import
org.apache.http.impl.client.HttpClients
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.HashMap
;
...
...
@@ -18,23 +19,26 @@ import java.util.Map;
/**
* <p>
*
云天接口管理 前端控制器
*
第三方图像接口管理
* </p>
*
* @author yangyang
* @since 2021-03-18
*/
@Api
(
description
=
"
云天接口管理
"
)
@Api
(
description
=
"
第三方图像接口管理(云天)
"
)
@RestController
@RequestMapping
(
"/
ytlf
"
)
public
class
Ytlf
Controller
{
@RequestMapping
(
"/
imageapi
"
)
public
class
Image
Controller
{
//案件查询(存储reids)
@Value
(
"${image_url}"
)
private
String
image_url
;
//获取token
@OperLog
(
message
=
"token获取"
,
operation
=
OperationType
.
QUERY
)
@ApiOperation
(
value
=
"token获取"
)
@PostMapping
(
"/token"
)
public
MapRestResult
getToken
()
{
//获取token
//获取
云天励飞
token
String
accessToken
=
TokenUtils
.
getYtgsToken
();
return
MapRestResult
.
build
(
202
,
"成功获取token信息"
,
accessToken
);
}
...
...
serviceapi/imageapi/src/main/java/com/founder/
ytlf
/mapper/TbStAsjBzMapper.java
→
serviceapi/imageapi/src/main/java/com/founder/
imageapi
/mapper/TbStAsjBzMapper.java
View file @
fa8a6cb3
package
com
.
founder
.
ytlf
.
mapper
;
package
com
.
founder
.
imageapi
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.founder.commonutils.asjEntity.TbXwAsjbz
;
...
...
serviceapi/imageapi/src/main/java/com/founder/
ytlf
/mapper/xml/TbStAsjBzMapper.xml
→
serviceapi/imageapi/src/main/java/com/founder/
imageapi
/mapper/xml/TbStAsjBzMapper.xml
View file @
fa8a6cb3
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.founder.
ytlf
.mapper.TbStAsjBzMapper"
>
<mapper
namespace=
"com.founder.
imageapi
.mapper.TbStAsjBzMapper"
>
</mapper>
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