Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dm_project
Project
Project
Details
Activity
Releases
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
姚本章
dm_project
Commits
ad561ab9
Commit
ad561ab9
authored
Dec 31, 2020
by
ysongq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
1e9b3f69
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
7 deletions
+11
-7
WebUtils.java
jz-dm-common/src/main/java/com/jz/common/utils/WebUtils.java
+2
-1
DataGoodsController.java
...z/manage/moduls/controller/goods/DataGoodsController.java
+1
-5
MakeDataBankApiReq.java
...uls/controller/goods/bean/request/MakeDataBankApiReq.java
+3
-0
DataGoodsServiceImpl.java
...m/jz/manage/moduls/service/impl/DataGoodsServiceImpl.java
+5
-1
No files found.
jz-dm-common/src/main/java/com/jz/common/utils/WebUtils.java
View file @
ad561ab9
...
@@ -201,7 +201,7 @@ public final class WebUtils {
...
@@ -201,7 +201,7 @@ public final class WebUtils {
* @param data
* @param data
* @return
* @return
*/
*/
public
static
String
postJSON
(
String
uri
,
Object
data
)
{
public
static
String
postJSON
(
String
uri
,
Object
data
)
throws
Exception
{
log
.
info
(
"向银行发起参数:{}"
,
JSONObject
.
toJSONString
(
data
));
log
.
info
(
"向银行发起参数:{}"
,
JSONObject
.
toJSONString
(
data
));
CloseableHttpClient
httpClient
=
getHttpClient
(
uri
);
CloseableHttpClient
httpClient
=
getHttpClient
(
uri
);
HttpPost
method
=
new
HttpPost
(
uri
);
HttpPost
method
=
new
HttpPost
(
uri
);
...
@@ -240,6 +240,7 @@ public final class WebUtils {
...
@@ -240,6 +240,7 @@ public final class WebUtils {
log
.
info
(
"Get Response Content():\n {}"
,
readContent
);
log
.
info
(
"Get Response Content():\n {}"
,
readContent
);
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
throw
e
;
}
finally
{
}
finally
{
try
{
try
{
httpClient
.
close
();
httpClient
.
close
();
...
...
jz-dm-manage/src/main/java/com/jz/manage/moduls/controller/goods/DataGoodsController.java
View file @
ad561ab9
...
@@ -85,13 +85,9 @@ public class DataGoodsController extends BaseController {
...
@@ -85,13 +85,9 @@ public class DataGoodsController extends BaseController {
Result
result
=
new
Result
();
Result
result
=
new
Result
();
try
{
try
{
result
=
dataGoodsService
.
uploadApi
(
dataApiUpReq
);
result
=
dataGoodsService
.
uploadApi
(
dataApiUpReq
);
result
.
getMessage
();
result
.
getCode
();
result
.
getData
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
result
.
getMessage
();
result
=
new
Result
(
false
,
"api上传失败"
);
result
.
getCode
();
}
}
return
result
;
return
result
;
}
}
...
...
jz-dm-manage/src/main/java/com/jz/manage/moduls/controller/goods/bean/request/MakeDataBankApiReq.java
View file @
ad561ab9
...
@@ -66,4 +66,7 @@ public class MakeDataBankApiReq implements Serializable {
...
@@ -66,4 +66,7 @@ public class MakeDataBankApiReq implements Serializable {
@ApiModelProperty
(
value
=
"api样例"
,
required
=
false
)
@ApiModelProperty
(
value
=
"api样例"
,
required
=
false
)
public
String
apiExample
;
public
String
apiExample
;
@ApiModelProperty
(
value
=
"文件id"
)
public
Long
fileId
;
}
}
jz-dm-manage/src/main/java/com/jz/manage/moduls/service/impl/DataGoodsServiceImpl.java
View file @
ad561ab9
...
@@ -200,7 +200,7 @@ public class DataGoodsServiceImpl implements DataGoodsService {
...
@@ -200,7 +200,7 @@ public class DataGoodsServiceImpl implements DataGoodsService {
*/
*/
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Result
uploadApi
(
DataApiUpReq
dataApiUpReq
)
{
public
Result
uploadApi
(
DataApiUpReq
dataApiUpReq
)
throws
Exception
{
// 获取当前用户
// 获取当前用户
SysUserDto
user
=
(
SysUserDto
)
redisTemplate
.
opsForValue
().
get
(
"user_"
+
RedisMessageConstant
.
SENDTYPE_LOGIN_SYS
);
SysUserDto
user
=
(
SysUserDto
)
redisTemplate
.
opsForValue
().
get
(
"user_"
+
RedisMessageConstant
.
SENDTYPE_LOGIN_SYS
);
...
@@ -259,6 +259,9 @@ public class DataGoodsServiceImpl implements DataGoodsService {
...
@@ -259,6 +259,9 @@ public class DataGoodsServiceImpl implements DataGoodsService {
apiReq
.
setRequestParam
(
"sdadasdd"
);
apiReq
.
setRequestParam
(
"sdadasdd"
);
apiReq
.
setResponseParam
(
"fklfhklfhlh"
);
apiReq
.
setResponseParam
(
"fklfhklfhlh"
);
apiReq
.
setRespCode
(
"sdkadlahlf"
);
apiReq
.
setRespCode
(
"sdkadlahlf"
);
// apiReq.setFileId(1L);
// 赋值params
// 赋值params
Long
goodsApi
=
dataGoodsApi
.
getGoodsApi
();
Long
goodsApi
=
dataGoodsApi
.
getGoodsApi
();
if
(
goodsApi
!=
null
)
{
if
(
goodsApi
!=
null
)
{
...
@@ -281,6 +284,7 @@ public class DataGoodsServiceImpl implements DataGoodsService {
...
@@ -281,6 +284,7 @@ public class DataGoodsServiceImpl implements DataGoodsService {
WebUtils
.
postJSON
(
url
,
apiReq
);
WebUtils
.
postJSON
(
url
,
apiReq
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
throw
e
;
}
}
...
...
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