Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
I
ims-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
ims-ci-test
Commits
b53aa524
提交
b53aa524
authored
8月 21, 2023
作者:
张小凤
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
RequirementsController(update)
上级
a25f0ccf
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
0 行增加
和
70 行删除
+0
-70
RestTemplateConfig.java
...n/java/com/mmc/csf/release/config/RestTemplateConfig.java
+0
-69
RequirementsController.java
...om/mmc/csf/release/controller/RequirementsController.java
+0
-1
没有找到文件。
release-service/src/main/java/com/mmc/csf/release/config/RestTemplateConfig.java
deleted
100644 → 0
浏览文件 @
a25f0ccf
package
com
.
mmc
.
csf
.
release
.
config
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mmc.csf.common.util.web.ResultBody
;
import
com.mmc.csf.common.util.web.ResultEnum
;
import
com.mmc.csf.infomation.dto.PilotCertificationInteriorDTO
;
import
com.sun.org.glassfish.gmbal.NameValue
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.http.*
;
import
org.springframework.web.client.RestClientException
;
import
org.springframework.web.client.RestTemplate
;
import
javax.servlet.http.HttpServletRequest
;
/**
* @Author small
* @Date 2023/8/18 10:35
* @Version 1.0
*/
public
class
RestTemplateConfig
{
@Autowired
private
RestTemplate
restTemplate
;
@Value
(
"${iuav.pmsapp.url}"
)
@NameValue
()
private
String
pmsApp
;
@Value
(
"${iuav.userapp.url}"
)
private
String
userApp
;
public
ResultBody
releaseOrder
(
Integer
id
,
HttpServletRequest
request
)
{
String
token
=
request
.
getHeader
(
"token"
);
HttpHeaders
headers
=
new
HttpHeaders
();
headers
.
setContentType
(
MediaType
.
APPLICATION_JSON
);
headers
.
add
(
"token"
,
token
);
HttpEntity
<
String
>
entity
=
new
HttpEntity
<>(
JSONObject
.
toJSONString
(
id
),
headers
);
ResponseEntity
<
Object
>
exchange
=
null
;
try
{
exchange
=
restTemplate
.
exchange
(
pmsApp
+
"/pms/industry/getIndustryTypeById?id="
+
id
,
HttpMethod
.
GET
,
entity
,
Object
.
class
);
}
catch
(
RestClientException
e
)
{
return
ResultBody
.
error
(
ResultEnum
.
THE_THIRD_PARTY_INTERFACE_IS_BEING_UPDATED
);
}
return
ResultBody
.
success
();
}
public
PilotCertificationInteriorDTO
feignInteriorDetailPilot
(
Integer
userAccountId
,
HttpServletRequest
request
)
{
String
token
=
request
.
getHeader
(
"token"
);
HttpHeaders
headers
=
new
HttpHeaders
();
headers
.
setContentType
(
MediaType
.
APPLICATION_JSON
);
headers
.
add
(
"token"
,
token
);
HttpEntity
<
String
>
entity
=
new
HttpEntity
<>(
JSONObject
.
toJSONString
(
userAccountId
),
headers
);
ResponseEntity
<
Object
>
exchange
=
null
;
System
.
out
.
println
(
userApp
);
try
{
ResponseEntity
<
PilotCertificationInteriorDTO
>
exchange1
=
restTemplate
.
exchange
(
"http://localhost:35150"
+
"/userapp/pilot/interiorDetailPilot?userAccountId="
+
userAccountId
,
HttpMethod
.
GET
,
entity
,
PilotCertificationInteriorDTO
.
class
);
PilotCertificationInteriorDTO
body
=
exchange1
.
getBody
();
System
.
out
.
println
(
body
);
}
catch
(
RestClientException
e
)
{
// return ResultBody.error(ResultEnum.THE_THIRD_PARTY_INTERFACE_IS_BEING_UPDATED);
}
// return ResultBody.success();
return
null
;
}
}
release-service/src/main/java/com/mmc/csf/release/controller/RequirementsController.java
浏览文件 @
b53aa524
...
@@ -117,7 +117,6 @@ public class RequirementsController extends BaseController {
...
@@ -117,7 +117,6 @@ public class RequirementsController extends BaseController {
return
requirementsService
.
myPreempt
(
this
.
getUserLoginInfoFromRedis
(
request
).
getUserAccountId
());
return
requirementsService
.
myPreempt
(
this
.
getUserLoginInfoFromRedis
(
request
).
getUserAccountId
());
}
}
@ApiOperation
(
value
=
"new——小程序-—飞手端--抵达现场"
)
@ApiOperation
(
value
=
"new——小程序-—飞手端--抵达现场"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@PostMapping
(
"arriveAtTheScene"
)
@PostMapping
(
"arriveAtTheScene"
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论