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
1228cdeb
Commit
1228cdeb
authored
Dec 07, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
关联状态
parent
ccccabe4
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
80 additions
and
17 deletions
+80
-17
StaffDTO.java
...src/main/java/com/gic/haoban/manage/api/dto/StaffDTO.java
+9
-0
GroupChatDTO.java
...java/com/gic/haoban/manage/api/dto/chat/GroupChatDTO.java
+10
-0
StaffMapper.java
...com/gic/haoban/manage/service/dao/mapper/StaffMapper.java
+4
-0
StaffService.java
...a/com/gic/haoban/manage/service/service/StaffService.java
+3
-0
StaffServiceImpl.java
.../haoban/manage/service/service/impl/StaffServiceImpl.java
+6
-0
GroupChatApiServiceImpl.java
...ervice/service/out/impl/chat/GroupChatApiServiceImpl.java
+13
-0
HmQrcodeApiServiceImpl.java
...e/service/service/out/impl/hm/HmQrcodeApiServiceImpl.java
+24
-15
StaffMapper.xml
...manage3-service/src/main/resources/mapper/StaffMapper.xml
+10
-1
StaffController.java
...com/gic/haoban/manage/web/controller/StaffController.java
+1
-1
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/StaffDTO.java
View file @
1228cdeb
...
...
@@ -102,6 +102,15 @@ public class StaffDTO implements Serializable {
private
Integer
activeStatus
;
private
String
enterpriseId
;
private
String
storeId
;
private
int
openConcatFlag
=
0
;
public
int
getOpenConcatFlag
()
{
return
openConcatFlag
;
}
public
void
setOpenConcatFlag
(
int
openConcatFlag
)
{
this
.
openConcatFlag
=
openConcatFlag
;
}
public
String
getDefaultGicEid
()
{
return
defaultGicEid
;
...
...
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/chat/GroupChatDTO.java
View file @
1228cdeb
...
...
@@ -57,6 +57,16 @@ public class GroupChatDTO implements Serializable{
private
String
staffImage
;
private
String
originalStaffId
;
private
Date
offTime
;
// 1已关联导购 0未关联导购
private
int
clerkRelationFlag
=
0
;
public
int
getClerkRelationFlag
()
{
return
clerkRelationFlag
;
}
public
void
setClerkRelationFlag
(
int
clerkRelationFlag
)
{
this
.
clerkRelationFlag
=
clerkRelationFlag
;
}
public
String
getStaffImage
()
{
return
staffImage
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/StaffMapper.java
View file @
1228cdeb
...
...
@@ -6,6 +6,7 @@ import com.github.pagehelper.Page;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Set
;
public
interface
StaffMapper
{
...
...
@@ -144,4 +145,6 @@ public interface StaffMapper {
List
<
TabHaobanStaff
>
listAllByPage
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"startItem"
)
int
startItem
,
@Param
(
"pageSize"
)
int
pageSize
);
void
updateOpenConcatFlag
(
@Param
(
"staffIdList"
)
Set
<
String
>
staffIdList
);
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/StaffService.java
View file @
1228cdeb
...
...
@@ -7,6 +7,7 @@ import com.gic.haoban.manage.service.entity.TabHaobanStaff;
import
com.github.pagehelper.Page
;
import
java.util.List
;
import
java.util.Set
;
public
interface
StaffService
{
...
...
@@ -141,4 +142,6 @@ public interface StaffService {
* @date 2022-08-04 15:39:54
*/
int
updateActiveStatusById
(
Integer
activeStatus
,
String
staffId
);
void
updateOpenConcatFlag
(
Set
<
String
>
staffIdList
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/StaffServiceImpl.java
View file @
1228cdeb
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
impl
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Set
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
...
...
@@ -149,4 +150,9 @@ public class StaffServiceImpl implements StaffService {
public
int
updateActiveStatusById
(
Integer
activeStatus
,
String
staffId
)
{
return
mapper
.
updateActiveStatusById
(
activeStatus
,
staffId
);
}
@Override
public
void
updateOpenConcatFlag
(
Set
<
String
>
staffIdList
)
{
this
.
mapper
.
updateOpenConcatFlag
(
staffIdList
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/chat/GroupChatApiServiceImpl.java
View file @
1228cdeb
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
.
chat
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -27,6 +29,7 @@ import com.gic.haoban.manage.api.service.chat.GroupChatApiService;
import
com.gic.haoban.manage.service.entity.TabHaobanStaff
;
import
com.gic.haoban.manage.service.entity.TabHaobanWxEnterpriseRelated
;
import
com.gic.haoban.manage.service.pojo.bo.chat.GroupChatBO
;
import
com.gic.haoban.manage.service.service.StaffClerkRelationService
;
import
com.gic.haoban.manage.service.service.StaffService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseRelatedService
;
import
com.gic.haoban.manage.service.service.chat.GroupChatService
;
...
...
@@ -45,11 +48,21 @@ public class GroupChatApiServiceImpl implements GroupChatApiService {
private
StaffService
staffService
;
@Autowired
private
WxEnterpriseRelatedService
wxEnterpriseRelatedService
;
@Autowired
private
StaffClerkRelationService
staffClerkRelationService
;
@Override
public
ServiceResponse
<
Page
<
GroupChatDTO
>>
listPage
(
GroupChatSearchQDTO
qdto
,
BasePageInfo
basePageInfo
)
{
Page
<
GroupChatBO
>
page
=
this
.
groupChatService
.
listPage
(
qdto
,
basePageInfo
);
Page
<
GroupChatDTO
>
resultPage
=
PageHelperUtils
.
changePageToCurrentPage
(
page
,
GroupChatDTO
.
class
);
List
<
GroupChatDTO
>
dtoList
=
resultPage
.
getResult
()
;
if
(
CollectionUtils
.
isNotEmpty
(
dtoList
))
{
List
<
String
>
staffIdList
=
dtoList
.
stream
().
filter
(
dto
->
StringUtils
.
isNotBlank
(
dto
.
getStaffId
())).
map
(
dto
->
dto
.
getStaffId
()).
collect
(
Collectors
.
toList
())
;
List
<
String
>
relationIdList
=
this
.
staffClerkRelationService
.
listRelationsStaffId
(
new
HashSet
<>(
staffIdList
));
dtoList
.
forEach
(
one
->
{
one
.
setClerkRelationFlag
(
relationIdList
.
contains
(
one
.
getStaffId
())
?
1
:
0
);
});
}
return
ServiceResponse
.
success
(
resultPage
);
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/hm/HmQrcodeApiServiceImpl.java
View file @
1228cdeb
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
.
hm
;
import
cn.hutool.core.convert.Convert
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.concurrent.TimeUnit
;
import
java.util.stream.Collectors
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.api.base.commons.ServiceResponse
;
...
...
@@ -29,7 +44,11 @@ import com.gic.haoban.manage.api.enums.hm.HmWelcomeReferType;
import
com.gic.haoban.manage.api.service.hm.HmQrcodeApiService
;
import
com.gic.haoban.manage.service.config.Config
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaff
;
import
com.gic.haoban.manage.service.pojo.bo.hm.*
;
import
com.gic.haoban.manage.service.pojo.bo.hm.HmClerkRelationBO
;
import
com.gic.haoban.manage.service.pojo.bo.hm.HmGroupSettingBO
;
import
com.gic.haoban.manage.service.pojo.bo.hm.HmQrcodeBO
;
import
com.gic.haoban.manage.service.pojo.bo.hm.HmQrcodeClerkBO
;
import
com.gic.haoban.manage.service.pojo.bo.hm.HmWelcomeRelationBO
;
import
com.gic.haoban.manage.service.pojo.bo.welcome.WelcomeDetailBO
;
import
com.gic.haoban.manage.service.service.StaffClerkRelationService
;
import
com.gic.haoban.manage.service.service.StaffService
;
...
...
@@ -54,20 +73,8 @@ import com.gic.wechat.api.dto.qywx.response.QywxResponseDTO;
import
com.gic.wechat.api.dto.qywx.welcome.QywxExternalcontactDTO
;
import
com.gic.wechat.api.dto.qywx.welcome.QywxExternalcontactResultDTO
;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.concurrent.TimeUnit
;
import
java.util.stream.Collectors
;
import
cn.hutool.core.convert.Convert
;
/**
* @author mozhu
...
...
@@ -816,6 +823,8 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
logger
.
error
(
"无导购关联数据"
);
return
;
}
Set
<
String
>
staffIdList
=
staffClerkRelationDTOS
.
stream
().
map
(
dto
->
dto
.
getStaffId
()).
collect
(
Collectors
.
toSet
())
;
this
.
staffService
.
updateOpenConcatFlag
(
staffIdList
)
;
for
(
StaffClerkRelationDTO
staffClerkRelationDTO
:
staffClerkRelationDTOS
)
{
//具有联系我功能的导购创建活码
staffClerkRelationService
.
updateOpenConcatFlagById
(
1
,
staffClerkRelationDTO
.
getStaffClerkRelationId
());
...
...
haoban-manage3-service/src/main/resources/mapper/StaffMapper.xml
View file @
1228cdeb
...
...
@@ -25,13 +25,14 @@
<result
column=
"qr_code"
property=
"qrCode"
jdbcType=
"VARCHAR"
/>
<result
column=
"add_num"
property=
"addNum"
jdbcType=
"INTEGER"
/>
<result
column=
"active_status"
property=
"activeStatus"
jdbcType=
"INTEGER"
/>
<result
column=
"open_concat_flag"
property=
"openConcatFlag"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
staff_id
, wx_user_id, phone_number, staff_name, nation_code, nick_name, sex, postion,
active_flag, extend_postion, status_flag, create_time, update_time,wx_enterprise_id,head_img,
sort,sync_postion_flag,super_manager_flag,wx_open_user_id,wx_open_id,qr_code,add_num,active_status
sort,sync_postion_flag,super_manager_flag,wx_open_user_id,wx_open_id,qr_code,add_num,active_status
,open_concat_flag
</sql>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
...
...
@@ -522,4 +523,11 @@
limit ${startItem},${pageSize}
</select>
<update
id=
"updateOpenConcatFlag"
>
update tab_haoban_staff set open_concat_flag = 1 where staff_id in
<foreach
collection=
"staffIdList"
index=
"index"
item=
"id"
close=
")"
open=
"("
separator=
","
>
#{id}
</foreach>
</update>
</mapper>
\ No newline at end of file
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/StaffController.java
View file @
1228cdeb
...
...
@@ -148,7 +148,7 @@ public class StaffController extends WebBaseController {
Integer
activeFlag
,
Integer
relationFlag
,
String
keyWord
,
BasePageInfo
pageInfo
)
{
BasePageInfo
pageInfo
,
String
departmentIdList
)
{
WebLoginDTO
login
=
AuthWebRequestUtil
.
getLoginUser
();
String
wxEnterpriseId
=
login
.
getWxEnterpriseId
();
List
<
String
>
departmentIds
=
new
ArrayList
<>();
...
...
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