|
@ -96,7 +96,7 @@ public class HealthEduArticlePatientService extends BaseService {
|
|
* @param pagesize 分页大小
|
|
* @param pagesize 分页大小
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
public List<HealthEduArticlePatient> findByPatient(String patient,int wheaType, long id, int pagesize) {
|
|
|
|
|
|
public List<HealthEduArticlePatient> findByPatient(String patient,int wheaType, int pageIndex, int pagesize) {
|
|
if (pagesize <= 0) {
|
|
if (pagesize <= 0) {
|
|
pagesize = 10;
|
|
pagesize = 10;
|
|
}
|
|
}
|
|
@ -120,17 +120,11 @@ public class HealthEduArticlePatientService extends BaseService {
|
|
" a.article = b.code" +
|
|
" a.article = b.code" +
|
|
" and ( a.send_type =1 or a.send_type is null or a.send_type = '') "+ //添加类型判断是集美的推送还是三师原来的推送
|
|
" and ( a.send_type =1 or a.send_type is null or a.send_type = '') "+ //添加类型判断是集美的推送还是三师原来的推送
|
|
" and a.patient = ?" +
|
|
" and a.patient = ?" +
|
|
(id > 0 ? " and a.id < ? " : "") +
|
|
|
|
(wheaType > 0 ? " and a.wheaType = ? " : "") +
|
|
(wheaType > 0 ? " and a.wheaType = ? " : "") +
|
|
" order by a.id desc limit 0," + pagesize;
|
|
|
|
|
|
" order by a.id desc limit "+pageIndex+"," + pagesize;
|
|
Object params[] = null;
|
|
Object params[] = null;
|
|
if(wheaType>-1&&id>0){
|
|
|
|
params = new Object[]{patient,id,wheaType};
|
|
|
|
}else if(wheaType>-1&&id<0){
|
|
|
|
|
|
if(wheaType>-1){
|
|
params = new Object[]{patient,wheaType};
|
|
params = new Object[]{patient,wheaType};
|
|
}
|
|
|
|
else if(wheaType<0&&id>0){
|
|
|
|
params = new Object[]{patient,id};
|
|
|
|
}else{
|
|
}else{
|
|
params = new Object[]{patient};
|
|
params = new Object[]{patient};
|
|
}
|
|
}
|