大家好!我是程序员一帆,感谢您阅读本文,欢迎一键三连哦。
💞当前专栏:微信小程序毕业设计
精彩专栏推荐👇🏻👇🏻👇🏻
开发环境
①前端:微信小程序开发工具
② 后端:Java
框架:ssm
JDK版本:JDK1.8
服务器:tomcat7
数据库:mysql 5.7
数据库工具:Navicat12
开发软件:eclipse/myeclipse/idea
Maven包:Maven3.3.9
浏览器:谷歌浏览器
演示视频
前端:
weixin051畅阅读微信小程序-微信端
后端:
weixin051畅阅读微信小程序-服务端
原版高清演示视频-编号:
https://pan.quark.cn/s/c0c9519df9d4
源码下载地址:
https://download.csdn.net/download/2301_76953549/89089638
LW目录
【如需全文请按文末获取联系】
目录
一、项目简介
本文以实际运用为开发背景,运用软件工程原理和开发方法,它主要是采用java语言技术和mysql数据库来完成对系统的设计。整个开发过程首先对畅阅读微信小程序进行需求分析,得出畅阅读微信小程序主要功能。接着对畅阅读微信小程序进行总体设计和详细设计。总体设计主要包括小程序功能设计、小程序总体结构设计、小程序数据结构设计和小程序安全设计等;详细设计主要包括畅阅读微信小程序数据库访问的实现,主要功能模块的具体实现,模块实现关键代码等。最后对畅阅读微信小程序进行了功能测试,并对测试结果进行了分析总结,得出畅阅读微信小程序存在的不足及需要改进的地方,为以后的畅阅读微信小程序维护提供了方便,同时也为今后开发类似畅阅读微信小程序提供了借鉴和帮助。
二、系统设计
2.1软件功能模块设计
系统结构图,如图4-3所示:
2.2数据库设计
管理员信息属性图如图4-4所示。
用户信息实体属性图如图4-5所示。
书城管理实体属性图如图4-6所示。
书架管理实体属性图如图4-7所示。
三、系统项目部分截图
3.1用户前台功能模块(前端)
畅阅读微信小程序登录界面,通过填写账号、密码、登录用户类型等信息进行登录,如图5-1所示。
用户注册,通过填写用户名、密码、姓名、性别、身份证、手机等信息,输入完成后选择提交即可注册成功,如图5-2所示。
用户登录进入首页,可以进行首页、书城、书架、我的等功能模块的查看与操作,如图5-3所示。
书城,在书城页面可以查看书籍名称、分类、字数、章节、封面、作者、价格、上架日期、是否完结、内容1、内容2、内容3等信息,进行购买,加入书架,如图5-4所示。
我的,在我的页面可以查看充值信息、扣费信息、书城、购买章节、章节信息、留言板等详细信息,如图5-5所示。
3.2管理员功能模块(后端)
管理员通过填写用户名、密码、角色进行登录如图5-7所示。
在管理员功能页面可以查看首页、个人中心、用户管理、分类管理、充值信息管理、扣费信息管理、书城管理、购买章节管理、章节信息管理、书架管理、留言板管理、系统管理等内容进行相对应操作,如图5-8所示。
充值信息管理,在充值信息列表可以查看用户名、姓名、金额、日期、是否支付等信息,并可根据需要进行修改或删除等详细操作,如图5-11所示。
扣费信息管理,在扣费信息列表可以查看用户名、姓名、金额、备注、日期等内容,并可根据需要进行修改或删除等详细操作,如图5-12所示。
书城管理,在书城列表可以查看书籍名称、分类、封面、字数、章节、内容1、内容2、内容3、作者、价格、上架日期、是否完结等内容,并可根据需要进行修改或删除等详细操作,如图5-13所示。
购买章节管理,在购买章节列表可以查看书籍名称、分类、封面、价格、购买日期、用户名、姓名、是否支付等内容,并可根据需要进行发货,修改或删除等详细操作,如图5-14所示。
四、部分核心代码
4.1 用户部分
package com.controller;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;
import com.entity.KoufeixinxiEntity;
import com.entity.view.KoufeixinxiView;
import com.service.KoufeixinxiService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MPUtil;
import com.utils.CommonUtil;
/**
* 扣费信息
* 后端接口
* @author
* @email
* @date 2021-01-05 20:07:27
*/
@RestController
@RequestMapping("/koufeixinxi")
public class KoufeixinxiController {
@Autowired
private KoufeixinxiService koufeixinxiService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,KoufeixinxiEntity koufeixinxi, HttpServletRequest request){
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("yonghu")) {
koufeixinxi.setYonghuming((String)request.getSession().getAttribute("username"));
}
EntityWrapper<KoufeixinxiEntity> ew = new EntityWrapper<KoufeixinxiEntity>();
PageUtils page = koufeixinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, koufeixinxi), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,KoufeixinxiEntity koufeixinxi, HttpServletRequest request){
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("yonghu")) {
koufeixinxi.setYonghuming((String)request.getSession().getAttribute("username"));
}
EntityWrapper<KoufeixinxiEntity> ew = new EntityWrapper<KoufeixinxiEntity>();
PageUtils page = koufeixinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, koufeixinxi), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( KoufeixinxiEntity koufeixinxi){
EntityWrapper<KoufeixinxiEntity> ew = new EntityWrapper<KoufeixinxiEntity>();
ew.allEq(MPUtil.allEQMapPre( koufeixinxi, "koufeixinxi"));
return R.ok().put("data", koufeixinxiService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(KoufeixinxiEntity koufeixinxi){
EntityWrapper< KoufeixinxiEntity> ew = new EntityWrapper< KoufeixinxiEntity>();
ew.allEq(MPUtil.allEQMapPre( koufeixinxi, "koufeixinxi"));
KoufeixinxiView koufeixinxiView = koufeixinxiService.selectView(ew);
return R.ok("查询扣费信息成功").put("data", koufeixinxiView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") String id){
KoufeixinxiEntity koufeixinxi = koufeixinxiService.selectById(id);
return R.ok().put("data", koufeixinxi);
}
/**
* 前端详情
*/
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") String id){
KoufeixinxiEntity koufeixinxi = koufeixinxiService.selectById(id);
return R.ok().put("data", koufeixinxi);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody KoufeixinxiEntity koufeixinxi, HttpServletRequest request){
koufeixinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(koufeixinxi);
koufeixinxiService.insert(koufeixinxi);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody KoufeixinxiEntity koufeixinxi, HttpServletRequest request){
koufeixinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(koufeixinxi);
koufeixinxi.setUserid((Long)request.getSession().getAttribute("userId"));
koufeixinxiService.insert(koufeixinxi);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody KoufeixinxiEntity koufeixinxi, HttpServletRequest request){
//ValidatorUtils.validateEntity(koufeixinxi);
koufeixinxiService.updateById(koufeixinxi);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
koufeixinxiService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
* 提醒接口
*/
@RequestMapping("/remind/{columnName}/{type}")
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
map.put("column", columnName);
map.put("type", type);
if(type.equals("2")) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
Date remindStartDate = null;
Date remindEndDate = null;
if(map.get("remindstart")!=null) {
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindStart);
remindStartDate = c.getTime();
map.put("remindstart", sdf.format(remindStartDate));
}
if(map.get("remindend")!=null) {
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindEnd);
remindEndDate = c.getTime();
map.put("remindend", sdf.format(remindEndDate));
}
}
Wrapper<KoufeixinxiEntity> wrapper = new EntityWrapper<KoufeixinxiEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("yonghu")) {
wrapper.eq("yonghuming", (String)request.getSession().getAttribute("username"));
}
int count = koufeixinxiService.selectCount(wrapper);
return R.ok().put("count", count);
}
}
获取源码或论文
如需对应的LW或源码,以及其他定制需求,也可以点我头像查看个人简介联系。