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
e1c705fa
Commit
e1c705fa
authored
Aug 06, 2019
by
阮思源
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
个人二维码
parent
0e6fe017
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
6 deletions
+32
-6
WechatGroupConsr.java
...om/pcloud/book/consumer/wechatgroup/WechatGroupConsr.java
+15
-0
BookGroupBizImpl.java
...java/com/pcloud/book/group/biz/impl/BookGroupBizImpl.java
+17
-6
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/consumer/wechatgroup/WechatGroupConsr.java
View file @
e1c705fa
...
...
@@ -14,6 +14,8 @@ import com.pcloud.wechatgroup.message.dto.GroupChatCountDTO;
import
com.pcloud.wechatgroup.message.service.MessageService
;
import
com.pcloud.wechatgroup.monitor.service.MonitorService
;
import
com.pcloud.wechatgroup.selfrobot.dto.SelfRobotDTO
;
import
com.pcloud.wechatgroup.selfrobot.service.SelfRobotService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
...
...
@@ -35,6 +37,8 @@ public class WechatGroupConsr {
private
MessageService
messageService
;
@Autowired
private
MonitorService
monitorService
;
@Autowired
private
SelfRobotService
selfRobotService
;
/**
* 是否黑名单
...
...
@@ -267,4 +271,15 @@ public class WechatGroupConsr {
}
return
map
;
}
@ParamLog
(
value
=
"获取可用机器人"
)
public
SelfRobotDTO
getAvailableRobot
(
Long
wechatUserId
,
Integer
largeTemplet
,
Long
classifyId
)
{
SelfRobotDTO
selfRobotDTO
=
null
;
try
{
selfRobotDTO
=
ResponseHandleUtil
.
parseResponse
(
selfRobotService
.
getAvailableRobot
(
wechatUserId
,
largeTemplet
,
classifyId
),
SelfRobotDTO
.
class
);
}
catch
(
Exception
e
)
{
log
.
error
(
"获取可用机器人.[getAvailableRobot]:"
+
e
.
getMessage
(),
e
);
}
return
selfRobotDTO
;
}
}
pcloud-service-book/src/main/java/com/pcloud/book/group/biz/impl/BookGroupBizImpl.java
View file @
e1c705fa
...
...
@@ -18,6 +18,7 @@ import com.pcloud.book.consumer.resource.ProductConsr;
import
com.pcloud.book.consumer.settlement.SettlementConsr
;
import
com.pcloud.book.consumer.trade.TradeConsr
;
import
com.pcloud.book.consumer.user.AdviserConsr
;
import
com.pcloud.book.consumer.wechatgroup.WechatGroupConsr
;
import
com.pcloud.book.group.biz.BookGroupBiz
;
import
com.pcloud.book.group.biz.BookGroupClassifyBiz
;
import
com.pcloud.book.group.dao.*
;
...
...
@@ -67,6 +68,7 @@ import com.pcloud.settlementcenter.record.service.SettlementService;
import
com.pcloud.videolesson.schedule.service.ScheduleService
;
import
com.pcloud.wechatgroup.group.service.GroupMemberService
;
import
com.pcloud.wechatgroup.selfrobot.dto.SelfRobotDTO
;
import
org.apache.commons.collections.MapUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -154,6 +156,8 @@ public class BookGroupBizImpl implements BookGroupBiz {
private
TempletRelevanceDao
templetRelevanceDao
;
@Autowired
private
JoinGroupCipherDao
joinGroupCipherDao
;
@Autowired
private
WechatGroupConsr
wechatGroupConsr
;
@Override
...
...
@@ -1058,9 +1062,11 @@ public class BookGroupBizImpl implements BookGroupBiz {
return
bookGroupDao
.
getIsShowBookName
(
partyId
);
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@ParamLog
(
"根据分类id获取个人二维码信息"
)
@Override
public
OwnAltQrcodeInfoDTO
getOwnAltQrcodeInfoDTOByClassifyId
(
Long
wechatUserId
,
Long
classifyId
)
{
OwnAltQrcodeInfoDTO
ownAltQrcodeInfoDTO
=
new
OwnAltQrcodeInfoDTO
();
//根据分类id查询社群码信息
ClassifyDTO
classifyDTO
=
bookGroupClassifyDao
.
getById
(
classifyId
);
if
(
classifyDTO
==
null
)
{
...
...
@@ -1077,10 +1083,18 @@ public class BookGroupBizImpl implements BookGroupBiz {
TempletRelevance
templetRelevance
=
templetRelevanceDao
.
getByTempletId
(
templetId
);
LOGGER
.
info
(
"根据分类id获取大类templetRelevance"
+
templetRelevance
.
toString
());
Integer
largeTemplet
=
templetRelevance
.
getLargeTemplet
();
//TODO 调内部接口获取分配的小号信息
SelfRobotDTO
selfRobotDTO
=
wechatGroupConsr
.
getAvailableRobot
(
wechatUserId
,
largeTemplet
,
classifyId
);
if
(
selfRobotDTO
==
null
)
{
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_ERROR
,
"未找到机器人!"
);
}
ownAltQrcodeInfoDTO
.
setAltHeadUrl
(
selfRobotDTO
.
getHeadPic
());
ownAltQrcodeInfoDTO
.
setAltId
(
selfRobotDTO
.
getWxId
());
ownAltQrcodeInfoDTO
.
setAltNickName
(
selfRobotDTO
.
getNickName
());
ownAltQrcodeInfoDTO
.
setAltQrcodeUrl
(
selfRobotDTO
.
getQrcodeUrl
());
ownAltQrcodeInfoDTO
.
setAltHeadUrl
(
selfRobotDTO
.
getHeadPic
());
//获取之前是否有没有使用的暗号
JoinGroupCipher
joinGroupCipher
=
joinGroupCipherDao
.
getByCreateUser
(
wechatUserId
,
classifyId
);
String
cipher
=
""
;
String
cipher
;
if
(
joinGroupCipher
!=
null
)
{
cipher
=
joinGroupCipher
.
getCipher
();
}
else
{
...
...
@@ -1092,11 +1106,7 @@ public class BookGroupBizImpl implements BookGroupBiz {
joinGroupCipherNew
.
setClassifyId
(
classifyId
);
joinGroupCipherDao
.
insert
(
joinGroupCipherNew
);
}
OwnAltQrcodeInfoDTO
ownAltQrcodeInfoDTO
=
new
OwnAltQrcodeInfoDTO
();
ownAltQrcodeInfoDTO
.
setCipher
(
cipher
);
//TODO 填充小号信息等
return
ownAltQrcodeInfoDTO
;
}
...
...
@@ -1121,6 +1131,7 @@ public class BookGroupBizImpl implements BookGroupBiz {
return
state
;
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@ParamLog
(
"获取暗号状态为已使用"
)
@Override
public
void
updateCipherStateToUsed
(
String
cipher
,
String
wxId
)
{
...
...
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