该系统框架采用SSM框架,前端使用css、js等。主要功能包括:查询特价电影或最新电影、以及分类查看、查看销售排行、公告、订票、下单、评论等,以及管理员管理相关功能。
controller查询数据
// 按主键查询数据 @RequestMapping("getFilmById.action") public String getFilmById(String id) { Film film = this.filmService.getFilmById(id); this.getRequest().setAttribute("film", film); List<Cate> cateList = this.cateService.getAllCate(); this.getRequest().setAttribute("cateList", cateList); return "admin/editfilm"; }
mybatis获取
<!-- 按条件精确查询 DAO通过id调用此配置 --> <select id="getFilmByCond" parameterType="film" resultMap="filmMap"> select a.* , b.catename from film a , cate b where 1=1 and a.cateid = b.cateid <if test="filmname != null and '' != filmname"> and a.filmname = #{filmname} </if> <if test="image != null and '' != image"> and a.image = #{image} </if> <if test="cateid != null and '' != cateid"> and a.cateid = #{cateid} </if> <if test="price != null and '' != price"> and a.price = #{price} </if> <if test="recommend != null and '' != recommend"> and a.recommend = #{recommend} </if> <if test="thestart != null and '' != thestart"> and a.thestart = #{thestart} </if> <if test="theend != null and '' != theend"> and a.theend = #{theend} </if> <if test="hits != null and '' != hits"> and a.hits = #{hits} </if> <if test="sellnum != null and '' != sellnum"> and a.sellnum = #{sellnum} </if> <if test="contents != null and '' != contents"> and a.contents = #{contents} </if> </select>
**
- 首页
**
**
- 特价电影
**
**
- 销售排行
**
**
- 电影详情
**
**
- 购票
**
**
- 后台首页
**
**
- 电影列表
**
**
- 项目结构
**
**
- 数据库
**