Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-enterprise
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
base_platform_enterprise
gic-platform-enterprise
Commits
cc91c630
Commit
cc91c630
authored
May 18, 2021
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
达摩情报销商户黑名单
parent
6764defc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
3 deletions
+39
-3
ProductMarketController.java
...ic/enterprise/web/controller/ProductMarketController.java
+13
-3
dubbo-gic-platform-enterprise-web.xml
.../src/main/resources/dubbo-gic-platform-enterprise-web.xml
+1
-0
ProductMarketController.java
...gic/operation/web/controller/ProductMarketController.java
+23
-0
dubbo-gic-platform-operation-web.xml
...b/src/main/resources/dubbo-gic-platform-operation-web.xml
+2
-0
No files found.
gic-platform-enterprise-web/src/main/java/com/gic/enterprise/web/controller/ProductMarketController.java
View file @
cc91c630
...
...
@@ -6,13 +6,13 @@ import com.gic.commons.webapi.reponse.RestResponse;
import
com.gic.enterprise.constant.ProductMarketTypeEnum
;
import
com.gic.enterprise.dto.ProductMarketDTO
;
import
com.gic.enterprise.qo.ProductMarketQO
;
import
com.gic.enterprise.service.BlackListApiService
;
import
com.gic.enterprise.service.ProductMarketApiService
;
import
com.gic.enterprise.utils.ResultControllerUtils
;
import
com.gic.enterprise.utils.UserDetailUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.Collections
;
...
...
@@ -32,10 +32,11 @@ import java.util.Map;
public
class
ProductMarketController
{
@Autowired
private
ProductMarketApiService
productMarketApiService
;
@Autowired
private
BlackListApiService
blackListApiService
;
@RequestMapping
(
"query-product-market"
)
@ResponseBody
public
RestResponse
queryProductMarket
(
Integer
showCount
)
{
Map
<
String
,
List
<
ProductMarketDTO
>>
result
=
new
HashMap
<>(
8
);
//功能更新
...
...
@@ -77,13 +78,22 @@ public class ProductMarketController {
* @return
*/
@RequestMapping
(
"is-need-to-popup"
)
@ResponseBody
public
RestResponse
isNeedToPopup
()
{
return
ResultControllerUtils
.
commonResult
(
productMarketApiService
.
isNeedToPopup
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
(),
UserDetailUtils
.
getUserDetail
().
getUserId
()));
}
/**
* 是否在黑名单
* @return
*/
@RequestMapping
(
"is-in-black-list"
)
public
RestResponse
isInBlackList
()
{
List
<
Integer
>
list
=
blackListApiService
.
getBlankListEnterprise
().
getResult
();
return
RestResponse
.
success
(
list
.
contains
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
()));
}
private
boolean
isNotEmptyList
(
ServiceResponse
<
Page
<
ProductMarketDTO
>>
response
)
{
return
response
.
isSuccess
()
&&
response
.
getResult
()
!=
null
&&
CollectionUtils
.
isNotEmpty
(
response
.
getResult
().
getResult
());
}
...
...
gic-platform-enterprise-web/src/main/resources/dubbo-gic-platform-enterprise-web.xml
View file @
cc91c630
...
...
@@ -155,4 +155,5 @@
<!--短信签名-->
<dubbo:reference
interface=
"com.gic.marketing.api.service.sms.SmsApiService"
id=
"smsApiService"
timeout=
"6000"
/>
<dubbo:reference
interface=
"com.gic.enterprise.service.ProductMarketApiService"
id=
"productMarketApiService"
timeout=
"6000"
/>
<dubbo:reference
interface=
"com.gic.enterprise.service.BlackListApiService"
id=
"blackListApiService"
timeout=
"6000"
/>
</beans>
gic-platform-operation-web/src/main/java/com/gic/operation/web/controller/ProductMarketController.java
View file @
cc91c630
...
...
@@ -3,6 +3,7 @@ package com.gic.operation.web.controller;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.enterprise.dto.ProductMarketDTO
;
import
com.gic.enterprise.qo.ProductMarketQO
;
import
com.gic.enterprise.service.BlackListApiService
;
import
com.gic.enterprise.service.ProductMarketApiService
;
import
com.gic.enterprise.utils.ResultControllerUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -20,6 +21,8 @@ import org.springframework.web.bind.annotation.RestController;
public
class
ProductMarketController
{
@Autowired
private
ProductMarketApiService
productMarketApiService
;
@Autowired
private
BlackListApiService
blackListApiService
;
/**
* 新增情报
...
...
@@ -50,4 +53,24 @@ public class ProductMarketController {
public
RestResponse
pageProductMarket
(
ProductMarketQO
params
)
{
return
ResultControllerUtils
.
commonResult
(
productMarketApiService
.
pageProductMarket
(
params
));
}
/**
* 新增黑名单
* @param enterpriseId
* @return
*/
@RequestMapping
(
"save-black-list"
)
public
RestResponse
saveBlackList
(
Integer
enterpriseId
)
{
return
ResultControllerUtils
.
commonResult
(
blackListApiService
.
saveBlackList
(
enterpriseId
));
}
@RequestMapping
(
"delete-black-list"
)
public
RestResponse
deleteBlackList
(
Integer
blackListId
)
{
return
ResultControllerUtils
.
commonResult
(
blackListApiService
.
deleteBlackList
(
blackListId
));
}
@RequestMapping
(
"page-black-list"
)
public
RestResponse
pageBlackList
(
String
search
,
Integer
pageNum
,
Integer
pageSize
)
{
return
ResultControllerUtils
.
commonResult
(
blackListApiService
.
pageBlackList
(
search
,
pageNum
,
pageSize
));
}
}
gic-platform-operation-web/src/main/resources/dubbo-gic-platform-operation-web.xml
View file @
cc91c630
...
...
@@ -95,4 +95,5 @@
<dubbo:reference
interface=
"com.gic.open.api.service.EnterpriseLicenseApiService"
id=
"enterpriseLicenseApiService"
timeout=
"6000"
/>
<dubbo:reference
interface=
"com.gic.enterprise.service.ProductMarketApiService"
id=
"productMarketApiService"
timeout=
"6000"
/>
<dubbo:reference
interface=
"com.gic.enterprise.service.BlackListApiService"
id=
"blackListApiService"
timeout=
"6000"
/>
</beans>
\ No newline at end of file
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