当前位置:   article > 正文

Springboot+Vue+小程序+基于微信小程序电影票网购系统_private dianyingxinxiservice dianyingxinxiservice

private dianyingxinxiservice dianyingxinxiservice

Java电影票购买管理系统,Maven管理工具,MyBatis数据库操作,idea平台开发,后台的前端为Vue,前台客户端为小程序,功能丰富,还有电影周边购买功能,请在最下方二维码处联系我即可,调试,讲解均可有偿获取,项目保证质量。

功能:

1.个人信息管理

2.用户管理

3.电影分裂管理

4.电影信息管理

5.电影院管理

6.周边商品管理

7.留言管理

8.系统管理(公告,系统简介,轮播图)

10.订单管理

图示:

数据库示例:

表名:discussdianyingxinxi

功能:电影信息评论表

字段名称

类型

长度

字段说明

主键

默认值

id

bigint

主键

  主键

addtime

timestamp

创建时间

CURRENT_TIMESTAMP

refid

bigint

关联表id

userid

bigint

用户id

avatarurl

longtext

4294967295

头像

nickname

varchar

200

用户名

content

longtext

4294967295

评论内容

reply

longtext

4294967295

回复内容

表名:dianyingyuan

功能:电影院

字段名称

类型

长度

字段说明

主键

默认值

id

bigint

主键

  主键

addtime

timestamp

创建时间

CURRENT_TIMESTAMP

biaoti

varchar

200

标题

jianjie

longtext

4294967295

简介

fengmian

longtext

4294967295

封面

fabushijian

datetime

发布时间

neirong

longtext

4294967295

内容

clicktime

datetime

最近点击时间

clicknum

int

点击次数

0

表名:dianyingxinxi

功能:电影信息

字段名称

类型

长度

字段说明

主键

默认值

id

bigint

主键

  主键

addtime

timestamp

创建时间

CURRENT_TIMESTAMP

dianyingmingcheng

varchar

200

电影名称

dianyingfenlei

varchar

200

电影分类

dianyinghaibao

longtext

4294967295

电影海报

dianyingpianduan

longtext

4294967295

电影片段

daoyan

varchar

200

导演

yanyuan

varchar

200

演员

shangyingriqi

date

上映日期

diqu

varchar

200

地区

niandai

varchar

200

年代

fangyingchangci

varchar

200

放映场次

fangyingshijian

varchar

200

放映时间

fangyingting

varchar

200

放映厅

yingyuanmingcheng

varchar

200

影院名称

yingyuandizhi

varchar

200

影院地址

dianyingjieshao

longtext

4294967295

电影介绍

thumbsupnum

int

0

crazilynum

int

0

clicktime

datetime

最近点击时间

clicknum

int

点击次数

0

price

double

价格

number

int

座位总数

selected

longtext

4294967295

已选座位[用,号隔开]

