博主介绍:✌全网粉丝3W+,csdn特邀作者、CSDN新星计划导师、Java领域优质创作者,掘金/华为云/阿里云/InfoQ等平台优质作者、专注于Java技术领域和学生毕业项目实战,高校老师/讲师/同行前辈交流✌
技术范围:SpringBoot、Vue、SSM、HLMT、Jsp、PHP、Nodejs、Python、爬虫、数据可视化、小程序、安卓app、大数据、物联网、机器学习等设计与开发。
主要内容:免费功能设计、开题报告、任务书、中期检查PPT、系统功能实现、代码编写、论文编写和辅导、论文降重、长期答辩答疑辅导、腾讯会议一对一专业讲解辅导答辩、模拟答辩演练、和理解代码逻辑思路。
🍅文末获取源码联系🍅
👇🏻 精彩专栏推荐订阅👇🏻 不然下次找不到哟
2022-2024年最全的计算机软件毕业设计选题大全:1000个热门选题推荐✅
感兴趣的可以先收藏起来,还有大家在毕设选题,项目以及论文编写等相关问题都可以给我留言咨询,希望帮助更多的人
目录
基于SSM的中国旅游网站管理系统+数据库+数据库表结构文档+免费远程调试
基于Springboot Vue医院管理系统+数据库脚本+文档(万字)
超市售货|超市售货管理小程序|基于微信小程序的超市售货管理系统设计与实现(源码+数据库+文档)
基于SpringBoot+vue的在线商城系统(含源码 数据库+文档免费送)
springboot+vue宠物爱心组织管理系统附赠万字文档
Springboot+vue的医疗挂号管理系统+数据库+报告+免费远程调试
基于SpringBoot+vue的在线商城系统+论文+免费远程调试
基于SpringBoot宠物医院信息管理系统【安装调试·代码讲解·文档报告】
系统介绍:
随着科技和网络的进步,计算机技术与网络、生活贴和的更加紧密。需要依靠客户端的单机系统逐渐被淘汰,利用互联网可以处理大量数据的新型系统如雨后春笋般迅速发展起来。这类系统和信息化时代的同步发展对传统的办公管理方式造成了很大的压力。当今时代,信息数据是一切的根本,是基础,想要做出决策都需要充分考虑数据,可见信息的重要性。然而传统的办公管理方式对于信息的操控越来越艰难。如何才可以改变局面,使信息数据重新为用户服务,体现价值是现在所有行业所面临的重要问题。
本基于Python的旅游景点推荐系统正是采用计算机技术和网络设计的新型系统,可以有效的把旅游信息与网络相结合,为用户提供旅游帮助和管理需求。本系统采用Mysql数据库存储数据,兼容性更强,可跨越多种平台。主要设计的内容包括景点信息、门票预订信息,用户可以分享攻略。为了可以给用户更多的权利,在系统中加入了在线留言功能。管理员在系统中可以更新景点、修改登录密码信息,管理用户的门票预订信息、资料信息等。本系统是信息化社会发展的必然产物,可以为用户提供更为高效的管理以及辅助,同时也可以改变旅游行业的局面,增加营业额。
关键词:景点信息;用户信息;门票预订信息;Python语言一个好的设计不止是功能完整,操作流畅,还要符合用户的审美和界面的友好。在进入正式系统实施前,不可缺少的步骤为系统的总体结构设计,本系统为实用性的系统,所以开发的功能都是针对旅游信息相关的。本系统的结构可以分为前台展示界面和后台管理界面。在前台主要展示的是景点和图片等信息,在后台展示的主要是管理员的管理功能,本系统的总体结构图如下图3.1所示:
详细视频演示
请联系我获取更详细的演示视频
功能截图:
登录功能模块的实现
登录功能包括用户登录和管理员登录,在登录界面设计中包括用户名和密码的检验。用户名和密码的检验过程由数据库自动完成,此过程需要1秒左右。首先由用户填写账号和密码,然后点击登录系统,数据库自行对用户名和密码进行对比,所填写数据正确方能进行登录,所填写数据错误则需要返回登录界面重新登录。管理员登录界面的设计运行界面效果如下图4.1所示:
系统首页界面的实现
系统首页是最直接的展示,用户可以对网站进行最直接的了解。在本首页界面里可以看到背景图片、功能导航栏,管理登录窗口以及景点、个人中心。系统首页界面的运行效果界面如下图4.2所示:
密码信息管理模块实现
密码信息管理是对用户的登录密码进行修改,可以防止密码的外泄,此功能非常的实用,也是一个网站必备的功能之一,密码信息管理功能的界面实现效果如下图4.3所示:
用户信息管理功能的实现
用户管理功能分为管理员管理用户信息和用户自己管理自己的信息两种,管理员可以看到用户的账号创建时间,可以删除用户的账号信息。添加用户信息功能的界面实现效果如下图4.4所示:
攻略交流功能的界面实现
用户可以发表攻略信息和管理攻略,管理员负责审核攻略,实现界面如下图4.8所示:
代码实现:
#coding:utf-8
__author__ = "ila"
import base64, copy, logging, os, time, xlrd
from django.http import JsonResponse
from django.apps import apps
from django.db.models.aggregates import Count,Sum
from .models import yonghu
from util.codes import *
from util.auth import Auth
from util.common import Common
import util.message as mes
from django.db import connection
import random
from django.core.mail import send_mail
from alipay import AliPayConfig, AliPay
from django.conf import settings
from django.shortcuts import redirect
def yonghu_register(request):
if request.method in ["POST", "GET"]:
msg = {'code': normal_code, "msg": mes.normal_code}
req_dict = request.session.get("req_dict")
error = yonghu.createbyreq(yonghu, yonghu, req_dict)
if error != None:
msg['code'] = crud_error_code
msg['msg'] = "用户已存在,请勿重复注册!"
return JsonResponse(msg)
def yonghu_login(request):
if request.method in ["POST", "GET"]:
msg = {'code': normal_code, "msg": mes.normal_code}
req_dict = request.session.get("req_dict")
datas = yonghu.getbyparams(yonghu, yonghu, req_dict)
if not datas:
msg['code'] = password_error_code
msg['msg'] = mes.password_error_code
return JsonResponse(msg)
try:
__sfsh__= yonghu.__sfsh__
except:
__sfsh__=None
if __sfsh__=='是':
if datas[0].get('sfsh')=='否':
msg['code']=other_code
msg['msg'] = "账号已锁定,请联系管理员审核!"
return JsonResponse(msg)
req_dict['id'] = datas[0].get('id')
return Auth.authenticate(Auth, yonghu, req_dict)
def yonghu_logout(request):
if request.method in ["POST", "GET"]:
msg = {
"msg": "登出成功",
"code": 0
}
return JsonResponse(msg)
def yonghu_resetPass(request):
'''
'''
if request.method in ["POST", "GET"]:
msg = {"code": normal_code, "msg": mes.normal_code}
req_dict = request.session.get("req_dict")
columns= yonghu.getallcolumn( yonghu, yonghu)
try:
__loginUserColumn__= yonghu.__loginUserColumn__
except:
__loginUserColumn__=None
username=req_dict.get(list(req_dict.keys())[0])
if __loginUserColumn__:
username_str=__loginUserColumn__
else:
username_str=username
if 'mima' in columns:
password_str='mima'
else:
password_str='password'
init_pwd = '123456'
eval('''yonghu.objects.filter({}='{}').update({}='{}')'''.format(username_str,username,password_str,init_pwd))
return JsonResponse(msg)
def yonghu_session(request):
'''
'''
if request.method in ["POST", "GET"]:
msg = {"code": normal_code,"msg": mes.normal_code, "data": {}}
req_dict={"id":request.session.get('params').get("id")}
msg['data'] = yonghu.getbyparams(yonghu, yonghu, req_dict)[0]
return JsonResponse(msg)
def yonghu_default(request):
if request.method in ["POST", "GET"]:
msg = {"code": normal_code,"msg": mes.normal_code, "data": {}}
req_dict = request.session.get("req_dict")
req_dict.update({"isdefault":"是"})
data=yonghu.getbyparams(yonghu, yonghu, req_dict)
if len(data)>0:
msg['data'] = data[0]
else:
msg['data'] = {}
return JsonResponse(msg)
def yonghu_page(request):
'''
'''
if request.method in ["POST", "GET"]:
msg = {"code": normal_code, "msg": mes.normal_code, "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":10,"list":[]}}
req_dict = request.session.get("req_dict")
#获取全部列名
columns= yonghu.getallcolumn( yonghu, yonghu)
#当前登录用户所在表
tablename = request.session.get("tablename")
#authColumn=list(__authTables__.keys())[0]
#authTable=__authTables__.get(authColumn)
# if authTable==tablename:
#params = request.session.get("params")
#req_dict[authColumn]=params.get(authColumn)
'''__authSeparate__此属性为真,params添加userid,后台只查询个人数据'''
try:
__authSeparate__=yonghu.__authSeparate__
except:
__authSeparate__=None
if __authSeparate__=="是":
tablename=request.session.get("tablename")
if tablename!="users" and 'userid' in columns:
try:
req_dict['userid']=request.session.get("params").get("id")
except:
pass
#当项目属性hasMessage为”是”,生成系统自动生成留言板的表messages,同时该表的表属性hasMessage也被设置为”是”,字段包括userid(用户id),username(用户名),content(留言内容),reply(回复)
#接口page需要区分权限,普通用户查看自己的留言和回复记录,管理员查看所有的留言和回复记录
try:
__hasMessage__=yonghu.__hasMessage__
except:
__hasMessage__=None
if __hasMessage__=="是":
tablename=request.session.get("tablename")
if tablename!="users":
req_dict["userid"]=request.session.get("params").get("id")
# 判断当前表的表属性isAdmin,为真则是管理员表
# 当表属性isAdmin=”是”,刷出来的用户表也是管理员,即page和list可以查看所有人的考试记录(同时应用于其他表)
__isAdmin__ = None
allModels = apps.get_app_config('main').get_models()
for m in allModels:
if m.__tablename__==tablename:
try:
__isAdmin__ = m.__isAdmin__
except:
__isAdmin__ = None
break
# 当前表也是有管理员权限的表
if __isAdmin__ == "是":
if req_dict.get("userid"):
del req_dict["userid"]
else:
#非管理员权限的表,判断当前表字段名是否有userid
if tablename!="users" and 'yonghu'[:7]!='discuss'and "userid" in yonghu.getallcolumn(yonghu,yonghu):
req_dict["userid"] = request.session.get("params").get("id")
#当列属性authTable有值(某个用户表)[该列的列名必须和该用户表的登陆字段名一致],则对应的表有个隐藏属性authTable为”是”,那么该用户查看该表信息时,只能查看自己的
try:
__authTables__=yonghu.__authTables__
except:
__authTables__=None
if __authTables__!=None and __authTables__!={}:
try:
del req_dict['userid']
except:
pass
for authColumn,authTable in __authTables__.items():
if authTable==tablename:
params = request.session.get("params")
req_dict[authColumn]=params.get(authColumn)
break
msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
msg['data']['pageSize'] =yonghu.page(yonghu, yonghu, req_dict)
return JsonResponse(msg)
def yonghu_autoSort(request):
'''
.智能推荐功能(表属性:[intelRecom(是/否)],新增clicktime[前端不显示该字段]字段(调用info/detail接口的时候更新),按clicktime排序查询)
主要信息列表(如商品列表,新闻列表)中使用,显示最近点击的或最新添加的5条记录就行
'''
if request.method in ["POST", "GET"]:
msg = {"code": normal_code, "msg": mes.normal_code, "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":10,"list":[]}}
req_dict = request.session.get("req_dict")
if "clicknum" in yonghu.getallcolumn(yonghu,yonghu):
req_dict['sort']='clicknum'
else:
req_dict['sort']='clicktime'
req_dict['order']='desc'
msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
msg['data']['pageSize'] = yonghu.page(yonghu,yonghu, req_dict)
return JsonResponse(msg)
def yonghu_list(request):
'''
前台分页
'''
if request.method in ["POST", "GET"]:
msg = {"code": normal_code, "msg": mes.normal_code, "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":10,"list":[]}}
req_dict = request.session.get("req_dict")
#获取全部列名
columns= yonghu.getallcolumn( yonghu, yonghu)
#表属性[foreEndList]前台list:和后台默认的list列表页相似,只是摆在前台,否:指没有此页,是:表示有此页(不需要登陆即可查看),前要登:表示有此页且需要登陆后才能查看
try:
__foreEndList__=yonghu.__foreEndList__
except:
__foreEndList__=None
if __foreEndList__=="前要登":
tablename=request.session.get("tablename")
if tablename!="users" and 'userid' in columns:
try:
req_dict['userid']=request.session.get("params").get("id")
except:
pass
#forrEndListAuth
try:
__foreEndListAuth__=yonghu.__foreEndListAuth__
except:
__foreEndListAuth__=None
#authSeparate
try:
__authSeparate__=yonghu.__authSeparate__
except:
__authSeparate__=None
if __foreEndListAuth__ =="是" and __authSeparate__=="是":
tablename=request.session.get("tablename")
if tablename!="users":
req_dict['userid']=request.session.get("params",{"id":0}).get("id")
tablename = request.session.get("tablename")
if tablename == "users" and req_dict.get("userid") != None:#判断是否存在userid列名
del req_dict["userid"]
else:
__isAdmin__ = None
allModels = apps.get_app_config('main').get_models()
for m in allModels:
if m.__tablename__==tablename:
try:
__isAdmin__ = m.__isAdmin__
except:
__isAdmin__ = None
break
if __isAdmin__ == "是":
if req_dict.get("userid"):
del req_dict["userid"]
else:
#非管理员权限的表,判断当前表字段名是否有userid
if "userid" in columns:
try:
# 本接口可以匿名访问,所以try判断是否为匿名
req_dict['userid']=request.session.get("params").get("id")
except:
pass
#当列属性authTable有值(某个用户表)[该列的列名必须和该用户表的登陆字段名一致],则对应的表有个隐藏属性authTable为”是”,那么该用户查看该表信息时,只能查看自己的
try:
__authTables__=yonghu.__authTables__
except:
__authTables__=None
if __authTables__!=None and __authTables__!={} and __foreEndListAuth__=="是":
try:
del req_dict['userid']
except:
pass
for authColumn,authTable in __authTables__.items():
if authTable==tablename:
params = request.session.get("params")
req_dict[authColumn]=params.get(authColumn)
break
if yonghu.__tablename__[:7]=="discuss":
try:
del req_dict['userid']
except:
pass
msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
msg['data']['pageSize'] = yonghu.page(yonghu, yonghu, req_dict)
return JsonResponse(msg)
def yonghu_save(request):
'''
后台新增
'''
if request.method in ["POST", "GET"]:
msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
req_dict = request.session.get("req_dict")
tablename=request.session.get("tablename")
__isAdmin__ = None
allModels = apps.get_app_config('main').get_models()
for m in allModels:
if m.__tablename__==tablename:
try:
__isAdmin__ = m.__isAdmin__
except:
__isAdmin__ = None
break
#获取全部列名
columns= yonghu.getallcolumn( yonghu, yonghu)
if tablename!='users' and req_dict.get("userid")!=None and 'userid' in columns and __isAdmin__!='是':
params=request.session.get("params")
req_dict['userid']=params.get('id')
error= yonghu.createbyreq(yonghu,yonghu, req_dict)
if error!=None:
msg['code'] = crud_error_code
msg['msg'] = error
return JsonResponse(msg)
def yonghu_add(request):
'''
前台新增
'''
if request.method in ["POST", "GET"]:
msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
req_dict = request.session.get("req_dict")
#获取全部列名
columns= yonghu.getallcolumn( yonghu, yonghu)
try:
__authSeparate__=yonghu.__authSeparate__
except:
__authSeparate__=None
if __authSeparate__=="是":
tablename=request.session.get("tablename")
if tablename!="users" and 'userid' in columns:
try:
req_dict['userid']=request.session.get("params").get("id")
except:
pass
try:
__foreEndListAuth__=yonghu.__foreEndListAuth__
except:
__foreEndListAuth__=None
if __foreEndListAuth__ and __foreEndListAuth__!="否":
tablename=request.session.get("tablename")
if tablename!="users":
req_dict['userid']=request.session.get("params").get("id")
error= yonghu.createbyreq(yonghu,yonghu, req_dict)
if error!=None:
msg['code'] = crud_error_code
msg['msg'] = error
return JsonResponse(msg)
def yonghu_thumbsup(request,id_):
'''
点赞:表属性thumbsUp[是/否],刷表新增thumbsupnum赞和crazilynum踩字段,
'''
if request.method in ["POST", "GET"]:
msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
req_dict = request.session.get("req_dict")
id_=int(id_)
type_=int(req_dict.get("type",0))
rets=yonghu.getbyid(yonghu,yonghu,id_)
update_dict={
"id":id_,
}
if type_==1:#赞
update_dict["thumbsupnum"]=int(rets[0].get('thumbsupnum'))+1
elif type_==2:#踩
update_dict["crazilynum"]=int(rets[0].get('crazilynum'))+1
error = yonghu.updatebyparams(yonghu,yonghu, update_dict)
if error!=None:
msg['code'] = crud_error_code
msg['msg'] = error
return JsonResponse(msg)
def yonghu_info(request,id_):
'''
'''
if request.method in ["POST", "GET"]:
msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
data = yonghu.getbyid(yonghu,yonghu, int(id_))
if len(data)>0:
msg['data']=data[0]
#浏览点击次数
try:
__browseClick__= yonghu.__browseClick__
except:
__browseClick__=None
if __browseClick__=="是" and "clicknum" in yonghu.getallcolumn(yonghu,yonghu):
try:
clicknum=int(data[0].get("clicknum",0))+1
except:
clicknum=0+1
click_dict={"id":int(id_),"clicknum":clicknum}
ret=yonghu.updatebyparams(yonghu,yonghu,click_dict)
if ret!=None:
msg['code'] = crud_error_code
msg['msg'] = ret
return JsonResponse(msg)
def yonghu_detail(request,id_):
'''
'''
if request.method in ["POST", "GET"]:
msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
data =yonghu.getbyid(yonghu,yonghu, int(id_))
if len(data)>0:
msg['data']=data[0]
#浏览点击次数
try:
__browseClick__= yonghu.__browseClick__
except:
__browseClick__=None
if __browseClick__=="是" and "clicknum" in yonghu.getallcolumn(yonghu,yonghu):
try:
clicknum=int(data[0].get("clicknum",0))+1
except:
clicknum=0+1
click_dict={"id":int(id_),"clicknum":clicknum}
ret=yonghu.updatebyparams(yonghu,yonghu,click_dict)
if ret!=None:
msg['code'] = crud_error_code
msg['msg'] = retfo
return JsonResponse(msg)
def yonghu_update(request):
'''
'''
if request.method in ["POST", "GET"]:
msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
req_dict = request.session.get("req_dict")
if req_dict.get("mima") and req_dict.get("password"):
if "mima" not in yonghu.getallcolumn(yonghu,yonghu) :
del req_dict["mima"]
if "password" not in yonghu.getallcolumn(yonghu,yonghu) :
del req_dict["password"]
try:
del req_dict["clicknum"]
except:
pass
error = yonghu.updatebyparams(yonghu, yonghu, req_dict)
if error!=None:
msg['code'] = crud_error_code
msg['msg'] = error
return JsonResponse(msg)
def yonghu_delete(request):
'''
批量删除
'''
if request.method in ["POST", "GET"]:
msg = {"code": normal_code, "msg": mes.normal_code, "data": {}}
req_dict = request.session.get("req_dict")
error=yonghu.deletes(yonghu,
yonghu,
req_dict.get("ids")
)
if error!=None:
msg['code'] = crud_error_code
msg['msg'] = error
return JsonResponse(msg)
def yonghu_vote(request,id_):
'''
浏览点击次数(表属性[browseClick:是/否],点击字段(clicknum),调用info/detail接口的时候后端自动+1)、投票功能(表属性[vote:是/否],投票字段(votenum),调用vote接口后端votenum+1)
统计商品或新闻的点击次数;提供新闻的投票功能
'''
if request.method in ["POST", "GET"]:
msg = {"code": normal_code, "msg": mes.normal_code}
data= yonghu.getbyid(yonghu, yonghu, int(id_))
for i in data:
votenum=i.get('votenum')
if votenum!=None:
params={"id":int(id_),"votenum":votenum+1}
error=yonghu.updatebyparams(yonghu,yonghu,params)
if error!=None:
msg['code'] = crud_error_code
msg['msg'] = error
return JsonResponse(msg)
def yonghu_importExcel(request):
if request.method in ["POST", "GET"]:
msg = {"code": normal_code, "msg": "成功", "data": {}}
excel_file = request.FILES.get("file", "")
file_type = excel_file.name.split('.')[1]
if file_type in ['xlsx', 'xls']:
data = xlrd.open_workbook(filename=None, file_contents=excel_file.read())
table = data.sheets()[0]
rows = table.nrows
try:
for row in range(1, rows):
row_values = table.row_values(row)
req_dict = {}
yonghu.createbyreq(yonghu, yonghu, req_dict)
except:
pass
else:
msg.code = 500
msg.msg = "文件类型错误"
return JsonResponse(msg)
def yonghu_sendemail(request):
if request.method in ["POST", "GET"]:
req_dict = request.session.get("req_dict")
code = random.sample(['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 4)
to = []
to.append(req_dict['email'])
send_mail('用户注册', '您的注册验证码是【'+''.join(code)+'】,请不要把验证码泄漏给其他人,如非本人请勿操作。', 'yclw9@qq.com', to, fail_silently = False)
cursor = connection.cursor()
cursor.execute("insert into emailregistercode(email,role,code) values('"+req_dict['email']+"','用户','"+''.join(code)+"')")
msg = {
"msg": "发送成功",
"code": 0
}
return JsonResponse(msg)
def yonghu_autoSort2(request):
if request.method in ["POST", "GET"]:
req_dict = request.session.get("req_dict")
cursor = connection.cursor()
leixing = set()
try:
cursor.execute("select inteltype from storeup where userid = %d"%(request.session.get("params").get("id"))+" and tablename = 'yonghu' order by addtime desc")
rows = cursor.fetchall()
for row in rows:
for item in row:
leixing.add(item)
except:
leixing = set()
L = []
cursor.execute("select * from yonghu where $intelRecomColumn in ('%s"%("','").join(leixing)+"') union all select * from yonghu where $intelRecomColumn not in('%s"%("','").join(leixing)+"')")
desc = cursor.description
data_dict = [dict(zip([col[0] for col in desc], row)) for row in cursor.fetchall()]
for online_dict in data_dict:
for key in online_dict:
if 'datetime.datetime' in str(type(online_dict[key])):
online_dict[key] = online_dict[key].strftime(
"%Y-%m-%d %H:%M:%S")
else:
pass
L.append(online_dict)
return JsonResponse({"code": 0, "msg": '', "data":{"currPage":1,"totalPage":1,"total":1,"pageSize":5,"list": L[0:6]}})
def yonghu_value(request, xColumnName, yColumnName, timeStatType):
if request.method in ["POST", "GET"]:
msg = {"code": normal_code, "msg": "成功", "data": {}}
where = ' where 1 = 1 '
sql = ''
if timeStatType == '日':
sql = "SELECT DATE_FORMAT({0}, '%Y-%m-%d') {0}, sum({1}) total FROM yonghu {2} GROUP BY DATE_FORMAT({0}, '%Y-%m-%d')".format(xColumnName, yColumnName, where, '%Y-%m-%d')
if timeStatType == '月':
sql = "SELECT DATE_FORMAT({0}, '%Y-%m') {0}, sum({1}) total FROM yonghu {2} GROUP BY DATE_FORMAT({0}, '%Y-%m')".format(xColumnName, yColumnName, where, '%Y-%m')
if timeStatType == '年':
sql = "SELECT DATE_FORMAT({0}, '%Y') {0}, sum({1}) total FROM yonghu {2} GROUP BY DATE_FORMAT({0}, '%Y')".format(xColumnName, yColumnName, where, '%Y')
L = []
cursor = connection.cursor()
cursor.execute(sql)
desc = cursor.description
data_dict = [dict(zip([col[0] for col in desc], row)) for row in cursor.fetchall()]
for online_dict in data_dict:
for key in online_dict:
if 'datetime.datetime' in str(type(online_dict[key])):
online_dict[key] = online_dict[key].strftime(
"%Y-%m-%d %H:%M:%S")
else:
pass
L.append(online_dict)
msg['data'] = L
return JsonResponse(msg)
def yonghu_o_value(request, xColumnName, yColumnName):
if request.method in ["POST", "GET"]:
msg = {"code": normal_code, "msg": "成功", "data": {}}
where = ' where 1 = 1 '
sql = "SELECT {0}, sum({1}) AS total FROM yonghu {2} GROUP BY {0}".format(xColumnName, yColumnName, where)
L = []
cursor = connection.cursor()
cursor.execute(sql)
desc = cursor.description
data_dict = [dict(zip([col[0] for col in desc], row)) for row in cursor.fetchall()]
for online_dict in data_dict:
for key in online_dict:
if 'datetime.datetime' in str(type(online_dict[key])):
online_dict[key] = online_dict[key].strftime(
"%Y-%m-%d %H:%M:%S")
else:
pass
L.append(online_dict)
msg['data'] = L
return JsonResponse(msg)
def yonghu_alipay(request):
if request.method in ["POST", "GET"]:
alipay = AliPay(
appid=settings.ALIPAY_APP_ID,
app_notify_url=None,
app_private_key_string=settings.APP_PRIVATE_KEY_STRING,
alipay_public_key_string=settings.ALIPAY_PUBLIC_KEY_STRING,
sign_type=settings.ALIPAY_SIGN_TYPE,
debug=True,
config=AliPayConfig(timeout=15)
)
req_dict = request.session.get("req_dict")
order_string = alipay.api_alipay_trade_page_pay(
out_trade_no=req_dict['tradeno'],
total_amount=req_dict['totalamount'],
subject=req_dict['subject'],
return_url='http://localhost:8080/djangomg217/yonghu/notify',
#notify_url=''
)
pay_url = 'https://openapi.alipaydev.com/gateway.do?' + order_string
pay_url = '<form name="punchout_form" method="post" action="{0}"><input type="hidden" name="biz_content" ><input type="submit" value="立即支付" style="display: none"></form>'.format(pay_url)
return JsonResponse({'code': 0, "data": pay_url})
def yonghu_notify(request):
if request.method in ["POST", "GET"]:
req_dict = request.session.get("req_dict")
out_trade_no = req_dict['out_trade_no']
cursor = connection.cursor()
return redirect('http://localhost:8080/djangomg217/admin/dist/index.html#/yonghu')
论文参考:
1 绪 论
1.1研究背景与意义
1.2系统研究现状
1.3 论文主要工作内容
2 系统关键技术
2.1 java简介
2.2 MySQL数据库
2.3 B/S结构
2.4 SpringBoot框架
2.5 VUE框架
3 系统分析
3.1 系统可行性分析
3.1.1 技术可行性
3.1.2 操作可行性
3.1.3 经济可行性
3.1.4 法律可行性
3.2 系统性能分析
3.3 系统功能分析
3.4 系统流程分析
3.4.1 数据开发流程
3.4.2 用户登录流程
3.4.3 系统操作流程
3.4.4 添加信息流程
3.4.5 修改信息流程
3.4.6 删除信息流程
4 系统设计
4.1 系统概要
4.2 系统结构设计
4.3数据库设计
4.3.1 数据库设计原则
4.3.3 数据库表设计
4.4 系统时序图
4.4.1 注册时序图
4.4.2 登录时序图
4.4.3 管理员修改用户信息时序图
4.4.4 管理员管理系统信息时序图
5 系统的实现
5.1前台功能实现
5.1.1系统首页页面
5.1.2个人中心
5.2后台管理员功能实现
6 系统测试
6.1 测试环境
6.2 测试目的
6.3 测试概述
6.4 单元测试
6.4.1 注册测试
6.4.2 登录测试
6.5 集成测试
结 论
参考文献
致 谢
推荐项目:
基于SSM的中国旅游网站管理系统+数据库+数据库表结构文档+免费远程调试
基于Springboot Vue医院管理系统+数据库脚本+文档(万字)
超市售货|超市售货管理小程序|基于微信小程序的超市售货管理系统设计与实现(源码+数据库+文档)
基于SpringBoot+vue的在线商城系统(含源码 数据库+文档免费送)
基于springboot+vue酒店客房管理系统+文档
微信小程序的二手物品交易平台+文档
springboot学科竞赛管理+文档
网上花店微信小程序+文档
springboot+vue宠物爱心组织管理系统附赠万字文档
Springboot+vue的医疗挂号管理系统+数据库+报告+免费远程调试
springboot 学生成绩管理系统+文档
基于SpringBoot+vue的在线商城系统+论文+免费远程调试
基于SpringBoot宠物医院信息管理系统【安装调试·代码讲解·文档报告】
为什么选择我
博主本身从事开发软件开发、有丰富的编程能力和水平、累积给上千名同学进行辅导、Java领域优质创作者,掘金/华为云/阿里云/InfoQ等平台优质作者、专注于Java技术领域和学生毕业项目实战,高校老师/讲师/同行前辈交流和合作。
源码获取:
大家点赞、收藏、关注、评论啦 、查看👇🏻获取联系方式👇🏻
精彩专栏推荐订阅:在下方专栏👇🏻