写在controller与写在service中的区别。船舶租用信息的确认,不要放controller,要放service。在service中执行的是事务,(插入、更新、删除)出现错误可以回滚。只有查询可以放在controller,不过最好也放在service。
不带@ResponseBody的 返回页面。@带ResponseBody的 返回数据。在controller中一般完成对对象的封装,这样在service中只需要处理对象。