Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Litemall
Commits
0271ab4f
Commit
0271ab4f
authored
Aug 12, 2018
by
Menethil
Browse files
修复广告设置未启用仍显示BUG
parent
cc5a1c17
Changes
1
Hide whitespace changes
Inline
Side-by-side
litemall-db/src/main/java/org/linlinjava/litemall/db/service/LitemallAdService.java
View file @
0271ab4f
...
...
@@ -17,7 +17,7 @@ public class LitemallAdService {
public
List
<
LitemallAd
>
queryIndex
()
{
LitemallAdExample
example
=
new
LitemallAdExample
();
example
.
or
().
andPositionEqualTo
((
byte
)
1
).
andDeletedEqualTo
(
false
);
example
.
or
().
andPositionEqualTo
((
byte
)
1
).
andDeletedEqualTo
(
false
)
.
andEnabledEqualTo
(
true
)
;
return
adMapper
.
selectByExample
(
example
);
}
...
...
@@ -25,10 +25,10 @@ public class LitemallAdService {
LitemallAdExample
example
=
new
LitemallAdExample
();
LitemallAdExample
.
Criteria
criteria
=
example
.
createCriteria
();
if
(!
StringUtils
.
isEmpty
(
name
)){
if
(!
StringUtils
.
isEmpty
(
name
))
{
criteria
.
andNameLike
(
"%"
+
name
+
"%"
);
}
if
(!
StringUtils
.
isEmpty
(
content
)){
if
(!
StringUtils
.
isEmpty
(
content
))
{
criteria
.
andContentLike
(
"%"
+
content
+
"%"
);
}
criteria
.
andDeletedEqualTo
(
false
);
...
...
@@ -45,15 +45,15 @@ public class LitemallAdService {
LitemallAdExample
example
=
new
LitemallAdExample
();
LitemallAdExample
.
Criteria
criteria
=
example
.
createCriteria
();
if
(!
StringUtils
.
isEmpty
(
name
)){
if
(!
StringUtils
.
isEmpty
(
name
))
{
criteria
.
andNameLike
(
"%"
+
name
+
"%"
);
}
if
(!
StringUtils
.
isEmpty
(
content
)){
if
(!
StringUtils
.
isEmpty
(
content
))
{
criteria
.
andContentLike
(
"%"
+
content
+
"%"
);
}
criteria
.
andDeletedEqualTo
(
false
);
return
(
int
)
adMapper
.
countByExample
(
example
);
return
(
int
)
adMapper
.
countByExample
(
example
);
}
public
void
updateById
(
LitemallAd
ad
)
{
...
...
Write
Preview
Supports
Markdown
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