|
@ -16,6 +16,7 @@ import org.jfw.util.StringUtil;
|
16
|
16
|
|
17
|
17
|
import com.ekexiu.portal.dao.ConsultDao;
|
18
|
18
|
import com.ekexiu.portal.dao.ProfessorDao;
|
|
19
|
import com.ekexiu.portal.dao.TidingsDao;
|
19
|
20
|
import com.ekexiu.portal.po.Consult;
|
20
|
21
|
import com.ekexiu.portal.pojo.EditProfessor;
|
21
|
22
|
|
|
@ -27,6 +28,8 @@ public class ConsultService {
|
27
|
28
|
private ProfessorDao professorDao;
|
28
|
29
|
@Autowrie
|
29
|
30
|
private ImageService imageService;
|
|
31
|
@Autowrie
|
|
32
|
private TidingsDao tidingsDao;
|
30
|
33
|
|
31
|
34
|
public ConsultDao getConsultDao() {
|
32
|
35
|
return consultDao;
|
|
@ -46,6 +49,12 @@ public class ConsultService {
|
46
|
49
|
public void setImageService(ImageService imageService) {
|
47
|
50
|
this.imageService = imageService;
|
48
|
51
|
}
|
|
52
|
public TidingsDao getTidingsDao() {
|
|
53
|
return tidingsDao;
|
|
54
|
}
|
|
55
|
public void setTidingsDao(TidingsDao tidingsDao) {
|
|
56
|
this.tidingsDao = tidingsDao;
|
|
57
|
}
|
49
|
58
|
|
50
|
59
|
@Post
|
51
|
60
|
@Path
|
|
@ -143,13 +152,17 @@ public class ConsultService {
|
143
|
152
|
@Get
|
144
|
153
|
@Path("/qapro")
|
145
|
154
|
public Consult queryPro(@JdbcConn Connection con, String consultId) throws SQLException {
|
146
|
|
return this.consultDao.queryPro(con, consultId);
|
|
155
|
Consult consult = this.consultDao.queryPro(con, consultId);
|
|
156
|
this.tidingsDao.updateReadStatus(con, consult.getProfessorId(), consultId);
|
|
157
|
return consult;
|
147
|
158
|
}
|
148
|
159
|
|
149
|
160
|
@Get
|
150
|
161
|
@Path("/qacon")
|
151
|
162
|
public Consult queryCon(@JdbcConn Connection con, String consultId) throws SQLException {
|
152
|
|
return this.consultDao.queryCon(con, consultId);
|
|
163
|
Consult consult = this.consultDao.queryCon(con, consultId);
|
|
164
|
this.tidingsDao.updateReadStatus(con, consult.getConsultantId(), consultId);
|
|
165
|
return consult;
|
153
|
166
|
}
|
154
|
167
|
|
155
|
168
|
@Get
|