首页 > 分享 > 基于javaweb+jsp的宠物店信息管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Layui Ajax)

基于javaweb+jsp的宠物店信息管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Layui Ajax)

基于javaweb+jsp的宠物店信息管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Layui Ajax)

JavaWeb JavaBean JSP MVC MySQL Tomcat JavaScript Layui Ajax

基础JSP+Servlet或JSP+SSM(Spring、SpringMVC、MyBatis)框架或JSP+SSM+Maven(pom.xml)框架或SpringBoot…均可修改

开发工具:eclipse/idea/myeclipse/sts等均可配置运行

适用

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

</div> <div class="layui-body"> <div class="search_style" style="padding-top: 10px;padding-left: 15px;"> <div class="searchTable"> 搜索: <div class="layui-inline"> <input class="layui-input" name="search_keyword" id="search_keyword" autocomplete="off" placeholder="姓名"> <input type="hidden" class="layui-input" name="searchColumn" id="searchColumn" autocomplete="off" value="real_name"> </div> <button class="layui-btn" data-type="reload">搜索</button> </div> </div> <!-- 内容主体区域 --> <table class="layui-hide" id="myData" lay-filter="myTable"></table> </div> </div> <script src="js/layui/layui.js"/> <script> //JavaScript代码区域 layui.use('element', function () { let element = layui.element; });

1234567891011121314151617181920212223

obj.del(); //删除对应行(tr)的DOM结构,并更新缓存 //parent.location.reload();//刷新父级页面 // layer.close(index); //parent.location.reload();//刷新父级页面 layer.msg(data.realName + ' 删除成功!'); // }); } else if (layEvent === 'edit') { //编辑 layer.open({ type: 2, area: ['800px', '550px'], fixed: false, //不固定 maxmin: true, content: 'userEditPre?id=' + data.id }); 1234567891011121314

} public String getUserType() { return userType; } public void setUserType(String userType) { this.userType = userType; } } package com.demo.vo; import java.io.Serializable; /** * 宠物(t_pet表对应的Java实体类) */ public class Pet implements Serializable { private Long id;//主键 private String petName;//昵称 private String petType;//类型 private String petSex;//性别:雄/雌 private String petAge;//年龄 private String petMaster;//主人 private String petMasterPhone;//主人电话 private String petText;//备注 public Long getId() {

123456789101112131415161718192021222324252627

public void setPetMasterPhone(String petMasterPhone) { this.petMasterPhone = petMasterPhone; } public String getPetText() { return petText; } public void setPetText(String petText) { this.petText = petText; } } package com.demo.service.impl; import com.demo.dao.NoticeMapper; import com.demo.service.NoticeService; import com.demo.vo.Notice; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.util.ObjectUtils; import java.io.Serializable;

12345678910111213141516171819202122

</mapper> <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.demo.dao.NoticeMapper"> <resultMap id="BaseResultMap" type="com.demo.vo.Notice" > <result column="id" property="id" /> <result column="notice_name" property="noticeName" /> <result column="notice_text" property="noticeText" /> <result column="notice_type" property="noticeType" /> <result column="create_date" property="createDate" /> </resultMap> <sql id="Base_Column_List"> `id`,`notice_name`,`notice_text`,`notice_type`,`create_date` </sql> <!--新增--> <insert id="doCreate" useGeneratedKeys="true" keyColumn="id" keyProperty="id" parameterType="com.demo.vo.Notice"> INSERT INTO `t_notice` <trim prefix="(" suffix=")" suffixOverrides=","> <if test ='id != null'>`id`,</if> <if test ='noticeName != null'>`notice_name`,</if> <if test ='noticeText != null'>`notice_text`,</if> <if test ='noticeType != null'>`notice_type`,</if>

1234567891011121314151617181920212223242526

int blue = minColor + random.nextInt(maxColor - minColor); return new Color(red, green, blue); } } package com.demo.controller; import com.demo.util.Util; import com.demo.service.UserService; import com.demo.vo.User; 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

