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
QianQiXiang
haoban-manage3.0
Commits
648e8cd4
Commit
648e8cd4
authored
Apr 02, 2021
by
fudahua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导购刷新好友
parent
eedc80c3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
102 additions
and
8 deletions
+102
-8
MemberUnionidRelatedApiService.java
...an/manage/api/service/MemberUnionidRelatedApiService.java
+7
-0
DealQywxExternalUserPojo.java
.../haoban/manage/service/pojo/DealQywxExternalUserPojo.java
+53
-0
MemberUnionidRelatedApiServiceImpl.java
.../service/out/impl/MemberUnionidRelatedApiServiceImpl.java
+42
-8
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/MemberUnionidRelatedApiService.java
View file @
648e8cd4
...
...
@@ -17,6 +17,13 @@ public interface MemberUnionidRelatedApiService {
void
delMemberUnionidRelated
(
MemberUnionidRelatedDTO
dto
);
/**
* 处理外部联系人异步
*
* @param params
*/
void
dealQywxExternalUser
(
String
params
);
ExternalClerkRelatedDTO
getByMemberId
(
String
staffId
,
String
memberId
);
List
<
MemberUnionidRelatedDTO
>
getByWxUserIdAndWxEnterpriseId
(
String
wxUserId
,
String
wxEnterpriseId
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/pojo/DealQywxExternalUserPojo.java
0 → 100644
View file @
648e8cd4
package
com
.
gic
.
haoban
.
manage
.
service
.
pojo
;
import
com.gic.haoban.manage.api.dto.MemberUnionidRelatedDTO
;
import
java.io.Serializable
;
/**
* Created 2021/4/2.
*
* @author hua
*/
public
class
DealQywxExternalUserPojo
implements
Serializable
{
public
enum
DealType
{
//删除
del
(
0
),
//新增
add
(
1
);
private
int
type
;
DealType
(
int
type
)
{
this
.
type
=
type
;
}
public
int
getType
()
{
return
type
;
}
public
void
setType
(
int
type
)
{
this
.
type
=
type
;
}
}
// 0 删除 1新增
private
int
type
;
private
MemberUnionidRelatedDTO
data
;
public
int
getType
()
{
return
type
;
}
public
void
setType
(
int
type
)
{
this
.
type
=
type
;
}
public
MemberUnionidRelatedDTO
getData
()
{
return
data
;
}
public
void
setData
(
MemberUnionidRelatedDTO
data
)
{
this
.
data
=
data
;
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MemberUnionidRelatedApiServiceImpl.java
View file @
648e8cd4
...
...
@@ -6,11 +6,14 @@ import cn.hutool.core.collection.CollectionUtil;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.commons.util.*
;
import
com.gic.haoban.base.api.common.ServiceResponse
;
import
com.gic.haoban.manage.api.dto.*
;
import
com.gic.haoban.manage.api.enums.SecretTypeEnum
;
import
com.gic.haoban.manage.service.exception.WxApiLimitException
;
import
com.gic.haoban.manage.service.pojo.DealQywxExternalUserPojo
;
import
com.gic.haoban.manage.service.service.*
;
import
com.gic.mq.sdk.GicMQClient
;
import
com.gic.wechat.api.dto.qywx.QywxIinkExternalMessageDTO
;
import
com.gic.wechat.api.dto.qywx.QywxImageExternalMessageDTO
;
import
com.gic.wechat.api.dto.qywx.QywxTextExternalMessageDTO
;
...
...
@@ -34,11 +37,6 @@ import com.gic.api.base.commons.Page;
import
com.gic.clerk.api.dto.ClerkDTO
;
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.EntityUtil
;
import
com.gic.commons.util.MD5Utils
;
import
com.gic.commons.util.Md5Util
;
import
com.gic.commons.util.StringUtil
;
import
com.gic.enterprise.api.dto.StoreDTO
;
import
com.gic.enterprise.api.service.StoreService
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
...
...
@@ -128,7 +126,19 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
private
ExternalClerkRelatedService
externalClerkRelatedService
;
@Autowired
private
PowerService
powerService
;
@Override
public
void
dealQywxExternalUser
(
String
params
)
{
log
.
info
(
"回调:{}"
,
params
);
DealQywxExternalUserPojo
externalUserPojo
=
JSONObject
.
parseObject
(
params
,
DealQywxExternalUserPojo
.
class
);
if
(
externalUserPojo
.
getType
()
==
DealQywxExternalUserPojo
.
DealType
.
del
.
getType
())
{
this
.
delMemberUnionidRelatedProcess
(
externalUserPojo
.
getData
());
}
else
if
(
externalUserPojo
.
getType
()
==
DealQywxExternalUserPojo
.
DealType
.
add
.
getType
())
{
this
.
addMemberUnionidRelatedNew
(
externalUserPojo
.
getData
());
}
}
@Override
public
List
<
MemberStoreDTO
>
listByExTernalUseridAndWxUserId
(
String
externalUserid
,
String
wxUserId
)
{
List
<
TabHaobanExternalClerkRelated
>
list
=
externalClerkRelatedService
.
listByExTernalUseridAndWxUserId
(
externalUserid
,
wxUserId
);
...
...
@@ -239,7 +249,17 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
}
@Override
public
String
addMemberUnionidRelated
(
MemberUnionidRelatedDTO
dto
)
{
return
addMemberUnionidRelatedNew
(
dto
);
DealQywxExternalUserPojo
dealQywxExternalUserPojo
=
new
DealQywxExternalUserPojo
();
dealQywxExternalUserPojo
.
setType
(
DealQywxExternalUserPojo
.
DealType
.
add
.
getType
());
dealQywxExternalUserPojo
.
setData
(
dto
);
GicMQClient
instance
=
GICMQClientUtil
.
getClientInstance
();
try
{
instance
.
sendMessage
(
"dealQywxExternalUserMq"
,
JSONObject
.
toJSONString
(
dealQywxExternalUserPojo
));
}
catch
(
Exception
e
)
{
log
.
info
(
"异步处理异常:{}"
,
e
);
}
return
null
;
}
...
...
@@ -738,9 +758,23 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
}
@Override
public
void
delMemberUnionidRelated
(
MemberUnionidRelatedDTO
dto
)
{
DealQywxExternalUserPojo
dealQywxExternalUserPojo
=
new
DealQywxExternalUserPojo
();
dealQywxExternalUserPojo
.
setType
(
DealQywxExternalUserPojo
.
DealType
.
del
.
getType
());
dealQywxExternalUserPojo
.
setData
(
dto
);
GicMQClient
instance
=
GICMQClientUtil
.
getClientInstance
();
try
{
instance
.
sendMessage
(
"dealQywxExternalUserMq"
,
JSONObject
.
toJSONString
(
dealQywxExternalUserPojo
));
}
catch
(
Exception
e
)
{
log
.
info
(
"异步处理异常:{}"
,
e
);
}
}
private
void
delMemberUnionidRelatedProcess
(
MemberUnionidRelatedDTO
dto
)
{
externalClerkRelatedService
.
delByUserIdAndExternalUserId
(
dto
);
memberUnionRelatedService
.
delMemberUnionidRelated
(
dto
);
}
@Override
...
...
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