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
8776e2f5
Commit
8776e2f5
authored
May 09, 2020
by
huangZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
绑定code的消息推送
parent
21fcdd41
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
1 deletions
+21
-1
ClerkController.java
...com/gic/haoban/manage/web/controller/ClerkController.java
+21
-1
No files found.
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/ClerkController.java
View file @
8776e2f5
...
@@ -12,6 +12,8 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -12,6 +12,8 @@ import org.springframework.web.bind.annotation.RestController;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.alibaba.csp.sentinel.util.StringUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.clerk.api.dto.ClerkDTO
;
import
com.gic.clerk.api.dto.ClerkDTO
;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.EntityUtil
;
...
@@ -19,6 +21,7 @@ import com.gic.haoban.common.utils.HaobanResponse;
...
@@ -19,6 +21,7 @@ import com.gic.haoban.common.utils.HaobanResponse;
import
com.gic.haoban.manage.api.dto.DepartmentDTO
;
import
com.gic.haoban.manage.api.dto.DepartmentDTO
;
import
com.gic.haoban.manage.api.dto.StaffDTO
;
import
com.gic.haoban.manage.api.dto.StaffDTO
;
import
com.gic.haoban.manage.api.dto.StaffDepartmentRelatedDTO
;
import
com.gic.haoban.manage.api.dto.StaffDepartmentRelatedDTO
;
import
com.gic.haoban.manage.api.enums.AppPageType
;
import
com.gic.haoban.manage.api.service.DepartmentApiService
;
import
com.gic.haoban.manage.api.service.DepartmentApiService
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.api.service.StaffDepartmentRelatedApiService
;
import
com.gic.haoban.manage.api.service.StaffDepartmentRelatedApiService
;
...
@@ -93,7 +96,7 @@ public class ClerkController extends WebBaseController{
...
@@ -93,7 +96,7 @@ public class ClerkController extends WebBaseController{
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
}
}
StaffDepartmentRelatedDTO
staffDepartmentRelatedDTO
=
staffDepartmentRelatedApiService
.
getByStaffDepartmentRelatedId
(
fromStaffDepartmentRelatedId
);
StaffDepartmentRelatedDTO
staffDepartmentRelatedDTO
=
staffDepartmentRelatedApiService
.
getByStaffDepartmentRelatedId
(
fromStaffDepartmentRelatedId
);
String
oldClerkCode
=
staffDepartmentRelatedDTO
.
getClerkCode
();
//将指定人绑定clerkCode
//将指定人绑定clerkCode
StaffDepartmentRelatedDTO
dto
=
new
StaffDepartmentRelatedDTO
();
StaffDepartmentRelatedDTO
dto
=
new
StaffDepartmentRelatedDTO
();
dto
.
setStaffDepartmentRelatedId
(
fromStaffDepartmentRelatedId
);
dto
.
setStaffDepartmentRelatedId
(
fromStaffDepartmentRelatedId
);
...
@@ -125,6 +128,23 @@ public class ClerkController extends WebBaseController{
...
@@ -125,6 +128,23 @@ public class ClerkController extends WebBaseController{
clerkService
.
updateClerk
(
clerkDTO
);
clerkService
.
updateClerk
(
clerkDTO
);
}
}
}
}
//发送消息
if
(
StringUtil
.
isNotBlank
(
oldClerkCode
)){
//发送消息
ClerkDTO
leader
=
clerkService
.
getClerkLeaderByStoreId
(
storeId
);
String
clerkId
=
leader
.
getClerkId
();
String
storeName
=
departmentDTO
.
getDepartmentName
();
String
staffName
=
staffDTO
.
getStaffName
();
String
leaderName
=
leader
.
getClerkName
();
String
clerkCode
=
oldClerkCode
;
String
content
=
"【"
+
leaderName
+
"】:【"
+
storeName
+
"】"
+
staffName
+
"导购code:"
+
clerkCode
+
"已解绑,请重新分配会员!"
;
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"storeId"
,
storeId
);
String
data
=
jsonObject
.
toJSONString
();
String
pageUrl
=
staffDepartmentRelatedApiService
.
getPageUrl
(
AppPageType
.
MEMBER_LIST
.
getCode
(),
data
);
staffDepartmentRelatedApiService
.
sendSingleMessage
(
clerkId
,
"分配会员通知"
,
content
,
pageUrl
);
}
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
}
...
...
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