|
@ -42,6 +42,12 @@ public interface QuestionDao {
|
42
|
42
|
@SetSentence("REPLY_COUNT=REPLY_COUNT+1")
|
43
|
43
|
int incQuestionReply(Connection con,String id)throws SQLException;
|
44
|
44
|
|
|
45
|
@UpdateWith
|
|
46
|
@From(Question.class)
|
|
47
|
@SetSentence("REPLY_COUNT=REPLY_COUNT-1")
|
|
48
|
@Where("REPLY_COUNT >0")
|
|
49
|
int deccQuestionReply(Connection con,String id)throws SQLException;
|
|
50
|
|
45
|
51
|
@UpdateWith
|
46
|
52
|
@From(Question.class)
|
47
|
53
|
@SetSentence("PAGE_VIEWS=PAGE_VIEWS+1")
|
|
@ -104,10 +110,12 @@ public interface QuestionDao {
|
104
|
110
|
@LessThan String timeDesc, int rows) throws SQLException;
|
105
|
111
|
|
106
|
112
|
@LimitSelect
|
|
113
|
@Where("STATE='1'")
|
107
|
114
|
@OrderBy("ORDER BY TIME_DESC DESC")
|
108
|
115
|
List<Answer> byQes(Connection con, String qid, @LessThan String timeDesc, int rows) throws SQLException;
|
109
|
116
|
@LimitQuery
|
110
|
117
|
@OrderBy("ORDER BY SCORE_DESC DESC")
|
|
118
|
@Where("STATE='1'")
|
111
|
119
|
List<SortedAnswwer> byQesScore(Connection con, String qid, @SqlColumn(handlerClass = StringHandler.class, value = { "(case when ballot=0 then '00000' else TO_CHAR(10000 *AGREE / BALLOT,'00009') end || ID) < ? " }) String score, int rows) throws SQLException;
|
112
|
120
|
|
113
|
121
|
@Insert
|