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