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
9cd3547f
Commit
9cd3547f
authored
May 17, 2019
by
lili
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合并代码
parent
a9b93dcc
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
7 deletions
+25
-7
GroupQrcodeBiz.java
...c/main/java/com/pcloud/book/group/biz/GroupQrcodeBiz.java
+1
-1
GroupQrcodeBizImpl.java
...va/com/pcloud/book/group/biz/impl/GroupQrcodeBizImpl.java
+10
-1
SendWeixinRequestTools.java
...a/com/pcloud/book/group/tools/SendWeixinRequestTools.java
+11
-2
BookKeywordBizImpl.java
...com/pcloud/book/keywords/biz/impl/BookKeywordBizImpl.java
+2
-2
AddWxGroupListener.java
...ain/java/com/pcloud/book/mq/topic/AddWxGroupListener.java
+1
-1
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/GroupQrcodeBiz.java
View file @
9cd3547f
...
@@ -58,7 +58,7 @@ public interface GroupQrcodeBiz {
...
@@ -58,7 +58,7 @@ public interface GroupQrcodeBiz {
* @Desr:新增一个用户
* @Desr:新增一个用户
* @Date:2019/4/28 14:45
* @Date:2019/4/28 14:45
*/
*/
void
addOneUser
(
String
wechatGroupId
,
Integer
memberCount
);
void
addOneUser
(
String
wechatGroupId
,
Integer
memberCount
,
String
nickName
);
/**
/**
* @Author:lili
* @Author:lili
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/impl/GroupQrcodeBizImpl.java
View file @
9cd3547f
...
@@ -21,6 +21,7 @@ import com.pcloud.book.group.vo.ClassifyQrcodeVO;
...
@@ -21,6 +21,7 @@ import com.pcloud.book.group.vo.ClassifyQrcodeVO;
import
com.pcloud.book.group.vo.ClassifyVO
;
import
com.pcloud.book.group.vo.ClassifyVO
;
import
com.pcloud.book.group.vo.GroupQrcodeBaseInfoVO
;
import
com.pcloud.book.group.vo.GroupQrcodeBaseInfoVO
;
import
com.pcloud.book.group.vo.ListQrcodeByClassifyParamVO
;
import
com.pcloud.book.group.vo.ListQrcodeByClassifyParamVO
;
import
com.pcloud.book.keywords.biz.BookGuideBiz
;
import
com.pcloud.book.keywords.dao.BookKeywordRecordDao
;
import
com.pcloud.book.keywords.dao.BookKeywordRecordDao
;
import
com.pcloud.book.keywords.dto.KeywordUserCountDTO
;
import
com.pcloud.book.keywords.dto.KeywordUserCountDTO
;
import
com.pcloud.book.mq.producer.BookMQProducer
;
import
com.pcloud.book.mq.producer.BookMQProducer
;
...
@@ -65,6 +66,8 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
...
@@ -65,6 +66,8 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
private
BookKeywordRecordDao
bookKeywordRecordDao
;
private
BookKeywordRecordDao
bookKeywordRecordDao
;
@Autowired
@Autowired
private
ReaderConsr
readerConsr
;
private
ReaderConsr
readerConsr
;
@Autowired
private
BookGuideBiz
bookGuideBiz
;
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
...
@@ -162,7 +165,7 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
...
@@ -162,7 +165,7 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
@Override
@Override
@ParamLog
(
"新增一个用户"
)
@ParamLog
(
"新增一个用户"
)
public
void
addOneUser
(
String
weixinGroupId
,
Integer
memberCount
)
{
public
void
addOneUser
(
String
weixinGroupId
,
Integer
memberCount
,
String
nickName
)
{
String
robotIdByGroupId
=
wechatGroupConsr
.
getRobotIdByGroupId
(
weixinGroupId
);
String
robotIdByGroupId
=
wechatGroupConsr
.
getRobotIdByGroupId
(
weixinGroupId
);
Integer
peopleCounts
=
WxGroupSDK
.
getPeopleCounts
(
weixinGroupId
,
robotIdByGroupId
);
Integer
peopleCounts
=
WxGroupSDK
.
getPeopleCounts
(
weixinGroupId
,
robotIdByGroupId
);
if
(
peopleCounts
!=
null
)
{
if
(
peopleCounts
!=
null
)
{
...
@@ -184,6 +187,12 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
...
@@ -184,6 +187,12 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
//将二维码修改为已满群状态
//将二维码修改为已满群状态
changeToOverNumber
(
groupQrcodeDTO
.
getWeixinQrcodeId
(),
groupQrcodeDTO
.
getId
());
changeToOverNumber
(
groupQrcodeDTO
.
getWeixinQrcodeId
(),
groupQrcodeDTO
.
getId
());
}
}
List
<
String
>
nickNames
=
JedisClusterUtils
.
getJsonList
(
"BOOK:WEIXINGROUP:GUIDEUSER"
+
weixinGroupId
,
String
.
class
);
if
(
ListUtils
.
isEmpty
(
nickNames
)
&&
!
StringUtil
.
isEmpty
(
nickName
)){
nickNames
=
new
ArrayList
<>();
nickNames
.
add
(
nickName
);
JedisClusterUtils
.
setJsonList
(
"BOOK:WEIXINGROUP:GUIDEUSER"
+
weixinGroupId
,
nickNames
,
600
);
}
String
value
=
JedisClusterUtils
.
getJson
(
"BOOK:WEIXINGROUP:GUIDE"
+
weixinGroupId
,
String
.
class
);
String
value
=
JedisClusterUtils
.
getJson
(
"BOOK:WEIXINGROUP:GUIDE"
+
weixinGroupId
,
String
.
class
);
if
(
StringUtil
.
isEmpty
(
value
))
{
if
(
StringUtil
.
isEmpty
(
value
))
{
JedisClusterUtils
.
setJson
(
"BOOK:WEIXINGROUP:GUIDE"
+
weixinGroupId
,
weixinGroupId
,
5
);
JedisClusterUtils
.
setJson
(
"BOOK:WEIXINGROUP:GUIDE"
+
weixinGroupId
,
weixinGroupId
,
5
);
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/tools/SendWeixinRequestTools.java
View file @
9cd3547f
...
@@ -12,6 +12,7 @@ import com.pcloud.channelcenter.wechat.dto.AccountSettingDto;
...
@@ -12,6 +12,7 @@ import com.pcloud.channelcenter.wechat.dto.AccountSettingDto;
import
com.pcloud.common.core.aspect.ParamLog
;
import
com.pcloud.common.core.aspect.ParamLog
;
import
com.pcloud.common.utils.BeanUtils
;
import
com.pcloud.common.utils.BeanUtils
;
import
com.pcloud.common.utils.ListUtils
;
import
com.pcloud.common.utils.ListUtils
;
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.QrcodeVO
;
...
@@ -145,6 +146,7 @@ public class SendWeixinRequestTools {
...
@@ -145,6 +146,7 @@ public class SendWeixinRequestTools {
@ParamLog
(
"修改微信群名称"
)
@ParamLog
(
"修改微信群名称"
)
public
static
void
sendGuideMessage
(
List
<
ReplyMessageVO
>
replyMessages
,
String
robotId
,
String
weixinGroupId
)
{
public
static
void
sendGuideMessage
(
List
<
ReplyMessageVO
>
replyMessages
,
String
robotId
,
String
weixinGroupId
)
{
JedisClusterUtils
.
del
(
"BOOK:WEIXINGROUP:GUIDEUSER"
+
weixinGroupId
);
if
(
ListUtils
.
isEmpty
(
replyMessages
))
{
if
(
ListUtils
.
isEmpty
(
replyMessages
))
{
return
;
return
;
}
}
...
@@ -282,10 +284,17 @@ public class SendWeixinRequestTools {
...
@@ -282,10 +284,17 @@ public class SendWeixinRequestTools {
public
static
void
sendDefaultMessage
(
String
groupName
,
String
robotId
,
String
weixinGroupId
)
{
public
static
void
sendDefaultMessage
(
String
groupName
,
String
robotId
,
String
weixinGroupId
)
{
String
content
=
""
;
String
content
=
""
;
List
<
String
>
nickNames
=
JedisClusterUtils
.
getJsonList
(
"BOOK:WEIXINGROUP:GUIDEUSER"
+
weixinGroupId
,
String
.
class
);
if
(!
ListUtils
.
isEmpty
(
nickNames
)){
JedisClusterUtils
.
del
(
"BOOK:WEIXINGROUP:GUIDEUSER"
+
weixinGroupId
);
}
for
(
String
nickName
:
nickNames
)
{
content
=
content
+
"@"
+
nickName
+
" "
;
}
if
(
StringUtil
.
isEmpty
(
groupName
))
{
if
(
StringUtil
.
isEmpty
(
groupName
))
{
content
=
"欢迎加入本群,
凭以下关键词领取任务或资源:"
;
content
=
content
+
"欢迎加入本书!
凭以下关键词领取任务或资源:"
;
}
else
{
}
else
{
content
=
"欢迎加入"
+
groupName
+
"!
凭以下关键词领取任务或资源:"
;
content
=
content
+
"欢迎加入本书!"
+
groupName
+
"
凭以下关键词领取任务或资源:"
;
}
}
SendTextMessageVO
sendTextMessageVO
=
new
SendTextMessageVO
();
SendTextMessageVO
sendTextMessageVO
=
new
SendTextMessageVO
();
sendTextMessageVO
.
setContent
(
content
);
sendTextMessageVO
.
setContent
(
content
);
...
...
pcloud-service-book/src/main/java/com/pcloud/book/keywords/biz/impl/BookKeywordBizImpl.java
View file @
9cd3547f
...
@@ -185,9 +185,9 @@ public class BookKeywordBizImpl implements BookKeywordBiz {
...
@@ -185,9 +185,9 @@ public class BookKeywordBizImpl implements BookKeywordBiz {
@ParamLog
(
"获取5个关键词"
)
@ParamLog
(
"获取5个关键词"
)
public
List
<
KeywordDTO
>
listFiveKeyword
(
Long
classifyId
,
Long
bookGroupId
)
{
public
List
<
KeywordDTO
>
listFiveKeyword
(
Long
classifyId
,
Long
bookGroupId
)
{
//获取是否单独设置关键词
//获取是否单独设置关键词
List
<
KeywordDTO
>
keywords
=
bookKeywordDao
.
listFiveKeyword
(
0L
,
bookGroupId
);
List
<
KeywordDTO
>
keywords
=
bookKeywordDao
.
listFiveKeyword
(
classifyId
,
bookGroupId
);
if
(
ListUtils
.
isEmpty
(
keywords
))
{
if
(
ListUtils
.
isEmpty
(
keywords
))
{
keywords
=
bookKeywordDao
.
listFiveKeyword
(
classifyId
,
bookGroupId
);
keywords
=
bookKeywordDao
.
listFiveKeyword
(
0L
,
bookGroupId
);
}
}
return
keywords
;
return
keywords
;
}
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/mq/topic/AddWxGroupListener.java
View file @
9cd3547f
...
@@ -31,7 +31,7 @@ public class AddWxGroupListener {
...
@@ -31,7 +31,7 @@ public class AddWxGroupListener {
try
{
try
{
if
(
addWXGroupDTO
==
null
||
addWXGroupDTO
.
getWechatGroupId
()
==
null
||
addWXGroupDTO
.
getMemberCount
()
==
null
)
if
(
addWXGroupDTO
==
null
||
addWXGroupDTO
.
getWechatGroupId
()
==
null
||
addWXGroupDTO
.
getMemberCount
()
==
null
)
return
;
return
;
groupQrcodeBiz
.
addOneUser
(
addWXGroupDTO
.
getWechatGroupId
(),
addWXGroupDTO
.
getMemberCount
());
groupQrcodeBiz
.
addOneUser
(
addWXGroupDTO
.
getWechatGroupId
(),
addWXGroupDTO
.
getMemberCount
()
,
addWXGroupDTO
.
getNickName
()
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
LOGGER
.
error
(
"接收微信用户进群消息失败"
+
e
.
getMessage
(),
e
);
LOGGER
.
error
(
"接收微信用户进群消息失败"
+
e
.
getMessage
(),
e
);
}
}
...
...
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