|
@@ -113,10 +113,12 @@ public class StudentController extends ControllerSupport {
|
|
|
}
|
|
|
if (null != hasPhoto) {
|
|
|
Boolean hasPhotoBoolean = hasPhoto.getBoolean();
|
|
|
- if (hasPhotoBoolean) {
|
|
|
- predicates.add(cb.isNotEmpty(root.get("photoPath")));
|
|
|
- } else {
|
|
|
- predicates.add(cb.isEmpty(root.get("photoPath")));
|
|
|
+ if (null != hasPhotoBoolean) {
|
|
|
+ if (hasPhotoBoolean) {
|
|
|
+ predicates.add(cb.isNotNull(root.get("photoPath")));
|
|
|
+ } else {
|
|
|
+ predicates.add(cb.isNull(root.get("photoPath")));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
return cb.and(predicates.toArray(new Predicate[predicates.size()]));
|