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
55fea957
Commit
55fea957
authored
May 21, 2019
by
lili
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加上欢迎语删除
parent
820460a5
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
8 deletions
+25
-8
GroupQrcodeBizImpl.java
...va/com/pcloud/book/group/biz/impl/GroupQrcodeBizImpl.java
+7
-7
BookGuideBizImpl.java
...a/com/pcloud/book/keywords/biz/impl/BookGuideBizImpl.java
+11
-0
application.yml
pcloud-service-book/src/main/resources/application.yml
+1
-1
BookGuide.Mapper.xml
...k/src/main/resources/mapper/keywords/BookGuide.Mapper.xml
+6
-0
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/impl/GroupQrcodeBizImpl.java
View file @
55fea957
...
...
@@ -66,8 +66,6 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
private
BookKeywordRecordDao
bookKeywordRecordDao
;
@Autowired
private
ReaderConsr
readerConsr
;
@Autowired
private
BookGuideBiz
bookGuideBiz
;
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
...
...
@@ -167,10 +165,12 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
@ParamLog
(
"新增一个用户"
)
public
void
addOneUser
(
String
weixinGroupId
,
Integer
memberCount
,
String
nickName
)
{
String
robotIdByGroupId
=
wechatGroupConsr
.
getRobotIdByGroupId
(
weixinGroupId
);
if
(
robotIdByGroupId
!=
null
){
Integer
peopleCounts
=
WxGroupSDK
.
getPeopleCounts
(
weixinGroupId
,
robotIdByGroupId
);
if
(
peopleCounts
!=
null
)
{
memberCount
=
peopleCounts
;
}
}
//获取群基本信息
GroupQrcodeDTO
groupQrcodeDTO
=
groupQrcodeDao
.
getGroupQrcodeInfo
(
weixinGroupId
);
if
(
groupQrcodeDTO
==
null
)
{
...
...
@@ -181,7 +181,7 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
//如果人数超过限制,重新分配群
if
(
memberCount
>=
groupQrcodeDTO
.
getChangeNumber
()
&&
QrcodeStatusEnum
.
ON_USE
.
value
.
equals
(
groupQrcodeDTO
.
getQrcodeState
()))
{
//修改状态,重新分配一个群
addWechatGroup
(
groupQrcodeDTO
.
getClassifyId
(),
groupQrcodeDTO
.
get
WeixinQrcode
Id
());
addWechatGroup
(
groupQrcodeDTO
.
getClassifyId
(),
groupQrcodeDTO
.
getId
());
}
if
(
memberCount
>=
100
&&
QrcodeStatusEnum
.
ON_USE
.
value
.
equals
(
groupQrcodeDTO
.
getUseState
()))
{
//将二维码修改为已满群状态
...
...
@@ -221,11 +221,11 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
* 重新分配一个群
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
addWechatGroup
(
Long
classifyId
,
Long
weixin
QrcodeId
)
{
public
void
addWechatGroup
(
Long
classifyId
,
Long
group
QrcodeId
)
{
WeixinQrcodeDTO
oneQrcode
=
weixinQrcodeBiz
.
getOneQrcode
();
if
(
oneQrcode
!=
null
)
{
//将二维码改为已满群状态
Integer
number
=
groupQrcodeDao
.
changeQrcodeState
(
weixin
QrcodeId
,
QrcodeStatusEnum
.
OVER_NUMBER
.
value
);
Integer
number
=
groupQrcodeDao
.
changeQrcodeState
(
group
QrcodeId
,
QrcodeStatusEnum
.
OVER_NUMBER
.
value
);
if
(
number
>
0
){
//获取标签对应基本信息
GroupNameAndMaxSeqDTO
groupNameAndMaxSeqDTO
=
bookGroupClassifyBiz
.
getGroupNameAndMaxSeq
(
classifyId
);
...
...
@@ -243,8 +243,8 @@ public class GroupQrcodeBizImpl implements GroupQrcodeBiz {
groupQrcode
.
setGroupName
(
groupName
);
groupQrcode
.
setClassifyId
(
classifyId
);
this
.
insert
(
groupQrcode
);
String
robotId
=
wechatGroupConsr
.
getRobotIdByGroupId
(
oneQrcode
.
getWeixinGroupId
());
SendWeixinRequestTools
.
changeGroupName
(
robotId
,
oneQrcode
.
getWeixinGroupId
(),
groupName
);
//
String robotId = wechatGroupConsr.getRobotIdByGroupId(oneQrcode.getWeixinGroupId());
SendWeixinRequestTools
.
changeGroupName
(
oneQrcode
.
getRobotWxId
()
,
oneQrcode
.
getWeixinGroupId
(),
groupName
);
}
}
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/keywords/biz/impl/BookGuideBizImpl.java
View file @
55fea957
...
...
@@ -123,6 +123,16 @@ public class BookGuideBizImpl implements BookGuideBiz {
@ParamLog
(
"更新欢迎语"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
updateGuide
(
UpdateGuideVO
updateGuideVO
,
Long
partyId
)
{
List
<
ReplyMessageVO
>
replyMessages
=
updateGuideVO
.
getReplyMessages
();
if
(
ListUtils
.
isEmpty
(
replyMessages
))
{
//删除欢迎语回复
bookGuideReplyDao
.
deleteByGuideId
(
updateGuideVO
.
getId
());
//删除欢迎语
bookGuideDao
.
deleteById
(
updateGuideVO
.
getId
());
}
else
{
if
(
replyMessages
.
size
()
>
5
)
{
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
"入群欢迎语超出5个限制"
);
}
checkReplyParam
(
updateGuideVO
.
getReplyMessages
());
//获取欢迎语基本信息
BookGuide
bookGuideOld
=
bookGuideDao
.
getById
(
updateGuideVO
.
getId
());
...
...
@@ -137,6 +147,7 @@ public class BookGuideBizImpl implements BookGuideBiz {
List
<
BookGuideReply
>
bookGuideReplies
=
setToBookGuideReply
(
updateGuideVO
.
getReplyMessages
(),
bookGuide
.
getId
(),
partyId
,
bookGuideOld
.
getChannelId
());
bookGuideReplyDao
.
insert
(
bookGuideReplies
);
}
}
@Override
@ParamLog
(
"根据社群码获取欢迎语"
)
...
...
pcloud-service-book/src/main/resources/application.yml
View file @
55fea957
server
:
port
:
820
2
port
:
820
3
context-path
:
/book/v1.0/
eureka
:
...
...
pcloud-service-book/src/main/resources/mapper/keywords/BookGuide.Mapper.xml
View file @
55fea957
...
...
@@ -116,4 +116,9 @@
limit 1
</select>
<delete
id=
"deleteById"
parameterType=
"Long"
>
delete from book_guide
where id = #{_parameter,jdbcType=BIGINT}
</delete>
</mapper>
\ No newline at end of file
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