基于javaweb和mysql的springboot摄影工作室管理系统(java+springboot+mybaits+vue+elementui+mysql)

私信源码获取及调试交流

私信源码获取及调试交流

运行环境

Java≥8、MySQL≥5.7、Node.js≥14

开发工具

后端:eclipse/idea/myeclipse/sts等均可配置运行

前端:WebStorm/VSCode/HBuilderX等均可

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

基于javaweb的SpringBoot摄影工作室管理系统(java+springboot+mybaits+vue+elementui+mysql)

环境需要

1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。

2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;

3.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS;

4.数据库:MySql 5.7/8.0版本均可;

5.是否Maven项目:是;

技术栈

后端:SpringBoot+Mybaits

前端:Vue + elementui

使用说明

项目运行:

  1. 使用Navicat或者其它工具,在mysql中创建对应sql文件名称的数据库,并导入项目的sql文件;

  2. 使用IDEA/Eclipse/MyEclipse导入项目,导入成功后请执行maven clean;maven install命令;

  3. 将项目中application.yml配置文件中的数据库配置改为自己的配置;

  4. 运行项目,在浏览器中输入地址:

前台地址:http://localhost:8080/springbootrpj39/front/index.html

后台地址:http://localhost:8080/springbootrpj39/admin/dist/index.html

管理员 abo 密码 abo

用户:用户1 密码: 123456

注意项目文件路径中不能含有中文、空格、特殊字符等,否则图片会上传不成功。


returnResult.setStatus(ReturnCodeType.FAILURE);

