jiapeng 7 vuotta sitten
vanhempi
commit
153ae5adf2

+ 10 - 0
src/main/java/com/ekexiu/portal/po/Feedback.java

@ -18,6 +18,8 @@ public class Feedback implements CreateTimeSupported{
18 18
	private String content;// text NOT NULL,
19 19
	private String createTime;// char(14) NOT NULL,
20 20
	private String  state;// char(1) NOT NULL,
21
	private String userId;
22
	
21 23
	@Override
22 24
	public String getCreateTime() {
23 25
		return this.createTime;
@ -77,6 +79,14 @@ public class Feedback implements CreateTimeSupported{
77 79
	public void setState(String state) {
78 80
		this.state = state;
79 81
	}
82
	@Column(DE.Text_de)
83
	public String getUserId() {
84
		return userId;
85
	}
86
	public void setUserId(String userId) {
87
		this.userId = userId;
88
	}
89
	
80 90
	
81 91
	
82 92
}

+ 70 - 2
src/main/java/com/ekexiu/push/service/FeedbackService.java

@ -4,6 +4,7 @@ import java.sql.Connection;
4 4
import java.sql.SQLException;
5 5

6 6
import org.jfw.apt.annotation.Autowrie;
7
import org.jfw.apt.annotation.Nullable;
7 8
import org.jfw.apt.web.annotation.Path;
8 9
import org.jfw.apt.web.annotation.operate.Post;
9 10
import org.jfw.apt.web.annotation.param.JdbcConn;
@ -27,26 +28,93 @@ public class FeedbackService {
27 28
	
28 29
	@Post
29 30
	@Path("/error/patent")
30
	public long errorPatent(@JdbcConn(true) Connection con,String cnt,String id)throws SQLException{
31
	public long errorPatent(@JdbcConn(true) Connection con,String cnt,String id,@Nullable String user)throws SQLException{
31 32
		Feedback fb = new Feedback();
32 33
		fb.setCategory(1);
33 34
		fb.setSchema(2);
34 35
		fb.setParam(id);
35 36
		fb.setState("0");
36 37
		fb.setContent(cnt);
38
		fb.setUserId(user);
37 39
		return this.feedbackDao.insert(con, fb);
38 40
	}
39 41
	
40 42
	@Post
41 43
	@Path("/error/paper")
42
	public long errorPaper(@JdbcConn(true) Connection con,String cnt,String id)throws SQLException{
44
	public long errorPaper(@JdbcConn(true) Connection con,String cnt,String id,@Nullable String user)throws SQLException{
43 45
		Feedback fb = new Feedback();
44 46
		fb.setCategory(1);
45 47
		fb.setSchema(1);
46 48
		fb.setParam(id);
47 49
		fb.setState("0");
48 50
		fb.setContent(cnt);
51
		fb.setUserId(user);
49 52
		return this.feedbackDao.insert(con, fb);
50 53
	}
54
	@Post
55
	@Path("/error/professor")
56
	public long errorProfessor(@JdbcConn(true) Connection con,String cnt,String id,@Nullable String user)throws SQLException{
57
		Feedback fb = new Feedback();
58
		fb.setCategory(1);
59
		fb.setSchema(3);
60
		fb.setParam(id);
61
		fb.setState("0");
62
		fb.setContent(cnt);
63
		fb.setUserId(user);
64
		return this.feedbackDao.insert(con, fb);
65
	}
66
	
67
	@Post
68
	@Path("/error/org")
69
	public long errorOrg(@JdbcConn(true) Connection con,String cnt,String id,@Nullable String user)throws SQLException{
70
		Feedback fb = new Feedback();
71
		fb.setCategory(1);
72
		fb.setSchema(4);
73
		fb.setParam(id);
74
		fb.setState("0");
75
		fb.setContent(cnt);
76
		fb.setUserId(user);
77
		return this.feedbackDao.insert(con, fb);
78
	}
79
	
80
	@Post
81
	@Path("/error/resource")
82
	public long errorResource(@JdbcConn(true) Connection con,String cnt,String id,@Nullable String user)throws SQLException{
83
		Feedback fb = new Feedback();
84
		fb.setCategory(1);
85
		fb.setSchema(5);
86
		fb.setParam(id);
87
		fb.setState("0");
88
		fb.setContent(cnt);
89
		fb.setUserId(user);
90
		return this.feedbackDao.insert(con, fb);
91
	}
92
	
93
	@Post
94
	@Path("/error/article")
95
	public long errorArticle(@JdbcConn(true) Connection con,String cnt,String id,@Nullable String user)throws SQLException{
96
		Feedback fb = new Feedback();
97
		fb.setCategory(1);
98
		fb.setSchema(6);
99
		fb.setParam(id);
100
		fb.setState("0");
101
		fb.setContent(cnt);
102
		fb.setUserId(user);
103
		return this.feedbackDao.insert(con, fb);
104
	}
105
	
106
	@Post
107
	@Path("/error")
108
	public long error(@JdbcConn(true) Connection con,String cnt,String id,@Nullable String user,int schema)throws SQLException{
109
		Feedback fb = new Feedback();
110
		fb.setCategory(1);
111
		fb.setSchema(schema);
112
		fb.setParam(id);
113
		fb.setState("0");
114
		fb.setContent(cnt);
115
		fb.setUserId(user);
116
		return this.feedbackDao.insert(con, fb);
117
	}
118
	
51 119
	
52 120
}

+ 3 - 1
src/main/resources/database.sql

@ -1478,16 +1478,18 @@ param text NOT NULL,
1478 1478
content text NOT NULL,
1479 1479
create_time char(14) NOT NULL,
1480 1480
state char(1) NOT NULL,
1481
user_id text,
1481 1482
PRIMARY KEY (id)
1482 1483
);
1483 1484
COMMENT ON TABLE feedback IS '反馈信息';
1484 1485
COMMENT ON COLUMN feedback.id IS '反馈信息ID';
1485 1486
COMMENT ON COLUMN feedback.title IS '标题';
1486 1487
COMMENT ON COLUMN feedback.category IS '大类  1:纠错';
1487
COMMENT ON COLUMN feedback."schema" IS '小类  1.1:论文纠错1.2:专利纠错';
1488
COMMENT ON COLUMN feedback."schema" IS '小类  1:论文,2:专利, 3 专家 4 机构 5 资源 6 文章';
1488 1489
COMMENT ON COLUMN feedback.content IS '内容';
1489 1490
COMMENT ON COLUMN feedback.param IS '参数:如 论文ID....';
1490 1491
COMMENT ON COLUMN feedback.state IS '状态,0:初始状态   ,其他由不同大类业务确定';
1492
COMMENT ON COLUMN feedback.user_id IS '返馈人ID';
1491 1493

1492 1494

1493 1495
create sequence professor_share_id_seq increment by 1 minvalue 100000 no maxvalue start with 100000;