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
39afffcf
Commit
39afffcf
authored
Mar 18, 2020
by
吴博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化接口
parent
d40fb232
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
28 deletions
+27
-28
SelfRobotKeywordBizImpl.java
...cloud/book/keywords/biz/impl/SelfRobotKeywordBizImpl.java
+22
-21
PcloudSkillBizImpl.java
...va/com/pcloud/book/skill/biz/impl/PcloudSkillBizImpl.java
+5
-7
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/keywords/biz/impl/SelfRobotKeywordBizImpl.java
View file @
39afffcf
...
@@ -157,7 +157,7 @@ public class SelfRobotKeywordBizImpl implements SelfRobotKeywordBiz {
...
@@ -157,7 +157,7 @@ public class SelfRobotKeywordBizImpl implements SelfRobotKeywordBiz {
@Autowired
@Autowired
private
PcloudSkillRecordDao
pcloudSkillRecordDao
;
private
PcloudSkillRecordDao
pcloudSkillRecordDao
;
private
static
final
ExecutorService
EXECUTOR_SERVICE
=
Executors
.
newFixedThreadPool
(
5
);
private
static
final
ExecutorService
EXECUTOR_SERVICE
=
Executors
.
newFixedThreadPool
(
2
);
...
@@ -764,31 +764,32 @@ wechatGroupConsr.sendMessage(JSON.toJSONString(sendFileVO));
...
@@ -764,31 +764,32 @@ wechatGroupConsr.sendMessage(JSON.toJSONString(sendFileVO));
if
(
null
!=
pcloudSkill
){
if
(
null
!=
pcloudSkill
){
skillFuseReply
=
pcloudSkill
.
getSkillFuseReply
();
skillFuseReply
=
pcloudSkill
.
getSkillFuseReply
();
}
}
final
Integer
finalState
=
state
;
if
(
SkillTypeEnum
.
TIME_MANAGE
.
value
==
type
){
EXECUTOR_SERVICE
.
execute
(()
->{
//读书计划 确认某个读书计划
if
(
SkillTypeEnum
.
TIME_MANAGE
.
value
==
type
){
if
(
null
==
state
){
//读书计划 确认某个读书计划
taskSubscribeBiz
.
subscribeTask
(
wxUserId
,
null
,
relSkillId
,
robotId
);
if
(
null
==
finalState
){
}
else
{
if
(
SubTypeEnum
.
SUCCESS
.
value
==
state
){
taskSubscribeBiz
.
subscribeTask
(
wxUserId
,
null
,
relSkillId
,
robotId
);
taskSubscribeBiz
.
subscribeTask
(
wxUserId
,
null
,
relSkillId
,
robotId
);
}
else
if
(
SubTypeEnum
.
CANCEL
.
value
==
state
){
}
else
{
taskSubscribeBiz
.
unSubscribeTask
(
wxUserId
,
null
,
relSkillId
);
if
(
SubTypeEnum
.
SUCCESS
.
value
==
finalState
){
taskSubscribeBiz
.
subscribeTask
(
wxUserId
,
null
,
relSkillId
,
robotId
);
}
else
if
(
SubTypeEnum
.
CANCEL
.
value
==
finalState
){
taskSubscribeBiz
.
unSubscribeTask
(
wxUserId
,
null
,
relSkillId
);
}
}
}
}
else
if
(
SkillTypeEnum
.
READING
.
value
==
type
){
pcloudGroupActivityBiz
.
processGroup
(
wxUserId
,
robotId
,
Long
.
valueOf
(
relSkillId
.
toString
()));
pcloudSkillBiz
.
sendResource
(
id
,
wxUserId
,
robotId
,
relSkillId
);
}
else
if
(
SkillTypeEnum
.
RESOURCE
.
value
==
type
){
pcloudSkillBiz
.
sendResource
(
id
,
wxUserId
,
robotId
,
relSkillId
);
}
}
}
else
if
(
SkillTypeEnum
.
READING
.
value
==
type
){
pcloudGroupActivityBiz
.
processGroup
(
wxUserId
,
robotId
,
Long
.
valueOf
(
relSkillId
.
toString
()));
pcloudSkillBiz
.
sendResource
(
id
,
wxUserId
,
robotId
,
relSkillId
);
}
else
if
(
SkillTypeEnum
.
RESOURCE
.
value
==
type
){
pcloudSkillBiz
.
sendResource
(
id
,
wxUserId
,
robotId
,
relSkillId
);
}
//修改pcloud_skill_record 状态值
//修改pcloud_skill_record 状态值
if
(
SkillTypeEnum
.
READING
.
value
==
type
||
SkillTypeEnum
.
RESOURCE
.
value
==
type
){
if
(
SkillTypeEnum
.
READING
.
value
==
type
||
SkillTypeEnum
.
RESOURCE
.
value
==
type
){
state
=
SubTypeEnum
.
SUCCESS
.
value
;
pcloudSkillRecordDao
.
updateState4ResourceAndActivity
(
wxUserId
,
robotId
,
id
,
SubTypeEnum
.
SUCCESS
.
value
);
pcloudSkillRecordDao
.
updateState4ResourceAndActivity
(
wxUserId
,
robotId
,
id
,
state
);
}
}
//修改pcloud_sub_remind 未订阅提醒表状态
//修改pcloud_sub_remind 未订阅提醒表状态
pcloudSubRemindBiz
.
updateSubState
(
relSkillId
,
type
,
wxUserId
,
id
);
pcloudSubRemindBiz
.
updateSubState
(
relSkillId
,
type
,
wxUserId
,
id
);
});
return
skillFuseReply
;
return
skillFuseReply
;
}
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/skill/biz/impl/PcloudSkillBizImpl.java
View file @
39afffcf
...
@@ -305,13 +305,11 @@ public class PcloudSkillBizImpl implements PcloudSkillBiz {
...
@@ -305,13 +305,11 @@ public class PcloudSkillBizImpl implements PcloudSkillBiz {
if
(
skill
==
null
)
{
if
(
skill
==
null
)
{
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
"技能不存在,订阅失败!"
);
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
"技能不存在,订阅失败!"
);
}
}
ThreadPoolUtils
.
OTHER_THREAD_POOL
.
execute
(()
->
{
// 发送订阅回复信息
// 发送订阅回复信息
List
<
PcloudSubReply
>
replyList
=
pcloudSubReplyDao
.
getListByPcloudSkillId
(
skill
.
getId
());
List
<
PcloudSubReply
>
replyList
=
pcloudSubReplyDao
.
getListByPcloudSkillId
(
skill
.
getId
());
List
<
PcloudSubReply
>
subReplyList
;
List
<
PcloudSubReply
>
subReplyList
;
subReplyList
=
replyList
.
stream
().
filter
(
s
->
SubTypeEnum
.
SUCCESS
.
value
.
equals
(
s
.
getSubType
())).
collect
(
Collectors
.
toList
());
subReplyList
=
replyList
.
stream
().
filter
(
s
->
SubTypeEnum
.
SUCCESS
.
value
.
equals
(
s
.
getSubType
())).
collect
(
Collectors
.
toList
());
this
.
sendSubReplyMessage
(
subReplyList
,
robotId
,
wxUserId
);
this
.
sendSubReplyMessage
(
subReplyList
,
robotId
,
wxUserId
);
});
}
}
@Override
@Override
...
...
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