浏览代码

咨询页面我的咨询和收到回复两个接口返回值增加专家基础信息和是否存在专家头像。

zzy.zhiyuan.foxmail 8 年之前
父节点
当前提交
a6414b79b9

+ 368 - 6
src/main/java/com/ekexiu/portal/dao/ConsultDao.java

@ -9,6 +9,7 @@ import java.util.ArrayList;
9 9
import java.util.Collections;
10 10
import java.util.List;
11 11

12
import org.jfw.apt.annotation.Autowrie;
12 13
import org.jfw.apt.annotation.Nullable;
13 14
import org.jfw.apt.orm.annotation.dao.DAO;
14 15
import org.jfw.apt.orm.annotation.dao.method.operator.Insert;
@ -20,6 +21,17 @@ import com.ekexiu.portal.pojo.EditProfessor;
20 21

21 22
@DAO
22 23
public abstract class ConsultDao {
24
	@Autowrie
25
	private ProfessorDao professorDao;
26
	
27
	public ProfessorDao getProfessorDao() {
28
		return professorDao;
29
	}
30

31
	public void setProfessorDao(ProfessorDao professorDao) {
32
		this.professorDao = professorDao;
33
	}
34

23 35
	@Insert
24 36
	public abstract int insert(Connection con, Consult consult) throws SQLException;
25 37
	
@ -367,6 +379,182 @@ public abstract class ConsultDao {
367 379
        }
368 380
    }	
369 381
	
