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
d87e8be5
Commit
d87e8be5
authored
Feb 17, 2022
by
xugaojun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
存量会员群发实现,dubbo配置,mq消息,群发逻辑,小程序构造实现
parent
685f54ca
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
193 additions
and
0 deletions
+193
-0
MemberUnionRelateConsumer.java
...oban/manage/api/service/mq/MemberUnionRelateConsumer.java
+20
-0
EnterpriseController.java
...ic/haoban/manage/web/controller/EnterpriseController.java
+19
-0
dubbo-haoban-manage3-operation-web.xml
...ain/webapp/WEB-INF/dubbo-haoban-manage3-operation-web.xml
+1
-0
MemberUnionRelateConsumerImpl.java
...oban/manage/service/mq/MemberUnionRelateConsumerImpl.java
+24
-0
AbstractConsumerProcessor.java
...anage/service/mq/processor/AbstractConsumerProcessor.java
+43
-0
AddMemberUnionRelateConsumerProcessor.java
...e/mq/processor/AddMemberUnionRelateConsumerProcessor.java
+0
-0
MemberUnionRelatedBO.java
...c/haoban/manage/service/pojo/bo/MemberUnionRelatedBO.java
+83
-0
dubbo-haoban-manage-service.xml
...ervice/src/main/resources/dubbo-haoban-manage-service.xml
+3
-0
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/mq/MemberUnionRelateConsumer.java
0 → 100644
View file @
d87e8be5
package
com
.
gic
.
haoban
.
manage
.
api
.
service
.
mq
;
/**
* desc:微信会员消费服务
*
* @author: YongEn
* @date: 2022/2/16
**/
public
interface
MemberUnionRelateConsumer
{
/**
* desc: 添加好友关系-存量会员新增
*
* @param messageParam 消息参数
* @author : YongEn
* @date : 2022/2/16
*/
void
addMemberUnionRelate
(
String
messageParam
);
}
haoban-manage3-operation-web/src/main/java/com/gic/haoban/manage/web/controller/EnterpriseController.java
View file @
d87e8be5
...
@@ -9,6 +9,7 @@ import javax.servlet.http.HttpServletResponse;
...
@@ -9,6 +9,7 @@ import javax.servlet.http.HttpServletResponse;
import
com.gic.haoban.app.customer.service.api.service.QywxTagSyncApiService
;
import
com.gic.haoban.app.customer.service.api.service.QywxTagSyncApiService
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseDTO
;
import
com.gic.haoban.manage.api.service.ExternalClerkRelatedApiService
;
import
com.gic.haoban.manage.api.service.ExternalClerkRelatedApiService
;
import
com.gic.haoban.task.manage.api.service.GroupSendOperateApiService
;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Sets
;
import
com.google.common.collect.Sets
;
...
@@ -65,6 +66,8 @@ public class EnterpriseController extends WebBaseController {
...
@@ -65,6 +66,8 @@ public class EnterpriseController extends WebBaseController {
private
ExternalClerkRelatedApiService
externalClerkRelatedApiService
;
private
ExternalClerkRelatedApiService
externalClerkRelatedApiService
;
@Autowired
@Autowired
private
QywxUserApiService
qywxUserApiService
;
private
QywxUserApiService
qywxUserApiService
;
@Autowired
private
GroupSendOperateApiService
groupSendOperateApiService
;
private
static
final
String
QYWX_TAG_OPRN_KEY
=
"qywx-tag-open"
;
private
static
final
String
QYWX_TAG_OPRN_KEY
=
"qywx-tag-open"
;
private
static
final
String
QYWX_TAG_OPRN_KEY_LOCK
=
"qywx-tag-open-lock"
;
private
static
final
String
QYWX_TAG_OPRN_KEY_LOCK
=
"qywx-tag-open-lock"
;
...
@@ -392,4 +395,20 @@ public class EnterpriseController extends WebBaseController {
...
@@ -392,4 +395,20 @@ public class EnterpriseController extends WebBaseController {
}
}
}
}
/**
* desc: 发送群发
*
* @param wxEnterpriseId 微信企业id
* @param content 文本内容
* @return : {@link HaobanResponse}
* @author : YongEn
* @date : 2022/2/17
*/
@RequestMapping
(
"/send-mass"
)
public
HaobanResponse
sendMass
(
String
wxEnterpriseId
,
String
content
)
{
// 异步调用
groupSendOperateApiService
.
sendMbrFriendRelationMassBefore
(
wxEnterpriseId
,
content
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
}
}
haoban-manage3-operation-web/src/main/webapp/WEB-INF/dubbo-haoban-manage3-operation-web.xml
View file @
d87e8be5
...
@@ -66,5 +66,6 @@
...
@@ -66,5 +66,6 @@
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.ExternalClerkRelatedApiService"
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.ExternalClerkRelatedApiService"
id=
"externalClerkRelatedApiService"
/>
id=
"externalClerkRelatedApiService"
/>
<dubbo:reference
interface=
"com.gic.wechat.api.service.qywx.QywxUserApiService"
id=
"qywxUserApiService"
/>
<dubbo:reference
interface=
"com.gic.wechat.api.service.qywx.QywxUserApiService"
id=
"qywxUserApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.task.manage.api.service.GroupSendOperateApiService"
id=
"groupSendOperateApiService"
async=
"true"
/>
</beans>
</beans>
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/mq/MemberUnionRelateConsumerImpl.java
0 → 100644
View file @
d87e8be5
package
com
.
gic
.
haoban
.
manage
.
service
.
mq
;
import
com.gic.haoban.manage.api.service.mq.MemberUnionRelateConsumer
;
import
com.gic.haoban.manage.service.mq.processor.AddMemberUnionRelateConsumerProcessor
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
/**
* desc:微信会员消费服务实现
*
* @author: YongEn
* @date: 2022/2/16
**/
@Service
public
class
MemberUnionRelateConsumerImpl
implements
MemberUnionRelateConsumer
{
@Autowired
private
AddMemberUnionRelateConsumerProcessor
addMemberUnionRelateConsumerProcessor
;
@Override
public
void
addMemberUnionRelate
(
String
messageParam
)
{
addMemberUnionRelateConsumerProcessor
.
process
(
messageParam
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/mq/processor/AbstractConsumerProcessor.java
0 → 100644
View file @
d87e8be5
package
com
.
gic
.
haoban
.
manage
.
service
.
mq
.
processor
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
/**
* desc:处理器
*
* @author: YongEn
* @date: 2022/2/16
**/
public
abstract
class
AbstractConsumerProcessor
<
S
,
R
>
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
AbstractConsumerProcessor
.
class
);
public
void
process
(
S
messageParam
)
{
logger
.
info
(
"接收到消费处理, 参数{}"
,
messageParam
);
// 参数解析
R
r
=
paramParse
(
messageParam
);
// 执行处理
doProcess
(
r
);
}
/**
* desc: 参数解析
*
* @param s 原数据
* @return : {@link R}
* @author : YongEn
* @date : 2022/2/16
*/
abstract
R
paramParse
(
S
s
);
/**
* desc: 执行处理
*
* @param r 解析参数
* @return :
* @author : YongEn
* @date : 2022/2/16
*/
abstract
void
doProcess
(
R
r
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/mq/processor/AddMemberUnionRelateConsumerProcessor.java
0 → 100644
View file @
d87e8be5
This diff is collapsed.
Click to expand it.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/pojo/bo/MemberUnionRelatedBO.java
0 → 100644
View file @
d87e8be5
package
com
.
gic
.
haoban
.
manage
.
service
.
pojo
.
bo
;
import
java.io.Serializable
;
/**
* desc:微信好友关联bo
*
* @author: YongEn
* @date: 2022/2/16
**/
public
class
MemberUnionRelatedBO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
5596803679651418366L
;
private
String
corpid
;
private
String
wxEnterpriseId
;
private
String
externalUserid
;
private
String
wxUserId
;
private
String
secret
;
private
String
staffId
;
private
String
content
;
public
String
getCorpid
()
{
return
corpid
;
}
public
void
setCorpid
(
String
corpid
)
{
this
.
corpid
=
corpid
;
}
public
String
getWxEnterpriseId
()
{
return
wxEnterpriseId
;
}
public
void
setWxEnterpriseId
(
String
wxEnterpriseId
)
{
this
.
wxEnterpriseId
=
wxEnterpriseId
;
}
public
String
getExternalUserid
()
{
return
externalUserid
;
}
public
void
setExternalUserid
(
String
externalUserid
)
{
this
.
externalUserid
=
externalUserid
;
}
public
String
getWxUserId
()
{
return
wxUserId
;
}
public
void
setWxUserId
(
String
wxUserId
)
{
this
.
wxUserId
=
wxUserId
;
}
public
String
getSecret
()
{
return
secret
;
}
public
void
setSecret
(
String
secret
)
{
this
.
secret
=
secret
;
}
public
String
getStaffId
()
{
return
staffId
;
}
public
void
setStaffId
(
String
staffId
)
{
this
.
staffId
=
staffId
;
}
public
String
getContent
()
{
return
content
;
}
public
void
setContent
(
String
content
)
{
this
.
content
=
content
;
}
}
haoban-manage3-service/src/main/resources/dubbo-haoban-manage-service.xml
View file @
d87e8be5
...
@@ -99,6 +99,9 @@
...
@@ -99,6 +99,9 @@
<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"
/>
<dubbo:service
interface=
"com.gic.haoban.manage.api.service.mq.MemberUnionRelateConsumer"
ref=
"memberUnionRelateConsumerImpl"
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"
id=
"qywxDepartmentApiService"
/>
id=
"qywxDepartmentApiService"
/>
...
...
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