jiapeng 7 years ago
parent
commit
0205b776a6

+ 5 - 0
src/main/java/com/ekexiu/portal/question/QuestionDao.java

@ -49,6 +49,11 @@ public interface QuestionDao {
49 49
	@Nullable
50 50
	Question query(Connection con, String id) throws SQLException;
51 51
	
52
	@UpdateWith
53
	@From(Answer.class)
54
	@SetSentence("STATE='0'")
55
	@Where("STATE ='1'")
56
	int logicDeleteAnswer(Connection con,String id)throws SQLException;
52 57

53 58
	
54 59
	@SelectOne

+ 6 - 0
src/main/java/com/ekexiu/portal/question/Service.java

@ -553,6 +553,12 @@ public class Service {
553 553
		notifyService.notify(con, a.getUid(), uid, uname, a.getId(), q.getTitle(), NotifyType.ACCEPT_ANSWER, runs);
554 554
	}
555 555

556
	@Get
557
	@Path("/answer/delete")
558
	public int logicDelete(@JdbcConn(true) Connection con,String id)throws SQLException{
559
		return questionDao.logicDeleteAnswer(con, id);
560
	}
561
	
556 562
	@Post
557 563
	@Path("/answer/unAgree")
558 564
	public void unAgree(@JdbcConn(true) Connection con, String id, String uid, String uname, @AfterCommit List<Runnable> runs)