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
2689ca5b
Commit
2689ca5b
authored
Sep 20, 2019
by
裴大威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat 1001745
parent
f5bfcff8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
36 deletions
+57
-36
GroupQrcodeBizImpl.java
...va/com/pcloud/book/group/biz/impl/GroupQrcodeBizImpl.java
+10
-2
SendWeixinRequestTools.java
...a/com/pcloud/book/group/tools/SendWeixinRequestTools.java
+36
-29
BookGuideBizImpl.java
...a/com/pcloud/book/keywords/biz/impl/BookGuideBizImpl.java
+6
-5
KeywordStatusDTO.java
...n/java/com/pcloud/book/keywords/dto/KeywordStatusDTO.java
+5
-0
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/impl/GroupQrcodeBizImpl.java
View file @
2689ca5b
package
com
.
pcloud
.
book
.
group
.
biz
.
impl
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
com.pcloud.book.advertising.biz.AdvertisingSpaceBiz
;
...
...
@@ -66,7 +67,7 @@ import org.springframework.util.CollectionUtils;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.
Date
;
import
java.util.
Comparator
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -239,6 +240,7 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
}
}
String
url
=
null
;
List
<
ClassifyQrcodeVO
>
canUserQrcode
=
Lists
.
newArrayList
();
for
(
ClassifyQrcodeVO
vo
:
collect
)
{
if
(
vo
.
getUserNumber
()
>=
classify
.
getChangeNumber
())
{
//将二维码修改为已满群状态
...
...
@@ -250,9 +252,14 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
log
.
info
(
"[前端调用切群接口] getChangeGroupQrCode 处理超出了但是没有更新状态的群 vo:{}"
,
vo
);
}
if
(
vo
.
getUserNumber
()
<
classify
.
getChangeNumber
())
{
url
=
vo
.
getQrcodeUrl
(
);
canUserQrcode
.
add
(
vo
);
}
}
// 获取群人数最少的可用群二维码返回出去
if
(!
CollectionUtils
.
isEmpty
(
canUserQrcode
))
{
ClassifyQrcodeVO
vo
=
canUserQrcode
.
stream
().
min
(
Comparator
.
comparingInt
(
ClassifyQrcodeVO:
:
getUserNumber
)).
orElseGet
(
ClassifyQrcodeVO:
:
new
);
url
=
StringUtil
.
isBlank
(
vo
.
getQrcodeUrl
())
?
null
:
vo
.
getQrcodeUrl
();
}
if
(
Objects
.
isNull
(
url
))
{
// 如果没有群则新增一个
String
qrcodeUrl
=
changeGroupQrCode
(
classifyId
);
...
...
@@ -262,6 +269,7 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
return
url
;
}
@Override
public
String
changeGroupQrCode
(
Long
classifyId
)
{
return
changeGroup
(
classifyId
);
...
...
pcloud-service-book/src/main/java/com/pcloud/book/group/tools/SendWeixinRequestTools.java
View file @
2689ca5b
This diff is collapsed.
Click to expand it.
pcloud-service-book/src/main/java/com/pcloud/book/keywords/biz/impl/BookGuideBizImpl.java
View file @
2689ca5b
...
...
@@ -422,9 +422,10 @@ public class BookGuideBizImpl implements BookGuideBiz {
@ParamLog
(
"推关学习报告/猜谜语关键词消息"
)
private
KeywordStatusDTO
pushLearningReport
(
GroupClassifyQrcodeDTO
classifyQrcodeInfo
,
String
robotId
,
String
weixinGroupId
,
String
ip
)
{
Boolean
reportOpen
=
false
;
Boolean
riddleOpen
=
false
;
Boolean
clockOpen
=
false
;
boolean
reportOpen
=
false
;
boolean
riddleOpen
=
false
;
boolean
clockOpen
=
false
;
KeywordStatusDTO
dto
=
new
KeywordStatusDTO
();
if
(
classifyQrcodeInfo
.
getHasOpenLearningReport
()
!=
null
&&
classifyQrcodeInfo
.
getHasOpenLearningReport
())
{
reportOpen
=
true
;
}
...
...
@@ -435,12 +436,12 @@ public class BookGuideBizImpl implements BookGuideBiz {
WeixinClockDto
weixinClockDto
=
weixinClockGroupClassifyDao
.
getClockBaseInfoByClassify
(
classifyQrcodeInfo
.
getClassifyId
());
if
(
null
!=
weixinClockDto
&&
!
StringUtil
.
isEmpty
(
weixinClockDto
.
getClockGuide
())
&&
!
StringUtil
.
isEmpty
(
weixinClockDto
.
getClockKeyword
()))
{
clockOpen
=
true
;
dto
.
setClockGuide
(
weixinClockDto
.
getClockGuide
());
dto
.
setClockKeyword
(
weixinClockDto
.
getClockKeyword
());
}
KeywordStatusDTO
dto
=
new
KeywordStatusDTO
();
dto
.
setReportOpen
(
reportOpen
);
dto
.
setRiddleOpen
(
riddleOpen
);
dto
.
setClockOpen
(
clockOpen
);
dto
.
setClockKeyword
(
null
==
weixinClockDto
?
StringUtil
.
EMPTY
:
weixinClockDto
.
getClockKeyword
());
return
dto
;
// if (reportOpen && riddleOpen && clockOpen) {
// SendWeixinRequestTools.sendTextMessage("关键词【学习报告】\n 获取个人专属学习报告,与群成员PK元气值\n" +
...
...
pcloud-service-book/src/main/java/com/pcloud/book/keywords/dto/KeywordStatusDTO.java
View file @
2689ca5b
...
...
@@ -23,4 +23,9 @@ public class KeywordStatusDTO {
*/
private
String
clockKeyword
;
/**
* 打卡引导语
*/
private
String
clockGuide
;
}
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