源码获取:博客首页 "资源" 里下载!

一、项目简述

功能: 前后用户的登录注册,婚纱照片分类,查看,摄影师预 订,后台订单管理,图片管理等等。

二、项目运行

环境配置: Jdk1.8 + Tomcat8.5 + mysql + Eclispe (IntelliJ IDEA,Eclispe,MyEclispe,Sts 都支持)

项目技术: Jdbc+ Servlert + html+ css + JavaScript + JQuery + Ajax + Fileupload

作品控制器:

/*** * 作品控制器**/
@Controller
@Scope("prototype")
public class WorksController {private static final Logger logger = LoggerFactory.getLogger(WorksController.class);private ReturnResult returnResult = new ReturnResult();@Resource(name = "worksService")private IWorksService worksService;@Resource(name = "attachmentService")private IAttachmentService attachmentService;/*** 添加作品* * @param works* @param HttpServletRequest* @return*/@RequestMapping(value = "addWorks", method = RequestMethod.POST)@ResponseBodypublic ReturnResult addWorks(TWorks works, HttpServletRequest request) {returnResult.setStatus(ReturnCodeType.FAILURE);try {Map<String, String> map = OperationFileUtil.multiFileUpload(request,request.getServletContext().getRealPath("/") + "uploads\\images\\");works.setCreatetime(new Date());worksService.insert(works);//插入附件int worksId = works.getId();for (Map.Entry<String, String> entry : map.entrySet()) {TAttachment attachment = new TAttachment();attachment.setWorksid(worksId);attachment.setPath(entry.getValue().replace(request.getServletContext().getRealPath("/"), "/"));attachment.setStatus("0");attachment.setCreatetime(new Date());attachmentService.insert(attachment);}returnResult.setStatus(ReturnCodeType.SUCCESS);} catch (Exception e) {logger.error("新增works失败" + e);e.printStackTrace();}return returnResult;}/*** 修改works状态* @param works* @return*/@RequestMapping(value = "updateWorksStatus", method = RequestMethod.GET)@ResponseBodypublic ReturnResult updateWorksStatus(TWorks works) {returnResult.setStatus(ReturnCodeType.FAILURE);try {worksService.updateBySQL("UPDATE t_works SET status=" + works.getStatus() + " WHERE id=" + works.getId());returnResult.setStatus(ReturnCodeType.SUCCESS);} catch (Exception e) {logger.error("更新works状态失败" + e);}return returnResult;}/*** 修改works封面* @param works* @return*/@RequestMapping(value = "updateWorksPath", method = RequestMethod.POST)@ResponseBodypublic ReturnResult updateWorksPath(TWorks works,HttpServletRequest request) {returnResult.setStatus(ReturnCodeType.FAILURE);try {Map<String, String> map = OperationFileUtil.multiFileUpload(request,request.getServletContext().getRealPath("/") + "uploads\\images\\");String filePath = "";for (Map.Entry<String, String> entry : map.entrySet()) {filePath = entry.getValue();}filePath = filePath.replace(request.getServletContext().getRealPath("/"), "/").replace("\\", "/");worksService.updateBySQL("UPDATE t_works SET path='" + filePath + "' WHERE id=" + works.getId());returnResult.setStatus(ReturnCodeType.SUCCESS);} catch (Exception e) {logger.error(" 修改works封面失败" + e);}return returnResult;}/*** 修改works的title和content* @param works* @return*/@RequestMapping(value = "updateWorks", method = RequestMethod.POST)@ResponseBodypublic ReturnResult updateWorks(TWorks works) {returnResult.setStatus(ReturnCodeType.FAILURE);try {worksService.updateBySQL("UPDATE t_works SET title='" + works.getTitle() + "',content='"+works.getContent()+"' WHERE id=" + works.getId());returnResult.setStatus(ReturnCodeType.SUCCESS);} catch (Exception e) {logger.error("修改works失败" + e);}return returnResult;}/*** 根据id获取Works 的照片* @param Works* @return*/@RequestMapping(value = "getWorksImgById", method = RequestMethod.POST)@ResponseBodypublic ReturnResult getWorksImgById(Integer id) {returnResult.setStatus(ReturnCodeType.FAILURE);try {returnResult.setStatus(ReturnCodeType.SUCCESS).setData(worksService.selectBySQL("SELECT path FROM t_attachment WHERE worksId="+id));} catch (Exception e) {logger.error("根据id获取Works 的照片 失败" + e);}return returnResult;}/*** 根据id获取Works * @param Works* @return*/@RequestMapping(value = "getWorksById")@ResponseBodypublic ReturnResult getWorksById(Integer id) {returnResult.setStatus(ReturnCodeType.FAILURE);try {returnResult.setStatus(ReturnCodeType.SUCCESS).setData(worksService.selectByPrimaryKey(id));} catch (Exception e) {logger.error("根据id获取Works失败" + e);}return returnResult;}/*** 根据id获取Works 用户视图* @param Works* @return*/@RequestMapping(value = "getWorks")@ResponseBodypublic ReturnResult getWorks(Integer id) {returnResult.setStatus(ReturnCodeType.FAILURE);try {returnResult.setStatus(ReturnCodeType.SUCCESS).setData(worksService.getWorks(id));} catch (Exception e) {logger.error("根据id获取Works失败" + e);}return returnResult;}/*** 根据photographerid获取Works * @param Works* @return*/@RequestMapping(value = "getWorksByPhotographerId", method = RequestMethod.GET)@ResponseBodypublic ReturnResult getWorksByPhotographerId(Integer id) {returnResult.setStatus(ReturnCodeType.FAILURE);try {returnResult.setStatus(ReturnCodeType.SUCCESS).setData(worksService.getWorksByPhotographerId(id));} catch (Exception e) {logger.error("根据photographerid获取Works失败" + e);}return returnResult;}/*** 分页获取works* @return*/@RequestMapping(value = "getWorksListByPage", method = RequestMethod.POST)@ResponseBodypublic ReturnResult getWorksListByPage(PageVO page,String photographerId,String spotsId,String status) {returnResult.setStatus(ReturnCodeType.FAILURE);try {Map<String, Object> resultMap = new HashMap<String, Object>();StringBuffer sql = new StringBuffer("SELECT a.*,b.`name` AS photographer,c.`name` AS spots FROM t_works a,t_photographer b,t_spots c WHERE a.photographerId=b.id AND a.spotsId=c.id");StringBuffer countSql = new StringBuffer("SELECT COUNT(*) AS total FROM t_works a,t_photographer b,t_spots c WHERE a.photographerId=b.id AND a.spotsId=c.id");if(StringUtils.isNotBlank(photographerId)){sql.append(" AND b.id="+photographerId);countSql.append(" AND b.id="+photographerId);}if(StringUtils.isNotBlank(spotsId)){sql.append(" AND c.id="+spotsId);countSql.append(" AND c.id="+spotsId);}if(StringUtils.isNotBlank(status)){sql.append(" AND a.status="+status);countSql.append(" AND a.status="+status);}List<Map<String, Object>> results = worksService.selectPageBySQL(sql.toString(), page.getPage() - 1,page.getRows());if (!results.isEmpty() && results != null) {int total = Integer.valueOf(worksService.selectBySQL(countSql.toString()).get(0).get("total").toString());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);}}catch (Exception e) {logger.error("分页获取works失败" + e);}return returnResult;}/*** 分页获取启用的works* @return*/@RequestMapping(value = "getWorksListByPageStatus", method = RequestMethod.POST)@ResponseBodypublic ReturnResult getWorksListByPageStatus(String sord,String spotsId) {returnResult.setStatus(ReturnCodeType.FAILURE);try {String sql = "SELECT * FROM t_works WHERE status=0";if(StringUtils.isNotBlank(sord)){sql="SELECT * FROM t_works WHERE status=0 ORDER BY id DESC";}if(StringUtils.isNotBlank(spotsId)){sql = "SELECT * FROM t_works WHERE status=0 AND spotsId="+spotsId;}returnResult.setStatus(ReturnCodeType.SUCCESS).setData(worksService.selectBySQL(sql));}catch (Exception e) {logger.error("分页获取启用的works失败" + e);}return returnResult;}
}

摄影师控制器:

/*** * 摄影师控制器**/
@Controller
@Scope("prototype")
public class PhotographerController {private static final Logger logger = LoggerFactory.getLogger(PhotographerController.class);private ReturnResult returnResult = new ReturnResult();@Resource(name = "photographerService")private IPhotographerService photographerService;@Resource(name = "photographerLabelService")IPhotographerLabelService photographerLabelService;@Resource(name = "photographerLevelService")IPhotographerLevelService photographerLevelService;@Resource(name = "photographerSpotsService")IPhotographerSpotsService photographerSpotsService;/*** 添加摄影师* * @param photographer* @param HttpServletRequest* @return*/@RequestMapping(value = "addPhotographer", method = RequestMethod.POST)@ResponseBodypublic ReturnResult addPhotographer(TPhotographer photographer, HttpServletRequest request, Integer labelId,Integer levelId, Integer spotsId) {returnResult.setStatus(ReturnCodeType.FAILURE);try {Map<String, String> map = OperationFileUtil.multiFileUpload(request,request.getServletContext().getRealPath("/") + "uploads\\photographer\\");String filePath = "";for (Map.Entry<String, String> entry : map.entrySet()) {filePath = entry.getValue();}filePath = filePath.replace(request.getServletContext().getRealPath("/"), "/");photographer.setHead(filePath);photographer.setCreatetime(new Date());photographerService.insert(photographer);int id = photographer.getId();TPhotographerLabel label = new TPhotographerLabel(labelId, id, new Date(), "0");photographerLabelService.insert(label);TPhotographerLevel level = new TPhotographerLevel(levelId, id, new Date(), "0");photographerLevelService.insert(level);TPhotographerSpots spots = new TPhotographerSpots(spotsId, id, new Date(), "0");photographerSpotsService.insert(spots);returnResult.setStatus(ReturnCodeType.SUCCESS);} catch (Exception e) {logger.error("新增photographer失败" + e);}return returnResult;}/*** 修改photographer状态* * @param photographer* @return*/@RequestMapping(value = "updatePhotographerStatus", method = RequestMethod.GET)@ResponseBodypublic ReturnResult updatePhotographerStatus(TPhotographer photographer) {returnResult.setStatus(ReturnCodeType.FAILURE);try {photographerService.updateBySQL("UPDATE t_photographer SET status=" + photographer.getStatus()+ " WHERE id=" + photographer.getId());returnResult.setStatus(ReturnCodeType.SUCCESS);} catch (Exception e) {logger.error("更新photographer状态失败" + e);}return returnResult;}/*** 修改photographer的name和summary* * @param photographer* @return*/@RequestMapping(value = "updatePhotographer", method = RequestMethod.POST)@ResponseBodypublic ReturnResult updatePhotographer(TPhotographer photographer, Integer labelId, Integer levelId,Integer spotsId) {returnResult.setStatus(ReturnCodeType.FAILURE);try {photographerService.updateBySQL("UPDATE t_photographer SET name='" + photographer.getName() + "',summary='"+ photographer.getSummary() + "',status=" + photographer.getStatus() + " WHERE id="+ photographer.getId());photographerLabelService.updateBySQL("UPDATE t_photographer_label SET labelId=" + labelId+ " WHERE photographerId=" + photographer.getId());photographerLevelService.updateBySQL("UPDATE t_photographer_level SET levelId=" + levelId+ " WHERE photographer=" + photographer.getId());photographerSpotsService.updateBySQL("UPDATE t_photographer_spots SET spotsId=" + spotsId+ " WHERE photographerId=" + photographer.getId());returnResult.setStatus(ReturnCodeType.SUCCESS);} catch (Exception e) {logger.error("修改photographer失败" + e);e.printStackTrace();}return returnResult;}/*** 根据id获取Photographer* admin* @param Photographer* @return*/@RequestMapping(value = "getPhotographerById", method = RequestMethod.POST)@ResponseBodypublic ReturnResult getPhotographerById(Integer id) {returnResult.setStatus(ReturnCodeType.FAILURE);try {returnResult.setStatus(ReturnCodeType.SUCCESS).setData(photographerService.selectBySQL("SELECT a.*,b.labelId,c.levelId,d.spotsId FROM t_photographer a,t_photographer_label b,t_photographer_level c,t_photographer_spots d WHERE a.id ="+ id + " AND b.photographerId=" + id + " AND c.photographer=" + id+ " AND d.photographerId=" + id + "").get(0));} catch (Exception e) {logger.error("根据id获取Photographer失败" + e);}return returnResult;}/*** 根据id获取Photographer* user* @param Photographer* @return*/@RequestMapping(value = "getPhotographer")@ResponseBodypublic ReturnResult getPhotographer(Integer id) {returnResult.setStatus(ReturnCodeType.FAILURE);try {returnResult.setStatus(ReturnCodeType.SUCCESS).setData(photographerService.selectBySQL("SELECT a.name,a.head,a.summary,d.`name` AS level,e.`name` AS spots FROM t_photographer a,t_photographer_level b,t_photographer_spots c,t_level d,t_spots e WHERE a.id="+id+" AND b.photographer="+id+" AND c.photographerId="+id+" AND d.id=b.levelId AND e.id = c.spotsId AND a.`status`=0").get(0));} catch (Exception e) {logger.error("根据id获取Photographer失败" + e);}return returnResult;}/*** 分页获取photographer* * @return*/@RequestMapping(value = "getPhotographerListByPage", method = RequestMethod.POST)@ResponseBodypublic ReturnResult getPhotographerListByPage(PageVO page, String labelId, String levelId, String spotsId,String beforeTime, String afterTime, String status, String name) {returnResult.setStatus(ReturnCodeType.FAILURE);try {Map<String, Object> resultMap = new HashMap<String, Object>();StringBuffer sql = new StringBuffer("SELECT a.*,f.`name` AS label,g.`name` AS level,h.`name` AS spots FROM t_photographer a,t_photographer_label b,t_photographer_level c ,t_photographer_spots d,t_label f,t_level g,t_spots h WHERE a.id=b.photographerId AND a.id = c.photographer AND a.id = d.photographerId AND f.id=b.labelId AND g.id=c.levelId AND h.id= d.spotsId");if (StringUtils.isNotBlank(labelId)) {sql.append(" AND b.labelId=" + labelId);sql.append(" AND f.id=" + labelId);}if (StringUtils.isNotBlank(levelId)) {sql.append(" AND c.levelId=" + levelId);sql.append(" AND g.id=" + levelId);}if (StringUtils.isNotBlank(spotsId)) {sql.append(" AND d.spotsId=" + spotsId);sql.append(" AND h.id=" + spotsId);}if (StringUtils.isNotBlank(status)) {sql.append(" AND a.status=" + status);}if (StringUtils.isNotBlank(name)) {sql.append(" AND a.name=" + name);}List<Map<String, Object>> results = photographerService.selectPageBySQL(sql.toString(), page.getPage() - 1,page.getRows());if (!results.isEmpty() && results != null) {int total = photographerService.selectCount(new TPhotographer());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);}} catch (Exception e) {logger.error("分页获取photographer失败" + e);}return returnResult;}/*** 分页获取启用的photographer* * @return*/@RequestMapping(value = "getPhotographerListByPageStatus", method = RequestMethod.POST)@ResponseBodypublic ReturnResult getPhotographerListByPageStatus(PageVO page, String labelId, String levelId, String spotsId,String start, String end) {returnResult.setStatus(ReturnCodeType.FAILURE);try {Map<String, Object> resultMap = new HashMap<String, Object>();StringBuffer sql = new StringBuffer("SELECT a.*,f.`name` AS label,g.`name` AS level,h.`name` AS spots FROM t_photographer a,t_photographer_label b,t_photographer_level c ,t_photographer_spots d,t_label f,t_level g,t_spots h WHERE a.id=b.photographerId AND a.id = c.photographer AND a.id = d.photographerId AND f.id=b.labelId AND g.id=c.levelId AND h.id= d.spotsId AND a.status=0");StringBuffer countSql = new StringBuffer("SELECT COUNT(*) AS total FROM t_photographer a,t_photographer_label b,t_photographer_level c ,t_photographer_spots d,t_label f,t_level g,t_spots h WHERE a.id=b.photographerId AND a.id = c.photographer AND a.id = d.photographerId AND f.id=b.labelId AND g.id=c.levelId AND h.id= d.spotsId AND a.status=0");if (StringUtils.isNotBlank(start) && StringUtils.isNotBlank(end)) {List<String> list = photographerService.selectByStartEnd(start,end);for(String id : list){sql.append(" AND a.id!="+id);countSql.append(" AND a.id!="+id);}}if (StringUtils.isNotBlank(labelId)) {sql.append(" AND b.labelId=" + labelId);sql.append(" AND f.id=" + labelId);countSql.append(" AND b.labelId=" + labelId);countSql.append(" AND f.id=" + labelId);}if (StringUtils.isNotBlank(levelId)) {sql.append(" AND c.levelId=" + levelId);sql.append(" AND g.id=" + levelId);countSql.append(" AND c.levelId=" + levelId);countSql.append(" AND g.id=" + levelId);}if (StringUtils.isNotBlank(spotsId)) {sql.append(" AND d.spotsId=" + spotsId);sql.append(" AND h.id=" + spotsId);countSql.append(" AND d.spotsId=" + spotsId);countSql.append(" AND h.id=" + spotsId);}List<Map<String, Object>> results = photographerService.selectPageBySQL(sql.toString(), page.getPage() - 1,page.getRows());if (!results.isEmpty() && results != null) {int total = Integer.valueOf( photographerService.selectBySQL(countSql.toString()).get(0).get("total").toString());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);}} catch (Exception e) {logger.error("分页获取启用的photographer失败" + e);}return returnResult;}/*** 获取所有启用的Photographer* * @param Photographer* @return*/@RequestMapping(value = "getAllPhotographer", method = RequestMethod.POST)@ResponseBodypublic ReturnResult getAllPhotographer() {returnResult.setStatus(ReturnCodeType.FAILURE);try {returnResult.setStatus(ReturnCodeType.SUCCESS).setData(photographerService.selectBySQL("SELECT a.id,a.name FROM t_photographer a,t_photographer_label b,t_photographer_level c ,t_photographer_spots d,t_label f,t_level g,t_spots h WHERE a.id=b.photographerId AND a.id = c.photographer AND a.id = d.photographerId AND f.id=b.labelId AND g.id=c.levelId AND h.id= d.spotsId AND a.status=0"));} catch (Exception e) {logger.error("获取所有启用的Photographer失败" + e);}return returnResult;}}

