作者主页:源码空间站2022
简介:Java领域优质创作者、Java项目、学习资料、技术互助
文末获取源码
项目介绍
本项目为后台管理系统;
管理员角色包含以下功能:
管理员登录,用户管理,公告管理,服装类型管理,服装信息管理,客户信息管理,服装出租管理,服装归还管理,查询租还记录,修改个人信息,修改密码等功能。
由于本程序规模不大,可供课程设计,毕业设计学习演示之用
环境需要
1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。
2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可
4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS;
5.数据库:MySql 5.7版本;
技术栈
1. 后端:Spring SpringMVC MyBatis
2. 前端:JSP+bootstrap+jQuery
使用说明
1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件;
2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;
若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行;
3. 将项目中db.properties配置文件中的数据库配置改为自己的配置;
4. 运行项目,输入localhost:8080/
管理员账号/密码:admin/admin
运行截图
相关代码
服装信息管理控制器
@RestController
@RequestMapping("cloth")
public class ClothController extends AbstractController {
@Autowired
private ClothService clothService;
/**
* 列表
*/
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params){
//查询列表数据
Query query = new Query(params);
List<ClothEntity> clothList = clothService.queryList(query);
int total = clothService.queryTotal(query);
PageUtils pageUtil = new PageUtils(clothList, total, query.getLimit(), query.getPage());
return R.ok().put("page", pageUtil);
}
/**
* 列表
*/
@RequestMapping("/list2")
public R list2(@RequestParam Map<String, Object> params){
Query query = new Query(params);
List<ClothEntity> clothList = clothService.queryList(query);
return R.ok().put("list", clothList );
}
/**
* 信息
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
ClothEntity cloth = clothService.queryObject(id);
return R.ok().put("cloth", cloth);
}
/**
* 保存
*/
@RequestMapping("/save")
public R save(@RequestBody ClothEntity cloth){
clothService.save(cloth);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody ClothEntity cloth){
clothService.update(cloth);
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
clothService.deleteBatch(ids);
return R.ok();
}
}
客户信息管理控制器
@RestController
@RequestMapping("costumer")
public class CostumerController extends AbstractController {
@Autowired
private CostumerService costumerService;
/**
* 列表
*/
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params){
//查询列表数据
Query query = new Query(params);
List<CostumerEntity> costumerList = costumerService.queryList(query);
int total = costumerService.queryTotal(query);
PageUtils pageUtil = new PageUtils(costumerList, total, query.getLimit(), query.getPage());
return R.ok().put("page", pageUtil);
}
/**
* 列表
*/
@RequestMapping("/list2")
public R list2(@RequestParam Map<String, Object> params){
Query query = new Query(params);
List<CostumerEntity> costumerList = costumerService.queryList(query);
return R.ok().put("list", costumerList );
}
/**
* 信息
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
CostumerEntity costumer = costumerService.queryObject(id);
return R.ok().put("costumer", costumer);
}
/**
* 保存
*/
@RequestMapping("/save")
public R save(@RequestBody CostumerEntity costumer){
costumerService.save(costumer);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody CostumerEntity costumer){
costumerService.update(costumer);
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
costumerService.deleteBatch(ids);
return R.ok();
}
}
公告管理控制器
@RestController
@RequestMapping("news")
public class NewsController extends AbstractController {
@Autowired
private NewsService newsService;
/**
* 列表
*/
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params){
//查询列表数据
Query query = new Query(params);
List<NewsEntity> newsList = newsService.queryList(query);
int total = newsService.queryTotal(query);
PageUtils pageUtil = new PageUtils(newsList, total, query.getLimit(), query.getPage());
return R.ok().put("page", pageUtil);
}
/**
* 列表
*/
@RequestMapping("/list2")
public R list2(@RequestParam Map<String, Object> params){
Query query = new Query(params);
List<NewsEntity> newsList = newsService.queryList(query);
return R.ok().put("list", newsList );
}
/**
* 信息
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
NewsEntity news = newsService.queryObject(id);
return R.ok().put("news", news);
}
/**
* 保存
*/
@RequestMapping("/save")
public R save(@RequestBody NewsEntity news){
newsService.save(news);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody NewsEntity news){
newsService.update(news);
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
newsService.deleteBatch(ids);
return R.ok();
}
}
如果也想学习本系统,下面领取。关注并回复:210ssm