Springboot+vue project tourism information recommendation system [source code open source]

springboot+vuespringbootvueprojecttourism

Today, let's share with you the project, which is based on SpringBoot+Vue Tourism information recommendation system with front end and back end separation , It's worth learning , give the thumbs-up 、 Collection 、 Comment on Give me more support
The source code is available at the end of the article

Catalog

Introduction

Database table structure  

Front page function module  

home page

Tourism News

News detail

Scenic spot information   ​

Food information ​

Food details

Tourist route

Line details  

Leave a message online ​

Administrator function module

Account management

Regional management

Scenic spot information management  

Local food management  

Tourism route management  

Order information management

News management

​ Edit system management ​

User function module  

Line reservation management

Personal center  

Part of the core code : 

AdminsController.java

CommonController.java

YouqinglianjieController.java

Source link

link :https://pan.baidu.com/s/1oklSr-y1IefhtWmvisSSoQ  Extraction code :cijf


Introduction

This system adopts Java technology , Adopt browser interaction mode for all business modules , choice MySQL As the database of the system , Development tool selection IntelliJ IDEA To design the system . The main function modules of tourism information recommendation system have been basically realized , The system has administrators and users .
1. home page : home page , Tourism News ( Industry information , News on the site ), Scenic spot information ( overseas , Territory , Local ), Food information , Tourist route , In line , Leave a message online , register .
2. Administrators : Account management , Regional management , Scenic spot information management , Local food management , Tourism route management , Order information management , News management , System management and other functions
 

Database table structure  

【 Collect records 】 modular , Table name :shoucangjilu

Field name

Field type

name

id

int

( Primary key )

username

varchar(255)

Collection users

xwid

int

The corresponding module id

biao

varchar(255)

Favorite modules

biaoti

varchar(255)

The title of the display

url

varchar(512)

Collection URL

ziduan

varchar(255)

Corresponding module fields

addtime

timestamp

Add the time

【 Collect records 】 modular , Table name :shoucangjilu

Field name

Field type

name

id

int

( Primary key )

username

varchar(255)

Collection users

xwid

int

The corresponding module id

biao

varchar(255)

Favorite modules

biaoti

varchar(255)

The title of the display

url

varchar(512)

Collection URL

ziduan

varchar(255)

Corresponding module fields

addtime

timestamp

Add the time

【 Administrators 】 modular , Table name :admins

Field name

Field type

name

id

int

( Primary key )

username

varchar(50)

Account number

pwd

varchar(50)

password

addtime

timestamp

Add the time

【 user 】 modular , Table name :yonghu

Field name

Field type

name

id

int

( Primary key )

yonghuming

varchar(50)

user name

mima

varchar(50)

password

xingming

varchar(50)

full name

xingbie

varchar(255)

Gender

shouji

varchar(50)

mobile phone

youxiang

varchar(50)

mailbox

shenfenzheng

varchar(50)

Id card

touxiang

varchar(255)

Head portrait

addtime

timestamp

Add the time

【 News classification 】 modular , Table name :xinwenfenlei

Field name

Field type

name

id

int

( Primary key )

fenleimingcheng

varchar(50)

Category name

addtime

timestamp

Add the time

【 Scenic spot information 】 modular , Table name :jingdianxinxi

Field name

Field type

name

id

int

( Primary key )

jingdianbianhao

varchar(50)

Scenic spot number

jingdianmingcheng

varchar(255)

Name of the scenic spot

suoshudiqu

int

The area

tupian

text

picture

kaifangshijian

varchar(255)

Open time

fujinmeishi

text

Food nearby

dizhi

varchar(255)

Address

piaojia

decimal(18, 2)

The fare

liulanliang

int

Browse volume

miaoshu

longtext

describe

addtime

timestamp

Add the time

catalog index , Field :suoshudiqu , Association table 【diqu】 Medium id Field

【 Tourist route 】 modular , Table name :lvyouxianlu

Field name

Field type

name

id

int

( Primary key )

xianlubianhao

varchar(50)

Line number

xianlumingcheng

varchar(255)

Line name

tupian

text

picture

chufadi

