Browse Source

产品关注

XMTT 6 years ago
parent
commit
51fa9e0c5c
1 changed files with 17 additions and 5 deletions
  1. 17 5
      src/main/java/com/ekexiu/portal/service/FeedbackService.java

+ 17 - 5
src/main/java/com/ekexiu/portal/service/FeedbackService.java

1
package com.ekexiu.portal.service;
1
package com.ekexiu.portal.service;
2

2

3
import java.sql.Connection;
4
import java.sql.SQLException;
5

3
import com.ekexiu.portal.dao.FeedbackDao;
4
import com.ekexiu.portal.po.Feedback;
6
import org.jfw.apt.annotation.Autowrie;
5
import org.jfw.apt.annotation.Autowrie;
7
import org.jfw.apt.annotation.Nullable;
6
import org.jfw.apt.annotation.Nullable;
8
import org.jfw.apt.web.annotation.Path;
7
import org.jfw.apt.web.annotation.Path;
9
import org.jfw.apt.web.annotation.operate.Post;
8
import org.jfw.apt.web.annotation.operate.Post;
10
import org.jfw.apt.web.annotation.param.JdbcConn;
9
import org.jfw.apt.web.annotation.param.JdbcConn;
11

10

12
import com.ekexiu.portal.dao.FeedbackDao;
13
import com.ekexiu.portal.po.Feedback;
11
import java.sql.Connection;
12
import java.sql.SQLException;
14

13

15
@Path("/feedback")
14
@Path("/feedback")
16
public class FeedbackService {
15
public class FeedbackService {
164
		fb.setSchema(10);
163
		fb.setSchema(10);
165
		return this.feedbackDao.insert(con, fb);
164
		return this.feedbackDao.insert(con, fb);
166
	}
165
	}
166

167
	@Post
168
	@Path("/error/product")
169
	public long errorProduct(@JdbcConn(true) Connection con,String cnt,String id,@Nullable String user)throws SQLException{
170
		Feedback fb = new Feedback();
171
		fb.setCategory(1);
172
		fb.setParam(id);
173
		fb.setState("0");
174
		fb.setContent(cnt);
175
		fb.setUserId(user);
176
		fb.setSchema(11);
177
		return this.feedbackDao.insert(con, fb);
178
	}
167
}
179
}