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
0b5cfbef
Commit
0b5cfbef
authored
Feb 07, 2020
by
阮思源
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'revert-
b8f268e0
' into 'master'
Revert "正向模糊匹配" See merge request rays/pcloud-book!362
parents
7662d10f
a55a3991
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
32 deletions
+7
-32
BookKeywordBizImpl.java
...com/pcloud/book/keywords/biz/impl/BookKeywordBizImpl.java
+3
-5
SelfRobotKeywordDao.java
...ava/com/pcloud/book/keywords/dao/SelfRobotKeywordDao.java
+0
-8
SelfRobotKeywordDaoImpl.java
...cloud/book/keywords/dao/impl/SelfRobotKeywordDaoImpl.java
+0
-8
ReadingActivityBizImpl.java
.../pcloud/book/reading/biz/impl/ReadingActivityBizImpl.java
+3
-3
SelfRobotKeyword.xml
...book/src/main/resources/mapper/group/SelfRobotKeyword.xml
+1
-8
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/keywords/biz/impl/BookKeywordBizImpl.java
View file @
0b5cfbef
...
...
@@ -625,11 +625,9 @@ public class BookKeywordBizImpl implements BookKeywordBiz {
if
(
bookGroupCipherUser
==
null
||
StringUtil
.
isEmpty
(
bookGroupCipherUser
.
getShortBookName
()))
{
return
;
}
List
<
SelfRobotKeyword
>
keywordList
=
selfRobotKeywordDao
.
getListByBookGroupIdAndKeyword
(
bookGroupCipherUser
.
getBookGroupId
(),
content
);
if
(!
ListUtils
.
isEmpty
(
keywordList
))
{
for
(
SelfRobotKeyword
selfRobotKeyword
:
keywordList
){
sendSelfKeyword
(
selfRobotKeyword
,
sendTextDTO
);
}
SelfRobotKeyword
selfRobotKeyword
=
selfRobotKeywordDao
.
getByBookGroupIdAndKeyword
(
bookGroupCipherUser
.
getBookGroupId
(),
content
);
if
(
selfRobotKeyword
!=
null
)
{
sendSelfKeyword
(
selfRobotKeyword
,
sendTextDTO
);
//临时,后面要删
String
robotId
=
sendTextDTO
.
getWxId
();
if
(
"一对一"
.
equals
(
content
)){
...
...
pcloud-service-book/src/main/java/com/pcloud/book/keywords/dao/SelfRobotKeywordDao.java
View file @
0b5cfbef
...
...
@@ -33,12 +33,4 @@ public interface SelfRobotKeywordDao extends BaseDao<SelfRobotKeyword> {
SelfRobotKeyword
getNextKeyWord
(
Long
bookGroupId
,
String
keyword
);
List
<
SelfRobotKeyword
>
getListByBookGroupIds
(
List
<
Long
>
bookGroupIds
);
/**
* 模糊匹配
* @param bookGroupId
* @param content
* @return
*/
List
<
SelfRobotKeyword
>
getListByBookGroupIdAndKeyword
(
Long
bookGroupId
,
String
content
);
}
pcloud-service-book/src/main/java/com/pcloud/book/keywords/dao/impl/SelfRobotKeywordDaoImpl.java
View file @
0b5cfbef
...
...
@@ -92,12 +92,4 @@ public class SelfRobotKeywordDaoImpl extends BaseDaoImpl<SelfRobotKeyword> imple
map
.
put
(
"bookGroupIds"
,
bookGroupIds
);
return
this
.
getSqlSession
().
selectList
(
this
.
getStatement
(
"getListByBookGroupIds"
),
map
);
}
@Override
public
List
<
SelfRobotKeyword
>
getListByBookGroupIdAndKeyword
(
Long
bookGroupId
,
String
keyword
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"bookGroupId"
,
bookGroupId
);
map
.
put
(
"keyword"
,
keyword
);
return
getSessionTemplate
().
selectList
(
getStatement
(
"getListByBookGroupIdAndKeyword"
),
map
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/reading/biz/impl/ReadingActivityBizImpl.java
View file @
0b5cfbef
...
...
@@ -474,7 +474,7 @@ public class ReadingActivityBizImpl implements ReadingActivityBiz{
if
(
ListUtils
.
isEmpty
(
robotIdList
)
||
robotIdList
.
size
()<
3
){
log
.
info
(
"小号数量小于3个,取其他号补充"
);
Integer
need
=
3
-
robotIdList
.
size
();
//所需数量
/*
if ("pro".equalsIgnoreCase(envStr)){
if
(
"pro"
.
equalsIgnoreCase
(
envStr
)){
List
<
String
>
altIds
=
wechatGroupConsr
.
getSelfRobotByRobotType
(
null
);
altIds
.
removeAll
(
robotIdList
);
if
(
need
==
1
)
{
...
...
@@ -483,7 +483,7 @@ public class ReadingActivityBizImpl implements ReadingActivityBiz{
robotIdList
.
add
(
altIds
.
get
(
0
));
robotIdList
.
add
(
altIds
.
get
(
1
));
}
}else {
*/
}
else
{
String
alt1
=
"wxid_lw4vjnxjg45d22"
;
//zyj
String
alt2
=
"p867263500"
;
//dawei
if
(
need
==
1
){
...
...
@@ -492,7 +492,7 @@ public class ReadingActivityBizImpl implements ReadingActivityBiz{
robotIdList
.
add
(
alt1
);
robotIdList
.
add
(
alt2
);
}
//
}
}
}
Integer
groupCount
=
(
userList
.
size
()+
robotIdList
.
size
())/
500
+
1
;
//每个群最多人数
for
(
int
i
=
1
;
i
<=
groupCount
;
i
++){
...
...
pcloud-service-book/src/main/resources/mapper/group/SelfRobotKeyword.xml
View file @
0b5cfbef
...
...
@@ -114,17 +114,10 @@
select
<include
refid=
"Base_Column_List"
/>
from self_robot_keyword
where book_group_id=#{bookGroupId}
and keyword
=
#{keyword}
and keyword
=
#{keyword}
limit 1
</select>
<select
id=
"getListByBookGroupIdAndKeyword"
parameterType=
"map"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from self_robot_keyword
where book_group_id=#{bookGroupId}
and keyword like concat('%', #{keyword}, '%')
</select>
<!--根据社群码id获取数量-->
<select
id=
"getCountByBookGroupId"
parameterType=
"map"
resultType=
"integer"
>
select count(1)
...
...
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