基于ssm的“游侠”旅游信息管理系统源码和论文

基于ssm的“游侠”旅游信息管理系统源码和论文190

 开发工具:idea 或eclipse
 数据库mysql5.7+
 数据库链接工具:navcat,小海豚等
  技术:ssm 

摘  要

现代经济快节奏发展以及不断完善升级的信息化技术,让传统数据信息的管理升级为软件存储,归纳,集中处理数据信息的管理方式。本“游侠”旅游信息管理系统就是在这样的大环境下诞生,其可以帮助管理者在短时间内处理完毕庞大的数据信息,使用这种软件工具可以帮助管理人员提高事务处理效率,达到事半功倍的效果。此“游侠”旅游信息管理系统利用当下成熟完善的SSM框架,使用跨平台的可开发大型商业网站的Java语言,以及最受欢迎的RDBMS应用软件之一的Mysql数据库进行程序开发.“游侠”旅游信息管理系统的开发根据操作人员需要设计的界面简洁美观,在功能模块布局上跟同类型网站保持一致,程序在实现基本要求功能时,也为数据信息面临的安全问题提供了一些实用的解决方案。可以说该程序在帮助管理者高效率地处理工作事务的同时,也实现了数据信息的整体化,规范化与自动化。

关键词:“游侠”旅游信息管理系统;SSM框架;Mysql;自动化


Abstract

The fast-paced development of the modern economy and the continuous improvement and upgrading of information technology have allowed the management of traditional data information to be upgraded to software storage, induction, and centralized management of data information. This book lending system was born in such a large environment, which can help managers to process huge data information in a short time. Using this software tool can help managers improve transaction processing efficiency and achieve double the result with half the effort. This book lending system uses the current mature and perfect SSM framework, cross-platform Java language that can be used to develop large-scale commercial websites, and Mysql database, one of the most popular RDBMS application software, for program development. It realizes the functions of book basic data management, book borrowing and return, review of registered teacher information, and announcement information release. The development of the book lending system is designed to be simple and beautiful according to the needs of the operator. The layout of the function module is consistent with the same type of website. When the program realizes the basic requirements, it also provides some practical solutions for the security problems faced by the data information. . It can be said that this program not only helps managers efficiently handle work affairs, but also realizes the integration, standardization and automation of data information.

Key WordsBook borrowing system; SSM framework; Mysql; automation

基于ssm的“游侠”旅游信息管理系统源码和论文_第1张图片基于ssm的“游侠”旅游信息管理系统源码和论文_第2张图片基于ssm的“游侠”旅游信息管理系统源码和论文_第3张图片基于ssm的“游侠”旅游信息管理系统源码和论文_第4张图片基于ssm的“游侠”旅游信息管理系统源码和论文_第5张图片基于ssm的“游侠”旅游信息管理系统源码和论文_第6张图片基于ssm的“游侠”旅游信息管理系统源码和论文_第7张图片基于ssm的“游侠”旅游信息管理系统源码和论文_第8张图片基于ssm的“游侠”旅游信息管理系统源码和论文_第9张图片基于ssm的“游侠”旅游信息管理系统源码和论文_第10张图片基于ssm的“游侠”旅游信息管理系统源码和论文_第11张图片基于ssm的“游侠”旅游信息管理系统源码和论文_第12张图片基于ssm的“游侠”旅游信息管理系统源码和论文_第13张图片基于ssm的“游侠”旅游信息管理系统源码和论文_第14张图片基于ssm的“游侠”旅游信息管理系统源码和论文_第15张图片基于ssm的“游侠”旅游信息管理系统源码和论文_第16张图片基于ssm的“游侠”旅游信息管理系统源码和论文_第17张图片基于ssm的“游侠”旅游信息管理系统源码和论文_第18张图片基于ssm的“游侠”旅游信息管理系统源码和论文_第19张图片基于ssm的“游侠”旅游信息管理系统源码和论文_第20张图片基于ssm的“游侠”旅游信息管理系统源码和论文_第21张图片基于ssm的“游侠”旅游信息管理系统源码和论文_第22张图片基于ssm的“游侠”旅游信息管理系统源码和论文_第23张图片基于ssm的“游侠”旅游信息管理系统源码和论文_第24张图片基于ssm的“游侠”旅游信息管理系统源码和论文_第25张图片基于ssm的“游侠”旅游信息管理系统源码和论文_第26张图片基于ssm的“游侠”旅游信息管理系统源码和论文_第27张图片基于ssm的“游侠”旅游信息管理系统源码和论文_第28张图片基于ssm的“游侠”旅游信息管理系统源码和论文_第29张图片基于ssm的“游侠”旅游信息管理系统源码和论文_第30张图片基于ssm的“游侠”旅游信息管理系统源码和论文_第31张图片基于ssm的“游侠”旅游信息管理系统源码和论文_第32张图片基于ssm的“游侠”旅游信息管理系统源码和论文_第33张图片基于ssm的“游侠”旅游信息管理系统源码和论文_第34张图片基于ssm的“游侠”旅游信息管理系统源码和论文_第35张图片基于ssm的“游侠”旅游信息管理系统源码和论文_第36张图片