varchar(255)

Place of departure

tujingdi

varchar(255)

Via

zhongdian

varchar(255)

End

jiage

decimal(18, 2)

Price

liulanliang

int

Browse volume

xianlutese

longtext

Line features

xianlujianjie

longtext

Introduction to the line

addtime

timestamp

Add the time

【 Reserve 】 modular , Table name :yuding

Field name

Field type

name

id

int

( Primary key )

lvyouxianluid

int

Tourist route id

xianlubianhao

varchar(50)

Line number

xianlumingcheng

varchar(255)

Line name

chufadi

varchar(255)

Place of departure

tujingdi

varchar(255)

Via

zhongdian

varchar(255)

End

jiage

decimal(18, 2)

Price

dingdanhao

varchar(50)

The order number

yudingshijian

varchar(25)

Booking time

yudingrenxingming

varchar(50)

Name of the subscriber

lianxifangshi

varchar(50)

Contact information

zhuangtai

varchar(50)

state

beizhu

text

remarks

yudingren

varchar(50)

Booker

addtime

timestamp

Add the time

iszf

varchar(10)

Whether to pay

catalog index , Field :lvyouxianluid , Association table 【lvyouxianlu】 Middle field id

Front page function module  

home page

 

 

Tourism News

News detail

 

Scenic spot information   

Food information

Food details

Tourist route

Line details  

Leave a message online

Administrator function module

Account management

Regional management

Scenic spot information management  

Local food management  

Tourism route management  

Order information management

News management

System management

User function module  

Line reservation management

Personal center  

Part of the core code : 

AdminsController.java

