├── .gitignore ├── picture ├── E-R图.jpg ├── 系统流程图.jpg ├── picture1.png ├── picture2.png ├── picture3.png ├── picture4.png ├── picture5.png ├── picture6.png ├── picture7.png ├── picture8.png ├── picture9.png ├── picture10.png ├── picture11.png ├── picture12.png ├── picture13.png ├── picture14.png ├── picture15.png ├── picture16.png └── picture17.png ├── src └── main │ ├── webapp │ ├── index.jsp │ ├── favicon.ico │ ├── static │ │ ├── css │ │ │ ├── admin │ │ │ │ ├── style.css │ │ │ │ ├── boot-crm.css │ │ │ │ ├── rightbg.jpg │ │ │ │ ├── metisMenu.min.css │ │ │ │ └── sb-admin-2.css │ │ │ └── user │ │ │ │ ├── login.css │ │ │ │ ├── simplelightbox.min.css │ │ │ │ ├── jquery.slideBox.css │ │ │ │ ├── personal-info.css │ │ │ │ ├── icons.css │ │ │ │ ├── show.css │ │ │ │ └── error.css │ │ ├── fonts │ │ │ ├── user │ │ │ │ ├── FontAwesome.otf │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ ├── fontawesome-webfont.woff │ │ │ │ ├── fontawesome-webfont.woff2 │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ │ └── glyphicons-halflings-regular.woff2 │ │ │ └── admin │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ │ └── glyphicons-halflings-regular.woff2 │ │ ├── bootstrap │ │ │ ├── fonts │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ │ └── glyphicons-halflings-regular.woff2 │ │ │ └── js │ │ │ │ └── npm.js │ │ ├── html │ │ │ ├── admin │ │ │ │ ├── test.html │ │ │ │ └── t_adopt.html │ │ │ └── user │ │ │ │ ├── error.html │ │ │ │ ├── personal-info.html │ │ │ │ ├── services.html │ │ │ │ ├── team.html │ │ │ │ ├── show.html │ │ │ │ └── blog.html │ │ └── js │ │ │ ├── user │ │ │ ├── move-top.js │ │ │ ├── demo.js │ │ │ ├── responsiveslides.min.js │ │ │ ├── gVerify.js │ │ │ ├── jquery.comment.js │ │ │ ├── easing.js │ │ │ ├── jquery.slideBox.min.js │ │ │ └── simple-lightbox.min.js │ │ │ └── admin │ │ │ ├── sb-admin-2.js │ │ │ ├── metisMenu.min.js │ │ │ └── dataTables.bootstrap.min.js │ └── WEB-INF │ │ └── web.xml │ ├── resources │ ├── log4j.properties │ ├── mapper │ │ ├── BlogMapper.xml │ │ ├── PetMapper.xml │ │ ├── AdoptAnimalMapper.xml │ │ ├── CommentMapper.xml │ │ ├── AnswerMapper.xml │ │ ├── ApplyMapper.xml │ │ ├── UserMapper.xml │ │ └── AdminMapper.xml │ ├── database.properties │ ├── springmvc-servlet.xml │ └── applicationContext.xml │ └── java │ └── club │ ├── dao │ ├── UserMapper.java │ ├── PetMapper.java │ ├── BlogMapper.java │ ├── AdminMapper.java │ ├── ApplyMapper.java │ ├── AnswerMapper.java │ ├── CommentMapper.java │ └── AdoptAnimalMapper.java │ ├── service │ ├── ApplyService.java │ ├── AnswerService.java │ ├── BlogService.java │ ├── PetService.java │ ├── AdoptAnimalService.java │ ├── AdminService.java │ ├── UserService.java │ ├── CommentService.java │ └── impl │ │ ├── ApplyServiceImpl.java │ │ ├── BlogServiceImpl.java │ │ ├── PetServiceImpl.java │ │ ├── AdminServiceImpl.java │ │ ├── AnswerServiceImpl.java │ │ ├── UserServiceImpl.java │ │ ├── AdoptAnimalServiceImpl.java │ │ └── CommentServiceImpl.java │ ├── pojo │ ├── Blog.java │ ├── Apply.java │ ├── User.java │ ├── AdoptAnimal.java │ ├── Admins.java │ ├── Answer.java │ ├── Comment.java │ └── Pet.java │ ├── util │ └── Message.java │ └── controller │ ├── AnswerController.java │ ├── BlogController.java │ ├── FileLoad.java │ ├── ApplyController.java │ ├── PetController.java │ ├── AdoptAnimalController.java │ ├── CommentController.java │ ├── UserController.java │ └── AdminController.java ├── .gitattributes ├── README.md └── pom.xml /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giteecode/adopt-public/HEAD/.gitignore -------------------------------------------------------------------------------- /picture/E-R图.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giteecode/adopt-public/HEAD/picture/E-R图.jpg -------------------------------------------------------------------------------- /picture/系统流程图.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giteecode/adopt-public/HEAD/picture/系统流程图.jpg -------------------------------------------------------------------------------- /picture/picture1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giteecode/adopt-public/HEAD/picture/picture1.png -------------------------------------------------------------------------------- /picture/picture2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giteecode/adopt-public/HEAD/picture/picture2.png -------------------------------------------------------------------------------- /picture/picture3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giteecode/adopt-public/HEAD/picture/picture3.png -------------------------------------------------------------------------------- /picture/picture4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giteecode/adopt-public/HEAD/picture/picture4.png -------------------------------------------------------------------------------- /picture/picture5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giteecode/adopt-public/HEAD/picture/picture5.png -------------------------------------------------------------------------------- /picture/picture6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giteecode/adopt-public/HEAD/picture/picture6.png -------------------------------------------------------------------------------- /picture/picture7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giteecode/adopt-public/HEAD/picture/picture7.png -------------------------------------------------------------------------------- /picture/picture8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giteecode/adopt-public/HEAD/picture/picture8.png -------------------------------------------------------------------------------- /picture/picture9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giteecode/adopt-public/HEAD/picture/picture9.png -------------------------------------------------------------------------------- /src/main/webapp/index.jsp: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Hello World!

