【开源】基于JAVA+Vue+SpringBoot的桃花峪滑雪场租赁系统
·
目录
一、摘要
1.1 项目介绍
基于JAVA+Vue+SpringBoot+MySQL的桃花峪滑雪场租赁系统,包含了滑雪场、门票预定、滑雪教练聘请、器材租赁归还、规章制度等模块,分为管理后台和微信小程序端,还包含系统自带的用户管理、部门管理、角色管理、菜单管理、日志管理、数据字典管理、文件管理、图表展示等基础模块,桃花峪滑雪场租赁系统基于角色的访问控制,给滑雪爱好者、滑雪管理员使用,可将权限精确到按钮级别,您可以自定义角色并分配权限,系统适合设计精确的权限约束需求。
1.2 项目录屏
二、功能模块
本系统以桃花峪滑雪场内部计费收银及运营业务管理流程为基础,通过“—卡通消费”的收费方式,简化滑雪场消费业务的管理环节,优化业务操作流程,实现游客消费和雪场管理的全面自动化,对滑雪场的设备、器具、人力、款项合理化运营管控,从而提升滑雪场经济效益。
2.1 游客服务
游客服务主要为游客提供在线便利服务,核心功能如下。
游客通过系统完成如门票预订购买、教练聘请、快速入园、滑雪器材便捷租赁、会员充值、多元化支付,自助结算、订单管理、其他二次消费(就餐、购物)等
2.2 雪场管理
主要功能包括售票管理、租赁配置管理、租赁方案管理、超时档位管理、押金规则管理、器材信息管理、器材库存管理、器材损坏规则、教练信息管理。
三、数据库设计
3.1 教练表
public class Coach extends ZwzBaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "姓名")
private String name;
@ApiModelProperty(value = "性别")
private String sex;
@ApiModelProperty(value = "年龄")
private BigDecimal age;
@ApiModelProperty(value = "介绍")
private String content;
@ApiModelProperty(value = "一寸照")
private String image;
@ApiModelProperty(value = "级别")
private String level;
@ApiModelProperty(value = "聘请费用")
private BigDecimal cost;
}
3.2 教练聘请表
public class CoachEngagement extends ZwzBaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "教练ID")
private String coachId;
@ApiModelProperty(value = "姓名")
private String name;
@ApiModelProperty(value = "性别")
private String sex;
@ApiModelProperty(value = "年龄")
private BigDecimal age;
@ApiModelProperty(value = "介绍")
private String content;
@ApiModelProperty(value = "一寸照")
private String image;
@ApiModelProperty(value = "级别")
private String level;
@ApiModelProperty(value = "聘请费用")
private BigDecimal cost;
@ApiModelProperty(value = "聘请人ID")
private String userId;
@ApiModelProperty(value = "聘请人")
private String userName;
@ApiModelProperty(value = "聘请日期")
private String date;
}
3.3 押金规则表
public class DepositRules extends ZwzBaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "押金规则")
private String title;
@ApiModelProperty(value = "内容")
private String content;
@ApiModelProperty(value = "金额")
private BigDecimal number;
@ApiModelProperty(value = "排序值")
private BigDecimal sortOrder;
@ApiModelProperty(value = "备注")
private String remark;
}
3.4 器材表
public class Equipment extends ZwzBaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "器材名称")
private String title;
@ApiModelProperty(value = "器材型号")
private String model;
@ApiModelProperty(value = "采购价")
private BigDecimal price;
@ApiModelProperty(value = "计量单位")
private String unit;
@ApiModelProperty(value = "图片")
private String image;
@ApiModelProperty(value = "库存")
private BigDecimal stock;
@ApiModelProperty(value = "押金规则ID")
private String ruleId;
@ApiModelProperty(value = "押金规则")
private String ruleName;
}
3.5 滑雪场表
public class SkiField extends ZwzBaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "滑雪场名称")
private String title;
@ApiModelProperty(value = "介绍")
private String content;
@ApiModelProperty(value = "分馆编号")
private String code;
@ApiModelProperty(value = "图片")
private String image;
@ApiModelProperty(value = "排序值")
private BigDecimal sortOrder;
@ApiModelProperty(value = "状态")
private String status;
@ApiModelProperty(value = "价格")
private BigDecimal price;
}
3.7 售票表
public class SellTicket extends ZwzBaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "滑雪场ID")
private String skiId;
@ApiModelProperty(value = "滑雪场名称")
private String skiName;
@ApiModelProperty(value = "买票人ID")
private String userId;
@ApiModelProperty(value = "买票人")
private String userName;
@ApiModelProperty(value = "日期")
private String date;
@ApiModelProperty(value = "价格")
private BigDecimal price;
@ApiModelProperty(value = "购买时间")
private String buyTime;
}
3.8 器材损坏表
public class EquipmentDamage extends ZwzBaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "损坏情况")
private String title;
@ApiModelProperty(value = "损坏赔偿比例")
private BigDecimal proportion;
@ApiModelProperty(value = "排序值")
private BigDecimal sortOrder;
@ApiModelProperty(value = "备注")
private String remark;
}
四、系统展示
五、核心代码
5.1 查询教练
@RequestMapping(value = "/getByPage", method = RequestMethod.GET)
@ApiOperation(value = "查询教练")
public Result<IPage<Coach>> getByPage(@ModelAttribute Coach coach ,@ModelAttribute PageVo page){
QueryWrapper<Coach> qw = new QueryWrapper<>();
if(!ZwzNullUtils.isNull(coach.getLevel())) {
qw.eq("level",coach.getLevel());
}
if(!ZwzNullUtils.isNull(coach.getContent())) {
qw.like("content",coach.getContent());
}
if(!ZwzNullUtils.isNull(coach.getName())) {
qw.like("name",coach.getName());
}
IPage<Coach> data = iCoachService.page(PageUtil.initMpPage(page),qw);
return new ResultUtil<IPage<Coach>>().setData(data);
}
5.2 教练聘请
@RequestMapping(value = "/addOne", method = RequestMethod.GET)
@ApiOperation(value = "小程序预约")
public Result<SellTicket> addOne(@RequestParam String id, @RequestParam String date){
Coach s = iCoachService.getById(id);
if(s == null) {
return ResultUtil.error("教练不存在");
}
User currUser = securityUtil.getCurrUser();
QueryWrapper<CoachEngagement> oldQw = new QueryWrapper<>();
oldQw.eq("coach_id",s.getId());
oldQw.eq("date",date);
oldQw.eq("user_id",currUser.getId());
Long oldCount = iCoachEngagementService.count(oldQw);
if(oldCount > 0) {
return ResultUtil.error("您已聘请!");
}
CoachEngagement st = new CoachEngagement();
st.setCoachId(s.getId());
st.setName(s.getName());
st.setSex(s.getSex());
st.setAge(s.getAge());
st.setContent(s.getContent());
st.setImage(s.getImage());
st.setLevel(s.getLevel());
st.setCost(s.getCost());
st.setUserId(currUser.getId());
st.setUserName(currUser.getNickname());
st.setDate(date);
iCoachEngagementService.saveOrUpdate(st);
User user = iUserService.getById(currUser.getId());
if(user != null) {
user.setMoney(user.getMoney().subtract(s.getCost()));
iUserService.saveOrUpdate(user);
}
return ResultUtil.success();
}
5.3 查询滑雪场
@RequestMapping(value = "/getByPage", method = RequestMethod.GET)
@ApiOperation(value = "查询滑雪场")
public Result<IPage<SkiField>> getByPage(@ModelAttribute SkiField skiField ,@ModelAttribute PageVo page){
QueryWrapper<SkiField> qw = new QueryWrapper<>();
if(!ZwzNullUtils.isNull(skiField.getTitle())) {
qw.like("title",skiField.getTitle());
}
if(!ZwzNullUtils.isNull(skiField.getCode())) {
qw.like("code",skiField.getCode());
}
if(!ZwzNullUtils.isNull(skiField.getStatus())) {
qw.like("status",skiField.getStatus());
}
IPage<SkiField> data = iSkiFieldService.page(PageUtil.initMpPage(page),qw);
return new ResultUtil<IPage<SkiField>>().setData(data);
}
5.4 滑雪场预定
@RequestMapping(value = "/addOne", method = RequestMethod.GET)
@ApiOperation(value = "小程序预约")
public Result<SellTicket> addOne(@RequestParam String id,@RequestParam String date){
SkiField s = iSkiFieldService.getById(id);
if(s == null) {
return ResultUtil.error("滑雪场不存在");
}
User currUser = securityUtil.getCurrUser();
QueryWrapper<SellTicket> oldQw = new QueryWrapper<>();
oldQw.eq("ski_id",s.getId());
oldQw.eq("date",date);
oldQw.eq("user_id",currUser.getId());
Long oldCount = iSellTicketService.count(oldQw);
if(oldCount > 0) {
return ResultUtil.error("您已预定!");
}
SellTicket st = new SellTicket();
st.setSkiId(s.getId());
st.setSkiName(s.getTitle());
st.setUserId(currUser.getId());
st.setUserName(currUser.getNickname());
st.setDate(date);
st.setPrice(s.getPrice());
st.setBuyTime(DateUtil.now());
iSellTicketService.saveOrUpdate(st);
User user = iUserService.getById(currUser.getId());
if(user != null) {
user.setMoney(user.getMoney().subtract(s.getPrice()));
iUserService.saveOrUpdate(user);
}
return ResultUtil.success();
}
5.5 新增滑雪器材
@RequestMapping(value = "/insert", method = RequestMethod.POST)
@ApiOperation(value = "新增器材")
public Result<Equipment> insert(Equipment equipment){
DepositRules rule = iDepositRulesService.getById(equipment.getRuleId());
if(rule == null) {
return ResultUtil.error("押金规则不存在");
}
equipment.setRuleName(rule.getTitle());
iEquipmentService.saveOrUpdate(equipment);
return new ResultUtil<Equipment>().setData(equipment);
}
六、免责说明
- 本项目仅供个人学习使用,商用授权请联系博主,否则后果自负。
- 博主拥有本软件构建后的应用系统全部内容所有权及独立的知识产权,拥有最终解释权。
- 如有问题,欢迎在仓库 Issue 留言,看到后会第一时间回复,相关意见会酌情考虑,但没有一定被采纳的承诺或保证。
下载本系统代码或使用本系统的用户,必须同意以下内容,否则请勿下载!
- 出于自愿而使用/开发本软件,了解使用本软件的风险,且同意自己承担使用本软件的风险。
- 利用本软件构建的网站的任何信息内容以及导致的任何版权纠纷和法律争议及后果和博主无关,博主对此不承担任何责任。
- 在任何情况下,对于因使用或无法使用本软件而导致的任何难以合理预估的损失(包括但不仅限于商业利润损失、业务中断与业务信息丢失),博主概不承担任何责任。
- 必须了解使用本软件的风险,博主不承诺提供一对一的技术支持、使用担保,也不承担任何因本软件而产生的难以预料的问题的相关责任。
更多推荐
已为社区贡献14条内容
所有评论(0)