/**
* Administrators */
@Controller
public class AdminsController extends BaseController
{
@Autowired
private AdminsMapper dao;
@Autowired
private AdminsService service;
/**
* Background list page
*
*/
@RequestMapping("/admins_list")
public String list()
{
// Check whether there is login , If you don't log in, jump to the login page
if(!checkLogin()){
return showError(" Not signed in yet " , "./login.do");
}
String order = Request.get("order" , "id"); // Get the... Submitted by the foreground URL Parameters order If not, set to id
String sort = Request.get("sort" , "desc"); // Get the... Submitted by the foreground URL Parameters sort If not, set to desc
int pagesize = Request.getInt("pagesize" , 12); // Get the number of rows of data on the front page
Example example = new Example(Admins.class); // Create an extended search class
Example.Criteria criteria = example.createCriteria(); // Create an extended search criteria class
String where = " 1=1 "; // The initial condition for creation is :1=1
where += getWhere(); // Get... From method url Parameters on , And written as sql Conditional statements
criteria.andCondition(where); // Write the condition into the extended condition class above
if(sort.equals("desc")){ // Judge the... Submitted by the front desk sort Whether the parameter is equal to desc In reverse order If yes, use reverse order , Otherwise, use positive order
example.orderBy(order).desc(); // hold sql Set the statements in reverse order
}else{
example.orderBy(order).asc(); // hold sql Set to positive order
}
int page = request.getParameter("page") == null ? 1 : Integer.valueOf(request.getParameter("page")); // Get the... Submitted by the foreground URL Parameters page If not, set to 1
page = Math.max(1 , page); // Take the maximum of two numbers , prevent page Less than 1
List<Admins> list = service.selectPageExample(example , page , pagesize); // Get the number of rows of the current page
// Write the list to the interface to use
assign("totalCount" , request.getAttribute("totalCount"));
assign("list" , list);
assign("orderby" , order); // Write the current sorting result into the foreground
assign("sort" , sort); // Write the current sorting result into the foreground
return json(); // Write data to the front end
}
public String getWhere()
{
_var = new LinkedHashMap(); // Reset the data
String where = " ";
// The following is the same operation , Judge whether the conditions are met , Write if yes sql sentence
if(!Request.get("username").equals("")) {
where += " AND username LIKE '%"+Request.get("username")+"%' ";
}
return where;
}
@RequestMapping("/admins_add")
public String add()
{
_var = new LinkedHashMap(); // Reset the data
return json(); // Write data to the front end
}
@RequestMapping("/admins_updt")
public String updt()
{
_var = new LinkedHashMap(); // Reset the data
int id = Request.getInt("id");
// Get row data , And assign it to the foreground jsp page
Admins mmm = service.find(id);
assign("mmm" , mmm);
assign("updtself" , 0);
return json(); // Write data to the front end
}
@RequestMapping("/admins_updtself")
public String updtself()
{
_var = new LinkedHashMap(); // Reset the data
// Update profile
int id = (int)request.getSession().getAttribute("id");
Admins mmm = service.find(id);
assign("mmm" , mmm);
assign("updtself" , 1);
return json(); // Write data to the front end
}
/**
* Add content
* @return
*/
@RequestMapping("/adminsinsert")
public String insert()
{
_var = new LinkedHashMap(); // Reset the data
String tmp="";
Admins post = new Admins(); // Create entity class
// Set the data submitted by the foreground to the entity class
post.setUsername(Request.get("username"));
post.setPwd(Request.get("pwd"));
post.setAddtime(Info.getDateStr());
service.insert(post); // insert data
int charuid = post.getId().intValue();
if(isAjax()){
return jsonResult(post);
}
return showSuccess(" Saved successfully " , Request.get("referer").equals("") ? request.getHeader("referer") : Request.get("referer"));
}
/**
* Update the content
* @return
*/
@RequestMapping("/adminsupdate")
public String update()
{
_var = new LinkedHashMap(); // Reset the data
// Create entity class
Admins post = new Admins();
// Fill the foreground form data into the entity class
if(!Request.get("username").equals(""))
post.setUsername(Request.get("username"));
if(!Request.get("pwd").equals(""))
post.setPwd(Request.get("pwd"));
if(!Request.get("addtime").equals(""))
post.setAddtime(Request.get("addtime"));
post.setId(Request.getInt("id"));
service.update(post); // Update data
int charuid = post.getId().intValue();
if(isAjax()){
return jsonResult(post);
}
if(Request.getInt("updtself") == 1){
return showSuccess(" Saved successfully " , "admins_updtself.do");
}
return showSuccess(" Saved successfully " , Request.get("referer")); // Pop up saved successfully , And jump to the... Submitted by the front desk referer page
}
/**
* Delete
*/
@RequestMapping("/admins_delete")
public String delete()
{
_var = new LinkedHashMap(); // Reset the data
if(!checkLogin()){
return showError(" Not signed in yet ");
}
int id = Request.getInt("id"); // according to id Delete a row of data
HashMap map = Query.make("admins").find(id);
service.delete(id);// according to id Delete a row of data
return showSuccess(" Delete successful ",request.getHeader("referer"));// Pop up deletion succeeded , And jump back to the previous page
}
}

CommonController.java

