|
@ -1,28 +1,14 @@
|
1
|
1
|
package com.ekexiu.portal.question;
|
2
|
2
|
|
3
|
|
import java.io.File;
|
4
|
|
import java.io.FileOutputStream;
|
5
|
|
import java.io.InputStream;
|
6
|
|
import java.io.OutputStream;
|
7
|
|
import java.sql.Connection;
|
8
|
|
import java.sql.PreparedStatement;
|
9
|
|
import java.sql.SQLException;
|
10
|
|
import java.util.ArrayList;
|
11
|
|
import java.util.LinkedList;
|
12
|
|
import java.util.List;
|
13
|
|
import java.util.Map;
|
14
|
|
import java.util.concurrent.atomic.AtomicInteger;
|
15
|
|
|
|
3
|
import com.ekexiu.portal.notify.NotifyService;
|
|
4
|
import com.ekexiu.portal.notify.NotifyType;
|
|
5
|
import com.ekexiu.portal.util.SqlUtil;
|
16
|
6
|
import org.jfw.apt.annotation.Autowrie;
|
17
|
7
|
import org.jfw.apt.annotation.DefaultValue;
|
18
|
8
|
import org.jfw.apt.web.annotation.Path;
|
19
|
9
|
import org.jfw.apt.web.annotation.operate.Get;
|
20
|
10
|
import org.jfw.apt.web.annotation.operate.Post;
|
21
|
|
import org.jfw.apt.web.annotation.param.AfterCommit;
|
22
|
|
import org.jfw.apt.web.annotation.param.FieldParam;
|
23
|
|
import org.jfw.apt.web.annotation.param.JdbcConn;
|
24
|
|
import org.jfw.apt.web.annotation.param.RequestParam;
|
25
|
|
import org.jfw.apt.web.annotation.param.Upload;
|
|
11
|
import org.jfw.apt.web.annotation.param.*;
|
26
|
12
|
import org.jfw.util.ListUtil;
|
27
|
13
|
import org.jfw.util.StringUtil;
|
28
|
14
|
import org.jfw.util.exception.JfwBaseException;
|
|
@ -31,9 +17,18 @@ import org.jfw.util.jdbc.PreparedStatementConfig;
|
31
|
17
|
import org.jfw.util.web.fileupload.Item;
|
32
|
18
|
import org.jfw.util.web.fileupload.UploadItemIterator;
|
33
|
19
|
|
34
|
|
import com.ekexiu.portal.notify.NotifyService;
|
35
|
|
import com.ekexiu.portal.notify.NotifyType;
|
36
|
|
import com.ekexiu.portal.util.SqlUtil;
|
|
20
|
import java.io.File;
|
|
21
|
import java.io.FileOutputStream;
|
|
22
|
import java.io.InputStream;
|
|
23
|
import java.io.OutputStream;
|
|
24
|
import java.sql.Connection;
|
|
25
|
import java.sql.PreparedStatement;
|
|
26
|
import java.sql.SQLException;
|
|
27
|
import java.util.ArrayList;
|
|
28
|
import java.util.LinkedList;
|
|
29
|
import java.util.List;
|
|
30
|
import java.util.Map;
|
|
31
|
import java.util.concurrent.atomic.AtomicInteger;
|
37
|
32
|
|
38
|
33
|
@Path("/question")
|
39
|
34
|
public class Service {
|
|
@ -308,7 +303,7 @@ public class Service {
|
308
|
303
|
*/
|
309
|
304
|
@Get
|
310
|
305
|
@Path()
|
311
|
|
public List<Question> query(@JdbcConn Connection con, @DefaultValue("\"0\"") String time, @DefaultValue("\"0\"") String id,
|
|
306
|
public List<Question> query(@JdbcConn Connection con, @DefaultValue("\"99999999999999\"") String time, @DefaultValue("\"0\"") String id,
|
312
|
307
|
@DefaultValue("10000000") int rows) throws SQLException {
|
313
|
308
|
return questionDao.query(con, "1", null, time, id, rows);
|
314
|
309
|
}
|
|
@ -330,7 +325,7 @@ public class Service {
|
330
|
325
|
*/
|
331
|
326
|
@Get
|
332
|
327
|
@Path("/my")
|
333
|
|
public List<Question> querySelf(@JdbcConn Connection con, String uid, @DefaultValue("\"0\"") String time, @DefaultValue("\"0\"") String id,
|
|
328
|
public List<Question> querySelf(@JdbcConn Connection con, String uid, @DefaultValue("\"99999999999999\"") String time, @DefaultValue("\"0\"") String id,
|
334
|
329
|
@DefaultValue("10000000") int rows) throws SQLException {
|
335
|
330
|
return questionDao.query(con, "1", uid, time, id, rows);
|
336
|
331
|
}
|
|
@ -352,7 +347,7 @@ public class Service {
|
352
|
347
|
*/
|
353
|
348
|
@Get
|
354
|
349
|
@Path("/watch")
|
355
|
|
public List<Question> watch(@JdbcConn Connection con, String uid, @DefaultValue("\"0\"") String time, @DefaultValue("\"0\"") String id,
|
|
350
|
public List<Question> watch(@JdbcConn Connection con, String uid, @DefaultValue("\"99999999999999\"") String time, @DefaultValue("\"0\"") String id,
|
356
|
351
|
@DefaultValue("10000000") int rows) throws SQLException {
|
357
|
352
|
return questionDao.watch(con, uid, time, id, rows);
|
358
|
353
|
}
|
|
@ -374,7 +369,7 @@ public class Service {
|
374
|
369
|
*/
|
375
|
370
|
@Get
|
376
|
371
|
@Path("/answer/bySelf")
|
377
|
|
public List<Answer> answerSelf(@JdbcConn Connection con, String uid, @DefaultValue("\"0\"") String time, @DefaultValue("\"0\"") String id,
|
|
372
|
public List<Answer> answerSelf(@JdbcConn Connection con, String uid, @DefaultValue("\"99999999999999\"") String time, @DefaultValue("\"0\"") String id,
|
378
|
373
|
@DefaultValue("10000000") int rows) throws SQLException {
|
379
|
374
|
return questionDao.answerSelf(con, uid, time, id, rows);
|
380
|
375
|
}
|
|
@ -396,7 +391,7 @@ public class Service {
|
396
|
391
|
*/
|
397
|
392
|
@Get
|
398
|
393
|
@Path("/answer/byWatch")
|
399
|
|
public List<Answer> answerWatch(@JdbcConn Connection con, String uid, @DefaultValue("\"0\"") String time, @DefaultValue("\"0\"") String id,
|
|
394
|
public List<Answer> answerWatch(@JdbcConn Connection con, String uid, @DefaultValue("\"99999999999999\"") String time, @DefaultValue("\"0\"") String id,
|
400
|
395
|
@DefaultValue("10000000") int rows) throws SQLException {
|
401
|
396
|
return questionDao.watchAnswer(con, uid, time, id, rows);
|
402
|
397
|
}
|
|
@ -435,7 +430,7 @@ public class Service {
|
435
|
430
|
*/
|
436
|
431
|
@Get
|
437
|
432
|
@Path("/answer/qes/byTime")
|
438
|
|
public List<Answer> byQes(@JdbcConn Connection con, String qid, @DefaultValue("\"0\"") String time, @DefaultValue("\"0\"") String id,
|
|
433
|
public List<Answer> byQes(@JdbcConn Connection con, String qid, @DefaultValue("\"99999999999999\"") String time, @DefaultValue("\"0\"") String id,
|
439
|
434
|
@DefaultValue("10000000") int rows) throws SQLException {
|
440
|
435
|
return questionDao.byQes(con, qid, time, id, rows);
|
441
|
436
|
}
|