网络的广泛应用给生活带来了十分的便利。所以把邮票鉴赏管理与现在网络相结合,利用java技术建设邮票鉴赏系统,实现邮票鉴赏的信息化。则对于进一步提高邮票鉴赏管理发展,丰富邮票鉴赏管理经验能起到不少的促进作用。
邮票鉴赏系统能够通过互联网得到广泛的、全面的宣传,让尽可能多的用户了解和熟知邮票鉴赏系统的便捷高效,不仅为群众提供了服务,而且也推广了自己。对于邮票鉴赏而言,若拥有自己的系统,通过系统得到更好的管理,同时提升了形象。
本系统设计的现状和趋势,从需求、结构、数据库等方面的设计到系统的实现,分别为管理员和用户的实现。论文的内容从系统的设计、描述、实现、分析、测试方面来表明开发的过程。本系统根据现实情况来选择一种可行的开发方案,借助java编程语言和MySQL数据库等实现系统的全部功能,接下来对系统进行测试,测试系统是否有漏洞和测试用户权限来完善系统,最终系统完成达到相关标准。
基于web的ssm邮票鉴赏系统源码和论文740
关键字:邮票鉴赏;java;MySQL数据库
演示视频:
基于web的ssm邮票鉴赏系统源码和论文
Abstract
The wide application of the network has brought great convenience to life. So combine the management of stamp appreciation with the current network, use java technology to build a stamp appreciation system, and realize the informatization of stamp appreciation. It can play a role in further improving the development of stamp appreciation management and enriching the experience of stamp appreciation management.
The stamp appreciation system can be widely and comprehensively publicized through the Internet, so that as many users as possible can understand and be familiar with the convenience and efficiency of the stamp appreciation system, which not only provides services for the masses, but also promotes itself. For stamp appreciation, if it has its own system, it can be better managed through the system, and its image will be improved at the same time.
The current situation and trend of the system design, from the design of requirements, structure, database, etc. to the realization of the system, are the realization of administrators and users. The content of the paper shows the development process from the aspects of system design, description, implementation, analysis and testing. The system selects a feasible development plan according to the actual situation, realizes all the functions of the system with the help of java programming language and MySQL database, etc., and then tests the system to test whether there are loopholes in the system and test user permissions to improve the system, and finally the system Complete to meet relevant standards.
Keywords: Stamp appreciation;Java;MySQL database
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 java.io.IOException;
import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
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.YoupiaoxinxiEntity;
import com.entity.view.YoupiaoxinxiView;
import com.service.YoupiaoxinxiService;
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 com.service.StoreupService;
import com.entity.StoreupEntity;
/**
* 邮票信息
* 后端接口
* @author
* @email
* @date 2022-04-06 10:33:30
*/
@RestController
@RequestMapping("/youpiaoxinxi")
public class YoupiaoxinxiController {
@Autowired
private YoupiaoxinxiService youpiaoxinxiService;
@Autowired
private StoreupService storeupService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map params,YoupiaoxinxiEntity youpiaoxinxi,
HttpServletRequest request){
EntityWrapper ew = new EntityWrapper();
PageUtils page = youpiaoxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, youpiaoxinxi), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map params,YoupiaoxinxiEntity youpiaoxinxi,
HttpServletRequest request){
EntityWrapper ew = new EntityWrapper();
PageUtils page = youpiaoxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, youpiaoxinxi), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( YoupiaoxinxiEntity youpiaoxinxi){
EntityWrapper ew = new EntityWrapper();
ew.allEq(MPUtil.allEQMapPre( youpiaoxinxi, "youpiaoxinxi"));
return R.ok().put("data", youpiaoxinxiService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(YoupiaoxinxiEntity youpiaoxinxi){
EntityWrapper< YoupiaoxinxiEntity> ew = new EntityWrapper< YoupiaoxinxiEntity>();
ew.allEq(MPUtil.allEQMapPre( youpiaoxinxi, "youpiaoxinxi"));
YoupiaoxinxiView youpiaoxinxiView = youpiaoxinxiService.selectView(ew);
return R.ok("查询邮票信息成功").put("data", youpiaoxinxiView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
YoupiaoxinxiEntity youpiaoxinxi = youpiaoxinxiService.selectById(id);
youpiaoxinxi.setClicktime(new Date());
youpiaoxinxiService.updateById(youpiaoxinxi);
return R.ok().put("data", youpiaoxinxi);
}
/**
* 前端详情
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
YoupiaoxinxiEntity youpiaoxinxi = youpiaoxinxiService.selectById(id);
youpiaoxinxi.setClicktime(new Date());
youpiaoxinxiService.updateById(youpiaoxinxi);
return R.ok().put("data", youpiaoxinxi);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody YoupiaoxinxiEntity youpiaoxinxi, HttpServletRequest request){
youpiaoxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(youpiaoxinxi);
youpiaoxinxiService.insert(youpiaoxinxi);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody YoupiaoxinxiEntity youpiaoxinxi, HttpServletRequest request){
youpiaoxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(youpiaoxinxi);
youpiaoxinxiService.insert(youpiaoxinxi);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody YoupiaoxinxiEntity youpiaoxinxi, HttpServletRequest request){
//ValidatorUtils.validateEntity(youpiaoxinxi);
youpiaoxinxiService.updateById(youpiaoxinxi);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
youpiaoxinxiService.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 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 wrapper = new EntityWrapper();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
int count = youpiaoxinxiService.selectCount(wrapper);
return R.ok().put("count", count);
}
/**
* 前端智能排序
*/
@IgnoreAuth
@RequestMapping("/autoSort")
public R autoSort(@RequestParam Map params,YoupiaoxinxiEntity youpiaoxinxi, HttpServletRequest request,String pre){
EntityWrapper ew = new EntityWrapper();
Map newMap = new HashMap();
Map param = new HashMap();
Iterator> it = param.entrySet().iterator();
while (it.hasNext()) {
Map.Entry 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", "clicktime");
params.put("order", "desc");
PageUtils page = youpiaoxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, youpiaoxinxi), params), params));
return R.ok().put("data", page);
}
/**
* 协同算法(按收藏推荐)
*/
@RequestMapping("/autoSort2")
public R autoSort2(@RequestParam Map params,YoupiaoxinxiEntity youpiaoxinxi, HttpServletRequest request){
String userId = request.getSession().getAttribute("userId").toString();
String inteltypeColumn = "youpiaofenlei";
List storeups = storeupService.selectList(new EntityWrapper().eq("type", 1).eq("userid", userId).eq("tablename", "youpiaoxinxi").orderBy("addtime", false));
List inteltypes = new ArrayList();
Integer limit = params.get("limit")==null?10:Integer.parseInt(params.get("limit").toString());
List youpiaoxinxiList = new ArrayList();
//去重
if(storeups!=null && storeups.size()>0) {
for(StoreupEntity s : storeups) {
youpiaoxinxiList.addAll(youpiaoxinxiService.selectList(new EntityWrapper().eq(inteltypeColumn, s.getInteltype())));
}
}
EntityWrapper ew = new EntityWrapper();
params.put("sort", "id");
params.put("order", "desc");
PageUtils page = youpiaoxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, youpiaoxinxi), params), params));
List pageList = (List)page.getList();
if(youpiaoxinxiList.size() params = new HashMap();
params.put("xColumn", xColumnName);
params.put("yColumn", yColumnName);
EntityWrapper ew = new EntityWrapper();
List
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 java.io.IOException;
import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
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.WenzhangxinxiEntity;
import com.entity.view.WenzhangxinxiView;
import com.service.WenzhangxinxiService;
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 com.service.StoreupService;
import com.entity.StoreupEntity;
/**
* 文章信息
* 后端接口
* @author
* @email
* @date 2022-04-06 10:33:30
*/
@RestController
@RequestMapping("/wenzhangxinxi")
public class WenzhangxinxiController {
@Autowired
private WenzhangxinxiService wenzhangxinxiService;
@Autowired
private StoreupService storeupService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map params,WenzhangxinxiEntity wenzhangxinxi,
HttpServletRequest request){
EntityWrapper ew = new EntityWrapper();
PageUtils page = wenzhangxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, wenzhangxinxi), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map params,WenzhangxinxiEntity wenzhangxinxi,
HttpServletRequest request){
EntityWrapper ew = new EntityWrapper();
PageUtils page = wenzhangxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, wenzhangxinxi), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( WenzhangxinxiEntity wenzhangxinxi){
EntityWrapper ew = new EntityWrapper();
ew.allEq(MPUtil.allEQMapPre( wenzhangxinxi, "wenzhangxinxi"));
return R.ok().put("data", wenzhangxinxiService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(WenzhangxinxiEntity wenzhangxinxi){
EntityWrapper< WenzhangxinxiEntity> ew = new EntityWrapper< WenzhangxinxiEntity>();
ew.allEq(MPUtil.allEQMapPre( wenzhangxinxi, "wenzhangxinxi"));
WenzhangxinxiView wenzhangxinxiView = wenzhangxinxiService.selectView(ew);
return R.ok("查询文章信息成功").put("data", wenzhangxinxiView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
WenzhangxinxiEntity wenzhangxinxi = wenzhangxinxiService.selectById(id);
wenzhangxinxi.setClicktime(new Date());
wenzhangxinxiService.updateById(wenzhangxinxi);
return R.ok().put("data", wenzhangxinxi);
}
/**
* 前端详情
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
WenzhangxinxiEntity wenzhangxinxi = wenzhangxinxiService.selectById(id);
wenzhangxinxi.setClicktime(new Date());
wenzhangxinxiService.updateById(wenzhangxinxi);
return R.ok().put("data", wenzhangxinxi);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody WenzhangxinxiEntity wenzhangxinxi, HttpServletRequest request){
wenzhangxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(wenzhangxinxi);
wenzhangxinxiService.insert(wenzhangxinxi);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody WenzhangxinxiEntity wenzhangxinxi, HttpServletRequest request){
wenzhangxinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(wenzhangxinxi);
wenzhangxinxiService.insert(wenzhangxinxi);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody WenzhangxinxiEntity wenzhangxinxi, HttpServletRequest request){
//ValidatorUtils.validateEntity(wenzhangxinxi);
wenzhangxinxiService.updateById(wenzhangxinxi);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
wenzhangxinxiService.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 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 wrapper = new EntityWrapper();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
int count = wenzhangxinxiService.selectCount(wrapper);
return R.ok().put("count", count);
}
/**
* 前端智能排序
*/
@IgnoreAuth
@RequestMapping("/autoSort")
public R autoSort(@RequestParam Map params,WenzhangxinxiEntity wenzhangxinxi, HttpServletRequest request,String pre){
EntityWrapper ew = new EntityWrapper();
Map newMap = new HashMap();
Map param = new HashMap();
Iterator> it = param.entrySet().iterator();
while (it.hasNext()) {
Map.Entry 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", "clicktime");
params.put("order", "desc");
PageUtils page = wenzhangxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, wenzhangxinxi), params), params));
return R.ok().put("data", page);
}
/**
* 协同算法(按收藏推荐)
*/
@RequestMapping("/autoSort2")
public R autoSort2(@RequestParam Map params,WenzhangxinxiEntity wenzhangxinxi, HttpServletRequest request){
String userId = request.getSession().getAttribute("userId").toString();
String inteltypeColumn = "youpiaofenlei";
List storeups = storeupService.selectList(new EntityWrapper().eq("type", 1).eq("userid", userId).eq("tablename", "wenzhangxinxi").orderBy("addtime", false));
List inteltypes = new ArrayList();
Integer limit = params.get("limit")==null?10:Integer.parseInt(params.get("limit").toString());
List wenzhangxinxiList = new ArrayList();
//去重
if(storeups!=null && storeups.size()>0) {
for(StoreupEntity s : storeups) {
wenzhangxinxiList.addAll(wenzhangxinxiService.selectList(new EntityWrapper().eq(inteltypeColumn, s.getInteltype())));
}
}
EntityWrapper ew = new EntityWrapper();
params.put("sort", "id");
params.put("order", "desc");
PageUtils page = wenzhangxinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, wenzhangxinxi), params), params));
List pageList = (List)page.getList();
if(wenzhangxinxiList.size()