/**
* Public routing
*/
@Controller
public class CommonController extends BaseController{
/**
* Use ajax Check whether a field in a table already exists , Cannot submit if it already exists
* @return
*/
@RequestMapping(value = "/checkno")
@ResponseBody
public String checkon()
{
String table = request.getParameter("table");
String col = request.getParameter("col");
String checktype = request.getParameter("checktype");
String value = request.getParameter(col);
if(checktype.equals("insert")){
if(Query.make(table).where(col , value).count() > 0){
return "false";
}else{
return "true";
}
}else if(checktype.equals("update")){
String id = request.getParameter("id") == null ? "" : request.getParameter("id");
if(Query.make(table).where(col , value).where("id" , "neq" , id).count() > 0){
return "false";
}else{
return "true";
}
}
return "false";
}
/**
* Audit data , Change approval status to approved status , Click on it. yes Then it becomes No , Click on it. no Become yes
* @return
*/
@RequestMapping("/sh")
@ResponseBody
public String sh()
{
String yuan=request.getParameter("yuan");
String id=request.getParameter("id");
String tablename=request.getParameter("tablename");
String sql="";
if(yuan.equals(" yes "))
{
sql="update "+tablename+" set issh=' no ' where id="+id;
}
else
{
sql="update "+tablename+" set issh=' yes ' where id="+id;
}
new CommDAO().commOper(sql);
if(isAjax())
{
jsonResult("ok");
return "";
}
return "<script>location.href='"+request.getHeader("Referer")+"';</script>";
}
/**
* Get a row of data in the table
* @return
*/
@RequestMapping("/tableAjax")
@ResponseBody
public String tableFind()
{
String table = request.getParameter("table");
String id = request.getParameter("id");
Map map = Query.make(table).where("id" , id).find();
//JSONObject json = JSONObject.parse(map);
return JSON.toJSONString(map);//.toString();
}
/**
* Get a row data of a table
*
*/
@RequestMapping("/selectView")
public String selectView()
{
String key = request.getParameter("key");
String table = request.getParameter("table");
String value = request.getParameter("value");
Map data = Query.make(table).where(key,value).find();
return jsonResult(data);
}
/**
* Get all the data of a table
*
*/
@RequestMapping("/selectAll")
public String selectAll()
{
String table = request.getParameter("table");
Query query = Query.make(table);
if(request.getParameter("where") != null){
JSONObject where = JSON.parseObject(Request.get("where"));
for(Map.Entry entry:where.entrySet())
{
String key = (String)entry.getKey();
Object value = entry.getValue();
if(value instanceof JSONObject)
{
JSONObject w = (JSONObject) value;
query.where(key , w.getString("exp") , w.getString("value"));
}else if(value instanceof JSONArray){
JSONArray w = (JSONArray) value;
query.where(key , (String) w.get(0) , w.get(1));
}else{
query.where(key , value);
}
}
}
if(request.getParameter("limit")!=null)
{
query.limit(Request.get("limit"));
}
if(request.getParameter("order")!=null)
{
query.order(Request.get("order"));
}
if(request.getParameter("field")!=null)
{
query.field(Request.get("field"));
}
List list = query.select();
return jsonResult(list);
}
/**
* Search the data of a drop-down table
* @return
*/
@RequestMapping("/selectUpdateSearch")
@ResponseBody
public String selectUpdateSearch()
{
String table = Request.get("table");
Query query = Query.make(table);
String limit = "50";
JSONObject where = JSON.parseObject(Request.get("where"));
for(Map.Entry entry:where.entrySet())
{
String key = (String)entry.getKey();
Object value = entry.getValue();
if("limit".equals(key)){
limit = String.valueOf(value);
}else{
if(value instanceof JSONObject)
{
JSONObject w = (JSONObject) value;
query.where(key , w.getString("exp") , w.getString("value"));
}else if(value instanceof JSONArray){
JSONArray w = (JSONArray) value;
query.where(key , (String) w.get(0) , w.get(1));
}else{
query.where(key , value);
}
}
}
List list = query.order("id desc").limit(limit).select();
return JSON.toJSONString(list);
}
}

YouqinglianjieController.java