预约控制器:

/*** * 预约控制器*/
@Controller
@Scope("prototype")
public class ScheduleController {private static final Logger logger = LoggerFactory.getLogger(ScheduleController.class);private ReturnResult returnResult = new ReturnResult();@Resource(name = "scheduleService")private IScheduleService scheduleService;/*** 添加预约* * @param schedule* @param session* @return*/@RequestMapping(value = "addSchedule", method = RequestMethod.POST)@ResponseBodypublic ReturnResult addSchedule(TSchedule schedule, HttpSession session,String startdate,String enddate) {returnResult.setStatus(ReturnCodeType.FAILURE);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;}/*** 修改schedule状态* @param schedule* @return*/@RequestMapping(value = "updateScheduleStatus", method = RequestMethod.POST)@ResponseBodypublic ReturnResult updateScheduleStatus(TSchedule schedule,HttpSession session) {returnResult.setStatus(ReturnCodeType.FAILURE);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*/@RequestMapping(value = "setSchedule", method = RequestMethod.POST)@ResponseBodypublic 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];String end = createTimeRange.split(" - ")[1];session.getAttribute("admin");TSchedule schedule = new TSchedule();schedule.setUserid(1);schedule.setCreatetime(new Date());schedule.setStatus(status);schedule.setStart(DateFormater.stringToDate("yyyy/MM/dd",start));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* @return*/@RequestMapping(value = "getScheduleById", method = RequestMethod.POST)@ResponseBodypublic 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*/@RequestMapping(value = "getScheduleByPhotographerId", method = RequestMethod.GET)@ResponseBodypublic ScheduleVO getScheduleByPhotographerId(Integer photoer_id,String year,String month) {return scheduleService.getScheduleByPhotographerId( photoer_id, year, month);}/*** 分页获取schedule* @return*/@RequestMapping(value = "getScheduleListByPage", method = RequestMethod.POST)@ResponseBodypublic 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) {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)));resultMap.put("page", page.getPage());resultMap.put("records", total);resultMap.put("rows", results);returnResult.setStatus(ReturnCodeType.SUCCESS).setData(resultMap);}}catch (Exception e) {logger.error("分页获取schedule失败" + e);}return returnResult;}/*** 根据用户获取schedule* @param schedule* @return*/@RequestMapping(value = "getSchedule", method = RequestMethod.GET)@ResponseBodypublic 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)@ResponseBodypublic ReturnResult deleteSchedule(HttpSession session,Integer id) {returnResult.setStatus(ReturnCodeType.FAILURE);try {session.getAttribute("user");return returnResult.setStatus(ReturnCodeType.SUCCESS).setData(scheduleService.deleteByPrimaryKey(id));} catch (Exception e) {e.printStackTrace();}return returnResult;}
}

