Commit 8c7d0d35 by 阳浪

投稿三级分类

parent 5a6a911b
...@@ -117,13 +117,13 @@ public class PublicationServiceImpl extends ServiceImpl<PublicationMapper, Publi ...@@ -117,13 +117,13 @@ public class PublicationServiceImpl extends ServiceImpl<PublicationMapper, Publi
} }
if (list.size() > 0 && list != null) { if (list.size() > 0 && list != null) {
for (Publication info : list) { for (Publication info : list) {
if (info.getTypeOne() != null || info.getTypeOne() != 0) { if (info.getTypeOne() != null && info.getTypeOne() != 0) {
info.setTypeOneName(findNameById(info.getTypeOne())); info.setTypeOneName(findNameById(info.getTypeOne()));
} }
if (info.getTypeTwo() != null || info.getTypeTwo() != 0) { if (info.getTypeTwo() != null && info.getTypeTwo() != 0) {
info.setTypeTwoName(findNameById(info.getTypeTwo())); info.setTypeTwoName(findNameById(info.getTypeTwo()));
} }
if (info.getTypeThree() != null || info.getTypeThree() != 0) { if (info.getTypeThree() != null && info.getTypeThree() != 0) {
info.setTypeThreeName(findNameById(info.getTypeThree())); info.setTypeThreeName(findNameById(info.getTypeThree()));
} }
} }
...@@ -222,13 +222,13 @@ public class PublicationServiceImpl extends ServiceImpl<PublicationMapper, Publi ...@@ -222,13 +222,13 @@ public class PublicationServiceImpl extends ServiceImpl<PublicationMapper, Publi
if (info == null) { if (info == null) {
return null; return null;
} }
if (info.getTypeOne() != null || info.getTypeOne() != 0) { if (info.getTypeOne() != null && info.getTypeOne() != 0) {
info.setTypeOneName(findNameById(info.getTypeOne())); info.setTypeOneName(findNameById(info.getTypeOne()));
} }
if (info.getTypeTwo() != null || info.getTypeTwo() != 0) { if (info.getTypeTwo() != null && info.getTypeTwo() != 0) {
info.setTypeTwoName(findNameById(info.getTypeTwo())); info.setTypeTwoName(findNameById(info.getTypeTwo()));
} }
if (info.getTypeThree() != null || info.getTypeThree() != 0) { if (info.getTypeThree() != null && info.getTypeThree() != 0) {
info.setTypeThreeName(findNameById(info.getTypeThree())); info.setTypeThreeName(findNameById(info.getTypeThree()));
} }
...@@ -434,13 +434,13 @@ public class PublicationServiceImpl extends ServiceImpl<PublicationMapper, Publi ...@@ -434,13 +434,13 @@ public class PublicationServiceImpl extends ServiceImpl<PublicationMapper, Publi
if (list.size() > 0 && list != null) { if (list.size() > 0 && list != null) {
for (Publication info : list) { for (Publication info : list) {
if (info.getTypeOne() != null || info.getTypeOne() != 0) { if (info.getTypeOne() != null && info.getTypeOne() != 0) {
info.setTypeOneName(findNameById(info.getTypeOne())); info.setTypeOneName(findNameById(info.getTypeOne()));
} }
if (info.getTypeTwo() != null || info.getTypeTwo() != 0) { if (info.getTypeTwo() != null && info.getTypeTwo() != 0) {
info.setTypeTwoName(findNameById(info.getTypeTwo())); info.setTypeTwoName(findNameById(info.getTypeTwo()));
} }
if (info.getTypeThree() != null || info.getTypeThree() != 0) { if (info.getTypeThree() != null && info.getTypeThree() != 0) {
info.setTypeThreeName(findNameById(info.getTypeThree())); info.setTypeThreeName(findNameById(info.getTypeThree()));
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment