基于javaweb+jsp的家政服务管理系统
JavaWeb JavaBean JSP MVC MySQL Tomcat JavaScript Bootstrap
基础JSP+Servlet或JSP+SSM(Spring、SpringMVC、MyBatis)框架或JSP+SSM+Maven(pom.xml)框架或SpringBoot…均可修改
开发工具:eclipse/idea/myeclipse/sts等均可配置运行
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">类型:</label>
<div class="col-sm-5">
<input <c:if test="${loginUser.userType != '管理员'}">disabled="disabled" title="没有权限!!!"</c:if> name="userType" type="radio" value="管理员" ${vo.userType=='管理员'?'checked':''}/> 管理员
<input name="userType" type="radio" value="普通用户" ${vo.userType=='普通用户'?'checked':''}/> 普通用户
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-5">
<input type="submit" class="btn btn-grad btn-warning btn-sm" value="保存">
<input type="button" class="btn btn-grad btn-warning btn-sm" value="返回" onclick="javascript:history.back(-1);">
</div>
</div>
</form>
</div>
</body>
<script type="text/javascript">
//提交之前进行检查,如果return false,则不允许提交
function check() {
//根据ID获取值
if (document.getElementById("username").value.trim().length == 0) {
alert("用户名不能为空!");
return false;
}
return true;
}
</script>
</html>
<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>交易添加</title>
<%@ include file="include/head.jsp" %>
</head>
<body>
<div class="container-fluid">
<ul class="nav nav-tabs">
<li><a href="jiaoList?">交易列表</a></li>
<if test ='id != null'>`id` = #{id},</if>
<if test ='jiaoName != null'>`jiao_name` = #{jiaoName},</if>
<if test ='jiaoPhone != null'>`jiao_phone` = #{jiaoPhone},</if>
<if test ='jiaoFuwu != null'>`jiao_fuwu` = #{jiaoFuwu},</if>
<if test ='jiaoDate != null'>`jiao_date` = #{jiaoDate},</if>
<if test ='jiaoPrice != null'>`jiao_price` = #{jiaoPrice},</if>
<if test ='jiaoStatus != null'>`jiao_status` = #{jiaoStatus},</if>
<if test ='jiaoText != null'>`jiao_text` = #{jiaoText}</if>
</set>
WHERE `id` = #{id}
</update>
<!--获取-->
<select id="findById" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" /> FROM `t_jiao` WHERE `id` = #{id}
</select>
<!--列表-->
<select id="findAllSplit" parameterType="java.util.Map" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" /> FROM `t_jiao`
<input name="fuwuType" type="radio" value="保姆" checked="checked"/> 保姆
<input name="fuwuType" type="radio" value="月嫂"/> 月嫂
<input name="fuwuType" type="radio" value="钟点工"/> 钟点工
<input name="fuwuType" type="radio" value="育婴师"/> 育婴师
<input name="fuwuType" type="radio" value="其它"/> 其它
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">联系人:</label>
<div class="col-sm-5">
<input type="text" class="form-control" id="fuwuRen" name="fuwuRen">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">联系方式:</label>
<div class="col-sm-5">
<input type="text" class="form-control" id="fuwuPhone" name="fuwuPhone">
}
package com.demo.controller;
import com.demo.util.Util;
import com.demo.service.NoticeService;
import com.demo.vo.Notice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.io.Serializable;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Controller
@RequestMapping
public class NoticeController {
@Autowired
private NoticeService noticeService;
/**
this.jiaoName = jiaoName;
}
public String getJiaoPhone() {
return jiaoPhone;
}
public void setJiaoPhone(String jiaoPhone) {
this.jiaoPhone = jiaoPhone;
}
public String getJiaoFuwu() {
return jiaoFuwu;
}
com.demo.util.PageBean<Object> pb = new com.demo.util.PageBean(Integer.valueOf(pageNum != null ? pageNum : "1"), totalRecord);
params.put("startIndex", pb.getStartIndex());
params.put("pageSize", pb.getPageSize());
List list = (List) noticeService.list(params).get("list");//根据分页参数startIndex、pageSize查询出来的最终结果list
pb.setServlet("noticeList");
pb.setSearchColumn(searchColumn);
pb.setKeyword(keyword);
pb.setList(list);
request.getSession().setAttribute("pageBean", pb);
request.getSession().setAttribute("list", pb.getList());
response.sendRedirect("notice_list.jsp");
}
}
package com.demo.util;
import java.util.List;
/**
* 列表页面的显示对象
*
* @param <T>
*/
public class PageBean<T> {
<input type="text" class="form-control" id="password" name="password" value="${vo.password}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">姓名:</label>
<div class="col-sm-5">
<input type="text" class="form-control" id="realName" name="realName" value="${vo.realName}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">性别:</label>
<div class="col-sm-5">
<input name="userSex" type="radio" value="男" ${vo.userSex=='男'?'checked':''}/> 男
<input name="userSex" type="radio" value="女" ${vo.userSex=='女'?'checked':''}/> 女
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">手机:</label>
<div class="col-sm-5">
<input type="text" class="form-control" id="userPhone" name="userPhone" value="${vo.userPhone}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-5">
<textarea rows="3" class="form-control" id="userText" name="userText" placeholder="请输入内容......">${vo.userText}</textarea>
</div>
<if test ='noticeText != null'>#{noticeText},</if>
<if test ='noticeType != null'>#{noticeType},</if>
<if test ='createDate != null'>#{createDate}</if>
</trim>
</insert>
<!--批量删除-->
<delete id="doRemoveBatch" parameterType="java.util.Collection">
DELETE FROM `t_notice` WHERE `id` IN
<foreach collection="list" item="id" separator="," open="(" close=")">
#{id}
</foreach>
</delete>
<!--修改-->
<update id="doUpdate" parameterType="com.demo.vo.Notice">
UPDATE `t_notice`
<set>
<if test ='id != null'>`id` = #{id},</if>
<if test ='noticeName != null'>`notice_name` = #{noticeName},</if>
<if test ='noticeText != null'>`notice_text` = #{noticeText},</if>
<if test ='noticeType != null'>`notice_type` = #{noticeType},</if>
<if test ='createDate != null'>`create_date` = #{createDate}</if>
</set>
WHERE `id` = #{id}
import java.io.Serializable;
/**
* 交易(t_jiao表对应的Java实体类)
*/
public class Jiao implements Serializable {
private Long id;//主键
private String jiaoName;//姓名
private String jiaoPhone;//联系方式
private String jiaoFuwu;//服务
private String jiaoDate;//时间
private String jiaoPrice;//金额
private String jiaoStatus;//状态:已支付/待支付/已取消
private String jiaoText;//备注
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getJiaoName() {
运行环境
Java≥6、Tomcat≥7.0、MySQL≥5.5
开发工具
eclipse/idea/myeclipse/sts等均可配置运行
技术框架
JavaWeb JavaBean JSP MVC MySQL Tomcat JavaScript Bootstrap
基础JSP+Servlet或JSP+SSM(Spring、SpringMVC、MyBatis)框架或JSP+SSM+Maven(pom.xml)框架或SpringBoot…均可修改
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明
登录、注册、退出、用户模块、公告模块、服务模块、投诉模块、交易模块的增删改查管理