1234567891011121314151617181920212223

templet: vo => vo.userSex ? vo.userSex : "", }, { field: 'userPhone', title: '手机', }, { field: 'userText', title: '备注', }, { field: 'userType', title: '类型', templet: vo => vo.userType ? vo.userType : "", }, { align: 'center', fixed: 'right', title: '操作', width: 130, templet: vo => { let flag1 = ${loginUser.id} == vo.id; let flag2 = ${loginUser.userType == '管理员'}; return ((flag1 || flag2) ? '<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>' : '') + ((flag2) ? '<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>' : ''); } }

1234567891011121314151617181920212223242526

this.userService.update(loginUser); msg = "修改成功!"; } request.getSession().setAttribute("alert_msg", msg); request.getRequestDispatcher("reset_password.jsp").forward(request, response); } // 返回一个随机颜色(Color对象) private Color getRandomColor(int minColor, int maxColor) { Random random = new Random(); // 保存minColor最大不会超过255 if (minColor > 255) minColor = 255; // 保存minColor最大不会超过255 if (maxColor > 255) maxColor = 255; // 获得红色的随机颜色值 int red = minColor + random.nextInt(maxColor - minColor); // 获得绿色的随机颜色值 int green = minColor + random.nextInt(maxColor - minColor); // 获得蓝色的随机颜色值 int blue = minColor + random.nextInt(maxColor - minColor); return new Color(red, green, blue); } } package com.demo.controller;

123456789101112131415161718192021222324252627

if (isMessyCode(str)) { str = new String(str.getBytes("ISO-8859-1"), "GBK"); } if (isMessyCode(str)) { str = new String(str.getBytes("GB2312"), "GBK"); } } catch (Exception e) { e.printStackTrace(); } System.out.println(parameterName + "==" + str.trim()); return str.trim(); } } package com.demo.util; import org.springframework.web.servlet.HandlerInterceptor; import org.springframework.web.servlet.ModelAndView; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; /** * 拦截器 */

12345678910111213141516171819202122232425

运行环境

Java≥6、Tomcat≥7.0、MySQL≥5.5

开发工具

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

技术框架

JavaWeb JavaBean JSP MVC MySQL Tomcat JavaScript Layui Ajax

基础JSP+Servlet或JSP+SSM(Spring、SpringMVC、MyBatis)框架或JSP+SSM+Maven(pom.xml)框架或SpringBoot…均可修改

适用

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

功能说明

登录、注册、退出、用户模块、公告模块、宠物模块的增删改查管理

20220319001457

20220319001458

20220319001459

20220319001500

20220319001501

20220319001502

20220319001503

20220319001504

document

相关知识

基于javaweb+jsp的宠物领养信息管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Layui Ajax)
基于javaweb+jsp的宠物领养信息管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Bootstrap Ajax)
基于javaweb+jsp的宠物领养信息管理系统(JavaWeb MySQL JSP Bootstrap Servlet SSM SpringBoot)
基于javaweb+jsp的宠物领养信息管理系统(带报告文档)
计算机毕业设计ssm基于SSM框架在线电影评论投票系统3gr0f系统+程序+源码+lw+远程部署
基于JAVA宠物爱心救助系统计算机毕业设计源码+系统+lw文档+部署
java/jsp/ssm宠物托管所托管服务系统【2024年毕设】
java/jsp/ssm宠物寻回系统【2024年毕设】
基于Java毕业设计宠物店管理系统源码+系统+mysql+lw文档+部署软件
mysql 项目案例宠物商店

网址: 基于javaweb+jsp的宠物店信息管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Layui Ajax) https://m.mcbbbk.com/newsview770702.html

所属分类:萌宠日常
上一篇: 宠公馆动物医院,宠物看得起病的宠
下一篇: 宠物店管理系统需求分析报告