基于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

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


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);


* @return

*/

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

@ResponseBody

public ReturnResult getLabelById(Integer id) {

returnResult.setStatus(ReturnCodeType.FAILURE);

try {

returnResult.setStatus(ReturnCodeType.SUCCESS).setData(labelService.selectByPrimaryKey(id));

} catch (Exception e) {

logger.error("根据id获取label失败" + e);

return returnResult;

} catch (Exception e) {

logger.error("检测用户名是否存在失败:" + e);

return returnResult;

/**

* 管理员查看所有的用户信息

* @param session

* @return

*/

@RequestMapping("getAllUserInfo")

@ResponseBody

schedule.setEnd(DateFormater.stringToDate("yyyy/MM/dd",end));

schedule.setPhotographerid(photographerId);

scheduleService.insert(schedule);

returnResult.setStatus(ReturnCodeType.SUCCESS);

} catch (Exception e) {

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

return returnResult;

/**

* 根据id获取schedule

* @param schedule


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);

}catch (Exception e) {

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

return returnResult;

/**

* 获取所有启用的level


returnResult.setStatus(ReturnCodeType.FAILURE);

try {

levelService.updateBySQL("UPDATE t_level SET name='" + level.getName() + "', status="+level.getStatus()+" WHERE id=" + level.getId());

returnResult.setStatus(ReturnCodeType.SUCCESS);

} catch (Exception e) {

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

return returnResult;

/**

* 根据id获取level

* @param level

* @return

*/

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

@ResponseBody

returnResult.setStatus(ReturnCodeType.SUCCESS);

} catch (Exception e) {

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

return returnResult;

/**

* 分页获取spots

* @return

*/

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

@ResponseBody

public ReturnResult getSpotsListByPage(PageVO page) {


*/

@RequestMapping(value = "login")

@ResponseBody

public ReturnResult login(TUser user, HttpSession session) {

returnResult.setStatus(ReturnCodeType.FAILURE);

try {

user = userService.login(user);

if (user != null) {

user.setPassword(null);

session.setAttribute("user", user);

returnResult.setStatus(ReturnCodeType.SUCCESS);

spots.setPath(filePath);

spots.setCreatetime(new Date());

spotsService.insert(spots);

returnResult.setStatus(ReturnCodeType.SUCCESS);

} catch (Exception e) {

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

return returnResult;

/**

* 修改spots

* @param spots

* @return

* @return

*/

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

@ResponseBody

public ReturnResult getLabelListByPage(PageVO page,String Status) {

returnResult.setStatus(ReturnCodeType.FAILURE);

try {

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

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

StringBuffer countSql = new StringBuffer("SELECT COUNT(*) AS total FROM t_label WHERE 1=1");

if(StringUtils.isNotBlank(Status)){

sql.append(" AND status="+Status);


resultMap.put("rows", results);

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

}catch (Exception e) {

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

return returnResult;

/**

* 根据获取id spots

* @param id

* @return

*/

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

@ResponseBody


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);

} else {

logger.info("获取所有的用户信息失败:管理员未登录");

} catch (Exception e) {

logger.error("获取所有的用户信息失败:" + e);

public ReturnResult getScheduleById(Integer id) {

returnResult.setStatus(ReturnCodeType.FAILURE);

try {

returnResult.setStatus(ReturnCodeType.SUCCESS).setData(scheduleService.selectByPrimaryKey(id));

} catch (Exception e) {

logger.error("根据id获取schedule失败" + e);

return returnResult;

/**

* 根据摄影师id获取schedule

* @param schedule

* @return

*/


} catch (Exception e) {

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

return returnResult;

标签管理控制层: 

@Controller

@Scope("prototype")

public class LabelController {

private static final Logger logger = LoggerFactory.getLogger(LabelController.class);

private ReturnResult returnResult = new ReturnResult();

@Resource(name = "labelService")

private ILabelService labelService;


@RequestMapping(value = "getSchedule", method = RequestMethod.GET)

@ResponseBody

public ReturnResult getSchedule(HttpSession session) {

returnResult.setStatus(ReturnCodeType.FAILURE);

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

return returnResult.setStatus(ReturnCodeType.SUCCESS).setData(scheduleService.selectBySQL("SELECT DATE_FORMAT(a.`start`,'%Y-%m-%d') AS start,DATE_FORMAT(a.`end`,'%Y-%m-%d') AS end,b.name,a.`status`,a.id,a.photographerId FROM t_schedule a,t_photographer b WHERE a.photographerId = b.id AND a.userId="+user.getId()));

/**

*删除

* @param schedule

* @return

*/

@RequestMapping(value = "deleteSchedule", method = RequestMethod.GET)

public class SpotsController {

private static final Logger logger = LoggerFactory.getLogger(SpotsController.class);

private ReturnResult returnResult = new ReturnResult();

@Resource(name = "spotsService")

private ISpotsService spotsService;

/**

* 添加拍摄景点

* @param spots

* @param HttpServletRequest

* @return

*/

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


/**

* 根据获取id spots

* @param id

* @return

*/

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

@ResponseBody

public ReturnResult getSpotsById(Integer id) {

returnResult.setStatus(ReturnCodeType.FAILURE);

try {

returnResult.setStatus(ReturnCodeType.SUCCESS).setData(spotsService.selectByPrimaryKey(id));

}catch (Exception e) {


拍摄景点管理控制层:

@Controller

@Scope("prototype")

public class SpotsController {

private static final Logger logger = LoggerFactory.getLogger(SpotsController.class);

private ReturnResult returnResult = new ReturnResult();

@Resource(name = "spotsService")

private ISpotsService spotsService;

/**

* 添加拍摄景点

* @param spots

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

Logo

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

更多推荐