4 | 5 | 6 | -------------------------------------------------------------------------------- /picture/picture10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giteecode/adopt-public/HEAD/picture/picture10.png -------------------------------------------------------------------------------- /picture/picture11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giteecode/adopt-public/HEAD/picture/picture11.png -------------------------------------------------------------------------------- /picture/picture12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giteecode/adopt-public/HEAD/picture/picture12.png -------------------------------------------------------------------------------- /picture/picture13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giteecode/adopt-public/HEAD/picture/picture13.png -------------------------------------------------------------------------------- /picture/picture14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giteecode/adopt-public/HEAD/picture/picture14.png -------------------------------------------------------------------------------- /picture/picture15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giteecode/adopt-public/HEAD/picture/picture15.png -------------------------------------------------------------------------------- /picture/picture16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giteecode/adopt-public/HEAD/picture/picture16.png -------------------------------------------------------------------------------- /picture/picture17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giteecode/adopt-public/HEAD/picture/picture17.png -------------------------------------------------------------------------------- /src/main/webapp/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giteecode/adopt-public/HEAD/src/main/webapp/favicon.ico -------------------------------------------------------------------------------- /src/main/resources/log4j.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giteecode/adopt-public/HEAD/src/main/resources/log4j.properties -------------------------------------------------------------------------------- /src/main/webapp/static/css/admin/style.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giteecode/adopt-public/HEAD/src/main/webapp/static/css/admin/style.css -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.js linguist-language=java 2 | *.css linguist-language=java 3 | *.html linguist-language=java 4 | *.vue linguist-language=java 5 | -------------------------------------------------------------------------------- /src/main/webapp/static/css/admin/boot-crm.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giteecode/adopt-public/HEAD/src/main/webapp/static/css/admin/boot-crm.css -------------------------------------------------------------------------------- /src/main/webapp/static/css/admin/rightbg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giteecode/adopt-public/HEAD/src/main/webapp/static/css/admin/rightbg.jpg -------------------------------------------------------------------------------- /src/main/webapp/static/fonts/user/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giteecode/adopt-public/HEAD/src/main/webapp/static/fonts/user/FontAwesome.otf -------------------------------------------------------------------------------- /src/main/webapp/static/fonts/user/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giteecode/adopt-public/HEAD/src/main/webapp/static/fonts/user/fontawesome-webfont.eot -------------------------------------------------------------------------------- /src/main/webapp/static/fonts/user/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giteecode/adopt-public/HEAD/src/main/webapp/static/fonts/user/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /src/main/webapp/static/fonts/user/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giteecode/adopt-public/HEAD/src/main/webapp/static/fonts/user/fontawesome-webfont.woff -------------------------------------------------------------------------------- /src/main/webapp/static/fonts/user/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giteecode/adopt-public/HEAD/src/main/webapp/static/fonts/user/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /src/main/webapp/static/fonts/admin/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giteecode/adopt-public/HEAD/src/main/webapp/static/fonts/admin/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /src/main/webapp/static/fonts/admin/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giteecode/adopt-public/HEAD/src/main/webapp/static/fonts/admin/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /src/main/webapp/static/fonts/user/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giteecode/adopt-public/HEAD/src/main/webapp/static/fonts/user/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /src/main/webapp/static/fonts/user/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giteecode/adopt-public/HEAD/src/main/webapp/static/fonts/user/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /src/main/webapp/static/fonts/user/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giteecode/adopt-public/HEAD/src/main/webapp/static/fonts/user/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /src/main/webapp/static/fonts/admin/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giteecode/adopt-public/HEAD/src/main/webapp/static/fonts/admin/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /src/main/webapp/static/fonts/admin/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giteecode/adopt-public/HEAD/src/main/webapp/static/fonts/admin/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /src/main/webapp/static/fonts/user/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giteecode/adopt-public/HEAD/src/main/webapp/static/fonts/user/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /src/main/webapp/static/bootstrap/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giteecode/adopt-public/HEAD/src/main/webapp/static/bootstrap/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /src/main/webapp/static/bootstrap/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giteecode/adopt-public/HEAD/src/main/webapp/static/bootstrap/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /src/main/webapp/static/bootstrap/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giteecode/adopt-public/HEAD/src/main/webapp/static/bootstrap/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /src/main/webapp/static/bootstrap/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/giteecode/adopt-public/HEAD/src/main/webapp/static/bootstrap/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /src/main/java/club/dao/UserMapper.java: -------------------------------------------------------------------------------- 1 | package club.dao; 2 | 3 | import club.pojo.User; 4 | import com.baomidou.mybatisplus.mapper.BaseMapper; 5 | 6 | public interface UserMapper extends BaseMapper { 7 | } -------------------------------------------------------------------------------- /src/main/java/club/dao/PetMapper.java: -------------------------------------------------------------------------------- 1 | package club.dao; 2 | 3 | import club.pojo.Pet; 4 | import com.baomidou.mybatisplus.mapper.BaseMapper; 5 | 6 | public interface PetMapper extends BaseMapper { 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/club/dao/BlogMapper.java: -------------------------------------------------------------------------------- 1 | package club.dao; 2 | 3 | import club.pojo.Blog; 4 | import com.baomidou.mybatisplus.mapper.BaseMapper; 5 | 6 | public interface BlogMapper extends BaseMapper { 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/club/dao/AdminMapper.java: -------------------------------------------------------------------------------- 1 | package club.dao; 2 | 3 | import club.pojo.Admins; 4 | import com.baomidou.mybatisplus.mapper.BaseMapper; 5 | 6 | 7 | public interface AdminMapper extends BaseMapper { 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/club/dao/ApplyMapper.java: -------------------------------------------------------------------------------- 1 | package club.dao; 2 | 3 | import club.pojo.Apply; 4 | import com.baomidou.mybatisplus.mapper.BaseMapper; 5 | 6 | public interface ApplyMapper extends BaseMapper { 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/club/dao/AnswerMapper.java: -------------------------------------------------------------------------------- 1 | package club.dao; 2 | 3 | import club.pojo.Answer; 4 | import com.baomidou.mybatisplus.mapper.BaseMapper; 5 | 6 | public interface AnswerMapper extends BaseMapper { 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/club/dao/CommentMapper.java: -------------------------------------------------------------------------------- 1 | package club.dao; 2 | 3 | import club.pojo.Comment; 4 | import com.baomidou.mybatisplus.mapper.BaseMapper; 5 | 6 | public interface CommentMapper extends BaseMapper { 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/main/resources/mapper/BlogMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | id, actionTime, address, peoples, event, title 5 | -------------------------------------------------------------------------------- /src/main/resources/database.properties: -------------------------------------------------------------------------------- 1 | mysql.driver=com.mysql.cj.jdbc.Driver 2 | #在和mysql传递数据的过程中,使用unicode编码格式,并且字符集设置为utf-8 3 | mysql.url=jdbc:mysql://127.0.0.1:3306/adopt?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Asia%2fShanghai 4 | mysql.username=root 5 | mysql.password=root 6 | maxTotal=30 7 | initPoolSize=5 -------------------------------------------------------------------------------- /src/main/resources/mapper/PetMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | id, petName, petType, sex, birthday, pic, state, remark 5 | -------------------------------------------------------------------------------- /src/main/resources/mapper/AdoptAnimalMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | id, user_id, pet_id, adoptTime, state 5 | 6 | -------------------------------------------------------------------------------- /src/main/resources/mapper/CommentMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | id, user_id, admin_id, pet_id, commentTime, content 5 | -------------------------------------------------------------------------------- /src/main/resources/mapper/AnswerMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | id, user_id, replay_id, comment_id, answerTime, content 5 | -------------------------------------------------------------------------------- /src/main/resources/mapper/ApplyMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | id, name, email, age, telephone, message, applyTime, state 5 | -------------------------------------------------------------------------------- /src/main/resources/mapper/UserMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | id, userName, password, sex, age, telephone, Email, address, pic, state 5 | -------------------------------------------------------------------------------- /src/main/resources/mapper/AdminMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | id, adminName, adminPwd, realName, telephone, Email, birthday, sex, pic, remark 5 | -------------------------------------------------------------------------------- /src/main/java/club/dao/AdoptAnimalMapper.java: -------------------------------------------------------------------------------- 1 | package club.dao; 2 | 3 | import club.pojo.AdoptAnimal; 4 | import com.baomidou.mybatisplus.mapper.BaseMapper; 5 | import org.apache.ibatis.annotations.Param; 6 | import java.util.List; 7 | 8 | public interface AdoptAnimalMapper extends BaseMapper { 9 | List all(@Param("adoptTime")String adoptTime); 10 | 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/club/service/ApplyService.java: -------------------------------------------------------------------------------- 1 | package club.service; 2 | 3 | import club.pojo.Apply; 4 | import com.github.pagehelper.PageInfo; 5 | 6 | public interface ApplyService { 7 | PageInfo allApply(Integer state, Integer pageNum, Integer pageSize); 8 | Apply findByid(Integer id); 9 | int updateApply(Apply apply); 10 | int del(Integer id); 11 | Integer create(Apply apply); 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/club/service/AnswerService.java: -------------------------------------------------------------------------------- 1 | package club.service; 2 | 3 | import club.pojo.Answer; 4 | 5 | import java.util.List; 6 | 7 | public interface AnswerService { 8 | List answersAboutOneComment(Integer commentId); 9 | Integer create(Integer userId, Integer commentId, String content); 10 | Answer findById(Integer id); 11 | Integer creates(Integer userId, Integer replayrId, String content, Integer commentId); 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/club/service/BlogService.java: -------------------------------------------------------------------------------- 1 | package club.service; 2 | 3 | import club.pojo.Blog; 4 | import com.github.pagehelper.PageInfo; 5 | 6 | public interface BlogService { 7 | PageInfo findAllBlog(String actionTime,Integer pageNum,Integer pageSize); 8 | int add(Blog blog); 9 | Blog findById(Integer id); 10 | int updateBlog(Blog blog); 11 | int del(Integer id); 12 | PageInfo blogs(Integer pageNum, Integer pageSize); 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/club/service/PetService.java: -------------------------------------------------------------------------------- 1 | package club.service; 2 | 3 | import club.pojo.Pet; 4 | import com.github.pagehelper.PageInfo; 5 | 6 | public interface PetService { 7 | PageInfo pets(Integer pageNum, Integer pagesize); 8 | Pet findById(Integer id); 9 | Integer create(Pet pet); 10 | PageInfo allPet(String petType, Integer pageNum, Integer pageSize); 11 | int add(Pet pet); 12 | int update(Pet pet); 13 | int del(Integer id); 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/club/service/AdoptAnimalService.java: -------------------------------------------------------------------------------- 1 | package club.service; 2 | 3 | import club.pojo.AdoptAnimal; 4 | import com.github.pagehelper.PageInfo; 5 | 6 | public interface AdoptAnimalService { 7 | Integer create(AdoptAnimal adoptAnimal); 8 | PageInfo all(String adoptTime,Integer pageNum, Integer pageSize); 9 | int update(Integer id, Integer state); 10 | PageInfo allAdoptAnimal(String userName,Integer pageNum,Integer pageSize, Integer state); 11 | } 12 | -------------------------------------------------------------------------------- /src/main/webapp/static/bootstrap/js/npm.js: -------------------------------------------------------------------------------- 1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. 2 | require('../../js/transition.js') 3 | require('../../js/alert.js') 4 | require('../../js/button.js') 5 | require('../../js/carousel.js') 6 | require('../../js/collapse.js') 7 | require('../../js/dropdown.js') 8 | require('../../js/modal.js') 9 | require('../../js/tooltip.js') 10 | require('../../js/popover.js') 11 | require('../../js/scrollspy.js') 12 | require('../../js/tab.js') 13 | require('../../js/affix.js') -------------------------------------------------------------------------------- /src/main/java/club/service/AdminService.java: -------------------------------------------------------------------------------- 1 | package club.service; 2 | 3 | import club.pojo.Admins; 4 | import com.github.pagehelper.PageInfo; 5 | 6 | 7 | import club.pojo.Admins; 8 | import com.github.pagehelper.PageInfo; 9 | 10 | 11 | public interface AdminService { 12 | PageInfo adminPage(String adminName,Integer pageNum,Integer pageSize); 13 | Admins findById(Integer id); 14 | Admins login(String adminName, String adminPwd); 15 | PageInfo allAdmin(String adminsName, int pageNum, int pageSize); 16 | int add(Admins admins); 17 | int update(Admins admins); 18 | int del(Integer id); 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/club/pojo/Blog.java: -------------------------------------------------------------------------------- 1 | package club.pojo; 2 | 3 | import com.fasterxml.jackson.annotation.JsonFormat; 4 | import lombok.Data; 5 | import org.springframework.format.annotation.DateTimeFormat; 6 | 7 | import java.util.Date; 8 | 9 | /** 10 | * @author Mr Wu 11 | * @create: 2019-08-20 14:23 12 | */ 13 | @Data 14 | public class Blog { 15 | private Integer id; 16 | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") 17 | @DateTimeFormat(pattern = "yyyy-MM-dd") 18 | private Date actionTime; 19 | private String address; 20 | private String peoples; 21 | private String event; 22 | private String title; 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/club/service/UserService.java: -------------------------------------------------------------------------------- 1 | package club.service; 2 | 3 | import club.pojo.User; 4 | 5 | import club.pojo.User; 6 | import com.github.pagehelper.PageInfo; 7 | 8 | 9 | import java.util.List; 10 | 11 | public interface UserService { 12 | List findByName(String userName, Integer state); 13 | List showName(String userName); 14 | //登录 15 | User loginuser(String userName,String password); 16 | //注册 17 | int add(User user); 18 | //修改 19 | Integer update(User user); 20 | User findById(Integer id); 21 | PageInfo allUser(String userName, Integer pageNum, Integer pageSize); 22 | int del(Integer id); 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/club/service/CommentService.java: -------------------------------------------------------------------------------- 1 | package club.service; 2 | 3 | import club.pojo.Comment; 4 | import com.github.pagehelper.PageInfo; 5 | 6 | import java.util.List; 7 | 8 | import club.pojo.Comment; 9 | import com.github.pagehelper.PageInfo; 10 | 11 | public interface CommentService { 12 | PageInfo allComment(String userName,Integer pn,Integer pageSize); 13 | List petComments(Integer petId); 14 | Integer create(Integer userId, Integer petId, String content); 15 | Comment findById(Integer id); 16 | PageInfo all(String userName, Integer pageNum, Integer pageSize); 17 | int update(Comment adoptAnimal); 18 | int delete(Integer id); 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/club/pojo/Apply.java: -------------------------------------------------------------------------------- 1 | package club.pojo; 2 | 3 | import com.fasterxml.jackson.annotation.JsonFormat; 4 | import lombok.Data; 5 | import org.springframework.format.annotation.DateTimeFormat; 6 | 7 | import java.util.Date; 8 | 9 | /** 10 | * @author Mr Wu 11 | * @create: 2019-09-05 09:59 12 | */ 13 | @Data 14 | public class Apply { 15 | private Integer id; 16 | private String name; 17 | private String email; 18 | private Integer age; 19 | private String telephone; 20 | private String message; 21 | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") 22 | @DateTimeFormat(pattern = "yyyy-MM-dd") 23 | private Date applyTime; 24 | private Integer state; 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/webapp/static/css/user/login.css: -------------------------------------------------------------------------------- 1 | body{ color:#333; font-size:13px;} 2 | input,select,textarea{color:#333;} 3 | .bg{ width:100%; height:100%; position:absolute; background:url(http://localhost:8080/static/images/login/bg.jpg) } 4 | .panel{background:#fff;} 5 | form .form-group:last-child{padding-bottom:0;} 6 | .passcode{position:absolute;right:0;bottom:0;height:32px;margin:1px;border-left:solid 1px #ddd;text-align:center;line-height:32px;border-radius:0 4px 4px 0;} 7 | ul,li{ list-style-type:none;} 8 | 9 | .field-icon-right .icon{ bottom:0px; top:auto} 10 | .loginbox { background:url(http://localhost:8080/static/images/login/tmbg-white.png); border:0px;} 11 | .mySize{ 12 | width: 200px; 13 | height: 45px; 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/club/pojo/User.java: -------------------------------------------------------------------------------- 1 | package club.pojo; 2 | 3 | import com.baomidou.mybatisplus.annotations.TableField; 4 | import lombok.Data; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * @author Mr Wu 10 | * @create: 2019-08-20 14:18 11 | */ 12 | @Data 13 | public class User { 14 | private Integer id; 15 | private String userName; 16 | private String password; 17 | private String sex; 18 | private Integer age; 19 | private String telephone; 20 | private String Email; 21 | private String address; 22 | private String pic; 23 | private Integer state; 24 | @TableField(exist = false) 25 | List commentList; 26 | @TableField(exist = false) 27 | List animalList; 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/club/pojo/AdoptAnimal.java: -------------------------------------------------------------------------------- 1 | package club.pojo; 2 | 3 | import com.baomidou.mybatisplus.annotations.TableField; 4 | import com.fasterxml.jackson.annotation.JsonFormat; 5 | import lombok.Data; 6 | import org.springframework.format.annotation.DateTimeFormat; 7 | 8 | import java.util.Date; 9 | 10 | /** 11 | * @author Mr Wu 12 | * @create: 2019-08-20 14:23 13 | */ 14 | @Data 15 | public class AdoptAnimal { 16 | private Integer id; 17 | private Integer userId; 18 | private Integer petId; 19 | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") 20 | @DateTimeFormat(pattern = "yyyy-MM-dd") 21 | private Date adoptTime; 22 | private Integer state; 23 | 24 | @TableField(exist = false) 25 | private Pet pet; 26 | @TableField(exist = false) 27 | private User user; 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/webapp/static/css/admin/metisMenu.min.css: -------------------------------------------------------------------------------- 1 | /* 2 | * metismenu - v1.1.3 3 | * Easy menu jQuery plugin for Twitter Bootstrap 3 4 | * https://github.com/onokumus/metisMenu 5 | * 6 | * Made by Osman Nuri Okumus 7 | * Under MIT License 8 | */ 9 | 10 | .arrow{float:right;line-height:1.42857}.glyphicon.arrow:before{content:"\e079"}.active>a>.glyphicon.arrow:before{content:"\e114"}.fa.arrow:before{content:"\f104"}.active>a>.fa.arrow:before{content:"\f107"}.plus-times{float:right}.fa.plus-times:before{content:"\f067"}.active>a>.fa.plus-times{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.plus-minus{float:right}.fa.plus-minus:before{content:"\f067"}.active>a>.fa.plus-minus:before{content:"\f068"} -------------------------------------------------------------------------------- /src/main/java/club/pojo/Admins.java: -------------------------------------------------------------------------------- 1 | package club.pojo; 2 | 3 | import com.fasterxml.jackson.annotation.JsonFormat; 4 | import lombok.Data; 5 | import org.springframework.format.annotation.DateTimeFormat; 6 | 7 | import java.util.Date; 8 | 9 | /** 10 | * @author Mr Wu 11 | * @create: 2019-08-20 14:23 12 | */ 13 | @Data 14 | public class Admins { 15 | private Integer id; 16 | private String adminName; 17 | private String adminPwd; 18 | private String realName; 19 | private String telephone; 20 | private String email; 21 | //主要是后台到前台的时间格式的转换 22 | //@JsonFormat注解可以在属性的上方,同样可以在属性对应的get方法上,两种方式没有区别 23 | @JsonFormat(pattern = "yyyy-MM-dd") 24 | //主要是前后到后台的时间格式的转换 25 | @DateTimeFormat(pattern = "yyyy-MM-dd") 26 | private Date birthday; 27 | private String sex; 28 | private String pic; 29 | private String remark; 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/club/pojo/Answer.java: -------------------------------------------------------------------------------- 1 | package club.pojo; 2 | 3 | import com.baomidou.mybatisplus.annotations.TableField; 4 | import com.fasterxml.jackson.annotation.JsonFormat; 5 | import lombok.Data; 6 | import org.springframework.format.annotation.DateTimeFormat; 7 | import java.util.Date; 8 | 9 | /** 10 | * @author Mr Wu 11 | * @create: 2019-08-29 13:57 12 | */ 13 | @Data 14 | public class Answer { 15 | private Integer id; 16 | private Integer userId; 17 | private Integer replayId; 18 | private Integer commentId; 19 | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") 20 | @DateTimeFormat(pattern = "yyyy-MM-dd") 21 | private Date answerTime; 22 | private String content; 23 | 24 | @TableField(exist = false) 25 | private User user; 26 | @TableField(exist = false) 27 | private Answer answer; 28 | @TableField(exist = false) 29 | private Comment comment; 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/club/pojo/Comment.java: -------------------------------------------------------------------------------- 1 | package club.pojo; 2 | 3 | import com.fasterxml.jackson.annotation.JsonFormat; 4 | import lombok.Data; 5 | import org.springframework.format.annotation.DateTimeFormat; 6 | import com.baomidou.mybatisplus.annotations.TableField; 7 | 8 | import java.util.Date; 9 | import java.util.List; 10 | 11 | /** 12 | * @author Mr Wu 13 | * @create: 2019-08-20 14:23 14 | */ 15 | @Data 16 | public class Comment { 17 | private Integer id; 18 | private Integer userId; 19 | private Integer adminsId; 20 | private Integer petId; 21 | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") 22 | @DateTimeFormat(pattern = "yyyy-MM-dd") 23 | private Date commentTime; 24 | private String content; 25 | @TableField(exist = false) 26 | private User user; 27 | @TableField(exist = false) 28 | private Admins admin; 29 | @TableField(exist = false) 30 | private Pet pet; 31 | @TableField(exist = false) 32 | private List answer; 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/main/webapp/static/html/admin/test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 | 35 | 36 | -------------------------------------------------------------------------------- /src/main/java/club/pojo/Pet.java: -------------------------------------------------------------------------------- 1 | package club.pojo; 2 | 3 | import com.baomidou.mybatisplus.annotations.TableField; 4 | import com.fasterxml.jackson.annotation.JsonFormat; 5 | import lombok.Data; 6 | import org.springframework.format.annotation.DateTimeFormat; 7 | 8 | import java.util.ArrayList; 9 | import java.util.Date; 10 | import java.util.List; 11 | 12 | /** 13 | * @author Mr Wu 14 | * @create: 2019-08-20 14:23 15 | */ 16 | @Data 17 | public class Pet { 18 | private Integer id; 19 | private String petName; 20 | private String petType; 21 | private String sex; 22 | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") 23 | @DateTimeFormat(pattern = "yyyy-MM-dd") 24 | private Date birthday; 25 | private String pic; 26 | private Integer state; 27 | private String remark; 28 | 29 | @TableField(exist = false) 30 | private List adoptAnimalList=new ArrayList<>(); 31 | @TableField(exist = false) 32 | private List commentList=new ArrayList<>(); 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/main/webapp/static/html/user/error.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Home 5 | 6 | 7 | 8 | 12 | 13 | 14 | 15 | 16 |
17 |
18 |

error

19 |
20 |
21 |
22 |

我们很抱歉!

23 |

您请求的页面无法找到。

24 |

返回首页 或发送邮件 support@w3l.com 联系我们

25 | 26 |
27 |
28 |
29 |
30 | 31 | 32 | -------------------------------------------------------------------------------- /src/main/webapp/static/js/user/move-top.js: -------------------------------------------------------------------------------- 1 | /* UItoTop jQuery Plugin 1.2 | Matt Varone | http://www.mattvarone.com/web-design/uitotop-jquery-plugin */ 2 | (function($){$.fn.UItoTop=function(options){var defaults={text:'To Top',min:200,inDelay:600,outDelay:400,containerID:'toTop',containerHoverID:'toTopHover',scrollSpeed:1000,easingType:'linear'},settings=$.extend(defaults,options),containerIDhash='#'+settings.containerID,containerHoverIDHash='#'+settings.containerHoverID;$('body').append(''+settings.text+'');$(containerIDhash).hide().on('click.UItoTop',function(){$('html, body').animate({scrollTop:0},settings.scrollSpeed,settings.easingType);$('#'+settings.containerHoverID,this).stop().animate({'opacity':0},settings.inDelay,settings.easingType);return false;}).prepend('').hover(function(){$(containerHoverIDHash,this).stop().animate({'opacity':1},600,'linear');},function(){$(containerHoverIDHash,this).stop().animate({'opacity':0},700,'linear');});$(window).scroll(function(){var sd=$(window).scrollTop();if(typeof document.body.style.maxHeight==="undefined"){$(containerIDhash).css({'position':'absolute','top':sd+$(window).height()-50});} 3 | if(sd>settings.min) 4 | $(containerIDhash).fadeIn(settings.inDelay);else 5 | $(containerIDhash).fadeOut(settings.Outdelay);});};})(jQuery); -------------------------------------------------------------------------------- /src/main/webapp/static/js/admin/sb-admin-2.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | 3 | $('#side-menu').metisMenu(); 4 | 5 | }); 6 | 7 | //Loads the correct sidebar on window load, 8 | //collapses the sidebar on window resize. 9 | // Sets the min-height of #page-wrapper to window size 10 | $(function() { 11 | $(window).bind("load resize", function() { 12 | topOffset = 50; 13 | width = (this.window.innerWidth > 0) ? this.window.innerWidth : this.screen.width; 14 | if (width < 768) { 15 | $('div.navbar-collapse').addClass('collapse'); 16 | topOffset = 100; // 2-row-menu 17 | } else { 18 | $('div.navbar-collapse').removeClass('collapse'); 19 | } 20 | 21 | height = ((this.window.innerHeight > 0) ? this.window.innerHeight : this.screen.height) - 1; 22 | height = height - topOffset; 23 | if (height < 1) height = 1; 24 | if (height > topOffset) { 25 | // $("#page-wrapper").css("min-height", (height) + "px"); 26 | } 27 | }); 28 | 29 | var url = window.location; 30 | var element = $('ul.nav a').filter(function() { 31 | return this.href == url || url.href.indexOf(this.href) == 0; 32 | }).addClass('active').parent().parent().addClass('in').parent(); 33 | if (element.is('li')) { 34 | element.addClass('active'); 35 | } 36 | }); 37 | -------------------------------------------------------------------------------- /src/main/java/club/util/Message.java: -------------------------------------------------------------------------------- 1 | package club.util; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | /** 7 | * @author Mr Wu 8 | * @create: 2019-08-20 15:12 9 | */ 10 | public class Message { 11 | 12 | /** 13 | * 状态码 100-成功 200-失败 14 | * */ 15 | private int code; 16 | 17 | /** 18 | * 提示信息 19 | * */ 20 | private String message; 21 | 22 | /** 23 | * 用户要返回给浏览器的数据 24 | * */ 25 | private Map extend = new HashMap(); 26 | 27 | public static Message success(){ 28 | Message result = new Message(); 29 | result.setCode(100); 30 | result.setMessage("处理成功!"); 31 | return result; 32 | } 33 | 34 | public static Message fail(){ 35 | Message result = new Message(); 36 | result.setCode(200); 37 | result.setMessage("处理失败!"); 38 | return result; 39 | } 40 | 41 | public Message add(String key,Object value){ 42 | this.getExtend().put(key, value); 43 | return this; 44 | } 45 | 46 | public int getCode() { 47 | return code; 48 | } 49 | 50 | public void setCode(int code) { 51 | this.code = code; 52 | } 53 | 54 | public String getMessage() { 55 | return message; 56 | } 57 | 58 | public void setMessage(String message) { 59 | this.message = message; 60 | } 61 | 62 | public Map getExtend() { 63 | return extend; 64 | } 65 | 66 | public void setExtend(Map extend) { 67 | this.extend = extend; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /src/main/java/club/service/impl/ApplyServiceImpl.java: -------------------------------------------------------------------------------- 1 | package club.service.impl; 2 | 3 | import club.dao.ApplyMapper; 4 | import club.pojo.Apply; 5 | import club.service.ApplyService; 6 | import com.baomidou.mybatisplus.mapper.EntityWrapper; 7 | import com.github.pagehelper.PageHelper; 8 | import com.github.pagehelper.PageInfo; 9 | import org.springframework.stereotype.Service; 10 | import org.springframework.transaction.annotation.Transactional; 11 | 12 | import javax.annotation.Resource; 13 | import java.util.List; 14 | 15 | @Service 16 | @Transactional 17 | public class ApplyServiceImpl implements ApplyService { 18 | @Resource 19 | private ApplyMapper applyMapper; 20 | @Override 21 | public PageInfo allApply(Integer state, Integer pageNum, Integer pageSize) { 22 | PageHelper.startPage(pageNum,pageSize); 23 | EntityWrapper wrapper = new EntityWrapper(); 24 | if(state != null && state != 0){ 25 | wrapper.eq("state",state); 26 | } 27 | List list = applyMapper.selectList(wrapper); 28 | PageInfo pageInfo = new PageInfo<>(list); 29 | return pageInfo; 30 | } 31 | 32 | @Override 33 | public Apply findByid(Integer id) { 34 | return applyMapper.selectById(id); 35 | } 36 | 37 | @Override 38 | public int updateApply(Apply apply) { 39 | return applyMapper.updateById(apply); 40 | } 41 | 42 | @Override 43 | public int del(Integer id) { 44 | return applyMapper.deleteById(id); 45 | } 46 | 47 | @Override 48 | public Integer create(Apply apply) { 49 | return applyMapper.insert(apply); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/webapp/static/js/user/demo.js: -------------------------------------------------------------------------------- 1 | //定义全局变量和定时器 2 | var i = 0 ; 3 | var timer; 4 | 5 | $(document).ready(function(){ 6 | //用jquery方法设置第一张图片显示,其余隐藏 7 | $('.ig').eq(0).show().siblings('.ig').hide(); 8 | 9 | //调用showTime()函数(轮播函数) 10 | showTime(); 11 | 12 | //当鼠标经过下面的数字时,触发两个事件(鼠标悬停和鼠标离开) 13 | $('.tab').hover(function(){ 14 | //获取当前i的值,并显示,同时还要清除定时器 15 | i = $(this).index(); 16 | Show(); 17 | clearInterval(timer); 18 | },function(){ 19 | // 20 | showTime(); 21 | }); 22 | 23 | //鼠标点击左侧的箭头 24 | $('.btn1').click(function(){ 25 | clearInterval(timer); 26 | if(i == 0){ 27 | i = 5;//注意此时i的值 28 | } 29 | i--; 30 | Show(); 31 | showTime(); 32 | }); 33 | 34 | //鼠标点击右侧的箭头 35 | $('.btn2').click(function(){ 36 | clearInterval(timer); 37 | if(i == 4){ 38 | i = -1;//注意此时i的值 39 | } 40 | i++; 41 | Show(); 42 | showTime(); 43 | }); 44 | 45 | }); 46 | 47 | 48 | //创建一个showTime函数 49 | function showTime(){ 50 | //定时器 51 | timer = setInterval(function(){ 52 | //调用一个Show()函数 53 | Show(); 54 | i++; 55 | //当图片是最后一张的后面时,设置图片为第一张 56 | if(i==5){ 57 | i=0; 58 | } 59 | },2000); 60 | } 61 | 62 | 63 | //创建一个Show函数 64 | function Show(){ 65 | //在这里可以用其他jquery的动画 66 | $('.ig').eq(i).fadeIn(300).siblings('.ig').fadeOut(300); 67 | 68 | //给.tab创建一个新的Class为其添加一个新的样式,并且要在css代码中设置该样式 69 | $('.tab').eq(i).addClass('bg').siblings('.tab').removeClass('bg'); 70 | 71 | /* 72 | * css中添加的代码: 73 | * .bg{ background-color: #f00; } 74 | * */ 75 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## 基于Java+SSM的宠物领养管理系统619 2 | 3 | ## 一、系统介绍 4 | 5 | 本项目分为管理员与普通用户两种角色 6 | 7 | 管理员角色包含以下功能: 8 | 9 | - 用户管理 10 | - 管理员管理 11 | - 宠物管理 12 | - 领养管理 13 | - 评论管理 14 | - 志愿者申请管理 15 | - 活动管理 16 | 17 | 用户角色包含以下功能: 18 | 19 | - 宠物列表 20 | - 申请领养宠物 21 | - 宠物知识学习 22 | - 志愿者申请 23 | - 登录、注册 24 | 25 | ## 二、所用技术 26 | 27 | 后端技术栈: 28 | 29 | - ssm(Spring+SpringMvc+Mybatis) 30 | - mysql 31 | 32 | 前端技术栈: 33 | 34 | - jsp 35 | - bootstrap 36 | 37 | ## 三、环境介绍 38 | 39 | 基础环境 :IDEA/eclipse, JDK 1.8, Mysql5.7,Maven3.6,tomcat8.5 40 | 41 | 所有项目以及源代码本人均调试运行无问题 可支持远程调试运行 42 | 43 | ## 四、页面截图 44 | 45 | ![contents](./picture/picture1.png) 46 | 47 | ![contents](./picture/picture2.png) 48 | 49 | ![contents](./picture/picture3.png) 50 | 51 | ![contents](./picture/picture4.png) 52 | 53 | ![contents](./picture/picture5.png) 54 | 55 | ![contents](./picture/picture6.png) 56 | 57 | ![contents](./picture/picture7.png) 58 | 59 | ![contents](./picture/picture8.png) 60 | 61 | ![contents](./picture/picture9.png) 62 | 63 | ![contents](./picture/picture10.png) 64 | 65 | ![contents](./picture/picture11.png) 66 | 67 | ![contents](./picture/picture12.png) 68 | 69 | ![contents](./picture/picture13.png) 70 | 71 | ![contents](./picture/picture14.png) 72 | 73 | ![contents](./picture/picture15.png) 74 | 75 | ![contents](./picture/picture16.png) 76 | 77 | ![contents](./picture/picture17.png) 78 | 79 | 80 | ## 五、浏览地址 81 | 82 | 前端访问地址:http://localhost:8989/adopt/user/index 83 | 84 | 用户账号/密码:张三丰/zsf123 85 | 86 | 管理端访问地址:http://localhost:8989/adopt/admin/login 87 | 88 | 管理员账号/密码:贝尔/1111 89 | 90 | ## 六、安装教程 91 | 92 | 1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并执行项目的sql文件里面的sql; 93 | 2. 使用IDEA/Eclipse导入项目,导入时,若为maven项目请选择maven; 导入成功后请执行maven clean;maven install命令,然后运行; 94 | 3. 修改database.properties 里面的数据库配置 95 | 4. 启动项目后端项目 96 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /src/main/java/club/controller/AnswerController.java: -------------------------------------------------------------------------------- 1 | package club.controller; 2 | 3 | import club.pojo.Answer; 4 | import club.pojo.User; 5 | import club.service.AnswerService; 6 | import club.util.Message; 7 | import org.springframework.stereotype.Controller; 8 | import org.springframework.web.bind.annotation.RequestMapping; 9 | import org.springframework.web.bind.annotation.ResponseBody; 10 | 11 | import javax.annotation.Resource; 12 | import javax.servlet.http.HttpSession; 13 | import java.util.List; 14 | 15 | @Controller 16 | @RequestMapping("/answer") 17 | public class AnswerController { 18 | 19 | @Resource 20 | private AnswerService answerService; 21 | 22 | @RequestMapping("/create") 23 | @ResponseBody 24 | public Message create(HttpSession session, Integer commentId, String content){ 25 | User user = (User) session.getAttribute("user"); 26 | Integer integer = answerService.create(user.getId(), commentId, content); 27 | if (integer > 0){ 28 | return Message.success(); 29 | }else { 30 | return Message.fail(); 31 | } 32 | } 33 | 34 | @RequestMapping("/findById") 35 | @ResponseBody 36 | public Message findById(Integer id){ 37 | Answer answer = answerService.findById(id); 38 | return Message.success().add("answer", answer); 39 | } 40 | 41 | @RequestMapping("/creates") 42 | @ResponseBody 43 | public Message creates(HttpSession session, Integer replayId, String content, Integer commentId){ 44 | User user = (User) session.getAttribute("user"); 45 | Integer integer = answerService.creates(user.getId(), replayId, content, commentId); 46 | if (integer > 0){ 47 | return Message.success(); 48 | }else { 49 | return Message.fail(); 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/webapp/static/js/admin/metisMenu.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * metismenu - v1.1.3 3 | * Easy menu jQuery plugin for Twitter Bootstrap 3 4 | * https://github.com/onokumus/metisMenu 5 | * 6 | * Made by Osman Nuri Okumus 7 | * Under MIT License 8 | */ 9 | !function(a,b,c){function d(b,c){this.element=a(b),this.settings=a.extend({},f,c),this._defaults=f,this._name=e,this.init()}var e="metisMenu",f={toggle:!0,doubleTapToGo:!1};d.prototype={init:function(){var b=this.element,d=this.settings.toggle,f=this;this.isIE()<=9?(b.find("li.active").has("ul").children("ul").collapse("show"),b.find("li").not(".active").has("ul").children("ul").collapse("hide")):(b.find("li.active").has("ul").children("ul").addClass("collapse in"),b.find("li").not(".active").has("ul").children("ul").addClass("collapse")),f.settings.doubleTapToGo&&b.find("li.active").has("ul").children("a").addClass("doubleTapToGo"),b.find("li").has("ul").children("a").on("click."+e,function(b){return b.preventDefault(),f.settings.doubleTapToGo&&f.doubleTapToGo(a(this))&&"#"!==a(this).attr("href")&&""!==a(this).attr("href")?(b.stopPropagation(),void(c.location=a(this).attr("href"))):(a(this).parent("li").toggleClass("active").children("ul").collapse("toggle"),void(d&&a(this).parent("li").siblings().removeClass("active").children("ul.in").collapse("hide")))})},isIE:function(){for(var a,b=3,d=c.createElement("div"),e=d.getElementsByTagName("i");d.innerHTML="",e[0];)return b>4?b:a},doubleTapToGo:function(a){var b=this.element;return a.hasClass("doubleTapToGo")?(a.removeClass("doubleTapToGo"),!0):a.parent().children("ul").length?(b.find(".doubleTapToGo").removeClass("doubleTapToGo"),a.addClass("doubleTapToGo"),!1):void 0},remove:function(){this.element.off("."+e),this.element.removeData(e)}},a.fn[e]=function(b){return this.each(function(){var c=a(this);c.data(e)&&c.data(e).remove(),c.data(e,new d(this,b))}),this}}(jQuery,window,document); -------------------------------------------------------------------------------- /src/main/webapp/static/js/admin/dataTables.bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | DataTables Bootstrap 3 integration 3 | ©2011-2014 SpryMedia Ltd - datatables.net/license 4 | */ 5 | (function(){var f=function(c,b){c.extend(!0,b.defaults,{dom:"<'row'<'col-sm-6'l><'col-sm-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-6'i><'col-sm-6'p>>",renderer:"bootstrap"});c.extend(b.ext.classes,{sWrapper:"dataTables_wrapper form-inline dt-bootstrap",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm"});b.ext.renderer.pageButton.bootstrap=function(g,f,p,k,h,l){var q=new b.Api(g),r=g.oClasses,i=g.oLanguage.oPaginate,d,e,o=function(b,f){var j,m,n,a,k=function(a){a.preventDefault(); 6 | c(a.currentTarget).hasClass("disabled")||q.page(a.data.action).draw(!1)};j=0;for(m=f.length;j",{"class":r.sPageButton+" "+ 7 | e,"aria-controls":g.sTableId,tabindex:g.iTabIndex,id:0===p&&"string"===typeof a?g.sTableId+"_"+a:null}).append(c("",{href:"#"}).html(d)).appendTo(b),g.oApi._fnBindAction(n,{action:a},k))}};o(c(f).empty().html('