382
	public PageQueryResult<Consult> queryPageProBase(Connection con, String professorId, int status, int timeType, int sortType, int pageSize, int pageNo) throws SQLException{
383
		PageQueryResult<Consult> queryResult = new PageQueryResult<Consult>();
384
		StringBuilder sql = new StringBuilder();
385
		sql.append(" WHERE PROFESSOR_ID = ? ");
386
		if(1 == status) {
387
			sql.append(" AND CONSULT_STATUS = 0 ");
388
		}else if(2 == status) {
389
			sql.append(" AND CONSULT_STATUS = 1 AND THANKS_STATUS = 0 ");
390
		}else if(3 == status) {
391
			sql.append(" AND CONSULT_STATUS = 1 AND ASSESS_STATUS = 0 ");
392
		}else if(4 == status) {
393
			sql.append(" AND CONSULT_STATUS = 1 ");
394
		}
395
		StringBuilder whereSql = sql;
396
		sql = new StringBuilder();
397
		sql.append("SELECT COUNT(1) FROM CONSULT");
398
		if (whereSql.length() > 0) {
399
			sql.append(whereSql);
400
		}
401
		PreparedStatement ps = con.prepareStatement(sql.toString());
402
		int paramIndex = 1;
403
		int totalSize = 0;
404
		try {
405
			ps.setString(paramIndex++, professorId);
406
			queryResult.setPageSize(pageSize);
407
			ResultSet resultSet = ps.executeQuery();
408
			try {
409
				resultSet.next();
410
				totalSize = resultSet.getInt(1);
411
			} finally {
412
				try {
413
					resultSet.close();
414
				} catch (Exception _m_6) {
415
				}
416
			}
417
		} finally {
418
			try {
419
				ps.close();
420
			} catch (Exception _m_7) {
421
			}
422
		}
423
		queryResult.setTotal(totalSize);
424
		if (0 == totalSize) {
425
			queryResult.setPageNo(1);
426
			queryResult.setData(Collections.<Consult> emptyList());
427
			return queryResult;
428
		}
429
		paramIndex = 1;
430
		if (1 == pageNo) {
431
			queryResult.setPageNo(1);
432
			sql = new StringBuilder();
433
			sql.append(" SELECT CONSULT_ID,CONSULT_TYPE,CONSULT_TITLE,CONSULT_CONTANT,PROFESSOR_ID,CONSULTANT_ID,"
434
					+ " CONSULT_STATUS,FINISH_TIME,ASSESS_STATUS,ASSESS_STAR,ASSESS_CONTANT,ASSESS_TIME,THANKS_STATUS,"
435
					+ " THANKS_MONEY,THANKS_TIME,REVOVERY_TIME,READ_STATUS,CREATE_TIME FROM CONSULT ");
436
			if (whereSql.length() > 0) {
437
				sql.append(whereSql);
438
			}
439
			if(0 == timeType) {
440
				sql.append(" ORDER BY CREATE_TIME ");
441
			}else if(1 == timeType) {
442
				sql.append(" ORDER BY REVOVERY_TIME ");
443
			}else if(2 == timeType) {
444
				sql.append(" ORDER BY FINISH_TIME ");
445
			}
446
			if(0 == sortType) {
447
				sql.append(" DESC ");
448
			}
449
			sql.append(" LIMIT ").append(pageSize);
450
		} else {
451
			int _pageSize = totalSize / pageSize;
452
			if (totalSize % pageSize != 0) {
453
				++_pageSize;
454
			}
455
			if (pageNo > _pageSize) {
456
				pageNo = _pageSize;
457
			}
458
			queryResult.setPageNo(pageNo);
459
			--pageNo;
460
			int _m_10 = (pageNo * pageSize);
461
			sql = new StringBuilder();
462
			sql.append(" SELECT CONSULT_ID,CONSULT_TYPE,CONSULT_TITLE,CONSULT_CONTANT,PROFESSOR_ID,CONSULTANT_ID,"
463
					+ " CONSULT_STATUS,FINISH_TIME,ASSESS_STATUS,ASSESS_STAR,ASSESS_CONTANT,ASSESS_TIME,THANKS_STATUS,"
464
					+ " THANKS_MONEY,THANKS_TIME,REVOVERY_TIME,READ_STATUS,CREATE_TIME FROM CONSULT ");
465
			if (whereSql.length() > 0) {
466
				sql.append(whereSql);
467
			}
468
			if(0 == timeType) {
469
				sql.append(" ORDER BY CREATE_TIME ");
470
			}else if(1 == timeType) {
471
				sql.append(" ORDER BY REVOVERY_TIME ");
472
			}else if(2 == timeType) {
473
				sql.append(" ORDER BY FINISH_TIME ");
474
			}
475
			if(0 == sortType) {
476
				sql.append(" DESC ");
477
			}
478
			sql.append(" LIMIT ").append(pageSize).append(" OFFSET ").append(_m_10);
479
		}
480
		ps = con.prepareStatement(sql.toString());
481
		try {
482
			ps.setString(paramIndex++, professorId);
483
			ResultSet rs = ps.executeQuery();
484
			try {
485
				List<Consult> _m_11 = new ArrayList<Consult>();
486
				queryResult.setData(_m_11);
487
				while (rs.next()) {
488
					Consult consult = new Consult();
489
					consult.setConsultId(rs.getString(1));
490
					consult.setConsultType(rs.getString(2));
491
					consult.setConsultTitle(rs.getString(3));
492
					consult.setConsultContant(rs.getString(4));
493
					consult.setProfessorId(rs.getString(5));
494
					consult.setConsultantId(rs.getString(6));
495
					Integer m1 = rs.getInt(7);
496
					if (rs.wasNull()) {
497
						m1 = null;
498
					}
499
					consult.setConsultStatus(m1);
500
					String m2 = rs.getString(8);
501
					if (rs.wasNull()) {
502
						m2 = null;
503
					}
504
					consult.setFinishTime(m2);
505
					Integer m3 = rs.getInt(9);
506
					if (rs.wasNull()) {
507
						m3 = null;
508
					}
509
					consult.setAssessStatus(m3);
510
					consult.setAssessStar(rs.getInt(10));
511
					String m5 = rs.getString(11);
512
					if (rs.wasNull()) {
513
						m5 = null;
514
					}
515
					consult.setAssessContant(m5);
516
					String m6 = rs.getString(12);
517
					if (rs.wasNull()) {
518
						m6 = null;
519
					}
520
					consult.setAssessTime(m6);
521
					Integer m7 = rs.getInt(13);
522
					if (rs.wasNull()) {
523
						m7 = null;
524
					}
525
					consult.setThanksStatus(m7);
526
					BigDecimal m8 = rs.getBigDecimal(14);
527
					if (rs.wasNull()) {
528
						m8 = null;
529
					}
530
					consult.setThanksMoney(m8);
531
					String m9 = rs.getString(15);
532
					if (rs.wasNull()) {
533
						m9 = null;
534
					}
535
					consult.setThanksTime(m9);
536
					consult.setRevoveryTime(rs.getString(16));
537
					consult.setReadStatus(rs.getInt(17));
538
					consult.setCreateTime(rs.getString(18));
539
					EditProfessor professor = this.professorDao.queryBaseInfo(con, consult.getConsultantId());
540
					consult.setProfessor(professor);
541
					_m_11.add(consult);
542
				}
543
				return queryResult;
544
			} finally {
545
				try {
546
					rs.close();
547
				} catch (Exception _m_17) {
548
				}
549
			}
550
		} finally {
551
			try {
552
				ps.close();
553
			} catch (Exception _m_18) {
554
			}
555
		}
556
	}