代码示例:

  1. package com.controller;
  2. import java.util.Arrays;
  3. import java.util.Map;
  4. import java.util.HashMap;
  5. import java.util.Iterator;
  6. import java.util.Date;
  7. import javax.servlet.http.HttpServletRequest;
  8. import com.utils.ValidatorUtils;
  9. import org.apache.commons.lang3.StringUtils;
  10. import org.springframework.beans.factory.annotation.Autowired;
  11. import org.springframework.transaction.annotation.Transactional;
  12. import org.springframework.web.bind.annotation.PathVariable;
  13. import org.springframework.web.bind.annotation.RequestBody;
  14. import org.springframework.web.bind.annotation.RequestMapping;
  15. import org.springframework.web.bind.annotation.RequestParam;
  16. import org.springframework.web.bind.annotation.RestController;
  17. import com.baomidou.mybatisplus.mapper.EntityWrapper;
  18. import com.annotation.IgnoreAuth;
  19. import com.entity.DianyingxinxiEntity;
  20. import com.entity.view.DianyingxinxiView;
  21. import com.service.DianyingxinxiService;
  22. import com.utils.PageUtils;
  23. import com.utils.R;
  24. import com.utils.MPUtil;
  25. /**
  26. * 电影信息
  27. * 后端接口
  28. */
  29. @RestController
  30. @RequestMapping("/dianyingxinxi")
  31. public class DianyingxinxiController {
  32. @Autowired
  33. private DianyingxinxiService dianyingxinxiService;
  34. /**
  35. * 后端列表
  36. */
  37. @RequestMapping("/page")
  38. public R page(@RequestParam Map<String, Object> params, DianyingxinxiEntity dianyingxinxi,
  39. HttpServletRequest request) {
  40. EntityWrapper<DianyingxinxiEntity> ew = new EntityWrapper<DianyingxinxiEntity>();
  41. PageUtils page = dianyingxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, dianyingxinxi), params), params));
  42. return R.ok().put("data", page);
  43. }
  44. /**
  45. * 前端列表
  46. */
  47. @IgnoreAuth
  48. @RequestMapping("/list")
  49. public R list(@RequestParam Map<String, Object> params, DianyingxinxiEntity dianyingxinxi,
  50. HttpServletRequest request) {
  51. EntityWrapper<DianyingxinxiEntity> ew = new EntityWrapper<DianyingxinxiEntity>();
  52. PageUtils page = dianyingxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, dianyingxinxi), params), params));
  53. return R.ok().put("data", page);
  54. }
  55. /**
  56. * 列表
  57. */
  58. @RequestMapping("/lists")
  59. public R list(DianyingxinxiEntity dianyingxinxi) {
  60. EntityWrapper<DianyingxinxiEntity> ew = new EntityWrapper<DianyingxinxiEntity>();
  61. ew.allEq(MPUtil.allEQMapPre(dianyingxinxi, "dianyingxinxi"));
  62. return R.ok().put("data", dianyingxinxiService.selectListView(ew));
  63. }
  64. /**
  65. * 查询
  66. */
  67. @RequestMapping("/query")
  68. public R query(DianyingxinxiEntity dianyingxinxi) {
  69. EntityWrapper<DianyingxinxiEntity> ew = new EntityWrapper<DianyingxinxiEntity>();
  70. ew.allEq(MPUtil.allEQMapPre(dianyingxinxi, "dianyingxinxi"));
  71. DianyingxinxiView dianyingxinxiView = dianyingxinxiService.selectView(ew);
  72. return R.ok("查询电影信息成功").put("data", dianyingxinxiView);
  73. }
  74. /**
  75. * 后端详情
  76. */
  77. @RequestMapping("/info/{id}")
  78. public R info(@PathVariable("id") Long id) {
  79. DianyingxinxiEntity dianyingxinxi = dianyingxinxiService.selectById(id);
  80. dianyingxinxi.setClicknum(dianyingxinxi.getClicknum() + 1);
  81. dianyingxinxi.setClicktime(new Date());
  82. dianyingxinxiService.updateById(dianyingxinxi);
  83. return R.ok().put("data", dianyingxinxi);
  84. }
  85. /**
  86. * 前端详情
  87. */
  88. @IgnoreAuth
  89. @RequestMapping("/detail/{id}")
  90. public R detail(@PathVariable("id") Long id) {
  91. DianyingxinxiEntity dianyingxinxi = dianyingxinxiService.selectById(id);
  92. dianyingxinxi.setClicknum(dianyingxinxi.getClicknum() + 1);
  93. dianyingxinxi.setClicktime(new Date());
  94. dianyingxinxiService.updateById(dianyingxinxi);
  95. return R.ok().put("data", dianyingxinxi);
  96. }
  97. /**
  98. * 赞或踩
  99. */
  100. @RequestMapping("/thumbsup/{id}")
  101. public R vote(@PathVariable("id") String id, String type) {
  102. DianyingxinxiEntity dianyingxinxi = dianyingxinxiService.selectById(id);
  103. if (type.equals("1")) {
  104. dianyingxinxi.setThumbsupnum(dianyingxinxi.getThumbsupnum() + 1);
  105. } else {
  106. dianyingxinxi.setCrazilynum(dianyingxinxi.getCrazilynum() + 1);
  107. }
  108. dianyingxinxiService.updateById(dianyingxinxi);
  109. return R.ok("投票成功");
  110. }
  111. /**
  112. * 后端保存
  113. */
  114. @RequestMapping("/save")
  115. public R save(@RequestBody DianyingxinxiEntity dianyingxinxi, HttpServletRequest request) {
  116. dianyingxinxi.setId(new Date().getTime() + new Double(Math.floor(Math.random() * 1000)).longValue());
  117. //ValidatorUtils.validateEntity(dianyingxinxi);
  118. dianyingxinxiService.insert(dianyingxinxi);
  119. return R.ok();
  120. }
  121. /**
  122. * 前端保存
  123. */
  124. @RequestMapping("/add")
  125. public R add(@RequestBody DianyingxinxiEntity dianyingxinxi, HttpServletRequest request) {
  126. dianyingxinxi.setId(new Date().getTime() + new Double(Math.floor(Math.random() * 1000)).longValue());
  127. dianyingxinxiService.insert(dianyingxinxi);
  128. return R.ok();
  129. }
  130. /**
  131. * 修改
  132. */
  133. @RequestMapping("/update")
  134. @Transactional
  135. public R update(@RequestBody DianyingxinxiEntity dianyingxinxi, HttpServletRequest request) {
  136. dianyingxinxiService.updateById(dianyingxinxi);//全部更新
  137. return R.ok();
  138. }
  139. /**
  140. * 删除
  141. */
  142. @RequestMapping("/delete")
  143. public R delete(@RequestBody Long[] ids) {
  144. dianyingxinxiService.deleteBatchIds(Arrays.asList(ids));
  145. return R.ok();
  146. }
  147. /**
  148. * 前端智能排序
  149. */
  150. @IgnoreAuth
  151. @RequestMapping("/autoSort")
  152. public R autoSort(@RequestParam Map<String, Object> params, DianyingxinxiEntity dianyingxinxi, HttpServletRequest request, String pre) {
  153. EntityWrapper<DianyingxinxiEntity> ew = new EntityWrapper<DianyingxinxiEntity>();
  154. Map<String, Object> newMap = new HashMap<String, Object>();
  155. Map<String, Object> param = new HashMap<String, Object>();
  156. Iterator<Map.Entry<String, Object>> it = param.entrySet().iterator();
  157. while (it.hasNext()) {
  158. Map.Entry<String, Object> entry = it.next();
  159. String key = entry.getKey();
  160. String newKey = entry.getKey();
  161. if (pre.endsWith(".")) {
  162. newMap.put(pre + newKey, entry.getValue());
  163. } else if (StringUtils.isEmpty(pre)) {
  164. newMap.put(newKey, entry.getValue());
  165. } else {
  166. newMap.put(pre + "." + newKey, entry.getValue());
  167. }
  168. }
  169. params.put("sort", "clicknum");
  170. params.put("order", "desc");
  171. PageUtils page = dianyingxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, dianyingxinxi), params), params));
  172. return R.ok().put("data", page);
  173. }
  174. }