try {

spotsService.updateBySQL("UPDATE t_spots SET name='" + spots.getName() + "',content='"+spots.getContent()+"', status="+spots.getStatus()+" WHERE id=" + spots.getId());

returnResult.setStatus(ReturnCodeType.SUCCESS);

} catch (Exception e) {

logger.error("修改spots失败" + e);

return returnResult;

/**

* 分页获取spots

* @return


@ResponseBody

public ReturnResult addSpots(TSpots spots, HttpServletRequest request) {

returnResult.setStatus(ReturnCodeType.FAILURE);

try {

Map<String, String> map = OperationFileUtil.multiFileUpload(request,

request.getServletContext().getRealPath("/") + "uploads\\spots\\");

String filePath = "";

for (Map.Entry<String, String> entry : map.entrySet()) {

filePath = entry.getValue();

filePath = filePath.replace(request.getServletContext().getRealPath("/"), "/");

spots.setPath(filePath);

spots.setCreatetime(new Date());

spotsService.insert(spots);


*/

@RequestMapping(value = "register")

@ResponseBody

public ReturnResult register(TUser user) {

returnResult.setStatus(ReturnCodeType.FAILURE);

try {

if (userService.checkUserByName(user.getName())) {

if (userService.register(user) >= 0) {

returnResult.setStatus(ReturnCodeType.SUCCESS);

} catch (Exception e) {

logger.error("注册失败" + e);

return returnResult;

public ReturnResult getScheduleListByPage(PageVO page,String photographerId,String start,String end) {

returnResult.setStatus(ReturnCodeType.FAILURE);

try {

Map<String, Object> resultMap = new HashMap<String, Object>();

StringBuffer sql = new StringBuffer("SELECT a.createTime,a.`status`,a.id,a.`start`,a.`end`,b.`name`,b.tel,c.`name` AS photographer FROM t_schedule a, t_user b ,t_photographer c WHERE a.userId = b.id AND a.photographerId =c.id");

if(StringUtils.isNotBlank(photographerId)){

sql.append(" AND a.photographerId="+photographerId);

if(StringUtils.isNotBlank(start)&&StringUtils.isNotBlank(end)){

sql.append(" AND a.`start` BETWEEN '"+start+"' AND '"+end+"' OR a.`end` BETWEEN '"+start+"' AND '"+end+"'");

sql.append(" GROUP BY a.id ORDER BY a.createTime DESC");

List<Map<String, Object>> results = scheduleService.selectPageBySQL(sql.toString(), page.getPage() - 1,

page.getRows());

if (!results.isEmpty() && results != null) {

try {

schedule.setStart(DateFormater.stringToDate(startdate));

schedule.setEnd(DateFormater.stringToDate(enddate));

schedule.setCreatetime(new Date());

TUser user = (TUser)session.getAttribute("user");

schedule.setUserid(user.getId());

if(scheduleService.insert(schedule)>0){

returnResult.setStatus(ReturnCodeType.SUCCESS);

} catch (Exception e) {

logger.error("新增schedule失败" + e);

return returnResult;


try {

session.getAttribute("admin");

scheduleService.updateBySQL("UPDATE t_schedule SET status=" + schedule.getStatus() + " WHERE id=" + schedule.getId());

returnResult.setStatus(ReturnCodeType.SUCCESS);

} catch (Exception e) {

logger.error("更新schedule状态失败" + e);

return returnResult;

/**

* 设置摄影师无档期或有预约

* @param schedule

* @return

*/


* 修改spots

* @param spots

* @return

*/

@RequestMapping(value = "updateSpots", method = RequestMethod.POST)

@ResponseBody

public ReturnResult updateSpots(TSpots spots) {

returnResult.setStatus(ReturnCodeType.FAILURE);

try {

spotsService.updateBySQL("UPDATE t_spots SET name='" + spots.getName() + "',content='"+spots.getContent()+"', status="+spots.getStatus()+" WHERE id=" + spots.getId());

returnResult.setStatus(ReturnCodeType.SUCCESS);

} catch (Exception e) {


List<Map<String, Object>> results = userService.selectPageBySQL(sql.toString(), page.getPage() - 1,

page.getRows());

if (!results.isEmpty() && results != null) {

int total = userService.selectCount(new TUser());

int rows = page.getRows();

rows = rows == 0 ? 10 : rows;

resultMap.put("total", (total % rows != 0 ? (total / rows + 1) : (total / rows)));

resultMap.put("page", page.getPage());

resultMap.put("records", total);

resultMap.put("rows", results);

returnResult.setStatus(ReturnCodeType.SUCCESS).setData(resultMap);


* @return

*/

@RequestMapping(value = "getSpotsListByPage", method = RequestMethod.POST)

@ResponseBody

public ReturnResult getSpotsListByPage(PageVO page) {

returnResult.setStatus(ReturnCodeType.FAILURE);

try {

Map<String, Object> resultMap = new HashMap<String, Object>();

StringBuffer sql = new StringBuffer("SELECT DISTINCT * FROM t_spots WHERE 1=1");

List<Map<String, Object>> results = spotsService.selectPageBySQL(sql.toString(), page.getPage() - 1,

page.getRows());

if (!results.isEmpty() && results != null) {


/**

* 设置摄影师无档期或有预约

* @param schedule

* @return

*/

@RequestMapping(value = "setSchedule", method = RequestMethod.POST)

@ResponseBody

public ReturnResult setSchedule(Integer photographerId,String createTimeRange,HttpSession session,String status) {

returnResult.setStatus(ReturnCodeType.FAILURE);

try {

if(photographerId!=null&&StringUtils.isNotBlank(createTimeRange)){

String start = createTimeRange.split(" - ")[0];

logger.error("分页获取spots失败" + e);

return returnResult;

/**

* 根据获取id spots

* @param id

* @return

*/

@RequestMapping(value = "getSpotsById", method = RequestMethod.POST)

@ResponseBody

public ReturnResult getSpotsById(Integer id) {


* @param session

* @return

*/

@RequestMapping("getUserInfo")

@ResponseBody

public ReturnResult getUserInfo(HttpSession session) {

returnResult.setStatus(ReturnCodeType.FAILURE);

TUser user = (TUser) session.getAttribute("user");

if (user != null) {

returnResult.setStatus(ReturnCodeType.SUCCESS).setData(user);

} else {

logger.info("获取用户信息失败:用户未登录");

return returnResult;


returnResult.setStatus(ReturnCodeType.SUCCESS).setData(spotsService.getAllSpots());

} catch (Exception e) {

logger.error("获取所有启用spots失败" + e);

return returnResult;

/**

* 获取所有5条启用的spots

* @return

*/

@RequestMapping(value = "getFiveSpots", method = RequestMethod.POST)

@ResponseBody

public ReturnResult getFiveSpots() {

returnResult.setStatus(ReturnCodeType.FAILURE);

try {


*/

@RequestMapping(value = "getAllLevel", method = RequestMethod.POST)

@ResponseBody

public ReturnResult getAllLevel(){

returnResult.setStatus(ReturnCodeType.FAILURE);

try {

returnResult.setStatus(ReturnCodeType.SUCCESS).setData(levelService.getAllLevel());

} catch (Exception e) {

logger.error("获取所有启用的level" + e);

return returnResult;

 预约管理控制层:

@Controller


sql.append(" AND a.photographerId="+photographerId);

if(StringUtils.isNotBlank(start)&&StringUtils.isNotBlank(end)){

sql.append(" AND a.`start` BETWEEN '"+start+"' AND '"+end+"' OR a.`end` BETWEEN '"+start+"' AND '"+end+"'");

sql.append(" GROUP BY a.id ORDER BY a.createTime DESC");

List<Map<String, Object>> results = scheduleService.selectPageBySQL(sql.toString(), page.getPage() - 1,

page.getRows());

if (!results.isEmpty() && results != null) {

int total = scheduleService.selectCount(new TSchedule());

int rows = page.getRows();

rows = rows == 0 ? 10 : rows;

resultMap.put("total", (total % rows != 0 ? (total / rows + 1) : (total / rows)));

logger.error("新增label失败" + e);

return returnResult;

/**

* 修改label

* @param label

* @return

*/

@RequestMapping(value = "updateLabel", method = RequestMethod.POST)

@ResponseBody

public ReturnResult updateLabel(TLabel label) {

returnResult.setStatus(ReturnCodeType.FAILURE);

try {
try {

spotsService.updateBySQL("UPDATE t_spots SET name='" + spots.getName() + "',content='"+spots.getContent()+"', status="+spots.getStatus()+" WHERE id=" + spots.getId());

returnResult.setStatus(ReturnCodeType.SUCCESS);

} catch (Exception e) {

logger.error("修改spots失败" + e);

return returnResult;

/**

* 分页获取spots

* @return

*/

@RequestMapping(value = "getSpotsListByPage", method = RequestMethod.POST)

请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述

Logo

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