Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
midjourney-proxy
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
徐少华
midjourney-proxy
Commits
06b10df1
Commit
06b10df1
authored
Aug 22, 2019
by
阮思源
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ruansiyuan' of
http://begitlab.chubanyun.me/rays/pcloud-book
into ruansiyuan
parents
bd1c0493
d3eceb34
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
74 additions
and
43 deletions
+74
-43
BookGroupClassifyBizImpl.java
.../pcloud/book/group/biz/impl/BookGroupClassifyBizImpl.java
+6
-1
GroupQrcodeBizImpl.java
...va/com/pcloud/book/group/biz/impl/GroupQrcodeBizImpl.java
+27
-7
WeixinQrcodeBizImpl.java
...a/com/pcloud/book/group/biz/impl/WeixinQrcodeBizImpl.java
+4
-4
SendWeixinRequestTools.java
...a/com/pcloud/book/group/tools/SendWeixinRequestTools.java
+24
-8
BookGuideBizImpl.java
...a/com/pcloud/book/keywords/biz/impl/BookGuideBizImpl.java
+11
-6
BookKeywordBizImpl.java
...com/pcloud/book/keywords/biz/impl/BookKeywordBizImpl.java
+2
-17
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/impl/BookGroupClassifyBizImpl.java
View file @
06b10df1
...
@@ -23,6 +23,7 @@ import com.pcloud.book.group.dao.LearningReportBrowseRecordDao;
...
@@ -23,6 +23,7 @@ import com.pcloud.book.group.dao.LearningReportBrowseRecordDao;
import
com.pcloud.book.group.dao.LearningReportTouchRecordDao
;
import
com.pcloud.book.group.dao.LearningReportTouchRecordDao
;
import
com.pcloud.book.group.dto.BookGroupDTO
;
import
com.pcloud.book.group.dto.BookGroupDTO
;
import
com.pcloud.book.group.dto.BookGroupStatisticDTO
;
import
com.pcloud.book.group.dto.BookGroupStatisticDTO
;
import
com.pcloud.book.group.dto.BookWxQrcodeDTO
;
import
com.pcloud.book.group.dto.ClassifyDTO
;
import
com.pcloud.book.group.dto.ClassifyDTO
;
import
com.pcloud.book.group.dto.ClassifyLearningCountDto
;
import
com.pcloud.book.group.dto.ClassifyLearningCountDto
;
import
com.pcloud.book.group.dto.ClassifyLearningReportDto
;
import
com.pcloud.book.group.dto.ClassifyLearningReportDto
;
...
@@ -98,6 +99,7 @@ import java.util.Date;
...
@@ -98,6 +99,7 @@ import java.util.Date;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Optional
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
...
@@ -252,7 +254,10 @@ public class BookGroupClassifyBizImpl implements BookGroupClassifyBiz {
...
@@ -252,7 +254,10 @@ public class BookGroupClassifyBizImpl implements BookGroupClassifyBiz {
bookKeywords
.
add
(
bookKeyword
);
bookKeywords
.
add
(
bookKeyword
);
});
});
bookKeywordDao
.
insert
(
bookKeywords
);
bookKeywordDao
.
insert
(
bookKeywords
);
SendWeixinRequestTools
.
changeGroupName
(
oneQrcode
.
getRobotWxId
(),
oneQrcode
.
getWeixinGroupId
(),
groupQrcode
.
getGroupName
());
final
String
wechatGroupId
=
oneQrcode
.
getWeixinGroupId
();
Map
<
String
,
BookWxQrcodeDTO
>
groupVersion
=
weixinQrcodeBiz
.
getGroupVersion
(
Collections
.
singletonList
(
wechatGroupId
));
String
ip
=
Optional
.
ofNullable
(
groupVersion
.
get
(
wechatGroupId
)).
orElse
(
new
BookWxQrcodeDTO
()).
getWechatGroupIp
();
SendWeixinRequestTools
.
changeGroupName
(
oneQrcode
.
getRobotWxId
(),
oneQrcode
.
getWeixinGroupId
(),
groupQrcode
.
getGroupName
(),
ip
);
}
}
@ParamLog
(
"新增商品对应规格"
)
@ParamLog
(
"新增商品对应规格"
)
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/impl/GroupQrcodeBizImpl.java
View file @
06b10df1
...
@@ -9,10 +9,24 @@ import com.pcloud.book.consumer.label.LabelConsr;
...
@@ -9,10 +9,24 @@ import com.pcloud.book.consumer.label.LabelConsr;
import
com.pcloud.book.consumer.reader.ReaderConsr
;
import
com.pcloud.book.consumer.reader.ReaderConsr
;
import
com.pcloud.book.consumer.user.AdviserConsr
;
import
com.pcloud.book.consumer.user.AdviserConsr
;
import
com.pcloud.book.consumer.wechatgroup.WechatGroupConsr
;
import
com.pcloud.book.consumer.wechatgroup.WechatGroupConsr
;
import
com.pcloud.book.group.biz.*
;
import
com.pcloud.book.group.biz.BookGroupBiz
;
import
com.pcloud.book.group.biz.BookGroupClassifyBiz
;
import
com.pcloud.book.group.biz.GroupAnnouncementBiz
;
import
com.pcloud.book.group.biz.GroupQrcodeBiz
;
import
com.pcloud.book.group.biz.WeixinQrcodeBiz
;
import
com.pcloud.book.group.constants.BookBusinessConstants
;
import
com.pcloud.book.group.constants.BookBusinessConstants
;
import
com.pcloud.book.group.dao.GroupQrcodeDao
;
import
com.pcloud.book.group.dao.GroupQrcodeDao
;
import
com.pcloud.book.group.dto.*
;
import
com.pcloud.book.group.dto.AutoUpdateGroupNumDTO
;
import
com.pcloud.book.group.dto.BookWxQrcodeDTO
;
import
com.pcloud.book.group.dto.ChangeGroupNameDTO
;
import
com.pcloud.book.group.dto.GroupAndUserNumberDTO
;
import
com.pcloud.book.group.dto.GroupNameAndMaxSeqDTO
;
import
com.pcloud.book.group.dto.GroupQrcodeDTO
;
import
com.pcloud.book.group.dto.GroupQrcodeInfo4Advertising
;
import
com.pcloud.book.group.dto.GroupQrcodeInfoDTO
;
import
com.pcloud.book.group.dto.PushAddUserMessageDTO
;
import
com.pcloud.book.group.dto.QrcodeNameAndProIdDTO
;
import
com.pcloud.book.group.dto.WeixinQrcodeDTO
;
import
com.pcloud.book.group.entity.GroupQrcode
;
import
com.pcloud.book.group.entity.GroupQrcode
;
import
com.pcloud.book.group.enums.QrcodeStatusEnum
;
import
com.pcloud.book.group.enums.QrcodeStatusEnum
;
import
com.pcloud.book.group.tools.SendWeixinRequestTools
;
import
com.pcloud.book.group.tools.SendWeixinRequestTools
;
...
@@ -28,6 +42,7 @@ import com.pcloud.book.keywords.dto.KeywordUserCountDTO;
...
@@ -28,6 +42,7 @@ import com.pcloud.book.keywords.dto.KeywordUserCountDTO;
import
com.pcloud.book.mq.producer.BookMQProducer
;
import
com.pcloud.book.mq.producer.BookMQProducer
;
import
com.pcloud.book.push.dao.PushGroupDao
;
import
com.pcloud.book.push.dao.PushGroupDao
;
import
com.pcloud.book.push.entity.PushGroup
;
import
com.pcloud.book.push.entity.PushGroup
;
import
com.pcloud.book.riddle.dto.GroupRiddleDTO
;
import
com.pcloud.book.util.common.ThreadPoolUtils
;
import
com.pcloud.book.util.common.ThreadPoolUtils
;
import
com.pcloud.common.core.aspect.ParamLog
;
import
com.pcloud.common.core.aspect.ParamLog
;
import
com.pcloud.common.page.PageBeanNew
;
import
com.pcloud.common.page.PageBeanNew
;
...
@@ -37,7 +52,7 @@ import com.pcloud.common.utils.cache.redis.JedisClusterUtils;
...
@@ -37,7 +52,7 @@ import com.pcloud.common.utils.cache.redis.JedisClusterUtils;
import
com.pcloud.common.utils.string.StringUtil
;
import
com.pcloud.common.utils.string.StringUtil
;
import
com.pcloud.usercenter.party.adviser.dto.AdviserBaseInfoDto
;
import
com.pcloud.usercenter.party.adviser.dto.AdviserBaseInfoDto
;
import
com.sdk.wxgroup.WxGroupSDK
;
import
com.sdk.wxgroup.WxGroupSDK
;
import
com.pcloud.book.riddle.dto.GroupRiddleDTO
;
import
org.apache.commons.collections4.MapUtils
;
import
org.apache.commons.collections4.MapUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -48,7 +63,6 @@ import org.springframework.util.CollectionUtils;
...
@@ -48,7 +63,6 @@ import org.springframework.util.CollectionUtils;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashMap
;
...
@@ -279,8 +293,11 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
...
@@ -279,8 +293,11 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
groupQrcodeDao
.
modifyNameById
(
wechatGroupName
,
id
,
updateUser
);
groupQrcodeDao
.
modifyNameById
(
wechatGroupName
,
id
,
updateUser
);
if
(
changeGroupNameDTO
!=
null
)
{
if
(
changeGroupNameDTO
!=
null
)
{
//获取修改群名称小号
//获取修改群名称小号
String
robotId
=
wechatGroupConsr
.
getRobotIdByGroupId
(
changeGroupNameDTO
.
getWxGroupId
());
final
String
wechatGroupId
=
changeGroupNameDTO
.
getWxGroupId
();
SendWeixinRequestTools
.
changeGroupName
(
robotId
,
changeGroupNameDTO
.
getWxGroupId
(),
wechatGroupName
);
String
robotId
=
wechatGroupConsr
.
getRobotIdByGroupId
(
wechatGroupId
);
Map
<
String
,
BookWxQrcodeDTO
>
groupVersion
=
weixinQrcodeBiz
.
getGroupVersion
(
Collections
.
singletonList
(
wechatGroupId
));
String
ip
=
Optional
.
ofNullable
(
groupVersion
.
get
(
wechatGroupId
)).
orElse
(
new
BookWxQrcodeDTO
()).
getWechatGroupIp
();
SendWeixinRequestTools
.
changeGroupName
(
robotId
,
changeGroupNameDTO
.
getWxGroupId
(),
wechatGroupName
,
ip
);
}
}
}
}
...
@@ -526,7 +543,10 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
...
@@ -526,7 +543,10 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
}
}
});
});
//String robotId = wechatGroupConsr.getRobotIdByGroupId(oneQrcode.getWeixinGroupId());
//String robotId = wechatGroupConsr.getRobotIdByGroupId(oneQrcode.getWeixinGroupId());
SendWeixinRequestTools
.
changeGroupName
(
oneQrcode
.
getRobotWxId
(),
oneQrcode
.
getWeixinGroupId
(),
groupName
);
final
String
wechatGroupId
=
oneQrcode
.
getWeixinGroupId
();
Map
<
String
,
BookWxQrcodeDTO
>
groupVersion
=
weixinQrcodeBiz
.
getGroupVersion
(
Collections
.
singletonList
(
wechatGroupId
));
String
ip
=
Optional
.
ofNullable
(
groupVersion
.
get
(
wechatGroupId
)).
orElse
(
new
BookWxQrcodeDTO
()).
getWechatGroupIp
();
SendWeixinRequestTools
.
changeGroupName
(
oneQrcode
.
getRobotWxId
(),
wechatGroupId
,
groupName
,
ip
);
}
}
}
}
}
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/impl/WeixinQrcodeBizImpl.java
View file @
06b10df1
...
@@ -30,7 +30,6 @@ import com.pcloud.common.utils.cache.redis.JedisClusterUtils;
...
@@ -30,7 +30,6 @@ import com.pcloud.common.utils.cache.redis.JedisClusterUtils;
import
com.pcloud.common.utils.string.StringUtil
;
import
com.pcloud.common.utils.string.StringUtil
;
import
com.pcloud.wechatgroup.group.dto.GroupRobotDTO
;
import
com.pcloud.wechatgroup.group.dto.GroupRobotDTO
;
import
com.sdk.wxgroup.AddToGroupVO
;
import
com.sdk.wxgroup.AddToGroupVO
;
import
com.sdk.wxgroup.GroupInfoVO
;
import
com.sdk.wxgroup.QrcodeVO
;
import
com.sdk.wxgroup.QrcodeVO
;
import
com.sdk.wxgroup.WxGroupSDK
;
import
com.sdk.wxgroup.WxGroupSDK
;
...
@@ -49,8 +48,6 @@ import java.util.HashMap;
...
@@ -49,8 +48,6 @@ import java.util.HashMap;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Optional
;
import
java.util.Optional
;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.Executors
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -220,7 +217,10 @@ public class WeixinQrcodeBizImpl implements WeixinQrcodeBiz {
...
@@ -220,7 +217,10 @@ public class WeixinQrcodeBizImpl implements WeixinQrcodeBiz {
}
}
for
(
ChangeGroupNameDTO
changeGroupNameDTO
:
changeGroupNameDTOS
)
{
for
(
ChangeGroupNameDTO
changeGroupNameDTO
:
changeGroupNameDTOS
)
{
String
robotId
=
wechatGroupConsr
.
getRobotIdByGroupId
(
changeGroupNameDTO
.
getWxGroupId
());
String
robotId
=
wechatGroupConsr
.
getRobotIdByGroupId
(
changeGroupNameDTO
.
getWxGroupId
());
SendWeixinRequestTools
.
changeGroupName
(
robotId
,
changeGroupNameDTO
.
getWxGroupId
(),
changeGroupNameDTO
.
getWxGroupName
());
final
String
wechatGroupId
=
changeGroupNameDTO
.
getWxGroupId
();
Map
<
String
,
BookWxQrcodeDTO
>
groupVersion
=
weixinQrcodeBiz
.
getGroupVersion
(
Collections
.
singletonList
(
wechatGroupId
));
String
ip
=
Optional
.
ofNullable
(
groupVersion
.
get
(
wechatGroupId
)).
orElse
(
new
BookWxQrcodeDTO
()).
getWechatGroupIp
();
SendWeixinRequestTools
.
changeGroupName
(
robotId
,
changeGroupNameDTO
.
getWxGroupId
(),
changeGroupNameDTO
.
getWxGroupName
(),
ip
);
}
}
}
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/tools/SendWeixinRequestTools.java
View file @
06b10df1
...
@@ -16,7 +16,6 @@ import com.pcloud.common.utils.ListUtils;
...
@@ -16,7 +16,6 @@ import com.pcloud.common.utils.ListUtils;
import
com.pcloud.common.utils.cache.redis.JedisClusterUtils
;
import
com.pcloud.common.utils.cache.redis.JedisClusterUtils
;
import
com.pcloud.common.utils.string.StringUtil
;
import
com.pcloud.common.utils.string.StringUtil
;
import
com.sdk.wxgroup.ChangeNameVO
;
import
com.sdk.wxgroup.ChangeNameVO
;
import
com.sdk.wxgroup.QrcodeVO
;
import
com.sdk.wxgroup.SendArticleMessageVO
;
import
com.sdk.wxgroup.SendArticleMessageVO
;
import
com.sdk.wxgroup.SendMessageTypeEnum
;
import
com.sdk.wxgroup.SendMessageTypeEnum
;
import
com.sdk.wxgroup.SendPicMessageVO
;
import
com.sdk.wxgroup.SendPicMessageVO
;
...
@@ -27,7 +26,11 @@ import org.apache.commons.lang3.StringUtils;
...
@@ -27,7 +26,11 @@ import org.apache.commons.lang3.StringUtils;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
java.util.*
;
import
java.util.ArrayList
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
/**
/**
* @author lily
* @author lily
...
@@ -37,11 +40,12 @@ public class SendWeixinRequestTools {
...
@@ -37,11 +40,12 @@ public class SendWeixinRequestTools {
private
static
final
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
SendWeixinRequestTools
.
class
);
private
static
final
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
SendWeixinRequestTools
.
class
);
@ParamLog
(
"修改微信群名称"
)
@ParamLog
(
"修改微信群名称"
)
public
static
void
changeGroupName
(
String
robotWxId
,
String
weixinGroupId
,
String
groupName
)
{
public
static
void
changeGroupName
(
String
robotWxId
,
String
weixinGroupId
,
String
groupName
,
String
ip
)
{
ChangeNameVO
changeNameVO
=
new
ChangeNameVO
();
ChangeNameVO
changeNameVO
=
new
ChangeNameVO
();
changeNameVO
.
setAltId
(
robotWxId
);
changeNameVO
.
setAltId
(
robotWxId
);
changeNameVO
.
setWxGroupId
(
weixinGroupId
);
changeNameVO
.
setWxGroupId
(
weixinGroupId
);
changeNameVO
.
setName
(
groupName
);
changeNameVO
.
setName
(
groupName
);
changeNameVO
.
setIp
(
ip
);
try
{
try
{
WxGroupSDK
.
changeGroupName
(
changeNameVO
);
WxGroupSDK
.
changeGroupName
(
changeNameVO
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -273,11 +277,25 @@ public class SendWeixinRequestTools {
...
@@ -273,11 +277,25 @@ public class SendWeixinRequestTools {
return
resultUrl
;
return
resultUrl
;
}
}
@ParamLog
(
"欢迎语中推送关键词信息"
)
@ParamLog
(
"群欢迎语中推送关键词信息"
)
public
static
void
sendKeywordsInfo
(
List
<
KeywordDTO
>
keywords
,
String
robotId
,
String
toWxId
,
String
ip
){
public
static
void
sendKeywordsInfo
(
List
<
KeywordDTO
>
keywords
,
String
robotId
,
String
weixinGroupId
,
String
ip
){
if
(
ListUtils
.
isEmpty
(
keywords
))
{
return
;
}
final
String
content
=
processContent
(
keywords
,
robotId
,
weixinGroupId
,
ip
);
sendTextMessage
(
content
,
robotId
,
weixinGroupId
,
ip
);
}
@ParamLog
(
"个人欢迎语中推送关键词信息"
)
public
static
void
sendKeywordsInfoToSelf
(
List
<
KeywordDTO
>
keywords
,
String
robotId
,
String
toWxId
,
String
ip
){
if
(
ListUtils
.
isEmpty
(
keywords
))
{
if
(
ListUtils
.
isEmpty
(
keywords
))
{
return
;
return
;
}
}
final
String
content
=
processContent
(
keywords
,
robotId
,
toWxId
,
ip
);
sendTextMessageToSelf
(
content
,
robotId
,
toWxId
,
ip
);
}
private
static
String
processContent
(
List
<
KeywordDTO
>
keywords
,
String
robotId
,
String
toWxId
,
String
ip
)
{
StringBuilder
content
=
new
StringBuilder
();
StringBuilder
content
=
new
StringBuilder
();
for
(
int
i
=
0
;
i
<
keywords
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
keywords
.
size
();
i
++)
{
KeywordDTO
keywordDTO
=
keywords
.
get
(
i
);
KeywordDTO
keywordDTO
=
keywords
.
get
(
i
);
...
@@ -292,9 +310,7 @@ public class SendWeixinRequestTools {
...
@@ -292,9 +310,7 @@ public class SendWeixinRequestTools {
content
.
append
(
"\n"
);
content
.
append
(
"\n"
);
}
}
}
}
// 1001282-施总需求,群不推送关键词,个人欢迎语推送关键词
return
content
.
toString
();
// sendTextMessage(content, robotId, weixinGroupId, ip);
sendTextMessageToSelf
(
content
.
toString
(),
robotId
,
toWxId
,
ip
);
}
}
private
static
void
sendTextMessageToSelf
(
String
content
,
String
robotId
,
String
toWxId
,
String
ip
){
private
static
void
sendTextMessageToSelf
(
String
content
,
String
robotId
,
String
toWxId
,
String
ip
){
...
...
pcloud-service-book/src/main/java/com/pcloud/book/keywords/biz/impl/BookGuideBizImpl.java
View file @
06b10df1
...
@@ -144,7 +144,7 @@ public class BookGuideBizImpl implements BookGuideBiz {
...
@@ -144,7 +144,7 @@ public class BookGuideBizImpl implements BookGuideBiz {
//发主打资源
//发主打资源
sendMainKeyword
(
keywords
,
agreeAddUserDTO
,
dto
,
wxGroupId
);
sendMainKeyword
(
keywords
,
agreeAddUserDTO
,
dto
,
wxGroupId
);
//发关键词列表
//发关键词列表
SendWeixinRequestTools
.
sendKeywordsInfo
(
keywords
,
agreeAddUserDTO
.
getRobotWxId
(),
agreeAddUserDTO
.
getUserWxId
(),
agreeAddUserDTO
.
getIp
());
SendWeixinRequestTools
.
sendKeywordsInfo
ToSelf
(
keywords
,
agreeAddUserDTO
.
getRobotWxId
(),
agreeAddUserDTO
.
getUserWxId
(),
agreeAddUserDTO
.
getIp
());
// 拉群
// 拉群
final
Integer
peopleCounts
=
WxGroupSDK
.
getPeopleCounts
(
wxGroupId
,
agreeAddUserDTO
.
getRobotWxId
(),
agreeAddUserDTO
.
getIp
());
final
Integer
peopleCounts
=
WxGroupSDK
.
getPeopleCounts
(
wxGroupId
,
agreeAddUserDTO
.
getRobotWxId
(),
agreeAddUserDTO
.
getIp
());
// 邀请好友进群有次数限制,目前测试为每天只能拉30-40人就操作频繁,所以在此加判断,超过30人或者群人数超过30人就发送邀请链接
// 邀请好友进群有次数限制,目前测试为每天只能拉30-40人就操作频繁,所以在此加判断,超过30人或者群人数超过30人就发送邀请链接
...
@@ -161,6 +161,7 @@ public class BookGuideBizImpl implements BookGuideBiz {
...
@@ -161,6 +161,7 @@ public class BookGuideBizImpl implements BookGuideBiz {
sendGroupInviteVO
.
setAltId
(
agreeAddUserDTO
.
getRobotWxId
());
sendGroupInviteVO
.
setAltId
(
agreeAddUserDTO
.
getRobotWxId
());
sendGroupInviteVO
.
setWxId
(
agreeAddUserDTO
.
getUserWxId
());
sendGroupInviteVO
.
setWxId
(
agreeAddUserDTO
.
getUserWxId
());
sendGroupInviteVO
.
setWxGroupId
(
wxGroupId
);
sendGroupInviteVO
.
setWxGroupId
(
wxGroupId
);
sendGroupInviteVO
.
setIp
(
agreeAddUserDTO
.
getIp
());
WxGroupSDK
.
sendGroupInvite
(
sendGroupInviteVO
);
WxGroupSDK
.
sendGroupInvite
(
sendGroupInviteVO
);
log
.
info
(
"[同意加好友发送欢迎语] 发送进群链接 sendGroupInviteVO:{}"
,
sendGroupInviteVO
);
log
.
info
(
"[同意加好友发送欢迎语] 发送进群链接 sendGroupInviteVO:{}"
,
sendGroupInviteVO
);
// 进群之后更新群qrCodeId
// 进群之后更新群qrCodeId
...
@@ -366,14 +367,16 @@ public class BookGuideBizImpl implements BookGuideBiz {
...
@@ -366,14 +367,16 @@ public class BookGuideBizImpl implements BookGuideBiz {
//获取公众号基本信息
//获取公众号基本信息
AccountSettingDto
wechatInfo
=
qrcodeSceneConsr
.
getWechatInfo
(
classifyQrcodeInfo
.
getChannelId
());
AccountSettingDto
wechatInfo
=
qrcodeSceneConsr
.
getWechatInfo
(
classifyQrcodeInfo
.
getChannelId
());
//获取关键词信息(改成10个了) 刘娜需求 1001282 群不推送关键词
//获取关键词信息(改成10个了) 刘娜需求 1001282 群不推送关键词
// List<KeywordDTO> keywords = bookKeywordBiz.listFiveKeyword(classifyQrcodeInfo.getClassifyId(), classifyQrcodeInfo.getBookGroupId());
List
<
KeywordDTO
>
keywords
=
bookKeywordBiz
.
listFiveKeyword
(
classifyQrcodeInfo
.
getClassifyId
(),
classifyQrcodeInfo
.
getBookGroupId
());
// Boolean isHaveKeywords = !ListUtils.isEmpty(keywords);
Boolean
isHaveKeywords
=
!
ListUtils
.
isEmpty
(
keywords
);
final
Boolean
groupRobot
=
wechatGroupConsr
.
isGroupRobot
(
robotId
);
log
.
info
(
"[wechatGroupConsr.isGroupRobot] robotId:{} groupRobot:{}"
,
robotId
,
groupRobot
);
if
(
ListUtils
.
isEmpty
(
replyMessages
))
{
if
(
ListUtils
.
isEmpty
(
replyMessages
))
{
//获取群名称
//获取群名称
GroupQrcodeBaseInfoVO
groupInfo
=
groupQrcodeBiz
.
getBaseById
(
classifyQrcodeInfo
.
getGroupQrcodeId
());
GroupQrcodeBaseInfoVO
groupInfo
=
groupQrcodeBiz
.
getBaseById
(
classifyQrcodeInfo
.
getGroupQrcodeId
());
//推送消息 刘娜需求 1001282 群不推送关键词
//推送消息 刘娜需求 1001282 群不推送关键词
// SendWeixinRequestTools.sendDefaultMessage(groupInfo == null ? "" : groupInfo.getGroupName(), robotId, weixinGroupId, isHaveKeywords, pushAddUserMessageDTO.getIp());
// 若非之前的机器人则不回复普通关键词
SendWeixinRequestTools
.
sendDefaultMessage
(
groupInfo
==
null
?
""
:
groupInfo
.
getGroupName
(),
robotId
,
weixinGroupId
,
false
,
pushAddUserMessageDTO
.
getIp
());
SendWeixinRequestTools
.
sendDefaultMessage
(
groupInfo
==
null
?
""
:
groupInfo
.
getGroupName
(),
robotId
,
weixinGroupId
,
isHaveKeywords
,
pushAddUserMessageDTO
.
getIp
());
}
else
{
}
else
{
//处理链接
//处理链接
handleUrl
(
replyMessages
,
wechatInfo
,
classifyQrcodeInfo
);
handleUrl
(
replyMessages
,
wechatInfo
,
classifyQrcodeInfo
);
...
@@ -383,7 +386,9 @@ public class BookGuideBizImpl implements BookGuideBiz {
...
@@ -383,7 +386,9 @@ public class BookGuideBizImpl implements BookGuideBiz {
addGuideAppTouchRecord
(
replyMessages
,
weixinGroupId
,
classifyQrcodeInfo
.
getBookGroupId
(),
classifyQrcodeInfo
.
getClassifyId
());
addGuideAppTouchRecord
(
replyMessages
,
weixinGroupId
,
classifyQrcodeInfo
.
getBookGroupId
(),
classifyQrcodeInfo
.
getClassifyId
());
}
}
//获取关键词信息(改成10个了)刘娜需求 1001282 群不推送关键词
//获取关键词信息(改成10个了)刘娜需求 1001282 群不推送关键词
// SendWeixinRequestTools.sendKeywordsInfo(keywords, robotId, weixinGroupId, pushAddUserMessageDTO.getIp());
if
(
groupRobot
)
{
SendWeixinRequestTools
.
sendKeywordsInfo
(
keywords
,
robotId
,
weixinGroupId
,
pushAddUserMessageDTO
.
getIp
());
}
//如果设置了群学习报告,加一个群学习报告的关键词
//如果设置了群学习报告,加一个群学习报告的关键词
pushLearningReport
(
classifyQrcodeInfo
,
robotId
,
weixinGroupId
,
pushAddUserMessageDTO
.
getIp
());
pushLearningReport
(
classifyQrcodeInfo
,
robotId
,
weixinGroupId
,
pushAddUserMessageDTO
.
getIp
());
if
(
bookGuide
!=
null
&&
bookGuide
.
getIsRecommend
()
!=
null
&&
bookGuide
.
getIsRecommend
()
==
1
)
{
if
(
bookGuide
!=
null
&&
bookGuide
.
getIsRecommend
()
!=
null
&&
bookGuide
.
getIsRecommend
()
==
1
)
{
...
...
pcloud-service-book/src/main/java/com/pcloud/book/keywords/biz/impl/BookKeywordBizImpl.java
View file @
06b10df1
...
@@ -495,14 +495,7 @@ public class BookKeywordBizImpl implements BookKeywordBiz {
...
@@ -495,14 +495,7 @@ public class BookKeywordBizImpl implements BookKeywordBiz {
Long
qrcodeId
=
classifyToQrcodeMap
.
get
(
dto
.
getClassifyId
());
Long
qrcodeId
=
classifyToQrcodeMap
.
get
(
dto
.
getClassifyId
());
GroupQrcodeBaseInfoVO
qrcodeInfo
=
groupQrcodeDao
.
getBaseById
(
qrcodeId
);
GroupQrcodeBaseInfoVO
qrcodeInfo
=
groupQrcodeDao
.
getBaseById
(
qrcodeId
);
if
(
isApp
||
isLink
)
{
if
(
isApp
||
isLink
)
{
Long
channelId
=
dto
.
getChannelId
();
AccountSettingDto
accountSettingDto
=
qrcodeSceneConsr
.
getWechatInfo
(
dto
.
getChannelId
());
if
(
isApp
)
{
final
AppDto
app
=
appConsr
.
getBaseById
(
replyKeywordDTO
.
getServeId
());
if
(
null
!=
app
)
{
channelId
=
app
.
getChannelId
();
}
}
AccountSettingDto
accountSettingDto
=
qrcodeSceneConsr
.
getWechatInfo
(
channelId
);
String
linkUrl
=
SendWeixinRequestTools
.
splitUrlNew
(
accountSettingDto
,
replyKeywordDTO
.
getLinkUrl
(),
dto
.
getBookGroupId
(),
dto
.
getClassifyId
(),
qrcodeId
);
String
linkUrl
=
SendWeixinRequestTools
.
splitUrlNew
(
accountSettingDto
,
replyKeywordDTO
.
getLinkUrl
(),
dto
.
getBookGroupId
(),
dto
.
getClassifyId
(),
qrcodeId
);
replyKeywordDTO
.
setLinkUrl
(
linkUrl
);
replyKeywordDTO
.
setLinkUrl
(
linkUrl
);
if
(!
StringUtil
.
isEmpty
(
linkUrl
))
{
if
(!
StringUtil
.
isEmpty
(
linkUrl
))
{
...
@@ -596,15 +589,7 @@ public class BookKeywordBizImpl implements BookKeywordBiz {
...
@@ -596,15 +589,7 @@ public class BookKeywordBizImpl implements BookKeywordBiz {
final
boolean
isApp
=
ReplyTypeEnum
.
APP
.
value
.
equals
(
replyKeywordDTO
.
getReplyType
());
final
boolean
isApp
=
ReplyTypeEnum
.
APP
.
value
.
equals
(
replyKeywordDTO
.
getReplyType
());
final
boolean
isLink
=
ReplyTypeEnum
.
LINK
.
value
.
equals
(
replyKeywordDTO
.
getReplyType
());
final
boolean
isLink
=
ReplyTypeEnum
.
LINK
.
value
.
equals
(
replyKeywordDTO
.
getReplyType
());
if
(
isApp
||
isLink
)
{
if
(
isApp
||
isLink
)
{
Long
channelId
=
classifyQrcodeInfo
.
getChannelId
();
AccountSettingDto
accountSettingDto
=
qrcodeSceneConsr
.
getWechatInfo
(
classifyQrcodeInfo
.
getChannelId
());
// 如果是app则取app的channelId
if
(
isApp
)
{
final
AppDto
app
=
appConsr
.
getBaseById
(
replyKeywordDTO
.
getServeId
());
if
(
null
!=
app
)
{
channelId
=
app
.
getChannelId
();
}
}
AccountSettingDto
accountSettingDto
=
qrcodeSceneConsr
.
getWechatInfo
(
channelId
);
String
linkUrl
=
SendWeixinRequestTools
.
splitUrlNew
(
accountSettingDto
,
replyKeywordDTO
.
getLinkUrl
(),
classifyQrcodeInfo
.
getBookGroupId
(),
classifyQrcodeInfo
.
getClassifyId
(),
classifyQrcodeInfo
.
getGroupQrcodeId
());
String
linkUrl
=
SendWeixinRequestTools
.
splitUrlNew
(
accountSettingDto
,
replyKeywordDTO
.
getLinkUrl
(),
classifyQrcodeInfo
.
getBookGroupId
(),
classifyQrcodeInfo
.
getClassifyId
(),
classifyQrcodeInfo
.
getGroupQrcodeId
());
replyKeywordDTO
.
setLinkUrl
(
linkUrl
);
replyKeywordDTO
.
setLinkUrl
(
linkUrl
);
}
}
...
...
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