电影信息实体类:

  1. import java.util.Date;
  2. import org.springframework.format.annotation.DateTimeFormat;
  3. import com.fasterxml.jackson.annotation.JsonFormat;
  4. import java.io.Serializable;
  5. /**
  6. * 电影信息
  7. * 手机端接口返回实体辅助类
  8. */
  9. public class DianyingxinxiVO implements Serializable {
  10. private static final long serialVersionUID = 1L;
  11. /**
  12. * 电影分类
  13. */
  14. private String dianyingfenlei;
  15. /**
  16. * 电影海报
  17. */
  18. private String dianyinghaibao;
  19. /**
  20. * 电影片段
  21. */
  22. private String dianyingpianduan;
  23. /**
  24. * 导演
  25. */
  26. private String daoyan;
  27. /**
  28. * 演员
  29. */
  30. private String yanyuan;
  31. /**
  32. * 上映日期
  33. */
  34. @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  35. @DateTimeFormat
  36. private Date shangyingriqi;
  37. /**
  38. * 地区
  39. */
  40. private String diqu;
  41. /**
  42. * 年代
  43. */
  44. private String niandai;
  45. /**
  46. * 放映场次
  47. */
  48. private String fangyingchangci;
  49. /**
  50. * 放映时间
  51. */
  52. private String fangyingshijian;
  53. /**
  54. * 放映厅
  55. */
  56. private String fangyingting;
  57. /**
  58. * 影院名称
  59. */
  60. private String yingyuanmingcheng;
  61. /**
  62. * 影院地址
  63. */
  64. private String yingyuandizhi;
  65. /**
  66. * 电影介绍
  67. */
  68. private String dianyingjieshao;
  69. /**
  70. * 赞
  71. */
  72. private Integer thumbsupnum;
  73. /**
  74. * 踩
  75. */
  76. private Integer crazilynum;
  77. /**
  78. * 最近点击时间
  79. */
  80. @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  81. @DateTimeFormat
  82. private Date clicktime;
  83. /**
  84. * 点击次数
  85. */
  86. private Integer clicknum;
  87. /**
  88. * 价格
  89. */
  90. private Double price;
  91. /**
  92. * 座位总数
  93. */
  94. private Integer number;
  95. /**
  96. * 已选座位[用,号隔开]
  97. */
  98. private String selected;
  99. }

                                   

                                      

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/黑客灵魂/article/detail/1007329
推荐阅读
相关标签
  

闽ICP备14008679号