代码:
@RequestMapping("/app/movieComment")
public class MovieCommentController {
@Autowired
private movieCommentService service;
@Autowired
private movieQueryService queryService;
@RequestMapping(value="/create", method= RequestMethod。POST)
public @ResponseBody
NormalReturn create(@RequestBody movieCommentVo vo) throws IOException {
NormalReturn normal = new NormalReturn();
Long userId = SecurityUtils。getCurrentUserId();
vo。setUserId(userId);
service。create(vo);
return normal;
}
SQL语句:
执行用户评分功能时,系统对数据库操作时使用的SQL语句为:
UPDATE score set movie= #{movie_score},director=#{director_score},actor=#{actor_score} WHERE id=#{id};
执行用户评价功能时,系统对数据库操作时使用的SQL语句为:
INSERT INTO `evaluate`(user_id,movie_id,content)来:自[优.尔]论,文-网www.youerw.com +QQ752018766-
VALUES (#{userId},#{movieId},#{content});
增删改均返回一个整型值,大于0说明操作成功。
Android电影评分系统设计与实现+ER图(7):http://www.youerw.com/jisuanji/lunwen_93698.html