package com.controller;


import java.text.SimpleDateFormat;
import com.alibaba.fastjson.JSONObject;
import java.util.*;

import com.entity.JiudianEntity;
import org.springframework.beans.BeanUtils;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.context.ContextLoader;
import javax.servlet.ServletContext;
import com.service.TokenService;
import com.utils.StringUtil;
import java.lang.reflect.InvocationTargetException;

import com.service.DictionaryService;
import org.apache.commons.lang3.StringUtils;
import com.annotation.IgnoreAuth;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;

import com.entity.ChepiaoOrderEntity;

import com.service.ChepiaoOrderService;
import com.entity.view.ChepiaoOrderView;
import com.service.ChepiaoService;
import com.entity.ChepiaoEntity;
import com.service.YonghuService;
import com.entity.YonghuEntity;

import com.utils.PageUtils;
import com.utils.R;

/**
 * 车票订单
 * 后端接口
 * @author
 * @email
 * @date 2021-04-14
*/
@RestController
@Controller
@RequestMapping("/chepiaoOrder")
public class ChepiaoOrderController {
    private static final Logger logger = LoggerFactory.getLogger(ChepiaoOrderController.class);

    @Autowired
    private ChepiaoOrderService chepiaoOrderService;


    @Autowired
    private TokenService tokenService;
    @Autowired
    private DictionaryService dictionaryService;



    //级联表service
    @Autowired
    private ChepiaoService chepiaoService;
    @Autowired
    private YonghuService yonghuService;


    /**
    * 后端列表
    */
    @RequestMapping("/page")
    public R page(@RequestParam Map params, HttpServletRequest request){
        logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
        String role = String.valueOf(request.getSession().getAttribute("role"));
        if(StringUtil.isNotEmpty(role) && "用户".equals(role)){
            params.put("yonghuId",request.getSession().getAttribute("userId"));
        }
        params.put("orderBy","id");
        PageUtils page = chepiaoOrderService.queryPage(params);

        //字典表数据转换
        List list =(List)page.getList();
        for(ChepiaoOrderView c:list){
            //修改对应字典表字段
            dictionaryService.dictionaryConvert(c);
        }
        return R.ok().put("data", page);
    }

