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
c3ed75be
Commit
c3ed75be
authored
Nov 16, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master_xgh_我的客户迭代' into 'master'
Master xgh 我的客户迭代 See merge request
!455
parents
db3e0508
9631eca4
Show whitespace changes
Inline
Side-by-side
Showing
45 changed files
with
1381 additions
and
879 deletions
+1381
-879
ClerkStaffWxUserDTO.java
...va/com/gic/haoban/manage/api/dto/ClerkStaffWxUserDTO.java
+13
-1
ExternalClerkRelatedApiService.java
...an/manage/api/service/ExternalClerkRelatedApiService.java
+4
-0
StaffApiService.java
...va/com/gic/haoban/manage/api/service/StaffApiService.java
+11
-0
StaffClerkRelationApiService.java
...oban/manage/api/service/StaffClerkRelationApiService.java
+1
-3
StaffDepartmentRelatedApiService.java
.../manage/api/service/StaffDepartmentRelatedApiService.java
+0
-8
WxEnterpriseApiService.java
...gic/haoban/manage/api/service/WxEnterpriseApiService.java
+0
-8
ErrorLogApiService.java
...gic/haoban/manage/api/service/out/ErrorLogApiService.java
+0
-23
StaffDepartmentRelatedMapper.java
...nage/service/dao/mapper/StaffDepartmentRelatedMapper.java
+0
-2
TabHaobanErrorLogMapper.java
...an/manage/service/dao/mapper/TabHaobanErrorLogMapper.java
+0
-18
TabHaobanStaffClerkRelationMapper.java
...service/dao/mapper/TabHaobanStaffClerkRelationMapper.java
+23
-147
MemberStaffRelExtDO.java
...haoban/manage/service/entity/ext/MemberStaffRelExtDO.java
+11
-0
ErrorLogService.java
...om/gic/haoban/manage/service/service/ErrorLogService.java
+0
-23
StaffClerkRelationService.java
...ban/manage/service/service/StaffClerkRelationService.java
+1
-1
ErrorLogServiceImpl.java
...oban/manage/service/service/impl/ErrorLogServiceImpl.java
+0
-31
StaffClerkRelationServiceImpl.java
...e/service/service/impl/StaffClerkRelationServiceImpl.java
+26
-21
AuditApiServiceImpl.java
.../manage/service/service/out/impl/AuditApiServiceImpl.java
+1
-1
ErrorLogApiServiceImpl.java
...nage/service/service/out/impl/ErrorLogApiServiceImpl.java
+0
-28
ExternalClerkRelatedApiServiceImpl.java
.../service/out/impl/ExternalClerkRelatedApiServiceImpl.java
+20
-9
MessageApiServiceImpl.java
...anage/service/service/out/impl/MessageApiServiceImpl.java
+1
-1
QwFriendApiServiceImpl.java
...nage/service/service/out/impl/QwFriendApiServiceImpl.java
+7
-1
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+52
-20
StaffClerkRelationApiServiceImpl.java
...ce/service/out/impl/StaffClerkRelationApiServiceImpl.java
+12
-27
StaffDepartmentRelatedApiServiceImpl.java
...ervice/out/impl/StaffDepartmentRelatedApiServiceImpl.java
+22
-47
WxEnterpriseApiServiceImpl.java
.../service/service/out/impl/WxEnterpriseApiServiceImpl.java
+0
-6
ClerkUtils.java
...n/java/com/gic/haoban/manage/service/util/ClerkUtils.java
+32
-0
dubbo-haoban-manage-service.xml
...ervice/src/main/resources/dubbo-haoban-manage-service.xml
+0
-3
StaffDepartmentRelatedMapper.xml
...rc/main/resources/mapper/StaffDepartmentRelatedMapper.xml
+0
-7
TabHaobanErrorLogMapper.xml
...ice/src/main/resources/mapper/TabHaobanErrorLogMapper.xml
+0
-141
TabHaobanStaffClerkRelationMapper.xml
...in/resources/mapper/TabHaobanStaffClerkRelationMapper.xml
+115
-226
TabHaobanHmQrcodeMapper.xml
.../src/main/resources/mapper/hm/TabHaobanHmQrcodeMapper.xml
+2
-1
ErrorLogTest.java
haoban-manage3-service/src/test/java/ErrorLogTest.java
+0
-35
ClerkController.java
...com/gic/haoban/manage/web/controller/ClerkController.java
+1
-2
MaterialController.java
.../gic/haoban/manage/web/controller/MaterialController.java
+35
-9
StaffController.java
...com/gic/haoban/manage/web/controller/StaffController.java
+2
-2
EmojiFilterUtil.java
...java/com/gic/haoban/manage/web/utils/EmojiFilterUtil.java
+42
-0
pom.xml
haoban-manage3-wx/pom.xml
+40
-1
WebBaseController.java
...m/gic/haoban/manage/web/controller/WebBaseController.java
+12
-0
WxEnterpriseInfoController.java
...ban/manage/web/controller/WxEnterpriseInfoController.java
+0
-2
WxStaffController.java
...m/gic/haoban/manage/web/controller/WxStaffController.java
+236
-23
MemberMarketingController.java
...e/web/controller/marketing/MemberMarketingController.java
+484
-0
MemberController.java
...haoban/manage/web/controller/member/MemberController.java
+11
-0
AiMemberLogListVO.java
.../java/com/gic/haoban/manage/web/vo/AiMemberLogListVO.java
+89
-0
ClerkListVO.java
...c/main/java/com/gic/haoban/manage/web/vo/ClerkListVO.java
+39
-0
StoreListVO.java
...c/main/java/com/gic/haoban/manage/web/vo/StoreListVO.java
+22
-0
dubbo-haoban-manage-wx.xml
...ge3-wx/src/main/webapp/WEB-INF/dubbo-haoban-manage-wx.xml
+14
-1
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/ClerkStaffWxUserDTO.java
View file @
c3ed75be
package
com
.
gic
.
haoban
.
manage
.
api
.
dto
;
package
com
.
gic
.
haoban
.
manage
.
api
.
dto
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
/**
* desc:员工导购id与导购wxUserId实体
* desc:员工导购id与导购wxUserId实体
...
@@ -23,13 +24,24 @@ public class ClerkStaffWxUserDTO implements Serializable {
...
@@ -23,13 +24,24 @@ public class ClerkStaffWxUserDTO implements Serializable {
*/
*/
private
String
staffClerkId
;
private
String
staffClerkId
;
private
Date
addFriendTime
;
public
Date
getAddFriendTime
()
{
return
addFriendTime
;
}
public
void
setAddFriendTime
(
Date
addFriendTime
)
{
this
.
addFriendTime
=
addFriendTime
;
}
public
ClerkStaffWxUserDTO
()
{
public
ClerkStaffWxUserDTO
()
{
}
}
public
ClerkStaffWxUserDTO
(
String
staffId
,
String
staffClerkId
,
String
memberExternalUserId
)
{
public
ClerkStaffWxUserDTO
(
String
staffId
,
String
staffClerkId
,
String
memberExternalUserId
,
Date
addFriendTime
)
{
this
.
memberExternalUserId
=
memberExternalUserId
;
this
.
memberExternalUserId
=
memberExternalUserId
;
this
.
staffId
=
staffId
;
this
.
staffId
=
staffId
;
this
.
staffClerkId
=
staffClerkId
;
this
.
staffClerkId
=
staffClerkId
;
this
.
addFriendTime
=
addFriendTime
;
}
}
public
String
getMemberExternalUserId
()
{
public
String
getMemberExternalUserId
()
{
...
...
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/ExternalClerkRelatedApiService.java
View file @
c3ed75be
...
@@ -193,6 +193,10 @@ public interface ExternalClerkRelatedApiService {
...
@@ -193,6 +193,10 @@ public interface ExternalClerkRelatedApiService {
*/
*/
boolean
isFriends
(
String
memberId
,
String
clerkId
,
String
enterpriseId
);
boolean
isFriends
(
String
memberId
,
String
clerkId
,
String
enterpriseId
);
com
.
gic
.
api
.
base
.
commons
.
ServiceResponse
<
Boolean
>
isQwFriend
(
String
enterpriseId
,
String
staffId
,
String
memberId
)
;
com
.
gic
.
api
.
base
.
commons
.
ServiceResponse
<
String
>
getExternalUseridForWxa
(
String
enterpriseId
,
String
staffId
,
String
memberId
)
;
List
<
String
>
listMemberAndClerk
(
List
<
String
>
memberIdList
,
List
<
String
>
clerkIdList
,
String
enterpriseId
)
;
List
<
String
>
listMemberAndClerk
(
List
<
String
>
memberIdList
,
List
<
String
>
clerkIdList
,
String
enterpriseId
)
;
/**
/**
...
...
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/StaffApiService.java
View file @
c3ed75be
...
@@ -279,6 +279,17 @@ public interface StaffApiService {
...
@@ -279,6 +279,17 @@ public interface StaffApiService {
*/
*/
boolean
isManager
(
String
clerkId
);
boolean
isManager
(
String
clerkId
);
/**
*
* @Title: isEnterpriseManager
* @Description: 是否是区经
* @author xugh
* @param clerkId
* @return
* @throws
*/
com
.
gic
.
api
.
base
.
commons
.
ServiceResponse
<
Boolean
>
isEnterpriseManager
(
String
clerkId
)
;
/**
/**
* 绑定的员工列表
* 绑定的员工列表
...
...
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/StaffClerkRelationApiService.java
View file @
c3ed75be
...
@@ -56,7 +56,7 @@ public interface StaffClerkRelationApiService {
...
@@ -56,7 +56,7 @@ public interface StaffClerkRelationApiService {
* @param channelCode
* @param channelCode
* @return
* @return
*/
*/
boolean
unbindByStaffAndClerkId
(
String
staffId
,
String
clerkId
,
int
channelCode
);
boolean
unbindByStaffAndClerkId
(
String
staffId
,
String
clerkId
,
int
channelCode
,
String
wxEnterpriseId
);
/**
/**
* 解绑门店
* 解绑门店
...
@@ -82,8 +82,6 @@ public interface StaffClerkRelationApiService {
...
@@ -82,8 +82,6 @@ public interface StaffClerkRelationApiService {
*/
*/
List
<
StaffClerkRelationDTO
>
listByStoreId
(
String
storeId
);
List
<
StaffClerkRelationDTO
>
listByStoreId
(
String
storeId
);
List
<
StaffClerkRelationDTO
>
listByStoreIds
(
List
<
String
>
storeIds
);
/**
/**
* 查询导购信息
* 查询导购信息
* @param storeId
* @param storeId
...
...
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/StaffDepartmentRelatedApiService.java
View file @
c3ed75be
...
@@ -10,8 +10,6 @@ public interface StaffDepartmentRelatedApiService {
...
@@ -10,8 +10,6 @@ public interface StaffDepartmentRelatedApiService {
List
<
StaffDepartmentRelatedDTO
>
listByDepartmentId
(
String
departmentId
);
List
<
StaffDepartmentRelatedDTO
>
listByDepartmentId
(
String
departmentId
);
List
<
StaffDepartmentRelatedDTO
>
listByDepartmentIds
(
List
<
String
>
departmentIds
);
List
<
StaffDepartmentRelatedDTO
>
listByStaffId
(
String
staffId
);
List
<
StaffDepartmentRelatedDTO
>
listByStaffId
(
String
staffId
);
void
updateById
(
StaffDepartmentRelatedDTO
dto
);
void
updateById
(
StaffDepartmentRelatedDTO
dto
);
...
@@ -25,12 +23,6 @@ public interface StaffDepartmentRelatedApiService {
...
@@ -25,12 +23,6 @@ public interface StaffDepartmentRelatedApiService {
*/
*/
StaffDepartmentRelatedDTO
getByStaffDepartmentRelatedId
(
String
staffDepartmentRelatedId
);
StaffDepartmentRelatedDTO
getByStaffDepartmentRelatedId
(
String
staffDepartmentRelatedId
);
void
deleteCode
(
StaffDepartmentRelatedDTO
dto
);
StaffDepartmentRelatedDTO
getOneByClerkCodeAndDepartmentId
(
String
clerkCode
,
String
departmentId
);
StaffDepartmentRelatedDTO
getOneByStaffIdAndDepartmentId
(
String
staffId
,
String
departmentId
);
Map
<
String
,
String
>
getWxUserIdByClerkId
(
String
clerkId
);
Map
<
String
,
String
>
getWxUserIdByClerkId
(
String
clerkId
);
String
getPageUrl
(
int
type
,
String
data
);
String
getPageUrl
(
int
type
,
String
data
);
...
...
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/WxEnterpriseApiService.java
View file @
c3ed75be
...
@@ -70,14 +70,6 @@ public interface WxEnterpriseApiService {
...
@@ -70,14 +70,6 @@ public interface WxEnterpriseApiService {
List
<
YwWxEnterpriseDTO
>
listByIds
(
Set
<
String
>
enterpriseIds
);
List
<
YwWxEnterpriseDTO
>
listByIds
(
Set
<
String
>
enterpriseIds
);
/**
/**
* 企业是否过期 true是
*
* @param enterpriseId
* @return
*/
boolean
enterpriseIsOver
(
String
enterpriseId
);
/**
* 获取配置
* 获取配置
*
*
* @param wxEnterpriseId
* @param wxEnterpriseId
...
...
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/out/ErrorLogApiService.java
deleted
100644 → 0
View file @
db3e0508
package
com
.
gic
.
haoban
.
manage
.
api
.
service
.
out
;
import
com.gic.haoban.manage.api.dto.ErrorLogDTO
;
/**
* desc:好办错误日志服务接口
*
* @author: YongEn
* @date: 2022/1/18
**/
public
interface
ErrorLogApiService
{
/**
* desc: 保存
*
* @param dto
* @return :
* @author : YongEn
* @date : 2022/1/18
*/
void
save
(
ErrorLogDTO
dto
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/StaffDepartmentRelatedMapper.java
View file @
c3ed75be
...
@@ -17,8 +17,6 @@ public interface StaffDepartmentRelatedMapper {
...
@@ -17,8 +17,6 @@ public interface StaffDepartmentRelatedMapper {
List
<
TabHaobanStaffDepartmentRelated
>
listByDepartmentId
(
String
departmentId
);
List
<
TabHaobanStaffDepartmentRelated
>
listByDepartmentId
(
String
departmentId
);
void
deleteCode
(
TabHaobanStaffDepartmentRelated
dto
);
List
<
TabHaobanStaffDepartmentRelated
>
listStaffDepartmentByStaffId
(
String
staffId
);
List
<
TabHaobanStaffDepartmentRelated
>
listStaffDepartmentByStaffId
(
String
staffId
);
TabHaobanStaffDepartmentRelated
getById
(
String
staffDepartmentRelatedId
);
TabHaobanStaffDepartmentRelated
getById
(
String
staffDepartmentRelatedId
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/TabHaobanErrorLogMapper.java
deleted
100644 → 0
View file @
db3e0508
package
com
.
gic
.
haoban
.
manage
.
service
.
dao
.
mapper
;
import
com.gic.haoban.manage.service.entity.TabHaobanErrorLog
;
public
interface
TabHaobanErrorLogMapper
{
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
TabHaobanErrorLog
record
);
int
insertSelective
(
TabHaobanErrorLog
record
);
TabHaobanErrorLog
selectByPrimaryKey
(
Long
id
);
int
updateByPrimaryKeySelective
(
TabHaobanErrorLog
record
);
int
updateByPrimaryKey
(
TabHaobanErrorLog
record
);
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/TabHaobanStaffClerkRelationMapper.java
View file @
c3ed75be
...
@@ -14,130 +14,69 @@ public interface TabHaobanStaffClerkRelationMapper {
...
@@ -14,130 +14,69 @@ public interface TabHaobanStaffClerkRelationMapper {
TabHaobanStaffClerkRelation
selectByPrimaryKey
(
String
staffClerkRelationId
);
TabHaobanStaffClerkRelation
selectByPrimaryKey
(
String
staffClerkRelationId
);
List
<
TabHaobanStaffClerkRelation
>
listBindCode
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
List
<
StaffClerkRelationDTO
>
listBindCode
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"clerkCodeList"
)
Set
<
String
>
clerkCodeList
);
@Param
(
"clerkCodeList"
)
Set
<
String
>
clerkCodeList
);
List
<
TabHaobanStaffClerkRelation
>
listBindCodeByStaffId
(
@Param
(
"enterpriseIdList"
)
List
<
String
>
enterpriseIdList
,
@Param
(
"staffId"
)
String
staffId
);
List
<
StaffClerkRelationDTO
>
listBindCodeByStaffId
(
@Param
(
"enterpriseIdList"
)
List
<
String
>
enterpriseIdList
,
@Param
(
"staffId"
)
String
staffId
);
TabHaobanStaffClerkRelation
getOneByClerkId
(
@Param
(
"clerkId"
)
String
clerkId
);
StaffClerkRelationDTO
getOneByClerkId
(
@Param
(
"clerkId"
)
String
clerkId
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
StaffClerkRelationDTO
getByCodeAndEnterpriseId
(
@Param
(
"clerkCode"
)
String
clerkCode
,
@Param
(
"enterpriseId"
)
String
enterpriseId
);
List
<
StaffClerkRelationDTO
>
listByClerkIds
(
@Param
(
"clerkIds"
)
List
<
String
>
clerkIds
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
StaffClerkRelationDTO
getOneByStoreIdAndStaffId
(
@Param
(
"storeId"
)
String
storeId
,
@Param
(
"staffId"
)
String
staffId
);
/**
* 改变状态 格局clerkId
*
* @param clerkId
* @param status
* @return
*/
int
changeStatusByClerkId
(
@Param
(
"clerkId"
)
String
clerkId
,
@Param
(
"status"
)
Integer
status
);
int
changeStatusByClerkId
(
@Param
(
"clerkId"
)
String
clerkId
,
@Param
(
"status"
)
Integer
status
);
/**
/**
* 更新信息
* 更新信息
*
* @param record
* @return
*/
*/
int
updateByClerkId
(
TabHaobanStaffClerkRelation
record
);
int
updateByClerkId
(
TabHaobanStaffClerkRelation
record
);
/**
/**
* 格局clerkId 查询staffClerkRelation
*
* @param clerkId
* @param wxEnterpriseId
* @return
*/
TabHaobanStaffClerkRelation
getBindByClerkId
(
@Param
(
"clerkId"
)
String
clerkId
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
TabHaobanStaffClerkRelation
getByCodeAndEnterpriseId
(
@Param
(
"clerkCode"
)
String
clerkCode
,
@Param
(
"enterpriseId"
)
String
enterpriseId
);
/**
* 解绑
* 解绑
*/
*/
void
delByStoreIdAndCode
(
@Param
(
"storeId"
)
String
storeId
,
@Param
(
"clerkCode"
)
String
clerkCode
);
void
delByStoreIdAndCode
(
@Param
(
"storeId"
)
String
storeId
,
@Param
(
"clerkCode"
)
String
clerkCode
);
/**
* 由职员id列表
*
* @param clerkIds 职员id
* @return {@link List<StaffClerkRelationDTO> }
* @author mozhu
* @date 2022-01-13 11:36:11
*/
List
<
StaffClerkRelationDTO
>
listByClerkIds
(
@Param
(
"clerkIds"
)
List
<
String
>
clerkIds
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
List
<
TabHaobanStaffClerkRelation
>
listByStoreId
(
@Param
(
"storeId"
)
String
storeId
);
TabHaobanStaffClerkRelation
getOneByStoreIdAndStaffId
(
@Param
(
"storeId"
)
String
storeId
,
@Param
(
"staffId"
)
String
staffId
);
/**
/**
* 解绑
* 解绑
*/
*/
int
cleanStaffDepart
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"staffIds"
)
List
<
String
>
staffIds
);
int
cleanStaffDepart
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"staffIds"
)
List
<
String
>
staffIds
);
TabHaobanStaffClerkRelation
getOneBindStoreId
(
@Param
(
"staffId"
)
String
staffId
,
@Param
(
"storeId"
)
String
storeId
);
TabHaobanStaffClerkRelation
getByClerkId
(
@Param
(
"clerkId"
)
String
clerkId
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
int
delByPrimaryKey
(
@Param
(
"staffClerkRelationId"
)
String
staffClerkRelationId
);
int
delByPrimaryKey
(
@Param
(
"staffClerkRelationId"
)
String
staffClerkRelationId
);
void
delByClerkId
(
@Param
(
"clerkId"
)
String
clerkId
);
void
delByClerkId
(
@Param
(
"clerkId"
)
String
clerkId
);
List
<
TabHaobanStaffClerkRelation
>
listByEnterpriseIdAndStaffid
(
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"staffId"
)
String
staffId
);
List
<
StaffClerkRelationDTO
>
listByEnterpriseIdAndStaffid
(
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"staffId"
)
String
staffId
);
List
<
TabHaobanStaffClerkRelation
>
lisByStaffId
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"staffId"
)
String
staffId
,
@Param
(
"storeIdList"
)
List
<
String
>
storeIdList
);
List
<
StaffClerkRelationDTO
>
lisByStaffId
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"staffId"
)
String
staffId
,
@Param
(
"storeIdList"
)
List
<
String
>
storeIdList
);
TabHaobanStaffClerkRelation
getByCodeAndStoreId
(
@Param
(
"clerkCode"
)
String
clerkCode
,
@Param
(
"storeId"
)
String
storeId
);
StaffClerkRelationDTO
getByCodeAndStoreId
(
@Param
(
"clerkCode"
)
String
clerkCode
,
@Param
(
"storeId"
)
String
storeId
);
List
<
String
>
listByWxEnterpriseId
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
List
<
String
>
listByWxEnterpriseId
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
List
<
TabHaobanStaffClerkRelation
>
pageByWxEnterpriseId
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
List
<
StaffClerkRelationDTO
>
pageByWxEnterpriseId
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
List
<
StaffClerkRelationDTO
>
listBindByStoreId
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"storeId"
)
String
storeId
);
/**
/**
* 授权绑定的列表
* 查询有关联的员工id列表
*
* @param wxEnterpriseId
* @param storeIds
* @return
*/
*/
List
<
TabHaobanStaffClerkRelation
>
listBindByStoreIds
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"storeIds"
)
Set
<
String
>
storeIds
);
List
<
String
>
listRelationsStaffId
(
@Param
(
"staffIdList"
)
Set
<
String
>
staffIdList
);
/**
/**
* 授权绑定的列表
* 已使用的门店id列表
*
* @param wxEnterpriseId
* @param storeIds
* @return
*/
*/
List
<
TabHaobanStaffClerkRelation
>
listBindNotInStoreIds
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"storeIds"
)
Set
<
String
>
storeIds
);
List
<
StaffClerkRelationDTO
>
listBindStoreIdByEnterpriseId
(
String
enterpriseId
);
/**
/**
* 删除绑定根据门店
* 删除绑定根据门店
*
* @param storeIds
*/
*/
void
delByStoreIds
(
@Param
(
"storeIds"
)
Set
<
String
>
storeIds
);
void
delByStoreIds
(
@Param
(
"storeIds"
)
Set
<
String
>
storeIds
);
/**
/**
* 已使用的门店id列表
* 批量查询会员与导购关系并且返回关联信息
*
* @param enterpriseId
*/
List
<
TabHaobanStaffClerkRelation
>
listBindStoreIdByEnterpriseId
(
String
enterpriseId
);
/**
* 查询有关联的员工id列表
*
* @param staffIdList 员工id列表
* @return {@link List<String>}
* @author: YongEn
*/
List
<
String
>
listRelationsStaffId
(
@Param
(
"staffIdList"
)
Set
<
String
>
staffIdList
);
/**
* 批量查询会员与导购关系并且返回关联信息(新企业)
*/
*/
List
<
MemberStaffRelExtDO
>
listMemberStaffRelNew
(
List
<
MemberStaffRelExtDO
>
listMemberStaffRelNew
(
@Param
(
"memberIdList"
)
List
<
String
>
memberIdList
,
@Param
(
"memberIdList"
)
List
<
String
>
memberIdList
,
...
@@ -146,77 +85,24 @@ public interface TabHaobanStaffClerkRelationMapper {
...
@@ -146,77 +85,24 @@ public interface TabHaobanStaffClerkRelationMapper {
/**
/**
* 根据导购查询wxuserid
* 根据导购查询wxuserid
*
* @param clerkIds 职员id
* @param wxEnterpriseId wx企业标识
* @return {@link List }<{@link String }>
* @author mozhu
* @date 2022-07-07 15:26:34
*/
*/
List
<
String
>
listWxUserIdByClerkIds
(
@Param
(
"clerkIds"
)
List
<
String
>
clerkIds
,
List
<
String
>
listWxUserIdByClerkIds
(
@Param
(
"clerkIds"
)
List
<
String
>
clerkIds
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"type"
)
int
type
);
/**
* 根据导购查询wxopenuserid
*
* @param clerkIds 职员id
* @param wxEnterpriseId wx企业标识
* @return {@link List }<{@link String }>
* @author mozhu
* @date 2022-08-09 00:42:31
*/
List
<
String
>
listWxOpenUserIdByClerkIds
(
@Param
(
"clerkIds"
)
List
<
String
>
clerkIds
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
/**
* 通过open userId 查询id
*
* @param wxOpenUserIds wx开放用户id
* @param wxEnterpriseId wx企业标识
* @param enterpriseId 企业标识
* @return {@link List }<{@link StaffClerkRelationDTO }>
* @author mozhu
* @date 2022-08-08 21:51:22
*/
List
<
StaffClerkRelationDTO
>
listIdsByWxOpenUserIds
(
@Param
(
"wxOpenUserIds"
)
List
<
String
>
wxOpenUserIds
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"enterpriseId"
)
String
enterpriseId
);
/**
/**
* id wx用户id列表
* id wx用户id列表
*
* @param wxUserIds wx用户id
* @param wxEnterpriseId wx企业标识
* @param enterpriseId 企业标识
* @return {@link List }<{@link StaffClerkRelationDTO }>
* @author mozhu
* @date 2022-08-16 14:35:28
*/
*/
List
<
StaffClerkRelationDTO
>
listIdsByWxUserIds
(
@Param
(
"wxUserIds"
)
List
<
String
>
wxUserIds
,
List
<
StaffClerkRelationDTO
>
listIdsByWxUserIds
(
@Param
(
"wxUserIds"
)
List
<
String
>
wxUserIds
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"enterpriseId"
)
String
enterpriseId
);
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"type"
)
int
type
);
/**
/**
* 更新联系我状态
* 更新联系我状态
*
* @param openConcatFlag 打开concat国旗
* @param staffClerkRelationId 员工职员关系id
* @return int
* @author mozhu
* @date 2022-07-07 15:32:23
*/
*/
int
updateOpenConcatFlagById
(
@Param
(
"openConcatFlag"
)
Integer
openConcatFlag
,
@Param
(
"staffClerkRelationId"
)
String
staffClerkRelationId
);
int
updateOpenConcatFlagById
(
@Param
(
"openConcatFlag"
)
Integer
openConcatFlag
,
@Param
(
"staffClerkRelationId"
)
String
staffClerkRelationId
);
/**
/**
* 通过openuserid 不在范围内 查询id
* 通过openuserid 不在范围内 查询id
*
* @param wxOpenUserIds wx开放用户id
* @param wxEnterpriseId wx企业标识
* @param enterpriseId 企业标识
* @return {@link List }<{@link StaffClerkRelationDTO }>
* @author mozhu
* @date 2022-08-08 22:02:18
*/
*/
List
<
StaffClerkRelationDTO
>
listIdsByNotInWxOpenUserIds
(
@Param
(
"wxOpenUserIds"
)
List
<
String
>
wxOpenUserIds
,
List
<
StaffClerkRelationDTO
>
listIdsByNotInWxOpenUserIds
(
@Param
(
"wxOpenUserIds"
)
List
<
String
>
wxOpenUserIds
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
...
@@ -225,13 +111,6 @@ public interface TabHaobanStaffClerkRelationMapper {
...
@@ -225,13 +111,6 @@ public interface TabHaobanStaffClerkRelationMapper {
/**
/**
* 通过userid 不在范围内 查询id
* 通过userid 不在范围内 查询id
*
* @param wxUserIds wx用户id
* @param wxEnterpriseId wx企业标识
* @param enterpriseId 企业标识
* @return {@link List }<{@link StaffClerkRelationDTO }>
* @author mozhu
* @date 2022-08-16 14:45:57
*/
*/
List
<
StaffClerkRelationDTO
>
listIdsByNotInWxUserIds
(
@Param
(
"wxUserIds"
)
List
<
String
>
wxUserIds
,
List
<
StaffClerkRelationDTO
>
listIdsByNotInWxUserIds
(
@Param
(
"wxUserIds"
)
List
<
String
>
wxUserIds
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
...
@@ -241,16 +120,12 @@ public interface TabHaobanStaffClerkRelationMapper {
...
@@ -241,16 +120,12 @@ public interface TabHaobanStaffClerkRelationMapper {
/**
/**
* 获取区经
* 获取区经
*
* @param enterpriseId 企业标识
* @return int
*/
*/
int
getBindByManage
(
@Param
(
"enterpriseId"
)
String
enterpriseId
);
int
getBindByManage
(
@Param
(
"enterpriseId"
)
String
enterpriseId
);
int
getBindByStaffIdAndEnterpriseId
(
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"staffId"
)
String
staffId
);
int
getBindByStaffIdAndEnterpriseId
(
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"staffId"
)
String
staffId
);
List
<
TabHaobanStaffClerkRelation
>
listManageBindByStaffId
(
@Param
(
"staffId"
)
String
staffId
);
List
<
StaffClerkRelationDTO
>
listManageBindByStaffId
(
@Param
(
"staffId"
)
String
staffId
);
List
<
TabHaobanStaffClerkRelation
>
listByStoreIds
(
@Param
(
"storeIds"
)
List
<
String
>
storeIds
);
List
<
StaffClerkRelationDTO
>
listByStoreIds
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"storeIds"
)
List
<
String
>
storeIds
);
}
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/entity/ext/MemberStaffRelExtDO.java
View file @
c3ed75be
package
com
.
gic
.
haoban
.
manage
.
service
.
entity
.
ext
;
package
com
.
gic
.
haoban
.
manage
.
service
.
entity
.
ext
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
/**
* desc:会员导购关系扩展实体类
* desc:会员导购关系扩展实体类
...
@@ -24,6 +25,16 @@ public class MemberStaffRelExtDO implements Serializable {
...
@@ -24,6 +25,16 @@ public class MemberStaffRelExtDO implements Serializable {
*/
*/
private
String
staffClerkId
;
private
String
staffClerkId
;
private
Date
addFriendTime
;
public
Date
getAddFriendTime
()
{
return
addFriendTime
;
}
public
void
setAddFriendTime
(
Date
addFriendTime
)
{
this
.
addFriendTime
=
addFriendTime
;
}
public
String
getMemberId
()
{
public
String
getMemberId
()
{
return
memberId
;
return
memberId
;
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/ErrorLogService.java
deleted
100644 → 0
View file @
db3e0508
package
com
.
gic
.
haoban
.
manage
.
service
.
service
;
import
com.gic.haoban.manage.service.entity.TabHaobanErrorLog
;
/**
* desc:好办错误日志服务
*
* @author: YongEn
* @date: 2022/1/18
**/
public
interface
ErrorLogService
{
/**
* desc: 保存错误日志
*
* @param errorLog
* @return :
* @author : YongEn
* @date : 2022/1/18
*/
void
save
(
TabHaobanErrorLog
errorLog
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/StaffClerkRelationService.java
View file @
c3ed75be
...
@@ -14,7 +14,7 @@ public interface StaffClerkRelationService {
...
@@ -14,7 +14,7 @@ public interface StaffClerkRelationService {
List
<
StaffClerkRelationDTO
>
listBindCodeByStaffId
(
List
<
String
>
enterpriseIdList
,
String
staffId
);
List
<
StaffClerkRelationDTO
>
listBindCodeByStaffId
(
List
<
String
>
enterpriseIdList
,
String
staffId
);
boolean
delBind
(
String
clerkId
,
String
optStaffId
,
int
channelCode
,
String
newClerkId
);
boolean
delBind
(
String
clerkId
,
String
optStaffId
,
int
channelCode
,
String
newClerkId
,
String
wxEnterpriseId
);
/**
/**
* 解绑-删除绑定(门店级别)
* 解绑-删除绑定(门店级别)
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/ErrorLogServiceImpl.java
deleted
100644 → 0
View file @
db3e0508
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
impl
;
import
com.gic.commons.util.UniqueIdUtils
;
import
com.gic.haoban.manage.service.dao.mapper.TabHaobanErrorLogMapper
;
import
com.gic.haoban.manage.service.entity.TabHaobanErrorLog
;
import
com.gic.haoban.manage.service.service.ErrorLogService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
/**
* desc:
*
* @author: YongEn
* @date: 2022/1/18
**/
@Service
public
class
ErrorLogServiceImpl
implements
ErrorLogService
{
@Autowired
private
TabHaobanErrorLogMapper
tabHaobanErrorLogMapper
;
@Override
public
void
save
(
TabHaobanErrorLog
errorLog
)
{
errorLog
.
setId
(
UniqueIdUtils
.
uniqueLong
());
errorLog
.
setCreateTime
(
new
Date
());
errorLog
.
setUpdateTime
(
new
Date
());
tabHaobanErrorLogMapper
.
insert
(
errorLog
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/StaffClerkRelationServiceImpl.java
View file @
c3ed75be
...
@@ -72,17 +72,21 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
...
@@ -72,17 +72,21 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
@Override
@Override
public
List
<
StaffClerkRelationDTO
>
listBindCode
(
String
wxEnterpriseId
,
String
enterpriseId
,
Set
<
String
>
clerkCodeList
)
{
public
List
<
StaffClerkRelationDTO
>
listBindCode
(
String
wxEnterpriseId
,
String
enterpriseId
,
Set
<
String
>
clerkCodeList
)
{
return
EntityUtil
.
changeEntityListByJSON
(
StaffClerkRelationDTO
.
class
,
mapper
.
listBindCode
(
wxEnterpriseId
,
enterpriseId
,
clerkCodeList
)
);
return
mapper
.
listBindCode
(
wxEnterpriseId
,
enterpriseId
,
clerkCodeList
);
}
}
@Override
@Override
public
List
<
StaffClerkRelationDTO
>
listBindCodeByStaffId
(
List
<
String
>
enterpriseIdList
,
String
staffId
)
{
public
List
<
StaffClerkRelationDTO
>
listBindCodeByStaffId
(
List
<
String
>
enterpriseIdList
,
String
staffId
)
{
return
EntityUtil
.
changeEntityListByJSON
(
StaffClerkRelationDTO
.
class
,
mapper
.
listBindCodeByStaffId
(
enterpriseIdList
,
staffId
)
);
return
mapper
.
listBindCodeByStaffId
(
enterpriseIdList
,
staffId
);
}
}
@Override
@Override
public
boolean
delBind
(
String
oldClerkId
,
String
optStaffId
,
int
channelCode
,
String
newClerkId
)
{
public
boolean
delBind
(
String
oldClerkId
,
String
optStaffId
,
int
channelCode
,
String
newClerkId
,
String
wxEnterpriseId
)
{
TabHaobanStaffClerkRelation
clerkRelation
=
mapper
.
getByClerkId
(
oldClerkId
,
null
);
TabHaobanStaff
staff
=
this
.
staffService
.
selectById
(
optStaffId
)
;
if
(
null
!=
staff
)
{
wxEnterpriseId
=
staff
.
getWxEnterpriseId
()
;
}
StaffClerkRelationDTO
clerkRelation
=
mapper
.
getOneByClerkId
(
oldClerkId
,
wxEnterpriseId
);
if
(
null
==
clerkRelation
)
{
if
(
null
==
clerkRelation
)
{
logger
.
info
(
"老的绑定关联不存在,clerkId={}"
,
oldClerkId
);
logger
.
info
(
"老的绑定关联不存在,clerkId={}"
,
oldClerkId
);
return
true
;
return
true
;
...
@@ -126,13 +130,15 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
...
@@ -126,13 +130,15 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
logger
.
info
(
"没有传门店列表:{}"
,
wxEnterpriseId
);
logger
.
info
(
"没有传门店列表:{}"
,
wxEnterpriseId
);
return
true
;
return
true
;
}
}
List
<
TabHaobanStaffClerkRelation
>
needUnbind
=
mapper
.
listBindByStoreIds
(
wxEnterpriseId
,
storeIds
);
List
<
String
>
storeIdList
=
new
ArrayList
<>();
storeIdList
.
addAll
(
storeIds
)
;
List
<
StaffClerkRelationDTO
>
needUnbind
=
mapper
.
listByStoreIds
(
wxEnterpriseId
,
storeIdList
);
if
(
CollectionUtils
.
isEmpty
(
needUnbind
))
{
if
(
CollectionUtils
.
isEmpty
(
needUnbind
))
{
logger
.
info
(
"没有门店绑定了需要解绑的:{}"
,
wxEnterpriseId
);
logger
.
info
(
"没有门店绑定了需要解绑的:{}"
,
wxEnterpriseId
);
return
true
;
return
true
;
}
}
for
(
TabHaobanStaffClerkRelation
staffClerkRelation
:
needUnbind
)
{
for
(
StaffClerkRelationDTO
staffClerkRelation
:
needUnbind
)
{
String
enterpriseId
=
staffClerkRelation
.
getEnterpriseId
();
String
enterpriseId
=
staffClerkRelation
.
getEnterpriseId
();
//删除好友通知会员
//删除好友通知会员
List
<
String
>
memberIds
=
externalClerkRelatedService
.
getByStoreIdAndStaffId
(
staffClerkRelation
.
getStoreId
(),
staffClerkRelation
.
getStaffId
());
List
<
String
>
memberIds
=
externalClerkRelatedService
.
getByStoreIdAndStaffId
(
staffClerkRelation
.
getStoreId
(),
staffClerkRelation
.
getStaffId
());
...
@@ -146,7 +152,7 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
...
@@ -146,7 +152,7 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
clerkMainStoreRelatedService
.
delMainStoreByStoreIds
(
storeIds
);
clerkMainStoreRelatedService
.
delMainStoreByStoreIds
(
storeIds
);
//放入队列
//放入队列
staffClerkBindLogService
.
pushToMqBatch
(
optStaffId
,
BindTypeEnum
.
UNBIND
.
getVal
(),
channelCode
,
need
);
staffClerkBindLogService
.
pushToMqBatch
(
optStaffId
,
BindTypeEnum
.
UNBIND
.
getVal
(),
channelCode
,
need
);
for
(
TabHaobanStaffClerkRelation
clerkRelation
:
needUnbind
)
{
for
(
StaffClerkRelationDTO
clerkRelation
:
needUnbind
)
{
//废弃活码
//废弃活码
String
enterpriseId
=
clerkRelation
.
getEnterpriseId
();
String
enterpriseId
=
clerkRelation
.
getEnterpriseId
();
hmClerkRelationApiService
.
delByClerkId
(
clerkRelation
.
getClerkId
(),
enterpriseId
,
wxEnterpriseId
,
channelCode
);
hmClerkRelationApiService
.
delByClerkId
(
clerkRelation
.
getClerkId
(),
enterpriseId
,
wxEnterpriseId
,
channelCode
);
...
@@ -212,13 +218,12 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
...
@@ -212,13 +218,12 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
@Override
@Override
public
StaffClerkRelationDTO
getBindByClerkId
(
String
clerkId
,
String
wxEnterpriseId
)
{
public
StaffClerkRelationDTO
getBindByClerkId
(
String
clerkId
,
String
wxEnterpriseId
)
{
TabHaobanStaffClerkRelation
relation
=
mapper
.
getBindByClerkId
(
clerkId
,
wxEnterpriseId
);
return
mapper
.
getOneByClerkId
(
clerkId
,
wxEnterpriseId
);
return
EntityUtil
.
changeEntityByJSON
(
StaffClerkRelationDTO
.
class
,
relation
);
}
}
@Override
@Override
public
StaffClerkRelationDTO
getByCodeAndEnterpriseId
(
String
clerkCode
,
String
enterpriseId
)
{
public
StaffClerkRelationDTO
getByCodeAndEnterpriseId
(
String
clerkCode
,
String
enterpriseId
)
{
return
EntityUtil
.
changeEntityByJSON
(
StaffClerkRelationDTO
.
class
,
mapper
.
getByCodeAndEnterpriseId
(
clerkCode
,
enterpriseId
)
);
return
mapper
.
getByCodeAndEnterpriseId
(
clerkCode
,
enterpriseId
);
}
}
...
@@ -254,17 +259,17 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
...
@@ -254,17 +259,17 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
@Override
@Override
public
StaffClerkRelationDTO
getOneBindByStoreId
(
String
staffId
,
String
storeId
)
{
public
StaffClerkRelationDTO
getOneBindByStoreId
(
String
staffId
,
String
storeId
)
{
return
EntityUtil
.
changeEntityByJSON
(
StaffClerkRelationDTO
.
class
,
mapper
.
getOneBindStoreId
(
staffId
,
storeId
)
);
return
mapper
.
getOneByStoreIdAndStaffId
(
storeId
,
staffId
);
}
}
@Override
@Override
public
StaffClerkRelationDTO
getByClerkId
(
String
clerkId
)
{
public
StaffClerkRelationDTO
getByClerkId
(
String
clerkId
)
{
return
EntityUtil
.
changeEntityByJSON
(
StaffClerkRelationDTO
.
class
,
mapper
.
getByClerkId
(
clerkId
,
null
)
);
return
mapper
.
getOneByClerkId
(
clerkId
,
null
);
}
}
@Override
@Override
public
StaffClerkRelationDTO
getByClerkId
(
String
clerkId
,
String
wxEnterpriseId
)
{
public
StaffClerkRelationDTO
getByClerkId
(
String
clerkId
,
String
wxEnterpriseId
)
{
TabHaobanStaffClerkRelation
staffClerkRelation
=
mapper
.
get
ByClerkId
(
clerkId
,
wxEnterpriseId
);
StaffClerkRelationDTO
staffClerkRelation
=
mapper
.
getOne
ByClerkId
(
clerkId
,
wxEnterpriseId
);
return
EntityUtil
.
changeEntityNew
(
StaffClerkRelationDTO
.
class
,
staffClerkRelation
);
return
EntityUtil
.
changeEntityNew
(
StaffClerkRelationDTO
.
class
,
staffClerkRelation
);
}
}
...
@@ -308,19 +313,19 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
...
@@ -308,19 +313,19 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
@Override
@Override
public
Page
<
StaffClerkRelationDTO
>
pageByWxEnterpriseId
(
String
wxEnterpriseId
,
BasePageInfo
pageInfo
)
{
public
Page
<
StaffClerkRelationDTO
>
pageByWxEnterpriseId
(
String
wxEnterpriseId
,
BasePageInfo
pageInfo
)
{
PageHelper
.
startPage
(
pageInfo
);
PageHelper
.
startPage
(
pageInfo
);
List
<
TabHaobanStaffClerkRelation
>
clerkBindList
=
mapper
.
pageByWxEnterpriseId
(
wxEnterpriseId
);
List
<
StaffClerkRelationDTO
>
clerkBindList
=
mapper
.
pageByWxEnterpriseId
(
wxEnterpriseId
);
Page
<
StaffClerkRelationDTO
>
retPage
=
PageUtil
.
changePageHelperToCurrentPage
(
new
PageInfo
<>(
clerkBindList
),
StaffClerkRelationDTO
.
class
);
Page
<
StaffClerkRelationDTO
>
retPage
=
PageUtil
.
changePageHelperToCurrentPage
(
new
PageInfo
<>(
clerkBindList
),
StaffClerkRelationDTO
.
class
);
return
retPage
;
return
retPage
;
}
}
@Override
@Override
public
List
<
StaffClerkRelationDTO
>
listBindByStoreId
(
String
wxEnterpriseId
,
String
storeId
)
{
public
List
<
StaffClerkRelationDTO
>
listBindByStoreId
(
String
wxEnterpriseId
,
String
storeId
)
{
return
mapper
.
listB
indByStoreId
(
wxEnterpriseId
,
storeId
);
return
mapper
.
listB
yStoreIds
(
wxEnterpriseId
,
Arrays
.
asList
(
storeId
)
);
}
}
@Override
@Override
public
List
<
StaffClerkRelationDTO
>
listBindStoreIdByEnterpriseId
(
String
enterpriseId
)
{
public
List
<
StaffClerkRelationDTO
>
listBindStoreIdByEnterpriseId
(
String
enterpriseId
)
{
List
<
TabHaobanStaffClerkRelation
>
clerkRelations
=
mapper
.
listBindStoreIdByEnterpriseId
(
enterpriseId
);
List
<
StaffClerkRelationDTO
>
clerkRelations
=
mapper
.
listBindStoreIdByEnterpriseId
(
enterpriseId
);
if
(
CollectionUtils
.
isEmpty
(
clerkRelations
))
{
if
(
CollectionUtils
.
isEmpty
(
clerkRelations
))
{
return
new
ArrayList
<>();
return
new
ArrayList
<>();
}
}
...
@@ -339,9 +344,9 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
...
@@ -339,9 +344,9 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
}
}
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
wxEnterpriseId
);
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
wxEnterpriseId
);
if
(
qwDTO
.
needOpenUserId3th
())
{
if
(
qwDTO
.
needOpenUserId3th
())
{
return
mapper
.
listWx
OpenUserIdByClerkIds
(
clerkList
,
wxEnterpriseId
);
return
mapper
.
listWx
UserIdByClerkIds
(
clerkList
,
wxEnterpriseId
,
2
);
}
}
return
mapper
.
listWxUserIdByClerkIds
(
clerkList
,
wxEnterpriseId
);
return
mapper
.
listWxUserIdByClerkIds
(
clerkList
,
wxEnterpriseId
,
1
);
}
}
@Override
@Override
...
@@ -351,9 +356,9 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
...
@@ -351,9 +356,9 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
}
}
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
wxEnterpriseId
);
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
wxEnterpriseId
);
if
(
qwDTO
.
needOpenUserId3th
())
{
if
(
qwDTO
.
needOpenUserId3th
())
{
return
mapper
.
listIdsByWx
OpenUserIds
(
wxUserIds
,
wxEnterpriseId
,
enterpriseId
);
return
mapper
.
listIdsByWx
UserIds
(
wxUserIds
,
wxEnterpriseId
,
enterpriseId
,
2
);
}
}
return
mapper
.
listIdsByWxUserIds
(
wxUserIds
,
wxEnterpriseId
,
enterpriseId
);
return
mapper
.
listIdsByWxUserIds
(
wxUserIds
,
wxEnterpriseId
,
enterpriseId
,
1
);
}
}
@Override
@Override
...
@@ -385,6 +390,6 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
...
@@ -385,6 +390,6 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
@Override
@Override
public
List
<
StaffClerkRelationDTO
>
listManageBindByStaffId
(
String
staffId
)
{
public
List
<
StaffClerkRelationDTO
>
listManageBindByStaffId
(
String
staffId
)
{
return
EntityUtil
.
changeEntityListNew
(
StaffClerkRelationDTO
.
class
,
mapper
.
listManageBindByStaffId
(
staffId
)
);
return
mapper
.
listManageBindByStaffId
(
staffId
);
}
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/AuditApiServiceImpl.java
View file @
c3ed75be
...
@@ -216,7 +216,7 @@ public class AuditApiServiceImpl implements AuditApiService {
...
@@ -216,7 +216,7 @@ public class AuditApiServiceImpl implements AuditApiService {
if
(
StringUtils
.
isNotBlank
(
batchId
))
{
if
(
StringUtils
.
isNotBlank
(
batchId
))
{
insertBatchLog
(
batchId
,
AuditRsultType
.
success
.
getCode
(),
tab
);
insertBatchLog
(
batchId
,
AuditRsultType
.
success
.
getCode
(),
tab
);
}
}
staffClerkRelationApiService
.
unbindByStaffAndClerkId
(
optStaffId
,
obj
.
getClerkId
(),
ChannelCodeEnum
.
AUDIT_UNBIND
.
getCode
());
staffClerkRelationApiService
.
unbindByStaffAndClerkId
(
optStaffId
,
obj
.
getClerkId
(),
ChannelCodeEnum
.
AUDIT_UNBIND
.
getCode
()
,
obj
.
getWxEnterpriseId
()
);
staffDepartmentRelatedApiService
.
sendClerkDel
(
obj
.
getClerkName
(),
obj
.
getClerkCode
(),
tab
.
getCommitStoreId
(),
1
,
""
);
staffDepartmentRelatedApiService
.
sendClerkDel
(
obj
.
getClerkName
(),
obj
.
getClerkCode
(),
tab
.
getCommitStoreId
(),
1
,
""
);
}
else
if
(
auditType
==
AuditType
.
CLERK_UNBIND
.
getCode
())
{
}
else
if
(
auditType
==
AuditType
.
CLERK_UNBIND
.
getCode
())
{
//解绑申请,无需审核,直接通过
//解绑申请,无需审核,直接通过
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/ErrorLogApiServiceImpl.java
deleted
100644 → 0
View file @
db3e0508
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.haoban.manage.api.dto.ErrorLogDTO
;
import
com.gic.haoban.manage.api.service.out.ErrorLogApiService
;
import
com.gic.haoban.manage.service.entity.TabHaobanErrorLog
;
import
com.gic.haoban.manage.service.service.ErrorLogService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
/**
* desc:好办错误日志服务实现
*
* @author: YongEn
* @date: 2022/1/18
**/
@Service
public
class
ErrorLogApiServiceImpl
implements
ErrorLogApiService
{
@Autowired
private
ErrorLogService
errorLogService
;
@Override
public
void
save
(
ErrorLogDTO
dto
)
{
TabHaobanErrorLog
errorLog
=
EntityUtil
.
changeEntityNew
(
TabHaobanErrorLog
.
class
,
dto
);
errorLogService
.
save
(
errorLog
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/ExternalClerkRelatedApiServiceImpl.java
View file @
c3ed75be
...
@@ -26,7 +26,6 @@ import com.gic.haoban.manage.api.service.ExternalClerkRelatedApiService;
...
@@ -26,7 +26,6 @@ import com.gic.haoban.manage.api.service.ExternalClerkRelatedApiService;
import
com.gic.haoban.manage.api.service.WxEnterpriseApiService
;
import
com.gic.haoban.manage.api.service.WxEnterpriseApiService
;
import
com.gic.haoban.manage.service.config.Config
;
import
com.gic.haoban.manage.service.config.Config
;
import
com.gic.haoban.manage.service.dao.mapper.*
;
import
com.gic.haoban.manage.service.dao.mapper.*
;
import
com.gic.haoban.manage.service.entity.MemberUnionidRelated
;
import
com.gic.haoban.manage.service.entity.TabHaobanExternalClerkRelated
;
import
com.gic.haoban.manage.service.entity.TabHaobanExternalClerkRelated
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaffClerkRelation
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaffClerkRelation
;
import
com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise
;
import
com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise
;
...
@@ -55,7 +54,6 @@ import org.redisson.api.RateType;
...
@@ -55,7 +54,6 @@ import org.redisson.api.RateType;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.*
;
import
java.util.*
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeUnit
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -68,8 +66,6 @@ public class ExternalClerkRelatedApiServiceImpl implements ExternalClerkRelatedA
...
@@ -68,8 +66,6 @@ public class ExternalClerkRelatedApiServiceImpl implements ExternalClerkRelatedA
@Autowired
@Autowired
private
TabHaobanExternalClerkRelatedMapper
tabHaobanExternalClerkRelatedMapper
;
private
TabHaobanExternalClerkRelatedMapper
tabHaobanExternalClerkRelatedMapper
;
@Autowired
@Autowired
private
MemberUnionidRelatedMapper
memberUnionidRelatedMapper
;
@Autowired
private
TabHaobanStaffClerkRelationMapper
staffClerkRelationMapper
;
private
TabHaobanStaffClerkRelationMapper
staffClerkRelationMapper
;
@Autowired
@Autowired
private
WxEnterpriseMapper
wxEnterriseMapper
;
private
WxEnterpriseMapper
wxEnterriseMapper
;
...
@@ -443,17 +439,32 @@ public class ExternalClerkRelatedApiServiceImpl implements ExternalClerkRelatedA
...
@@ -443,17 +439,32 @@ public class ExternalClerkRelatedApiServiceImpl implements ExternalClerkRelatedA
@Override
@Override
public
boolean
isFriends
(
String
memberId
,
String
clerkId
,
String
enterpriseId
)
{
public
boolean
isFriends
(
String
memberId
,
String
clerkId
,
String
enterpriseId
)
{
TabHaobanStaffClerkRelation
staffClerkRelation
=
staffClerkRelationMapper
.
get
ByClerkId
(
clerkId
,
null
);
StaffClerkRelationDTO
staffClerkRelation
=
staffClerkRelationMapper
.
getOne
ByClerkId
(
clerkId
,
null
);
if
(
staffClerkRelation
==
null
)
{
if
(
staffClerkRelation
==
null
)
{
return
false
;
return
false
;
}
}
String
staffId
=
staffClerkRelation
.
getStaffId
();
String
staffId
=
staffClerkRelation
.
getStaffId
();
log
.
info
(
"【查询会员】clerkId = {},staffId={},memberId={}"
,
clerkId
,
staffId
,
memberId
);
return
this
.
isQwFriend
(
enterpriseId
,
staffId
,
memberId
).
getResult
()
;
}
@Override
public
com
.
gic
.
api
.
base
.
commons
.
ServiceResponse
<
Boolean
>
isQwFriend
(
String
enterpriseId
,
String
staffId
,
String
memberId
)
{
log
.
info
(
"查询是否好友enterpriseId={},staffId={},memberId={}"
,
enterpriseId
,
staffId
,
memberId
);
TabHaobanExternalClerkRelated
externalClerkRelated
=
tabHaobanExternalClerkRelatedMapper
.
getByMemberIdAndStaffId
(
staffId
,
enterpriseId
,
memberId
);
TabHaobanExternalClerkRelated
externalClerkRelated
=
tabHaobanExternalClerkRelatedMapper
.
getByMemberIdAndStaffId
(
staffId
,
enterpriseId
,
memberId
);
if
(
externalClerkRelated
==
null
)
{
if
(
externalClerkRelated
==
null
)
{
return
false
;
return
com
.
gic
.
api
.
base
.
commons
.
ServiceResponse
.
success
(
Boolean
.
FALSE
);
}
return
com
.
gic
.
api
.
base
.
commons
.
ServiceResponse
.
success
(
externalClerkRelated
.
getStatusFlag
()
==
1
);
}
@Override
public
com
.
gic
.
api
.
base
.
commons
.
ServiceResponse
<
String
>
getExternalUseridForWxa
(
String
enterpriseId
,
String
staffId
,
String
memberId
)
{
TabHaobanExternalClerkRelated
externalClerkRelated
=
tabHaobanExternalClerkRelatedMapper
.
getByMemberIdAndStaffId
(
staffId
,
enterpriseId
,
memberId
);
if
(
null
!=
externalClerkRelated
)
{
return
com
.
gic
.
api
.
base
.
commons
.
ServiceResponse
.
success
(
externalClerkRelated
.
getExternalClerkRelatedId
());
}
}
return
externalClerkRelated
.
getStatusFlag
()
==
1
;
return
com
.
gic
.
api
.
base
.
commons
.
ServiceResponse
.
failure
(
"9999"
,
"无好友关系"
)
;
}
}
@Override
@Override
...
@@ -480,7 +491,7 @@ public class ExternalClerkRelatedApiServiceImpl implements ExternalClerkRelatedA
...
@@ -480,7 +491,7 @@ public class ExternalClerkRelatedApiServiceImpl implements ExternalClerkRelatedA
// key-memberId
// key-memberId
MemberStaffRelExtDO:
:
getMemberId
,
MemberStaffRelExtDO:
:
getMemberId
,
// value-list
// value-list
e
->
new
ArrayList
<>(
Collections
.
singletonList
(
new
ClerkStaffWxUserDTO
(
e
.
getStaffId
(),
e
.
getStaffClerkId
(),
e
.
getMemberExternalUserId
()))),
e
->
new
ArrayList
<>(
Collections
.
singletonList
(
new
ClerkStaffWxUserDTO
(
e
.
getStaffId
(),
e
.
getStaffClerkId
(),
e
.
getMemberExternalUserId
()
,
e
.
getAddFriendTime
()
))),
// 重复key的value添加到集合
// 重复key的value添加到集合
(
List
<
ClerkStaffWxUserDTO
>
oldList
,
List
<
ClerkStaffWxUserDTO
>
newList
)
->
{
(
List
<
ClerkStaffWxUserDTO
>
oldList
,
List
<
ClerkStaffWxUserDTO
>
newList
)
->
{
oldList
.
addAll
(
newList
);
oldList
.
addAll
(
newList
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MessageApiServiceImpl.java
View file @
c3ed75be
...
@@ -341,7 +341,7 @@ public class MessageApiServiceImpl implements MessageApiService {
...
@@ -341,7 +341,7 @@ public class MessageApiServiceImpl implements MessageApiService {
List
<
StaffClerkRelationDTO
>
staffClerkRelationDTOS
=
staffClerkRelationApiService
.
listByStaffId
(
wxEnterpriseId
,
staffId
);
List
<
StaffClerkRelationDTO
>
staffClerkRelationDTOS
=
staffClerkRelationApiService
.
listByStaffId
(
wxEnterpriseId
,
staffId
);
if
(
CollectionUtils
.
isNotEmpty
(
staffClerkRelationDTOS
))
{
if
(
CollectionUtils
.
isNotEmpty
(
staffClerkRelationDTOS
))
{
for
(
StaffClerkRelationDTO
staffClerkRelationDTO
:
staffClerkRelationDTOS
)
{
for
(
StaffClerkRelationDTO
staffClerkRelationDTO
:
staffClerkRelationDTOS
)
{
staffClerkRelationApiService
.
unbindByStaffAndClerkId
(
staffId
,
staffClerkRelationDTO
.
getClerkId
(),
ChannelCodeEnum
.
ADMIN_UNBIND
.
getCode
());
staffClerkRelationApiService
.
unbindByStaffAndClerkId
(
staffId
,
staffClerkRelationDTO
.
getClerkId
(),
ChannelCodeEnum
.
ADMIN_UNBIND
.
getCode
()
,
wxEnterpriseId
);
}
}
}
}
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/QwFriendApiServiceImpl.java
View file @
c3ed75be
...
@@ -39,7 +39,7 @@ import com.gic.wechat.api.service.qywx.QywxExternalUserService;
...
@@ -39,7 +39,7 @@ import com.gic.wechat.api.service.qywx.QywxExternalUserService;
public
class
QwFriendApiServiceImpl
implements
QwFriendApiService
{
public
class
QwFriendApiServiceImpl
implements
QwFriendApiService
{
private
static
final
Logger
log
=
LogManager
.
getLogger
(
QwFriendApiService
.
class
);
private
static
final
Logger
log
=
LogManager
.
getLogger
(
QwFriendApiService
.
class
);
private
static
final
int
subjectType
=
0
;
private
int
subjectType
=
0
;
@Autowired
@Autowired
private
EnterpriseUseForbidService
enterpriseUseForbidService
;
private
EnterpriseUseForbidService
enterpriseUseForbidService
;
...
@@ -73,6 +73,9 @@ public class QwFriendApiServiceImpl implements QwFriendApiService {
...
@@ -73,6 +73,9 @@ public class QwFriendApiServiceImpl implements QwFriendApiService {
public
ServiceResponse
<
Map
<
String
,
String
>>
pendingIdCheck
(
String
enterpriseId
,
String
unionid
,
String
openid
,
public
ServiceResponse
<
Map
<
String
,
String
>>
pendingIdCheck
(
String
enterpriseId
,
String
unionid
,
String
openid
,
String
wxaUnionid
,
String
wxaOpenid
,
boolean
setCheckFlag
)
{
String
wxaUnionid
,
String
wxaOpenid
,
boolean
setCheckFlag
)
{
if
(
"ff8080815dacd3a2015dacd3ef5c0000"
.
equals
(
enterpriseId
))
{
subjectType
=
1
;
}
ServiceResponse
<
WxEnterpriseQwDTO
>
corpidResp
=
this
.
checkAndGetCorpid
(
enterpriseId
,
setCheckFlag
);
ServiceResponse
<
WxEnterpriseQwDTO
>
corpidResp
=
this
.
checkAndGetCorpid
(
enterpriseId
,
setCheckFlag
);
if
(!
corpidResp
.
isSuccess
())
{
if
(!
corpidResp
.
isSuccess
())
{
return
ServiceResponse
.
failure
(
corpidResp
.
getCode
(),
corpidResp
.
getMessage
());
return
ServiceResponse
.
failure
(
corpidResp
.
getCode
(),
corpidResp
.
getMessage
());
...
@@ -128,6 +131,9 @@ public class QwFriendApiServiceImpl implements QwFriendApiService {
...
@@ -128,6 +131,9 @@ public class QwFriendApiServiceImpl implements QwFriendApiService {
if
(!
corpidResp
.
isSuccess
())
{
if
(!
corpidResp
.
isSuccess
())
{
return
ServiceResponse
.
failure
(
corpidResp
.
getCode
(),
corpidResp
.
getMessage
());
return
ServiceResponse
.
failure
(
corpidResp
.
getCode
(),
corpidResp
.
getMessage
());
}
}
if
(
"ff8080815dacd3a2015dacd3ef5c0000"
.
equals
(
enterpriseId
))
{
subjectType
=
1
;
}
String
suiteid
=
config
.
getWxSuiteid
();
String
suiteid
=
config
.
getWxSuiteid
();
WxEnterpriseQwDTO
qwDTO
=
corpidResp
.
getResult
();
WxEnterpriseQwDTO
qwDTO
=
corpidResp
.
getResult
();
String
wxEnterpriseId
=
qwDTO
.
getWxEnterpriseId
();
String
wxEnterpriseId
=
qwDTO
.
getWxEnterpriseId
();
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffApiServiceImpl.java
View file @
c3ed75be
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
import
cn.hutool.core.collection.CollectionUtil
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -28,6 +27,7 @@ import com.gic.commons.util.GlobalInfo;
...
@@ -28,6 +27,7 @@ import com.gic.commons.util.GlobalInfo;
import
com.gic.commons.util.GlobalVar
;
import
com.gic.commons.util.GlobalVar
;
import
com.gic.commons.util.ImageUtil
;
import
com.gic.commons.util.ImageUtil
;
import
com.gic.enterprise.api.dto.EnterpriseSettingDTO
;
import
com.gic.enterprise.api.dto.EnterpriseSettingDTO
;
import
com.gic.enterprise.api.dto.StoreDTO
;
import
com.gic.enterprise.api.dto.StoreGroupDTO
;
import
com.gic.enterprise.api.dto.StoreGroupDTO
;
import
com.gic.enterprise.api.dto.StoreWidgetDTO
;
import
com.gic.enterprise.api.dto.StoreWidgetDTO
;
import
com.gic.enterprise.api.service.EnterpriseService
;
import
com.gic.enterprise.api.service.EnterpriseService
;
...
@@ -38,7 +38,16 @@ import com.gic.haoban.base.api.common.ServiceResponse;
...
@@ -38,7 +38,16 @@ import com.gic.haoban.base.api.common.ServiceResponse;
import
com.gic.haoban.common.utils.PageUtil
;
import
com.gic.haoban.common.utils.PageUtil
;
import
com.gic.haoban.common.utils.RolesListUtils
;
import
com.gic.haoban.common.utils.RolesListUtils
;
import
com.gic.haoban.common.utils.UuidUtil
;
import
com.gic.haoban.common.utils.UuidUtil
;
import
com.gic.haoban.manage.api.dto.*
;
import
com.gic.haoban.manage.api.dto.DepartmentDTO
;
import
com.gic.haoban.manage.api.dto.SecretSettingDTO
;
import
com.gic.haoban.manage.api.dto.StaffClerkRelationDTO
;
import
com.gic.haoban.manage.api.dto.StaffDTO
;
import
com.gic.haoban.manage.api.dto.StaffDepartmentRelatedDTO
;
import
com.gic.haoban.manage.api.dto.StaffPrivacyUseLogDTO
;
import
com.gic.haoban.manage.api.dto.StaffQrCodeDTO
;
import
com.gic.haoban.manage.api.dto.UserLoginLogDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseQwDTO
;
import
com.gic.haoban.manage.api.dto.role.StoreRoleDTO
;
import
com.gic.haoban.manage.api.dto.role.StoreRoleDTO
;
import
com.gic.haoban.manage.api.enums.SecretTypeEnum
;
import
com.gic.haoban.manage.api.enums.SecretTypeEnum
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
...
@@ -69,6 +78,8 @@ import com.gic.wechat.api.service.qywx.QywxUserApiService;
...
@@ -69,6 +78,8 @@ import com.gic.wechat.api.service.qywx.QywxUserApiService;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
cn.hutool.core.collection.CollectionUtil
;
@Service
@Service
public
class
StaffApiServiceImpl
implements
StaffApiService
{
public
class
StaffApiServiceImpl
implements
StaffApiService
{
...
@@ -803,24 +814,24 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -803,24 +814,24 @@ public class StaffApiServiceImpl implements StaffApiService {
Object
cache
=
RedisUtil
.
getCache
(
cacheKey
);
Object
cache
=
RedisUtil
.
getCache
(
cacheKey
);
if
(
cache
!=
null
)
{
if
(
cache
!=
null
)
{
List
<
String
>
storeList
=
(
List
<
String
>)
cache
;
List
<
String
>
storeList
=
(
List
<
String
>)
cache
;
logger
.
info
(
"从缓存中获取
通道={},
数量:{}"
,
cacheKey
,
storeList
.
size
());
logger
.
info
(
"从缓存中获取
key={},store
数量:{}"
,
cacheKey
,
storeList
.
size
());
return
storeList
;
return
storeList
;
}
}
ClerkDTO
clerkDTO
=
clerkService
.
getClerkByClerkId
(
clerkId
);
ClerkDTO
clerkDTO
=
clerkService
.
getClerkByClerkId
(
clerkId
);
if
(
clerkDTO
==
null
)
{
if
(
clerkDTO
==
null
)
{
logger
.
info
(
"导购不存在:clerkId:{}"
,
clerkId
);
logger
.
info
(
"导购不存在:clerkId:{}
,无门店
"
,
clerkId
);
return
Collections
.
emptyList
();
return
Collections
.
emptyList
();
}
}
String
enterpriseId
=
clerkDTO
.
getEnterpriseId
();
String
enterpriseId
=
clerkDTO
.
getEnterpriseId
();
List
<
String
>
enterpriseIdStoreIds
=
storeRangeService
.
listStoreIdByWxEnterpriseId
(
wxEnterpriseId
,
enterpriseId
);
List
<
String
>
enterpriseIdStoreIds
=
storeRangeService
.
listStoreIdByWxEnterpriseId
(
wxEnterpriseId
,
enterpriseId
);
if
(
CollectionUtils
.
isEmpty
(
enterpriseIdStoreIds
))
{
if
(
CollectionUtils
.
isEmpty
(
enterpriseIdStoreIds
))
{
logger
.
info
(
"
好办门店空
,eid={}"
,
enterpriseId
);
logger
.
info
(
"
无好办门店
,eid={}"
,
enterpriseId
);
return
Collections
.
emptyList
();
return
Collections
.
emptyList
();
}
}
logger
.
info
(
"好办门店
id数量:
{}"
,
enterpriseIdStoreIds
.
size
());
logger
.
info
(
"好办门店
数量=
{}"
,
enterpriseIdStoreIds
.
size
());
List
<
String
>
gicStoreIds
=
getStoreIdList
(
clerkDTO
);
List
<
String
>
gicStoreIds
=
getStoreIdList
(
clerkDTO
);
if
(
CollectionUtils
.
isEmpty
(
gicStoreIds
))
{
if
(
CollectionUtils
.
isEmpty
(
gicStoreIds
))
{
logger
.
info
(
"gic门店为空"
);
logger
.
info
(
"
无
gic门店为空"
);
return
Collections
.
emptyList
();
return
Collections
.
emptyList
();
}
}
if
(
gicStoreIds
.
contains
(
"-1"
))
{
if
(
gicStoreIds
.
contains
(
"-1"
))
{
...
@@ -840,10 +851,10 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -840,10 +851,10 @@ public class StaffApiServiceImpl implements StaffApiService {
RedisUtil
.
setCache
(
cacheKey
,
enterpriseIdStoreIds
,
10L
,
TimeUnit
.
MINUTES
);
RedisUtil
.
setCache
(
cacheKey
,
enterpriseIdStoreIds
,
10L
,
TimeUnit
.
MINUTES
);
return
enterpriseIdStoreIds
;
return
enterpriseIdStoreIds
;
}
}
logger
.
info
(
"gic门店数量
:
{}"
,
gicStoreIds
.
size
());
logger
.
info
(
"gic门店数量
=
{}"
,
gicStoreIds
.
size
());
//取交集
//取交集
List
<
String
>
storeList
=
RolesListUtils
.
mergeList
(
enterpriseIdStoreIds
,
gicStoreIds
);
List
<
String
>
storeList
=
RolesListUtils
.
mergeList
(
enterpriseIdStoreIds
,
gicStoreIds
);
logger
.
info
(
"
该导购权限:clerkId:{},门店数量:
{}"
,
clerkId
,
storeList
.
size
());
logger
.
info
(
"
clerkId={},门店交集数量=
{}"
,
clerkId
,
storeList
.
size
());
RedisUtil
.
setCache
(
cacheKey
,
storeList
,
10L
,
TimeUnit
.
MINUTES
);
RedisUtil
.
setCache
(
cacheKey
,
storeList
,
10L
,
TimeUnit
.
MINUTES
);
return
storeList
;
return
storeList
;
}
}
...
@@ -893,14 +904,25 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -893,14 +904,25 @@ public class StaffApiServiceImpl implements StaffApiService {
return
storeRoleDTO
;
return
storeRoleDTO
;
}
}
if
(
storeIds
.
contains
(
"-1"
))
{
if
(
storeIds
.
contains
(
"-1"
))
{
logger
.
info
(
"该导购为超管"
);
logger
.
info
(
"该导购为所有门店,clerkId={}"
,
clerkId
);
int
gicStoreCount
=
storeWidgetService
.
getClerkWidgetStore
(
clerkId
);
String
storeWidgetId
=
this
.
powerService
.
getStoreWidgetId
(
new
Date
(),
clerkId
);
storeRoleDTO
.
setStoreCount
(
gicStoreCount
);
int
storeCount
=
0
;
String
storeId
=
null
;
if
(
null
!=
storeWidgetId
)
{
Page
<
Object
>
pageParam
=
new
Page
<
Object
>();
pageParam
.
setCurrentPage
(
1
);
pageParam
.
setPageSize
(
1
);
Page
<
StoreDTO
>
page
=
storeWidgetService
.
getStoreWidgetStore
(
storeWidgetId
,
null
,
clerkDTO
.
getEnterpriseId
(),
pageParam
,
null
,
null
);
storeId
=
page
.
getResult
().
get
(
0
).
getStoreId
();
storeCount
=
page
.
getTotalCount
();
storeRoleDTO
.
setStoreId
(
storeId
);
storeRoleDTO
.
setStoreCount
(
storeCount
);
}
return
storeRoleDTO
;
return
storeRoleDTO
;
}
}
int
size
=
storeIds
.
size
();
int
size
=
storeIds
.
size
();
storeRoleDTO
.
setStoreCount
(
size
);
storeRoleDTO
.
setStoreCount
(
size
);
if
(
size
=
=
1
)
{
if
(
size
>
=
1
)
{
storeRoleDTO
.
setStoreId
(
storeIds
.
get
(
0
));
storeRoleDTO
.
setStoreId
(
storeIds
.
get
(
0
));
}
}
return
storeRoleDTO
;
return
storeRoleDTO
;
...
@@ -914,7 +936,6 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -914,7 +936,6 @@ public class StaffApiServiceImpl implements StaffApiService {
Integer
superAdmin
=
clerkDTO
.
getSuperAdmin
();
Integer
superAdmin
=
clerkDTO
.
getSuperAdmin
();
if
(
superAdmin
!=
null
&&
superAdmin
==
1
)
{
if
(
superAdmin
!=
null
&&
superAdmin
==
1
)
{
logger
.
info
(
"gic超管,clerkId:{}"
,
clerkId
);
logger
.
info
(
"gic超管,clerkId:{}"
,
clerkId
);
//gic超管
return
Collections
.
singletonList
(
"-1"
);
return
Collections
.
singletonList
(
"-1"
);
}
}
String
enterpriseId
=
clerkDTO
.
getEnterpriseId
();
String
enterpriseId
=
clerkDTO
.
getEnterpriseId
();
...
@@ -922,23 +943,22 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -922,23 +943,22 @@ public class StaffApiServiceImpl implements StaffApiService {
if
(
enterpriseSetting
.
getEnableAccessControl
()
!=
null
&&
enterpriseSetting
.
getEnableAccessControl
()
==
1
)
{
if
(
enterpriseSetting
.
getEnableAccessControl
()
!=
null
&&
enterpriseSetting
.
getEnableAccessControl
()
==
1
)
{
String
storeWidgetId
=
this
.
powerService
.
getStoreWidgetId
(
new
Date
(),
clerkId
);
String
storeWidgetId
=
this
.
powerService
.
getStoreWidgetId
(
new
Date
(),
clerkId
);
if
(
StringUtils
.
isBlank
(
storeWidgetId
))
{
if
(
StringUtils
.
isBlank
(
storeWidgetId
))
{
logger
.
info
(
"导购
权限不存在
"
);
logger
.
info
(
"导购
无门店权限,门店组件id is null
"
);
return
Collections
.
emptyList
();
return
Collections
.
emptyList
();
}
}
StoreWidgetDTO
storeWidgetDTO
=
this
.
storeWidgetService
.
getStoreWidgetBykey
(
storeWidgetId
);
StoreWidgetDTO
storeWidgetDTO
=
this
.
storeWidgetService
.
getStoreWidgetBykey
(
storeWidgetId
);
if
(
storeWidgetDTO
==
null
)
{
if
(
storeWidgetDTO
==
null
)
{
logger
.
info
(
"导购
权限不存在"
);
logger
.
info
(
"导购
门店权限查不到,storeWidgetId={}"
,
storeWidgetId
);
return
Collections
.
emptyList
();
return
Collections
.
emptyList
();
}
}
Integer
selectType
=
storeWidgetDTO
.
getSelectType
();
Integer
selectType
=
storeWidgetDTO
.
getSelectType
();
if
(
selectType
!=
null
&&
selectType
==
0
)
{
if
(
selectType
!=
null
&&
selectType
==
0
)
{
//gic超管
logger
.
info
(
"gic超管所有门店,clerkId:{}"
,
clerkId
);
logger
.
info
(
"gic超管,clerkId:{}"
,
clerkId
);
return
Collections
.
singletonList
(
"-1"
);
return
Collections
.
singletonList
(
"-1"
);
}
}
return
getStoreWidgetIdStoreIds
(
storeWidgetId
,
enterpriseId
);
return
getStoreWidgetIdStoreIds
(
storeWidgetId
,
enterpriseId
);
}
else
{
}
else
{
//未开启分权
logger
.
info
(
"无开启权限 ,所有门店,clerkId={}"
,
clerkId
);
return
Collections
.
singletonList
(
"-1"
);
return
Collections
.
singletonList
(
"-1"
);
}
}
}
}
...
@@ -948,7 +968,7 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -948,7 +968,7 @@ public class StaffApiServiceImpl implements StaffApiService {
*/
*/
private
List
<
String
>
getStoreWidgetIdStoreIds
(
String
storeWidgetId
,
String
enterpriseId
)
{
private
List
<
String
>
getStoreWidgetIdStoreIds
(
String
storeWidgetId
,
String
enterpriseId
)
{
// 门店id列表
// 门店id列表
List
<
String
>
storeIdList
=
storeWidgetService
.
getStoreWidgetStore
(
storeWidgetId
,
enterpriseId
,
null
,
null
,
2
);
List
<
String
>
storeIdList
=
storeWidgetService
.
getStoreWidgetStore
(
storeWidgetId
,
enterpriseId
,
null
,
null
,
0
);
if
(
CollectionUtils
.
isEmpty
(
storeIdList
))
{
if
(
CollectionUtils
.
isEmpty
(
storeIdList
))
{
return
Collections
.
emptyList
();
return
Collections
.
emptyList
();
}
}
...
@@ -970,6 +990,18 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -970,6 +990,18 @@ public class StaffApiServiceImpl implements StaffApiService {
}
}
@Override
@Override
public
com
.
gic
.
api
.
base
.
commons
.
ServiceResponse
<
Boolean
>
isEnterpriseManager
(
String
clerkId
)
{
ClerkDTO
clerkDTO
=
clerkService
.
getClerkByClerkId
(
clerkId
);
if
(
clerkDTO
!=
null
)
{
Integer
clerkType
=
clerkDTO
.
getClerkType
();
if
(
clerkType
==
2
)
{
return
com
.
gic
.
api
.
base
.
commons
.
ServiceResponse
.
success
(
true
);
}
}
return
com
.
gic
.
api
.
base
.
commons
.
ServiceResponse
.
success
(
false
);
}
@Override
public
List
<
StaffDTO
>
listBindStoreIds
(
List
<
String
>
storeIds
,
String
wxEnterpriseId
)
{
public
List
<
StaffDTO
>
listBindStoreIds
(
List
<
String
>
storeIds
,
String
wxEnterpriseId
)
{
return
staffMapper
.
listBindStoreIds
(
storeIds
,
wxEnterpriseId
);
return
staffMapper
.
listBindStoreIds
(
storeIds
,
wxEnterpriseId
);
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffClerkRelationApiServiceImpl.java
View file @
c3ed75be
...
@@ -246,30 +246,17 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
...
@@ -246,30 +246,17 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
@Override
@Override
public
List
<
StaffClerkRelationDTO
>
listByStoreId
(
String
storeId
)
{
public
List
<
StaffClerkRelationDTO
>
listByStoreId
(
String
storeId
)
{
List
<
TabHaobanStaffClerkRelation
>
list
=
tabHaobanStaffClerkRelationMapper
.
listByStoreId
(
storeId
);
return
tabHaobanStaffClerkRelationMapper
.
listByStoreIds
(
null
,
Arrays
.
asList
(
storeId
));
if
(
CollectionUtil
.
isEmpty
(
list
))
{
return
new
ArrayList
<>();
}
List
<
StaffClerkRelationDTO
>
result
=
EntityUtil
.
changeEntityListByJSON
(
StaffClerkRelationDTO
.
class
,
list
);
return
result
;
}
@Override
public
List
<
StaffClerkRelationDTO
>
listByStoreIds
(
List
<
String
>
storeIds
)
{
List
<
TabHaobanStaffClerkRelation
>
list
=
tabHaobanStaffClerkRelationMapper
.
listByStoreIds
(
storeIds
);
return
EntityUtil
.
changeEntityListNew
(
StaffClerkRelationDTO
.
class
,
list
);
}
}
@Override
@Override
public
boolean
unbindByStaffAndClerkId
(
String
staffId
,
String
clerkId
,
int
channelCode
)
{
public
boolean
unbindByStaffAndClerkId
(
String
staffId
,
String
clerkId
,
int
channelCode
,
String
wxEnterpriseId
)
{
return
staffClerkRelationService
.
delBind
(
clerkId
,
staffId
,
channelCode
,
null
);
return
staffClerkRelationService
.
delBind
(
clerkId
,
staffId
,
channelCode
,
null
,
wxEnterpriseId
);
}
}
@Override
@Override
public
StaffClerkRelationDTO
getOneByClerkId
(
String
clerkId
)
{
public
StaffClerkRelationDTO
getOneByClerkId
(
String
clerkId
)
{
TabHaobanStaffClerkRelation
tab
=
tabHaobanStaffClerkRelationMapper
.
getOneByClerkId
(
clerkId
);
return
tabHaobanStaffClerkRelationMapper
.
getOneByClerkId
(
clerkId
,
null
);
StaffClerkRelationDTO
result
=
EntityUtil
.
changeEntityByJSON
(
StaffClerkRelationDTO
.
class
,
tab
);
return
result
;
}
}
@Override
@Override
...
@@ -284,13 +271,12 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
...
@@ -284,13 +271,12 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
}
}
@Override
@Override
public
StaffClerkRelationDTO
getOneByStoreIdAndStaffId
(
String
storeId
,
public
StaffClerkRelationDTO
getOneByStoreIdAndStaffId
(
String
storeId
,
String
staffId
)
{
String
staffId
)
{
StaffClerkRelationDTO
tab
=
tabHaobanStaffClerkRelationMapper
.
getOneByStoreIdAndStaffId
(
storeId
,
staffId
);
TabHaobanStaffClerkRelation
tab
=
tabHaobanStaffClerkRelationMapper
.
getOneByStoreIdAndStaffId
(
storeId
,
staffId
);
if
(
tab
==
null
)
{
if
(
tab
==
null
)
{
return
null
;
return
null
;
}
}
return
EntityUtil
.
changeEntity
(
StaffClerkRelationDTO
.
class
,
tab
)
;
return
tab
;
}
}
@Override
@Override
...
@@ -338,8 +324,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
...
@@ -338,8 +324,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
@Override
@Override
public
List
<
StaffClerkRelationDTO
>
listByEnterpriseIdAndStaffid
(
String
enterpriseId
,
String
staffid
)
{
public
List
<
StaffClerkRelationDTO
>
listByEnterpriseIdAndStaffid
(
String
enterpriseId
,
String
staffid
)
{
List
<
TabHaobanStaffClerkRelation
>
list
=
tabHaobanStaffClerkRelationMapper
.
listByEnterpriseIdAndStaffid
(
enterpriseId
,
staffid
);
return
tabHaobanStaffClerkRelationMapper
.
listByEnterpriseIdAndStaffid
(
enterpriseId
,
staffid
);
return
EntityUtil
.
changeEntityListByJSON
(
StaffClerkRelationDTO
.
class
,
list
);
}
}
@Override
@Override
...
@@ -497,7 +482,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
...
@@ -497,7 +482,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
Integer
status
=
clerkDTO
.
getStatus
();
Integer
status
=
clerkDTO
.
getStatus
();
logger
.
info
(
"导购删除,clerkId:{},status:{}"
,
clerkId
,
status
);
logger
.
info
(
"导购删除,clerkId:{},status:{}"
,
clerkId
,
status
);
if
(!
status
.
equals
(
1
))
{
if
(!
status
.
equals
(
1
))
{
staffClerkRelationService
.
delBind
(
clerkId
,
"-1"
,
ChannelCodeEnum
.
GIC_CLERK_DEL_UNBIND
.
getCode
(),
null
);
staffClerkRelationService
.
delBind
(
clerkId
,
"-1"
,
ChannelCodeEnum
.
GIC_CLERK_DEL_UNBIND
.
getCode
(),
null
,
null
);
}
}
}
else
if
(
type
==
2
)
{
}
else
if
(
type
==
2
)
{
logger
.
info
(
"导购门店转移,新的导购和门店,clerkId={},storeId={}"
,
clerkId
,
clerkSyncQDTO
.
getStoreId
());
logger
.
info
(
"导购门店转移,新的导购和门店,clerkId={},storeId={}"
,
clerkId
,
clerkSyncQDTO
.
getStoreId
());
...
@@ -539,7 +524,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
...
@@ -539,7 +524,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
}
else
if
(
clerkType
==
2
)
{
}
else
if
(
clerkType
==
2
)
{
logger
.
info
(
"区经变更为导购,解绑:{}"
,
clerkId
);
logger
.
info
(
"区经变更为导购,解绑:{}"
,
clerkId
);
//解绑
//解绑
staffClerkRelationService
.
delBind
(
clerkId
,
"-1"
,
ChannelCodeEnum
.
GIC_CLERK_DEL_UNBIND
.
getCode
(),
null
);
staffClerkRelationService
.
delBind
(
clerkId
,
"-1"
,
ChannelCodeEnum
.
GIC_CLERK_DEL_UNBIND
.
getCode
(),
null
,
null
);
}
}
}
}
}
}
...
@@ -552,7 +537,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
...
@@ -552,7 +537,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
}
}
if
(
flag
)
{
if
(
flag
)
{
String
oldClerkId
=
oldRelationDTO
.
getClerkId
();
String
oldClerkId
=
oldRelationDTO
.
getClerkId
();
this
.
staffClerkRelationService
.
delBind
(
oldClerkId
,
"-1"
,
ChannelCodeEnum
.
SYNC_UNBIND
.
getCode
(),
clerkSyncQDTO
.
getClerkId
());
this
.
staffClerkRelationService
.
delBind
(
oldClerkId
,
"-1"
,
ChannelCodeEnum
.
SYNC_UNBIND
.
getCode
(),
clerkSyncQDTO
.
getClerkId
()
,
oldRelationDTO
.
getWxEnterpriseId
()
);
// 设置新的ID
// 设置新的ID
oldRelationDTO
.
setClerkId
(
clerkSyncQDTO
.
getClerkId
());
oldRelationDTO
.
setClerkId
(
clerkSyncQDTO
.
getClerkId
());
oldRelationDTO
.
setStoreId
(
clerkSyncQDTO
.
getStoreId
());
oldRelationDTO
.
setStoreId
(
clerkSyncQDTO
.
getStoreId
());
...
@@ -563,7 +548,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
...
@@ -563,7 +548,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
}
}
}
else
{
}
else
{
String
oldClerkId
=
oldRelationDTO
.
getClerkId
();
String
oldClerkId
=
oldRelationDTO
.
getClerkId
();
this
.
staffClerkRelationService
.
delBind
(
oldClerkId
,
"-1"
,
ChannelCodeEnum
.
SYNC_UNBIND
.
getCode
(),
null
);
this
.
staffClerkRelationService
.
delBind
(
oldClerkId
,
"-1"
,
ChannelCodeEnum
.
SYNC_UNBIND
.
getCode
(),
null
,
null
);
// 设置新的ID
// 设置新的ID
oldRelationDTO
.
setClerkId
(
clerkSyncQDTO
.
getClerkId
());
oldRelationDTO
.
setClerkId
(
clerkSyncQDTO
.
getClerkId
());
oldRelationDTO
.
setStoreId
(
clerkSyncQDTO
.
getStoreId
());
oldRelationDTO
.
setStoreId
(
clerkSyncQDTO
.
getStoreId
());
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffDepartmentRelatedApiServiceImpl.java
View file @
c3ed75be
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
import
cn.hutool.core.collection.CollectionUtil
;
import
java.io.UnsupportedEncodingException
;
import
java.net.URLEncoder
;
import
java.nio.charset.StandardCharsets
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Objects
;
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.util.CollectionUtils
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.clerk.api.dto.ClerkDTO
;
import
com.gic.clerk.api.dto.ClerkDTO
;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.haoban.manage.api.dto.StaffClerkRelationDTO
;
import
com.gic.haoban.manage.api.dto.StaffDTO
;
import
com.gic.haoban.manage.api.dto.StaffDTO
;
import
com.gic.haoban.manage.api.dto.StaffDepartmentRelatedDTO
;
import
com.gic.haoban.manage.api.dto.StaffDepartmentRelatedDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseQwDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseQwDTO
;
...
@@ -16,24 +33,14 @@ import com.gic.haoban.manage.api.util.notify.NoticeMessageUtil;
...
@@ -16,24 +33,14 @@ import com.gic.haoban.manage.api.util.notify.NoticeMessageUtil;
import
com.gic.haoban.manage.service.config.Config
;
import
com.gic.haoban.manage.service.config.Config
;
import
com.gic.haoban.manage.service.dao.mapper.StaffDepartmentRelatedMapper
;
import
com.gic.haoban.manage.service.dao.mapper.StaffDepartmentRelatedMapper
;
import
com.gic.haoban.manage.service.dao.mapper.TabHaobanStaffClerkRelationMapper
;
import
com.gic.haoban.manage.service.dao.mapper.TabHaobanStaffClerkRelationMapper
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaffClerkRelation
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaffDepartmentRelated
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaffDepartmentRelated
;
import
com.gic.haoban.manage.service.service.StaffDepartmentRelatedService
;
import
com.gic.haoban.manage.service.service.StaffDepartmentRelatedService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.wechat.api.dto.qywx.ItemDTO
;
import
com.gic.wechat.api.dto.qywx.ItemDTO
;
import
com.gic.wechat.api.dto.qywx.QywxXcxSendMessageDTO
;
import
com.gic.wechat.api.dto.qywx.QywxXcxSendMessageDTO
;
import
com.gic.wechat.api.service.qywx.QywxSuiteApiService
;
import
com.gic.wechat.api.service.qywx.QywxSuiteApiService
;
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.util.CollectionUtils
;
import
java.io.UnsupportedEncodingException
;
import
cn.hutool.core.collection.CollectionUtil
;
import
java.net.URLEncoder
;
import
java.nio.charset.StandardCharsets
;
import
java.util.*
;
@Service
@Service
public
class
StaffDepartmentRelatedApiServiceImpl
implements
StaffDepartmentRelatedApiService
{
public
class
StaffDepartmentRelatedApiServiceImpl
implements
StaffDepartmentRelatedApiService
{
...
@@ -64,24 +71,12 @@ public class StaffDepartmentRelatedApiServiceImpl implements StaffDepartmentRela
...
@@ -64,24 +71,12 @@ public class StaffDepartmentRelatedApiServiceImpl implements StaffDepartmentRela
}
}
@Override
@Override
public
List
<
StaffDepartmentRelatedDTO
>
listByDepartmentIds
(
List
<
String
>
departmentIds
)
{
List
<
TabHaobanStaffDepartmentRelated
>
list
=
staffDepartmentRelatedMapper
.
listByDepartmentIds
(
departmentIds
);
List
<
StaffDepartmentRelatedDTO
>
resultList
=
EntityUtil
.
changeEntityListByJSON
(
StaffDepartmentRelatedDTO
.
class
,
list
);
return
resultList
;
}
@Override
public
void
updateById
(
StaffDepartmentRelatedDTO
dto
)
{
public
void
updateById
(
StaffDepartmentRelatedDTO
dto
)
{
TabHaobanStaffDepartmentRelated
tab
=
EntityUtil
.
changeEntityByJSON
(
TabHaobanStaffDepartmentRelated
.
class
,
dto
);
TabHaobanStaffDepartmentRelated
tab
=
EntityUtil
.
changeEntityByJSON
(
TabHaobanStaffDepartmentRelated
.
class
,
dto
);
staffDepartmentRelatedMapper
.
updateByPrimaryKeySelective
(
tab
);
staffDepartmentRelatedMapper
.
updateByPrimaryKeySelective
(
tab
);
}
}
@Override
@Override
public
void
deleteCode
(
StaffDepartmentRelatedDTO
dto
)
{
staffDepartmentRelatedMapper
.
deleteCode
(
EntityUtil
.
changeEntityByJSON
(
TabHaobanStaffDepartmentRelated
.
class
,
dto
));
}
@Override
public
StaffDepartmentRelatedDTO
getByStaffDepartmentRelatedId
(
String
staffDepartmentRelatedId
)
{
public
StaffDepartmentRelatedDTO
getByStaffDepartmentRelatedId
(
String
staffDepartmentRelatedId
)
{
TabHaobanStaffDepartmentRelated
tab
=
staffDepartmentRelatedMapper
.
getById
(
staffDepartmentRelatedId
);
TabHaobanStaffDepartmentRelated
tab
=
staffDepartmentRelatedMapper
.
getById
(
staffDepartmentRelatedId
);
if
(
Objects
.
isNull
(
tab
))
{
if
(
Objects
.
isNull
(
tab
))
{
...
@@ -112,30 +107,10 @@ public class StaffDepartmentRelatedApiServiceImpl implements StaffDepartmentRela
...
@@ -112,30 +107,10 @@ public class StaffDepartmentRelatedApiServiceImpl implements StaffDepartmentRela
}
}
@Override
@Override
public
StaffDepartmentRelatedDTO
getOneByClerkCodeAndDepartmentId
(
String
clerkCode
,
String
departmentId
)
{
TabHaobanStaffDepartmentRelated
tab
=
staffDepartmentRelatedMapper
.
getDepartmentIdAndCode
(
departmentId
,
clerkCode
);
if
(
tab
==
null
)
{
return
null
;
}
StaffDepartmentRelatedDTO
dto
=
EntityUtil
.
changeEntity
(
StaffDepartmentRelatedDTO
.
class
,
tab
);
return
dto
;
}
@Override
public
StaffDepartmentRelatedDTO
getOneByStaffIdAndDepartmentId
(
String
staffId
,
String
departmentId
)
{
TabHaobanStaffDepartmentRelated
tab
=
staffDepartmentRelatedMapper
.
getDepartmentIdAndStaffId
(
departmentId
,
staffId
);
if
(
tab
==
null
)
{
return
null
;
}
StaffDepartmentRelatedDTO
dto
=
EntityUtil
.
changeEntity
(
StaffDepartmentRelatedDTO
.
class
,
tab
);
return
dto
;
}
@Override
public
Map
<
String
,
String
>
getWxUserIdByClerkId
(
String
clerkId
)
{
public
Map
<
String
,
String
>
getWxUserIdByClerkId
(
String
clerkId
)
{
Map
<
String
,
String
>
map
=
new
HashMap
<>();
Map
<
String
,
String
>
map
=
new
HashMap
<>();
TabHaobanStaffClerkRelation
relation
=
tabHaobanStaffClerkRelationMapper
.
getOneByClerkId
(
clerkId
);
StaffClerkRelationDTO
relation
=
tabHaobanStaffClerkRelationMapper
.
getOneByClerkId
(
clerkId
,
null
);
if
(
relation
==
null
)
{
if
(
relation
==
null
)
{
return
map
;
return
map
;
}
}
...
@@ -267,7 +242,7 @@ public class StaffDepartmentRelatedApiServiceImpl implements StaffDepartmentRela
...
@@ -267,7 +242,7 @@ public class StaffDepartmentRelatedApiServiceImpl implements StaffDepartmentRela
logger
.
info
(
"店长不存在,发送消息失败{}"
,
storeId
);
logger
.
info
(
"店长不存在,发送消息失败{}"
,
storeId
);
return
;
return
;
}
}
TabHaobanStaffClerkRelation
tab
=
tabHaobanStaffClerkRelationMapper
.
getOneByClerkId
(
gicClerk
.
getClerkId
()
);
StaffClerkRelationDTO
tab
=
tabHaobanStaffClerkRelationMapper
.
getOneByClerkId
(
gicClerk
.
getClerkId
(),
null
);
if
(
tab
==
null
)
{
if
(
tab
==
null
)
{
logger
.
info
(
"店长未绑定clerkId={}"
,
gicClerk
.
getClerkId
());
logger
.
info
(
"店长未绑定clerkId={}"
,
gicClerk
.
getClerkId
());
return
;
return
;
...
@@ -298,7 +273,7 @@ public class StaffDepartmentRelatedApiServiceImpl implements StaffDepartmentRela
...
@@ -298,7 +273,7 @@ public class StaffDepartmentRelatedApiServiceImpl implements StaffDepartmentRela
logger
.
info
(
"店长不存在,发送消息失败{}"
,
storeId
);
logger
.
info
(
"店长不存在,发送消息失败{}"
,
storeId
);
return
;
return
;
}
}
TabHaobanStaffClerkRelation
tab
=
tabHaobanStaffClerkRelationMapper
.
getOneByClerkId
(
gicClerk
.
getClerkId
()
);
StaffClerkRelationDTO
tab
=
tabHaobanStaffClerkRelationMapper
.
getOneByClerkId
(
gicClerk
.
getClerkId
(),
null
);
if
(
tab
==
null
)
{
if
(
tab
==
null
)
{
logger
.
info
(
"店长未绑定clerkId={}"
,
gicClerk
.
getClerkId
());
logger
.
info
(
"店长未绑定clerkId={}"
,
gicClerk
.
getClerkId
());
return
;
return
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/WxEnterpriseApiServiceImpl.java
View file @
c3ed75be
...
@@ -302,12 +302,6 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
...
@@ -302,12 +302,6 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
wxEnterpriseService
.
update
(
enterpriseDTO
);
wxEnterpriseService
.
update
(
enterpriseDTO
);
}
}
// 返回true说明已过期
@Override
public
boolean
enterpriseIsOver
(
String
enterpriseId
)
{
return
haobanIsStop
(
enterpriseId
)
;
}
@Override
@Override
public
SecretSettingDTO
getSecretSetting
(
String
wxEnterpriseId
,
int
secretType
,
String
enterpriseId
)
{
public
SecretSettingDTO
getSecretSetting
(
String
wxEnterpriseId
,
int
secretType
,
String
enterpriseId
)
{
if
(
secretType
==
SecretTypeEnum
.
MEMBER_WAPP
.
getVal
())
{
if
(
secretType
==
SecretTypeEnum
.
MEMBER_WAPP
.
getVal
())
{
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/util/ClerkUtils.java
0 → 100644
View file @
c3ed75be
package
com
.
gic
.
haoban
.
manage
.
service
.
util
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
com.gic.clerk.api.dto.ClerkDTO
;
import
com.gic.clerk.api.service.ClerkService
;
@Component
public
class
ClerkUtils
{
private
static
ClerkService
clerkService
;
@Autowired
public
void
setClerkService
(
ClerkService
clerkService
)
{
ClerkUtils
.
clerkService
=
clerkService
;
}
public
String
getClerkStore
(
ClerkDTO
clerk
,
String
clerkId
)
{
if
(
null
==
clerk
)
{
clerk
=
clerkService
.
getclerkById
(
clerkId
);
}
if
(
null
==
clerk
)
{
return
null
;
}
if
(
clerk
.
getClerkType
()
!=
0
&&
clerk
.
getClerkType
()
!=
1
)
{
return
null
;
}
return
clerk
.
getStoreId
();
}
}
haoban-manage3-service/src/main/resources/dubbo-haoban-manage-service.xml
View file @
c3ed75be
...
@@ -97,9 +97,6 @@
...
@@ -97,9 +97,6 @@
<dubbo:service
interface=
"com.gic.haoban.manage.api.service.out.SecretSettingApiService"
<dubbo:service
interface=
"com.gic.haoban.manage.api.service.out.SecretSettingApiService"
ref=
"secretSettingApiServiceImpl"
timeout=
"10000"
/>
ref=
"secretSettingApiServiceImpl"
timeout=
"10000"
/>
<dubbo:service
interface=
"com.gic.haoban.manage.api.service.out.ErrorLogApiService"
ref=
"errorLogApiServiceImpl"
timeout=
"10000"
/>
<dubbo:service
interface=
"com.gic.haoban.manage.api.service.out.WelcomeApiService"
<dubbo:service
interface=
"com.gic.haoban.manage.api.service.out.WelcomeApiService"
ref=
"welcomeApiServiceImpl"
timeout=
"10000"
/>
ref=
"welcomeApiServiceImpl"
timeout=
"10000"
/>
...
...
haoban-manage3-service/src/main/resources/mapper/StaffDepartmentRelatedMapper.xml
View file @
c3ed75be
...
@@ -91,13 +91,6 @@
...
@@ -91,13 +91,6 @@
</select>
</select>
<update
id=
"deleteCode"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanStaffDepartmentRelated"
>
update tab_haoban_staff_department_related
set clerk_code = '',
update_time = #{updateTime,jdbcType=TIMESTAMP}
where staff_department_related_id = #{staffDepartmentRelatedId,jdbcType=VARCHAR}
</update>
<select
id=
"listStaffDepartmentByStaffId"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
<select
id=
"listStaffDepartmentByStaffId"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
select
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
...
...
haoban-manage3-service/src/main/resources/mapper/TabHaobanErrorLogMapper.xml
deleted
100644 → 0
View file @
db3e0508
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.gic.haoban.manage.service.dao.mapper.TabHaobanErrorLogMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.TabHaobanErrorLog"
>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"enterprise_id"
jdbcType=
"VARCHAR"
property=
"enterpriseId"
/>
<result
column=
"module_desc"
jdbcType=
"VARCHAR"
property=
"moduleDesc"
/>
<result
column=
"error_desc"
jdbcType=
"VARCHAR"
property=
"errorDesc"
/>
<result
column=
"error_flag_id"
jdbcType=
"VARCHAR"
property=
"errorFlagId"
/>
<result
column=
"error_param"
jdbcType=
"VARCHAR"
property=
"errorParam"
/>
<result
column=
"remark"
jdbcType=
"VARCHAR"
property=
"remark"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, enterprise_id, module_desc, error_desc, error_flag_id, error_param, remark, create_time,
update_time
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_error_log
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from tab_haoban_error_log
where id = #{id,jdbcType=BIGINT}
</delete>
<insert
id=
"insert"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanErrorLog"
useGeneratedKeys=
"true"
>
insert into tab_haoban_error_log (id,enterprise_id, module_desc, error_desc,
error_flag_id, error_param, remark,
create_time, update_time)
values (#{id,jdbcType=BIGINT}, #{enterpriseId,jdbcType=VARCHAR}, #{moduleDesc,jdbcType=VARCHAR}, #{errorDesc,jdbcType=VARCHAR},
#{errorFlagId,jdbcType=VARCHAR}, #{errorParam,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanErrorLog"
useGeneratedKeys=
"true"
>
insert into tab_haoban_error_log
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id,
</if>
<if
test=
"moduleDesc != null"
>
module_desc,
</if>
<if
test=
"errorDesc != null"
>
error_desc,
</if>
<if
test=
"errorFlagId != null"
>
error_flag_id,
</if>
<if
test=
"errorParam != null"
>
error_param,
</if>
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=BIGINT},
</if>
<if
test=
"enterpriseId != null"
>
#{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"moduleDesc != null"
>
#{moduleDesc,jdbcType=VARCHAR},
</if>
<if
test=
"errorDesc != null"
>
#{errorDesc,jdbcType=VARCHAR},
</if>
<if
test=
"errorFlagId != null"
>
#{errorFlagId,jdbcType=VARCHAR},
</if>
<if
test=
"errorParam != null"
>
#{errorParam,jdbcType=VARCHAR},
</if>
<if
test=
"remark != null"
>
#{remark,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanErrorLog"
>
update tab_haoban_error_log
<set>
<if
test=
"enterpriseId != null"
>
enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"moduleDesc != null"
>
module_desc = #{moduleDesc,jdbcType=VARCHAR},
</if>
<if
test=
"errorDesc != null"
>
error_desc = #{errorDesc,jdbcType=VARCHAR},
</if>
<if
test=
"errorFlagId != null"
>
error_flag_id = #{errorFlagId,jdbcType=VARCHAR},
</if>
<if
test=
"errorParam != null"
>
error_param = #{errorParam,jdbcType=VARCHAR},
</if>
<if
test=
"remark != null"
>
remark = #{remark,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanErrorLog"
>
update tab_haoban_error_log
set enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
module_desc = #{moduleDesc,jdbcType=VARCHAR},
error_desc = #{errorDesc,jdbcType=VARCHAR},
error_flag_id = #{errorFlagId,jdbcType=VARCHAR},
error_param = #{errorParam,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
haoban-manage3-service/src/main/resources/mapper/TabHaobanStaffClerkRelationMapper.xml
View file @
c3ed75be
...
@@ -17,8 +17,7 @@
...
@@ -17,8 +17,7 @@
<result
column=
"clerk_type"
property=
"clerkType"
jdbcType=
"INTEGER"
/>
<result
column=
"clerk_type"
property=
"clerkType"
jdbcType=
"INTEGER"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
staff_clerk_relation_id
staff_clerk_relation_id,
,
staff_id,
staff_id,
wx_enterprise_id,
wx_enterprise_id,
enterprise_id,
enterprise_id,
...
@@ -54,41 +53,44 @@
...
@@ -54,41 +53,44 @@
</insert>
</insert>
<select
id=
"listBindCode"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
<select
id=
"listBindCode"
resultType=
"com.gic.haoban.manage.api.dto.StaffClerkRelationDTO"
parameterType=
"java.lang.String"
>
select
<include
refid=
"leftJoinStaffSQL"
/>
<include
refid=
"Base_Column_List"
/>
where a.enterprise_id = #{enterpriseId}
from tab_haoban_staff_clerk_relation
and a.wx_enterprise_id = #{wxEnterpriseId} and a.status_flag = 1 and b.status_flag = 1
where enterprise_id = #{enterpriseId,jdbcType=VARCHAR}
and a.clerk_code in
and wx_enterprise_id = #{wxEnterpriseId} and status_flag = 1
and clerk_code in
<foreach
collection=
"clerkCodeList"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
<foreach
collection=
"clerkCodeList"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{id,jdbcType=VARCHAR}
#{id,jdbcType=VARCHAR}
</foreach>
</foreach>
</select>
</select>
<select
id=
"listBindCodeByStaffId"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
<select
id=
"listBindCodeByStaffId"
resultType=
"com.gic.haoban.manage.api.dto.StaffClerkRelationDTO"
>
select
<include
refid=
"leftJoinStaffSQL"
/>
<include
refid=
"Base_Column_List"
/>
where a.staff_id = #{staffId,jdbcType=VARCHAR}
from tab_haoban_staff_clerk_relation
and a.status_flag = 1 and b.status_flag = 1
where staff_id = #{staffId,jdbcType=VARCHAR}
and status_flag = 1
<if
test=
"enterpriseIdList!=null and enterpriseIdList.size > 0"
>
<if
test=
"enterpriseIdList!=null and enterpriseIdList.size > 0"
>
and enterprise_id in
and
a.
enterprise_id in
<foreach
collection=
"enterpriseIdList"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
<foreach
collection=
"enterpriseIdList"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{id,jdbcType=VARCHAR}
#{id,jdbcType=VARCHAR}
</foreach>
</foreach>
</if>
</if>
</select>
</select>
<select
id=
"getOneByClerkId"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
<select
id=
"getOneByClerkId"
resultType=
"com.gic.haoban.manage.api.dto.StaffClerkRelationDTO"
>
select
<include
refid=
"leftJoinStaffSQL"
/>
<include
refid=
"Base_Column_List"
/>
where a.status_flag = 1 and a.clerk_id = #{clerkId} and b.status_flag = 1
from tab_haoban_staff_clerk_relation
<if
test=
"null != wxEnterpriseId"
>
where
and a.wx_enterprise_id = #{wxEnterpriseId}
status_flag = 1
</if>
and clerk_id = #{clerkId}
</select>
<select
id=
"getByCodeAndEnterpriseId"
resultType=
"com.gic.haoban.manage.api.dto.StaffClerkRelationDTO"
>
<include
refid=
"leftJoinStaffSQL"
/>
where a.status_flag = 1 and b.status_flag = 1
and a.enterprise_id = #{enterpriseId}
and a.clerk_code = #{clerkCode} order by a.create_time desc limit 1
</select>
</select>
<update
id=
"changeStatusByClerkId"
>
<update
id=
"changeStatusByClerkId"
>
update tab_haoban_staff_clerk_relation
update tab_haoban_staff_clerk_relation
set status_flag = #{status},
set status_flag = #{status},
...
@@ -105,24 +107,6 @@
...
@@ -105,24 +107,6 @@
where clerk_id = #{clerkId,jdbcType=VARCHAR}
where clerk_id = #{clerkId,jdbcType=VARCHAR}
</update>
</update>
<select
id=
"getBindByClerkId"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_staff_clerk_relation
where clerk_id = #{clerkId,jdbcType=VARCHAR} and wx_enterprise_id=#{wxEnterpriseId} and status_flag=1
</select>
<select
id=
"getByCodeAndEnterpriseId"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_staff_clerk_relation
where
status_flag = 1
and enterprise_id = #{enterpriseId}
and clerk_code = #{clerkCode} order by create_time desc limit 1
</select>
<update
id=
"delByStoreIdAndCode"
>
<update
id=
"delByStoreIdAndCode"
>
update tab_haoban_staff_clerk_relation
update tab_haoban_staff_clerk_relation
set status_flag = 0,
set status_flag = 0,
...
@@ -132,21 +116,8 @@
...
@@ -132,21 +116,8 @@
and status_flag = 1
and status_flag = 1
</update>
</update>
<select
id=
"listByClerkIds"
resultType=
"com.gic.haoban.manage.api.dto.StaffClerkRelationDTO"
parameterType=
"java.lang.String"
>
<select
id=
"listByClerkIds"
resultType=
"com.gic.haoban.manage.api.dto.StaffClerkRelationDTO"
>
select a.staff_clerk_relation_id staffClerkRelationId,
<include
refid=
"leftJoinStaffSQL"
/>
a.staff_id staffId,
a.wx_enterprise_id wxEnterpriseId,
a.enterprise_id enterpriseId,
a.store_id storeId,
a.clerk_id clerkId,
a.clerk_code clerkCode,
a.status_flag statusFlag,
a.open_concat_flag openConcatFlag ,
a.clerk_type clerkType ,
a.manage_flag manageFlag ,
b.wx_user_id qwUserId,
b.wx_open_user_id openUserId
from tab_haoban_staff_clerk_relation a left join tab_haoban_staff b on b.staff_id = a.staff_id
where a.status_flag=1 and b.status_flag = 1
where a.status_flag=1 and b.status_flag = 1
<if
test=
"wxEnterpriseId != null and wxEnterpriseId != ''"
>
<if
test=
"wxEnterpriseId != null and wxEnterpriseId != ''"
>
and a.wx_enterprise_id = #{wxEnterpriseId}
and a.wx_enterprise_id = #{wxEnterpriseId}
...
@@ -157,24 +128,14 @@
...
@@ -157,24 +128,14 @@
</foreach>
</foreach>
</select>
</select>
<select
id=
"listByStoreId"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
<select
id=
"getOneByStoreIdAndStaffId"
resultType=
"com.gic.haoban.manage.api.dto.StaffClerkRelationDTO"
>
select
<include
refid=
"leftJoinStaffSQL"
/>
<include
refid=
"Base_Column_List"
/>
where a.status_flag=1 and b.status_flag=1
from tab_haoban_staff_clerk_relation
and a.staff_id = #{staffId,jdbcType=VARCHAR}
where status_flag=1
and store_id = #{storeId,jdbcType=VARCHAR}
</select>
<select
id=
"getOneByStoreIdAndStaffId"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_staff_clerk_relation
where status_flag=1
and staff_id = #{staffId,jdbcType=VARCHAR}
<if
test=
"null != storeId and storeId != ''"
>
<if
test=
"null != storeId and storeId != ''"
>
and store_id = #{storeId}
and
a.
store_id = #{storeId}
</if>
</if>
order by update_time desc limit 1
order by
a.
update_time desc limit 1
</select>
</select>
...
@@ -190,28 +151,6 @@
...
@@ -190,28 +151,6 @@
</foreach>
</foreach>
</update>
</update>
<select
id=
"getOneBindStoreId"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_staff_clerk_relation
where store_id = #{storeId,jdbcType=VARCHAR}
and staff_id = #{staffId}
and status_flag=1
order by update_time desc limit 1
</select>
<select
id=
"getByClerkId"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_staff_clerk_relation
where clerk_id = #{clerkId,jdbcType=VARCHAR}
and status_flag=1
<if
test=
"wxEnterpriseId != null and wxEnterpriseId != ''"
>
and wx_enterprise_id = #{wxEnterpriseId}
</if>
order by create_time desc limit 1
</select>
<update
id=
"delByPrimaryKey"
>
<update
id=
"delByPrimaryKey"
>
update tab_haoban_staff_clerk_relation
update tab_haoban_staff_clerk_relation
set status_flag = 0,
set status_flag = 0,
...
@@ -228,55 +167,44 @@
...
@@ -228,55 +167,44 @@
and status_flag = 1
and status_flag = 1
</update>
</update>
<select
id=
"listByEnterpriseIdAndStaffid"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
<select
id=
"listByEnterpriseIdAndStaffid"
resultType=
"com.gic.haoban.manage.api.dto.StaffClerkRelationDTO"
>
select
<include
refid=
"leftJoinStaffSQL"
/>
<include
refid=
"Base_Column_List"
/>
where a.enterprise_id = #{enterpriseId,jdbcType=VARCHAR}
from tab_haoban_staff_clerk_relation
and a.staff_id = #{staffId} and a.status_flag=1 and b.status_flag=1
where
enterprise_id = #{enterpriseId,jdbcType=VARCHAR}
and staff_id = #{staffId}
</select>
</select>
<select
id=
"getByCodeAndStoreId"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
<select
id=
"getByCodeAndStoreId"
resultType=
"com.gic.haoban.manage.api.dto.StaffClerkRelationDTO"
>
select
<include
refid=
"leftJoinStaffSQL"
/>
<include
refid=
"Base_Column_List"
/>
where a.clerk_code = #{clerkCode}
from tab_haoban_staff_clerk_relation
and a.store_id = #{storeId}
where
and a.status_flag = 1 and b.status_flag=1
clerk_code = #{clerkCode}
and store_id = #{storeId}
and status_flag = 1
</select>
</select>
<select
id=
"listByWxEnterpriseId"
resultType=
"String"
>
<select
id=
"listByWxEnterpriseId"
resultType=
"String"
>
select staff_id
select
a.
staff_id
from tab_haoban_staff_clerk_relation
from tab_haoban_staff_clerk_relation
a left join tab_haoban_staff b on a.staff_id = b.staff_id
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
where
a.
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and status_flag = 1
and
a.status_flag = 1 and b.
status_flag = 1
</select>
</select>
<select
id=
"lisByStaffId"
resultMap=
"BaseResultMap"
>
<select
id=
"lisByStaffId"
resultType=
"com.gic.haoban.manage.api.dto.StaffClerkRelationDTO"
>
select
<include
refid=
"leftJoinStaffSQL"
/>
<include
refid=
"Base_Column_List"
/>
where a.wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
from tab_haoban_staff_clerk_relation
and a.staff_id = #{staffId}
where
and a.status_flag = 1 and b.status_flag = 1
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and staff_id = #{staffId}
and status_flag = 1
<if
test=
"null != storeIdList"
>
<if
test=
"null != storeIdList"
>
and store_id in
and
a.
store_id in
<foreach
collection=
"storeIdList"
item=
"item"
separator=
","
open=
"("
close=
")"
>
<foreach
collection=
"storeIdList"
item=
"item"
separator=
","
open=
"("
close=
")"
>
#{item}
#{item}
</foreach>
</foreach>
</if>
</if>
order by create_time desc
order by
a.
create_time desc
</select>
</select>
<select
id=
"pageByWxEnterpriseId"
resultMap=
"BaseResultMap"
>
<select
id=
"pageByWxEnterpriseId"
resultType=
"com.gic.haoban.manage.api.dto.StaffClerkRelationDTO"
>
select
<include
refid=
"leftJoinStaffSQL"
/>
<include
refid=
"Base_Column_List"
/>
where a.wx_enterprise_id = #{wxEnterpriseId}
from tab_haoban_staff_clerk_relation
and a.status_flag =1
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and status_flag =1
</select>
</select>
<select
id=
"listBindByStoreId"
resultType=
"com.gic.haoban.manage.api.dto.StaffClerkRelationDTO"
>
<select
id=
"listBindByStoreId"
resultType=
"com.gic.haoban.manage.api.dto.StaffClerkRelationDTO"
>
...
@@ -299,34 +227,7 @@
...
@@ -299,34 +227,7 @@
and a.status_flag = 1
and a.status_flag = 1
</select>
</select>
<select
id=
"listBindByStoreIds"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_staff_clerk_relation
where store_id in
<foreach
collection=
"storeIds"
item=
"item"
separator=
","
open=
"("
close=
")"
>
#{item}
</foreach>
<if
test=
"wxEnterpriseId!=null"
>
and wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
</if>
and status_flag =1
</select>
<select
id=
"listBindNotInStoreIds"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_staff_clerk_relation
where store_id NOT in
<foreach
collection=
"storeIds"
item=
"item"
separator=
","
open=
"("
close=
")"
>
#{item}
</foreach>
<if
test=
"wxEnterpriseId!=null"
>
and wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
</if>
and enterprise_id=#{enterpriseId}
and status_flag =1
</select>
<update
id=
"delByStoreIds"
>
<update
id=
"delByStoreIds"
>
UPDATE
UPDATE
tab_haoban_staff_clerk_relation
tab_haoban_staff_clerk_relation
...
@@ -340,30 +241,28 @@
...
@@ -340,30 +241,28 @@
and status_flag =1
and status_flag =1
</update>
</update>
<select
id=
"listBindStoreIdByEnterpriseId"
resultMap=
"BaseResultMap"
>
<select
id=
"listBindStoreIdByEnterpriseId"
resultType=
"com.gic.haoban.manage.api.dto.StaffClerkRelationDTO"
>
select store_id,
<include
refid=
"leftJoinStaffSQL"
/>
wx_enterprise_id
where a.enterprise_id = #{wxEnterpriseId}
from tab_haoban_staff_clerk_relation
and a.status_flag = 1 and b.status_flag = 1
where enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
group by a.store_id
and status_flag = 1
group by store_id
</select>
</select>
<select
id=
"listRelationsStaffId"
resultType=
"java.lang.String"
>
<select
id=
"listRelationsStaffId"
resultType=
"java.lang.String"
>
select staff_id
select
a.
staff_id
from tab_haoban_staff_clerk_relation
from tab_haoban_staff_clerk_relation
a left join tab_haoban_staff b on a.staff_id = b.staff_id
where staff_id in
where
a.
staff_id in
<foreach
collection=
"staffIdList"
item=
"item"
separator=
","
open=
"("
close=
")"
>
<foreach
collection=
"staffIdList"
item=
"item"
separator=
","
open=
"("
close=
")"
>
#{item}
#{item}
</foreach>
</foreach>
and
status_flag = 1 group by
staff_id;
and
a.status_flag = 1 and b.status_flag = 1 group by a.
staff_id;
</select>
</select>
<select
id=
"listMemberStaffRelNew"
resultType=
"com.gic.haoban.manage.service.entity.ext.MemberStaffRelExtDO"
>
<select
id=
"listMemberStaffRelNew"
resultType=
"com.gic.haoban.manage.service.entity.ext.MemberStaffRelExtDO"
>
select * from (
select * from (
select ecr.member_id as memberId,
select ecr.member_id as memberId,
ecr.external_user_id as memberExternalUserId,
ecr.external_user_id as memberExternalUserId,
ecr.create_time as addFriendTime ,
scr.staff_id as staffId,
scr.staff_id as staffId,
scr.clerk_id as staffClerkId
scr.clerk_id as staffClerkId
from tab_haoban_external_clerk_related as ecr
from tab_haoban_external_clerk_related as ecr
...
@@ -385,59 +284,27 @@
...
@@ -385,59 +284,27 @@
<foreach
collection=
"memberIdList"
item=
"item"
separator=
","
open=
"("
close=
")"
>
<foreach
collection=
"memberIdList"
item=
"item"
separator=
","
open=
"("
close=
")"
>
#{item}
#{item}
</foreach>
</foreach>
) t where t.staffId is not null
) t where t.staffId is not null
ORDER BY t.addFriendTime DESC
</select>
</select>
<select
id=
"listWxUserIdByClerkIds"
resultType=
"string"
>
<select
id=
"listWxUserIdByClerkIds"
resultType=
"string"
>
select
select
<if
test=
"type==1"
>
DISTINCT b.wx_user_id
DISTINCT b.wx_user_id
from tab_haoban_staff_clerk_relation a
</if>
left join tab_haoban_staff b on a.staff_id = b.staff_id
<if
test=
"type==2"
>
where a.status_flag=1 and a.wx_enterprise_id = #{wxEnterpriseId}
and a.clerk_id in
<foreach
collection=
"clerkIds"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{id,jdbcType=VARCHAR}
</foreach>
</select>
<select
id=
"listWxOpenUserIdByClerkIds"
resultType=
"string"
>
select
DISTINCT b.wx_open_user_id
DISTINCT b.wx_open_user_id
</if>
from tab_haoban_staff_clerk_relation a
from tab_haoban_staff_clerk_relation a
left join tab_haoban_staff b on a.staff_id = b.staff_id
left join tab_haoban_staff b on a.staff_id = b.staff_id
where a.status_flag=1 and a.wx_enterprise_id = #{wxEnterpriseId}
where a.status_flag=1 and
b.status_flag=1 and
a.wx_enterprise_id = #{wxEnterpriseId}
and a.clerk_id in
and a.clerk_id in
<foreach
collection=
"clerkIds"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
<foreach
collection=
"clerkIds"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{id,jdbcType=VARCHAR}
#{id,jdbcType=VARCHAR}
</foreach>
</foreach>
</select>
</select>
<select
id=
"listIdsByWxOpenUserIds"
resultType=
"com.gic.haoban.manage.api.dto.StaffClerkRelationDTO"
>
select
a.staff_clerk_relation_id staffClerkRelationId,
a.store_id storeId,
a.wx_enterprise_id wxEnterpriseId,
a.enterprise_id enterpriseId,
b.wx_user_id wxUserId,
a.staff_id staffId,
a.clerk_id clerkId,
b.staff_name staffName,
b.wx_open_user_id wxOpenUserId
from tab_haoban_staff_clerk_relation a
left join tab_haoban_staff b on b.staff_id = a.staff_id
where a.status_flag=1 and b.status_flag = 1
and a.wx_enterprise_id = #{wxEnterpriseId}
and a.enterprise_id = #{enterpriseId}
and b.wx_open_user_id in
<foreach
collection=
"wxOpenUserIds"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{id,jdbcType=VARCHAR}
</foreach>
group by a.staff_clerk_relation_id
</select>
<select
id=
"listIdsByWxUserIds"
resultType=
"com.gic.haoban.manage.api.dto.StaffClerkRelationDTO"
>
<select
id=
"listIdsByWxUserIds"
resultType=
"com.gic.haoban.manage.api.dto.StaffClerkRelationDTO"
>
select
select
a.staff_clerk_relation_id staffClerkRelationId,
a.staff_clerk_relation_id staffClerkRelationId,
...
@@ -454,10 +321,18 @@
...
@@ -454,10 +321,18 @@
where a.status_flag=1 and b.status_flag = 1
where a.status_flag=1 and b.status_flag = 1
and a.wx_enterprise_id = #{wxEnterpriseId}
and a.wx_enterprise_id = #{wxEnterpriseId}
and a.enterprise_id = #{enterpriseId}
and a.enterprise_id = #{enterpriseId}
<if
test=
"type==1"
>
and b.wx_user_id in
and b.wx_user_id in
<foreach
collection=
"wxUserIds"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
<foreach
collection=
"wxUserIds"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{id,jdbcType=VARCHAR}
#{id,jdbcType=VARCHAR}
</foreach>
</foreach>
</if>
<if
test=
"type==2"
>
and b.wx_open_user_id in
<foreach
collection=
"wxOpenUserIds"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{id,jdbcType=VARCHAR}
</foreach>
</if>
group by a.staff_clerk_relation_id
group by a.staff_clerk_relation_id
</select>
</select>
...
@@ -525,38 +400,52 @@
...
@@ -525,38 +400,52 @@
<select
id=
"getBindByManage"
resultType=
"java.lang.Integer"
>
<select
id=
"getBindByManage"
resultType=
"java.lang.Integer"
>
select count(*)
select count(*)
from tab_haoban_staff_clerk_relation
from tab_haoban_staff_clerk_relation
a left join tab_haoban_staff b on a.staff_id = b.staff_id
where status_flag = 1
where
a.status_flag = 1 and b.
status_flag = 1
and enterprise_id = #{enterpriseId}
and
a.
enterprise_id = #{enterpriseId}
and manage_flag = 1
and
a.
manage_flag = 1
</select>
</select>
<select
id=
"getBindByStaffIdAndEnterpriseId"
resultType=
"java.lang.Integer"
>
<select
id=
"getBindByStaffIdAndEnterpriseId"
resultType=
"java.lang.Integer"
>
select count(*)
select count(*)
from tab_haoban_staff_clerk_relation
from tab_haoban_staff_clerk_relation
a left join tab_haoban_staff b on a.staff_id = b.staff_id
where
status_flag = 1
where a.status_flag = 1 and b.
status_flag = 1
and enterprise_id = #{enterpriseId}
and
a.
enterprise_id = #{enterpriseId}
and staff_id = #{staffId}
and
a.
staff_id = #{staffId}
</select>
</select>
<select
id=
"listManageBindByStaffId"
resultMap=
"BaseResultMap"
>
<select
id=
"listManageBindByStaffId"
resultType=
"com.gic.haoban.manage.api.dto.StaffClerkRelationDTO"
>
select
<include
refid=
"leftJoinStaffSQL"
/>
<include
refid=
"Base_Column_List"
></include>
where a.status_flag=1 and a.manage_flag = 1 and a.staff_id = #{staffId}
from tab_haoban_staff_clerk_relation
and b.status_flag = 1
where status_flag=1 and manage_flag = 1 and staff_id = #{staffId}
</select>
</select>
<select
id=
"listByStoreIds"
resultMap=
"BaseResultMap"
>
<sql
id=
"leftJoinStaffSQL"
>
select
select a.staff_clerk_relation_id staffClerkRelationId,
<include
refid=
"Base_Column_List"
/>
a.staff_id staffId,
from tab_haoban_staff_clerk_relation
a.wx_enterprise_id wxEnterpriseId,
where status_flag=1
a.enterprise_id enterpriseId,
<if
test=
"null != storeIds and storeIds.size gt 0"
>
a.store_id storeId,
and store_id in
a.clerk_id clerkId,
a.clerk_code clerkCode,
a.status_flag statusFlag,
a.open_concat_flag openConcatFlag ,
a.clerk_type clerkType ,
a.manage_flag manageFlag ,
b.wx_user_id qwUserId,
b.wx_open_user_id openUserId
from tab_haoban_staff_clerk_relation a left join tab_haoban_staff b on b.staff_id = a.staff_id
</sql>
<select
id=
"listByStoreIds"
resultType=
"com.gic.haoban.manage.api.dto.StaffClerkRelationDTO"
>
<include
refid=
"leftJoinStaffSQL"
/>
where a.status_flag=1 and b.status_flag=1 and a.store_id in
<foreach
collection=
"storeIds"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
<foreach
collection=
"storeIds"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
#{item}
</foreach>
</foreach>
<if
test=
"null != wxEnterpriseId"
>
and a.wx_enterprise_id = #{wxEnterpriseId}
</if>
</if>
</select>
</select>
...
...
haoban-manage3-service/src/main/resources/mapper/hm/TabHaobanHmQrcodeMapper.xml
View file @
c3ed75be
...
@@ -445,7 +445,8 @@
...
@@ -445,7 +445,8 @@
<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 = 1
left join tab_haoban_staff c on a.staff_id = c.staff_id
WHERE a.enterprise_id = #{enterpriseId} AND a.status_flag = 1 AND a.open_concat_flag = 1 and c.status_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=
","
>
...
...
haoban-manage3-service/src/test/java/ErrorLogTest.java
deleted
100644 → 0
View file @
db3e0508
import
com.gic.haoban.manage.service.entity.TabHaobanErrorLog
;
import
com.gic.haoban.manage.service.service.ErrorLogService
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.test.context.ContextConfiguration
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
/**
* desc:
*
* @author: YongEn
* @date: 2022/1/18
**/
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@ContextConfiguration
(
locations
=
{
"classpath:applicationContext-conf.xml"
})
public
class
ErrorLogTest
{
@Autowired
private
ErrorLogService
errorLogService
;
@Test
public
void
testSave
()
{
TabHaobanErrorLog
errorLog
=
new
TabHaobanErrorLog
();
errorLog
.
setEnterpriseId
(
"123123"
);
errorLog
.
setModuleDesc
(
"haoban-manage3-service"
);
errorLog
.
setErrorDesc
(
"测试错误"
);
errorLog
.
setErrorFlagId
(
"123123"
);
errorLog
.
setErrorParam
(
"{123,123}"
);
errorLog
.
setRemark
(
"123123"
);
errorLogService
.
save
(
errorLog
);
}
}
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/ClerkController.java
View file @
c3ed75be
...
@@ -19,12 +19,11 @@ import com.gic.haoban.manage.web.vo.ClerkVo;
...
@@ -19,12 +19,11 @@ import com.gic.haoban.manage.web.vo.ClerkVo;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
@
RestController
@
Deprecated
public
class
ClerkController
extends
WebBaseController
{
public
class
ClerkController
extends
WebBaseController
{
@Autowired
@Autowired
private
ClerkService
clerkService
;
private
ClerkService
clerkService
;
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/MaterialController.java
View file @
c3ed75be
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
;
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.Page
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.base.api.common.ServiceResponse
;
import
com.gic.haoban.base.api.common.ServiceResponse
;
...
@@ -12,15 +24,7 @@ import com.gic.haoban.manage.api.dto.MaterialCategoryDTO;
...
@@ -12,15 +24,7 @@ import com.gic.haoban.manage.api.dto.MaterialCategoryDTO;
import
com.gic.haoban.manage.api.dto.MaterialDTO
;
import
com.gic.haoban.manage.api.dto.MaterialDTO
;
import
com.gic.haoban.manage.api.service.MaterialApiService
;
import
com.gic.haoban.manage.api.service.MaterialApiService
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
org.apache.commons.lang3.StringUtils
;
import
com.gic.haoban.manage.web.utils.EmojiFilterUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Objects
;
@RestController
@RestController
public
class
MaterialController
extends
WebBaseController
{
public
class
MaterialController
extends
WebBaseController
{
...
@@ -126,6 +130,10 @@ public class MaterialController extends WebBaseController {
...
@@ -126,6 +130,10 @@ public class MaterialController extends WebBaseController {
materialDTO
.
setStaffId
(
login
.
getClerkId
());
materialDTO
.
setStaffId
(
login
.
getClerkId
());
materialDTO
.
setStaffName
(
login
.
getClerkName
());
materialDTO
.
setStaffName
(
login
.
getClerkName
());
String
msg
=
this
.
checkEmoji
(
materialDTO
.
getMaterialContent
())
;
if
(
null
!=
msg
)
{
return
this
.
fail
(
msg
)
;
}
String
materialTitle
=
materialDTO
.
getMaterialTitle
();
String
materialTitle
=
materialDTO
.
getMaterialTitle
();
String
categoryId
=
materialDTO
.
getCategoryId
();
String
categoryId
=
materialDTO
.
getCategoryId
();
Integer
categoryType
=
materialDTO
.
getMaterialType
();
Integer
categoryType
=
materialDTO
.
getMaterialType
();
...
@@ -185,6 +193,10 @@ public class MaterialController extends WebBaseController {
...
@@ -185,6 +193,10 @@ public class MaterialController extends WebBaseController {
materialDTO
.
setStaffId
(
login
.
getClerkId
());
materialDTO
.
setStaffId
(
login
.
getClerkId
());
materialDTO
.
setStaffName
(
login
.
getClerkName
());
materialDTO
.
setStaffName
(
login
.
getClerkName
());
String
materialId
=
materialDTO
.
getMaterialId
();
String
materialId
=
materialDTO
.
getMaterialId
();
String
msg
=
this
.
checkEmoji
(
materialDTO
.
getMaterialContent
())
;
if
(
null
!=
msg
)
{
return
this
.
fail
(
msg
)
;
}
MaterialDTO
dto
=
materialApiService
.
selectMaterialById
(
materialId
);
MaterialDTO
dto
=
materialApiService
.
selectMaterialById
(
materialId
);
if
(
dto
==
null
)
{
if
(
dto
==
null
)
{
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
...
@@ -263,4 +275,18 @@ public class MaterialController extends WebBaseController {
...
@@ -263,4 +275,18 @@ public class MaterialController extends WebBaseController {
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
}
public
static
String
checkEmoji
(
String
msg
)
{
if
(
StringUtils
.
isBlank
(
msg
))
{
return
null
;
}
String
s
=
EmojiFilterUtil
.
filterEmoji
(
msg
)
;
if
(!
msg
.
equals
(
s
))
{
return
"保存失败,不支持特殊表情字符"
;
}
return
null
;
}
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
EmojiFilterUtil
.
filterEmoji
(
"!@#~!@#¥%……&*&)()——+——+{}“”:?》"
)
);;
}
}
}
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/StaffController.java
View file @
c3ed75be
...
@@ -313,7 +313,7 @@ public class StaffController extends WebBaseController {
...
@@ -313,7 +313,7 @@ public class StaffController extends WebBaseController {
@RequestMapping
(
"del-clerk-relation"
)
@RequestMapping
(
"del-clerk-relation"
)
public
HaobanResponse
delStaffClerkList
(
String
clerkId
)
{
public
HaobanResponse
delStaffClerkList
(
String
clerkId
)
{
WebLoginDTO
login
=
AuthWebRequestUtil
.
getLoginUser
();
WebLoginDTO
login
=
AuthWebRequestUtil
.
getLoginUser
();
boolean
b
=
staffClerkRelationApiService
.
unbindByStaffAndClerkId
(
login
.
getClerkId
(),
clerkId
,
ChannelCodeEnum
.
ADMIN_UNBIND
.
getCode
());
boolean
b
=
staffClerkRelationApiService
.
unbindByStaffAndClerkId
(
login
.
getClerkId
(),
clerkId
,
ChannelCodeEnum
.
ADMIN_UNBIND
.
getCode
()
,
login
.
getWxEnterpriseId
()
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
b
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
b
);
}
}
...
@@ -336,7 +336,7 @@ public class StaffController extends WebBaseController {
...
@@ -336,7 +336,7 @@ public class StaffController extends WebBaseController {
return
resultResponse
(
HaoBanErrCode
.
ERR_10010
);
return
resultResponse
(
HaoBanErrCode
.
ERR_10010
);
}
}
List
<
String
>
enterpriseIds
=
list
.
stream
().
filter
(
dto
->
{
List
<
String
>
enterpriseIds
=
list
.
stream
().
filter
(
dto
->
{
boolean
over
=
wxEnterpriseApiService
.
enterpriseIsOver
(
dto
.
getEnterpriseId
());
boolean
over
=
wxEnterpriseApiService
.
haobanIsStop
(
dto
.
getEnterpriseId
());
return
!
over
;
return
!
over
;
}).
map
(
EnterpriseDetailDTO:
:
getEnterpriseId
).
collect
(
Collectors
.
toList
());
}).
map
(
EnterpriseDetailDTO:
:
getEnterpriseId
).
collect
(
Collectors
.
toList
());
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/utils/EmojiFilterUtil.java
0 → 100644
View file @
c3ed75be
package
com
.
gic
.
haoban
.
manage
.
web
.
utils
;
public
class
EmojiFilterUtil
{
/**
* 是否包含表情
*/
private
static
boolean
isEmojiCharacter
(
char
codePoint
)
{
return
!((
codePoint
==
0x0
)
||
(
codePoint
==
0x9
)
||
(
codePoint
==
0xA
)
||
(
codePoint
==
0xD
)
||
((
codePoint
>=
0x20
)
&&
(
codePoint
<=
0xD7FF
))
||
((
codePoint
>=
0xE000
)
&&
(
codePoint
<=
0xFFFD
))
||
((
codePoint
>=
0x10000
)
&&
(
codePoint
<=
0x10FFFF
)));
}
public
static
String
filterEmoji
(
String
source
)
{
StringBuilder
buf
=
null
;
int
len
=
source
.
length
();
for
(
int
i
=
0
;
i
<
len
;
i
++)
{
char
codePoint
=
source
.
charAt
(
i
);
if
(!
isEmojiCharacter
(
codePoint
))
{
// 如果不包含 则将字符append
if
(
buf
==
null
)
{
buf
=
new
StringBuilder
(
source
.
length
());
}
buf
.
append
(
codePoint
);
}
else
{
}
}
if
(
buf
==
null
)
{
return
source
;
// 如果没有找到 emoji表情,则返回源字符串
}
else
{
if
(
buf
.
length
()
==
len
)
{
// 这里的意义在于尽可能少的toString,因为会重新生成字符串
buf
=
null
;
return
source
;
}
else
{
return
buf
.
toString
();
}
}
}
}
haoban-manage3-wx/pom.xml
View file @
c3ed75be
...
@@ -179,7 +179,46 @@
...
@@ -179,7 +179,46 @@
</exclusion>
</exclusion>
</exclusions>
</exclusions>
</dependency>
</dependency>
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
gic-ecm-api
</artifactId>
<version>
${gic-ecm-api}
</version>
</dependency>
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
gic-marketing-api
</artifactId>
<version>
${gic-marketing-api}
</version>
</dependency>
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
gic-marketing-pro-api
</artifactId>
<version>
${gic-marketing-pro-api}
</version>
</dependency>
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
gic-enterprise-operation-api
</artifactId>
<version>
${gic-enterprise-operation-api}
</version>
<exclusions>
<exclusion>
<artifactId>
hibernate-validator
</artifactId>
<groupId>
org.hibernate.validator
</groupId>
</exclusion>
<exclusion>
<groupId>
javax.validation
</groupId>
<artifactId>
validation-api
</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
gic-game-api
</artifactId>
<version>
${gic-game-api}
</version>
</dependency>
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
gic-integral-mall-api
</artifactId>
<version>
${gic-integral-mall-api}
</version>
</dependency>
</dependencies>
</dependencies>
<build>
<build>
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/WebBaseController.java
View file @
c3ed75be
...
@@ -36,4 +36,16 @@ public class WebBaseController {
...
@@ -36,4 +36,16 @@ public class WebBaseController {
response
.
setErrorCode
(
errCode
.
getCode
());
response
.
setErrorCode
(
errCode
.
getCode
());
return
response
;
return
response
;
}
}
public
HaobanResponse
success
(
Object
obj
)
{
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
obj
,
null
);
}
public
HaobanResponse
fail
(
String
message
)
{
HaobanResponse
response
=
new
HaobanResponse
();
response
.
setMessage
(
message
);
response
.
setErrorCode
(
HaoBanErrCode
.
ERR_OTHER
.
getCode
());
response
.
setDetailError
(
message
);
return
response
;
}
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/WxEnterpriseInfoController.java
View file @
c3ed75be
...
@@ -18,10 +18,8 @@ import com.gic.haoban.app.customer.service.api.service.CustomerApiService;
...
@@ -18,10 +18,8 @@ import com.gic.haoban.app.customer.service.api.service.CustomerApiService;
import
com.gic.haoban.app.customer.service.api.service.StaffMemberRelationApiService
;
import
com.gic.haoban.app.customer.service.api.service.StaffMemberRelationApiService
;
import
com.gic.haoban.common.anno.HttpLimit
;
import
com.gic.haoban.common.anno.HttpLimit
;
import
com.gic.haoban.common.anno.IgnoreLogin
;
import
com.gic.haoban.common.anno.IgnoreLogin
;
import
com.gic.haoban.common.utils.AuthRequestWellDoneUtil
;
import
com.gic.haoban.common.utils.EntityUtil
;
import
com.gic.haoban.common.utils.EntityUtil
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.common.utils.JwtUtil
;
import
com.gic.haoban.manage.api.dto.*
;
import
com.gic.haoban.manage.api.dto.*
;
import
com.gic.haoban.manage.api.enums.SecretTypeEnum
;
import
com.gic.haoban.manage.api.enums.SecretTypeEnum
;
import
com.gic.haoban.manage.api.service.*
;
import
com.gic.haoban.manage.api.service.*
;
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/WxStaffController.java
View file @
c3ed75be
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
;
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
;
import
cn.hutool.core.collection.CollectionUtil
;
import
java.util.ArrayList
;
import
cn.hutool.core.convert.Convert
;
import
java.util.Arrays
;
import
java.util.Collections
;
import
java.util.Comparator
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Objects
;
import
java.util.Set
;
import
java.util.TreeSet
;
import
java.util.stream.Collectors
;
import
javax.validation.Valid
;
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.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
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
;
import
com.gic.clerk.api.dto.ClerkDTO
;
import
com.gic.clerk.api.dto.ClerkDTO
;
import
com.gic.clerk.api.dto.ClerkListDTO
;
import
com.gic.clerk.api.dto.ClerkListDTO
;
import
com.gic.clerk.api.dto.ClerkStoreListDTO
;
import
com.gic.clerk.api.service.ClerkNewService
;
import
com.gic.clerk.api.service.ClerkNewService
;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.clerk.api.service.PowerService
;
import
com.gic.commons.util.DateUtil
;
import
com.gic.commons.util.DateUtil
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.enterprise.api.dto.EnterpriseDTO
;
import
com.gic.enterprise.api.dto.EnterpriseDTO
;
import
com.gic.enterprise.api.dto.StoreDTO
;
import
com.gic.enterprise.api.dto.StoreDTO
;
import
com.gic.enterprise.api.dto.StoreSearchDTO
;
import
com.gic.enterprise.api.service.EnterpriseService
;
import
com.gic.enterprise.api.service.EnterpriseService
;
import
com.gic.enterprise.api.service.StoreService
;
import
com.gic.enterprise.api.service.StoreService
;
import
com.gic.enterprise.api.service.StoreWidgetService
;
import
com.gic.enterprise.api.service.StoreWidgetService
;
import
com.gic.haoban.app.customer.dto.ChildrenListDTO
;
import
com.gic.haoban.app.customer.service.api.service.CustomerApiService
;
import
com.gic.haoban.app.customer.service.api.service.CustomerApiService
;
import
com.gic.haoban.app.customer.service.api.service.DistributeApiService
;
import
com.gic.haoban.app.customer.service.api.service.DistributeApiService
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.base.api.common.PageResult2
;
import
com.gic.haoban.base.api.common.PageResult2
;
import
com.gic.haoban.base.api.common.pojo.dto.WellDoneLoginDTO
;
import
com.gic.haoban.common.anno.HttpLimit
;
import
com.gic.haoban.common.anno.HttpLimit
;
import
com.gic.haoban.common.anno.IgnoreLogin
;
import
com.gic.haoban.common.anno.IgnoreLogin
;
import
com.gic.haoban.common.utils.GooglePhoneNumberUtil
;
import
com.gic.haoban.common.utils.GooglePhoneNumberUtil
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.common.utils.PageUtil
;
import
com.gic.haoban.common.utils.PageUtil
;
import
com.gic.haoban.manage.api.dto.*
;
import
com.gic.haoban.manage.api.dto.AuditDTO
;
import
com.gic.haoban.manage.api.dto.AuditSettingDTO
;
import
com.gic.haoban.manage.api.dto.ClerkMainStoreRelatedDTO
;
import
com.gic.haoban.manage.api.dto.EnterpriseDetailDTO
;
import
com.gic.haoban.manage.api.dto.ExternalClerkRelatedDTO
;
import
com.gic.haoban.manage.api.dto.StaffClerkInfoDTO
;
import
com.gic.haoban.manage.api.dto.StaffClerkRelationDTO
;
import
com.gic.haoban.manage.api.dto.StaffDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseQwDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseRelationDetailDTO
;
import
com.gic.haoban.manage.api.dto.role.HaobanRoleDTO
;
import
com.gic.haoban.manage.api.dto.role.HaobanRoleDTO
;
import
com.gic.haoban.manage.api.dto.role.StoreRoleDTO
;
import
com.gic.haoban.manage.api.dto.role.StoreRoleDTO
;
import
com.gic.haoban.manage.api.enums.*
;
import
com.gic.haoban.manage.api.enums.AuditStatus
;
import
com.gic.haoban.manage.api.enums.AuditType
;
import
com.gic.haoban.manage.api.enums.ChannelCodeEnum
;
import
com.gic.haoban.manage.api.enums.NoticeMessageTypeEnum
;
import
com.gic.haoban.manage.api.enums.SyncTaskTypeEnum
;
import
com.gic.haoban.manage.api.enums.role.RoleClerkTypeEnum
;
import
com.gic.haoban.manage.api.enums.role.RoleClerkTypeEnum
;
import
com.gic.haoban.manage.api.service.*
;
import
com.gic.haoban.manage.api.service.AuditApiService
;
import
com.gic.haoban.manage.api.service.AuditSettingApiService
;
import
com.gic.haoban.manage.api.service.ClerkMainStoreRelatedApiService
;
import
com.gic.haoban.manage.api.service.DealSyncOperationApiService
;
import
com.gic.haoban.manage.api.service.ExternalClerkRelatedApiService
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.api.service.StaffClerkRelationApiService
;
import
com.gic.haoban.manage.api.service.StaffDepartmentRelatedApiService
;
import
com.gic.haoban.manage.api.service.SyncHaobanToGicApiService
;
import
com.gic.haoban.manage.api.service.WxEnterpriseApiService
;
import
com.gic.haoban.manage.api.service.WxEnterpriseRelatedApiService
;
import
com.gic.haoban.manage.api.service.role.HaobanRoleApiService
;
import
com.gic.haoban.manage.api.service.role.HaobanRoleApiService
;
import
com.gic.haoban.manage.api.util.notify.NoticeMessageUtil
;
import
com.gic.haoban.manage.api.util.notify.NoticeMessageUtil
;
import
com.gic.haoban.manage.web.config.Config
;
import
com.gic.haoban.manage.web.config.Config
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
com.gic.haoban.manage.web.qo.CommonQO
;
import
com.gic.haoban.manage.web.qo.CommonQO
;
import
com.gic.haoban.manage.web.vo.*
;
import
com.gic.haoban.manage.web.vo.AuditSettingVO
;
import
com.gic.haoban.manage.web.vo.BindClerkVO
;
import
com.gic.haoban.manage.web.vo.ClerkDetailVo
;
import
com.gic.haoban.manage.web.vo.ClerkEditInfoVO
;
import
com.gic.haoban.manage.web.vo.ClerkListVO
;
import
com.gic.haoban.manage.web.vo.ClerkStoreVO
;
import
com.gic.haoban.manage.web.vo.OperationSettingVO
;
import
com.gic.haoban.manage.web.vo.StaffStoreVO
;
import
com.gic.haoban.manage.web.vo.StaffVO
;
import
com.gic.haoban.manage.web.vo.StoreClerkVO
;
import
com.gic.haoban.manage.web.vo.StoreListVO
;
import
com.gic.haoban.manage.web.vo.StoreRoleVO
;
import
com.gic.haoban.manage.web.vo.notify.CustomerFriendMemberVO
;
import
com.gic.haoban.manage.web.vo.notify.CustomerFriendMemberVO
;
import
com.gic.redis.data.util.RedisUtil
;
import
com.gic.redis.data.util.RedisUtil
;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
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.web.bind.annotation.*
;
import
javax.validation.Valid
;
import
cn.hutool.core.collection.CollectionUtil
;
import
java.util.*
;
import
cn.hutool.core.convert.Convert
;
import
java.util.stream.Collectors
;
@RestController
@RestController
public
class
WxStaffController
extends
WebBaseController
{
public
class
WxStaffController
extends
WebBaseController
{
...
@@ -100,6 +155,8 @@ public class WxStaffController extends WebBaseController {
...
@@ -100,6 +155,8 @@ public class WxStaffController extends WebBaseController {
private
StoreWidgetService
storeWidgetService
;
private
StoreWidgetService
storeWidgetService
;
@Autowired
@Autowired
private
HaobanRoleApiService
haobanRoleApiService
;
private
HaobanRoleApiService
haobanRoleApiService
;
@Autowired
private
PowerService
powerService
;
//选择成员列表
//选择成员列表
@RequestMapping
(
"/staff-list"
)
@RequestMapping
(
"/staff-list"
)
...
@@ -668,7 +725,7 @@ public class WxStaffController extends WebBaseController {
...
@@ -668,7 +725,7 @@ public class WxStaffController extends WebBaseController {
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
}
List
<
String
>
enterpriseIdList
=
list
.
stream
().
filter
(
s
->
{
List
<
String
>
enterpriseIdList
=
list
.
stream
().
filter
(
s
->
{
boolean
over
=
wxEnterpriseApiService
.
enterpriseIsOver
(
s
.
getEnterpriseId
());
boolean
over
=
wxEnterpriseApiService
.
haobanIsStop
(
s
.
getEnterpriseId
());
return
!
over
;
return
!
over
;
}).
map
(
EnterpriseDetailDTO:
:
getEnterpriseId
).
collect
(
Collectors
.
toList
());
}).
map
(
EnterpriseDetailDTO:
:
getEnterpriseId
).
collect
(
Collectors
.
toList
());
List
<
String
>
storeIds
=
wxEnterpriseRelatedApiService
.
listStoreIdByWxEnterpriseId
(
wxEnterpriseId
);
List
<
String
>
storeIds
=
wxEnterpriseRelatedApiService
.
listStoreIdByWxEnterpriseId
(
wxEnterpriseId
);
...
@@ -708,7 +765,7 @@ public class WxStaffController extends WebBaseController {
...
@@ -708,7 +765,7 @@ public class WxStaffController extends WebBaseController {
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
}
List
<
String
>
enterpriseIdList
=
list
.
stream
().
filter
(
s
->
{
List
<
String
>
enterpriseIdList
=
list
.
stream
().
filter
(
s
->
{
boolean
over
=
wxEnterpriseApiService
.
enterpriseIsOver
(
s
.
getEnterpriseId
());
boolean
over
=
wxEnterpriseApiService
.
haobanIsStop
(
s
.
getEnterpriseId
());
return
!
over
;
return
!
over
;
}).
map
(
s
->
s
.
getEnterpriseId
()).
collect
(
Collectors
.
toList
());
}).
map
(
s
->
s
.
getEnterpriseId
()).
collect
(
Collectors
.
toList
());
List
<
String
>
storeIds
=
wxEnterpriseRelatedApiService
.
listStoreIdByWxEnterpriseId
(
wxEnterpriseId
);
List
<
String
>
storeIds
=
wxEnterpriseRelatedApiService
.
listStoreIdByWxEnterpriseId
(
wxEnterpriseId
);
...
@@ -963,7 +1020,7 @@ public class WxStaffController extends WebBaseController {
...
@@ -963,7 +1020,7 @@ public class WxStaffController extends WebBaseController {
//解绑
//解绑
@RequestMapping
(
"unbind-staff"
)
@RequestMapping
(
"unbind-staff"
)
public
HaobanResponse
unBindStaff
(
String
clerkId
,
String
clerkCode
,
String
staffId
,
String
storeId
,
String
enterpriseId
,
Integer
manageFlag
)
{
public
HaobanResponse
unBindStaff
(
String
wxEnterpriseId
,
String
clerkId
,
String
clerkCode
,
String
staffId
,
String
storeId
,
String
enterpriseId
,
Integer
manageFlag
)
{
logger
.
info
(
"解绑 操作人:{},备操作人:{},操作门店:{}"
,
staffId
,
clerkId
,
storeId
);
logger
.
info
(
"解绑 操作人:{},备操作人:{},操作门店:{}"
,
staffId
,
clerkId
,
storeId
);
if
(
StringUtils
.
isAnyBlank
(
clerkId
,
clerkCode
,
staffId
))
{
if
(
StringUtils
.
isAnyBlank
(
clerkId
,
clerkCode
,
staffId
))
{
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
...
@@ -980,7 +1037,7 @@ public class WxStaffController extends WebBaseController {
...
@@ -980,7 +1037,7 @@ public class WxStaffController extends WebBaseController {
if
(
staffClerkRelation
==
null
)
{
if
(
staffClerkRelation
==
null
)
{
return
resultResponse
(
HaoBanErrCode
.
ERR_111145
);
return
resultResponse
(
HaoBanErrCode
.
ERR_111145
);
}
}
staffClerkRelationApiService
.
unbindByStaffAndClerkId
(
staffId
,
clerkId
,
ChannelCodeEnum
.
SELF_UNBIND
.
getCode
());
staffClerkRelationApiService
.
unbindByStaffAndClerkId
(
staffId
,
clerkId
,
ChannelCodeEnum
.
SELF_UNBIND
.
getCode
()
,
wxEnterpriseId
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
}
...
@@ -1548,11 +1605,9 @@ public class WxStaffController extends WebBaseController {
...
@@ -1548,11 +1605,9 @@ public class WxStaffController extends WebBaseController {
/**
/**
* 会员关联数量
* 会员关联数量
*
* @return
*/
*/
@RequestMapping
(
"external-friend-count"
)
@RequestMapping
(
"external-friend-count"
)
public
RestResponse
friendCount
(
String
staffId
)
{
public
RestResponse
<
Object
>
friendCount
(
String
staffId
)
{
StaffDTO
staff
=
staffApiService
.
selectById
(
staffId
);
StaffDTO
staff
=
staffApiService
.
selectById
(
staffId
);
if
(
staff
==
null
)
{
if
(
staff
==
null
)
{
return
RestResponse
.
successResult
(
0
);
return
RestResponse
.
successResult
(
0
);
...
@@ -1562,4 +1617,162 @@ public class WxStaffController extends WebBaseController {
...
@@ -1562,4 +1617,162 @@ public class WxStaffController extends WebBaseController {
return
RestResponse
.
successResult
(
countExternalClerk
);
return
RestResponse
.
successResult
(
countExternalClerk
);
}
}
// 区经门店列表
@RequestMapping
(
"/list-clerk-store"
)
public
RestResponse
<
Object
>
listClerkStore
(
String
wxEnterpriseId
,
String
enterpriseId
,
String
clerkId
,
@RequestParam
(
defaultValue
=
"20"
)
int
pageSize
,
@RequestParam
(
defaultValue
=
"1"
)
int
currentPage
)
{
List
<
String
>
storeIdList
=
this
.
staffApiService
.
getHaoBanStoreIdsRolesByClerkId
(
clerkId
,
wxEnterpriseId
)
;
if
(
CollectionUtils
.
isEmpty
(
storeIdList
))
{
return
RestResponse
.
failure
(
"-1"
,
"无授权门店"
);
}
List
<
StoreListVO
>
voList
=
new
ArrayList
<>();
int
totalCount
=
0
;
List
<
StoreDTO
>
storeDTOList
=
new
ArrayList
<>()
;
if
(
storeIdList
.
get
(
0
).
contains
(
"-1"
))
{
String
storeWidgetId
=
this
.
powerService
.
getStoreWidgetId
(
new
Date
(),
clerkId
);
logger
.
info
(
"权限-所有门店storeWidgetId={}"
,
storeWidgetId
);
Page
<
Object
>
pageParam
=
new
Page
<
Object
>();
pageParam
.
setCurrentPage
(
currentPage
);
pageParam
.
setPageSize
(
pageSize
);
Page
<
StoreDTO
>
page
=
storeWidgetService
.
getStoreWidgetStore
(
storeWidgetId
,
null
,
enterpriseId
,
pageParam
,
null
,
null
);
if
(
page
!=
null
)
{
storeDTOList
=
page
.
getResult
();
totalCount
=
page
.
getTotalCount
();
}
}
else
{
totalCount
=
storeIdList
.
size
();
int
start
=
pageSize
*
(
currentPage
-
1
)
;
if
(
start
<
totalCount
)
{
int
end
=
start
+
pageSize
;
if
(
end
>
totalCount
)
{
end
=
totalCount
;
}
List
<
String
>
subStoreIdList
=
storeIdList
.
subList
(
start
,
end
)
;
if
(
CollectionUtils
.
isNotEmpty
(
subStoreIdList
))
{
logger
.
info
(
"分页当前页storeid数={}"
,
subStoreIdList
.
size
());
String
[]
arr
=
new
String
[
subStoreIdList
.
size
()]
;
List
<
StoreDTO
>
storeList
=
this
.
storeService
.
getStores
(
subStoreIdList
.
toArray
(
arr
));
Map
<
String
,
StoreDTO
>
storeMap
=
storeList
.
stream
().
collect
(
Collectors
.
toMap
(
StoreDTO:
:
getStoreId
,
o
->
o
,(
k1
,
k2
)->
k1
))
;
for
(
String
id
:
subStoreIdList
)
{
if
(
null
!=
storeMap
.
get
(
id
))
{
storeDTOList
.
add
(
storeMap
.
get
(
id
))
;
}
}
}
}
}
if
(
CollectionUtils
.
isNotEmpty
(
storeDTOList
))
{
for
(
StoreDTO
store
:
storeDTOList
)
{
StoreListVO
vo
=
new
StoreListVO
();
vo
.
setStoreId
(
store
.
getStoreId
());
vo
.
setStoreName
(
store
.
getStoreName
());
voList
.
add
(
vo
)
;
}
}
Page
<
StoreListVO
>
page
=
new
Page
<>();
page
.
setResult
(
voList
);
page
.
setTotalCount
(
totalCount
);
page
.
setCurrentPage
(
currentPage
);
page
.
setPageSize
(
pageSize
);
return
RestResponse
.
successResult
(
page
);
}
//区经门店查询
@RequestMapping
(
"search-clerk-store"
)
public
RestResponse
<
Object
>
listClerkStoreByParams
(
String
wxEnterpriseId
,
String
enterpriseId
,
String
clerkId
,
String
storeSearchParams
)
{
if
(
StringUtils
.
isEmpty
(
storeSearchParams
))
{
return
RestResponse
.
failure
(
"-1"
,
"查询条件为空"
)
;
}
// 如果有权限控制,进行管辖门店过0滤
List
<
String
>
authStoreIdList
=
this
.
staffApiService
.
getHaoBanStoreIdsRolesByClerkId
(
clerkId
,
wxEnterpriseId
);
if
(
CollectionUtils
.
isEmpty
(
authStoreIdList
))
{
return
RestResponse
.
failure
(
"-1"
,
"无授权门店"
);
}
StoreSearchDTO
searchDTO
=
new
StoreSearchDTO
();
searchDTO
.
setRecycleStoreCount
(
0
);
searchDTO
.
setMemberCountFlag
(
0
);
searchDTO
.
setSearchName
(
storeSearchParams
);
// 企业ID
searchDTO
.
setEnterpriseId
(
enterpriseId
);
if
(!
authStoreIdList
.
contains
(
"-1"
))
{
searchDTO
.
setAuthStoreIdList
(
authStoreIdList
);
}
// 门店参数
Page
page
=
new
Page
();
page
.
setPageSize
(
20
);
page
.
setCurrentPage
(
1
);
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"searchDto"
,
searchDTO
);
page
.
setParams
(
params
);
logger
.
info
(
"查询条件={}"
,
JSON
.
toJSONString
(
page
));
Map
<
String
,
Object
>
result
=
storeService
.
getStoreListPage
(
page
);
page
=
(
Page
)
result
.
get
(
"page"
);
List
<
StoreDTO
>
storeList
=
(
List
<
StoreDTO
>)
result
.
get
(
"list"
);
List
<
StoreListVO
>
retList
=
new
ArrayList
<
StoreListVO
>();
StoreListVO
vo
=
null
;
for
(
StoreDTO
dto
:
storeList
)
{
vo
=
new
StoreListVO
();
vo
.
setStoreId
(
dto
.
getStoreId
());
vo
.
setStoreName
(
dto
.
getStoreName
());
retList
.
add
(
vo
);
}
return
RestResponse
.
successResult
(
retList
);
}
/**
* 门店导购查询
*/
@RequestMapping
(
"list-clerk"
)
public
RestResponse
<
Object
>
listClerk
(
String
enterpriseId
,
String
wxEnterpriseId
,
String
clerkId
,
String
clerkSearchParams
,
BasePageInfo
basePageInfo
)
{
ClerkDTO
clerk
=
this
.
clerkService
.
getclerkById
(
clerkId
)
;
int
clerkType
=
clerk
.
getClerkType
()
;
List
<
ClerkListVO
>
resultList
=
null
;
if
(
clerkType
==
0
)
{
return
RestResponse
.
failure
(
"-1"
,
"无权访问"
);
}
else
if
(
clerkType
==
1
)
{
List
<
ClerkListDTO
>
clerkList
=
clerkService
.
getClerkByStoreId
(
enterpriseId
,
clerk
.
getStoreId
());
if
(
CollectionUtils
.
isNotEmpty
(
clerkList
)
&&
StringUtils
.
isNotEmpty
(
clerkSearchParams
))
{
clerkList
=
clerkList
.
stream
().
filter
(
dto
->
dto
.
getClerkCode
().
contains
(
clerkSearchParams
)
||
dto
.
getClerkName
().
contains
(
clerkSearchParams
)).
collect
(
Collectors
.
toList
())
;
}
if
(
CollectionUtils
.
isEmpty
(
clerkList
))
{
return
RestResponse
.
failure
(
"-1"
,
"无导购"
);
}
resultList
=
EntityUtil
.
changeEntityListByJSON
(
ClerkListVO
.
class
,
clerkList
);
}
else
if
(
clerkType
==
2
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"enterpriseId"
,
enterpriseId
);
// 只获取导购和店长
params
.
put
(
"clerkTypeList"
,
Arrays
.
asList
(
1
));
if
(
StringUtils
.
isNotBlank
(
clerkSearchParams
))
{
params
.
put
(
"clerkSearchParams"
,
"%"
+
clerkSearchParams
+
"%"
);
}
// 如果有权限控制,进行管辖门店过0滤
List
<
String
>
authStoreIdList
=
this
.
staffApiService
.
getHaoBanStoreIdsRolesByClerkId
(
clerkId
,
wxEnterpriseId
);
if
(
CollectionUtils
.
isEmpty
(
authStoreIdList
))
{
return
RestResponse
.
failure
(
"-1"
,
"无授权门店"
);
}
if
(!(
authStoreIdList
.
size
()
==
1
&&
authStoreIdList
.
contains
(
"-1"
)))
{
params
.
put
(
"storeIdList"
,
authStoreIdList
);
}
Page
<
ClerkStoreListDTO
>
page
=
new
Page
<>();
page
.
setPageSize
(
basePageInfo
.
getPageSize
());
page
.
setCurrentPage
(
basePageInfo
.
getPageNum
());
page
.
setParams
(
params
);
logger
.
info
(
"查询条件:{}"
,
JSON
.
toJSONString
(
params
));
page
=
this
.
clerkService
.
listStoreClerkByPage
(
page
);
resultList
=
EntityUtil
.
changeEntityListByJSON
(
ClerkListVO
.
class
,
page
.
getResult
());
}
List
<
String
>
clerkIdList
=
resultList
.
stream
().
map
(
dto
->
dto
.
getClerkId
()).
collect
(
Collectors
.
toList
())
;
List
<
StaffClerkRelationDTO
>
relationList
=
this
.
staffClerkRelationApiService
.
listByClerkIdsWxEnterpriseId
(
clerkIdList
,
wxEnterpriseId
)
;
List
<
String
>
retlationIdList
=
relationList
.
stream
().
map
(
dto
->
dto
.
getClerkId
()).
collect
(
Collectors
.
toList
())
;
resultList
.
removeIf
(
item
->{
return
!
retlationIdList
.
contains
(
item
.
getClerkId
())
;
})
;
Page
<
ClerkListVO
>
retPage
=
new
Page
<>();
retPage
.
setPageSize
(
resultList
.
size
());
retPage
.
setCurrentPage
(
1
);
retPage
.
setTotalCount
(
resultList
.
size
());
retPage
.
setTotalPage
(
1
);
retPage
.
setResult
(
resultList
);
return
RestResponse
.
successResult
(
retPage
);
}
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/marketing/MemberMarketingController.java
0 → 100644
View file @
c3ed75be
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
.
marketing
;
import
java.util.ArrayList
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.api.base.commons.BasePageInfo
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.util.CollectionUtil
;
import
com.gic.commons.util.DateUtil
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.StringUtil
;
import
com.gic.commons.web.qo.PageQo
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.ecm.api.dto.EcmPlanDTO
;
import
com.gic.ecm.api.dto.MemberEcmLogDTO
;
import
com.gic.ecm.api.service.EcmPlanService
;
import
com.gic.enterprise.service.CustomSettingApiService
;
import
com.gic.game.api.dto.GameActivityDTO
;
import
com.gic.game.api.service.GameService
;
import
com.gic.haoban.manage.web.controller.WebBaseController
;
import
com.gic.haoban.manage.web.vo.AiMemberLogListVO
;
import
com.gic.integralmall.api.dto.IntegralMallExchangeLogDTO
;
import
com.gic.integralmall.api.service.IntegralmallService
;
import
com.gic.marketing.api.dto.CoupCardShelfDTO
;
import
com.gic.marketing.api.dto.MemberCardLogDTO
;
import
com.gic.marketing.api.dto.WechatCard
;
import
com.gic.marketing.api.dto.member.MemberSmsLogDTO
;
import
com.gic.marketing.api.dto.member.MemberWechatLogDTO
;
import
com.gic.marketing.api.service.CardExportService
;
import
com.gic.marketing.api.service.CouponCardService
;
import
com.gic.marketing.api.service.SmsService
;
import
com.gic.marketing.api.service.WechatMarketingService
;
import
com.gic.marketing.pro.api.dto.ai.AiMemberLogListDTO
;
import
com.gic.marketing.pro.api.dto.game.GameDTO
;
import
com.gic.marketing.pro.api.service.ai.AiMemberLogApiService
;
import
com.gic.marketing.pro.api.service.game.GameApiService
;
import
com.gic.member.api.dto.AchievementSystemDTO
;
import
com.gic.member.api.dto.MemberDTO
;
import
com.gic.member.api.service.AchievementService
;
import
com.google.common.collect.Lists
;
/**
*
* @ClassName: MemberMarketingController
* @Description: 客户营销记录
* @author xugh
* @date 2022年10月28日 上午9:57:23
*
*/
@RestController
public
class
MemberMarketingController
extends
WebBaseController
{
private
static
final
org
.
apache
.
logging
.
log4j
.
Logger
logger
=
LogManager
.
getLogger
(
MemberMarketingController
.
class
);
@Autowired
private
EcmPlanService
ecmPlanService
;
@Autowired
private
CardExportService
cardExportService
;
@Autowired
private
SmsService
smsService
;
@Autowired
private
WechatMarketingService
wechatMarketingService
;
@Autowired
private
AiMemberLogApiService
aiMemberLogApiService
;
@Autowired
private
CustomSettingApiService
customSettingApiService
;
@Autowired
private
CouponCardService
couponCardService
;
@Autowired
private
GameService
gameService
;
@Autowired
private
GameApiService
gameApiService
;
@Autowired
private
AchievementService
achievementService
;
@Autowired
private
IntegralmallService
integralMallService
;
// 会员积分商城订单数
@RequestMapping
(
"/member/integral-order-num"
)
private
RestResponse
<
Object
>
getIntegralOrderNum
(
String
enterpriseId
,
String
memberId
)
{
Page
<
IntegralMallExchangeLogDTO
>
page
=
new
Page
<>();
page
.
setCurrentPage
(
1
);
page
.
setPageSize
(
20
);
page
=
integralMallService
.
findExchangeLogFromMember
(
enterpriseId
,
memberId
,
null
,
null
,
"1,2,3"
,
null
,
page
);
return
RestResponse
.
successResult
(
page
.
getTotalCount
());
}
/**
* ECM营销日志
*
* @param memberId 会员ID
* @param search 搜索条件:计划名称
* @param marketingType 营销类型 图文-teletext 文本 text 小程序-wxa 图片-image 卡券-card 短信-message 话务-teltask 企微-qywx 群发消息 qfxx 积分 integral 会员卡升级 grade
* @param beginTime 开始时间
* @param endTime 结束时间
* @param currentPage currentPage
* @param pageSize pageSize
* @return Response
*/
@RequestMapping
(
"/member/ecm-log-page"
)
@ResponseBody
public
RestResponse
<
Object
>
memberEcmLogPage
(
@RequestParam
(
defaultValue
=
"-1"
)
String
memberId
,
String
search
,
String
marketingType
,
Date
beginTime
,
Date
endTime
,
@RequestParam
(
defaultValue
=
"1"
)
int
currentPage
,
@RequestParam
(
defaultValue
=
"20"
)
int
pageSize
,
String
enterpriseId
)
{
Page
<
MemberEcmLogDTO
>
page
=
new
Page
<>(
currentPage
,
pageSize
);
// 时间默认一个月
if
(
beginTime
==
null
||
endTime
==
null
)
{
Calendar
start
=
Calendar
.
getInstance
();
start
.
add
(
Calendar
.
MONTH
,
-
3
);
beginTime
=
start
.
getTime
();
endTime
=
new
Date
();
}
beginTime
=
DateUtil
.
getStartTimeOfDay
(
beginTime
);
endTime
=
DateUtil
.
getEndTimeOfDay
(
endTime
);
page
=
ecmPlanService
.
memberEcmLogPage
(
enterpriseId
,
memberId
,
search
,
marketingType
,
beginTime
,
endTime
,
page
);
return
RestResponse
.
successResult
(
page
);
}
/**
* 卡券营销日志
*
* @param memberId 会员ID
* @param search 搜索条件:卡券代码
* @param receiveCode 投放渠道
* @param putBeginTime 投放开始时间
* @param putEndTime 投放结束时间
* @param receiveBeginTime 领取开始时间
* @param receiveEndTime 领取结束时间
* @param currentPage currentPage
* @param pageSize pageSize
* @return Response
*/
@RequestMapping
(
"/member/card-log-page"
)
@ResponseBody
public
RestResponse
<
Object
>
memberCardLogPage
(
@RequestParam
(
defaultValue
=
"-1"
)
String
memberId
,
String
search
,
String
receiveCode
,
Date
putBeginTime
,
Date
putEndTime
,
Date
receiveBeginTime
,
Date
receiveEndTime
,
@RequestParam
(
defaultValue
=
"1"
)
int
currentPage
,
@RequestParam
(
defaultValue
=
"20"
)
int
pageSize
,
String
enterpriseId
)
{
Page
<
MemberCardLogDTO
>
page
=
new
Page
<>(
currentPage
,
pageSize
);
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
page
.
setPageSize
(
pageSize
);
page
.
setCurrentPage
(
currentPage
);
params
.
put
(
"memberId"
,
memberId
);
params
.
put
(
"enterpriseId"
,
enterpriseId
);
params
.
put
(
"receiveCode"
,
receiveCode
);
params
.
put
(
"receiveType"
,
"CARD_RECEIVE_TYPE"
);
params
.
put
(
"showCardCodeFlag"
,
""
);
params
.
put
(
"search"
,
search
);
// 时间默认一个月
if
(
putBeginTime
==
null
||
putEndTime
==
null
)
{
Calendar
start
=
Calendar
.
getInstance
();
start
.
add
(
Calendar
.
MONTH
,
-
3
);
putBeginTime
=
start
.
getTime
();
putEndTime
=
new
Date
();
}
params
.
put
(
"beginTime"
,
DateUtil
.
getStartTimeOfDay
(
putBeginTime
));
params
.
put
(
"endTime"
,
DateUtil
.
getEndTimeOfDay
(
putEndTime
));
if
(
receiveBeginTime
!=
null
)
{
params
.
put
(
"receiveBeginTime"
,
DateUtil
.
getStartTimeOfDay
(
receiveBeginTime
));
}
if
(
receiveEndTime
!=
null
)
{
params
.
put
(
"receiveEndTime"
,
DateUtil
.
getEndTimeOfDay
(
receiveEndTime
));
}
page
.
setParams
(
params
);
page
=
cardExportService
.
getCardLogs
(
page
);
cardReceiveTypeName
(
enterpriseId
,
page
);
return
RestResponse
.
successResult
(
page
);
}
/**
* 短信营销日志
*
* @param memberId 会员ID
* @param smsType 模板类型:0-普通短信 1-营销短信
* @param beginTime 开始时间
* @param endTime 结束时间
* @param currentPage currentPage
* @param pageSize pageSize
* @return Response
*/
@RequestMapping
(
"/member/sms-log-page"
)
@ResponseBody
public
RestResponse
<
Object
>
memberSmsLogPage
(
@RequestParam
(
defaultValue
=
"-1"
)
String
memberId
,
Integer
smsType
,
Date
beginTime
,
Date
endTime
,
@RequestParam
(
defaultValue
=
"1"
)
int
currentPage
,
@RequestParam
(
defaultValue
=
"20"
)
int
pageSize
,
@RequestParam
(
defaultValue
=
"-1"
)
int
source
,
String
enterpriseId
)
{
// 时间默认一个月
if
(
beginTime
==
null
||
endTime
==
null
)
{
Calendar
start
=
Calendar
.
getInstance
();
start
.
add
(
Calendar
.
MONTH
,
-
3
);
beginTime
=
start
.
getTime
();
endTime
=
new
Date
();
}
beginTime
=
DateUtil
.
getStartTimeOfDay
(
beginTime
);
endTime
=
DateUtil
.
getEndTimeOfDay
(
endTime
);
Page
<
MemberSmsLogDTO
>
page
=
new
Page
<>(
currentPage
,
pageSize
);
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
if
(-
1
!=
source
)
{
params
.
put
(
"source"
,
source
);
}
page
.
setParams
(
params
);
page
=
smsService
.
memberSmsLogPage
(
enterpriseId
,
memberId
,
smsType
,
beginTime
,
endTime
,
page
);
return
RestResponse
.
successResult
(
page
);
}
/**
* 微信营销日志
*
* @param memberId 会员ID
* @param contentType 图文类型(0:图文消息,1:文本消息, 2: 图片)
* @param beginTime 开始时间
* @param endTime 结束时间
* @param currentPage currentPage
* @param pageSize pageSize
* @return ResponseZ
*/
@RequestMapping
(
"/member/wechat-log-page"
)
@ResponseBody
public
RestResponse
<
Object
>
memberWechatLogPage
(
@RequestParam
(
defaultValue
=
"-1"
)
String
memberId
,
Integer
contentType
,
Date
beginTime
,
Date
endTime
,
@RequestParam
(
defaultValue
=
"1"
)
int
currentPage
,
@RequestParam
(
defaultValue
=
"20"
)
int
pageSize
,
String
enterpriseId
)
{
Page
<
MemberWechatLogDTO
>
page
=
new
Page
<>(
currentPage
,
pageSize
);
// 时间默认一个月
if
(
beginTime
==
null
||
endTime
==
null
)
{
Calendar
start
=
Calendar
.
getInstance
();
start
.
add
(
Calendar
.
MONTH
,
-
3
);
beginTime
=
start
.
getTime
();
endTime
=
new
Date
();
}
beginTime
=
DateUtil
.
getStartTimeOfDay
(
beginTime
);
endTime
=
DateUtil
.
getEndTimeOfDay
(
endTime
);
page
=
wechatMarketingService
.
memberWechatLogPage
(
enterpriseId
,
memberId
,
contentType
,
beginTime
,
endTime
,
page
);
return
RestResponse
.
successResult
(
page
);
}
@RequestMapping
(
"/member/marketing-count"
)
@ResponseBody
public
RestResponse
<
Map
<
String
,
Integer
>>
marketingCount
(
String
memberId
,
String
enterpriseId
)
{
//1 待使用 2已使用 3已过期
Page
<
WechatCard
>
page
=
new
Page
<
WechatCard
>();
page
.
setPageSize
(
Integer
.
MAX_VALUE
);
page
.
setCurrentPage
(
1
);
page
=
this
.
cardExportService
.
getMemgerCouponByStatus
(
memberId
,
1
,
page
);
int
memberCouponCount
=
page
.
getTotalCount
();
// 时间默认一个月
Calendar
start
=
Calendar
.
getInstance
();
Date
endTime
=
start
.
getTime
();
start
.
add
(
Calendar
.
MONTH
,
-
3
);
Date
beginTime
=
start
.
getTime
();
// ecm
RestResponse
<
Object
>
ecmRep
=
this
.
memberEcmLogPage
(
memberId
,
""
,
null
,
beginTime
,
endTime
,
1
,
1
,
enterpriseId
);
Page
<
MemberEcmLogDTO
>
ecmPage
=
(
Page
<
MemberEcmLogDTO
>)
ecmRep
.
getResult
();
// card
RestResponse
<
Object
>
cardRep
=
this
.
memberCardLogPage
(
memberId
,
""
,
""
,
beginTime
,
endTime
,
null
,
null
,
1
,
1
,
enterpriseId
);
Page
<
MemberCardLogDTO
>
cardPage
=
(
Page
<
MemberCardLogDTO
>)
cardRep
.
getResult
();
// sms
RestResponse
<
Object
>
smsRep
=
this
.
memberSmsLogPage
(
memberId
,
null
,
beginTime
,
endTime
,
1
,
1
,
-
1
,
enterpriseId
);
Page
<
MemberSmsLogDTO
>
smsPage
=
(
Page
<
MemberSmsLogDTO
>)
smsRep
.
getResult
();
// wechat
RestResponse
<
Object
>
wechatRep
=
this
.
memberWechatLogPage
(
memberId
,
null
,
beginTime
,
endTime
,
1
,
1
,
enterpriseId
);
Page
<
MemberWechatLogDTO
>
wechatPage
=
(
Page
<
MemberWechatLogDTO
>)
wechatRep
.
getResult
();
// AI营销
ServiceResponse
<
Page
<
AiMemberLogListDTO
>>
aiMemberLogRes
=
aiMemberLogApiService
.
pageAiMemberMarketingLog
(
memberId
,
null
,
Lists
.
newArrayList
(
0
,
1
,
6
,
8
),
null
,
null
,
new
BasePageInfo
());
Map
<
String
,
Integer
>
map
=
new
HashMap
<>();
map
.
put
(
"ecm"
,
ecmPage
.
getTotalCount
())
;
map
.
put
(
"sms"
,
smsPage
.
getTotalCount
())
;
map
.
put
(
"coupon"
,
cardPage
.
getTotalCount
())
;
map
.
put
(
"wechat"
,
wechatPage
.
getTotalCount
())
;
map
.
put
(
"ai"
,
aiMemberLogRes
.
getResult
().
getTotalCount
())
;
map
.
put
(
"memberCouponCount"
,
memberCouponCount
)
;
return
RestResponse
.
successResult
(
map
);
}
@RequestMapping
(
"/member/page-ai-member-log"
)
@ResponseBody
public
RestResponse
<
Object
>
pageAiMemberMarketingLog
(
String
memberId
,
String
planName
,
String
aiStartTime
,
String
aiEndTime
,
@RequestParam
(
defaultValue
=
"1"
)
int
currentPage
,
@RequestParam
(
defaultValue
=
"20"
)
int
pageSize
)
{
Calendar
start
=
Calendar
.
getInstance
();
Date
endTime
=
start
.
getTime
();
start
.
add
(
Calendar
.
MONTH
,
-
3
);
Date
beginTime
=
start
.
getTime
();
PageQo
pageQo
=
new
PageQo
()
;
pageQo
.
setPageNum
(
currentPage
);
pageQo
.
setPageSize
(
pageSize
);
ServiceResponse
<
Page
<
AiMemberLogListDTO
>>
res
=
aiMemberLogApiService
.
pageAiMemberMarketingLog
(
memberId
,
planName
,
Lists
.
newArrayList
(
0
,
1
,
6
,
8
),
DateUtil
.
dateToStr
(
beginTime
,
"yyyy-MM-dd"
),
DateUtil
.
dateToStr
(
endTime
,
"yyyy-MM-dd"
),
pageQo
.
getBasePageInfo
());
if
(
res
.
isSuccess
())
{
Page
<
AiMemberLogListDTO
>
page
=
res
.
getResult
();
List
<
AiMemberLogListDTO
>
list
=
page
.
getResult
();
if
(
CollectionUtils
.
isEmpty
(
list
))
{
return
RestResponse
.
successResult
(
res
.
getResult
());
}
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
param
.
put
(
"dict_type"
,
"marketing_activity_scene"
);
ServiceResponse
<
Page
<
JSONObject
>>
dictRes
=
customSettingApiService
.
page
(
"tab_business_dict"
,
param
,
1
,
20
);
List
<
JSONObject
>
dictList
=
dictRes
.
getResult
().
getResult
();
Map
<
String
,
String
>
dictCodeMapName
=
new
HashMap
<>();
for
(
JSONObject
jsonObject
:
dictList
)
{
dictCodeMapName
.
put
(
jsonObject
.
getString
(
"dict_code"
),
jsonObject
.
getString
(
"dict_name"
));
}
Page
<
AiMemberLogListVO
>
resultPage
=
EntityUtil
.
changeEntityByJSON
(
Page
.
class
,
page
);
List
<
AiMemberLogListVO
>
voList
=
new
ArrayList
<>();
for
(
AiMemberLogListDTO
dto
:
list
)
{
AiMemberLogListVO
vo
=
new
AiMemberLogListVO
();
vo
.
setAiLogId
(
dto
.
getAiLogId
());
vo
.
setAiTime
(
dto
.
getAiTime
());
vo
.
setPlanName
(
dto
.
getPlanName
());
vo
.
setAiTemplateName
(
dto
.
getAiTemplateName
());
Integer
activityScene
=
dto
.
getActivityScene
();
if
(
activityScene
==
null
)
{
vo
.
setActivityScene
(
null
);
}
else
{
vo
.
setActivityScene
(
dictCodeMapName
.
get
(
activityScene
.
toString
()));
}
voList
.
add
(
vo
);
}
resultPage
.
setResult
(
voList
);
return
RestResponse
.
successResult
(
resultPage
);
}
return
RestResponse
.
failure
(
"9999"
,
res
.
getMessage
());
}
/**
* 卡券记录-领取记录-来源明细
*
* @param page
*/
private
void
cardReceiveTypeName
(
String
enterpriseId
,
Page
<
MemberCardLogDTO
>
page
)
{
List
<
MemberCardLogDTO
>
list
=
page
.
getResult
();
if
(
CollectionUtils
.
isEmpty
(
list
))
{
return
;
}
Map
<
String
,
List
<
MemberCardLogDTO
>>
map
=
CollectionUtil
.
group
(
list
,
"receiveCode"
);
Set
<
String
>
keySet
=
map
.
keySet
();
Iterator
<
String
>
it
=
keySet
.
iterator
();
Map
<
String
,
List
<
EcmPlanDTO
>>
ecmMap
=
new
HashMap
<>();
Map
<
Long
,
GameDTO
>
newGameMap
=
new
HashMap
<>();
Map
<
String
,
List
<
GameActivityDTO
>>
gameMap
=
new
HashMap
<>();
Map
<
String
,
List
<
AchievementSystemDTO
>>
achievementMap
=
new
HashMap
<>();
Map
<
String
,
List
<
CoupCardShelfDTO
>>
shelfMap
=
new
HashMap
<>();
while
(
it
.
hasNext
())
{
String
key
=
it
.
next
();
Set
<
String
>
ids
=
new
HashSet
<
String
>();
Set
<
Long
>
longIds
=
new
HashSet
<
Long
>();
if
(
"RECEIVE_003"
.
equals
(
key
))
{
List
<
MemberCardLogDTO
>
_list
=
map
.
get
(
"RECEIVE_003"
);
for
(
MemberCardLogDTO
_dto
:
_list
)
{
if
(!
StringUtil
.
isBlank
(
_dto
.
getRelationId
()))
{
ids
.
add
(
_dto
.
getRelationId
());
}
}
if
(
CollectionUtils
.
isNotEmpty
(
ids
))
{
List
<
EcmPlanDTO
>
ecmList
=
ecmPlanService
.
getEcmNameByIds
(
ids
);
ecmMap
=
CollectionUtil
.
group
(
ecmList
,
"ecmPlanId"
);
}
}
if
(
"RECEIVE_004"
.
equals
(
key
))
{
}
if
(
"RECEIVE_005"
.
equals
(
key
))
{
List
<
MemberCardLogDTO
>
_list
=
map
.
get
(
"RECEIVE_005"
);
for
(
MemberCardLogDTO
_dto
:
_list
)
{
if
(!
StringUtil
.
isBlank
(
_dto
.
getRelationId
()))
{
ids
.
add
(
_dto
.
getRelationId
());
}
}
if
(
CollectionUtils
.
isNotEmpty
(
ids
))
{
List
<
CoupCardShelfDTO
>
shelfList
=
this
.
couponCardService
.
getShelfNameByIds
(
ids
);
shelfMap
=
CollectionUtil
.
group
(
shelfList
,
"shelfId"
);
}
}
if
(
"RECEIVE_007"
.
equals
(
key
))
{
List
<
MemberCardLogDTO
>
_list
=
map
.
get
(
"RECEIVE_007"
);
for
(
MemberCardLogDTO
_dto
:
_list
)
{
if
(!
StringUtil
.
isBlank
(
_dto
.
getRelationId
()))
{
ids
.
add
(
_dto
.
getRelationId
());
}
}
if
(
CollectionUtils
.
isNotEmpty
(
ids
))
{
List
<
GameActivityDTO
>
gameList
=
gameService
.
listGameNameByRecordCodes
(
enterpriseId
,
ids
);
gameMap
=
CollectionUtil
.
group
(
gameList
,
"gameActivityId"
);
}
}
if
(
"RECEIVE_010"
.
equals
(
key
))
{
List
<
MemberCardLogDTO
>
_list
=
map
.
get
(
"RECEIVE_010"
);
for
(
MemberCardLogDTO
_dto
:
_list
)
{
if
(!
StringUtil
.
isBlank
(
_dto
.
getRelationId
()))
{
ids
.
add
(
_dto
.
getRelationId
());
}
}
if
(
CollectionUtils
.
isNotEmpty
(
ids
))
{
List
<
AchievementSystemDTO
>
achievementList
=
achievementService
.
getNameByIds
(
ids
);
achievementMap
=
CollectionUtil
.
group
(
achievementList
,
"achievementSystemId"
);
}
}
if
(
"RECEIVE_026"
.
equals
(
key
))
{
List
<
MemberCardLogDTO
>
_list
=
map
.
get
(
"RECEIVE_026"
);
for
(
MemberCardLogDTO
_dto
:
_list
)
{
if
(!
StringUtil
.
isBlank
(
_dto
.
getRelationId
()))
{
longIds
.
add
(
Long
.
parseLong
(
_dto
.
getRelationId
()));
}
}
if
(
CollectionUtils
.
isNotEmpty
(
longIds
))
{
ServiceResponse
<
List
<
GameDTO
>>
gameList
=
gameApiService
.
getGameList
(
Lists
.
newArrayList
(
longIds
),
enterpriseId
);
List
<
GameDTO
>
result
=
gameList
.
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
result
))
{
newGameMap
=
result
.
stream
().
collect
(
Collectors
.
toMap
(
GameDTO:
:
getGameId
,
v
->
v
));
}
}
}
}
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
MemberCardLogDTO
c
=
list
.
get
(
i
);
if
(
org
.
apache
.
commons
.
lang3
.
StringUtils
.
isNotBlank
(
c
.
getRelationId
()))
{
if
(
"RECEIVE_003"
.
equals
(
c
.
getReceiveCode
()))
{
List
<
EcmPlanDTO
>
ecmList
=
ecmMap
.
get
(
c
.
getRelationId
());
if
(
CollectionUtils
.
isNotEmpty
(
ecmList
))
{
c
.
setReceiveTypeExcel
(
ecmList
.
get
(
0
).
getEcmPlanName
());
}
}
if
(
"RECEIVE_004"
.
equals
(
c
.
getReceiveCode
()))
{
// 门店展架-门店名称
c
.
setReceiveTypeExcel
(
c
.
getStoreName
());
}
if
(
"RECEIVE_005"
.
equals
(
c
.
getReceiveCode
()))
{
List
<
CoupCardShelfDTO
>
referList
=
shelfMap
.
get
(
c
.
getRelationId
());
if
(
CollectionUtils
.
isNotEmpty
(
referList
))
{
c
.
setReceiveTypeExcel
(
referList
.
get
(
0
).
getShelfName
());
}
}
if
(
"RECEIVE_007"
.
equals
(
c
.
getReceiveCode
()))
{
List
<
GameActivityDTO
>
referList
=
gameMap
.
get
(
c
.
getRelationId
());
if
(
CollectionUtils
.
isNotEmpty
(
referList
))
{
c
.
setReceiveTypeExcel
(
referList
.
get
(
0
).
getGameName
());
}
}
if
(
"RECEIVE_010"
.
equals
(
c
.
getReceiveCode
()))
{
List
<
AchievementSystemDTO
>
referList
=
achievementMap
.
get
(
c
.
getRelationId
());
if
(
CollectionUtils
.
isNotEmpty
(
referList
))
{
c
.
setReceiveTypeExcel
(
referList
.
get
(
0
).
getAchievementName
());
}
}
if
(
"RECEIVE_026"
.
equals
(
c
.
getReceiveCode
()))
{
GameDTO
gameDTO
=
newGameMap
.
get
(
Long
.
parseLong
(
c
.
getRelationId
()));
if
(
gameDTO
!=
null
)
{
c
.
setReceiveTypeExcel
(
gameDTO
.
getGameName
());
}
}
}
}
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/member/MemberController.java
0 → 100644
View file @
c3ed75be
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
.
member
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.gic.haoban.manage.web.controller.WebBaseController
;
@RestController
public
class
MemberController
extends
WebBaseController
{
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/vo/AiMemberLogListVO.java
0 → 100644
View file @
c3ed75be
package
com
.
gic
.
haoban
.
manage
.
web
.
vo
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* @Author guojx
* @Date 2022/3/17 15:23
*/
public
class
AiMemberLogListVO
implements
Serializable
{
private
Long
aiLogId
;
/**
* 拨打时间 (触达时间)
*/
private
Date
aiTime
;
/**
* 活动名称
*/
private
String
planName
;
/**
* 活动场景
*/
private
String
activityScene
;
/**
* 话术名称(模板名称)
*/
private
String
aiTemplateName
;
public
Long
getAiLogId
()
{
return
aiLogId
;
}
public
AiMemberLogListVO
setAiLogId
(
Long
aiLogId
)
{
this
.
aiLogId
=
aiLogId
;
return
this
;
}
public
Date
getAiTime
()
{
return
aiTime
;
}
public
AiMemberLogListVO
setAiTime
(
Date
aiTime
)
{
this
.
aiTime
=
aiTime
;
return
this
;
}
public
String
getPlanName
()
{
return
planName
;
}
public
AiMemberLogListVO
setPlanName
(
String
planName
)
{
this
.
planName
=
planName
;
return
this
;
}
public
String
getActivityScene
()
{
return
activityScene
;
}
public
AiMemberLogListVO
setActivityScene
(
String
activityScene
)
{
this
.
activityScene
=
activityScene
;
return
this
;
}
public
String
getAiTemplateName
()
{
return
aiTemplateName
;
}
public
AiMemberLogListVO
setAiTemplateName
(
String
aiTemplateName
)
{
this
.
aiTemplateName
=
aiTemplateName
;
return
this
;
}
@Override
public
String
toString
()
{
return
"AiMemberLogListVO{"
+
"aiLogId="
+
aiLogId
+
", aiTime="
+
aiTime
+
", planName='"
+
planName
+
'\''
+
", activityScene='"
+
activityScene
+
'\''
+
", aiTemplateName='"
+
aiTemplateName
+
'\''
+
'}'
;
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/vo/ClerkListVO.java
0 → 100644
View file @
c3ed75be
package
com
.
gic
.
haoban
.
manage
.
web
.
vo
;
import
java.io.Serializable
;
public
class
ClerkListVO
implements
Serializable
{
/**
* @Fields serialVersionUID : TODO(用一句话描述这个变量表示什么)
*/
private
static
final
long
serialVersionUID
=
-
4120100748397513224L
;
private
String
clerkId
;
private
String
clerkName
;
private
String
clerkCode
;
public
String
getClerkId
()
{
return
clerkId
;
}
public
String
getClerkName
()
{
return
clerkName
;
}
public
void
setClerkId
(
String
clerkId
)
{
this
.
clerkId
=
clerkId
;
}
public
void
setClerkName
(
String
clerkName
)
{
this
.
clerkName
=
clerkName
;
}
public
String
getClerkCode
()
{
return
clerkCode
;
}
public
void
setClerkCode
(
String
clerkCode
)
{
this
.
clerkCode
=
clerkCode
;
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/vo/StoreListVO.java
0 → 100644
View file @
c3ed75be
package
com
.
gic
.
haoban
.
manage
.
web
.
vo
;
import
java.io.Serializable
;
public
class
StoreListVO
implements
Serializable
{
private
String
storeId
;
private
String
storeName
;
public
String
getStoreId
()
{
return
storeId
;
}
public
String
getStoreName
()
{
return
storeName
;
}
public
void
setStoreId
(
String
storeId
)
{
this
.
storeId
=
storeId
;
}
public
void
setStoreName
(
String
storeName
)
{
this
.
storeName
=
storeName
;
}
}
haoban-manage3-wx/src/main/webapp/WEB-INF/dubbo-haoban-manage-wx.xml
View file @
c3ed75be
...
@@ -8,11 +8,24 @@
...
@@ -8,11 +8,24 @@
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/context/spring-context.xsd
http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd"
>
http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd"
>
<context:component-scan
base-package=
"com.gic.haoban"
/>
<context:component-scan
base-package=
"com.gic.haoban"
/>
<!-- 应用名称 -->
<!-- 应用名称 -->
<dubbo:application
name=
"haoban-manage3-wx"
/>
<dubbo:application
name=
"haoban-manage3-wx"
/>
<dubbo:protocol
name=
"dubbo"
port=
"30010"
/>
<dubbo:protocol
name=
"dubbo"
port=
"30010"
/>
<dubbo:reference
interface=
"com.gic.member.api.service.GradeService"
id=
"gradeService"
/>
<dubbo:reference
interface=
"com.gic.ecm.api.service.EcmPlanService"
id=
"ecmPlanService"
/>
<dubbo:reference
interface=
"com.gic.marketing.api.service.CardExportService"
id=
"cardExportService"
/>
<dubbo:reference
interface=
"com.gic.marketing.api.service.SmsService"
id=
"smsService"
/>
<dubbo:reference
interface=
"com.gic.marketing.api.service.WechatMarketingService"
id=
"wechatMarketingService"
/>
<dubbo:reference
interface=
"com.gic.marketing.pro.api.service.ai.AiMemberLogApiService"
id=
"aiMemberLogApiService"
/>
<dubbo:reference
interface=
"com.gic.marketing.api.service.CouponCardService"
id=
"couponCardService"
/>
<dubbo:reference
interface=
"com.gic.game.api.service.GameService"
id=
"gameService"
/>
<dubbo:reference
interface=
"com.gic.enterprise.service.CustomSettingApiService"
id=
"customSettingApiService"
/>
<dubbo:reference
interface=
"com.gic.marketing.pro.api.service.game.GameApiService"
id=
"gameApiService"
/>
<dubbo:reference
interface=
"com.gic.member.api.service.AchievementService"
id=
"achievementService"
/>
<dubbo:reference
interface=
"com.gic.clerk.api.service.PowerService"
id=
"powerService"
/>
<dubbo:reference
interface=
"com.gic.integralmall.api.service.IntegralmallService"
id=
"integralmallService"
/>
<dubbo:reference
interface=
"com.gic.enterprise.api.service.EnterpriseUseForbidService"
id=
"enterpriseUseForbidService"
/>
<dubbo:reference
interface=
"com.gic.enterprise.api.service.EnterpriseUseForbidService"
id=
"enterpriseUseForbidService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.StaffDepartmentRelatedApiService"
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.StaffDepartmentRelatedApiService"
id=
"staffDepartmentRelatedApiService"
/>
id=
"staffDepartmentRelatedApiService"
/>
...
...
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