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
9d346334
Commit
9d346334
authored
Jul 21, 2022
by
guojx
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
ad65461b
f21b6fe9
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
303 additions
and
138 deletions
+303
-138
StaffClerkRelationDTO.java
.../com/gic/haoban/manage/api/dto/StaffClerkRelationDTO.java
+1
-1
HmLinkWxaDTO.java
...n/java/com/gic/haoban/manage/api/dto/hm/HmLinkWxaDTO.java
+16
-5
HmQrcodeApiService.java
.../gic/haoban/manage/api/service/hm/HmQrcodeApiService.java
+5
-3
TabHaobanHmClerkRelationMapper.java
...service/dao/mapper/hm/TabHaobanHmClerkRelationMapper.java
+11
-0
TabHaobanHmQrcodeMapper.java
...manage/service/dao/mapper/hm/TabHaobanHmQrcodeMapper.java
+14
-2
HmClerkRelationService.java
...ban/manage/service/service/hm/HmClerkRelationService.java
+12
-0
HmQrcodeService.java
...gic/haoban/manage/service/service/hm/HmQrcodeService.java
+6
-3
HmClerkRelationServiceImpl.java
...e/service/service/hm/impl/HmClerkRelationServiceImpl.java
+5
-0
HmQrcodeServiceImpl.java
...n/manage/service/service/hm/impl/HmQrcodeServiceImpl.java
+9
-4
StaffClerkRelationServiceImpl.java
...e/service/service/impl/StaffClerkRelationServiceImpl.java
+3
-1
MemberUnionidRelatedApiServiceImpl.java
.../service/out/impl/MemberUnionidRelatedApiServiceImpl.java
+34
-23
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+3
-1
StaffClerkRelationApiServiceImpl.java
...ce/service/out/impl/StaffClerkRelationApiServiceImpl.java
+2
-2
HmGroupApiServiceImpl.java
...ge/service/service/out/impl/hm/HmGroupApiServiceImpl.java
+22
-10
HmLinkApiServiceImpl.java
...age/service/service/out/impl/hm/HmLinkApiServiceImpl.java
+72
-42
HmQrcodeApiServiceImpl.java
...e/service/service/out/impl/hm/HmQrcodeApiServiceImpl.java
+45
-21
TabHaobanHmClerkRelationMapper.xml
...in/resources/mapper/hm/TabHaobanHmClerkRelationMapper.xml
+8
-0
TabHaobanHmQrcodeMapper.xml
.../src/main/resources/mapper/hm/TabHaobanHmQrcodeMapper.xml
+21
-3
HmQrcodeController.java
...c/haoban/manage/web/controller/hm/HmQrcodeController.java
+1
-0
HmStoreController.java
...ic/haoban/manage/web/controller/hm/HmStoreController.java
+13
-17
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/StaffClerkRelationDTO.java
View file @
9d346334
...
@@ -150,7 +150,7 @@ public class StaffClerkRelationDTO implements Serializable {
...
@@ -150,7 +150,7 @@ public class StaffClerkRelationDTO implements Serializable {
public
Integer
getOpenConcatFlag
()
{
public
Integer
getOpenConcatFlag
()
{
if
(
null
==
openConcatFlag
)
{
if
(
null
==
openConcatFlag
)
{
return
0
;
return
1
;
}
}
return
openConcatFlag
;
return
openConcatFlag
;
}
}
...
...
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/hm/HmLinkWxaDTO.java
View file @
9d346334
...
@@ -2,6 +2,7 @@ package com.gic.haoban.manage.api.dto.hm;
...
@@ -2,6 +2,7 @@ package com.gic.haoban.manage.api.dto.hm;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
*
*
...
@@ -17,6 +18,7 @@ public class HmLinkWxaDTO implements Serializable {
...
@@ -17,6 +18,7 @@ public class HmLinkWxaDTO implements Serializable {
private
static
final
long
serialVersionUID
=
6473795387449522116L
;
private
static
final
long
serialVersionUID
=
6473795387449522116L
;
private
Long
pageId
;
private
Long
pageId
;
private
Long
hmId
;
private
HmPageDTO
page
;
private
HmPageDTO
page
;
// 二维码
// 二维码
private
String
hmQrcode
;
private
String
hmQrcode
;
...
@@ -29,8 +31,16 @@ public class HmLinkWxaDTO implements Serializable {
...
@@ -29,8 +31,16 @@ public class HmLinkWxaDTO implements Serializable {
// 推荐的门店列表
// 推荐的门店列表
private
List
<
HmLinkStoreDTO
>
storeList
;
private
List
<
HmLinkStoreDTO
>
storeList
;
// 说明
// 说明
private
String
sm
;
private
Map
<
String
,
String
>
remarkMap
;
public
Long
getHmId
()
{
return
hmId
;
}
public
void
setHmId
(
Long
hmId
)
{
this
.
hmId
=
hmId
;
}
public
HmPageDTO
getPage
()
{
public
HmPageDTO
getPage
()
{
return
page
;
return
page
;
}
}
...
@@ -46,13 +56,14 @@ public class HmLinkWxaDTO implements Serializable {
...
@@ -46,13 +56,14 @@ public class HmLinkWxaDTO implements Serializable {
public
void
setPageId
(
Long
pageId
)
{
public
void
setPageId
(
Long
pageId
)
{
this
.
pageId
=
pageId
;
this
.
pageId
=
pageId
;
}
}
public
String
getSm
()
{
public
Map
<
String
,
String
>
getRemarkMap
()
{
return
sm
;
return
remarkMap
;
}
}
public
void
set
Sm
(
String
sm
)
{
public
void
set
RemarkMap
(
Map
<
String
,
String
>
remarkMap
)
{
this
.
sm
=
sm
;
this
.
remarkMap
=
remarkMap
;
}
}
public
String
getHmQrcode
()
{
public
String
getHmQrcode
()
{
...
...
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/hm/HmQrcodeApiService.java
View file @
9d346334
package
com
.
gic
.
haoban
.
manage
.
api
.
service
.
hm
;
package
com
.
gic
.
haoban
.
manage
.
api
.
service
.
hm
;
import
java.util.List
;
import
com.gic.api.base.commons.BasePageInfo
;
import
com.gic.api.base.commons.BasePageInfo
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.api.base.commons.ServiceResponse
;
...
@@ -11,6 +9,8 @@ import com.gic.haoban.manage.api.dto.hm.HmQrcodeStoreDTO;
...
@@ -11,6 +9,8 @@ import com.gic.haoban.manage.api.dto.hm.HmQrcodeStoreDTO;
import
com.gic.haoban.manage.api.dto.qdto.hm.HmQrcodeListQDTO
;
import
com.gic.haoban.manage.api.dto.qdto.hm.HmQrcodeListQDTO
;
import
com.gic.haoban.manage.api.dto.qdto.hm.HmQrcodeQDTO
;
import
com.gic.haoban.manage.api.dto.qdto.hm.HmQrcodeQDTO
;
import
java.util.List
;
/**
/**
* @author mozhu
* @author mozhu
* @date 2022/7/5 09:33
* @date 2022/7/5 09:33
...
@@ -88,7 +88,7 @@ public interface HmQrcodeApiService {
...
@@ -88,7 +88,7 @@ public interface HmQrcodeApiService {
* @author mozhu
* @author mozhu
* @date 2022-07-06 15:39:01
* @date 2022-07-06 15:39:01
*/
*/
ServiceResponse
delByClerkId
(
String
clerkId
,
String
enterpriseId
);
ServiceResponse
delByClerkId
(
String
clerkId
,
String
enterpriseId
,
String
wxEnterpriseId
);
/**
/**
...
@@ -219,5 +219,7 @@ public interface HmQrcodeApiService {
...
@@ -219,5 +219,7 @@ public interface HmQrcodeApiService {
* @throws
* @throws
*/
*/
ServiceResponse
<
List
<
String
>>
listHmIdForIndex
(
HmQrcodeListQDTO
qdto
)
;
ServiceResponse
<
List
<
String
>>
listHmIdForIndex
(
HmQrcodeListQDTO
qdto
)
;
ServiceResponse
<
List
<
String
>>
listHasQrcodeClerk
(
String
enterpriseId
,
List
<
String
>
clerkIdList
)
;
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/hm/TabHaobanHmClerkRelationMapper.java
View file @
9d346334
...
@@ -129,5 +129,16 @@ public interface TabHaobanHmClerkRelationMapper {
...
@@ -129,5 +129,16 @@ public interface TabHaobanHmClerkRelationMapper {
* @return
* @return
*/
*/
TabHaobanHmClerkRelation
getHmClerkByHmIdAndStaffId
(
@Param
(
"hmId"
)
Long
hmId
,
@Param
(
"staffId"
)
String
staffId
);
TabHaobanHmClerkRelation
getHmClerkByHmIdAndStaffId
(
@Param
(
"hmId"
)
Long
hmId
,
@Param
(
"staffId"
)
String
staffId
);
/**
* 更新状态通过id
*
* @param status
* @param relationId
* @return int
* @author mozhu
* @date 2022-07-21 16:32:43
*/
int
updateStatusById
(
@Param
(
"status"
)
Integer
status
,
@Param
(
"relationId"
)
Long
relationId
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/hm/TabHaobanHmQrcodeMapper.java
View file @
9d346334
...
@@ -168,7 +168,7 @@ public interface TabHaobanHmQrcodeMapper {
...
@@ -168,7 +168,7 @@ public interface TabHaobanHmQrcodeMapper {
* @author mozhu
* @author mozhu
* @date 2022-07-12 17:39:12
* @date 2022-07-12 17:39:12
*/
*/
List
<
HmQrcodeGroupNumBO
>
getGroupIdNumByEnterpriseId
(
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"groupIds"
)
List
<
Long
>
groupIds
,
@Param
(
"hmIds"
)
List
<
String
>
hmIds
);
List
<
HmQrcodeGroupNumBO
>
getGroupIdNumByEnterpriseId
(
@Param
(
"
wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"
enterpriseId"
)
String
enterpriseId
,
@Param
(
"groupIds"
)
List
<
Long
>
groupIds
,
@Param
(
"hmIds"
)
List
<
String
>
hmIds
);
/**
/**
* 获取总数
* 获取总数
...
@@ -178,7 +178,7 @@ public interface TabHaobanHmQrcodeMapper {
...
@@ -178,7 +178,7 @@ public interface TabHaobanHmQrcodeMapper {
* @author mozhu
* @author mozhu
* @date 2022-07-12 15:10:09
* @date 2022-07-12 15:10:09
*/
*/
int
getTotalByEnterpriseId
(
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"hmIds"
)
List
<
String
>
hmIds
);
int
getTotalByEnterpriseId
(
@Param
(
"
wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"
enterpriseId"
)
String
enterpriseId
,
@Param
(
"hmIds"
)
List
<
String
>
hmIds
);
/**
/**
* 批量修改 活码所属分组
* 批量修改 活码所属分组
...
@@ -206,5 +206,17 @@ public interface TabHaobanHmQrcodeMapper {
...
@@ -206,5 +206,17 @@ public interface TabHaobanHmQrcodeMapper {
List
<
String
>
getHmStoreForWxa
(
@Param
(
"enterpriseId"
)
String
enterpriseId
);
List
<
String
>
getHmStoreForWxa
(
@Param
(
"enterpriseId"
)
String
enterpriseId
);
List
<
String
>
listHmIdForIndex
(
HmQrcodeListQDTO
qdto
);
List
<
String
>
listHmIdForIndex
(
HmQrcodeListQDTO
qdto
);
/**
*
* @Title: listHasQrcodeClerk
* @Description: 返回已有单人活码的clerkId
* @author xugh
* @param enterpriseId
* @param clerkId
* @return
* @throws
*/
List
<
String
>
listHasQrcodeClerk
(
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"clerkIdList"
)
List
<
String
>
clerkIdList
)
;
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/hm/HmClerkRelationService.java
View file @
9d346334
...
@@ -147,4 +147,16 @@ public interface HmClerkRelationService {
...
@@ -147,4 +147,16 @@ public interface HmClerkRelationService {
*/
*/
HmClerkRelationBO
getHmClerkByHmIdAndStaffId
(
Long
hmId
,
String
staffId
);
HmClerkRelationBO
getHmClerkByHmIdAndStaffId
(
Long
hmId
,
String
staffId
);
/**
* 更新状态通过id
*
* @param status 状态
* @param relationId 关系id
* @return int
* @author mozhu
* @date 2022-07-21 16:32:14
*/
int
updateStatusById
(
Integer
status
,
Long
relationId
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/hm/HmQrcodeService.java
View file @
9d346334
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
hm
;
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
hm
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.haoban.manage.api.dto.qdto.hm.HmQrcodeListQDTO
;
import
com.gic.haoban.manage.api.dto.qdto.hm.HmQrcodeListQDTO
;
import
com.gic.haoban.manage.api.dto.qdto.hm.HmQrcodeQDTO
;
import
com.gic.haoban.manage.api.dto.qdto.hm.HmQrcodeQDTO
;
import
com.gic.haoban.manage.service.pojo.bo.hm.HmQrcodeBO
;
import
com.gic.haoban.manage.service.pojo.bo.hm.HmQrcodeBO
;
...
@@ -10,6 +9,8 @@ import com.gic.haoban.manage.service.pojo.bo.hm.HmQrcodeGroupNumBO;
...
@@ -10,6 +9,8 @@ import com.gic.haoban.manage.service.pojo.bo.hm.HmQrcodeGroupNumBO;
import
java.util.List
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
/**
/**
* 活码(TabHaobanHmQrcode)表服务接口
* 活码(TabHaobanHmQrcode)表服务接口
...
@@ -157,7 +158,7 @@ public interface HmQrcodeService {
...
@@ -157,7 +158,7 @@ public interface HmQrcodeService {
* @author mozhu
* @author mozhu
* @date 2022-07-12 17:38:43
* @date 2022-07-12 17:38:43
*/
*/
List
<
HmQrcodeGroupNumBO
>
getGroupIdNumByEnterpriseId
(
String
enterpriseId
,
List
<
Long
>
groupIds
,
List
<
String
>
hmIds
);
List
<
HmQrcodeGroupNumBO
>
getGroupIdNumByEnterpriseId
(
String
wxEnterpriseId
,
String
enterpriseId
,
List
<
Long
>
groupIds
,
List
<
String
>
hmIds
);
/**
/**
* 获取总数
* 获取总数
...
@@ -167,7 +168,7 @@ public interface HmQrcodeService {
...
@@ -167,7 +168,7 @@ public interface HmQrcodeService {
* @author mozhu
* @author mozhu
* @date 2022-07-12 15:08:35
* @date 2022-07-12 15:08:35
*/
*/
int
getTotalByEnterpriseId
(
String
enterpriseId
,
List
<
String
>
hmIds
);
int
getTotalByEnterpriseId
(
String
wxEnterpriseId
,
String
enterpriseId
,
List
<
String
>
hmIds
);
/**
/**
* 批量修改活码分组
* 批量修改活码分组
...
@@ -185,4 +186,6 @@ public interface HmQrcodeService {
...
@@ -185,4 +186,6 @@ public interface HmQrcodeService {
List
<
String
>
getHmStoreForWxa
(
String
enterpriseId
);
List
<
String
>
getHmStoreForWxa
(
String
enterpriseId
);
List
<
String
>
listHmIdForIndex
(
HmQrcodeListQDTO
qdto
);
List
<
String
>
listHmIdForIndex
(
HmQrcodeListQDTO
qdto
);
List
<
String
>
listHasQrcodeClerk
(
String
enterpriseId
,
List
<
String
>
clerkIdList
)
;
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/hm/impl/HmClerkRelationServiceImpl.java
View file @
9d346334
...
@@ -106,4 +106,9 @@ public class HmClerkRelationServiceImpl implements HmClerkRelationService {
...
@@ -106,4 +106,9 @@ public class HmClerkRelationServiceImpl implements HmClerkRelationService {
public
HmClerkRelationBO
getHmClerkByHmIdAndStaffId
(
Long
hmId
,
String
staffId
)
{
public
HmClerkRelationBO
getHmClerkByHmIdAndStaffId
(
Long
hmId
,
String
staffId
)
{
return
EntityUtil
.
changeEntityByOrika
(
HmClerkRelationBO
.
class
,
tabHaobanHmClerkRelationMapper
.
getHmClerkByHmIdAndStaffId
(
hmId
,
staffId
));
return
EntityUtil
.
changeEntityByOrika
(
HmClerkRelationBO
.
class
,
tabHaobanHmClerkRelationMapper
.
getHmClerkByHmIdAndStaffId
(
hmId
,
staffId
));
}
}
@Override
public
int
updateStatusById
(
Integer
status
,
Long
relationId
)
{
return
tabHaobanHmClerkRelationMapper
.
updateStatusById
(
status
,
relationId
);
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/hm/impl/HmQrcodeServiceImpl.java
View file @
9d346334
...
@@ -123,13 +123,13 @@ public class HmQrcodeServiceImpl implements HmQrcodeService {
...
@@ -123,13 +123,13 @@ public class HmQrcodeServiceImpl implements HmQrcodeService {
}
}
@Override
@Override
public
List
<
HmQrcodeGroupNumBO
>
getGroupIdNumByEnterpriseId
(
String
enterpriseId
,
List
<
Long
>
groupIds
,
List
<
String
>
hmIds
)
{
public
List
<
HmQrcodeGroupNumBO
>
getGroupIdNumByEnterpriseId
(
String
wxEnterpriseId
,
String
enterpriseId
,
List
<
Long
>
groupIds
,
List
<
String
>
hmIds
)
{
return
tabHaobanHmQrcodeMapper
.
getGroupIdNumByEnterpriseId
(
enterpriseId
,
groupIds
,
hmIds
);
return
tabHaobanHmQrcodeMapper
.
getGroupIdNumByEnterpriseId
(
wxEnterpriseId
,
enterpriseId
,
groupIds
,
hmIds
);
}
}
@Override
@Override
public
int
getTotalByEnterpriseId
(
String
enterpriseId
,
List
<
String
>
hmIds
)
{
public
int
getTotalByEnterpriseId
(
String
wxEnterpriseId
,
String
enterpriseId
,
List
<
String
>
hmIds
)
{
return
tabHaobanHmQrcodeMapper
.
getTotalByEnterpriseId
(
enterpriseId
,
hmIds
);
return
tabHaobanHmQrcodeMapper
.
getTotalByEnterpriseId
(
wxEnterpriseId
,
enterpriseId
,
hmIds
);
}
}
@Override
@Override
...
@@ -179,5 +179,10 @@ public class HmQrcodeServiceImpl implements HmQrcodeService {
...
@@ -179,5 +179,10 @@ public class HmQrcodeServiceImpl implements HmQrcodeService {
public
List
<
String
>
listHmIdForIndex
(
HmQrcodeListQDTO
qdto
)
{
public
List
<
String
>
listHmIdForIndex
(
HmQrcodeListQDTO
qdto
)
{
return
tabHaobanHmQrcodeMapper
.
listHmIdForIndex
(
qdto
)
;
return
tabHaobanHmQrcodeMapper
.
listHmIdForIndex
(
qdto
)
;
}
}
@Override
public
List
<
String
>
listHasQrcodeClerk
(
String
enterpriseId
,
List
<
String
>
clerkIdList
)
{
return
this
.
tabHaobanHmQrcodeMapper
.
listHasQrcodeClerk
(
enterpriseId
,
clerkIdList
);
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/StaffClerkRelationServiceImpl.java
View file @
9d346334
...
@@ -82,7 +82,7 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
...
@@ -82,7 +82,7 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
staffClerkBindLogService
.
pushToMq
(
clerkRelation
.
getStaffId
(),
optStaffId
,
BindTypeEnum
.
UNBIND
.
getVal
(),
chanelCode
,
clerkRelation
.
getStaffClerkRelationId
());
staffClerkBindLogService
.
pushToMq
(
clerkRelation
.
getStaffId
(),
optStaffId
,
BindTypeEnum
.
UNBIND
.
getVal
(),
chanelCode
,
clerkRelation
.
getStaffClerkRelationId
());
//废弃活码
//废弃活码
hmQrcodeApiService
.
delByClerkId
(
clerkId
,
clerkRelation
.
getEnterpriseId
());
hmQrcodeApiService
.
delByClerkId
(
clerkId
,
clerkRelation
.
getEnterpriseId
()
,
clerkRelation
.
getWxEnterpriseId
()
);
}
}
return
b
;
return
b
;
}
}
...
@@ -133,6 +133,7 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
...
@@ -133,6 +133,7 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
Date
now
=
new
Date
();
Date
now
=
new
Date
();
dto
.
setStaffClerkRelationId
(
ToolUtil
.
randomUUID
());
dto
.
setStaffClerkRelationId
(
ToolUtil
.
randomUUID
());
dto
.
setStatusFlag
(
1
);
dto
.
setStatusFlag
(
1
);
dto
.
setOpenConcatFlag
(
1
);
dto
.
setCreateTime
(
now
);
dto
.
setCreateTime
(
now
);
dto
.
setUpdateTime
(
now
);
dto
.
setUpdateTime
(
now
);
int
insert
=
mapper
.
insert
(
EntityUtil
.
changeEntityByJSON
(
TabHaobanStaffClerkRelation
.
class
,
dto
));
int
insert
=
mapper
.
insert
(
EntityUtil
.
changeEntityByJSON
(
TabHaobanStaffClerkRelation
.
class
,
dto
));
...
@@ -189,6 +190,7 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
...
@@ -189,6 +190,7 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
staffClerkRelation
.
setCreateTime
(
new
Date
());
staffClerkRelation
.
setCreateTime
(
new
Date
());
staffClerkRelation
.
setUpdateTime
(
new
Date
());
staffClerkRelation
.
setUpdateTime
(
new
Date
());
staffClerkRelation
.
setStatusFlag
(
1
);
staffClerkRelation
.
setStatusFlag
(
1
);
staffClerkRelation
.
setOpenConcatFlag
(
1
);
TabHaobanStaffClerkRelation
relation
=
EntityUtil
.
changeEntityByJSON
(
TabHaobanStaffClerkRelation
.
class
,
staffClerkRelation
);
TabHaobanStaffClerkRelation
relation
=
EntityUtil
.
changeEntityByJSON
(
TabHaobanStaffClerkRelation
.
class
,
staffClerkRelation
);
mapper
.
insert
(
relation
);
mapper
.
insert
(
relation
);
return
uuid
;
return
uuid
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MemberUnionidRelatedApiServiceImpl.java
View file @
9d346334
...
@@ -52,11 +52,13 @@ import com.gic.haoban.manage.service.exception.WxApiLimitException;
...
@@ -52,11 +52,13 @@ import com.gic.haoban.manage.service.exception.WxApiLimitException;
import
com.gic.haoban.manage.service.pojo.DealQywxExternalUserPojo
;
import
com.gic.haoban.manage.service.pojo.DealQywxExternalUserPojo
;
import
com.gic.haoban.manage.service.pojo.ExternalUserPojo
;
import
com.gic.haoban.manage.service.pojo.ExternalUserPojo
;
import
com.gic.haoban.manage.service.pojo.QywxTagSyncInfoPojo
;
import
com.gic.haoban.manage.service.pojo.QywxTagSyncInfoPojo
;
import
com.gic.haoban.manage.service.pojo.bo.hm.HmLinkBO
;
import
com.gic.haoban.manage.service.pojo.bo.hm.KeyDataLinkBO
;
import
com.gic.haoban.manage.service.pojo.bo.hm.KeyDataLinkBO
;
import
com.gic.haoban.manage.service.pojo.bo.welcome.WelcomeDetailBO
;
import
com.gic.haoban.manage.service.pojo.bo.welcome.WelcomeDetailBO
;
import
com.gic.haoban.manage.service.pojo.bo.welcome.WelcomeMediaBO
;
import
com.gic.haoban.manage.service.pojo.bo.welcome.WelcomeMediaBO
;
import
com.gic.haoban.manage.service.pojo.bo.welcome.WelcomeReferBO
;
import
com.gic.haoban.manage.service.pojo.bo.welcome.WelcomeReferBO
;
import
com.gic.haoban.manage.service.service.*
;
import
com.gic.haoban.manage.service.service.*
;
import
com.gic.haoban.manage.service.service.hm.HmLinkService
;
import
com.gic.haoban.manage.service.service.hm.WxUserAddLogService
;
import
com.gic.haoban.manage.service.service.hm.WxUserAddLogService
;
import
com.gic.haoban.manage.service.util.CommonUtil
;
import
com.gic.haoban.manage.service.util.CommonUtil
;
import
com.gic.haoban.manage.service.util.EmojiFilterUtil
;
import
com.gic.haoban.manage.service.util.EmojiFilterUtil
;
...
@@ -164,6 +166,8 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
...
@@ -164,6 +166,8 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
private
KeyDataService
keyDataService
;
private
KeyDataService
keyDataService
;
@Autowired
@Autowired
private
MemberTagOpenApiService
memberTagOpenApiService
;
private
MemberTagOpenApiService
memberTagOpenApiService
;
@Autowired
private
HmLinkService
hmLinkService
;
@Override
@Override
public
void
dealQywxExternalUser
(
String
params
)
{
public
void
dealQywxExternalUser
(
String
params
)
{
...
@@ -315,7 +319,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
...
@@ -315,7 +319,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
String
externalUserId
=
dto
.
getExternalUserid
();
String
externalUserId
=
dto
.
getExternalUserid
();
String
unionid
=
dto
.
getUnionid
();
String
unionid
=
dto
.
getUnionid
();
String
state
=
dto
.
getState
();
String
state
=
dto
.
getState
();
boolean
isHmUnionid
=
false
;
boolean
isHmUnionid
=
false
;
log
.
info
(
"新增外部联系人,wxEnterpriseId:{}"
,
wxEnterpriseId
);
log
.
info
(
"新增外部联系人,wxEnterpriseId:{}"
,
wxEnterpriseId
);
if
(
StringUtils
.
isAnyBlank
(
wxUserId
,
wxEnterpriseId
,
name
,
createTime
,
externalUserId
))
{
if
(
StringUtils
.
isAnyBlank
(
wxUserId
,
wxEnterpriseId
,
name
,
createTime
,
externalUserId
))
{
log
.
error
(
"新增外部联系人,缺少必须字段:wxUserId:{},wxEnterpriseId:{},name:{},createTime:{},externalUserId:{}"
,
wxUserId
,
wxEnterpriseId
,
name
,
createTime
,
externalUserId
);
log
.
error
(
"新增外部联系人,缺少必须字段:wxUserId:{},wxEnterpriseId:{},name:{},createTime:{},externalUserId:{}"
,
wxUserId
,
wxEnterpriseId
,
name
,
createTime
,
externalUserId
);
...
@@ -333,24 +337,25 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
...
@@ -333,24 +337,25 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
return
;
return
;
}
}
String
staffId
=
staff
.
getStaffId
();
String
staffId
=
staff
.
getStaffId
();
String
staffName
=
staff
.
getStaffName
()
;
String
staffName
=
staff
.
getStaffName
();
String
staffWxUserId
=
staff
.
getWxUserId
();
String
staffWxUserId
=
staff
.
getWxUserId
();
log
.
info
(
"新增外部联系人,staff.getWxUserId():{}"
,
staffWxUserId
);
log
.
info
(
"新增外部联系人,staff.getWxUserId():{}"
,
staffWxUserId
);
dto
.
setWxUserId
(
staffWxUserId
);
dto
.
setWxUserId
(
staffWxUserId
);
StaffClerkRelationDTO
staffClerkRelationDTO
=
null
;
StaffClerkRelationDTO
staffClerkRelationDTO
=
null
;
//活码处理 "DT" "HM"
//活码处理 "DT" "HM"
WxUserAddLogQDTO
wxUserAddLogQDTO
=
new
WxUserAddLogQDTO
();
WxUserAddLogQDTO
wxUserAddLogQDTO
=
new
WxUserAddLogQDTO
();
HmQrcodeDTO
hmQrcodeDTO
=
null
;
String
memberLabelId
=
""
;
if
(
StringUtils
.
isNotBlank
(
state
))
{
if
(
StringUtils
.
isNotBlank
(
state
))
{
String
id
=
state
.
substring
(
2
);
String
id
=
state
.
substring
(
2
);
if
(
state
.
contains
(
Manage3Constants
.
HM
))
{
if
(
state
.
contains
(
Manage3Constants
.
HM
))
{
Long
hmId
=
Convert
.
toLong
(
id
);
Long
hmId
=
Convert
.
toLong
(
id
);
log
.
info
(
"普通活码={}"
,
hmId
);
log
.
info
(
"普通活码={}"
,
hmId
);
hmQrcodeDTO
=
hmQrcodeApiService
.
getSimpleById
(
hmId
);
HmQrcodeDTO
hmQrcodeDTO
=
hmQrcodeApiService
.
getSimpleById
(
hmId
);
if
(
hmQrcodeDTO
==
null
)
{
if
(
hmQrcodeDTO
==
null
)
{
log
.
error
(
"活码为空:{}"
,
hmId
);
log
.
error
(
"活码为空:{}"
,
hmId
);
return
;
return
;
}
}
memberLabelId
=
hmQrcodeDTO
.
getMemberLabelId
();
wxUserAddLogQDTO
.
setHmId
(
hmId
);
wxUserAddLogQDTO
.
setHmId
(
hmId
);
hmQrcodeApiService
.
updateAddNumById
(
hmId
,
hmQrcodeDTO
.
getClerkId
());
hmQrcodeApiService
.
updateAddNumById
(
hmId
,
hmQrcodeDTO
.
getClerkId
());
//处理活码导购
//处理活码导购
...
@@ -362,15 +367,15 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
...
@@ -362,15 +367,15 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
TabHaobanClerkMainStoreRelated
mainStoreRelated
=
clerkMainStoreRelatedService
.
getMainStoreByStaffId
(
staffId
,
wxEnterpriseId
);
TabHaobanClerkMainStoreRelated
mainStoreRelated
=
clerkMainStoreRelatedService
.
getMainStoreByStaffId
(
staffId
,
wxEnterpriseId
);
if
(
mainStoreRelated
!=
null
)
{
if
(
mainStoreRelated
!=
null
)
{
StaffClerkRelationDTO
relationDTO
=
staffClerkRelationService
.
getOneBindByStoreId
(
staffId
,
mainStoreRelated
.
getStoreId
());
StaffClerkRelationDTO
relationDTO
=
staffClerkRelationService
.
getOneBindByStoreId
(
staffId
,
mainStoreRelated
.
getStoreId
());
hmClerkRelationDTO
=
hmQrcodeApiService
.
getHmClerkByHmIdAndClerkId
(
hmId
,
relationDTO
.
getClerkId
());
hmClerkRelationDTO
=
hmQrcodeApiService
.
getHmClerkByHmIdAndClerkId
(
hmId
,
relationDTO
.
getClerkId
());
if
(
hmClerkRelationDTO
==
null
)
{
if
(
hmClerkRelationDTO
==
null
)
{
hmClerkRelationDTO
=
hmQrcodeApiService
.
getOneHmClerkByHmIdAndStaffId
(
hmId
,
staffId
);
hmClerkRelationDTO
=
hmQrcodeApiService
.
getOneHmClerkByHmIdAndStaffId
(
hmId
,
staffId
);
if
(
hmClerkRelationDTO
==
null
)
{
if
(
hmClerkRelationDTO
==
null
)
{
hmClerkRelationDTO
=
hmQrcodeApiService
.
getOneHmClerkByHmId
(
hmId
);
hmClerkRelationDTO
=
hmQrcodeApiService
.
getOneHmClerkByHmId
(
hmId
);
}
}
}
}
}
else
{
}
else
{
hmClerkRelationDTO
=
hmQrcodeApiService
.
getOneHmClerkByHmId
(
hmId
);
hmClerkRelationDTO
=
hmQrcodeApiService
.
getOneHmClerkByHmId
(
hmId
);
}
}
staffClerkRelationDTO
=
staffClerkRelationService
.
getBindByClerkId
(
hmClerkRelationDTO
.
getClerkId
(),
wxEnterpriseId
);
staffClerkRelationDTO
=
staffClerkRelationService
.
getBindByClerkId
(
hmClerkRelationDTO
.
getClerkId
(),
wxEnterpriseId
);
}
}
...
@@ -379,16 +384,20 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
...
@@ -379,16 +384,20 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
Long
linkId
=
dataForHmLink
.
getLinkId
();
Long
linkId
=
dataForHmLink
.
getLinkId
();
Long
hmId
=
dataForHmLink
.
getHmId
();
Long
hmId
=
dataForHmLink
.
getHmId
();
unionid
=
dataForHmLink
.
getUnionid
();
unionid
=
dataForHmLink
.
getUnionid
();
log
.
info
(
"动态活码hmId={},linkId={},unionid={}"
,
hmId
,
linkId
,
unionid
);
log
.
info
(
"动态活码hmId={},linkId={},unionid={}"
,
hmId
,
linkId
,
unionid
);
isHmUnionid
=
true
;
isHmUnionid
=
true
;
wxUserAddLogQDTO
.
setLinkId
(
linkId
);
wxUserAddLogQDTO
.
setLinkId
(
linkId
);
wxUserAddLogQDTO
.
setHmId
(
hmId
);
wxUserAddLogQDTO
.
setHmId
(
hmId
);
hmQrcodeDTO
=
hmQrcodeApiService
.
getSimpleById
(
hmId
);
HmQrcodeDTO
hmQrcodeDTO
=
hmQrcodeApiService
.
getSimpleById
(
hmId
);
if
(
hmQrcodeDTO
==
null
)
{
if
(
hmQrcodeDTO
==
null
)
{
log
.
error
(
"活码动态为空
:
{}"
,
hmId
);
log
.
error
(
"活码动态为空
,hmId:
{}"
,
hmId
);
return
;
return
;
}
}
staffClerkRelationDTO
=
staffClerkRelationService
.
getBindByClerkId
(
hmQrcodeDTO
.
getClerkId
(),
wxEnterpriseId
);
staffClerkRelationDTO
=
staffClerkRelationService
.
getBindByClerkId
(
hmQrcodeDTO
.
getClerkId
(),
wxEnterpriseId
);
HmLinkBO
hmLinkBO
=
hmLinkService
.
getByLinkId
(
wxEnterpriseId
,
null
,
linkId
);
if
(
hmLinkBO
!=
null
)
{
memberLabelId
=
hmLinkBO
.
getMemberLabelId
();
}
}
}
}
else
{
}
else
{
TabHaobanClerkMainStoreRelated
mainStoreRelated
=
clerkMainStoreRelatedService
.
getMainStoreByStaffId
(
staffId
,
wxEnterpriseId
);
TabHaobanClerkMainStoreRelated
mainStoreRelated
=
clerkMainStoreRelatedService
.
getMainStoreByStaffId
(
staffId
,
wxEnterpriseId
);
...
@@ -411,18 +420,19 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
...
@@ -411,18 +420,19 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
return
;
return
;
}
}
String
memberId
=
""
;
String
memberId
=
null
;
if
(
StringUtils
.
isNotBlank
(
unionid
))
{
if
(
StringUtils
.
isNotBlank
(
unionid
))
{
log
.
info
(
"有unionid处理:wxEnterpriseId:{},unionid:{}"
,
wxEnterpriseId
,
unionid
);
log
.
info
(
"有unionid处理:wxEnterpriseId:{},unionid:{}"
,
wxEnterpriseId
,
unionid
);
dto
.
setUnionid
(
unionid
);
dto
.
setUnionid
(
unionid
);
memberId
=
addExternalClerkRelated
(
dto
,
staffId
,
staffClerkRelationDTO
,
wxEnterpriseRelated
,
isHmUnionid
);
memberId
=
addExternalClerkRelated
(
dto
,
staffId
,
staffClerkRelationDTO
,
wxEnterpriseRelated
,
isHmUnionid
);
}
else
{
}
else
{
log
.
info
(
"发送欢迎语逻辑:wxEnterpriseId:{}"
,
wxEnterpriseId
);
log
.
info
(
"发送欢迎语逻辑:wxEnterpriseId:{}"
,
wxEnterpriseId
);
addFriendByWelcome
(
dto
,
staffClerkRelationDTO
);
addFriendByWelcome
(
dto
,
staffClerkRelationDTO
);
}
}
if
(
StringUtils
.
isNotBlank
(
memberId
)
&&
hmQrcodeDTO
!=
null
)
{
if
(
StringUtils
.
isNoneBlank
(
memberId
,
memberLabelId
))
{
setMemberTag
(
staffClerkRelationDTO
,
hmQrcodeDTO
,
memberId
);
//设置会员标签
setMemberTag
(
staffClerkRelationDTO
,
memberLabelId
,
memberId
);
}
}
log
.
info
(
"插入加好友日志"
);
log
.
info
(
"插入加好友日志"
);
...
@@ -440,12 +450,13 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
...
@@ -440,12 +450,13 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
/**
/**
* 设置活码标签
* 设置活码标签
*
* @param staffClerkRelationDTO
* @param staffClerkRelationDTO
* @param
hmQrcodeDTO
* @param
memberLabelId
* @param memberId
* @param memberId
*/
*/
private
void
setMemberTag
(
StaffClerkRelationDTO
staffClerkRelationDTO
,
HmQrcodeDTO
hmQrcodeDTO
,
String
memberId
)
{
private
void
setMemberTag
(
StaffClerkRelationDTO
staffClerkRelationDTO
,
String
memberLabelId
,
String
memberId
)
{
String
memberLabelId
=
hmQrcodeDTO
.
getMemberLabelId
(
);
log
.
info
(
"会员打标签,memberLabelId:{},memberId:{}"
,
memberLabelId
,
memberId
);
if
(
StringUtils
.
isNotBlank
(
memberLabelId
))
{
if
(
StringUtils
.
isNotBlank
(
memberLabelId
))
{
MemberTagSingleDTO
tagSingleDTO
=
new
MemberTagSingleDTO
();
MemberTagSingleDTO
tagSingleDTO
=
new
MemberTagSingleDTO
();
tagSingleDTO
.
setEnterpriseId
(
staffClerkRelationDTO
.
getEnterpriseId
());
tagSingleDTO
.
setEnterpriseId
(
staffClerkRelationDTO
.
getEnterpriseId
());
...
@@ -464,7 +475,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
...
@@ -464,7 +475,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
* @param staffClerkRelationDTO
* @param staffClerkRelationDTO
* @param wxEnterpriseRelated
* @param wxEnterpriseRelated
*/
*/
private
String
addExternalClerkRelated
(
MemberUnionidRelatedDTO
dto
,
String
staffId
,
StaffClerkRelationDTO
staffClerkRelationDTO
,
TabHaobanWxEnterpriseRelated
wxEnterpriseRelated
,
boolean
isHmUnionid
)
{
private
String
addExternalClerkRelated
(
MemberUnionidRelatedDTO
dto
,
String
staffId
,
StaffClerkRelationDTO
staffClerkRelationDTO
,
TabHaobanWxEnterpriseRelated
wxEnterpriseRelated
,
boolean
isHmUnionid
)
{
String
wxUserId
=
dto
.
getWxUserId
();
String
wxUserId
=
dto
.
getWxUserId
();
String
wxEnterpriseId
=
dto
.
getWxEnterpriseId
();
String
wxEnterpriseId
=
dto
.
getWxEnterpriseId
();
String
name
=
dto
.
getExternalName
();
String
name
=
dto
.
getExternalName
();
...
@@ -648,9 +659,9 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
...
@@ -648,9 +659,9 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
WelcomeReferBO
welcomeReferBo
=
getWelcomeReferBo
(
state
);
WelcomeReferBO
welcomeReferBo
=
getWelcomeReferBo
(
state
);
welcomeDetailBO
=
welcomeService
.
getMatchWelcomeWithReferId
(
staffId
,
wxEnterpriseId
,
welcomeReferBo
);
welcomeDetailBO
=
welcomeService
.
getMatchWelcomeWithReferId
(
staffId
,
wxEnterpriseId
,
welcomeReferBo
);
//结束临时会话模式
//结束临时会话模式
log
.
info
(
"结束临时会话模式:userid:{},externalUserid:{}"
,
dto
.
getWxUserId
(),
dto
.
getExternalUserid
());
log
.
info
(
"结束临时会话模式:userid:{},externalUserid:{}"
,
dto
.
getWxUserId
(),
dto
.
getExternalUserid
());
QywxResponseDTO
qywxResponseDTO
=
qywxUserApiService
.
closeTempChat
(
corpid
,
config
.
getWxSuiteid
(),
dto
.
getWxUserId
(),
dto
.
getExternalUserid
());
QywxResponseDTO
qywxResponseDTO
=
qywxUserApiService
.
closeTempChat
(
corpid
,
config
.
getWxSuiteid
(),
dto
.
getWxUserId
(),
dto
.
getExternalUserid
());
log
.
info
(
"结束临时会话返回结果:{}"
,
JSON
.
toJSONString
(
qywxResponseDTO
));
log
.
info
(
"结束临时会话返回结果:{}"
,
JSON
.
toJSONString
(
qywxResponseDTO
));
}
else
{
}
else
{
welcomeDetailBO
=
welcomeService
.
getMatchWelcome
(
staffId
,
wxEnterpriseId
);
welcomeDetailBO
=
welcomeService
.
getMatchWelcome
(
staffId
,
wxEnterpriseId
);
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffApiServiceImpl.java
View file @
9d346334
...
@@ -323,7 +323,9 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -323,7 +323,9 @@ public class StaffApiServiceImpl implements StaffApiService {
if
(
staffThirdWxEnterpriseId
.
contains
(
corpid
))
{
if
(
staffThirdWxEnterpriseId
.
contains
(
corpid
))
{
user
=
qywxUserApiService
.
getWorkWxUser
(
corpid
,
config
.
getWxSuiteid
(),
userId
);
user
=
qywxUserApiService
.
getWorkWxUser
(
corpid
,
config
.
getWxSuiteid
(),
userId
);
UserDTO
userSelf
=
qywxUserApiService
.
getSelfWorkWxUser
(
corpid
,
secretSetting
.
getSecretVal
(),
user
.
getOpen_userid
());
UserDTO
userSelf
=
qywxUserApiService
.
getSelfWorkWxUser
(
corpid
,
secretSetting
.
getSecretVal
(),
user
.
getOpen_userid
());
user
.
setName
(
userSelf
.
getName
());
if
(
user
!=
null
&&
userSelf
!=
null
)
{
user
.
setName
(
userSelf
.
getName
());
}
}
else
{
}
else
{
user
=
qywxUserApiService
.
getSelfWorkWxUser
(
corpid
,
secretSetting
.
getSecretVal
(),
userId
);
user
=
qywxUserApiService
.
getSelfWorkWxUser
(
corpid
,
secretSetting
.
getSecretVal
(),
userId
);
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffClerkRelationApiServiceImpl.java
View file @
9d346334
...
@@ -399,7 +399,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
...
@@ -399,7 +399,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
//删除主门店
//删除主门店
clerkMainStoreRelatedService
.
delMainStore
(
staffId
,
staffClerkRelation
.
getStoreId
(),
wxEnterpriseId
);
clerkMainStoreRelatedService
.
delMainStore
(
staffId
,
staffClerkRelation
.
getStoreId
(),
wxEnterpriseId
);
//废弃活码
//废弃活码
hmQrcodeApiService
.
delByClerkId
(
clerkId
,
staffClerkRelation
.
getEnterpriseId
());
hmQrcodeApiService
.
delByClerkId
(
clerkId
,
staffClerkRelation
.
getEnterpriseId
()
,
wxEnterpriseId
);
}
}
@Override
@Override
...
@@ -485,7 +485,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
...
@@ -485,7 +485,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
ClerkSyncQDTO
clerkSyncQDTO
=
JSON
.
parseObject
(
param
,
ClerkSyncQDTO
.
class
);
ClerkSyncQDTO
clerkSyncQDTO
=
JSON
.
parseObject
(
param
,
ClerkSyncQDTO
.
class
);
Integer
type
=
clerkSyncQDTO
.
getType
();
Integer
type
=
clerkSyncQDTO
.
getType
();
String
clerkId
=
clerkSyncQDTO
.
getClerkId
();
String
clerkId
=
clerkSyncQDTO
.
getClerkId
();
ClerkDTO
clerkDTO
=
clerkService
.
getClerkByClerkId
(
clerkId
);
ClerkDTO
clerkDTO
=
clerkService
.
getClerkByClerkId
(
clerkId
,-
1
);
if
(
clerkDTO
==
null
)
{
if
(
clerkDTO
==
null
)
{
logger
.
error
(
"导购为空"
);
logger
.
error
(
"导购为空"
);
return
;
return
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/hm/HmGroupApiServiceImpl.java
View file @
9d346334
...
@@ -105,7 +105,6 @@ public class HmGroupApiServiceImpl implements HmGroupApiService {
...
@@ -105,7 +105,6 @@ public class HmGroupApiServiceImpl implements HmGroupApiService {
HmGroupInfoQO
groupInfoQo
=
new
HmGroupInfoQO
();
HmGroupInfoQO
groupInfoQo
=
new
HmGroupInfoQO
();
BeanUtils
.
copyProperties
(
groupQueryDTO
,
groupInfoQo
);
BeanUtils
.
copyProperties
(
groupQueryDTO
,
groupInfoQo
);
groupInfoQo
.
setWxEnterpriseId
(
null
);
groupInfoQo
.
setStatus
(
HmGroupStatus
.
ENABLE
.
getCode
());
groupInfoQo
.
setStatus
(
HmGroupStatus
.
ENABLE
.
getCode
());
Page
<
HmGroupSettingBO
>
groupSettingPage
=
groupService
.
queryGroupSettingList
(
groupInfoQo
);
Page
<
HmGroupSettingBO
>
groupSettingPage
=
groupService
.
queryGroupSettingList
(
groupInfoQo
);
...
@@ -123,16 +122,25 @@ public class HmGroupApiServiceImpl implements HmGroupApiService {
...
@@ -123,16 +122,25 @@ public class HmGroupApiServiceImpl implements HmGroupApiService {
log
.
info
(
"导购拥有的门店权限 clerkId:{}, storeIds:{}"
,
groupQueryDTO
.
getClerkId
(),
JSON
.
toJSONString
(
storeList
));
log
.
info
(
"导购拥有的门店权限 clerkId:{}, storeIds:{}"
,
groupQueryDTO
.
getClerkId
(),
JSON
.
toJSONString
(
storeList
));
if
(!
CollectionUtils
.
isEmpty
(
storeList
))
{
if
(!
CollectionUtils
.
isEmpty
(
storeList
))
{
List
<
String
>
hmIds
=
null
;
List
<
String
>
hmIds
=
null
;
boolean
isStatic
=
Boolean
.
TRUE
;
if
(!
storeList
.
contains
(
"-1"
))
{
if
(!
storeList
.
contains
(
"-1"
))
{
HmQrcodeListQDTO
hmQrcodeListQDTO
=
new
HmQrcodeListQDTO
();
// 非超关权限
hmQrcodeListQDTO
.
setEnterpriseId
(
groupQueryDTO
.
getEnterpriseId
());
HmQrcodeListQDTO
hmQrcodeListQdto
=
new
HmQrcodeListQDTO
();
hmQrcodeListQDTO
.
setStoreId
(
storeList
);
hmQrcodeListQdto
.
setEnterpriseId
(
groupQueryDTO
.
getEnterpriseId
());
hmIds
=
qrcodeService
.
listHmIdForIndex
(
hmQrcodeListQDTO
);
hmQrcodeListQdto
.
setStoreId
(
storeList
);
hmQrcodeListQdto
.
setWxEnterpriseId
(
groupQueryDTO
.
getWxEnterpriseId
());
hmIds
=
qrcodeService
.
listHmIdForIndex
(
hmQrcodeListQdto
);
log
.
info
(
"HMid列表={}"
,
JSON
.
toJSONString
(
hmIds
));
if
(
CollectionUtils
.
isEmpty
(
hmIds
)){
isStatic
=
false
;
}
}
}
List
<
HmQrcodeGroupNumBO
>
qrcodeGroupNumBoList
=
qrcodeService
.
getGroupIdNumByEnterpriseId
(
groupQueryDTO
.
getEnterpriseId
(),
groupIds
,
hmIds
);
if
(
isStatic
)
{
if
(
CollectionUtils
.
isNotEmpty
(
qrcodeGroupNumBoList
))
{
List
<
HmQrcodeGroupNumBO
>
qrcodeGroupNumBoList
=
qrcodeService
.
getGroupIdNumByEnterpriseId
(
groupQueryDTO
.
getWxEnterpriseId
(),
groupQueryDTO
.
getEnterpriseId
(),
groupIds
,
hmIds
);
qrcodeGroupNumMap
=
qrcodeGroupNumBoList
.
stream
()
if
(
CollectionUtils
.
isNotEmpty
(
qrcodeGroupNumBoList
))
{
.
collect
(
Collectors
.
toMap
(
HmQrcodeGroupNumBO:
:
getHmGroupId
,
HmQrcodeGroupNumBO:
:
getNum
,
(
v1
,
v2
)
->
v1
));
qrcodeGroupNumMap
=
qrcodeGroupNumBoList
.
stream
()
.
collect
(
Collectors
.
toMap
(
HmQrcodeGroupNumBO:
:
getHmGroupId
,
HmQrcodeGroupNumBO:
:
getNum
,
(
v1
,
v2
)
->
v1
));
}
}
}
}
}
for
(
HmGroupDTO
groupDTO
:
result
)
{
for
(
HmGroupDTO
groupDTO
:
result
)
{
...
@@ -193,11 +201,15 @@ public class HmGroupApiServiceImpl implements HmGroupApiService {
...
@@ -193,11 +201,15 @@ public class HmGroupApiServiceImpl implements HmGroupApiService {
HmQrcodeListQDTO
hmQrcodeListQDTO
=
new
HmQrcodeListQDTO
();
HmQrcodeListQDTO
hmQrcodeListQDTO
=
new
HmQrcodeListQDTO
();
hmQrcodeListQDTO
.
setEnterpriseId
(
enterpriseId
);
hmQrcodeListQDTO
.
setEnterpriseId
(
enterpriseId
);
hmQrcodeListQDTO
.
setStoreId
(
storeList
);
hmQrcodeListQDTO
.
setStoreId
(
storeList
);
hmQrcodeListQDTO
.
setWxEnterpriseId
(
wxEnterpriseId
);
hmIds
=
qrcodeService
.
listHmIdForIndex
(
hmQrcodeListQDTO
);
hmIds
=
qrcodeService
.
listHmIdForIndex
(
hmQrcodeListQDTO
);
log
.
info
(
"导购拥有的活码权限列表:{}"
,
JSON
.
toJSONString
(
hmIds
));
log
.
info
(
"导购拥有的活码权限列表:{}"
,
JSON
.
toJSONString
(
hmIds
));
if
(
CollectionUtils
.
isEmpty
(
hmIds
)){
return
ServiceResponse
.
success
(
0
);
}
}
}
}
}
int
totalReferCount
=
qrcodeService
.
getTotalByEnterpriseId
(
enterpriseId
,
hmIds
);
int
totalReferCount
=
qrcodeService
.
getTotalByEnterpriseId
(
wxEnterpriseId
,
enterpriseId
,
hmIds
);
return
ServiceResponse
.
success
(
totalReferCount
);
return
ServiceResponse
.
success
(
totalReferCount
);
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/hm/HmLinkApiServiceImpl.java
View file @
9d346334
...
@@ -2,6 +2,7 @@ package com.gic.haoban.manage.service.service.out.impl.hm;
...
@@ -2,6 +2,7 @@ package com.gic.haoban.manage.service.service.out.impl.hm;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Random
;
import
java.util.Random
;
...
@@ -95,9 +96,9 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
...
@@ -95,9 +96,9 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
@Autowired
@Autowired
private
MemberClerkApiService
memberClerkApiService
;
private
MemberClerkApiService
memberClerkApiService
;
@Autowired
@Autowired
private
HmPageService
hmPageService
;
private
HmPageService
hmPageService
;
@Autowired
@Autowired
private
StoreService
storeService
;
private
StoreService
storeService
;
@Override
@Override
public
ServiceResponse
<
String
>
getHmLinkUrl
()
{
public
ServiceResponse
<
String
>
getHmLinkUrl
()
{
...
@@ -157,8 +158,9 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
...
@@ -157,8 +158,9 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
HmQrcodeBO
hm
=
null
;
HmQrcodeBO
hm
=
null
;
HmLinkWxaDTO
retDTO
=
new
HmLinkWxaDTO
();
HmLinkWxaDTO
retDTO
=
new
HmLinkWxaDTO
();
log
.
info
(
"小程序获取活码={},linkShortCode={},mixPhone={},memberId={},unionid={},门店={}{}"
,
enterpriseId
,
linkShortCode
,
log
.
info
(
"小程序获取活码={},linkShortCode={},mixPhone={},memberId={},unionid={},门店={}{}"
,
enterpriseId
,
linkShortCode
,
mixPhone
,
memberId
,
unionid
,
inStoreId
,
whitchStore
);
mixPhone
,
memberId
,
unionid
,
inStoreId
,
whitchStore
);
HmLinkBO
link
=
this
.
hmLinkService
.
getByLinkShortCodeCache
(
linkShortCode
);
HmLinkBO
link
=
this
.
hmLinkService
.
getByLinkShortCodeCache
(
linkShortCode
);
Map
<
String
,
String
>
remarkMap
=
new
HashMap
<>();
if
(
null
==
link
)
{
if
(
null
==
link
)
{
log
.
error
(
"链接记录不存,linkShortCode={}"
,
linkShortCode
);
log
.
error
(
"链接记录不存,linkShortCode={}"
,
linkShortCode
);
return
ServiceResponse
.
failure
(
HaoBanErrCode
.
ERR_OTHER
.
getCode
(),
"链接记录不存"
);
return
ServiceResponse
.
failure
(
HaoBanErrCode
.
ERR_OTHER
.
getCode
(),
"链接记录不存"
);
...
@@ -187,9 +189,13 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
...
@@ -187,9 +189,13 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
// 直接返回门店的导购活码,如果没有返回错误
// 直接返回门店的导购活码,如果没有返回错误
if
(
null
==
hm
&&
StringUtils
.
isNotBlank
(
inStoreId
))
{
if
(
null
==
hm
&&
StringUtils
.
isNotBlank
(
inStoreId
))
{
String
customRuleJson
=
link
.
getCustomRuleJson
();
String
customRuleJson
=
link
.
getCustomRuleJson
();
log
.
info
(
"
自定义规则={}"
,
customRuleJson
);
log
.
info
(
"
选门店后,whitchStore={},自定义规则={}"
,
whitchStore
,
customRuleJson
);
JSONObject
storeRuleObj
=
JSONObject
.
parseObject
(
customRuleJson
);
JSONObject
storeRuleObj
=
JSONObject
.
parseObject
(
customRuleJson
);
int
openFlag
=
storeRuleObj
.
getIntValue
(
"open"
);
int
openFlag
=
storeRuleObj
.
getIntValue
(
"open"
);
// whitchStore 1推荐门店 2附件门店 3省市区门店
if
(
null
==
whitchStore
)
{
whitchStore
=
1
;
}
if
(
openFlag
==
1
)
{
if
(
openFlag
==
1
)
{
int
dz
=
0
,
dy
=
0
;
int
dz
=
0
,
dy
=
0
;
// 1推荐门店 2附件门店 3省市区门店
// 1推荐门店 2附件门店 3省市区门店
...
@@ -199,8 +205,7 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
...
@@ -199,8 +205,7 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
HmLinkStoreSettingDTO
cityStore
=
storeRuleObj
.
getObject
(
"city_store"
,
HmLinkStoreSettingDTO
.
class
);
HmLinkStoreSettingDTO
cityStore
=
storeRuleObj
.
getObject
(
"city_store"
,
HmLinkStoreSettingDTO
.
class
);
dz
=
cityStore
.
getDz
();
dz
=
cityStore
.
getDz
();
dy
=
cityStore
.
getDy
();
dy
=
cityStore
.
getDy
();
}
}
else
if
(
whitchStore
==
1
||
whitchStore
==
2
)
{
if
(
whitchStore
==
1
||
whitchStore
==
2
)
{
HmLinkStoreSettingDTO
store
=
storeRuleObj
.
getObject
(
"store"
,
HmLinkStoreSettingDTO
.
class
);
HmLinkStoreSettingDTO
store
=
storeRuleObj
.
getObject
(
"store"
,
HmLinkStoreSettingDTO
.
class
);
if
(
whitchStore
==
2
||
(
storeType
==
1
&&
whitchStore
==
1
))
{
if
(
whitchStore
==
2
||
(
storeType
==
1
&&
whitchStore
==
1
))
{
// 附近门店 或者 推荐门店
// 附近门店 或者 推荐门店
...
@@ -212,12 +217,12 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
...
@@ -212,12 +217,12 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
dy
=
store
.
getNdy
();
dy
=
store
.
getNdy
();
}
}
}
}
hm
=
this
.
getHmFormStore
(
wxEnterpriseId
,
inStoreId
,
dz
,
dy
);
hm
=
this
.
getHmFormStore
(
wxEnterpriseId
,
inStoreId
,
dz
,
dy
,
new
ArrayList
<>()
);
log
.
info
(
"获取到的门店配置dz={},dy={},获取的活码={}"
,
dz
,
dy
,
JSON
.
toJSONString
(
hm
));
log
.
info
(
"获取到的门店配置dz={},dy={},获取的活码={}"
,
dz
,
dy
,
JSON
.
toJSONString
(
hm
));
if
(
null
==
hm
)
{
if
(
null
==
hm
)
{
return
ServiceResponse
.
failure
(
HaoBanErrCode
.
ERR_OTHER
.
getCode
(),
"导购活码不存在"
);
return
ServiceResponse
.
failure
(
HaoBanErrCode
.
ERR_OTHER
.
getCode
(),
"导购活码不存在"
);
}
}
re
tDTO
.
setSm
(
"会员选门店活码"
);
re
markMap
.
put
(
"sm"
,
"会员选门店活码"
);
}
}
}
}
// 会员门店
// 会员门店
...
@@ -251,26 +256,33 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
...
@@ -251,26 +256,33 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
String
mainStoreId
=
member
.
getMainStoreId
();
String
mainStoreId
=
member
.
getMainStoreId
();
// 服务门店
// 服务门店
if
(
null
!=
fwStore
)
{
if
(
null
!=
fwStore
)
{
log
.
info
(
"处理服务门店逻辑"
);
List
<
String
>
clerkIdList
=
new
ArrayList
<>()
;
if
(
fwStore
.
getZs
()
==
1
&&
StringUtils
.
isNotBlank
(
mainClerkId
))
{
if
(
fwStore
.
getZs
()
==
1
&&
StringUtils
.
isNotBlank
(
mainClerkId
))
{
hm
=
this
.
getHmFromClerk
(
mainClerkId
,
wxEnterpriseId
);
hm
=
this
.
getHmFromClerk
(
mainClerkId
,
wxEnterpriseId
);
clerkIdList
.
add
(
mainClerkId
);
}
}
if
(
null
==
hm
&&
StringUtils
.
isNotBlank
(
mainStoreId
))
{
if
(
null
==
hm
&&
StringUtils
.
isNotBlank
(
mainStoreId
))
{
hm
=
this
.
getHmFormStore
(
wxEnterpriseId
,
mainStoreId
,
fwStore
.
getDz
(),
fwStore
.
getDy
());
hm
=
this
.
getHmFormStore
(
wxEnterpriseId
,
mainStoreId
,
fwStore
.
getDz
(),
fwStore
.
getDy
(),
clerkIdList
);
}
}
if
(
null
!=
hm
)
{
if
(
null
!=
hm
)
{
re
tDTO
.
setSm
(
"会员主门店活码"
);
re
markMap
.
put
(
"sm"
,
"会员主门店活码"
);
}
}
}
}
// 协管门店
// 协管门店
List
<
MemberStoreClerkDataDTO
>
list
=
member
.
getStoreClerkRel
();
List
<
MemberStoreClerkDataDTO
>
list
=
member
.
getStoreClerkRel
();
if
(
null
==
hm
&&
null
!=
xgStore
&&
CollectionUtils
.
isNotEmpty
(
list
))
{
if
(
null
==
hm
&&
null
!=
xgStore
&&
CollectionUtils
.
isNotEmpty
(
list
))
{
log
.
info
(
"处理协管门店逻辑"
);
// 排序协管导购
// 排序协管导购
list
=
this
.
sortMemberClerk
(
enterpriseId
,
memberId
,
list
);
list
=
this
.
sortMemberClerk
(
enterpriseId
,
memberId
,
list
);
List
<
String
>
storeIdList
=
new
ArrayList
<>();
List
<
String
>
storeIdList
=
new
ArrayList
<>();
// 协管导购
// 协管导购
List
<
String
>
clerkIdList
=
new
ArrayList
<>();
for
(
MemberStoreClerkDataDTO
item
:
list
)
{
for
(
MemberStoreClerkDataDTO
item
:
list
)
{
String
clerkId
=
item
.
getClerkIdRel
();
String
clerkId
=
item
.
getClerkIdRel
();
if
(
clerkId
.
equals
(
mainClerkId
))
{
if
(
mainStoreId
.
equals
(
item
.
getStoreIdRel
()))
{
log
.
info
(
"协管逻辑,主门店直接过滤"
);
continue
;
continue
;
}
}
hm
=
this
.
getHmFromClerk
(
clerkId
,
wxEnterpriseId
);
hm
=
this
.
getHmFromClerk
(
clerkId
,
wxEnterpriseId
);
...
@@ -279,11 +291,12 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
...
@@ -279,11 +291,12 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
break
;
break
;
}
}
storeIdList
.
add
(
item
.
getStoreIdRel
());
storeIdList
.
add
(
item
.
getStoreIdRel
());
clerkIdList
.
add
(
clerkId
);
}
}
// 店长
// 店长
if
(
null
==
hm
&&
xgStore
.
getDz
()
==
1
&&
CollectionUtils
.
isNotEmpty
(
storeIdList
))
{
if
(
null
==
hm
&&
xgStore
.
getDz
()
==
1
&&
CollectionUtils
.
isNotEmpty
(
storeIdList
))
{
for
(
String
storeId
:
storeIdList
)
{
for
(
String
storeId
:
storeIdList
)
{
hm
=
this
.
getHmFormStore
(
wxEnterpriseId
,
storeId
,
1
,
0
);
hm
=
this
.
getHmFormStore
(
wxEnterpriseId
,
storeId
,
1
,
0
,
clerkIdList
);
if
(
null
!=
hm
)
{
if
(
null
!=
hm
)
{
break
;
break
;
}
}
...
@@ -292,14 +305,14 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
...
@@ -292,14 +305,14 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
// 店员
// 店员
if
(
null
==
hm
&&
xgStore
.
getDy
()
==
1
&&
CollectionUtils
.
isNotEmpty
(
storeIdList
))
{
if
(
null
==
hm
&&
xgStore
.
getDy
()
==
1
&&
CollectionUtils
.
isNotEmpty
(
storeIdList
))
{
for
(
String
storeId
:
storeIdList
)
{
for
(
String
storeId
:
storeIdList
)
{
hm
=
this
.
getHmFormStore
(
wxEnterpriseId
,
storeId
,
0
,
1
);
hm
=
this
.
getHmFormStore
(
wxEnterpriseId
,
storeId
,
0
,
1
,
clerkIdList
);
if
(
null
!=
hm
)
{
if
(
null
!=
hm
)
{
break
;
break
;
}
}
}
}
}
}
if
(
null
!=
hm
)
{
if
(
null
!=
hm
)
{
re
tDTO
.
setSm
(
"会员协管活码"
);
re
markMap
.
put
(
"sm"
,
"会员协管活码"
);
}
}
}
}
}
}
...
@@ -316,7 +329,7 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
...
@@ -316,7 +329,7 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
// 活码的门店
// 活码的门店
List
<
HmLinkStoreDTO
>
storeList
=
this
.
hmLinkStoreService
.
listByLinkId
(
wxEnterpriseId
,
enterpriseId
,
List
<
HmLinkStoreDTO
>
storeList
=
this
.
hmLinkStoreService
.
listByLinkId
(
wxEnterpriseId
,
enterpriseId
,
linkId
);
linkId
);
this
.
setStoreAddress
(
enterpriseId
,
storeList
);
this
.
setStoreAddress
(
enterpriseId
,
storeList
);
log
.
info
(
"门店规则={},推荐门店列表={}"
,
storeType
,
JSON
.
toJSONString
(
storeList
));
log
.
info
(
"门店规则={},推荐门店列表={}"
,
storeType
,
JSON
.
toJSONString
(
storeList
));
HmLinkStoreSettingDTO
cityStore
=
storeRuleObj
.
getObject
(
"city_store"
,
HmLinkStoreSettingDTO
.
class
);
HmLinkStoreSettingDTO
cityStore
=
storeRuleObj
.
getObject
(
"city_store"
,
HmLinkStoreSettingDTO
.
class
);
// 是否开启省市区门店查询
// 是否开启省市区门店查询
...
@@ -328,7 +341,9 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
...
@@ -328,7 +341,9 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
}
}
}
}
if
(
null
!=
hm
)
{
if
(
null
!=
hm
)
{
log
.
info
(
"获取到单人活码={}"
,
JSON
.
toJSONString
(
hm
));
log
.
info
(
"获取到单人活码={}"
,
JSON
.
toJSONString
(
hm
));
retDTO
.
setHmId
(
hm
.
getHmId
());
remarkMap
.
put
(
"clerk"
,
hm
.
getClerkId
());
// 判断是否已经是好友
// 判断是否已经是好友
boolean
isFriend
=
false
;
boolean
isFriend
=
false
;
if
(
null
!=
memberId
)
{
if
(
null
!=
memberId
)
{
...
@@ -339,7 +354,7 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
...
@@ -339,7 +354,7 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
isFriend
=
true
;
isFriend
=
true
;
log
.
info
(
"已经是好友,staffid={},memberId={}"
,
staffId
,
memberId
);
log
.
info
(
"已经是好友,staffid={},memberId={}"
,
staffId
,
memberId
);
retDTO
.
setHmQrcode
(
hm
.
getWxQrcode
());
retDTO
.
setHmQrcode
(
hm
.
getWxQrcode
());
re
tDTO
.
setSm
(
"老好友,取单人活码"
);
re
markMap
.
put
(
"sm"
,
"老好友,取单人活码"
);
}
}
}
}
...
@@ -349,43 +364,46 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
...
@@ -349,43 +364,46 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
bo
.
setLinkId
(
linkId
);
bo
.
setLinkId
(
linkId
);
bo
.
setHmId
(
hm
.
getHmId
());
bo
.
setHmId
(
hm
.
getHmId
());
String
dthmKey
=
this
.
keyDataService
.
saveDataForLink
(
enterpriseId
,
bo
);
String
dthmKey
=
this
.
keyDataService
.
saveDataForLink
(
enterpriseId
,
bo
);
remarkMap
.
put
(
"dthmKey"
,
dthmKey
);
if
(
null
!=
dthmKey
)
{
if
(
null
!=
dthmKey
)
{
ServiceResponse
<
String
>
addResp
=
this
.
addQrcode
(
hm
,
dthmKey
,
wxEnterpriseDTO
.
getCorpid
(),
retDTO
);
ServiceResponse
<
String
>
addResp
=
this
.
addQrcode
(
hm
,
dthmKey
,
wxEnterpriseDTO
.
getCorpid
(),
retDTO
);
if
(!
addResp
.
isSuccess
())
{
if
(!
addResp
.
isSuccess
())
{
re
tDTO
.
setSm
(
"创建动态活码失败,取单人活码"
);
re
markMap
.
put
(
"sm"
,
"创建动态活码失败,取单人活码"
);
if
(
StringUtils
.
isBlank
(
hm
.
getWxQrcode
()))
{
if
(
StringUtils
.
isBlank
(
hm
.
getWxQrcode
()))
{
return
ServiceResponse
.
failure
(
HaoBanErrCode
.
ERR_OTHER
.
getCode
(),
"导购活码不存在"
);
return
ServiceResponse
.
failure
(
HaoBanErrCode
.
ERR_OTHER
.
getCode
(),
"导购活码不存在"
);
}
}
retDTO
.
setHmQrcode
(
hm
.
getWxQrcode
());
retDTO
.
setHmQrcode
(
hm
.
getWxQrcode
());
}
else
{
}
else
{
remarkMap
.
put
(
"动态"
,
"是"
);
retDTO
.
setHmQrcode
(
addResp
.
getResult
());
retDTO
.
setHmQrcode
(
addResp
.
getResult
());
}
}
}
}
}
}
}
}
// 生成动态活码
// 生成动态活码
log
.
info
(
JSON
.
toJSONString
(
retDTO
,
true
));
retDTO
.
setRemarkMap
(
remarkMap
);
log
.
info
(
"活码数据返回={}"
,
JSON
.
toJSONString
(
retDTO
));
return
ServiceResponse
.
success
(
retDTO
);
return
ServiceResponse
.
success
(
retDTO
);
}
}
private
void
setStoreAddress
(
String
enterpriseId
,
List
<
HmLinkStoreDTO
>
storeList
)
{
private
void
setStoreAddress
(
String
enterpriseId
,
List
<
HmLinkStoreDTO
>
storeList
)
{
if
(
CollectionUtils
.
isNotEmpty
(
storeList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
storeList
))
{
List
<
String
>
storeIdList
=
storeList
.
stream
().
map
(
dto
->
dto
.
getStoreId
()).
collect
(
Collectors
.
toList
());
List
<
String
>
storeIdList
=
storeList
.
stream
().
map
(
dto
->
dto
.
getStoreId
()).
collect
(
Collectors
.
toList
())
;
String
[]
storeIds
=
new
String
[
storeIdList
.
size
()];
String
[]
storeIds
=
new
String
[
storeIdList
.
size
()]
;
for
(
int
i
=
0
;
i
<
storeIdList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
storeIdList
.
size
();
i
++)
{
storeIds
[
i
]
=
storeIdList
.
get
(
i
);
storeIds
[
i
]
=
storeIdList
.
get
(
i
)
;
}
}
List
<
StoreDTO
>
dtoList
=
this
.
storeService
.
getStores
(
storeIds
)
;
List
<
StoreDTO
>
dtoList
=
this
.
storeService
.
getStores
(
storeIds
);
Map
<
String
,
StoreDTO
>
map
=
dtoList
.
stream
().
collect
(
Collectors
.
toMap
(
StoreDTO:
:
getStoreId
,
dto
->
dto
,(
k1
,
k2
)
->
k1
));
Map
<
String
,
StoreDTO
>
map
=
dtoList
.
stream
()
storeList
.
forEach
(
item
->{
.
collect
(
Collectors
.
toMap
(
StoreDTO:
:
getStoreId
,
dto
->
dto
,
(
k1
,
k2
)
->
k1
));
if
(
null
!=
map
.
get
(
item
.
getStoreId
()))
{
storeList
.
forEach
(
item
->
{
if
(
null
!=
map
.
get
(
item
.
getStoreId
()))
{
item
.
setStoreAddress
(
map
.
get
(
item
.
getStoreId
()).
getStoreAddress
());
item
.
setStoreAddress
(
map
.
get
(
item
.
getStoreId
()).
getStoreAddress
());
}
}
});
});
}
}
}
}
private
List
<
MemberStoreClerkDataDTO
>
sortMemberClerk
(
String
enterpriseId
,
String
memberId
,
private
List
<
MemberStoreClerkDataDTO
>
sortMemberClerk
(
String
enterpriseId
,
String
memberId
,
List
<
MemberStoreClerkDataDTO
>
list
)
{
List
<
MemberStoreClerkDataDTO
>
list
)
{
ServiceResponse
<
List
<
MemberClerkDTO
>>
resp
=
this
.
memberClerkApiService
.
getMemberMainClerkList
(
enterpriseId
,
ServiceResponse
<
List
<
MemberClerkDTO
>>
resp
=
this
.
memberClerkApiService
.
getMemberMainClerkList
(
enterpriseId
,
...
@@ -398,7 +416,7 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
...
@@ -398,7 +416,7 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
List
<
String
>
mainClerkIdList
=
resp
.
getResult
().
stream
().
map
(
dto
->
dto
.
getClerkId
())
List
<
String
>
mainClerkIdList
=
resp
.
getResult
().
stream
().
map
(
dto
->
dto
.
getClerkId
())
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
List
<
MemberStoreClerkDataDTO
>
notMainClerkList
=
new
ArrayList
<>();
List
<
MemberStoreClerkDataDTO
>
notMainClerkList
=
new
ArrayList
<>();
for
(
MemberStoreClerkDataDTO
item
:
retL
ist
)
{
for
(
MemberStoreClerkDataDTO
item
:
l
ist
)
{
if
(
mainClerkIdList
.
contains
(
item
.
getClerkIdRel
()))
{
if
(
mainClerkIdList
.
contains
(
item
.
getClerkIdRel
()))
{
retList
.
add
(
item
);
retList
.
add
(
item
);
}
else
{
}
else
{
...
@@ -462,23 +480,35 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
...
@@ -462,23 +480,35 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
return
hm
;
return
hm
;
}
}
private
HmQrcodeBO
getHmFormStore
(
String
wxEnterpriseId
,
String
inStoreId
,
int
dz
,
int
dy
)
{
private
HmQrcodeBO
getHmFormStore
(
String
wxEnterpriseId
,
String
inStoreId
,
int
dz
,
int
dy
,
List
<
String
>
clerkIdList
)
{
if
(
StringUtils
.
isBlank
(
inStoreId
)
||
"-1"
.
equals
(
inStoreId
))
{
if
(
StringUtils
.
isBlank
(
inStoreId
)
||
"-1"
.
equals
(
inStoreId
))
{
return
null
;
return
null
;
}
}
HmQrcodeBO
hm
=
null
;
HmQrcodeBO
hm
=
null
;
if
(
dz
==
1
)
{
ClerkDTO
dzClerk
=
this
.
clerkService
.
getClerkLeaderByStoreId
(
inStoreId
);
ClerkDTO
dzClerk
=
this
.
clerkService
.
getClerkLeaderByStoreId
(
inStoreId
);
if
(
null
!=
dzClerk
)
{
if
(
null
!=
dzClerk
)
{
clerkIdList
.
add
(
dzClerk
.
getClerkId
());
if
(
dz
==
1
)
{
hm
=
this
.
getHmFromClerk
(
dzClerk
.
getClerkId
(),
wxEnterpriseId
);
hm
=
this
.
getHmFromClerk
(
dzClerk
.
getClerkId
(),
wxEnterpriseId
);
}
else
{
if
(
null
!=
hm
)
{
log
.
info
(
"店长不存在,storeId={}"
,
inStoreId
);
log
.
info
(
"选择门店后,获取到店长活码,clerkId={},inStoreId={}"
,
hm
.
getClerkId
(),
inStoreId
);
}
}
}
}
else
{
log
.
info
(
"店长不存在,storeId={}"
,
inStoreId
);
}
}
// 店员需要过滤主导购、店长
log
.
info
(
"过滤的导购={}"
,
clerkIdList
);
if
(
null
==
hm
&&
dy
==
1
)
{
if
(
null
==
hm
&&
dy
==
1
)
{
List
<
HmQrcodeBO
>
list
=
this
.
hmQrcodeService
.
listByStoreId
(
wxEnterpriseId
,
inStoreId
,
0
);
List
<
HmQrcodeBO
>
list
=
this
.
hmQrcodeService
.
listByStoreId
(
wxEnterpriseId
,
inStoreId
,
0
);
list
=
list
.
stream
().
filter
(
dto
->
!
clerkIdList
.
contains
(
dto
.
getClerkId
())).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
log
.
info
(
"选择门店下{},导购数={}"
,
inStoreId
,
list
.
size
());
hm
=
list
.
get
(
new
Random
().
nextInt
(
list
.
size
()));
hm
=
list
.
get
(
new
Random
().
nextInt
(
list
.
size
()));
if
(
null
!=
hm
)
{
log
.
info
(
"选择门店后,获取到店员活码,clerkId={},inStoreId={}"
,
hm
.
getClerkId
(),
inStoreId
);
}
}
}
}
}
return
hm
;
return
hm
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/hm/HmQrcodeApiServiceImpl.java
View file @
9d346334
...
@@ -130,7 +130,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
...
@@ -130,7 +130,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
hmQrcodeQDTO
.
setHmGroupId
(
0L
);
hmQrcodeQDTO
.
setHmGroupId
(
0L
);
}
}
List
<
String
>
clerkIdList
=
setStoreClerk
(
hmQrcodeQDTO
,
wxEnterpriseId
,
hmId
,
hmType
);
List
<
String
>
clerkIdList
=
setStoreClerk
(
hmQrcodeQDTO
,
wxEnterpriseId
,
hmId
,
hmType
,
true
);
if
(
CollectionUtils
.
isEmpty
(
clerkIdList
))
{
if
(
CollectionUtils
.
isEmpty
(
clerkIdList
))
{
return
ServiceResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCodeCommon
.
ERR_8
.
getCode
()),
"该导购已经生成过活码或未关联过好办"
);
return
ServiceResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCodeCommon
.
ERR_8
.
getCode
()),
"该导购已经生成过活码或未关联过好办"
);
}
}
...
@@ -185,7 +185,11 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
...
@@ -185,7 +185,11 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
if
(
clerkIdList
.
contains
(
"-1"
))
{
if
(
clerkIdList
.
contains
(
"-1"
))
{
List
<
HmQrcodeClerkBO
>
hmQrcodeClerkBOS
=
hmQrcodeService
.
listCanAddClerk
(
wxEnterpriseId
,
enterpriseId
,
hmQrcodeQDTO
.
getCreatorId
());
List
<
HmQrcodeClerkBO
>
hmQrcodeClerkBOS
=
hmQrcodeService
.
listCanAddClerk
(
wxEnterpriseId
,
enterpriseId
,
hmQrcodeQDTO
.
getCreatorId
());
clerkIdList
=
hmQrcodeClerkBOS
.
stream
().
map
(
HmQrcodeClerkBO:
:
getClerkId
).
collect
(
Collectors
.
toList
());
clerkIdList
=
hmQrcodeClerkBOS
.
stream
().
map
(
HmQrcodeClerkBO:
:
getClerkId
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isEmpty
(
clerkIdList
))
{
return
ServiceResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCodeCommon
.
ERR_5
.
getCode
()),
"无需要生成活码导购"
);
}
}
}
for
(
String
clerkId
:
clerkIdList
)
{
for
(
String
clerkId
:
clerkIdList
)
{
hmQrcodeQDTO
.
setClerkIdList
(
Collections
.
singletonList
(
clerkId
));
hmQrcodeQDTO
.
setClerkIdList
(
Collections
.
singletonList
(
clerkId
));
hmQrcodeQDTO
.
setInvokingType
(
3
);
hmQrcodeQDTO
.
setInvokingType
(
3
);
...
@@ -236,7 +240,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
...
@@ -236,7 +240,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
return
ServiceResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCodeCommon
.
ERR_8
.
getCode
()),
"该活码不存在"
);
return
ServiceResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCodeCommon
.
ERR_8
.
getCode
()),
"该活码不存在"
);
}
}
Integer
hmType
=
hmQrcodeQDTO
.
getHmType
();
Integer
hmType
=
hmQrcodeQDTO
.
getHmType
();
List
<
String
>
clerkIdList
=
setStoreClerk
(
hmQrcodeQDTO
,
wxEnterpriseId
,
hmId
,
hmType
);
List
<
String
>
clerkIdList
=
setStoreClerk
(
hmQrcodeQDTO
,
wxEnterpriseId
,
hmId
,
hmType
,
false
);
if
(
CollectionUtils
.
isEmpty
(
clerkIdList
))
{
if
(
CollectionUtils
.
isEmpty
(
clerkIdList
))
{
return
ServiceResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCodeCommon
.
ERR_8
.
getCode
()),
"该导购已经生成过活码或未关联过好办"
);
return
ServiceResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCodeCommon
.
ERR_8
.
getCode
()),
"该导购已经生成过活码或未关联过好办"
);
}
}
...
@@ -313,16 +317,16 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
...
@@ -313,16 +317,16 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
String
memberLabelId
=
hmQrcodeQDTO
.
getMemberLabelId
();
String
memberLabelId
=
hmQrcodeQDTO
.
getMemberLabelId
();
String
memberLabelIdOld
=
hmOld
.
getMemberLabelId
();
String
memberLabelIdOld
=
hmOld
.
getMemberLabelId
();
if
(!
memberLabelId
.
equals
(
memberLabelIdOld
))
{
if
(!
memberLabelId
.
equals
(
memberLabelIdOld
))
{
MemberTagItemDTO
tagItem
=
memberTagApiService
.
findMemberTagItem
(
memberLabelId
);
MemberTagItemDTO
tagItem
=
memberTagApiService
.
findMemberTagItem
(
memberLabelId
);
MemberTagItemDTO
tagItemOld
=
memberTagApiService
.
findMemberTagItem
(
memberLabelIdOld
);
MemberTagItemDTO
tagItemOld
=
memberTagApiService
.
findMemberTagItem
(
memberLabelIdOld
);
String
oldTagName
=
""
;
String
oldTagName
=
""
;
String
tagName
=
""
;
String
tagName
=
""
;
if
(
tagItemOld
!=
null
)
{
if
(
tagItemOld
!=
null
)
{
MemberTagDTO
tag
=
this
.
memberTagApiService
.
getMemberTagById
(
tagItemOld
.
getTagId
())
;
MemberTagDTO
tag
=
this
.
memberTagApiService
.
getMemberTagById
(
tagItemOld
.
getTagId
());
oldTagName
=
tag
.
getTagName
()
+
"-"
+
tagItem
.
getTagItemName
();
oldTagName
=
tag
.
getTagName
()
+
"-"
+
tagItem
.
getTagItemName
();
}
}
if
(
tagItem
!=
null
)
{
if
(
tagItem
!=
null
)
{
MemberTagDTO
tag
=
this
.
memberTagApiService
.
getMemberTagById
(
tagItem
.
getTagId
())
;
MemberTagDTO
tag
=
this
.
memberTagApiService
.
getMemberTagById
(
tagItem
.
getTagId
());
tagName
=
tag
.
getTagName
()
+
"-"
+
tagItem
.
getTagItemName
();
tagName
=
tag
.
getTagName
()
+
"-"
+
tagItem
.
getTagItemName
();
}
}
logContent
.
append
(
"活码标签「"
).
append
(
oldTagName
).
append
(
"」"
).
append
(
"变更为「"
).
append
(
tagName
).
append
(
"」"
);
logContent
.
append
(
"活码标签「"
).
append
(
oldTagName
).
append
(
"」"
).
append
(
"变更为「"
).
append
(
tagName
).
append
(
"」"
);
...
@@ -376,17 +380,24 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
...
@@ -376,17 +380,24 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
* @param hmType
* @param hmType
* @return
* @return
*/
*/
private
List
<
String
>
setStoreClerk
(
HmQrcodeQDTO
hmQrcodeQDTO
,
String
wxEnterpriseId
,
Long
hmId
,
Integer
hmType
)
{
private
List
<
String
>
setStoreClerk
(
HmQrcodeQDTO
hmQrcodeQDTO
,
String
wxEnterpriseId
,
Long
hmId
,
Integer
hmType
,
Boolean
addFlag
)
{
List
<
String
>
clerkIdList
=
hmQrcodeQDTO
.
getClerkIdList
();
List
<
String
>
clerkIdList
=
hmQrcodeQDTO
.
getClerkIdList
();
if
(
CollectionUtils
.
isEmpty
(
clerkIdList
))
{
if
(
CollectionUtils
.
isEmpty
(
clerkIdList
))
{
return
null
;
return
null
;
}
}
//单人活码
String
clerkId
=
clerkIdList
.
get
(
0
);
if
(
hmType
==
2
)
{
if
(
hmType
==
2
)
{
//多人活码
//多人活码
insertHmClerkRelation
(
hmQrcodeQDTO
,
wxEnterpriseId
,
hmId
,
clerkIdList
);
insertHmClerkRelation
(
hmQrcodeQDTO
,
wxEnterpriseId
,
hmId
,
clerkIdList
,
addFlag
);
}
else
if
(
hmType
==
1
)
{
HmQrcodeBO
hmQrcodeBO
=
hmQrcodeService
.
queryByClerkId
(
clerkId
,
wxEnterpriseId
);
if
(
addFlag
&&
hmQrcodeBO
!=
null
)
{
logger
.
error
(
"已经生成过活码,clerkId:{}"
,
clerkId
);
return
null
;
}
}
}
//单人活码
String
clerkId
=
clerkIdList
.
get
(
0
);
hmQrcodeQDTO
.
setClerkId
(
clerkId
);
hmQrcodeQDTO
.
setClerkId
(
clerkId
);
ClerkDTO
clerkDTO
=
clerkService
.
getclerkById
(
clerkId
);
ClerkDTO
clerkDTO
=
clerkService
.
getclerkById
(
clerkId
);
if
(
clerkDTO
!=
null
)
{
if
(
clerkDTO
!=
null
)
{
...
@@ -420,10 +431,15 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
...
@@ -420,10 +431,15 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
* @param hmId
* @param hmId
* @param clerkIdList
* @param clerkIdList
*/
*/
private
void
insertHmClerkRelation
(
HmQrcodeQDTO
hmQrcodeQDTO
,
String
wxEnterpriseId
,
Long
hmId
,
List
<
String
>
clerkIdList
)
{
private
void
insertHmClerkRelation
(
HmQrcodeQDTO
hmQrcodeQDTO
,
String
wxEnterpriseId
,
Long
hmId
,
List
<
String
>
clerkIdList
,
Boolean
addFlag
)
{
List
<
HmClerkRelationQDTO
>
clerkRelationQDTOS
=
new
ArrayList
<>();
Date
now
=
new
Date
();
Date
now
=
new
Date
();
for
(
String
clerkId
:
clerkIdList
)
{
for
(
String
clerkId
:
clerkIdList
)
{
HmClerkRelationBO
hmClerkRelationBO
=
hmClerkRelationService
.
queryByHmIdAndClerkId
(
hmId
,
clerkId
);
if
(
addFlag
&&
hmClerkRelationBO
!=
null
)
{
logger
.
error
(
"该导购已经在该多人活码中,clerkId:{}"
,
clerkId
);
continue
;
}
StaffClerkRelationDTO
clerkRelationDTO
=
staffClerkRelationService
.
getByClerkId
(
clerkId
);
StaffClerkRelationDTO
clerkRelationDTO
=
staffClerkRelationService
.
getByClerkId
(
clerkId
);
HmClerkRelationQDTO
hmClerkRelationQDTO
=
new
HmClerkRelationQDTO
();
HmClerkRelationQDTO
hmClerkRelationQDTO
=
new
HmClerkRelationQDTO
();
hmClerkRelationQDTO
.
setRelationId
(
UniqueIdUtils
.
uniqueLong
());
hmClerkRelationQDTO
.
setRelationId
(
UniqueIdUtils
.
uniqueLong
());
...
@@ -458,9 +474,8 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
...
@@ -458,9 +474,8 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
hmClerkRelationQDTO
.
setUpdateTime
(
now
);
hmClerkRelationQDTO
.
setUpdateTime
(
now
);
hmClerkRelationQDTO
.
setOverFlag
(
0
);
hmClerkRelationQDTO
.
setOverFlag
(
0
);
hmClerkRelationQDTO
.
setAddNum
(
0
);
hmClerkRelationQDTO
.
setAddNum
(
0
);
clerkRelationQDTOS
.
add
(
hmClerkRelationQDTO
);
hmClerkRelationService
.
insert
(
hmClerkRelationQDTO
);
}
}
hmClerkRelationService
.
insertBatch
(
clerkRelationQDTOS
);
}
}
...
@@ -474,8 +489,8 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
...
@@ -474,8 +489,8 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
}
}
MemberTagItemDTO
tagItem
=
this
.
memberTagApiService
.
findMemberTagItem
(
hmQrcodeBO
.
getMemberLabelId
());
MemberTagItemDTO
tagItem
=
this
.
memberTagApiService
.
findMemberTagItem
(
hmQrcodeBO
.
getMemberLabelId
());
if
(
null
!=
tagItem
)
{
if
(
null
!=
tagItem
)
{
String
tagId
=
tagItem
.
getTagId
()
;
String
tagId
=
tagItem
.
getTagId
();
MemberTagDTO
tag
=
this
.
memberTagApiService
.
getMemberTagById
(
tagId
)
;
MemberTagDTO
tag
=
this
.
memberTagApiService
.
getMemberTagById
(
tagId
);
hmQrcodeBO
.
setMemberLabelName
(
tag
.
getTagName
()
+
"-"
+
tagItem
.
getTagItemName
());
hmQrcodeBO
.
setMemberLabelName
(
tag
.
getTagName
()
+
"-"
+
tagItem
.
getTagItemName
());
hmQrcodeBO
.
setMemberLabelStatus
(
tagItem
.
getStatus
());
hmQrcodeBO
.
setMemberLabelStatus
(
tagItem
.
getStatus
());
}
}
...
@@ -537,9 +552,9 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
...
@@ -537,9 +552,9 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
}
}
@Override
@Override
public
ServiceResponse
delByClerkId
(
String
clerkId
,
String
enterpriseId
)
{
public
ServiceResponse
delByClerkId
(
String
clerkId
,
String
enterpriseId
,
String
wxEnterpriseId
)
{
// 单人活码 直接废弃,多人活码,更新
// 单人活码 直接废弃,多人活码,更新
HmQrcodeBO
hmQrcodeBO
=
hmQrcodeService
.
queryByClerkId
(
clerkId
,
e
nterpriseId
);
HmQrcodeBO
hmQrcodeBO
=
hmQrcodeService
.
queryByClerkId
(
clerkId
,
wxE
nterpriseId
);
if
(
hmQrcodeBO
!=
null
)
{
if
(
hmQrcodeBO
!=
null
)
{
delById
(
hmQrcodeBO
.
getHmId
());
delById
(
hmQrcodeBO
.
getHmId
());
}
}
...
@@ -553,6 +568,9 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
...
@@ -553,6 +568,9 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
for
(
HmClerkRelationBO
hmClerkRelationBO
:
hmClerkRelationBOS
)
{
for
(
HmClerkRelationBO
hmClerkRelationBO
:
hmClerkRelationBOS
)
{
Long
hmId
=
hmClerkRelationBO
.
getHmId
();
Long
hmId
=
hmClerkRelationBO
.
getHmId
();
List
<
String
>
clerkIds
=
hmClerkRelationService
.
getClerkIdByHmId
(
hmId
);
List
<
String
>
clerkIds
=
hmClerkRelationService
.
getClerkIdByHmId
(
hmId
);
hmClerkRelationService
.
updateStatusById
(
0
,
hmClerkRelationBO
.
getRelationId
());
clerkIds
.
remove
(
clerkId
);
clerkIds
.
remove
(
clerkId
);
// 更新活码
// 更新活码
HmQrcodeQDTO
hmQrcodeQDTO
=
new
HmQrcodeQDTO
();
HmQrcodeQDTO
hmQrcodeQDTO
=
new
HmQrcodeQDTO
();
...
@@ -647,6 +665,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
...
@@ -647,6 +665,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
logger
.
info
(
"导购无活码,无需处理:clerkId:{}"
,
clerkId
);
logger
.
info
(
"导购无活码,无需处理:clerkId:{}"
,
clerkId
);
continue
;
continue
;
}
}
staffClerkRelationService
.
updateOpenConcatFlagById
(
0
,
relationDTO
.
getStaffClerkRelationId
());
hmQrcodeService
.
updateStatusById
(
hmQrcodeBO
.
getHmId
(),
3
);
hmQrcodeService
.
updateStatusById
(
hmQrcodeBO
.
getHmId
(),
3
);
}
}
}
}
...
@@ -707,7 +726,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
...
@@ -707,7 +726,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
RedisUtil
.
setCache
(
key
,
hmQrcodeStoreDTOS
,
10L
,
TimeUnit
.
MINUTES
);
RedisUtil
.
setCache
(
key
,
hmQrcodeStoreDTOS
,
10L
,
TimeUnit
.
MINUTES
);
return
hmQrcodeStoreDTOS
;
return
hmQrcodeStoreDTOS
;
}
}
@Override
@Override
public
List
<
String
>
getHmStoreForWxa
(
String
enterpriseId
)
{
public
List
<
String
>
getHmStoreForWxa
(
String
enterpriseId
)
{
String
key
=
"HM:STORE:WXA"
+
enterpriseId
;
String
key
=
"HM:STORE:WXA"
+
enterpriseId
;
...
@@ -715,7 +734,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
...
@@ -715,7 +734,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
if
(
cache
!=
null
)
{
if
(
cache
!=
null
)
{
return
(
List
<
String
>)
cache
;
return
(
List
<
String
>)
cache
;
}
}
List
<
String
>
list
=
hmQrcodeService
.
getHmStoreForWxa
(
enterpriseId
);
List
<
String
>
list
=
hmQrcodeService
.
getHmStoreForWxa
(
enterpriseId
);
RedisUtil
.
setCache
(
key
,
list
,
10L
,
TimeUnit
.
MINUTES
);
RedisUtil
.
setCache
(
key
,
list
,
10L
,
TimeUnit
.
MINUTES
);
return
list
;
return
list
;
}
}
...
@@ -723,7 +742,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
...
@@ -723,7 +742,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
@Override
@Override
public
Page
<
HmClerkRelationDTO
>
getHmClerkByHmId
(
BasePageInfo
basePageInfo
,
Long
hmId
)
{
public
Page
<
HmClerkRelationDTO
>
getHmClerkByHmId
(
BasePageInfo
basePageInfo
,
Long
hmId
)
{
Page
<
HmClerkRelationBO
>
hmClerkByHmId
=
hmClerkRelationService
.
getHmClerkByHmId
(
basePageInfo
,
hmId
);
Page
<
HmClerkRelationBO
>
hmClerkByHmId
=
hmClerkRelationService
.
getHmClerkByHmId
(
basePageInfo
,
hmId
);
return
PageUtil
.
changeToCurrentPage
(
hmClerkByHmId
,
HmClerkRelationDTO
.
class
);
return
PageUtil
.
changeToCurrentPage
(
hmClerkByHmId
,
HmClerkRelationDTO
.
class
);
}
}
/**
/**
...
@@ -757,9 +776,14 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
...
@@ -757,9 +776,14 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
public
HmClerkRelationDTO
getOneHmClerkByHmIdAndStaffId
(
Long
hmId
,
String
staffId
)
{
public
HmClerkRelationDTO
getOneHmClerkByHmIdAndStaffId
(
Long
hmId
,
String
staffId
)
{
return
EntityUtil
.
changeEntityNew
(
HmClerkRelationDTO
.
class
,
hmClerkRelationService
.
getHmClerkByHmIdAndStaffId
(
hmId
,
staffId
));
return
EntityUtil
.
changeEntityNew
(
HmClerkRelationDTO
.
class
,
hmClerkRelationService
.
getHmClerkByHmIdAndStaffId
(
hmId
,
staffId
));
}
}
@Override
@Override
public
ServiceResponse
<
List
<
String
>>
listHmIdForIndex
(
HmQrcodeListQDTO
qdto
)
{
public
ServiceResponse
<
List
<
String
>>
listHmIdForIndex
(
HmQrcodeListQDTO
qdto
)
{
return
ServiceResponse
.
success
(
hmQrcodeService
.
listHmIdForIndex
(
qdto
));
return
ServiceResponse
.
success
(
hmQrcodeService
.
listHmIdForIndex
(
qdto
));
}
}
@Override
public
ServiceResponse
<
List
<
String
>>
listHasQrcodeClerk
(
String
enterpriseId
,
List
<
String
>
clerkIdList
)
{
return
ServiceResponse
.
success
(
hmQrcodeService
.
listHasQrcodeClerk
(
enterpriseId
,
clerkIdList
));
}
}
}
haoban-manage3-service/src/main/resources/mapper/hm/TabHaobanHmClerkRelationMapper.xml
View file @
9d346334
...
@@ -182,5 +182,13 @@
...
@@ -182,5 +182,13 @@
where hm_id = #{hmId} and staff_id = #{staffId} and status = 1 limit 1
where hm_id = #{hmId} and staff_id = #{staffId} and status = 1 limit 1
</select>
</select>
<update
id=
"updateStatusById"
>
update tab_haoban_hm_clerk_relation
<set>
status = #{status},update_time = now()
</set>
where relation_id = #{relationId}
</update>
</mapper>
</mapper>
haoban-manage3-service/src/main/resources/mapper/hm/TabHaobanHmQrcodeMapper.xml
View file @
9d346334
...
@@ -287,7 +287,7 @@
...
@@ -287,7 +287,7 @@
</update>
</update>
<update
id=
"resetAddNumAndOverFlag"
>
<update
id=
"resetAddNumAndOverFlag"
>
update
update
tab_haoban_hm_qrcode
<set>
<set>
add_num = 0,over_flag = 0,update_time = now()
add_num = 0,over_flag = 0,update_time = now()
</set>
</set>
...
@@ -329,7 +329,10 @@
...
@@ -329,7 +329,10 @@
<select
id=
"listHmIdForIndex"
resultType=
"String"
parameterType=
"com.gic.haoban.manage.api.dto.qdto.hm.HmQrcodeListQDTO"
>
<select
id=
"listHmIdForIndex"
resultType=
"String"
parameterType=
"com.gic.haoban.manage.api.dto.qdto.hm.HmQrcodeListQDTO"
>
select distinct(a.hm_id)
select distinct(a.hm_id)
from tab_haoban_hm_qrcode a left join tab_haoban_hm_clerk_relation b on a.hm_id = b.hm_id and b.status = 1
from tab_haoban_hm_qrcode a left join tab_haoban_hm_clerk_relation b on a.hm_id = b.hm_id and b.status = 1
where a.enterprise_id = #{enterpriseId} and a.status_flag != 0
where a.enterprise_id = #{enterpriseId} and a.status_flag != 0
<if
test=
"wxEnterpriseId != null and wxEnterpriseId != ''"
>
and a.wx_enterprise_id = #{wxEnterpriseId}
</if>
<if
test=
"null != hmSelect and '' != hmSelect "
>
<if
test=
"null != hmSelect and '' != hmSelect "
>
and (a.hm_code=#{hmSelect} or a.name like '%${hmSelect}%' or a.creator_name like '%${hmSelect}%' )
and (a.hm_code=#{hmSelect} or a.name like '%${hmSelect}%' or a.creator_name like '%${hmSelect}%' )
</if>
</if>
...
@@ -371,6 +374,9 @@
...
@@ -371,6 +374,9 @@
from tab_haoban_hm_qrcode
from tab_haoban_hm_qrcode
where status_flag != 0
where status_flag != 0
and enterprise_id = #{enterpriseId}
and enterprise_id = #{enterpriseId}
<if
test=
"wxEnterpriseId != null and wxEnterpriseId != ''"
>
and wx_enterprise_id = #{wxEnterpriseId}
</if>
<if
test=
"groupIds != null and groupIds.size > 0"
>
<if
test=
"groupIds != null and groupIds.size > 0"
>
and hm_group_id IN
and hm_group_id IN
<foreach
collection=
"groupIds"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
<foreach
collection=
"groupIds"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
...
@@ -391,6 +397,9 @@
...
@@ -391,6 +397,9 @@
from tab_haoban_hm_qrcode
from tab_haoban_hm_qrcode
where status_flag != 0
where status_flag != 0
and enterprise_id = #{enterpriseId}
and enterprise_id = #{enterpriseId}
<if
test=
"wxEnterpriseId != null and wxEnterpriseId != ''"
>
and wx_enterprise_id = #{wxEnterpriseId}
</if>
<if
test=
"hmIds != null and hmIds.size > 0"
>
<if
test=
"hmIds != null and hmIds.size > 0"
>
and hm_id in
and hm_id in
<foreach
collection=
"hmIds"
open=
"("
close=
")"
separator=
","
item=
"hmId"
>
<foreach
collection=
"hmIds"
open=
"("
close=
")"
separator=
","
item=
"hmId"
>
...
@@ -422,7 +431,7 @@
...
@@ -422,7 +431,7 @@
<sql
id=
"canAddClerkSql"
>
<sql
id=
"canAddClerkSql"
>
tab_haoban_staff_clerk_relation a LEFT JOIN tab_haoban_hm_qrcode b ON a.clerk_id = b.clerk_id and b.hm_type = 1 and b.status_flag in (1,3)
tab_haoban_staff_clerk_relation a LEFT JOIN tab_haoban_hm_qrcode b ON a.clerk_id = b.clerk_id and b.hm_type = 1 and b.status_flag in (1,3)
WHERE a.enterprise_id = #{enterpriseId} AND a.status_flag = 1 AND a.open_concat_flag =
0
WHERE a.enterprise_id = #{enterpriseId} AND a.status_flag = 1 AND a.open_concat_flag =
1
<if
test=
"null != storeIdList"
>
<if
test=
"null != storeIdList"
>
and a.store_id in
and a.store_id in
<foreach
collection=
"storeIdList"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
<foreach
collection=
"storeIdList"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
...
@@ -432,6 +441,15 @@
...
@@ -432,6 +441,15 @@
and a.wx_enterprise_id = #{wxEnterpriseId}
and a.wx_enterprise_id = #{wxEnterpriseId}
and b.hm_id is null
and b.hm_id is null
</sql>
</sql>
<select
id=
"listHasQrcodeClerk"
resultType=
"String"
>
select clerk_id from tab_haoban_hm_qrcode where enterprise_id=#{enterpriseId}
and clerk_id in
<foreach
collection=
"clerkIdList"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{id}
</foreach>
and hm_type = 1 and status_flag in (1,3)
</select>
</mapper>
</mapper>
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/hm/HmQrcodeController.java
View file @
9d346334
...
@@ -137,6 +137,7 @@ public class HmQrcodeController {
...
@@ -137,6 +137,7 @@ public class HmQrcodeController {
public
RestResponse
<
StatisticsDTO
>
list
(
@RequestBody
HmQrcodeListQO
hmQrcodeListQO
)
{
public
RestResponse
<
StatisticsDTO
>
list
(
@RequestBody
HmQrcodeListQO
hmQrcodeListQO
)
{
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
hmQrcodeListQO
.
getInFields
().
setEnterpriseId
(
loginUser
.
getEnterpriseId
());
hmQrcodeListQO
.
getInFields
().
setEnterpriseId
(
loginUser
.
getEnterpriseId
());
hmQrcodeListQO
.
getInFields
().
setWxEnterpriseId
(
loginUser
.
getWxEnterpriseId
());
List
<
String
>
storeList
=
staffApiService
.
getHaoBanStoreIdsRolesByClerkId
(
loginUser
.
getClerkId
(),
loginUser
.
getWxEnterpriseId
());
List
<
String
>
storeList
=
staffApiService
.
getHaoBanStoreIdsRolesByClerkId
(
loginUser
.
getClerkId
(),
loginUser
.
getWxEnterpriseId
());
if
(
CollectionUtils
.
isEmpty
(
storeList
))
{
if
(
CollectionUtils
.
isEmpty
(
storeList
))
{
return
RestResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCode
.
ERR_100007
.
getCode
()),
HaoBanErrCode
.
ERR_100007
.
getMsg
());
return
RestResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCode
.
ERR_100007
.
getCode
()),
HaoBanErrCode
.
ERR_100007
.
getMsg
());
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/hm/HmStoreController.java
View file @
9d346334
...
@@ -21,6 +21,7 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -21,6 +21,7 @@ import org.springframework.web.bind.annotation.RestController;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.gic.api.base.commons.BasePageInfo
;
import
com.gic.api.base.commons.BasePageInfo
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.clerk.api.dto.ClerkStoreListDTO
;
import
com.gic.clerk.api.dto.ClerkStoreListDTO
;
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
;
...
@@ -31,7 +32,6 @@ import com.gic.enterprise.api.service.StoreService;
...
@@ -31,7 +32,6 @@ import com.gic.enterprise.api.service.StoreService;
import
com.gic.haoban.base.api.common.pojo.dto.WebLoginDTO
;
import
com.gic.haoban.base.api.common.pojo.dto.WebLoginDTO
;
import
com.gic.haoban.common.utils.AuthWebRequestUtil
;
import
com.gic.haoban.common.utils.AuthWebRequestUtil
;
import
com.gic.haoban.manage.api.dto.StaffClerkRelationDTO
;
import
com.gic.haoban.manage.api.dto.StaffClerkRelationDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmQrcodeListDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmQrcodeStoreDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmQrcodeStoreDTO
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.api.service.StaffClerkRelationApiService
;
import
com.gic.haoban.manage.api.service.StaffClerkRelationApiService
;
...
@@ -72,6 +72,7 @@ public class HmStoreController {
...
@@ -72,6 +72,7 @@ public class HmStoreController {
@ResponseBody
@ResponseBody
public
RestResponse
<
Object
>
listStoreClerk
(
HttpServletRequest
request
,
BasePageInfo
basePageInfo
)
{
public
RestResponse
<
Object
>
listStoreClerk
(
HttpServletRequest
request
,
BasePageInfo
basePageInfo
)
{
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
String
enterpriseId
=
loginUser
.
getEnterpriseId
();
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
();
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
();
// 分组id
// 分组id
String
storeGroupId
=
request
.
getParameter
(
"storeGroupId"
);
String
storeGroupId
=
request
.
getParameter
(
"storeGroupId"
);
...
@@ -80,7 +81,7 @@ public class HmStoreController {
...
@@ -80,7 +81,7 @@ public class HmStoreController {
// 导购参数
// 导购参数
String
clerkSearchParams
=
request
.
getParameter
(
"clerkSearchParams"
);
String
clerkSearchParams
=
request
.
getParameter
(
"clerkSearchParams"
);
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"enterpriseId"
,
loginUser
.
getEnterpriseId
()
);
params
.
put
(
"enterpriseId"
,
enterpriseId
);
// 2线上
// 2线上
params
.
put
(
"status"
,
2
);
params
.
put
(
"status"
,
2
);
params
.
put
(
"storeGroupId"
,
storeGroupId
);
params
.
put
(
"storeGroupId"
,
storeGroupId
);
...
@@ -117,12 +118,12 @@ public class HmStoreController {
...
@@ -117,12 +118,12 @@ public class HmStoreController {
retPage
.
setTotalPage
(
page
.
getTotalPage
());
retPage
.
setTotalPage
(
page
.
getTotalPage
());
List
<
ClerkStoreListVO
>
result
=
EntityUtil
.
changeEntityListByJSON
(
ClerkStoreListVO
.
class
,
page
.
getResult
());
List
<
ClerkStoreListVO
>
result
=
EntityUtil
.
changeEntityListByJSON
(
ClerkStoreListVO
.
class
,
page
.
getResult
());
// 好办状态
// 好办状态
this
.
haobanStatus
(
result
,
wxEnterpriseId
);
this
.
haobanStatus
(
result
,
wxEnterpriseId
,
enterpriseId
);
retPage
.
setResult
(
result
);
retPage
.
setResult
(
result
);
return
RestResponse
.
successResult
(
retPage
);
return
RestResponse
.
successResult
(
retPage
);
}
}
private
void
haobanStatus
(
List
<
ClerkStoreListVO
>
list
,
String
wxEnterpriseId
)
{
private
void
haobanStatus
(
List
<
ClerkStoreListVO
>
list
,
String
wxEnterpriseId
,
String
enterpriseId
)
{
List
<
String
>
clerkIdList
=
new
ArrayList
<>();
List
<
String
>
clerkIdList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isEmpty
(
list
))
{
if
(
CollectionUtils
.
isEmpty
(
list
))
{
return
;
return
;
...
@@ -156,21 +157,16 @@ public class HmStoreController {
...
@@ -156,21 +157,16 @@ public class HmStoreController {
}
}
}
}
if
(
CollectionUtils
.
isNotEmpty
(
statusList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
statusList
))
{
List
<
HmQrcodeListDTO
>
hmList
=
new
ArrayList
<>();
ServiceResponse
<
List
<
String
>>
hmClerkResp
=
this
.
hmQrcodeApiService
.
listHasQrcodeClerk
(
enterpriseId
,
if
(
CollectionUtils
.
isNotEmpty
(
hmList
))
{
statusList
);
status2List
.
addAll
(
hmList
.
stream
().
filter
(
dto
->
dto
.
getStatusFlag
()
==
3
).
map
(
dto
->
dto
.
getClerkId
())
if
(
CollectionUtils
.
isNotEmpty
(
hmClerkResp
.
getResult
()))
{
.
collect
(
Collectors
.
toList
()));
status3List
.
addAll
(
hmClerkResp
.
getResult
());
status3List
.
addAll
(
hmList
.
stream
().
filter
(
dto
->
dto
.
getStatusFlag
()
==
1
).
map
(
dto
->
dto
.
getClerkId
())
.
collect
(
Collectors
.
toList
()));
}
}
status4List
status4List
.
addAll
(
statusList
.
stream
().
filter
(
id
->
(!
status
2List
.
contains
(
id
)
&&
!
status
3List
.
contains
(
id
)))
.
addAll
(
statusList
.
stream
().
filter
(
id
->
(!
status3List
.
contains
(
id
)))
.
collect
(
Collectors
.
toList
()));
.
collect
(
Collectors
.
toList
()));
}
}
logger
.
info
(
"导购列表未开启客户联系的={} , 已有单人活码的={}, 可以创建单人活码的={}"
,
status2List
,
status3List
,
status4List
);
logger
.
info
(
"导购列表={}"
,
status2List
);
logger
.
info
(
"导购列表={}"
,
status3List
);
logger
.
info
(
"导购列表={}"
,
status4List
);
list
.
stream
().
forEach
(
item
->
{
list
.
stream
().
forEach
(
item
->
{
for
(
ClerkListVO
clerk
:
item
.
getClerkList
())
{
for
(
ClerkListVO
clerk
:
item
.
getClerkList
())
{
if
(
status2List
.
contains
(
clerk
.
getClerkId
()))
{
if
(
status2List
.
contains
(
clerk
.
getClerkId
()))
{
...
@@ -201,7 +197,7 @@ public class HmStoreController {
...
@@ -201,7 +197,7 @@ public class HmStoreController {
@ResponseBody
@ResponseBody
public
RestResponse
<
Object
>
listStore
(
HttpServletRequest
request
,
BasePageInfo
basePageInfo
)
{
public
RestResponse
<
Object
>
listStore
(
HttpServletRequest
request
,
BasePageInfo
basePageInfo
)
{
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
()
;
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
();
String
enterpriseId
=
loginUser
.
getEnterpriseId
();
String
enterpriseId
=
loginUser
.
getEnterpriseId
();
String
clerkId
=
loginUser
.
getClerkId
();
String
clerkId
=
loginUser
.
getClerkId
();
// 如果有权限控制,进行管辖门店过0滤
// 如果有权限控制,进行管辖门店过0滤
...
@@ -240,7 +236,7 @@ public class HmStoreController {
...
@@ -240,7 +236,7 @@ public class HmStoreController {
page
.
setPageSize
(
basePageInfo
.
getPageSize
());
page
.
setPageSize
(
basePageInfo
.
getPageSize
());
page
.
setCurrentPage
(
basePageInfo
.
getPageNum
());
page
.
setCurrentPage
(
basePageInfo
.
getPageNum
());
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"searchDto"
,
searchDTO
)
;
params
.
put
(
"searchDto"
,
searchDTO
);
page
.
setParams
(
params
);
page
.
setParams
(
params
);
logger
.
info
(
"查询条件={}"
,
JSON
.
toJSONString
(
page
));
logger
.
info
(
"查询条件={}"
,
JSON
.
toJSONString
(
page
));
Map
<
String
,
Object
>
result
=
storeService
.
getStoreListPage
(
page
);
Map
<
String
,
Object
>
result
=
storeService
.
getStoreListPage
(
page
);
...
...
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