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
7e01269e
Commit
7e01269e
authored
Aug 05, 2022
by
墨竹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:迁移多人活码api
parent
54a4b13c
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
196 additions
and
130 deletions
+196
-130
HmClerkRelationApiService.java
...oban/manage/api/service/hm/HmClerkRelationApiService.java
+78
-0
HmQrcodeApiService.java
.../gic/haoban/manage/api/service/hm/HmQrcodeApiService.java
+0
-61
StaffClerkRelationServiceImpl.java
...e/service/service/impl/StaffClerkRelationServiceImpl.java
+5
-2
MemberUnionidRelatedApiServiceImpl.java
.../service/out/impl/MemberUnionidRelatedApiServiceImpl.java
+7
-4
StaffClerkRelationApiServiceImpl.java
...ce/service/out/impl/StaffClerkRelationApiServiceImpl.java
+3
-3
HmClerkRelationApiServiceImpl.java
...ce/service/out/impl/hm/HmClerkRelationApiServiceImpl.java
+92
-0
HmQrcodeApiServiceImpl.java
...e/service/service/out/impl/hm/HmQrcodeApiServiceImpl.java
+0
-58
dubbo-haoban-manage-service.xml
...ervice/src/main/resources/dubbo-haoban-manage-service.xml
+2
-0
HmQrcodeController.java
...c/haoban/manage/web/controller/hm/HmQrcodeController.java
+6
-2
dubbo-haoban-manage-web.xml
...3-web/src/main/webapp/WEB-INF/dubbo-haoban-manage-web.xml
+3
-0
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/hm/HmClerkRelationApiService.java
0 → 100644
View file @
7e01269e
package
com
.
gic
.
haoban
.
manage
.
api
.
service
.
hm
;
import
com.gic.api.base.commons.BasePageInfo
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.haoban.manage.api.dto.hm.HmClerkRelationDTO
;
import
java.util.List
;
/**
* 多人活码
*
* @author mozhu
* @date 2022-08-05 17:02:54
*/
public
interface
HmClerkRelationApiService
{
/**
* 导购解绑作废
*
* @param clerkId
* @param enterpriseId 企业标识
* @param wxEnterpriseId wx企业标识
* @param invokingType 调用类型
* @return {@link ServiceResponse }
* @author mozhu
* @date 2022-07-22 15:14:51
*/
ServiceResponse
delByClerkId
(
String
clerkId
,
String
enterpriseId
,
String
wxEnterpriseId
,
Integer
invokingType
);
/**
* 根据导购信息获取hmid
*
* @param basePageInfo 基本信息页
* @param hmId hm id
* @return {@link List }<{@link HmClerkRelationDTO }>
* @author mozhu
* @date 2022-07-15 14:31:03
*/
Page
<
HmClerkRelationDTO
>
getHmClerkByHmId
(
BasePageInfo
basePageInfo
,
Long
hmId
);
/**
* 根据活码id和导购id查询数据
*
* @param hmId hm id
* @param clerkId 职员id
* @return {@link HmClerkRelationDTO }
* @author mozhu
* @date 2022-07-15 16:36:29
*/
HmClerkRelationDTO
getHmClerkByHmIdAndClerkId
(
Long
hmId
,
String
clerkId
);
/**
* 根据活码id随机找一个
*
* @param hmId hm id
* @return {@link HmClerkRelationDTO }
* @author mozhu
* @date 2022-07-15 16:48:42
*/
HmClerkRelationDTO
getOneHmClerkByHmId
(
Long
hmId
);
/**
* 根据活码id和staffId随机找一个
*
* @param hmId hm id
* @param staffId 员工id
* @return {@link HmClerkRelationDTO }
* @author mozhu
* @date 2022-07-15 17:24:01
*/
HmClerkRelationDTO
getOneHmClerkByHmIdAndStaffId
(
Long
hmId
,
String
staffId
);
}
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/hm/HmQrcodeApiService.java
View file @
7e01269e
package
com
.
gic
.
haoban
.
manage
.
api
.
service
.
hm
;
package
com
.
gic
.
haoban
.
manage
.
api
.
service
.
hm
;
import
com.gic.api.base.commons.BasePageInfo
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.haoban.base.api.common.pojo.dto.WebLoginDTO
;
import
com.gic.haoban.base.api.common.pojo.dto.WebLoginDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmClerkRelationDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmQrcodeDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmQrcodeDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmQrcodeStoreDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmQrcodeStoreDTO
;
import
com.gic.haoban.manage.api.dto.qdto.hm.HmQrcodeListQDTO
;
import
com.gic.haoban.manage.api.dto.qdto.hm.HmQrcodeListQDTO
;
...
@@ -81,19 +78,6 @@ public interface HmQrcodeApiService {
...
@@ -81,19 +78,6 @@ public interface HmQrcodeApiService {
*/
*/
ServiceResponse
delById
(
Long
hmId
,
Integer
invokingType
,
WebLoginDTO
loginDTO
);
ServiceResponse
delById
(
Long
hmId
,
Integer
invokingType
,
WebLoginDTO
loginDTO
);
/**
* 导购解绑作废
*
* @param clerkId
* @param enterpriseId 企业标识
* @param wxEnterpriseId wx企业标识
* @param invokingType 调用类型
* @return {@link ServiceResponse }
* @author mozhu
* @date 2022-07-22 15:14:51
*/
ServiceResponse
delByClerkId
(
String
clerkId
,
String
enterpriseId
,
String
wxEnterpriseId
,
Integer
invokingType
);
/**
/**
* 通过id添加num
* 通过id添加num
...
@@ -158,17 +142,6 @@ public interface HmQrcodeApiService {
...
@@ -158,17 +142,6 @@ public interface HmQrcodeApiService {
*/
*/
List
<
String
>
getHmStoreForWxa
(
String
wxEnterpriseId
,
String
enterpriseId
)
;
List
<
String
>
getHmStoreForWxa
(
String
wxEnterpriseId
,
String
enterpriseId
)
;
/**
* 根据导购信息获取hmid
*
* @param basePageInfo 基本信息页
* @param hmId hm id
* @return {@link List }<{@link HmClerkRelationDTO }>
* @author mozhu
* @date 2022-07-15 14:31:03
*/
Page
<
HmClerkRelationDTO
>
getHmClerkByHmId
(
BasePageInfo
basePageInfo
,
Long
hmId
);
/**
/**
* 批量修改活码分组
* 批量修改活码分组
...
@@ -180,40 +153,6 @@ public interface HmQrcodeApiService {
...
@@ -180,40 +153,6 @@ public interface HmQrcodeApiService {
/**
/**
* 根据活码id和导购id查询数据
*
* @param hmId hm id
* @param clerkId 职员id
* @return {@link HmClerkRelationDTO }
* @author mozhu
* @date 2022-07-15 16:36:29
*/
HmClerkRelationDTO
getHmClerkByHmIdAndClerkId
(
Long
hmId
,
String
clerkId
);
/**
* 根据活码id随机找一个
*
* @param hmId hm id
* @return {@link HmClerkRelationDTO }
* @author mozhu
* @date 2022-07-15 16:48:42
*/
HmClerkRelationDTO
getOneHmClerkByHmId
(
Long
hmId
);
/**
* 根据活码id和staffId随机找一个
*
* @param hmId hm id
* @param staffId 员工id
* @return {@link HmClerkRelationDTO }
* @author mozhu
* @date 2022-07-15 17:24:01
*/
HmClerkRelationDTO
getOneHmClerkByHmIdAndStaffId
(
Long
hmId
,
String
staffId
);
/**
*
*
* @Title: listHmIdForIndex
* @Title: listHmIdForIndex
* @Description: 返回活码id列表,用于首页列表查询
* @Description: 返回活码id列表,用于首页列表查询
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/StaffClerkRelationServiceImpl.java
View file @
7e01269e
...
@@ -11,6 +11,7 @@ import com.gic.haoban.manage.api.dto.StaffClerkRelationDTO;
...
@@ -11,6 +11,7 @@ import com.gic.haoban.manage.api.dto.StaffClerkRelationDTO;
import
com.gic.haoban.manage.api.dto.qdto.hm.HmQrcodeQDTO
;
import
com.gic.haoban.manage.api.dto.qdto.hm.HmQrcodeQDTO
;
import
com.gic.haoban.manage.api.enums.BindTypeEnum
;
import
com.gic.haoban.manage.api.enums.BindTypeEnum
;
import
com.gic.haoban.manage.api.enums.ChannelCodeEnum
;
import
com.gic.haoban.manage.api.enums.ChannelCodeEnum
;
import
com.gic.haoban.manage.api.service.hm.HmClerkRelationApiService
;
import
com.gic.haoban.manage.api.service.hm.HmQrcodeApiService
;
import
com.gic.haoban.manage.api.service.hm.HmQrcodeApiService
;
import
com.gic.haoban.manage.service.dao.mapper.TabHaobanMemberClerkChatConfigMapper
;
import
com.gic.haoban.manage.service.dao.mapper.TabHaobanMemberClerkChatConfigMapper
;
import
com.gic.haoban.manage.service.dao.mapper.TabHaobanStaffClerkRelationMapper
;
import
com.gic.haoban.manage.service.dao.mapper.TabHaobanStaffClerkRelationMapper
;
...
@@ -54,6 +55,8 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
...
@@ -54,6 +55,8 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
private
HmQrcodeApiService
hmQrcodeApiService
;
private
HmQrcodeApiService
hmQrcodeApiService
;
@Autowired
@Autowired
private
StaffService
staffService
;
private
StaffService
staffService
;
@Autowired
private
HmClerkRelationApiService
hmClerkRelationApiService
;
@Override
@Override
public
List
<
StaffClerkRelationDTO
>
listBindCode
(
String
enterpriseId
,
Set
<
String
>
clerkCodeList
)
{
public
List
<
StaffClerkRelationDTO
>
listBindCode
(
String
enterpriseId
,
Set
<
String
>
clerkCodeList
)
{
...
@@ -82,7 +85,7 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
...
@@ -82,7 +85,7 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
staffClerkBindLogService
.
pushToMq
(
clerkRelation
.
getStaffId
(),
optStaffId
,
BindTypeEnum
.
UNBIND
.
getVal
(),
chanelCode
,
clerkRelation
.
getStaffClerkRelationId
());
staffClerkBindLogService
.
pushToMq
(
clerkRelation
.
getStaffId
(),
optStaffId
,
BindTypeEnum
.
UNBIND
.
getVal
(),
chanelCode
,
clerkRelation
.
getStaffClerkRelationId
());
//废弃活码
//废弃活码
hm
Qrcode
ApiService
.
delByClerkId
(
clerkId
,
clerkRelation
.
getEnterpriseId
(),
clerkRelation
.
getWxEnterpriseId
(),
chanelCode
);
hm
ClerkRelation
ApiService
.
delByClerkId
(
clerkId
,
clerkRelation
.
getEnterpriseId
(),
clerkRelation
.
getWxEnterpriseId
(),
chanelCode
);
}
}
return
b
;
return
b
;
}
}
...
@@ -110,7 +113,7 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
...
@@ -110,7 +113,7 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
for
(
TabHaobanStaffClerkRelation
clerkRelation
:
needUnbind
)
{
for
(
TabHaobanStaffClerkRelation
clerkRelation
:
needUnbind
)
{
//废弃活码
//废弃活码
hm
Qrcode
ApiService
.
delByClerkId
(
clerkRelation
.
getClerkId
(),
clerkRelation
.
getEnterpriseId
(),
clerkRelation
.
getWxEnterpriseId
(),
chanelCode
);
hm
ClerkRelation
ApiService
.
delByClerkId
(
clerkRelation
.
getClerkId
(),
clerkRelation
.
getEnterpriseId
(),
clerkRelation
.
getWxEnterpriseId
(),
chanelCode
);
}
}
return
true
;
return
true
;
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MemberUnionidRelatedApiServiceImpl.java
View file @
7e01269e
...
@@ -42,6 +42,7 @@ import com.gic.haoban.manage.api.service.CheckQywxSettingApiService;
...
@@ -42,6 +42,7 @@ import com.gic.haoban.manage.api.service.CheckQywxSettingApiService;
import
com.gic.haoban.manage.api.service.ExternalClerkRelatedApiService
;
import
com.gic.haoban.manage.api.service.ExternalClerkRelatedApiService
;
import
com.gic.haoban.manage.api.service.MaterialApiService
;
import
com.gic.haoban.manage.api.service.MaterialApiService
;
import
com.gic.haoban.manage.api.service.MemberUnionidRelatedApiService
;
import
com.gic.haoban.manage.api.service.MemberUnionidRelatedApiService
;
import
com.gic.haoban.manage.api.service.hm.HmClerkRelationApiService
;
import
com.gic.haoban.manage.api.service.hm.HmQrcodeApiService
;
import
com.gic.haoban.manage.api.service.hm.HmQrcodeApiService
;
import
com.gic.haoban.manage.service.config.Config
;
import
com.gic.haoban.manage.service.config.Config
;
import
com.gic.haoban.manage.service.dao.mapper.MemberUnionidRelatedMapper
;
import
com.gic.haoban.manage.service.dao.mapper.MemberUnionidRelatedMapper
;
...
@@ -170,6 +171,8 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
...
@@ -170,6 +171,8 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
private
HmLinkService
hmLinkService
;
private
HmLinkService
hmLinkService
;
@Autowired
@Autowired
private
MemberService
memberService
;
private
MemberService
memberService
;
@Autowired
private
HmClerkRelationApiService
hmClerkRelationApiService
;
@Override
@Override
public
void
dealQywxExternalUser
(
String
params
)
{
public
void
dealQywxExternalUser
(
String
params
)
{
...
@@ -371,15 +374,15 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
...
@@ -371,15 +374,15 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
TabHaobanClerkMainStoreRelated
mainStoreRelated
=
clerkMainStoreRelatedService
.
getMainStoreByStaffId
(
staffId
,
wxEnterpriseId
);
TabHaobanClerkMainStoreRelated
mainStoreRelated
=
clerkMainStoreRelatedService
.
getMainStoreByStaffId
(
staffId
,
wxEnterpriseId
);
if
(
mainStoreRelated
!=
null
)
{
if
(
mainStoreRelated
!=
null
)
{
StaffClerkRelationDTO
relationDTO
=
staffClerkRelationService
.
getOneBindByStoreId
(
staffId
,
mainStoreRelated
.
getStoreId
());
StaffClerkRelationDTO
relationDTO
=
staffClerkRelationService
.
getOneBindByStoreId
(
staffId
,
mainStoreRelated
.
getStoreId
());
hmClerkRelationDTO
=
hm
Qrcode
ApiService
.
getHmClerkByHmIdAndClerkId
(
hmId
,
relationDTO
.
getClerkId
());
hmClerkRelationDTO
=
hm
ClerkRelation
ApiService
.
getHmClerkByHmIdAndClerkId
(
hmId
,
relationDTO
.
getClerkId
());
if
(
hmClerkRelationDTO
==
null
)
{
if
(
hmClerkRelationDTO
==
null
)
{
hmClerkRelationDTO
=
hm
Qrcode
ApiService
.
getOneHmClerkByHmIdAndStaffId
(
hmId
,
staffId
);
hmClerkRelationDTO
=
hm
ClerkRelation
ApiService
.
getOneHmClerkByHmIdAndStaffId
(
hmId
,
staffId
);
if
(
hmClerkRelationDTO
==
null
)
{
if
(
hmClerkRelationDTO
==
null
)
{
hmClerkRelationDTO
=
hm
Qrcode
ApiService
.
getOneHmClerkByHmId
(
hmId
);
hmClerkRelationDTO
=
hm
ClerkRelation
ApiService
.
getOneHmClerkByHmId
(
hmId
);
}
}
}
}
}
else
{
}
else
{
hmClerkRelationDTO
=
hm
Qrcode
ApiService
.
getOneHmClerkByHmId
(
hmId
);
hmClerkRelationDTO
=
hm
ClerkRelation
ApiService
.
getOneHmClerkByHmId
(
hmId
);
}
}
staffClerkRelationDTO
=
staffClerkRelationService
.
getBindByClerkId
(
hmClerkRelationDTO
.
getClerkId
(),
wxEnterpriseId
);
staffClerkRelationDTO
=
staffClerkRelationService
.
getBindByClerkId
(
hmClerkRelationDTO
.
getClerkId
(),
wxEnterpriseId
);
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffClerkRelationApiServiceImpl.java
View file @
7e01269e
...
@@ -22,7 +22,7 @@ import com.gic.haoban.manage.api.enums.ChannelCodeEnum;
...
@@ -22,7 +22,7 @@ import com.gic.haoban.manage.api.enums.ChannelCodeEnum;
import
com.gic.haoban.manage.api.enums.SecretTypeEnum
;
import
com.gic.haoban.manage.api.enums.SecretTypeEnum
;
import
com.gic.haoban.manage.api.service.AuditApiService
;
import
com.gic.haoban.manage.api.service.AuditApiService
;
import
com.gic.haoban.manage.api.service.StaffClerkRelationApiService
;
import
com.gic.haoban.manage.api.service.StaffClerkRelationApiService
;
import
com.gic.haoban.manage.api.service.hm.Hm
Qrcode
ApiService
;
import
com.gic.haoban.manage.api.service.hm.Hm
ClerkRelation
ApiService
;
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.MemberClerkChatConfig
;
import
com.gic.haoban.manage.service.entity.MemberClerkChatConfig
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaff
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaff
;
...
@@ -76,7 +76,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
...
@@ -76,7 +76,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
@Autowired
@Autowired
private
WxEnterpriseService
wxEnterpriseService
;
private
WxEnterpriseService
wxEnterpriseService
;
@Autowired
@Autowired
private
Hm
QrcodeApiService
hmQrcode
ApiService
;
private
Hm
ClerkRelationApiService
hmClerkRelation
ApiService
;
@Autowired
@Autowired
private
HmQrcodeService
hmQrcodeService
;
private
HmQrcodeService
hmQrcodeService
;
...
@@ -371,7 +371,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
...
@@ -371,7 +371,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
//删除主门店
//删除主门店
clerkMainStoreRelatedService
.
delMainStore
(
staffId
,
staffClerkRelation
.
getStoreId
(),
wxEnterpriseId
);
clerkMainStoreRelatedService
.
delMainStore
(
staffId
,
staffClerkRelation
.
getStoreId
(),
wxEnterpriseId
);
//废弃活码
//废弃活码
hm
Qrcode
ApiService
.
delByClerkId
(
clerkId
,
staffClerkRelation
.
getEnterpriseId
(),
wxEnterpriseId
,
channelCode
);
hm
ClerkRelation
ApiService
.
delByClerkId
(
clerkId
,
staffClerkRelation
.
getEnterpriseId
(),
wxEnterpriseId
,
channelCode
);
}
}
@Override
@Override
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/hm/HmClerkRelationApiServiceImpl.java
0 → 100644
View file @
7e01269e
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
.
hm
;
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.EntityUtil
;
import
com.gic.haoban.common.utils.PageUtil
;
import
com.gic.haoban.manage.api.dto.hm.HmClerkRelationDTO
;
import
com.gic.haoban.manage.api.dto.qdto.hm.HmQrcodeQDTO
;
import
com.gic.haoban.manage.api.service.hm.HmClerkRelationApiService
;
import
com.gic.haoban.manage.api.service.hm.HmQrcodeApiService
;
import
com.gic.haoban.manage.service.pojo.bo.hm.HmClerkRelationBO
;
import
com.gic.haoban.manage.service.pojo.bo.hm.HmQrcodeBO
;
import
com.gic.haoban.manage.service.service.hm.HmClerkRelationService
;
import
com.gic.haoban.manage.service.service.hm.HmQrcodeService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
@Service
(
"hmClerkRelationApiService"
)
public
class
HmClerkRelationApiServiceImpl
implements
HmClerkRelationApiService
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
HmClerkRelationApiServiceImpl
.
class
);
@Autowired
private
HmQrcodeApiService
hmQrcodeApiService
;
@Autowired
private
HmQrcodeService
hmQrcodeService
;
@Autowired
private
HmClerkRelationService
hmClerkRelationService
;
@Override
public
ServiceResponse
delByClerkId
(
String
clerkId
,
String
enterpriseId
,
String
wxEnterpriseId
,
Integer
invokingType
)
{
// 单人活码 直接废弃,多人活码,更新
HmQrcodeBO
hmQrcodeBO
=
hmQrcodeService
.
queryByClerkId
(
clerkId
,
wxEnterpriseId
);
if
(
hmQrcodeBO
!=
null
)
{
hmQrcodeApiService
.
delById
(
hmQrcodeBO
.
getHmId
(),
invokingType
,
null
);
}
// 多人活码逻辑
List
<
HmClerkRelationBO
>
hmClerkRelationBOS
=
hmClerkRelationService
.
queryByClerkId
(
clerkId
,
enterpriseId
);
if
(
CollectionUtils
.
isEmpty
(
hmClerkRelationBOS
))
{
logger
.
info
(
"无多人活码"
);
return
ServiceResponse
.
success
();
}
for
(
HmClerkRelationBO
hmClerkRelationBO
:
hmClerkRelationBOS
)
{
Long
hmId
=
hmClerkRelationBO
.
getHmId
();
List
<
String
>
clerkIds
=
hmClerkRelationService
.
getClerkIdByHmId
(
hmId
);
hmClerkRelationService
.
updateStatusById
(
0
,
hmClerkRelationBO
.
getRelationId
());
clerkIds
.
remove
(
clerkId
);
if
(
CollectionUtils
.
isNotEmpty
(
clerkIds
))
{
// 更新活码
HmQrcodeQDTO
hmQrcodeQDTO
=
new
HmQrcodeQDTO
();
hmQrcodeQDTO
.
setHmId
(
hmId
);
hmQrcodeQDTO
.
setClerkIdList
(
clerkIds
);
hmQrcodeApiService
.
update
(
hmQrcodeQDTO
);
}
else
{
hmQrcodeApiService
.
delById
(
hmId
,
invokingType
,
null
);
}
}
return
ServiceResponse
.
success
();
}
@Override
public
Page
<
HmClerkRelationDTO
>
getHmClerkByHmId
(
BasePageInfo
basePageInfo
,
Long
hmId
)
{
Page
<
HmClerkRelationBO
>
hmClerkByHmId
=
hmClerkRelationService
.
getHmClerkByHmId
(
basePageInfo
,
hmId
);
return
PageUtil
.
changeToCurrentPage
(
hmClerkByHmId
,
HmClerkRelationDTO
.
class
);
}
@Override
public
HmClerkRelationDTO
getHmClerkByHmIdAndClerkId
(
Long
hmId
,
String
clerkId
)
{
return
EntityUtil
.
changeEntityNew
(
HmClerkRelationDTO
.
class
,
hmClerkRelationService
.
queryByHmIdAndClerkId
(
hmId
,
clerkId
));
}
@Override
public
HmClerkRelationDTO
getOneHmClerkByHmId
(
Long
hmId
)
{
HmClerkRelationBO
hmClerkRelationBO
=
hmClerkRelationService
.
getHmClerkByHmId
(
hmId
).
get
(
0
);
return
EntityUtil
.
changeEntityNew
(
HmClerkRelationDTO
.
class
,
hmClerkRelationBO
);
}
@Override
public
HmClerkRelationDTO
getOneHmClerkByHmIdAndStaffId
(
Long
hmId
,
String
staffId
)
{
return
EntityUtil
.
changeEntityNew
(
HmClerkRelationDTO
.
class
,
hmClerkRelationService
.
getHmClerkByHmIdAndStaffId
(
hmId
,
staffId
));
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/hm/HmQrcodeApiServiceImpl.java
View file @
7e01269e
...
@@ -2,8 +2,6 @@ package com.gic.haoban.manage.service.service.out.impl.hm;
...
@@ -2,8 +2,6 @@ package com.gic.haoban.manage.service.service.out.impl.hm;
import
cn.hutool.core.convert.Convert
;
import
cn.hutool.core.convert.Convert
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.gic.api.base.commons.BasePageInfo
;
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.service.ClerkService
;
import
com.gic.clerk.api.service.ClerkService
;
...
@@ -13,11 +11,9 @@ import com.gic.enterprise.api.dto.StoreDTO;
...
@@ -13,11 +11,9 @@ import com.gic.enterprise.api.dto.StoreDTO;
import
com.gic.enterprise.api.service.StoreService
;
import
com.gic.enterprise.api.service.StoreService
;
import
com.gic.haoban.base.api.common.errCode.HaoBanErrCodeCommon
;
import
com.gic.haoban.base.api.common.errCode.HaoBanErrCodeCommon
;
import
com.gic.haoban.base.api.common.pojo.dto.WebLoginDTO
;
import
com.gic.haoban.base.api.common.pojo.dto.WebLoginDTO
;
import
com.gic.haoban.common.utils.PageUtil
;
import
com.gic.haoban.manage.api.dto.StaffClerkRelationDTO
;
import
com.gic.haoban.manage.api.dto.StaffClerkRelationDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmClerkDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmClerkDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmClerkRelationDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmQrcodeDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmQrcodeDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmQrcodeStoreDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmQrcodeStoreDTO
;
import
com.gic.haoban.manage.api.dto.qdto.hm.HmClerkRelationQDTO
;
import
com.gic.haoban.manage.api.dto.qdto.hm.HmClerkRelationQDTO
;
...
@@ -665,38 +661,6 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
...
@@ -665,38 +661,6 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
return
ServiceResponse
.
success
();
return
ServiceResponse
.
success
();
}
}
@Override
public
ServiceResponse
delByClerkId
(
String
clerkId
,
String
enterpriseId
,
String
wxEnterpriseId
,
Integer
invokingType
)
{
// 单人活码 直接废弃,多人活码,更新
HmQrcodeBO
hmQrcodeBO
=
hmQrcodeService
.
queryByClerkId
(
clerkId
,
wxEnterpriseId
);
if
(
hmQrcodeBO
!=
null
)
{
delById
(
hmQrcodeBO
.
getHmId
(),
invokingType
,
null
);
}
// 多人活码逻辑
List
<
HmClerkRelationBO
>
hmClerkRelationBOS
=
hmClerkRelationService
.
queryByClerkId
(
clerkId
,
enterpriseId
);
if
(
CollectionUtils
.
isEmpty
(
hmClerkRelationBOS
))
{
logger
.
info
(
"无多人活码"
);
return
ServiceResponse
.
success
();
}
for
(
HmClerkRelationBO
hmClerkRelationBO
:
hmClerkRelationBOS
)
{
Long
hmId
=
hmClerkRelationBO
.
getHmId
();
List
<
String
>
clerkIds
=
hmClerkRelationService
.
getClerkIdByHmId
(
hmId
);
hmClerkRelationService
.
updateStatusById
(
0
,
hmClerkRelationBO
.
getRelationId
());
clerkIds
.
remove
(
clerkId
);
if
(
CollectionUtils
.
isNotEmpty
(
clerkIds
))
{
// 更新活码
HmQrcodeQDTO
hmQrcodeQDTO
=
new
HmQrcodeQDTO
();
hmQrcodeQDTO
.
setHmId
(
hmId
);
hmQrcodeQDTO
.
setClerkIdList
(
clerkIds
);
update
(
hmQrcodeQDTO
);
}
else
{
delById
(
hmId
,
invokingType
,
null
);
}
}
return
ServiceResponse
.
success
();
}
@Override
@Override
public
int
updateAddNumById
(
Long
hmId
,
String
clerkId
)
{
public
int
updateAddNumById
(
Long
hmId
,
String
clerkId
)
{
...
@@ -863,12 +827,6 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
...
@@ -863,12 +827,6 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
return
list
;
return
list
;
}
}
@Override
public
Page
<
HmClerkRelationDTO
>
getHmClerkByHmId
(
BasePageInfo
basePageInfo
,
Long
hmId
)
{
Page
<
HmClerkRelationBO
>
hmClerkByHmId
=
hmClerkRelationService
.
getHmClerkByHmId
(
basePageInfo
,
hmId
);
return
PageUtil
.
changeToCurrentPage
(
hmClerkByHmId
,
HmClerkRelationDTO
.
class
);
}
/**
/**
* 批量修改活码分组
* 批量修改活码分组
*
*
...
@@ -886,22 +844,6 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
...
@@ -886,22 +844,6 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
}
}
@Override
@Override
public
HmClerkRelationDTO
getHmClerkByHmIdAndClerkId
(
Long
hmId
,
String
clerkId
)
{
return
EntityUtil
.
changeEntityNew
(
HmClerkRelationDTO
.
class
,
hmClerkRelationService
.
queryByHmIdAndClerkId
(
hmId
,
clerkId
));
}
@Override
public
HmClerkRelationDTO
getOneHmClerkByHmId
(
Long
hmId
)
{
HmClerkRelationBO
hmClerkRelationBO
=
hmClerkRelationService
.
getHmClerkByHmId
(
hmId
).
get
(
0
);
return
EntityUtil
.
changeEntityNew
(
HmClerkRelationDTO
.
class
,
hmClerkRelationBO
);
}
@Override
public
HmClerkRelationDTO
getOneHmClerkByHmIdAndStaffId
(
Long
hmId
,
String
staffId
)
{
return
EntityUtil
.
changeEntityNew
(
HmClerkRelationDTO
.
class
,
hmClerkRelationService
.
getHmClerkByHmIdAndStaffId
(
hmId
,
staffId
));
}
@Override
public
ServiceResponse
<
List
<
String
>>
listHmIdForIndex
(
HmQrcodeListQDTO
qdto
)
{
public
ServiceResponse
<
List
<
String
>>
listHmIdForIndex
(
HmQrcodeListQDTO
qdto
)
{
return
ServiceResponse
.
success
(
hmQrcodeService
.
listHmIdForIndex
(
qdto
));
return
ServiceResponse
.
success
(
hmQrcodeService
.
listHmIdForIndex
(
qdto
));
}
}
...
...
haoban-manage3-service/src/main/resources/dubbo-haoban-manage-service.xml
View file @
7e01269e
...
@@ -123,6 +123,8 @@
...
@@ -123,6 +123,8 @@
ref=
"hmQrcodeApiServiceImpl"
timeout=
"10000"
/>
ref=
"hmQrcodeApiServiceImpl"
timeout=
"10000"
/>
<dubbo:service
interface=
"com.gic.haoban.manage.api.service.hm.HmLinkVisitLogApiService"
<dubbo:service
interface=
"com.gic.haoban.manage.api.service.hm.HmLinkVisitLogApiService"
ref=
"hmLinkVisitLogApiService"
timeout=
"10000"
/>
ref=
"hmLinkVisitLogApiService"
timeout=
"10000"
/>
<dubbo:service
interface=
"com.gic.haoban.manage.api.service.hm.HmClerkRelationApiService"
ref=
"hmClerkRelationApiService"
timeout=
"10000"
/>
<dubbo:reference
interface=
"com.gic.enterprise.api.service.DepartmentService"
id=
"gicDepartmentService"
/>
<dubbo:reference
interface=
"com.gic.enterprise.api.service.DepartmentService"
id=
"gicDepartmentService"
/>
<dubbo:reference
interface=
"com.gic.wechat.api.service.qywx.QywxDepartmentApiService"
<dubbo:reference
interface=
"com.gic.wechat.api.service.qywx.QywxDepartmentApiService"
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/hm/HmQrcodeController.java
View file @
7e01269e
...
@@ -17,6 +17,7 @@ import com.gic.haoban.manage.api.dto.qdto.hm.WxUserAddLogSearchQDTO;
...
@@ -17,6 +17,7 @@ import com.gic.haoban.manage.api.dto.qdto.hm.WxUserAddLogSearchQDTO;
import
com.gic.haoban.manage.api.dto.statistics.StatisticsDTO
;
import
com.gic.haoban.manage.api.dto.statistics.StatisticsDTO
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.api.service.StaffClerkRelationApiService
;
import
com.gic.haoban.manage.api.service.StaffClerkRelationApiService
;
import
com.gic.haoban.manage.api.service.hm.HmClerkRelationApiService
;
import
com.gic.haoban.manage.api.service.hm.HmGroupApiService
;
import
com.gic.haoban.manage.api.service.hm.HmGroupApiService
;
import
com.gic.haoban.manage.api.service.hm.HmQrcodeApiService
;
import
com.gic.haoban.manage.api.service.hm.HmQrcodeApiService
;
import
com.gic.haoban.manage.api.service.hm.WxUserAddLogApiService
;
import
com.gic.haoban.manage.api.service.hm.WxUserAddLogApiService
;
...
@@ -67,6 +68,9 @@ public class HmQrcodeController {
...
@@ -67,6 +68,9 @@ public class HmQrcodeController {
private
StaffClerkRelationApiService
staffClerkRelationApiService
;
private
StaffClerkRelationApiService
staffClerkRelationApiService
;
@Autowired
@Autowired
private
HmGroupApiService
hmGroupApiService
;
private
HmGroupApiService
hmGroupApiService
;
@Autowired
private
HmClerkRelationApiService
hmClerkRelationApiService
;
/**
/**
* 新增
* 新增
...
@@ -193,7 +197,7 @@ public class HmQrcodeController {
...
@@ -193,7 +197,7 @@ public class HmQrcodeController {
BasePageInfo
basePageInfo
=
new
BasePageInfo
();
BasePageInfo
basePageInfo
=
new
BasePageInfo
();
basePageInfo
.
setPageNum
(
1
);
basePageInfo
.
setPageNum
(
1
);
basePageInfo
.
setPageSize
(
1000
);
basePageInfo
.
setPageSize
(
1000
);
Page
<
HmClerkRelationDTO
>
hmClerkByHmId
=
hm
Qrcode
ApiService
.
getHmClerkByHmId
(
basePageInfo
,
hmId
);
Page
<
HmClerkRelationDTO
>
hmClerkByHmId
=
hm
ClerkRelation
ApiService
.
getHmClerkByHmId
(
basePageInfo
,
hmId
);
List
<
HmClerkRelationDTO
>
hmClerkRelationDTOList
=
hmClerkByHmId
.
getResult
();
List
<
HmClerkRelationDTO
>
hmClerkRelationDTOList
=
hmClerkByHmId
.
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
hmClerkRelationDTOList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
hmClerkRelationDTOList
))
{
for
(
HmClerkRelationDTO
hmClerkRelationDTO
:
hmClerkRelationDTOList
)
{
for
(
HmClerkRelationDTO
hmClerkRelationDTO
:
hmClerkRelationDTOList
)
{
...
@@ -334,7 +338,7 @@ public class HmQrcodeController {
...
@@ -334,7 +338,7 @@ public class HmQrcodeController {
BasePageInfo
basePageInfo
=
new
BasePageInfo
();
BasePageInfo
basePageInfo
=
new
BasePageInfo
();
basePageInfo
.
setPageNum
(
hmQrcodeDetailQO
.
getPageNum
());
basePageInfo
.
setPageNum
(
hmQrcodeDetailQO
.
getPageNum
());
basePageInfo
.
setPageSize
(
hmQrcodeDetailQO
.
getPageSize
());
basePageInfo
.
setPageSize
(
hmQrcodeDetailQO
.
getPageSize
());
page
=
hm
Qrcode
ApiService
.
getHmClerkByHmId
(
basePageInfo
,
hmId
);
page
=
hm
ClerkRelation
ApiService
.
getHmClerkByHmId
(
basePageInfo
,
hmId
);
}
}
return
RestResponse
.
successResult
(
page
);
return
RestResponse
.
successResult
(
page
);
}
}
...
...
haoban-manage3-web/src/main/webapp/WEB-INF/dubbo-haoban-manage-web.xml
View file @
7e01269e
...
@@ -114,6 +114,9 @@
...
@@ -114,6 +114,9 @@
<dubbo:reference
id=
"hmQrcodeApiService"
interface=
"com.gic.haoban.manage.api.service.hm.HmQrcodeApiService"
<dubbo:reference
id=
"hmQrcodeApiService"
interface=
"com.gic.haoban.manage.api.service.hm.HmQrcodeApiService"
timeout=
"10000"
retries=
"0"
check=
"false"
/>
timeout=
"10000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
id=
"hmClerkRelationApiService"
interface=
"com.gic.haoban.manage.api.service.hm.HmClerkRelationApiService"
timeout=
"10000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
id=
"mongoOperationService"
interface=
"com.gic.dsmongo.api.service.MongoOperationService"
<dubbo:reference
id=
"mongoOperationService"
interface=
"com.gic.dsmongo.api.service.MongoOperationService"
timeout=
"10000"
retries=
"0"
check=
"false"
/>
timeout=
"10000"
retries=
"0"
check=
"false"
/>
</beans>
</beans>
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