Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
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
项目统一框架
amos-boot-biz
Commits
a8a266a6
Commit
a8a266a6
authored
Jul 11, 2022
by
wujiang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://39.98.45.134:8090/moa/amos-boot-biz
into developer
parents
9653642d
91e833ee
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
51 additions
and
28 deletions
+51
-28
SqlStatement.java
...eejoin/amos/knowledgebase/face/util/sql/SqlStatement.java
+26
-13
DocLibraryService.java
...in/amos/knowledgebase/face/service/DocLibraryService.java
+6
-6
ESDocService.java
...yeejoin/amos/knowledgebase/face/service/ESDocService.java
+8
-7
dbTemplate_plan_task.xml
...ion/src/main/resources/db/mapper/dbTemplate_plan_task.xml
+3
-1
pom.xml
amos-boot-utils/amos-boot-utils-jpush/pom.xml
+8
-1
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-knowledgebase-api/src/main/java/com/yeejoin/amos/knowledgebase/face/util/sql/SqlStatement.java
View file @
a8a266a6
...
...
@@ -39,6 +39,7 @@ class SqlStatement extends BaseSqlCondition {
private
static
final
Map
<
String
,
String
[]>
valueTagFieldSqlMap
;
private
static
final
Pattern
numberPattern
=
Pattern
.
compile
(
"^[-\\+]?[\\d]+[.]?[\\d]*$"
);
private
static
final
Pattern
datePattern
=
Pattern
.
compile
(
"^[\\d]{4}-[\\d]{2}-[\\d]{2} [\\d]{2}:[\\d]{2}:[\\d]{2}$"
);
private
static
final
Pattern
datePattern13
=
Pattern
.
compile
(
"^[\\d]{4}/[\\d]{2}/[\\d]{2} [\\d]{2}:[\\d]{2}$"
);
/**
* 字段类型
...
...
@@ -102,35 +103,47 @@ class SqlStatement extends BaseSqlCondition {
}
boolean
emptyVal
=
ValidationUtil
.
isEmpty
(
values
);
if
(
fieldType
!=
FieldType
.
textTag
)
{
switch
(
valueType
)
{
String
val1
=
values
.
get
(
0
);
String
val2
=
""
;
switch
(
valueType
)
{
case
text:
//格式化
if
(!
emptyVal
&&
!
ValidationUtil
.
isEmpty
(
val
ues
.
get
(
0
)
))
{
values
.
add
(
0
,
stringParamFormat
(
val
ues
.
get
(
0
)
));
if
(!
emptyVal
&&
!
ValidationUtil
.
isEmpty
(
val
1
))
{
values
.
add
(
0
,
stringParamFormat
(
val
1
));
values
.
remove
(
1
);
}
break
;
case
date:
// 校验并格式化
if
(!
emptyVal
&&
!
ValidationUtil
.
isEmpty
((
values
.
get
(
0
))))
{
paramValidate
(
datePattern
,
values
.
get
(
0
));
values
.
add
(
0
,
stringParamFormat
(
values
.
get
(
0
)));
if
(!
emptyVal
&&
!
ValidationUtil
.
isEmpty
(
val1
))
{
if
(
val1
.
contains
(
"/"
)
&&
val1
.
length
()
==
16
)
{
paramValidate
(
datePattern13
,
val1
);
}
else
{
paramValidate
(
datePattern
,
val1
);
}
values
.
add
(
0
,
stringParamFormat
(
val1
));
values
.
remove
(
1
);
}
if
(!
emptyVal
&&
values
.
size
()
>
1
&&
!
ValidationUtil
.
isEmpty
((
values
.
get
(
1
))))
{
paramValidate
(
datePattern
,
values
.
get
(
1
));
values
.
add
(
1
,
stringParamFormat
(
values
.
get
(
1
)));
val2
=
values
.
get
(
1
);
if
(!
emptyVal
&&
!
ValidationUtil
.
isEmpty
(
val2
))
{
if
(
val2
.
contains
(
"/"
)
&&
val1
.
length
()
==
16
)
{
paramValidate
(
datePattern13
,
val2
);
}
else
{
paramValidate
(
datePattern
,
val2
);
}
values
.
add
(
1
,
stringParamFormat
(
val2
));
values
.
remove
(
2
);
}
break
;
case
range:
case
single:
// 校验
if
(!
emptyVal
&&
!
ValidationUtil
.
isEmpty
(
(
values
.
get
(
0
))
))
{
paramValidate
(
numberPattern
,
val
ues
.
get
(
0
)
);
if
(!
emptyVal
&&
!
ValidationUtil
.
isEmpty
(
val1
))
{
paramValidate
(
numberPattern
,
val
1
);
}
if
(!
emptyVal
&&
values
.
size
()
>
1
&&
!
ValidationUtil
.
isEmpty
((
values
.
get
(
1
))))
{
paramValidate
(
numberPattern
,
values
.
get
(
1
));
val2
=
values
.
get
(
1
);
if
(!
emptyVal
&&
!
ValidationUtil
.
isEmpty
(
val2
))
{
paramValidate
(
numberPattern
,
val2
);
}
break
;
default
:
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-knowledgebase-biz/src/main/java/com/yeejoin/amos/knowledgebase/face/service/DocLibraryService.java
View file @
a8a266a6
...
...
@@ -310,13 +310,13 @@ public class DocLibraryService {
List
<
ESDocEntity
>
esList
=
new
ArrayList
<>();
iPage
.
getRecords
().
forEach
(
doc
->
{
ESDocEntity
esDocEntity
=
esDocService
.
queryById
(
doc
.
getSequenceNbr
());
if
(
ValidationUtil
.
isEmpty
(
esDocEntity
))
{
throw
new
BadRequest
(
"ES库数据丢失,请联系管理员协助解决"
);
if
(!
ValidationUtil
.
isEmpty
(
esDocEntity
))
{
// throw new BadRequest("ES库数据丢失,请联系管理员协助解决");
Set
<
String
>
involvedTagIds
=
sqlCondition
.
getTagSeqs
();
deleteRepeatedTags
(
esDocEntity
.
getDocTags
(),
involvedTagIds
);
deleteRepeatedTags
(
esDocEntity
.
getContentTags
(),
involvedTagIds
);
esList
.
add
(
esDocEntity
);
}
Set
<
String
>
involvedTagIds
=
sqlCondition
.
getTagSeqs
();
deleteRepeatedTags
(
esDocEntity
.
getDocTags
(),
involvedTagIds
);
deleteRepeatedTags
(
esDocEntity
.
getContentTags
(),
involvedTagIds
);
esList
.
add
(
esDocEntity
);
});
fillDirectoryName
(
esList
);
return
page
.
setRecords
(
esList
).
setCurrent
(
iPage
.
getCurrent
()).
setSize
(
iPage
.
getSize
()).
setTotal
(
iPage
.
getTotal
());
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-knowledgebase-biz/src/main/java/com/yeejoin/amos/knowledgebase/face/service/ESDocService.java
View file @
a8a266a6
...
...
@@ -96,8 +96,9 @@ public class ESDocService {
}
catch
(
Exception
e
)
{
return
new
AggregatedPageImpl
<>(
list
,
PageRequest
.
of
(
current
,
size
),
0
);
e
.
printStackTrace
(
);
}
return
new
AggregatedPageImpl
<>(
list
,
PageRequest
.
of
(
current
,
size
),
0
);
}
/**
...
...
@@ -129,12 +130,12 @@ public class ESDocService {
for
(
String
key
:
keys
)
{
boolMust
.
must
(
QueryBuilders
.
boolQuery
().
minimumShouldMatch
(
1
)
.
should
(
QueryBuilders
.
matchQuery
(
"docTitle"
,
key
))
.
should
(
QueryBuilders
.
matchQuery
(
"docInfo"
,
key
))
.
should
(
QueryBuilders
.
matchQuery
(
"author"
,
key
))
.
should
(
QueryBuilders
.
matchQuery
(
"textContent"
,
key
))
.
should
(
QueryBuilders
.
matchQuery
(
"docTags.tagInfo"
,
key
))
.
should
(
QueryBuilders
.
matchQuery
(
"contentTags.tagInfo"
,
key
))
.
should
(
QueryBuilders
.
match
Phrase
Query
(
"docTitle"
,
key
))
.
should
(
QueryBuilders
.
match
Phrase
Query
(
"docInfo"
,
key
))
.
should
(
QueryBuilders
.
match
Phrase
Query
(
"author"
,
key
))
.
should
(
QueryBuilders
.
match
Phrase
Query
(
"textContent"
,
key
))
.
should
(
QueryBuilders
.
match
Phrase
Query
(
"docTags.tagInfo"
,
key
))
.
should
(
QueryBuilders
.
match
Phrase
Query
(
"contentTags.tagInfo"
,
key
))
);
}
// 创建查询构造器
...
...
amos-boot-system-supervision/src/main/resources/db/mapper/dbTemplate_plan_task.xml
View file @
a8a266a6
...
...
@@ -405,7 +405,9 @@
<if
test=
"companyId != null and companyId != ''"
>
and ppn.original_id = #{companyId}
</if>
<if
test=
"taskType != null and taskType != ''"
>
and ppn.check_type_id = #{taskType}
</if>
<if
test=
"planTaskId != null and planTaskId > 0 "
>
and ptd.task_no = #{planTaskId}
</if>
<if
test=
"orderBy != null and orderBy != ''"
>
order by ${orderBy}
</if>
<!-- <if test="orderBy != null and orderBy != ''">order by ${orderBy}</if>-->
order by p.id
<if
test=
"offset != null and pageSize != null"
>
limit #{offset},#{pageSize}
</if>
...
...
amos-boot-utils/amos-boot-utils-jpush/pom.xml
View file @
a8a266a6
...
...
@@ -22,5 +22,12 @@
<artifactId>
jpush-client
</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
</plugin>
</plugins>
</build>
</project>
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