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
1
Merge Requests
1
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
c34ba206
Commit
c34ba206
authored
Jul 14, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://git.gicdev.com/haoban3.0/haoban-manage3.0.git
into developer
parents
2118101a
088efd63
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
30 deletions
+29
-30
HmQrcodeApiService.java
.../gic/haoban/manage/api/service/hm/HmQrcodeApiService.java
+2
-2
MemberUnionidRelatedApiServiceImpl.java
.../service/out/impl/MemberUnionidRelatedApiServiceImpl.java
+2
-12
HmQrcodeApiServiceImpl.java
...e/service/service/out/impl/hm/HmQrcodeApiServiceImpl.java
+21
-15
HmQrcodeController.java
...c/haoban/manage/web/controller/hm/HmQrcodeController.java
+4
-1
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/hm/HmQrcodeApiService.java
View file @
c34ba206
...
...
@@ -53,7 +53,7 @@ public interface HmQrcodeApiService {
* @author mozhu
* @date 2022-07-06 13:40:27
*/
boolean
delById
(
Long
hmId
);
ServiceResponse
delById
(
Long
hmId
);
/**
* 导购解绑作废
...
...
@@ -64,7 +64,7 @@ public interface HmQrcodeApiService {
* @author mozhu
* @date 2022-07-06 15:39:01
*/
boolean
delByClerkId
(
String
clerkId
,
String
enterpriseId
);
ServiceResponse
delByClerkId
(
String
clerkId
,
String
enterpriseId
);
/**
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MemberUnionidRelatedApiServiceImpl.java
View file @
c34ba206
...
...
@@ -380,18 +380,8 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
addFriendByWelcome
(
dto
,
staffClerkRelationDTO
);
}
if
(
StringUtils
.
isNotBlank
(
memberId
))
{
log
.
info
(
"插入加好友日志"
);
wxUserAddLogQDTO
.
setWxEnterpriseId
(
wxEnterpriseId
);
wxUserAddLogQDTO
.
setEnterpriseId
(
enterpriseId
);
wxUserAddLogQDTO
.
setMemberId
(
memberId
);
wxUserAddLogQDTO
.
setUnionid
(
unionid
);
wxUserAddLogQDTO
.
setDelFlag
(
false
);
wxUserAddLogQDTO
.
setExternalUserid
(
externalUserId
);
wxUserAddLogQDTO
.
setWxUserId
(
wxUserId
);
wxUserAddLogQDTO
.
setStaffId
(
staffId
);
wxUserAddLogService
.
save
(
wxUserAddLogQDTO
);
}
log
.
info
(
"插入加好友日志"
);
wxUserAddLogService
.
updateMemberInfo
(
wxEnterpriseId
,
externalUserId
,
memberId
);
}
/**
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/hm/HmQrcodeApiServiceImpl.java
View file @
c34ba206
...
...
@@ -44,6 +44,7 @@ import com.gic.log.record.util.GicLogRecordOptTypeEnum;
import
com.gic.member.tag.api.dto.MemberTagDTO
;
import
com.gic.member.tag.api.service.MemberTagApiService
;
import
com.gic.redis.data.util.RedisUtil
;
import
com.gic.wechat.api.dto.qywx.response.QywxResponseDTO
;
import
com.gic.wechat.api.dto.qywx.welcome.QywxExternalcontactDTO
;
import
com.gic.wechat.api.dto.qywx.welcome.QywxExternalcontactResultDTO
;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
...
...
@@ -209,10 +210,10 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
return
ServiceResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCodeCommon
.
ERR_8
.
getCode
()),
"导购未关联好办"
);
}
qywxExternalcontactDTO
.
setUser
(
userIds
);
boolean
flag
=
qywxUserApiService
.
updateContactWay
(
wxEnterpriseDTO
.
getCorpid
(),
config
.
getWxSuiteid
(),
qywxExternalcontactDTO
);
if
(
!
flag
)
{
QywxResponseDTO
qywxResponseDTO
=
qywxUserApiService
.
updateContactWay
(
wxEnterpriseDTO
.
getCorpid
(),
config
.
getWxSuiteid
(),
qywxExternalcontactDTO
);
if
(
qywxResponseDTO
.
getErrcode
()
!=
0
)
{
logger
.
error
(
"更新企微活码失败"
);
return
ServiceResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCodeCommon
.
ERR_0
.
getCode
()),
"更新企微活码失败"
);
return
ServiceResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCodeCommon
.
ERR_0
.
getCode
()),
qywxResponseDTO
.
getErrmsg
()
);
}
int
updateResult
=
hmQrcodeService
.
update
(
hmQrcodeQDTO
);
...
...
@@ -324,7 +325,6 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
*/
private
List
<
String
>
setStoreClerk
(
HmQrcodeQDTO
hmQrcodeQDTO
,
String
wxEnterpriseId
,
Long
hmId
,
Integer
hmType
)
{
List
<
String
>
clerkIdList
=
hmQrcodeQDTO
.
getClerkIdList
();
if
(
hmType
==
2
)
{
//多人活码
insertHmClerkRelation
(
hmQrcodeQDTO
,
wxEnterpriseId
,
hmId
,
clerkIdList
);
...
...
@@ -420,23 +420,29 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
afterFunc
=
LogRecordAfterServiceImpl
.
class
)
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
boolean
delById
(
Long
hmId
)
{
public
ServiceResponse
delById
(
Long
hmId
)
{
HmQrcodeBO
hmQrcodeBO
=
hmQrcodeService
.
queryById
(
hmId
);
if
(
hmQrcodeBO
==
null
)
{
return
false
;
return
ServiceResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCodeCommon
.
ERR_8
.
getCode
()),
"活码不存在"
);
}
String
wxConfigId
=
hmQrcodeBO
.
getWxConfigId
();
if
(
StringUtils
.
isBlank
(
wxConfigId
))
{
return
ServiceResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCodeCommon
.
ERR_8
.
getCode
()),
"活码未生成"
);
}
WxEnterpriseDTO
wxEnterpriseDTO
=
wxEnterpriseService
.
selectById
(
hmQrcodeBO
.
getWxEnterpriseId
());
boolean
flag
=
qywxUserApiService
.
delContactWay
(
wxEnterpriseDTO
.
getCorpid
(),
config
.
getWxSuiteid
(),
hmQrcodeBO
.
getWxConfigId
());
if
(
flag
)
{
hmQrcodeService
.
deleteById
(
hmId
);
QywxResponseDTO
qywxResponseDTO
=
qywxUserApiService
.
delContactWay
(
wxEnterpriseDTO
.
getCorpid
(),
config
.
getWxSuiteid
(),
wxConfigId
);
int
errcode
=
qywxResponseDTO
.
getErrcode
();
if
(
errcode
!=
0
)
{
return
ServiceResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCodeCommon
.
ERR_8
.
getCode
()),
qywxResponseDTO
.
getErrmsg
());
}
hmQrcodeService
.
deleteById
(
hmId
);
setLoggerContext
(
hmQrcodeBO
.
getEnterpriseId
(),
hmQrcodeBO
.
getWxEnterpriseId
(),
hmQrcodeBO
.
getModifierId
(),
hmQrcodeBO
.
getModifierName
());
GicLogRecordEvaluationContext
.
putAttribute
(
"logContent"
,
"【"
+
hmId
+
"-"
+
hmQrcodeBO
.
getName
()
+
"】"
);
return
true
;
return
ServiceResponse
.
success
()
;
}
@Override
public
boolean
delByClerkId
(
String
clerkId
,
String
enterpriseId
)
{
public
ServiceResponse
delByClerkId
(
String
clerkId
,
String
enterpriseId
)
{
// 单人活码 直接废弃,多人活码,更新
HmQrcodeBO
hmQrcodeBO
=
hmQrcodeService
.
queryByClerkId
(
clerkId
,
enterpriseId
);
if
(
hmQrcodeBO
!=
null
)
{
...
...
@@ -447,7 +453,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
List
<
HmClerkRelationBO
>
hmClerkRelationBOS
=
hmClerkRelationService
.
queryByClerkId
(
clerkId
,
enterpriseId
);
if
(
CollectionUtils
.
isEmpty
(
hmClerkRelationBOS
))
{
logger
.
info
(
"无多人活码"
);
return
true
;
return
ServiceResponse
.
success
()
;
}
for
(
HmClerkRelationBO
hmClerkRelationBO
:
hmClerkRelationBOS
)
{
Long
hmId
=
hmClerkRelationBO
.
getHmId
();
...
...
@@ -459,7 +465,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
hmQrcodeQDTO
.
setClerkIdList
(
clerkIds
);
update
(
hmQrcodeQDTO
);
}
return
true
;
return
ServiceResponse
.
success
()
;
}
@Override
...
...
@@ -518,7 +524,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
List
<
StaffClerkRelationDTO
>
staffClerkRelationDTOS
=
staffClerkRelationService
.
listIdsByWxOpenUserIds
(
wxUserIdsList
,
wxEnterpriseId
);
if
(
CollectionUtils
.
isEmpty
(
staffClerkRelationDTOS
))
{
logger
.
error
(
"无导购关联数据"
);
return
;
continue
;
}
for
(
StaffClerkRelationDTO
staffClerkRelationDTO
:
staffClerkRelationDTOS
)
{
//具有联系我功能的导购创建活码
...
...
@@ -538,7 +544,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
List
<
StaffClerkRelationDTO
>
relationDTOS
=
staffClerkRelationService
.
listIdsByNotInWxOpenUserIds
(
wxUserIdsList
,
wxEnterpriseId
);
if
(
CollectionUtils
.
isEmpty
(
relationDTOS
))
{
logger
.
error
(
"无导购不包含关联数据"
);
return
;
continue
;
}
for
(
StaffClerkRelationDTO
relationDTO
:
relationDTOS
)
{
//有活码,但是企微联系我功能 被关闭
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/hm/HmQrcodeController.java
View file @
c34ba206
...
...
@@ -133,7 +133,10 @@ public class HmQrcodeController {
*/
@RequestMapping
(
value
=
"del"
,
method
=
RequestMethod
.
DELETE
)
public
RestResponse
del
(
Long
hmId
)
{
this
.
hmQrcodeApiService
.
delById
(
hmId
);
ServiceResponse
serviceResponse
=
this
.
hmQrcodeApiService
.
delById
(
hmId
);
if
(!
"0000"
.
equals
(
serviceResponse
.
getCode
()))
{
return
RestResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCode
.
ERR_0
.
getCode
()),
serviceResponse
.
getMessage
());
}
return
RestResponse
.
successResult
();
}
...
...
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