💕💕作者:计算机源码社
💕💕个人简介:本人七年开发经验,擅长Java、微信小程序、Python、Android等,大家有这一块的问题可以一起交流!
💕💕学习资料、程序开发、技术解答、代码讲解、文档报告
💕💕JavaWeb项目
💕💕微信小程序项目
💕💕Python项目
💕💕Android项目
1、项目介绍
邮票管理系统的开发运用java技术,MIS的总体思想,以及MYSQL等技术的支持下共同完成了该系统的开发,实现了邮票管理的信息化,使用户体验到更优秀的邮票管理管理,管理员操作将更加方便,实现目标。
对于信息化的建设,与很多发达国家相比,由于信息化程度的落后以及经费的不足,我国的邮票管理系统开发方面还是相对落后的,因此,要不断的努力探索,争取开发出一个实用的信息化的邮票管理系统,来实现邮票管理的信息化。因此本课题以邮票信息为例,目的是开发一个实用的邮票鉴赏系统。·
2、核心功能模块
考虑到实际生活中在邮票鉴赏管理方面的需要以及对该系统认真的分析,将系统权限按管理员和用户这两类涉及用户划分。
(1)管理员功能需求
管理员登陆后,主要模块包括首页,个人中心,用户管理,邮票信息管理,邮票分类管理,文章信息管理,个人分享管理,系统管理等功能。
(2)用户功能需求
用户登陆后,主要模块包括首页,邮票信息,文章信息,个人分享,个人中心,后台管理等功能。
由于不同的系统实际使用用户角色的不同,他们的业务分析也会变得有所不一样,为了论述方便接下来都将以用户功能权限下的系统业务流程来分析,如下图所展示。
2.1 登录流程
2.2 添加信息流程
2.3 删除信息流程
3、项目展示
4 核心代码
/**
* 邮票分类展示
*/
@RequestMapping("/lists")
public R list( YoupiaofenleiEntity youpiaofenlei){
EntityWrapper<YoupiaofenleiEntity> ew = new EntityWrapper<YoupiaofenleiEntity>();
ew.allEq(MPUtil.allEQMapPre( youpiaofenlei, "youpiaofenlei"));
return R.ok().put("data", youpiaofenleiService.selectListView(ew));
}
/**
* 邮票分类查询
*/
@RequestMapping("/query")
public R query(YoupiaofenleiEntity youpiaofenlei){
EntityWrapper< YoupiaofenleiEntity> ew = new EntityWrapper< YoupiaofenleiEntity>();
ew.allEq(MPUtil.allEQMapPre( youpiaofenlei, "youpiaofenlei"));
YoupiaofenleiView youpiaofenleiView = youpiaofenleiService.selectView(ew);
return R.ok("查询邮票分类成功").put("data", youpiaofenleiView);
}
/**
* 添加邮票分类
*/
@RequestMapping("/save")
public R save(@RequestBody YoupiaofenleiEntity youpiaofenlei, HttpServletRequest request){
youpiaofenlei.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(youpiaofenlei);
youpiaofenleiService.insert(youpiaofenlei);
return R.ok();
}
/**
* 修改邮票分类
*/
@RequestMapping("/update")
public R update(@RequestBody YoupiaofenleiEntity youpiaofenlei, HttpServletRequest request){
//ValidatorUtils.validateEntity(youpiaofenlei);
youpiaofenleiService.updateById(youpiaofenlei);//全部更新
return R.ok();
}
/**
* 删除邮票分类
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
youpiaofenleiService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
* 图片上传
*/
@RestController
@RequestMapping("file")
@SuppressWarnings({"unchecked","rawtypes"})
public class FileController{
@Autowired
private ConfigService configService;
/**
* 上传文件
*/
@RequestMapping("/upload")
public R upload(@RequestParam("file") MultipartFile file, String type,HttpServletRequest request) throws Exception {
if (file.isEmpty()) {
throw new EIException("上传文件不能为空");
}
String fileExt = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1);
String fileName = new Date().getTime()+"."+fileExt;
File dest = new File(request.getSession().getServletContext().getRealPath("/upload")+"/"+fileName);
file.transferTo(dest);
// FileUtils.copyFile(dest, new File("D:\\ssmpiv99\\src\\main\\webapp\\upload"+"/"+fileName)); /**修改了路径以后请将该行最前面的//注释去掉**/
if(StringUtils.isNotBlank(type) && type.equals("1")) {
ConfigEntity configEntity = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "faceFile"));
if(configEntity==null) {
configEntity = new ConfigEntity();
configEntity.setName("faceFile");
configEntity.setValue(fileName);
} else {
configEntity.setValue(fileName);
}
configService.insertOrUpdate(configEntity);
}
return R.ok().put("file", fileName);
}