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
1
Merge Requests
1
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
68ec0095
Commit
68ec0095
authored
Apr 13, 2020
by
fudahua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
同步优化初步3
parent
3f4774e9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
8 deletions
+15
-8
SyncDealContoller.java
...m/gic/haoban/manage/web/controller/SyncDealContoller.java
+15
-8
No files found.
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/SyncDealContoller.java
View file @
68ec0095
...
...
@@ -14,6 +14,7 @@ import com.gic.haoban.manage.web.errCode.HaoBanErrCode;
import
com.gic.haoban.manage.web.qo.SyncDealQO
;
import
com.gic.haoban.manage.web.vo.LoginVO
;
import
com.gic.redis.data.util.RedisUtil
;
import
org.apache.commons.lang.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -34,15 +35,21 @@ public class SyncDealContoller extends WebBaseController {
@RequestMapping
(
"department-sync"
)
@ResponseBody
public
HaobanResponse
departmentBatchSync
(
@RequestBody
SyncDealQO
qo
)
{
LoginVO
login
=
(
LoginVO
)
AuthRequestUtil
.
getSessionUser
();
String
wxEnterpriseId
=
login
.
getWxEnterpriseId
();
String
key
=
"haoban-sync-department-"
+
wxEnterpriseId
;
if
(
RedisUtil
.
getCache
(
key
)
!=
null
)
{
return
resultResponse
(
HaoBanErrCode
.
ERR_10011
);
public
HaobanResponse
departmentBatchSync
(
@RequestBody
SyncDealQO
qo
,
String
wxEid
)
{
if
(
StringUtils
.
isNotBlank
(
wxEid
))
{
String
task
=
dealSyncOperationApiService
.
createTask
(
"门店同步"
,
"11111"
,
"部门同步"
);
dealSyncOperationApiService
.
dealDepartment
(
task
,
wxEid
,
qo
.
getAddDepartment
(),
qo
.
getEditDepartment
());
}
else
{
LoginVO
login
=
(
LoginVO
)
AuthRequestUtil
.
getSessionUser
();
String
wxEnterpriseId
=
login
.
getWxEnterpriseId
();
String
key
=
"haoban-sync-department-"
+
wxEnterpriseId
;
if
(
RedisUtil
.
getCache
(
key
)
!=
null
)
{
return
resultResponse
(
HaoBanErrCode
.
ERR_10011
);
}
String
task
=
dealSyncOperationApiService
.
createTask
(
"门店同步"
,
login
.
getStaffDTO
().
getStaffId
(),
"部门同步"
);
dealSyncOperationApiService
.
dealDepartment
(
task
,
login
.
getWxEnterpriseId
(),
qo
.
getAddDepartment
(),
qo
.
getEditDepartment
());
}
String
task
=
dealSyncOperationApiService
.
createTask
(
"门店同步"
,
login
.
getStaffDTO
().
getStaffId
(),
"部门同步"
);
dealSyncOperationApiService
.
dealDepartment
(
task
,
login
.
getWxEnterpriseId
(),
qo
.
getAddDepartment
(),
qo
.
getEditDepartment
());
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
key
);
...
...
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