Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dsk-operate-sys-cscec
Project
Project
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
fulixin
dsk-operate-sys-cscec
Commits
0852a7e4
Commit
0852a7e4
authored
May 25, 2023
by
lcl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
企业调用相关,调用配置修改
parent
20c00609
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
17 deletions
+31
-17
CompanySearchController.java
...controller/search/controller/CompanySearchController.java
+4
-6
BusinessOpportunityRadarService.java
...oller/search/service/BusinessOpportunityRadarService.java
+1
-1
BusinessOpportunityRadarServiceImpl.java
...rch/service/impl/BusinessOpportunityRadarServiceImpl.java
+6
-4
application-dev.yml
dsk-admin/src/main/resources/application-dev.yml
+7
-2
DskOpenApiConfig.java
...src/main/java/com/dsk/common/config/DskOpenApiConfig.java
+10
-1
DskOpenApiUtil.java
...on/src/main/java/com/dsk/common/utils/DskOpenApiUtil.java
+3
-3
No files found.
dsk-admin/src/main/java/com/dsk/web/controller/search/controller/CompanySearchController.java
View file @
0852a7e4
...
@@ -3,9 +3,7 @@ package com.dsk.web.controller.search.controller;
...
@@ -3,9 +3,7 @@ package com.dsk.web.controller.search.controller;
import
com.dsk.common.core.domain.AjaxResult
;
import
com.dsk.common.core.domain.AjaxResult
;
import
com.dsk.common.dtos.ComposeQueryDto
;
import
com.dsk.common.dtos.ComposeQueryDto
;
import
com.dsk.web.controller.search.service.BusinessOpportunityRadarService
;
import
com.dsk.web.controller.search.service.BusinessOpportunityRadarService
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
...
@@ -34,8 +32,8 @@ public class CompanySearchController {
...
@@ -34,8 +32,8 @@ public class CompanySearchController {
/*
/*
* 完全匹配企业名称
* 完全匹配企业名称
*/
*/
@
RequestMapping
(
"/findByName
"
)
@
GetMapping
(
"/findByName/{keyword}
"
)
public
AjaxResult
findByName
(
@
RequestBody
ComposeQueryDto
compose
)
{
public
AjaxResult
findByName
(
@
PathVariable
String
keyword
)
{
return
opportunityRadarService
.
enterpriseByName
(
compose
);
return
opportunityRadarService
.
enterpriseByName
(
keyword
);
}
}
}
}
dsk-admin/src/main/java/com/dsk/web/controller/search/service/BusinessOpportunityRadarService.java
View file @
0852a7e4
...
@@ -20,5 +20,5 @@ public interface BusinessOpportunityRadarService {
...
@@ -20,5 +20,5 @@ public interface BusinessOpportunityRadarService {
AjaxResult
enterprisePage
(
ComposeQueryDto
compose
);
AjaxResult
enterprisePage
(
ComposeQueryDto
compose
);
AjaxResult
enterpriseByName
(
ComposeQueryDto
compose
);
AjaxResult
enterpriseByName
(
String
keyword
);
}
}
dsk-admin/src/main/java/com/dsk/web/controller/search/service/impl/BusinessOpportunityRadarServiceImpl.java
View file @
0852a7e4
...
@@ -10,6 +10,7 @@ import com.dsk.web.controller.search.service.MarketAnalysisService;
...
@@ -10,6 +10,7 @@ import com.dsk.web.controller.search.service.MarketAnalysisService;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
...
@@ -51,14 +52,15 @@ public class BusinessOpportunityRadarServiceImpl implements BusinessOpportunityR
...
@@ -51,14 +52,15 @@ public class BusinessOpportunityRadarServiceImpl implements BusinessOpportunityR
@Override
@Override
public
AjaxResult
enterprisePage
(
ComposeQueryDto
compose
)
{
public
AjaxResult
enterprisePage
(
ComposeQueryDto
compose
)
{
Map
<
String
,
Object
>
map
=
dskOpenApiUtil
.
requestBody
(
"/
api/
nationzj/enterprice/index"
,
BeanUtil
.
beanToMap
(
compose
,
false
,
false
));
Map
<
String
,
Object
>
map
=
dskOpenApiUtil
.
requestBody
(
"/nationzj/enterprice/index"
,
BeanUtil
.
beanToMap
(
compose
,
false
,
false
));
return
BeanUtil
.
toBean
(
map
,
AjaxResult
.
class
);
return
BeanUtil
.
toBean
(
map
,
AjaxResult
.
class
);
}
}
@Override
@Override
public
AjaxResult
enterpriseByName
(
ComposeQueryDto
compose
){
public
AjaxResult
enterpriseByName
(
String
keyword
){
Map
<
String
,
Object
>
map
=
dskOpenApiUtil
.
requestBody
(
"/api/nationzj/enterprice/findByName"
,
BeanUtil
.
beanToMap
(
compose
,
false
,
false
));
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
// Map<String, Object> map = dskOpenApiUtil.requestBody("/nationzj/enterprice/findByName", BeanUtil.beanToMap(compose, false, false));
params
.
put
(
"keyword"
,
keyword
);
Map
<
String
,
Object
>
map
=
dskOpenApiUtil
.
requestBody
(
"/nationzj/enterprice/findByName"
,
params
);
return
BeanUtil
.
toBean
(
map
,
AjaxResult
.
class
);
return
BeanUtil
.
toBean
(
map
,
AjaxResult
.
class
);
}
}
}
}
dsk-admin/src/main/resources/application-dev.yml
View file @
0852a7e4
...
@@ -193,6 +193,11 @@ xss:
...
@@ -193,6 +193,11 @@ xss:
dsk
:
dsk
:
open
:
open
:
endPoint
:
sandbox.openapi.jiansheku.com
# endPoint: sandbox.openapi.jiansheku.com
accessKeyId
:
aec7b3ff2e8b48e79a7e2c463ce21912
# accessKeyId: aec7b3ff2e8b48e79a7e2c463ce21912
# accessKeySecret: ee8a53c7ea04eb3ac311406c8f56f95b
# protocol: https
endPoint
:
120.27.13.145:8865
accessKeyId
:
aec7b3ff2y2q8x6t49a7e2c463ce21912
accessKeySecret
:
ee8a53c7ea04eb3ac311406c8f56f95b
accessKeySecret
:
ee8a53c7ea04eb3ac311406c8f56f95b
protocol
:
http
dsk-common/src/main/java/com/dsk/common/config/DskOpenApiConfig.java
View file @
0852a7e4
...
@@ -15,6 +15,7 @@ public class DskOpenApiConfig {
...
@@ -15,6 +15,7 @@ public class DskOpenApiConfig {
public
String
accessKeyId
;
public
String
accessKeyId
;
public
String
accessKeySecret
;
public
String
accessKeySecret
;
public
String
endPoint
;
public
String
endPoint
;
public
String
protocol
;
public
String
getAccessKeyId
()
{
public
String
getAccessKeyId
()
{
return
accessKeyId
;
return
accessKeyId
;
...
@@ -39,4 +40,12 @@ public class DskOpenApiConfig {
...
@@ -39,4 +40,12 @@ public class DskOpenApiConfig {
public
void
setEndPoint
(
String
endPoint
)
{
public
void
setEndPoint
(
String
endPoint
)
{
this
.
endPoint
=
endPoint
;
this
.
endPoint
=
endPoint
;
}
}
public
String
getProtocol
()
{
return
protocol
;
}
public
void
setProtocol
(
String
protocol
)
{
this
.
protocol
=
protocol
;
}
}
}
dsk-common/src/main/java/com/dsk/common/utils/DskOpenApiUtil.java
View file @
0852a7e4
...
@@ -59,7 +59,7 @@ public class DskOpenApiUtil {
...
@@ -59,7 +59,7 @@ public class DskOpenApiUtil {
public
Map
<
String
,
Object
>
request
(
String
path
,
Map
<
String
,
Object
>
bodyMap
,
String
reqBodyType
){
public
Map
<
String
,
Object
>
request
(
String
path
,
Map
<
String
,
Object
>
bodyMap
,
String
reqBodyType
){
try
{
try
{
AccClient
.
init
(
new
Config
(
dskOpenApiConfig
.
accessKeyId
,
dskOpenApiConfig
.
accessKeySecret
)
AccClient
.
init
(
new
Config
(
dskOpenApiConfig
.
accessKeyId
,
dskOpenApiConfig
.
accessKeySecret
)
.
setEndpoint
(
dskOpenApiConfig
.
endPoint
));
.
setEndpoint
(
dskOpenApiConfig
.
endPoint
)
.
setProtocol
(
dskOpenApiConfig
.
protocol
)
);
Map
<
String
,
?>
res
=
AccClient
.
request
(
reqBodyType
,
path
,
bodyMap
);
Map
<
String
,
?>
res
=
AccClient
.
request
(
reqBodyType
,
path
,
bodyMap
);
if
(!
res
.
containsKey
(
"headers"
)
||
!
res
.
containsKey
(
"body"
))
{
if
(!
res
.
containsKey
(
"headers"
)
||
!
res
.
containsKey
(
"body"
))
{
throw
new
RuntimeException
(
String
.
format
(
"请求无返回:path=%s"
,
path
));
throw
new
RuntimeException
(
String
.
format
(
"请求无返回:path=%s"
,
path
));
...
...
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