|
@ -609,7 +609,7 @@ public class DoctorInfoService extends BaseService {
|
|
|
return doctorDao.findAll(spec, pageRequest);
|
|
|
}
|
|
|
|
|
|
public Page<Doctor> findFamousDoctor(String key,Integer type, int page, int pageSize) {
|
|
|
public Page<Doctor> findFamousDoctor(String key,Integer type, int page, int pageSize,Integer level) {
|
|
|
if (pageSize <= 0) {
|
|
|
pageSize = 10;
|
|
|
}
|
|
@ -627,8 +627,9 @@ public class DoctorInfoService extends BaseService {
|
|
|
}
|
|
|
|
|
|
filters.put("isFamous", new SearchFilter("isFamous", SearchFilter.Operator.EQ, type));
|
|
|
filters.put("level", new SearchFilter("level", SearchFilter.Operator.EQ, 1));
|
|
|
|
|
|
if(level!=null&&level>0&&level<4){
|
|
|
filters.put("level", new SearchFilter("level", SearchFilter.Operator.EQ, level));
|
|
|
}
|
|
|
Specification<Doctor> spec = DynamicSpecifications.bySearchFilter(filters.values(), Doctor.class);
|
|
|
|
|
|
return doctorDao.findAll(spec, pageRequest);
|