/**
* link */
@Controller
public class YouqinglianjieController extends BaseController
{
@Autowired
private YouqinglianjieMapper dao;
@Autowired
private YouqinglianjieService service;
/**
* Background list page
*
*/
@RequestMapping("/youqinglianjie_list")
public String list()
{
// Check whether there is login , If you don't log in, jump to the login page
if(!checkLogin()){
return showError(" Not signed in yet " , "./login.do");
}
String order = Request.get("order" , "id"); // Get the... Submitted by the foreground URL Parameters order If not, set to id
String sort = Request.get("sort" , "desc"); // Get the... Submitted by the foreground URL Parameters sort If not, set to desc
int pagesize = Request.getInt("pagesize" , 12); // Get the number of rows of data on the front page
Example example = new Example(Youqinglianjie.class); // Create an extended search class
Example.Criteria criteria = example.createCriteria(); // Create an extended search criteria class
String where = " 1=1 "; // The initial condition for creation is :1=1
where += getWhere(); // Get... From method url Parameters on , And written as sql Conditional statements
criteria.andCondition(where); // Write the condition into the extended condition class above
if(sort.equals("desc")){ // Judge the... Submitted by the front desk sort Whether the parameter is equal to desc In reverse order If yes, use reverse order , Otherwise, use positive order
example.orderBy(order).desc(); // hold sql Set the statements in reverse order
}else{
example.orderBy(order).asc(); // hold sql Set to positive order
}
int page = request.getParameter("page") == null ? 1 : Integer.valueOf(request.getParameter("page")); // Get the... Submitted by the foreground URL Parameters page If not, set to 1
page = Math.max(1 , page); // Take the maximum of two numbers , prevent page Less than 1
List<Youqinglianjie> list = service.selectPageExample(example , page , pagesize); // Get the number of rows of the current page
// Write the list to the interface to use
assign("totalCount" , request.getAttribute("totalCount"));
assign("list" , list);
assign("orderby" , order); // Write the current sorting result into the foreground
assign("sort" , sort); // Write the current sorting result into the foreground
return json(); // Write data to the front end
}
public String getWhere()
{
_var = new LinkedHashMap(); // Reset the data
String where = " ";
// The following is the same operation , Judge whether the conditions are met , Write if yes sql sentence
return where;
}
@RequestMapping("/youqinglianjie_add")
public String add()
{
_var = new LinkedHashMap(); // Reset the data
return json(); // Write data to the front end
}
@RequestMapping("/youqinglianjie_updt")
public String updt()
{
_var = new LinkedHashMap(); // Reset the data
int id = Request.getInt("id");
// Get row data , And assign it to the foreground jsp page
Youqinglianjie mmm = service.find(id);
assign("mmm" , mmm);
assign("updtself" , 0);
return json(); // Write data to the front end
}
/**
* Add content
* @return
*/
@RequestMapping("/youqinglianjieinsert")
public String insert()
{
_var = new LinkedHashMap(); // Reset the data
String tmp="";
Youqinglianjie post = new Youqinglianjie(); // Create entity class
// Set the data submitted by the foreground to the entity class
post.setWangzhanmingcheng(Request.get("wangzhanmingcheng"));
post.setWangzhi(Request.get("wangzhi"));
post.setAddtime(Info.getDateStr());
service.insert(post); // insert data
int charuid = post.getId().intValue();
if(isAjax()){
return jsonResult(post);
}
return showSuccess(" Saved successfully " , Request.get("referer").equals("") ? request.getHeader("referer") : Request.get("referer"));
}
/**
* Update the content
* @return
*/
@RequestMapping("/youqinglianjieupdate")
public String update()
{
_var = new LinkedHashMap(); // Reset the data
// Create entity class
Youqinglianjie post = new Youqinglianjie();
// Fill the foreground form data into the entity class
if(!Request.get("wangzhanmingcheng").equals(""))
post.setWangzhanmingcheng(Request.get("wangzhanmingcheng"));
if(!Request.get("wangzhi").equals(""))
post.setWangzhi(Request.get("wangzhi"));
if(!Request.get("addtime").equals(""))
post.setAddtime(Request.get("addtime"));
post.setId(Request.getInt("id"));
service.update(post); // Update data
int charuid = post.getId().intValue();
if(isAjax()){
return jsonResult(post);
}
return showSuccess(" Saved successfully " , Request.get("referer")); // Pop up saved successfully , And jump to the... Submitted by the front desk referer page
}
/**
* Delete
*/
@RequestMapping("/youqinglianjie_delete")
public String delete()
{
_var = new LinkedHashMap(); // Reset the data
if(!checkLogin()){
return showError(" Not signed in yet ");
}
int id = Request.getInt("id"); // according to id Delete a row of data
HashMap map = Query.make("youqinglianjie").find(id);
service.delete(id);// according to id Delete a row of data
return showSuccess(" Delete successful ",request.getHeader("referer"));// Pop up deletion succeeded , And jump back to the previous page
}
}

Source link

link :https://pan.baidu.com/s/1oklSr-y1IefhtWmvisSSoQ 
Extraction code :cijf

  Welcome to my friends give the thumbs-up , Comment on , Collection , Focus on Bloggers will share more projects with you in the future

copyright:author[qq_ eight hundred and thirty-four million two hundred and fifty],Please bring the original link to reprint, thank you. https://en.javamana.com/2022/175/202206240137402220.html