    /**
    * 后端详情
    */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
        ChepiaoOrderEntity chepiaoOrder = chepiaoOrderService.selectById(id);
        if(chepiaoOrder !=null){
            //entity转view
            ChepiaoOrderView view = new ChepiaoOrderView();
            BeanUtils.copyProperties( chepiaoOrder , view );//把实体数据重构到view中

            //级联表
            ChepiaoEntity chepiao = chepiaoService.selectById(chepiaoOrder.getChepiaoId());
            if(chepiao != null){
                BeanUtils.copyProperties( chepiao , view ,new String[]{ "id", "createDate"});//把级联的数据添加到view中,并排除id和创建时间字段
                view.setChepiaoId(chepiao.getId());
            }
            //级联表
            YonghuEntity yonghu = yonghuService.selectById(chepiaoOrder.getYonghuId());
            if(yonghu != null){
                BeanUtils.copyProperties( yonghu , view ,new String[]{ "id", "createDate"});//把级联的数据添加到view中,并排除id和创建时间字段
                view.setYonghuId(yonghu.getId());
            }
            //修改对应字典表字段
            dictionaryService.dictionaryConvert(view);
            return R.ok().put("data", view);
        }else {
            return R.error(511,"查不到数据");
        }

    }

    /**
    * 后端保存
    */
    @RequestMapping("/save")
    public R save(@RequestBody ChepiaoOrderEntity chepiaoOrder, HttpServletRequest request){
        logger.debug("save方法:,,Controller:{},,chepiaoOrder:{}",this.getClass().getName(),chepiaoOrder.toString());
        chepiaoOrder.setInsertTime(new Date());
        chepiaoOrder.setCreateTime(new Date());
        chepiaoOrderService.insert(chepiaoOrder);
        return R.ok();
    }

    /**
    * 后端修改
    */
    @RequestMapping("/update")
    public R update(@RequestBody ChepiaoOrderEntity chepiaoOrder, HttpServletRequest request){
        logger.debug("update方法:,,Controller:{},,chepiaoOrder:{}",this.getClass().getName(),chepiaoOrder.toString());
        chepiaoOrderService.updateById(chepiaoOrder);//根据id更新
        return R.ok();
    }



    /**
    * 删除
    */
    @RequestMapping("/delete")
    public R delete(@RequestBody Integer[] ids){
        logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
        chepiaoOrderService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }



    /**
    * 前端列表
    */
    @RequestMapping("/list")
    public R list(@RequestParam Map params, HttpServletRequest request){
        logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
        String role = String.valueOf(request.getSession().getAttribute("role"));
        if(StringUtil.isNotEmpty(role) && "用户".equals(role)){
            params.put("yonghuId",request.getSession().getAttribute("userId"));
        }
        // 没有指定排序字段就默认id倒序
        if(StringUtil.isEmpty(String.valueOf(params.get("orderBy")))){
            params.put("orderBy","id");
        }
        PageUtils page = chepiaoOrderService.queryPage(params);

        //字典表数据转换
        List list =(List)page.getList();
        for(ChepiaoOrderView c:list){
            //修改对应字典表字段
            dictionaryService.dictionaryConvert(c);
        }
        return R.ok().put("data", page);
    }

    /**
    * 前端详情
    */
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id){
        logger.debug("detail方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
        ChepiaoOrderEntity chepiaoOrder = chepiaoOrderService.selectById(id);
            if(chepiaoOrder !=null){
                //entity转view
        ChepiaoOrderView view = new ChepiaoOrderView();
                BeanUtils.copyProperties( chepiaoOrder , view );//把实体数据重构到view中

                //级联表
                    ChepiaoEntity chepiao = chepiaoService.selectById(chepiaoOrder.getChepiaoId());
                if(chepiao != null){
                    BeanUtils.copyProperties( chepiao , view ,new String[]{ "id", "createDate"});//把级联的数据添加到view中,并排除id和创建时间字段
                    view.setChepiaoId(chepiao.getId());
                }
                //级联表
                    YonghuEntity yonghu = yonghuService.selectById(chepiaoOrder.getYonghuId());
                if(yonghu != null){
                    BeanUtils.copyProperties( yonghu , view ,new String[]{ "id", "createDate"});//把级联的数据添加到view中,并排除id和创建时间字段
                    view.setYonghuId(yonghu.getId());
                }
                //修改对应字典表字段
                dictionaryService.dictionaryConvert(view);
                return R.ok().put("data", view);
            }else {
                return R.error(511,"查不到数据");
            }
    }


    /**
    * 前端保存
    */
    @RequestMapping("/add")
    public R add(@RequestBody ChepiaoOrderEntity chepiaoOrder, HttpServletRequest request){
        logger.debug("add方法:,,Controller:{},,chepiaoOrder:{}",this.getClass().getName(),chepiaoOrder.toString());
        chepiaoOrder.setInsertTime(new Date());
        chepiaoOrder.setCreateTime(new Date());
        ChepiaoEntity chepiao = chepiaoService.selectById(chepiaoOrder.getChepiaoId());
        YonghuEntity yonghu = yonghuService.selectById((Integer) request.getSession().getAttribute("userId"));
        if(yonghu.getNewMoney() < chepiao.getChepiaoMoney()){
            return R.error("余额不足请充值");
        }
        yonghu.setNewMoney(yonghu.getNewMoney()-chepiao.getChepiaoMoney());
        yonghuService.updateById(yonghu);
        chepiaoOrderService.insert(chepiaoOrder);
        return R.ok();
    }


}

 

