Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
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
haoban3.0
haoban-manage3.0
Commits
42f2530d
Commit
42f2530d
authored
Sep 16, 2021
by
xugaojun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
9月迭代: 关闭标签选项优化,检查是否有执行中任务
parent
3b2a41a2
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
0 deletions
+26
-0
pom.xml
haoban-manage3-operation-web/pom.xml
+5
-0
EnterpriseController.java
...ic/haoban/manage/web/controller/EnterpriseController.java
+15
-0
HaoBanErrCode.java
...java/com/gic/haoban/manage/web/errCode/HaoBanErrCode.java
+3
-0
dubbo-haoban-manage3-operation-web.xml
...ain/webapp/WEB-INF/dubbo-haoban-manage3-operation-web.xml
+3
-0
No files found.
haoban-manage3-operation-web/pom.xml
View file @
42f2530d
...
@@ -225,6 +225,11 @@
...
@@ -225,6 +225,11 @@
<artifactId>
sharing-core-api
</artifactId>
<artifactId>
sharing-core-api
</artifactId>
<version>
${sharing-core-api}
</version>
<version>
${sharing-core-api}
</version>
</dependency>
</dependency>
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
haoban-app-customer-api
</artifactId>
<version>
${haoban-app-customer-api}
</version>
</dependency>
</dependencies>
</dependencies>
<build>
<build>
...
...
haoban-manage3-operation-web/src/main/java/com/gic/haoban/manage/web/controller/EnterpriseController.java
View file @
42f2530d
...
@@ -6,6 +6,7 @@ import java.util.stream.Collectors;
...
@@ -6,6 +6,7 @@ import java.util.stream.Collectors;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
com.gic.haoban.app.customer.service.api.service.QywxTagSyncApiService
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Sets
;
import
com.google.common.collect.Sets
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
...
@@ -53,6 +54,8 @@ public class EnterpriseController extends WebBaseController {
...
@@ -53,6 +54,8 @@ public class EnterpriseController extends WebBaseController {
private
StoreService
storeService
;
private
StoreService
storeService
;
@Autowired
@Autowired
private
EnterpriseService
enterpriseService
;
private
EnterpriseService
enterpriseService
;
@Autowired
private
QywxTagSyncApiService
qywxTagSyncApiService
;
// @Autowired
// @Autowired
// private WxEnterpriseRelatedApiService wxEnterpriseRelllatedApiService;
// private WxEnterpriseRelatedApiService wxEnterpriseRelllatedApiService;
...
@@ -129,6 +132,9 @@ public class EnterpriseController extends WebBaseController {
...
@@ -129,6 +132,9 @@ public class EnterpriseController extends WebBaseController {
if
(
StringUtils
.
isEmpty
(
wxEnterpriseId
))
{
if
(
StringUtils
.
isEmpty
(
wxEnterpriseId
))
{
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
}
}
if
(
Objects
.
isNull
(
flag
))
{
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
}
// 操作缓存
// 操作缓存
String
key
=
"qywx-tag-open"
;
String
key
=
"qywx-tag-open"
;
String
lockKey
=
"qywx-tag-open-lock"
;
String
lockKey
=
"qywx-tag-open-lock"
;
...
@@ -148,6 +154,15 @@ public class EnterpriseController extends WebBaseController {
...
@@ -148,6 +154,15 @@ public class EnterpriseController extends WebBaseController {
RedisUtil
.
setCache
(
key
,
wxEntIdStr
);
RedisUtil
.
setCache
(
key
,
wxEntIdStr
);
}
}
if
(
flag
==
0
)
{
// 关闭标签检查是否有任务在进行
boolean
tagSync
=
qywxTagSyncApiService
.
checkQywxTagSync
(
wxEnterpriseId
);
if
(!
tagSync
)
{
// 有同步任务
return
resultResponse
(
HaoBanErrCode
.
ERR_30001
);
}
}
if
(
flag
==
0
&&
StringUtils
.
isNotEmpty
(
wxEntIdStr
))
{
if
(
flag
==
0
&&
StringUtils
.
isNotEmpty
(
wxEntIdStr
))
{
// 关闭标签同步,只有在字符串不为空时才能关
// 关闭标签同步,只有在字符串不为空时才能关
List
<
String
>
filterList
=
Arrays
.
stream
(
wxEntIdStr
.
split
(
","
))
List
<
String
>
filterList
=
Arrays
.
stream
(
wxEntIdStr
.
split
(
","
))
...
...
haoban-manage3-operation-web/src/main/java/com/gic/haoban/manage/web/errCode/HaoBanErrCode.java
View file @
42f2530d
...
@@ -77,6 +77,9 @@ public enum HaoBanErrCode {
...
@@ -77,6 +77,9 @@ public enum HaoBanErrCode {
ERR_20002
(
20002
,
"门店不存在"
),
ERR_20002
(
20002
,
"门店不存在"
),
ERR_30001
(
30001
,
"已存在同步任务, 无法关闭"
),
ERR_DEFINE
(-
888
,
"自定义错误"
),
ERR_DEFINE
(-
888
,
"自定义错误"
),
ERR_OTHER
(-
999
,
"未知错误code"
);
ERR_OTHER
(-
999
,
"未知错误code"
);
private
int
code
;
private
int
code
;
...
...
haoban-manage3-operation-web/src/main/webapp/WEB-INF/dubbo-haoban-manage3-operation-web.xml
View file @
42f2530d
...
@@ -57,4 +57,7 @@
...
@@ -57,4 +57,7 @@
<dubbo:reference
interface=
"com.gic.sharing.core.service.api.service.MqApiService"
<dubbo:reference
interface=
"com.gic.sharing.core.service.api.service.MqApiService"
id=
"mqApiService"
/>
id=
"mqApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.app.customer.service.api.service.QywxTagSyncApiService"
id=
"qywxTagSyncApiService"
/>
</beans>
</beans>
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