Explorar el Código

查看咨询时自动更新对方发送的消息为已读状态。

zzy.zhiyuan.foxmail %!s(int64=8) %!d(string=hace) años
padre
commit
31d7ffa7c8
Se han modificado 1 ficheros con 15 adiciones y 2 borrados
  1. 15 2
      src/main/java/com/ekexiu/portal/service/ConsultService.java

+ 15 - 2
src/main/java/com/ekexiu/portal/service/ConsultService.java

16

16

17
import com.ekexiu.portal.dao.ConsultDao;
17
import com.ekexiu.portal.dao.ConsultDao;
18
import com.ekexiu.portal.dao.ProfessorDao;
18
import com.ekexiu.portal.dao.ProfessorDao;
19
import com.ekexiu.portal.dao.TidingsDao;
19
import com.ekexiu.portal.po.Consult;
20
import com.ekexiu.portal.po.Consult;
20
import com.ekexiu.portal.pojo.EditProfessor;
21
import com.ekexiu.portal.pojo.EditProfessor;
21

22

27
	private ProfessorDao professorDao;
28
	private ProfessorDao professorDao;
28
	@Autowrie
29
	@Autowrie
29
	private ImageService imageService;
30
	private ImageService imageService;
31
	@Autowrie
32
	private TidingsDao tidingsDao;
30
	
33
	
31
	public ConsultDao getConsultDao() {
34
	public ConsultDao getConsultDao() {
32
		return consultDao;
35
		return consultDao;
46
	public void setImageService(ImageService imageService) {
49
	public void setImageService(ImageService imageService) {
47
		this.imageService = imageService;
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
	@Post
59
	@Post
51
	@Path
60
	@Path
143
	@Get
152
	@Get
144
	@Path("/qapro")
153
	@Path("/qapro")
145
	public Consult queryPro(@JdbcConn Connection con, String consultId) throws SQLException {
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
	@Get
160
	@Get
150
	@Path("/qacon")
161
	@Path("/qacon")
151
	public Consult queryCon(@JdbcConn Connection con, String consultId) throws SQLException {
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
	@Get
168
	@Get