源码获取:博客首页 "资源" 里下载!

Java项目:在线婚纱摄影预定系统(java+javaweb+SSM+springboot+mysql)相关推荐

  1. Java项目:在线课程会员系统(java+Springboot+Maven+JSP+Spring+Mysql+layui)

    一.项目简述 功能包括: 用户管理,课程管理,在线视频观看,评论,会员展示,会员充值等等. 二.项目运行 环境配置: Jdk1.8 + Tomcat8.5 + mysql + Eclispe(Inte ...

  2. Java项目:在线点餐系统(java+Springboot+Maven+mybatis+Vue+mysql+Redis)

    源码获取:博客首页 "资源" 里下载! 项目描述: 这是一个基于SpringBoot+Vue框架开发的在线点餐系统.首先,这是一个前后端分离的项目.具有一个在线点餐系统该有的所有功 ...

  3. Java项目:在线蛋糕商城系统(java+jsp+jdbc+mysql)

    源码获取:博客首页 "资源" 里下载! 一.项目简述 功能: 主页显示热销商品:所有蛋糕商品展示,可进行商品搜 索:点击商品进入商品详情页,具有立即购买和加入购物 车功能,可增减购 ...

  4. Java项目:在线宠物商店系统(java+SSM+mysql+maven+tomcat)

    源码获取:博客首页 "资源" 里下载! 一.项目简述 功能:本系统分用户前台和管理员后台. 系统包括用户的注册登录,狗狗的展示购物车添加以及下 单支付购买,后台有管理员用户,可以操 ...

  5. Java项目:在线水果商城系统(java+JSP+Spring+SpringMVC +MyBatis+html+mysql)

    源码获取:博客首页 "资源" 里下载! 一.项目简述 功能: 区分为管理员用户和普通用户,普通用户:用户注册登录,首页水果展示,商品分类展示,购物车添加,下单,订单查询,个人信息修 ...

  6. Java项目:在线美食网站系统(java+SSM+jsp+mysql+maven)

    源码获取:博客首页 "资源" 里下载! 一.项目简述 功能:用户的注册登录,美食浏览,美食文化,收藏百 科,趣味问答,食谱等等功能等等. 二.项目运行 环境配置: Jdk1.8 + ...

  7. Java项目:在线奶茶店系统(java+JSP+JavaScript+servlet+Mysql)

    源码获取:俺的博客首页 "资源" 里下载! 项目介绍 本系统分为前后台,分为普通用户和管理员两种角色: 管理员角色包含以下功能: 管理员登录,用户管理,分类管理,奶茶信息管理,订单 ...

  8. Java项目:在线甜品商城系统(java+SSM+JSP+JavaScript+Mysql)

    源码获取:俺的博客首页 "资源" 里下载! 项目介绍 管理员角色包含以下功能: 管理员登录,套餐管理,甜品管理,预定管理等功能. 用户角色包含以下功能: 用户登录与注册,查看首页, ...

  9. Java项目:在线高中考试系统(java+SSM+Jsp+Mysql+Maven)

    源码获取:博客首页 "资源" 里下载! 项目分为前台和后台,前台主要为学生角色.后台主要为管理员角色. 管理员添加试题和发布试卷,学生负责在线考试.在线查看成绩和错题记录列表等. ...

最新文章

  1. yum是什么?(linux命令) .
  2. ASP.Net上传文件带进度条、显示剩余时间!
  3. python的pygame库使用方法_python基础教程使用Python第三方库pygame写个贪吃蛇小游戏...
  4. java jdbc封装_JDBC封装-Java(新手)
  5. bzoj4569 [Scoi2016]萌萌哒 并查集+st表
  6. SpringBoot-技术专区-详细打印启动时异常堆栈信息
  7. Kotlin入门(23)适配器的进阶表达
  8. java复习web篇——servlet
  9. 文本数据标注工具doccano【介绍最详细的一遍文章】
  10. 从零基础入门Tensorflow2.0 ----二、5.3 实战sklearn超参数搜索
  11. TCP为什么是3次握手而不是2次或者4次或者更多次?
  12. android监听返回键的方法,详解Html5 监听拦截Android返回键方法
  13. 参考文献标引方式_参考文献的标注方法
  14. 大型施工程机械设备资产管理融资租赁方案
  15. 在springboot中使用jsp,设置webapp目录时的操作步骤
  16. 制作JavaCV应用依赖的基础Docker镜像(CentOS7+JDK8+OpenCV4)
  17. apache实现文件上传服务器,使用Apache的Fileupload工具实现文件上传
  18. 八个不得不知的重要法则 让你更懂互联网
  19. macOS使用C/C++万能头文件保姆级教程
  20. 数据结构与算法之六——图

热门文章

  1. 在Ubuntu 14.04 64bit中永久添加DNS的方法
  2. 3D广告建模-C4D Octane渲染视频教程
  3. LTE CRS 时频资源
  4. WCDMA中的URA和LA/RA
  5. 引用-ZIGBEE-ZSTACK网络配置相关问题
  6. VScode 插件、配置记录
  7. 003小插曲之变量和字符串
  8. SHA204A加密芯片配置
  9. IOS入门-TargetAction
  10. 如何设置网页自动刷新(JSP,JS,HTML)