557
	
370 558
	public PageQueryResult<Consult> queryPagePro(Connection con, String professorId, int status, int timeType, int sortType, int pageSize, int pageNo) throws SQLException{
371 559
		PageQueryResult<Consult> queryResult = new PageQueryResult<Consult>();
372 560
		StringBuilder sql = new StringBuilder();
@ -502,12 +690,11 @@ public abstract class ConsultDao {
502 690
						m3 = null;
503 691
					}
504 692
					consult.setAssessStatus(m3);
505
//					Integer m4 = rs.getInt(10);
506
//					if (rs.wasNull()) {
507
//						m4 = null;
508
//					}
509
//					consult.setAssessStar(m4);
510
					consult.setAssessStar(rs.getInt(10));
693
					Integer m4 = rs.getInt(10);
694
					if (rs.wasNull()) {
695
						m4 = null;
696
					}
697
					consult.setAssessStar(m4);
511 698
					String m5 = rs.getString(11);
512 699
					if (rs.wasNull()) {
513 700
						m5 = null;
@ -564,6 +751,181 @@ public abstract class ConsultDao {
564 751
		}
565 752
	}
566 753
	
754
	public PageQueryResult<Consult> queryPageConBase(Connection con, String consultantId, int status, int timeType, int sortType, int pageSize, int pageNo) throws SQLException{
755
		PageQueryResult<Consult> queryResult = new PageQueryResult<Consult>();
756
		StringBuilder sql = new StringBuilder();
757
		sql.append(" WHERE CONSULTANT_ID = ? ");
758
		if(1 == status) {
759
			sql.append(" AND CONSULT_STATUS = 0 ");
760
		}else if(2 == status) {
761
			sql.append(" AND CONSULT_STATUS = 1 AND THANKS_STATUS = 0 ");
762
		}else if(3 == status) {
763
			sql.append(" AND CONSULT_STATUS = 1 AND ASSESS_STATUS = 0 ");
764
		}else if(4 == status) {
765
			sql.append(" AND CONSULT_STATUS = 1 ");
766
		}
767
		StringBuilder whereSql = sql;
768
		sql = new StringBuilder();
769
		sql.append("SELECT COUNT(1) FROM CONSULT");
770
		if (whereSql.length() > 0) {
771
			sql.append(whereSql);
772
		}
773
		PreparedStatement ps = con.prepareStatement(sql.toString());
774
		int paramIndex = 1;
775
		int totalSize = 0;
776
		try {
777
			ps.setString(paramIndex++, consultantId);
778
			ResultSet resultSet = ps.executeQuery();
779
			try {
780
				resultSet.next();
781
				totalSize = resultSet.getInt(1);
782
			} finally {
783
				try {
784
					resultSet.close();
785
				} catch (Exception _m_6) {
786
				}
787
			}
788
		} finally {
789
			try {
790
				ps.close();
791
			} catch (Exception _m_7) {
792
			}
793
		}
794
		queryResult.setTotal(totalSize);
795
		if (0 == totalSize) {
796
			queryResult.setPageNo(1);
797
			queryResult.setData(Collections.<Consult> emptyList());
798
			return queryResult;
799
		}
800
		paramIndex = 1;
801
		if (1 == pageNo) {
802
			queryResult.setPageNo(1);
803
			sql = new StringBuilder();
804
			sql.append(" SELECT CONSULT_ID,CONSULT_TYPE,CONSULT_TITLE,CONSULT_CONTANT,PROFESSOR_ID,CONSULTANT_ID,"
805
					+ " CONSULT_STATUS,FINISH_TIME,ASSESS_STATUS,ASSESS_STAR,ASSESS_CONTANT,ASSESS_TIME,THANKS_STATUS,"
806
					+ " THANKS_MONEY,THANKS_TIME,REVOVERY_TIME,READ_STATUS,CREATE_TIME FROM CONSULT ");
807
			if (whereSql.length() > 0) {
808
				sql.append(whereSql);
809
			}
810
			if(0 == timeType) {
811
				sql.append(" ORDER BY CREATE_TIME ");
812
			}else if(1 == timeType) {
813
				sql.append(" ORDER BY REVOVERY_TIME ");
814
			}else if(2 == timeType) {
815
				sql.append(" ORDER BY FINISH_TIME ");
816
			}
817
			if(0 == sortType) {
818
				sql.append(" DESC ");
819
			}
820
			sql.append(" LIMIT ").append(pageSize);
821
		} else {
822
			int _pageSize = totalSize / pageSize;
823
			if (totalSize % pageSize != 0) {
824
				++_pageSize;
825
			}
826
			if (pageNo > _pageSize) {
827
				pageNo = _pageSize;
828
			}
829
			queryResult.setPageNo(pageNo);
830
			--pageNo;
831
			int _m_10 = (pageNo * pageSize);
832
			sql = new StringBuilder();
833
			sql.append(" SELECT CONSULT_ID,CONSULT_TYPE,CONSULT_TITLE,CONSULT_CONTANT,PROFESSOR_ID,CONSULTANT_ID,"
834
					+ " CONSULT_STATUS,FINISH_TIME,ASSESS_STATUS,ASSESS_STAR,ASSESS_CONTANT,ASSESS_TIME,THANKS_STATUS,"
835
					+ " THANKS_MONEY,THANKS_TIME,REVOVERY_TIME,READ_STATUS,CREATE_TIME FROM CONSULT ");
836
			if (whereSql.length() > 0) {
837
				sql.append(whereSql);
838
			}
839
			if(0 == timeType) {
840
				sql.append(" ORDER BY CREATE_TIME ");
841
			}else if(1 == timeType) {
842
				sql.append(" ORDER BY REVOVERY_TIME ");
843
			}else if(2 == timeType) {
844
				sql.append(" ORDER BY FINISH_TIME ");
845
			}
846
			if(0 == sortType) {
847
				sql.append(" DESC ");
848
			}
849
			sql.append(" LIMIT ").append(pageSize).append(" OFFSET ").append(_m_10);
850
		}
851
		ps = con.prepareStatement(sql.toString());
852
		try {
853
			ps.setString(paramIndex++, consultantId);
854
			ResultSet rs = ps.executeQuery();
855
			try {
856
				List<Consult> _m_11 = new ArrayList<Consult>();
857
				queryResult.setData(_m_11);
858
				while (rs.next()) {
859
					Consult consult = new Consult();
860
					consult.setConsultId(rs.getString(1));
861
					consult.setConsultType(rs.getString(2));
862
					consult.setConsultTitle(rs.getString(3));
863
					consult.setConsultContant(rs.getString(4));
864
					consult.setProfessorId(rs.getString(5));
865
					consult.setConsultantId(rs.getString(6));
866
					Integer m1 = rs.getInt(7);
867
					if (rs.wasNull()) {
868
						m1 = null;
869
					}
870
					consult.setConsultStatus(m1);
871
					String m2 = rs.getString(8);
872
					if (rs.wasNull()) {
873
						m2 = null;
874
					}
875
					consult.setFinishTime(m2);
876
					Integer m3 = rs.getInt(9);
877
					if (rs.wasNull()) {
878
						m3 = null;
879
					}
880
					consult.setAssessStatus(m3);
881
					consult.setAssessStar(rs.getInt(10));
882
					String m5 = rs.getString(11);
883
					if (rs.wasNull()) {
884
						m5 = null;
885
					}
886
					consult.setAssessContant(m5);
887
					String m6 = rs.getString(12);
888
					if (rs.wasNull()) {
889
						m6 = null;
890
					}
891
					consult.setAssessTime(m6);
892
					Integer m7 = rs.getInt(13);
893
					if (rs.wasNull()) {
894
						m7 = null;
895
					}
896
					consult.setThanksStatus(m7);
897
					BigDecimal m8 = rs.getBigDecimal(14);
898
					if (rs.wasNull()) {
899
						m8 = null;
900
					}
901
					consult.setThanksMoney(m8);
902
					String m9 = rs.getString(15);
903
					if (rs.wasNull()) {
904
						m9 = null;
905
					}
906
					consult.setThanksTime(m9);
907
					consult.setRevoveryTime(rs.getString(16));
908
					consult.setReadStatus(rs.getInt(17));
909
					consult.setCreateTime(rs.getString(18));
910
					EditProfessor professor = this.professorDao.queryBaseInfo(con, consult.getProfessorId());
911
					consult.setProfessor(professor);
912
					_m_11.add(consult);
913
				}
914
				return queryResult;
915
			} finally {
916
				try {
917
					rs.close();
918
				} catch (Exception _m_17) {
919
				}
920
			}
921
		} finally {
922
			try {
923
				ps.close();
924
			} catch (Exception _m_18) {
925
			}
926
		}
927
	}
928
	
567 929
	public PageQueryResult<Consult> queryPageCon(Connection con, String consultantId, int status, int timeType, int sortType, int pageSize, int pageNo) throws SQLException{
568 930
		PageQueryResult<Consult> queryResult = new PageQueryResult<Consult>();
569 931
		StringBuilder sql = new StringBuilder();

+ 21 - 21
src/main/java/com/ekexiu/portal/po/Consult.java

@ -6,8 +6,8 @@ import org.jfw.apt.orm.annotation.entry.Column;
6 6
import org.jfw.apt.orm.annotation.entry.PrimaryKey;
7 7
import org.jfw.apt.orm.annotation.entry.Table;
8 8
import org.jfw.apt.orm.core.defaultImpl.FixLenStringHandler;
9
import org.jfw.apt.orm.core.defaultImpl.IntHandler;
10 9
import org.jfw.apt.orm.core.defaultImpl.StringHandler;
10
import org.jfw.apt.orm.core.defaultImpl.WIntHandler;
11 11
import org.jfw.apt.orm.core.enums.DE;
12 12

13 13
import com.ekexiu.portal.basepo.CreateTimeSupported;
@ -23,17 +23,17 @@ public class Consult implements CreateTimeSupported {
23 23
	private String createTime;
24 24
	private String professorId;
25 25
	private String consultantId;
26
	private int consultStatus;
26
	private Integer consultStatus;
27 27
	private String finishTime;
28
	private int assessStatus;
29
	private int assessStar;
28
	private Integer assessStatus;
29
	private Integer assessStar;
30 30
	private String assessContant;
31 31
	private String assessTime;
32
	private int thanksStatus;
32
	private Integer thanksStatus;
33 33
	private BigDecimal thanksMoney;
34 34
	private String thanksTime;
35 35
	private String revoveryTime;
36
	private int readStatus;
36
	private Integer readStatus;
37 37
	private EditProfessor professor;
38 38
	
39 39
	public EditProfessor getProfessor() {
@ -98,11 +98,11 @@ public class Consult implements CreateTimeSupported {
98 98
		this.consultantId = consultantId;
99 99
	}
100 100
	
101
	@Column(handlerClass=IntHandler.class,dbType="INT",nullable=true,insertable=true,renewable=true,queryable=true)
102
	public int getConsultStatus() {
101
	@Column(handlerClass=WIntHandler.class,dbType="INT",nullable=true,insertable=true,renewable=true,queryable=true)
102
	public Integer getConsultStatus() {
103 103
		return consultStatus;
104 104
	}
105
	public void setConsultStatus(int consultStatus) {
105
	public void setConsultStatus(Integer consultStatus) {
106 106
		this.consultStatus = consultStatus;
107 107
	}
108 108
	
@ -114,19 +114,19 @@ public class Consult implements CreateTimeSupported {
114 114
		this.finishTime = finishTime;
115 115
	}
116 116
	
117
	@Column(handlerClass=IntHandler.class,dbType="INT",nullable=true,insertable=true,renewable=true,queryable=true)
118
	public int getAssessStatus() {
117
	@Column(handlerClass=WIntHandler.class,dbType="INT",nullable=true,insertable=true,renewable=true,queryable=true)
118
	public Integer getAssessStatus() {
119 119
		return assessStatus;
120 120
	}
121
	public void setAssessStatus(int assessStatus) {
121
	public void setAssessStatus(Integer assessStatus) {
122 122
		this.assessStatus = assessStatus;
123 123
	}
124 124
	
125
	@Column(handlerClass=IntHandler.class,dbType="INT",nullable=true,insertable=false,renewable=true,queryable=true)
126
	public int getAssessStar() {
125
	@Column(handlerClass=WIntHandler.class,dbType="INT",nullable=true,insertable=false,renewable=true,queryable=true)
126
	public Integer getAssessStar() {
127 127
		return assessStar;
128 128
	}
129
	public void setAssessStar(int assessStar) {
129
	public void setAssessStar(Integer assessStar) {
130 130
		this.assessStar = assessStar;
131 131
	}
132 132
	
@ -146,11 +146,11 @@ public class Consult implements CreateTimeSupported {
146 146
		this.assessTime = assessTime;
147 147
	}
148 148
	
149
	@Column(handlerClass=IntHandler.class,dbType="INT",nullable=true,insertable=true,renewable=true,queryable=true)
150
	public int getThanksStatus() {
149
	@Column(handlerClass=WIntHandler.class,dbType="INT",nullable=true,insertable=true,renewable=true,queryable=true)
150
	public Integer getThanksStatus() {
151 151
		return thanksStatus;
152 152
	}
153
	public void setThanksStatus(int thanksStatus) {
153
	public void setThanksStatus(Integer thanksStatus) {
154 154
		this.thanksStatus = thanksStatus;
155 155
	}
156 156
	
@ -178,11 +178,11 @@ public class Consult implements CreateTimeSupported {
178 178
		this.revoveryTime = revoveryTime;
179 179
	}
180 180
	
181
	@Column(handlerClass=IntHandler.class,dbType="INT",nullable=false,insertable=false,renewable=true,queryable=true)
182
	public int getReadStatus() {
181
	@Column(handlerClass=WIntHandler.class,dbType="INT",nullable=false,insertable=false,renewable=true,queryable=true)
182
	public Integer getReadStatus() {
183 183
		return readStatus;
184 184
	}
185
	public void setReadStatus(int readStatus) {
185
	public void setReadStatus(Integer readStatus) {
186 186
		this.readStatus = readStatus;
187 187
	}
188 188
	

+ 33 - 0
src/main/java/com/ekexiu/portal/service/ConsultService.java

@ -3,6 +3,7 @@ package com.ekexiu.portal.service;
3 3
import java.math.BigDecimal;
4 4
import java.sql.Connection;
5 5
import java.sql.SQLException;
6
import java.util.List;
6 7

7 8
import org.jfw.apt.annotation.Autowrie;
8 9
import org.jfw.apt.annotation.DefaultValue;
@ -136,6 +137,22 @@ public class ConsultService {
136 137
		return this.consultDao.queryCon(con, consultId);
137 138
	}
138 139
	
140
	@Get
141
	@Path("/pqPro")
142
	public PageQueryResult<Consult> queryPageProBase(@JdbcConn Connection con, String professorId, 
143
			@DefaultValue("0") int status, @DefaultValue("0") int timeType, @DefaultValue("0") int sortType, 
144
			@DefaultValue("5") int pageSize, @DefaultValue("1") int pageNo) throws SQLException {
145
		PageQueryResult<Consult> queryResult = this.consultDao.queryPageProBase(con, professorId, status, timeType, sortType, pageSize, pageNo);
146
		List<Consult> consults = queryResult.getData();
147
		if(consults != null){
148
			for (Consult consult : consults) {
149
				int hasHeadImage = this.imageService.hasProfessorImage(consult.getConsultantId());
150
				consult.getProfessor().setHasHeadImage(hasHeadImage);
151
			}
152
		}
153
		return queryResult;
154
	}	
155
	
139 156
	@Get
140 157
	@Path("/pqpro")
141 158
	public PageQueryResult<Consult> queryPagePro(@JdbcConn Connection con, String professorId, 
@ -144,6 +161,22 @@ public class ConsultService {
144 161
		return this.consultDao.queryPagePro(con, professorId, status, timeType, sortType, pageSize, pageNo);
145 162
	}	
146 163
	
164
	@Get
165
	@Path("/pqCon")
166
	public PageQueryResult<Consult> queryPageConBase(@JdbcConn Connection con, String consultantId, 
167
			@DefaultValue("0") int status, @DefaultValue("0") int timeType, @DefaultValue("0") int sortType, 
168
			@DefaultValue("5") int pageSize, @DefaultValue("1") int pageNo) throws SQLException {
169
		PageQueryResult<Consult> queryResult = this.consultDao.queryPageConBase(con, consultantId, status, timeType, sortType, pageSize, pageNo);
170
		List<Consult> consults = queryResult.getData();
171
		if(consults != null){
172
			for (Consult consult : consults) {
173
				int hasHeadImage = this.imageService.hasProfessorImage(consult.getProfessorId());
174
				consult.getProfessor().setHasHeadImage(hasHeadImage);
175
			}
176
		}
177
		return queryResult;
178
	}
179
	
147 180
	@Get
148 181
	@Path("/pqcon")
149 182
	public PageQueryResult<Consult> queryPageCon(@JdbcConn Connection con, String consultantId,