package com.controller;


import java.text.SimpleDateFormat;
import com.alibaba.fastjson.JSONObject;
import java.util.*;
import org.springframework.beans.BeanUtils;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.context.ContextLoader;
import javax.servlet.ServletContext;
import com.service.TokenService;
import com.utils.StringUtil;
import java.lang.reflect.InvocationTargetException;

import com.service.DictionaryService;
import org.apache.commons.lang3.StringUtils;
import com.annotation.IgnoreAuth;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;

import com.entity.JiudianLiuyanEntity;

import com.service.JiudianLiuyanService;
import com.entity.view.JiudianLiuyanView;
import com.service.JiudianService;
import com.entity.JiudianEntity;
import com.service.YonghuService;
import com.entity.YonghuEntity;

import com.utils.PageUtils;
import com.utils.R;

/**
 * 酒店留言
 * 后端接口
 * @author
 * @email
 * @date 2021-04-14
*/
@RestController
@Controller
@RequestMapping("/jiudianLiuyan")
public class JiudianLiuyanController {
    private static final Logger logger = LoggerFactory.getLogger(JiudianLiuyanController.class);

    @Autowired
    private JiudianLiuyanService jiudianLiuyanService;


    @Autowired
    private TokenService tokenService;
    @Autowired
    private DictionaryService dictionaryService;



    //级联表service
    @Autowired
    private JiudianService jiudianService;
    @Autowired
    private YonghuService yonghuService;


    /**
    * 后端列表
    */
    @RequestMapping("/page")
    public R page(@RequestParam Map params, HttpServletRequest request){
        logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
        String role = String.valueOf(request.getSession().getAttribute("role"));
        if(StringUtil.isNotEmpty(role) && "用户".equals(role)){
            params.put("yonghuId",request.getSession().getAttribute("userId"));
        }
        params.put("orderBy","id");
        PageUtils page = jiudianLiuyanService.queryPage(params);

        //字典表数据转换
        List list =(List)page.getList();
        for(JiudianLiuyanView c:list){
            //修改对应字典表字段
            dictionaryService.dictionaryConvert(c);
        }
        return R.ok().put("data", page);
    }

