时代在飞速进步,每个行业都在努力发展现在先进技术,通过这些先进的技术来提高自己的水平和优势,多功能智能手机阅读APP当然不能排除在外。多功能智能手机阅读APP是在实际应用和软件工程的开发原理之上,运用java语言以及SpringBoot框架进行开发。首先要进行需求分析,分析出多功能智能手机阅读APP的主要功能,然后设计了系统结构。整体设计包括系统的功能、系统总体结构、系统数据结构和对系统安全性进行设计;最后要对系统进行测试,还要对测试的结果进行总结和分析,为以后安卓APP的维护提供方便,也为以后类似APP的开发提供参考和帮助。这种个性化的网络安卓APP管理更重视相互协调和管理合作,能激发管理者的创造性和主动性,这对多功能智能手机阅读APP来说非常有益。
关键词:多功能智能手机阅读APP,java语言,SpringBoot框架
springboot基于Android的多功能智能手机阅读APP源码和PPT论文009
演示视频:
springboot基于Android的多功能智能手机阅读APP源码和PPT论文
Abstract
The era is advancing rapidly, and every industry is striving to develop the current advanced technology. Through these advanced technologies to improve their level and advantages, multi-functional smart phone reading APP cannot be excluded. The multifunctional smart phone reading APP is developed based on the development principles of practical applications and software engineering, using the Java language and the SpringBoot framework. First of all, we need to analyze the requirements, analyze the main functions of the multi-function smart phone reading APP, and then design the system structure. The overall design includes system functions, system overall structure, system data structure and system security design; Finally, the system should be tested, and the test results should be summarized and analyzed to provide convenience for the maintenance of Android APP in the future, as well as reference and help for the development of similar APP in the future. This personalized network Android APP management pays more attention to mutual coordination and management cooperation, which can stimulate the creativity and initiative of managers, which is very useful for multi-functional smart phone reading APP.
Keywords: multifunctional smartphone reading APP, Java language, SpringBoot framework,
目 录
package com.controller;
import java.math.BigDecimal;
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.transaction.annotation.Transactional;
import org.springframework.format.annotation.DateTimeFormat;
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.ShujiyueduEntity;
import com.entity.view.ShujiyueduView;
import com.service.ShujiyueduService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;
import java.io.IOException;
import com.service.StoreupService;
import com.entity.StoreupEntity;
/**
* 书籍阅读
* 后端接口
* @author
* @email
* @date 2023-02-09 16:27:40
*/
@RestController
@RequestMapping("/shujiyuedu")
public class ShujiyueduController {
@Autowired
private ShujiyueduService shujiyueduService;
@Autowired
private StoreupService storeupService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,ShujiyueduEntity shujiyuedu,
HttpServletRequest request){
EntityWrapper<ShujiyueduEntity> ew = new EntityWrapper<ShujiyueduEntity>();
PageUtils page = shujiyueduService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, shujiyuedu), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,ShujiyueduEntity shujiyuedu,
HttpServletRequest request){
EntityWrapper<ShujiyueduEntity> ew = new EntityWrapper<ShujiyueduEntity>();
PageUtils page = shujiyueduService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, shujiyuedu), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( ShujiyueduEntity shujiyuedu){
EntityWrapper<ShujiyueduEntity> ew = new EntityWrapper<ShujiyueduEntity>();
ew.allEq(MPUtil.allEQMapPre( shujiyuedu, "shujiyuedu"));
return R.ok().put("data", shujiyueduService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(ShujiyueduEntity shujiyuedu){
EntityWrapper< ShujiyueduEntity> ew = new EntityWrapper< ShujiyueduEntity>();
ew.allEq(MPUtil.allEQMapPre( shujiyuedu, "shujiyuedu"));
ShujiyueduView shujiyueduView = shujiyueduService.selectView(ew);
return R.ok("查询书籍阅读成功").put("data", shujiyueduView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
ShujiyueduEntity shujiyuedu = shujiyueduService.selectById(id);
shujiyuedu.setClicknum(shujiyuedu.getClicknum()+1);
shujiyuedu.setClicktime(new Date());
shujiyueduService.updateById(shujiyuedu);
return R.ok().put("data", shujiyuedu);
}
/**
* 前端详情
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
ShujiyueduEntity shujiyuedu = shujiyueduService.selectById(id);
shujiyuedu.setClicknum(shujiyuedu.getClicknum()+1);
shujiyuedu.setClicktime(new Date());
shujiyueduService.updateById(shujiyuedu);
return R.ok().put("data", shujiyuedu);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody ShujiyueduEntity shujiyuedu, HttpServletRequest request){
shujiyuedu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(shujiyuedu);
shujiyueduService.insert(shujiyuedu);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody ShujiyueduEntity shujiyuedu, HttpServletRequest request){
shujiyuedu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(shujiyuedu);
shujiyueduService.insert(shujiyuedu);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
@Transactional
public R update(@RequestBody ShujiyueduEntity shujiyuedu, HttpServletRequest request){
//ValidatorUtils.validateEntity(shujiyuedu);
shujiyueduService.updateById(shujiyuedu);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
shujiyueduService.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<ShujiyueduEntity> wrapper = new EntityWrapper<ShujiyueduEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
int count = shujiyueduService.selectCount(wrapper);
return R.ok().put("count", count);
}
/**
* 前端智能排序
*/
@IgnoreAuth
@RequestMapping("/autoSort")
public R autoSort(@RequestParam Map<String, Object> params,ShujiyueduEntity shujiyuedu, HttpServletRequest request,String pre){
EntityWrapper<ShujiyueduEntity> ew = new EntityWrapper<ShujiyueduEntity>();
Map<String, Object> newMap = new HashMap<String, Object>();
Map<String, Object> param = new HashMap<String, Object>();
Iterator<Map.Entry<String, Object>> it = param.entrySet().iterator();
while (it.hasNext()) {
Map.Entry<String, Object> entry = it.next();
String key = entry.getKey();
String newKey = entry.getKey();
if (pre.endsWith(".")) {
newMap.put(pre + newKey, entry.getValue());
} else if (StringUtils.isEmpty(pre)) {
newMap.put(newKey, entry.getValue());
} else {
newMap.put(pre + "." + newKey, entry.getValue());
}
}
params.put("sort", "clicknum");
params.put("order", "desc");
PageUtils page = shujiyueduService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, shujiyuedu), params), params));
return R.ok().put("data", page);
}
/**
* 协同算法(按收藏推荐)
*/
@RequestMapping("/autoSort2")
public R autoSort2(@RequestParam Map<String, Object> params,ShujiyueduEntity shujiyuedu, HttpServletRequest request){
String userId = request.getSession().getAttribute("userId").toString();
String inteltypeColumn = "xiaoshuofenlei";
List<StoreupEntity> storeups = storeupService.selectList(new EntityWrapper<StoreupEntity>().eq("type", 1).eq("userid", userId).eq("tablename", "shujiyuedu").orderBy("addtime", false));
List<String> inteltypes = new ArrayList<String>();
Integer limit = params.get("limit")==null?10:Integer.parseInt(params.get("limit").toString());
List<ShujiyueduEntity> shujiyueduList = new ArrayList<ShujiyueduEntity>();
//去重
if(storeups!=null && storeups.size()>0) {
for(StoreupEntity s : storeups) {
shujiyueduList.addAll(shujiyueduService.selectList(new EntityWrapper<ShujiyueduEntity>().eq(inteltypeColumn, s.getInteltype())));
}
}
EntityWrapper<ShujiyueduEntity> ew = new EntityWrapper<ShujiyueduEntity>();
params.put("sort", "id");
params.put("order", "desc");
PageUtils page = shujiyueduService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, shujiyuedu), params), params));
List<ShujiyueduEntity> pageList = (List<ShujiyueduEntity>)page.getList();
if(shujiyueduList.size()<limit) {
int toAddNum = (limit-shujiyueduList.size())<=pageList.size()?(limit-shujiyueduList.size()):pageList.size();
for(ShujiyueduEntity o1 : pageList) {
boolean addFlag = true;
for(ShujiyueduEntity o2 : shujiyueduList) {
if(o1.getId().intValue()==o2.getId().intValue()) {
addFlag = false;
break;
}
}
if(addFlag) {
shujiyueduList.add(o1);
if(--toAddNum==0) break;
}
}
} else if(shujiyueduList.size()>limit) {
shujiyueduList = shujiyueduList.subList(0, limit);
}
page.setList(shujiyueduList);
return R.ok().put("data", page);
}
}
package com.controller;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.text.ParseException;
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.transaction.annotation.Transactional;
import org.springframework.format.annotation.DateTimeFormat;
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.BixupinEntity;
import com.entity.view.BixupinView;
import com.service.BixupinService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;
import java.io.IOException;
import com.service.StoreupService;
import com.entity.StoreupEntity;
/**
* 必需品
* 后端接口
* @author
* @email
* @date 2023-03-01 17:48:58
*/
@RestController
@RequestMapping("/bixupin")
public class BixupinController {
@Autowired
private BixupinService bixupinService;
@Autowired
private StoreupService storeupService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,BixupinEntity bixupin,
HttpServletRequest request){
EntityWrapper<BixupinEntity> ew = new EntityWrapper<BixupinEntity>();
PageUtils page = bixupinService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, bixupin), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,BixupinEntity bixupin,
HttpServletRequest request){
EntityWrapper<BixupinEntity> ew = new EntityWrapper<BixupinEntity>();
PageUtils page = bixupinService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, bixupin), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( BixupinEntity bixupin){
EntityWrapper<BixupinEntity> ew = new EntityWrapper<BixupinEntity>();
ew.allEq(MPUtil.allEQMapPre( bixupin, "bixupin"));
return R.ok().put("data", bixupinService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(BixupinEntity bixupin){
EntityWrapper< BixupinEntity> ew = new EntityWrapper< BixupinEntity>();
ew.allEq(MPUtil.allEQMapPre( bixupin, "bixupin"));
BixupinView bixupinView = bixupinService.selectView(ew);
return R.ok("查询必需品成功").put("data", bixupinView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
BixupinEntity bixupin = bixupinService.selectById(id);
bixupin.setClicknum(bixupin.getClicknum()+1);
bixupin.setClicktime(new Date());
bixupinService.updateById(bixupin);
return R.ok().put("data", bixupin);
}
/**
* 前端详情
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
BixupinEntity bixupin = bixupinService.selectById(id);
bixupin.setClicknum(bixupin.getClicknum()+1);
bixupin.setClicktime(new Date());
bixupinService.updateById(bixupin);
return R.ok().put("data", bixupin);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody BixupinEntity bixupin, HttpServletRequest request){
bixupin.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(bixupin);
bixupinService.insert(bixupin);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody BixupinEntity bixupin, HttpServletRequest request){
bixupin.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(bixupin);
bixupinService.insert(bixupin);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
@Transactional
public R update(@RequestBody BixupinEntity bixupin, HttpServletRequest request){
//ValidatorUtils.validateEntity(bixupin);
bixupinService.updateById(bixupin);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
bixupinService.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<BixupinEntity> wrapper = new EntityWrapper<BixupinEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
int count = bixupinService.selectCount(wrapper);
return R.ok().put("count", count);
}
/**
* 前端智能排序
*/
@IgnoreAuth
@RequestMapping("/autoSort")
public R autoSort(@RequestParam Map<String, Object> params,BixupinEntity bixupin, HttpServletRequest request,String pre){
EntityWrapper<BixupinEntity> ew = new EntityWrapper<BixupinEntity>();
Map<String, Object> newMap = new HashMap<String, Object>();
Map<String, Object> param = new HashMap<String, Object>();
Iterator<Map.Entry<String, Object>> it = param.entrySet().iterator();
while (it.hasNext()) {
Map.Entry<String, Object> entry = it.next();
String key = entry.getKey();
String newKey = entry.getKey();
if (pre.endsWith(".")) {
newMap.put(pre + newKey, entry.getValue());
} else if (StringUtils.isEmpty(pre)) {
newMap.put(newKey, entry.getValue());
} else {
newMap.put(pre + "." + newKey, entry.getValue());
}
}
params.put("sort", "clicknum");
params.put("order", "desc");
PageUtils page = bixupinService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, bixupin), params), params));
return R.ok().put("data", page);
}
}