    /**
    * 后端详情
    */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
        JiudianLiuyanEntity jiudianLiuyan = jiudianLiuyanService.selectById(id);
        if(jiudianLiuyan !=null){
            //entity转view
            JiudianLiuyanView view = new JiudianLiuyanView();
            BeanUtils.copyProperties( jiudianLiuyan , view );//把实体数据重构到view中

            //级联表
            JiudianEntity jiudian = jiudianService.selectById(jiudianLiuyan.getJiudianId());
            if(jiudian != null){
                BeanUtils.copyProperties( jiudian , view ,new String[]{ "id", "createDate"});//把级联的数据添加到view中,并排除id和创建时间字段
                view.setJiudianId(jiudian.getId());
            }
            //级联表
            YonghuEntity yonghu = yonghuService.selectById(jiudianLiuyan.getYonghuId());
            if(yonghu != null){
                BeanUtils.copyProperties( yonghu , view ,new String[]{ "id", "createDate"});//把级联的数据添加到view中,并排除id和创建时间字段
                view.setYonghuId(yonghu.getId());
            }
            //修改对应字典表字段
            dictionaryService.dictionaryConvert(view);
            return R.ok().put("data", view);
        }else {
            return R.error(511,"查不到数据");
        }

    }

    /**
    * 后端保存
    */
    @RequestMapping("/save")
    public R save(@RequestBody JiudianLiuyanEntity jiudianLiuyan, HttpServletRequest request){
        logger.debug("save方法:,,Controller:{},,jiudianLiuyan:{}",this.getClass().getName(),jiudianLiuyan.toString());
        jiudianLiuyan.setInsertTime(new Date());
        jiudianLiuyan.setCreateTime(new Date());
        jiudianLiuyanService.insert(jiudianLiuyan);
        return R.ok();
    }

    /**
    * 后端修改
    */
    @RequestMapping("/update")
    public R update(@RequestBody JiudianLiuyanEntity jiudianLiuyan, HttpServletRequest request){
        logger.debug("update方法:,,Controller:{},,jiudianLiuyan:{}",this.getClass().getName(),jiudianLiuyan.toString());
        jiudianLiuyanService.updateById(jiudianLiuyan);//根据id更新
        return R.ok();
    }



    /**
    * 删除
    */
    @RequestMapping("/delete")
    public R delete(@RequestBody Integer[] ids){
        logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
        jiudianLiuyanService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }



    /**
    * 前端列表
    */
    @RequestMapping("/list")
    public R list(@RequestParam Map params, HttpServletRequest request){
        logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
        String role = String.valueOf(request.getSession().getAttribute("role"));
        if(StringUtil.isNotEmpty(role) && "用户".equals(role)){
            params.put("yonghuId",request.getSession().getAttribute("userId"));
        }
        // 没有指定排序字段就默认id倒序
        if(StringUtil.isEmpty(String.valueOf(params.get("orderBy")))){
            params.put("orderBy","id");
        }
        PageUtils page = jiudianLiuyanService.queryPage(params);

        //字典表数据转换
        List list =(List)page.getList();
        for(JiudianLiuyanView c:list){
            //修改对应字典表字段
            dictionaryService.dictionaryConvert(c);
        }
        return R.ok().put("data", page);
    }

    /**
    * 前端详情
    */
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id){
        logger.debug("detail方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
        JiudianLiuyanEntity jiudianLiuyan = jiudianLiuyanService.selectById(id);
            if(jiudianLiuyan !=null){
                //entity转view
        JiudianLiuyanView view = new JiudianLiuyanView();
                BeanUtils.copyProperties( jiudianLiuyan , view );//把实体数据重构到view中

                //级联表
                    JiudianEntity jiudian = jiudianService.selectById(jiudianLiuyan.getJiudianId());
                if(jiudian != null){
                    BeanUtils.copyProperties( jiudian , view ,new String[]{ "id", "createDate"});//把级联的数据添加到view中,并排除id和创建时间字段
                    view.setJiudianId(jiudian.getId());
                }
                //级联表
                    YonghuEntity yonghu = yonghuService.selectById(jiudianLiuyan.getYonghuId());
                if(yonghu != null){
                    BeanUtils.copyProperties( yonghu , view ,new String[]{ "id", "createDate"});//把级联的数据添加到view中,并排除id和创建时间字段
                    view.setYonghuId(yonghu.getId());
                }
                //修改对应字典表字段
                dictionaryService.dictionaryConvert(view);
                return R.ok().put("data", view);
            }else {
                return R.error(511,"查不到数据");
            }
    }


    /**
    * 前端保存
    */
    @RequestMapping("/add")
    public R add(@RequestBody JiudianLiuyanEntity jiudianLiuyan, HttpServletRequest request){
        logger.debug("add方法:,,Controller:{},,jiudianLiuyan:{}",this.getClass().getName(),jiudianLiuyan.toString());
        jiudianLiuyan.setInsertTime(new Date());
        jiudianLiuyan.setCreateTime(new Date());
        jiudianLiuyanService.insert(jiudianLiuyan);
        return R.ok();
    }


}

你可能感兴趣的:(旅游,java,intellij-idea,ssm)