├── .gitattributes
├── src
└── main
│ ├── webapp
│ ├── statics
│ │ ├── image
│ │ │ ├── logo
│ │ │ │ ├── next.png
│ │ │ │ ├── yihan.png
│ │ │ │ ├── previous.png
│ │ │ │ └── new_message.png
│ │ │ ├── goods
│ │ │ │ ├── 7
│ │ │ │ │ ├── 12
│ │ │ │ │ │ └── 12unWX3qGpvg.jpeg
│ │ │ │ │ ├── 14
│ │ │ │ │ │ └── 14QEuEfOES5q.png
│ │ │ │ │ ├── 15
│ │ │ │ │ │ └── 15gCMCqHcv4D.png
│ │ │ │ │ ├── 16
│ │ │ │ │ │ └── 16KLn2sdN6pv.png
│ │ │ │ │ ├── 17
│ │ │ │ │ │ └── 17BSpHSoJVrd.png
│ │ │ │ │ ├── 18
│ │ │ │ │ │ └── 18i9ctyOx38Y.png
│ │ │ │ │ ├── 19
│ │ │ │ │ │ └── 19xLaSNQYcwf.png
│ │ │ │ │ ├── 20
│ │ │ │ │ │ └── 20Z6Auhqbph3.png
│ │ │ │ │ ├── 21
│ │ │ │ │ │ └── 21j8V18yxMi9.png
│ │ │ │ │ ├── 22
│ │ │ │ │ │ └── 22IpyJxoG1dq.png
│ │ │ │ │ ├── 23
│ │ │ │ │ │ └── 23BRaeGfWoZj.png
│ │ │ │ │ ├── 24
│ │ │ │ │ │ └── 245OlA8oJRhx.png
│ │ │ │ │ ├── 25
│ │ │ │ │ │ └── 25JpDAyzPLsd.png
│ │ │ │ │ ├── 26
│ │ │ │ │ │ └── 26cH3my4nT9l.png
│ │ │ │ │ ├── 27
│ │ │ │ │ │ └── 27YVezdS3bcD.png
│ │ │ │ │ ├── 28
│ │ │ │ │ │ └── 28KLJm4DPrh4.png
│ │ │ │ │ ├── 29
│ │ │ │ │ │ └── 296pPr3Ea6Vw.png
│ │ │ │ │ ├── 30
│ │ │ │ │ │ └── 30t7rGtJgVwq.png
│ │ │ │ │ ├── 31
│ │ │ │ │ │ └── 31EB8N3Crf6h.png
│ │ │ │ │ ├── 32
│ │ │ │ │ │ └── 324oiaEjHx6f.png
│ │ │ │ │ ├── 33
│ │ │ │ │ │ └── 33IBd31x4iHV.png
│ │ │ │ │ ├── 34
│ │ │ │ │ │ └── 34Zc8fKGM7vZ.png
│ │ │ │ │ ├── 35
│ │ │ │ │ │ └── 35sNyDXuOh17.png
│ │ │ │ │ ├── 36
│ │ │ │ │ │ └── 36I3HiAsLXVI.png
│ │ │ │ │ ├── 37
│ │ │ │ │ │ └── 37haLFDrlCWl.png
│ │ │ │ │ ├── 38
│ │ │ │ │ │ └── 38vbwBonRJyO.png
│ │ │ │ │ └── 39
│ │ │ │ │ │ └── 391yZf9U2utk.png
│ │ │ │ ├── test
│ │ │ │ │ ├── 1.jpg
│ │ │ │ │ ├── 2.jpg
│ │ │ │ │ ├── 3.jpg
│ │ │ │ │ ├── 4.jpg
│ │ │ │ │ ├── 5.jpg
│ │ │ │ │ └── 6.jpg
│ │ │ │ └── default
│ │ │ │ │ └── nophoto.png
│ │ │ ├── background
│ │ │ │ ├── background1.jpg
│ │ │ │ ├── background2.jpg
│ │ │ │ ├── loginbackground.jpg
│ │ │ │ └── loginbackground1.jpg
│ │ │ └── photos
│ │ │ │ └── default
│ │ │ │ ├── default.png
│ │ │ │ └── shouqing.png
│ │ ├── jquery-ui-1.12.1
│ │ │ ├── images
│ │ │ │ ├── ui-icons_454545_256x240.png
│ │ │ │ ├── ui-icons_88a206_256x240.png
│ │ │ │ ├── ui-icons_c02669_256x240.png
│ │ │ │ ├── ui-icons_e1e463_256x240.png
│ │ │ │ ├── ui-icons_ffeb33_256x240.png
│ │ │ │ ├── ui-icons_ffffff_256x240.png
│ │ │ │ ├── ui-bg_dots-small_35_35414f_2x2.png
│ │ │ │ ├── ui-bg_dots-medium_80_ffff38_4x4.png
│ │ │ │ ├── ui-bg_white-lines_85_f7f7ba_40x100.png
│ │ │ │ ├── ui-bg_diagonals-small_40_db4865_40x40.png
│ │ │ │ ├── ui-bg_diagonals-small_50_93c3cd_40x40.png
│ │ │ │ ├── ui-bg_diagonals-small_50_ff3853_40x40.png
│ │ │ │ └── ui-bg_diagonals-small_75_ccd232_40x40.png
│ │ │ ├── datepicker-zh-CN.js
│ │ │ └── jquery-ui.theme.min.css
│ │ ├── bootstrap-3.3.0
│ │ │ └── fonts
│ │ │ │ ├── glyphicons-halflings-regular.eot
│ │ │ │ ├── glyphicons-halflings-regular.ttf
│ │ │ │ └── glyphicons-halflings-regular.woff
│ │ ├── css
│ │ │ ├── simpleAlert.css
│ │ │ └── style.css
│ │ └── js
│ │ │ └── simpleAlert.js
│ └── WEB-INF
│ │ ├── views
│ │ ├── home
│ │ │ ├── footer.jsp
│ │ │ ├── error.jsp
│ │ │ ├── header.jsp
│ │ │ ├── login.jsp
│ │ │ ├── register.jsp
│ │ │ └── homeGoods.jsp
│ │ ├── goods
│ │ │ ├── error.jsp
│ │ │ ├── userGood.jsp
│ │ │ ├── publishGood.jsp
│ │ │ └── userGoodEdit.jsp
│ │ ├── admin
│ │ │ └── adminLogin.jsp
│ │ └── user
│ │ │ ├── sellerInfo.jsp
│ │ │ └── orderInfo.jsp
│ │ └── web.xml
│ ├── java
│ └── com
│ │ └── wzh
│ │ └── secondshop
│ │ ├── controllers
│ │ ├── ExceptionController.java
│ │ ├── CollectController.java
│ │ ├── TypeController.java
│ │ ├── OrderController.java
│ │ ├── HomeController.java
│ │ ├── AdminController.java
│ │ └── UserController.java
│ │ ├── models
│ │ ├── Status.java
│ │ ├── Role.java
│ │ ├── SecondType.java
│ │ ├── FirstType.java
│ │ ├── Password.java
│ │ ├── Image.java
│ │ ├── Photo.java
│ │ ├── Collect.java
│ │ ├── Reply.java
│ │ ├── Review.java
│ │ ├── Order.java
│ │ ├── User.java
│ │ └── Good.java
│ │ ├── utils
│ │ ├── RandomString.java
│ │ ├── InfoCheck.java
│ │ └── FileCheck.java
│ │ ├── mappers
│ │ ├── ImageMapper.java
│ │ ├── FirstTypeMapper.java
│ │ ├── CollectMapper.java
│ │ ├── SecondTypeMapper.java
│ │ ├── UserMapper.java
│ │ ├── OrderMapper.java
│ │ ├── ReviewMapper.java
│ │ └── GoodMapper.java
│ │ ├── services
│ │ ├── ImageService.java
│ │ ├── CollectService.java
│ │ ├── UserService.java
│ │ ├── ReviewService.java
│ │ ├── OrderService.java
│ │ ├── TypeService.java
│ │ └── GoodService.java
│ │ └── exception
│ │ └── ExceptionHandler.java
│ └── resources
│ └── spring
│ ├── servlet-context.xml
│ └── mybatis.xml
├── README.md
└── pom.xml
/.gitattributes:
--------------------------------------------------------------------------------
1 | *.js linguist-language=java
2 | *.css linguist-language=java
3 | *.html linguist-language=java
4 | *.vue linguist-language=java
--------------------------------------------------------------------------------
/src/main/webapp/statics/image/logo/next.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/image/logo/next.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/image/logo/yihan.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/image/logo/yihan.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/image/goods/test/1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/image/goods/test/1.jpg
--------------------------------------------------------------------------------
/src/main/webapp/statics/image/goods/test/2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/image/goods/test/2.jpg
--------------------------------------------------------------------------------
/src/main/webapp/statics/image/goods/test/3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/image/goods/test/3.jpg
--------------------------------------------------------------------------------
/src/main/webapp/statics/image/goods/test/4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/image/goods/test/4.jpg
--------------------------------------------------------------------------------
/src/main/webapp/statics/image/goods/test/5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/image/goods/test/5.jpg
--------------------------------------------------------------------------------
/src/main/webapp/statics/image/goods/test/6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/image/goods/test/6.jpg
--------------------------------------------------------------------------------
/src/main/webapp/statics/image/logo/previous.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/image/logo/previous.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/image/logo/new_message.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/image/logo/new_message.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/image/background/background1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/image/background/background1.jpg
--------------------------------------------------------------------------------
/src/main/webapp/statics/image/background/background2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/image/background/background2.jpg
--------------------------------------------------------------------------------
/src/main/webapp/statics/image/goods/7/14/14QEuEfOES5q.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/image/goods/7/14/14QEuEfOES5q.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/image/goods/7/15/15gCMCqHcv4D.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/image/goods/7/15/15gCMCqHcv4D.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/image/goods/7/16/16KLn2sdN6pv.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/image/goods/7/16/16KLn2sdN6pv.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/image/goods/7/17/17BSpHSoJVrd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/image/goods/7/17/17BSpHSoJVrd.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/image/goods/7/18/18i9ctyOx38Y.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/image/goods/7/18/18i9ctyOx38Y.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/image/goods/7/19/19xLaSNQYcwf.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/image/goods/7/19/19xLaSNQYcwf.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/image/goods/7/20/20Z6Auhqbph3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/image/goods/7/20/20Z6Auhqbph3.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/image/goods/7/21/21j8V18yxMi9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/image/goods/7/21/21j8V18yxMi9.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/image/goods/7/22/22IpyJxoG1dq.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/image/goods/7/22/22IpyJxoG1dq.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/image/goods/7/23/23BRaeGfWoZj.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/image/goods/7/23/23BRaeGfWoZj.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/image/goods/7/24/245OlA8oJRhx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/image/goods/7/24/245OlA8oJRhx.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/image/goods/7/25/25JpDAyzPLsd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/image/goods/7/25/25JpDAyzPLsd.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/image/goods/7/26/26cH3my4nT9l.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/image/goods/7/26/26cH3my4nT9l.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/image/goods/7/27/27YVezdS3bcD.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/image/goods/7/27/27YVezdS3bcD.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/image/goods/7/28/28KLJm4DPrh4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/image/goods/7/28/28KLJm4DPrh4.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/image/goods/7/29/296pPr3Ea6Vw.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/image/goods/7/29/296pPr3Ea6Vw.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/image/goods/7/30/30t7rGtJgVwq.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/image/goods/7/30/30t7rGtJgVwq.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/image/goods/7/31/31EB8N3Crf6h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/image/goods/7/31/31EB8N3Crf6h.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/image/goods/7/32/324oiaEjHx6f.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/image/goods/7/32/324oiaEjHx6f.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/image/goods/7/33/33IBd31x4iHV.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/image/goods/7/33/33IBd31x4iHV.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/image/goods/7/34/34Zc8fKGM7vZ.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/image/goods/7/34/34Zc8fKGM7vZ.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/image/goods/7/35/35sNyDXuOh17.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/image/goods/7/35/35sNyDXuOh17.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/image/goods/7/36/36I3HiAsLXVI.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/image/goods/7/36/36I3HiAsLXVI.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/image/goods/7/37/37haLFDrlCWl.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/image/goods/7/37/37haLFDrlCWl.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/image/goods/7/38/38vbwBonRJyO.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/image/goods/7/38/38vbwBonRJyO.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/image/goods/7/39/391yZf9U2utk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/image/goods/7/39/391yZf9U2utk.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/image/goods/default/nophoto.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/image/goods/default/nophoto.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/image/photos/default/default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/image/photos/default/default.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/image/photos/default/shouqing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/image/photos/default/shouqing.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/image/goods/7/12/12unWX3qGpvg.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/image/goods/7/12/12unWX3qGpvg.jpeg
--------------------------------------------------------------------------------
/src/main/webapp/statics/image/background/loginbackground.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/image/background/loginbackground.jpg
--------------------------------------------------------------------------------
/src/main/webapp/statics/image/background/loginbackground1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/image/background/loginbackground1.jpg
--------------------------------------------------------------------------------
/src/main/webapp/statics/jquery-ui-1.12.1/images/ui-icons_454545_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/jquery-ui-1.12.1/images/ui-icons_454545_256x240.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/jquery-ui-1.12.1/images/ui-icons_88a206_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/jquery-ui-1.12.1/images/ui-icons_88a206_256x240.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/jquery-ui-1.12.1/images/ui-icons_c02669_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/jquery-ui-1.12.1/images/ui-icons_c02669_256x240.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/jquery-ui-1.12.1/images/ui-icons_e1e463_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/jquery-ui-1.12.1/images/ui-icons_e1e463_256x240.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/jquery-ui-1.12.1/images/ui-icons_ffeb33_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/jquery-ui-1.12.1/images/ui-icons_ffeb33_256x240.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/jquery-ui-1.12.1/images/ui-icons_ffffff_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/jquery-ui-1.12.1/images/ui-icons_ffffff_256x240.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/bootstrap-3.3.0/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/bootstrap-3.3.0/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/src/main/webapp/statics/bootstrap-3.3.0/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/bootstrap-3.3.0/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/src/main/webapp/statics/bootstrap-3.3.0/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/bootstrap-3.3.0/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/src/main/webapp/statics/jquery-ui-1.12.1/images/ui-bg_dots-small_35_35414f_2x2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/jquery-ui-1.12.1/images/ui-bg_dots-small_35_35414f_2x2.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/jquery-ui-1.12.1/images/ui-bg_dots-medium_80_ffff38_4x4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/jquery-ui-1.12.1/images/ui-bg_dots-medium_80_ffff38_4x4.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/jquery-ui-1.12.1/images/ui-bg_white-lines_85_f7f7ba_40x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/jquery-ui-1.12.1/images/ui-bg_white-lines_85_f7f7ba_40x100.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/jquery-ui-1.12.1/images/ui-bg_diagonals-small_40_db4865_40x40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/jquery-ui-1.12.1/images/ui-bg_diagonals-small_40_db4865_40x40.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/jquery-ui-1.12.1/images/ui-bg_diagonals-small_50_93c3cd_40x40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/jquery-ui-1.12.1/images/ui-bg_diagonals-small_50_93c3cd_40x40.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/jquery-ui-1.12.1/images/ui-bg_diagonals-small_50_ff3853_40x40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/jquery-ui-1.12.1/images/ui-bg_diagonals-small_50_ff3853_40x40.png
--------------------------------------------------------------------------------
/src/main/webapp/statics/jquery-ui-1.12.1/images/ui-bg_diagonals-small_75_ccd232_40x40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SimpleGraduationProjects/CampusSecond_handTradingPlatformManagementSystem/HEAD/src/main/webapp/statics/jquery-ui-1.12.1/images/ui-bg_diagonals-small_75_ccd232_40x40.png
--------------------------------------------------------------------------------
/src/main/webapp/WEB-INF/views/home/footer.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=UTF-8"
2 | pageEncoding="UTF-8"%>
3 |
--------------------------------------------------------------------------------
/src/main/java/com/wzh/secondshop/controllers/ExceptionController.java:
--------------------------------------------------------------------------------
1 | package com.wzh.secondshop.controllers;
2 |
3 | import org.springframework.stereotype.Controller;
4 | import org.springframework.web.bind.annotation.RequestMapping;
5 |
6 | @Controller
7 | public class ExceptionController {
8 | @RequestMapping(value = "/error")
9 | public void toError() {
10 | int b = 10 / 0;
11 | System.out.println(b);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/main/java/com/wzh/secondshop/models/Status.java:
--------------------------------------------------------------------------------
1 | package com.wzh.secondshop.models;
2 |
3 | /**
4 | *
5 | * @author WEN
6 | *
7 | */
8 | public class Status {
9 | private int id;
10 | private String name;
11 |
12 | public int getId() {
13 | return id;
14 | }
15 |
16 | public void setId(int id) {
17 | this.id = id;
18 | }
19 |
20 | public String getName() {
21 | return name;
22 | }
23 |
24 | public void setName(String name) {
25 | this.name = name;
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/src/main/java/com/wzh/secondshop/utils/RandomString.java:
--------------------------------------------------------------------------------
1 | package com.wzh.secondshop.utils;
2 |
3 | /**
4 | * 加密方法
5 | *
6 | * @author WEN
7 | *
8 | */
9 | public class RandomString {
10 | /**
11 | * 加密用户密码
12 | *
13 | * @param m
14 | * 用户密码输入的长度
15 | * @return
16 | */
17 | public String getRandomString(int m) {
18 | String str = "";
19 | for (int i = 0; i < m; i++) {
20 | String STR = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
21 | int n = (int) (Math.random() * (STR.length() - 1));
22 | str += STR.charAt(n);
23 | }
24 | return str;
25 | }
26 |
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/src/main/java/com/wzh/secondshop/models/Role.java:
--------------------------------------------------------------------------------
1 | package com.wzh.secondshop.models;
2 |
3 | /**
4 | * 权限表
5 | *
6 | * @author WEN
7 | *
8 | */
9 | public class Role {
10 | private int id;
11 | private String code;
12 | private String role;
13 |
14 | public int getId() {
15 | return id;
16 | }
17 |
18 | public void setId(int id) {
19 | this.id = id;
20 | }
21 |
22 | public String getCode() {
23 | return code;
24 | }
25 |
26 | public void setCode(String code) {
27 | this.code = code;
28 | }
29 |
30 | public String getRole() {
31 | return role;
32 | }
33 |
34 | public void setRole(String role) {
35 | this.role = role;
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/java/com/wzh/secondshop/models/SecondType.java:
--------------------------------------------------------------------------------
1 | package com.wzh.secondshop.models;
2 |
3 | /**
4 | * 二级分类表
5 | *
6 | * @author WEN
7 | *
8 | */
9 | public class SecondType {
10 | private int id;
11 | private int firstTypeId;
12 | private String name;
13 |
14 | public int getId() {
15 | return id;
16 | }
17 |
18 | public void setId(int id) {
19 | this.id = id;
20 | }
21 |
22 | public int getFirstTypeId() {
23 | return firstTypeId;
24 | }
25 |
26 | public void setFirstTypeId(int firstTypeId) {
27 | this.firstTypeId = firstTypeId;
28 | }
29 |
30 | public String getName() {
31 | return name;
32 | }
33 |
34 | public void setName(String name) {
35 | this.name = name;
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/java/com/wzh/secondshop/mappers/ImageMapper.java:
--------------------------------------------------------------------------------
1 | package com.wzh.secondshop.mappers;
2 |
3 | import com.wzh.secondshop.models.Image;
4 | import org.apache.ibatis.annotations.Delete;
5 | import org.apache.ibatis.annotations.Insert;
6 | import org.apache.ibatis.annotations.Select;
7 |
8 | import java.util.List;
9 |
10 | public interface ImageMapper {
11 | @Select("select * from image_table where good_id = #{goodId};")
12 | List getImageByGoodId(Integer goodId);
13 |
14 | @Insert("insert into image_table(good_id, name, url) values(#{goodId}, #{name}, #{url});")
15 | int insertImage(Image image);
16 |
17 | @Delete("delete from image_table where good_id = #{goodId};")
18 | int deleteImage(Integer goodId);
19 | }
20 |
--------------------------------------------------------------------------------
/src/main/java/com/wzh/secondshop/utils/InfoCheck.java:
--------------------------------------------------------------------------------
1 | package com.wzh.secondshop.utils;
2 |
3 | import java.util.regex.Pattern;
4 |
5 | /**
6 | * 信息检查
7 | *
8 | * @author WEN
9 | *
10 | */
11 | public class InfoCheck {
12 |
13 | /**
14 | * 用户邮箱格式检查
15 | */
16 | public static String CHECK_EMAIL = "^([a-z0-9A-Z]+[-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$";
17 |
18 | public boolean isEmail(String email) {
19 | return Pattern.matches(CHECK_EMAIL, email);
20 | }
21 |
22 | /**
23 | * 用户电话格式检查
24 | */
25 | public static String CHECK_MOBILE = "^((13[0-9])|(15[^4,\\D])|(18[0,5-9]))\\d{8}$";
26 |
27 | public boolean isMobile(String mobile) {
28 | return Pattern.matches(CHECK_MOBILE, mobile);
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/com/wzh/secondshop/models/FirstType.java:
--------------------------------------------------------------------------------
1 | package com.wzh.secondshop.models;
2 |
3 | import java.util.List;
4 |
5 | /**
6 | * 一级分类表
7 | *
8 | * @author WEN
9 | *
10 | */
11 | public class FirstType {
12 | private int id;
13 | private String name;
14 | private List secondTypes;
15 |
16 | public List getSecondType() {
17 | return secondTypes;
18 | }
19 |
20 | public void setSecondType(List secondTypes) {
21 | this.secondTypes = secondTypes;
22 | }
23 |
24 | public int getId() {
25 | return id;
26 | }
27 |
28 | public void setId(int id) {
29 | this.id = id;
30 | }
31 |
32 | public String getName() {
33 | return name;
34 | }
35 |
36 | public void setName(String name) {
37 | this.name = name;
38 | }
39 |
40 | }
--------------------------------------------------------------------------------
/src/main/java/com/wzh/secondshop/models/Password.java:
--------------------------------------------------------------------------------
1 | package com.wzh.secondshop.models;
2 |
3 | /**
4 | * 密码表
5 | *
6 | * @author WEN
7 | *
8 | */
9 | public class Password {
10 | private int userId;
11 | private String oldPassword;
12 | private String newPassword;
13 |
14 | public int getUserId() {
15 | return userId;
16 | }
17 |
18 | public void setUserId(int userId) {
19 | this.userId = userId;
20 | }
21 |
22 | public String getOldPassword() {
23 | return oldPassword;
24 | }
25 |
26 | public void setOldPassword(String oldPassword) {
27 | this.oldPassword = oldPassword;
28 | }
29 |
30 | public String getNewPassword() {
31 | return newPassword;
32 | }
33 |
34 | public void setNewPassword(String newPassword) {
35 | this.newPassword = newPassword;
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/java/com/wzh/secondshop/models/Image.java:
--------------------------------------------------------------------------------
1 | package com.wzh.secondshop.models;
2 |
3 | /**
4 | * 物品照片表
5 | *
6 | * @author WEN
7 | *
8 | */
9 | public class Image {
10 | private int id;
11 | private int goodId;
12 | private String name;
13 | private String url;
14 |
15 | public int getId() {
16 | return id;
17 | }
18 |
19 | public void setId(int id) {
20 | this.id = id;
21 | }
22 |
23 | public int getGoodId() {
24 | return goodId;
25 | }
26 |
27 | public void setGoodId(int goodId) {
28 | this.goodId = goodId;
29 | }
30 |
31 | public String getName() {
32 | return name;
33 | }
34 |
35 | public void setName(String name) {
36 | this.name = name;
37 | }
38 |
39 | public String getUrl() {
40 | return url;
41 | }
42 |
43 | public void setUrl(String url) {
44 | this.url = url;
45 | }
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/src/main/java/com/wzh/secondshop/models/Photo.java:
--------------------------------------------------------------------------------
1 | package com.wzh.secondshop.models;
2 |
3 | /**
4 | * 头像表
5 | *
6 | * @author WEN
7 | *
8 | */
9 | public class Photo {
10 | private int id;
11 | private int userId;
12 | private String name;
13 | private String url;
14 |
15 | public int getId() {
16 | return id;
17 | }
18 |
19 | public void setId(int id) {
20 | this.id = id;
21 | }
22 |
23 | public int getUserId() {
24 | return userId;
25 | }
26 |
27 | public void setUserId(int userId) {
28 | this.userId = userId;
29 | }
30 |
31 | public String getName() {
32 | return name;
33 | }
34 |
35 | public void setName(String name) {
36 | this.name = name;
37 | }
38 |
39 | public String getUrl() {
40 | return url;
41 | }
42 |
43 | public void setUrl(String url) {
44 | this.url = url;
45 | }
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/src/main/java/com/wzh/secondshop/mappers/FirstTypeMapper.java:
--------------------------------------------------------------------------------
1 | package com.wzh.secondshop.mappers;
2 |
3 | import java.util.List;
4 |
5 | import org.apache.ibatis.annotations.Delete;
6 | import org.apache.ibatis.annotations.Insert;
7 | import org.apache.ibatis.annotations.Select;
8 |
9 | import com.wzh.secondshop.models.FirstType;
10 |
11 | public interface FirstTypeMapper {
12 | @Select("select * from first_type_table;")
13 | List getAllFirstType();
14 |
15 | @Select("select id from first_type_table ORDER BY id desc limit 0, 1;")
16 | Integer getFirstTypeLastId();
17 |
18 | @Insert("insert into first_type_table(id, name) values(#{id}, #{name});")
19 | int createFirstType(FirstType firstType);
20 |
21 | @Delete("delete from first_type_table where id = #{firstTypeId};")
22 | int deleteFirstType(Integer firstTypeId);
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/com/wzh/secondshop/services/ImageService.java:
--------------------------------------------------------------------------------
1 | package com.wzh.secondshop.services;
2 |
3 | import com.wzh.secondshop.mappers.ImageMapper;
4 | import com.wzh.secondshop.models.Image;
5 | import org.springframework.beans.factory.annotation.Autowired;
6 | import org.springframework.stereotype.Service;
7 | import org.springframework.transaction.annotation.Transactional;
8 |
9 | import java.util.List;
10 |
11 | @Service
12 | public class ImageService {
13 | @Autowired
14 | private ImageMapper imageMapper;
15 |
16 | @Transactional
17 | public List getImageByGoodId(Integer goodId) {
18 | return imageMapper.getImageByGoodId(goodId);
19 | }
20 |
21 | @Transactional
22 | public int insertImage(Image image) {
23 | return imageMapper.insertImage(image);
24 | }
25 |
26 | @Transactional
27 | public int deleteImage(Integer goodId) {
28 | return imageMapper.deleteImage(goodId);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/main/java/com/wzh/secondshop/mappers/CollectMapper.java:
--------------------------------------------------------------------------------
1 | package com.wzh.secondshop.mappers;
2 |
3 | import java.util.List;
4 |
5 | import org.apache.ibatis.annotations.Delete;
6 | import org.apache.ibatis.annotations.Insert;
7 | import org.apache.ibatis.annotations.Select;
8 |
9 | import com.wzh.secondshop.models.Collect;
10 |
11 | public interface CollectMapper {
12 | @Select("select * from collect_table where good_id = #{0} and user_id = #{1};")
13 | Collect getCollect(Integer goodId, Integer userId);
14 |
15 | @Select("select * from collect_table where user_id = #{0};")
16 | List getCollectByUserId(Integer userId);
17 |
18 | @Delete("delete from collect_table where id = #{0};")
19 | int deleteCollect(Integer collectId);
20 |
21 | @Insert("insert into collect_table(good_id, good_name, user_id) values(#{goodId}, #{goodName}, #{userId});")
22 | int insertCollect(Collect collect);
23 | }
24 |
--------------------------------------------------------------------------------
/src/main/webapp/statics/css/simpleAlert.css:
--------------------------------------------------------------------------------
1 | .simpleAlert{position: fixed;z-index: 1000;}
2 | .simpleAlertShelter{position: fixed;width: 100%;height: 100%;top:0;left:0;background-color: #000;opacity: 0.3;filter:alpha(opacity=30);}
3 | .simpleAlertBody{position:fixed;display: none;width: 476px;height: 216px;top:50%;left:50%;margin:-188px 0 0 -238px;opacity:0;border: 1px solid #948497;background-color: #fff;}
4 | .simpleAlertBodyClose{position: absolute;width: 14px;height: 14px;top:10px;right: 10px;padding: 5px;cursor: pointer;}
5 | .simpleAlertBodyContent{position: absolute;top:30%;width:96%;height:48px;overflow-y:auto;left: 2%;text-align: center;font-size: 18px;font-weight: 600;color: #333;}
6 | .simpleAlertBtn{position:absolute;width: 70px;height: 34px;top:60%;border: 1px solid #bfbfbf;cursor:pointer;border-radius: 5px;color: #fff;font-size: 16px;}
7 | .simpleAlertBtn1{background-color: #826289;left: 25%;}
8 | .simpleAlertBtn2{background-color: #f7f7f7;color: #333;right: 25%;}
9 | .onlyOne{width: 200px;height: 36px;left: 138px;}
--------------------------------------------------------------------------------
/src/main/java/com/wzh/secondshop/models/Collect.java:
--------------------------------------------------------------------------------
1 | package com.wzh.secondshop.models;
2 |
3 | /**
4 | * 收藏表
5 | *
6 | * @author WEN
7 | *
8 | */
9 | public class Collect {
10 | private int id;
11 | private int goodId;
12 | private String goodName;
13 | private int userId;
14 | private Good good;
15 |
16 | public int getId() {
17 | return id;
18 | }
19 |
20 | public void setId(int id) {
21 | this.id = id;
22 | }
23 |
24 | public int getGoodId() {
25 | return goodId;
26 | }
27 |
28 | public void setGoodId(int goodId) {
29 | this.goodId = goodId;
30 | }
31 |
32 | public String getGoodName() {
33 | return goodName;
34 | }
35 |
36 | public void setGoodName(String goodName) {
37 | this.goodName = goodName;
38 | }
39 |
40 | public int getUserId() {
41 | return userId;
42 | }
43 |
44 | public void setUserId(int userId) {
45 | this.userId = userId;
46 | }
47 |
48 | public Good getGood() {
49 | return good;
50 | }
51 |
52 | public void setGood(Good good) {
53 | this.good = good;
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/src/main/java/com/wzh/secondshop/exception/ExceptionHandler.java:
--------------------------------------------------------------------------------
1 | package com.wzh.secondshop.exception;
2 |
3 | import java.io.IOException;
4 |
5 | import javax.servlet.ServletException;
6 | import javax.servlet.http.HttpServletRequest;
7 | import javax.servlet.http.HttpServletResponse;
8 |
9 | import org.springframework.web.servlet.HandlerExceptionResolver;
10 | import org.springframework.web.servlet.ModelAndView;
11 | import org.slf4j.Logger;
12 | import org.slf4j.LoggerFactory;
13 |
14 | public class ExceptionHandler implements HandlerExceptionResolver {
15 |
16 | @Override
17 | public ModelAndView resolveException(HttpServletRequest request,
18 | HttpServletResponse response, Object handler, Exception ex) {
19 | ex.printStackTrace();
20 | System.out.println();
21 | try {
22 | request.getRequestDispatcher("/WEB-INF/views/home/error.jsp")
23 | .forward(request, response);
24 | } catch (ServletException e) {
25 | e.printStackTrace();
26 | } catch (IOException e) {
27 | e.printStackTrace();
28 | }
29 | return null;
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/com/wzh/secondshop/mappers/SecondTypeMapper.java:
--------------------------------------------------------------------------------
1 | package com.wzh.secondshop.mappers;
2 |
3 | import com.wzh.secondshop.models.SecondType;
4 | import org.apache.ibatis.annotations.Delete;
5 | import org.apache.ibatis.annotations.Insert;
6 | import org.apache.ibatis.annotations.Select;
7 |
8 | import java.util.List;
9 |
10 | public interface SecondTypeMapper {
11 |
12 | @Select("select * from second_type_table where first_type_id = #{firstTypeId}")
13 | List getSecondTypeByFirstTypeId(int firstTypeId);
14 |
15 | @Select("select id from second_type_table where first_type_id = #{firstTypeId} ORDER BY id desc limit 0, 1;")
16 | Integer getSecondTypeLastId(Integer firstTypeId);
17 |
18 | @Select("select * from second_type_table where id = #{secondTypeId}")
19 | SecondType getSecondTypeById(int secondTypeId);
20 |
21 | @Delete("delete from second_type_table where id = #{secondTypeId};")
22 | int deleteSecondType(Integer secondTypeId);
23 |
24 | @Insert("insert into second_type_table(id, first_type_id, name) values(#{id}, #{firstTypeId}, #{name});")
25 | int createSecondType(SecondType secondType);
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/webapp/WEB-INF/views/home/error.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=UTF-8"
2 | pageEncoding="UTF-8"%>
3 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
4 |
5 |
6 |
7 |
8 | ">
10 | ">
11 | error
12 |
13 |
14 |
15 |
16 |
17 |
SORRY, FOUND A ERROR
18 |

"
19 | width="350px" height="300px">
20 |
系统错误
21 |
系统遇到错误,错误信息已记录,请联系系统管理人员。
22 |
23 |
24 |
25 | ">
26 | ">
27 |
28 |
--------------------------------------------------------------------------------
/src/main/java/com/wzh/secondshop/services/CollectService.java:
--------------------------------------------------------------------------------
1 | package com.wzh.secondshop.services;
2 |
3 | import com.wzh.secondshop.mappers.CollectMapper;
4 | import com.wzh.secondshop.models.Collect;
5 | import org.springframework.beans.factory.annotation.Autowired;
6 | import org.springframework.stereotype.Service;
7 | import org.springframework.transaction.annotation.Transactional;
8 |
9 | import java.util.List;
10 |
11 | @Service
12 | public class CollectService {
13 | @Autowired
14 | private CollectMapper collectMapper;
15 |
16 | @Transactional
17 | public Boolean deleteCollect(Integer collectId){
18 | return collectMapper.deleteCollect(collectId) > 0;
19 | }
20 |
21 | @Transactional
22 | public Boolean getCollect(Integer goodId, Integer userId){
23 | return collectMapper.getCollect(goodId, userId) != null;
24 | }
25 |
26 | @Transactional
27 | public List getCollectByUserId(Integer userId){
28 | return collectMapper.getCollectByUserId(userId);
29 | }
30 |
31 | @Transactional
32 | public Boolean insertCollect(Collect collect){
33 | return collectMapper.insertCollect(collect) > 0;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/main/java/com/wzh/secondshop/utils/FileCheck.java:
--------------------------------------------------------------------------------
1 | package com.wzh.secondshop.utils;
2 |
3 | import java.io.File;
4 |
5 | /**
6 | * 文件检查
7 | *
8 | * @author WEN
9 | *
10 | */
11 | public class FileCheck {
12 | /**
13 | * 检查物品文件是否存在
14 | *
15 | * @param filePath
16 | * @return
17 | */
18 | public String checkGoodFolderExist(String filePath) {
19 | Boolean success = false;
20 | String classpath = FileCheck.class.getResource("/").getPath()
21 | .replaceFirst("/", "");
22 | String path = classpath.replaceAll("/WEB-INF/classes/", "") + filePath;
23 | File file = new File(path);
24 | success = checkFileExist(file);
25 | if (success) {
26 | return path + "/";
27 | } else {
28 | return "";
29 | }
30 | }
31 |
32 | /**
33 | * 检查文件是否存在
34 | *
35 | * @param file
36 | * @return
37 | */
38 | public Boolean checkFileExist(File file) {
39 | if (file.exists()) {
40 | System.out.println("文件夹已存在!");
41 | return true;
42 | } else {
43 | System.out.println("文件夹不存在,正在创建!");
44 | file.mkdirs();
45 | if (file.exists()) {
46 | System.out.println("文件夹创建成功!");
47 | return true;
48 | } else {
49 | System.out.println("创建失败!");
50 | return false;
51 | }
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/src/main/webapp/WEB-INF/views/goods/error.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=UTF-8"
2 | pageEncoding="UTF-8"%>
3 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
4 |
5 |
6 |
7 |
8 | error
9 | ">
11 | ">
12 |
13 |
14 |
15 |
16 |
17 |
19 |
物品不存在
20 |
21 |
"
22 | height="300px" width="300px">
23 |
24 |
物品好像已被下架,信息已记录,请联系系统管理人员。
25 |
26 |
27 |
28 |
29 |
30 | ">
31 | ">
32 |
33 |
--------------------------------------------------------------------------------
/src/main/webapp/statics/jquery-ui-1.12.1/datepicker-zh-CN.js:
--------------------------------------------------------------------------------
1 | /* Chinese initialisation for the jQuery UI date picker plugin. */
2 | /* Written by Cloudream (cloudream@gmail.com). */
3 | ( function( factory ) {
4 | if ( typeof define === "function" && define.amd ) {
5 |
6 | // AMD. Register as an anonymous module.
7 | define( [ "../widgets/datepicker" ], factory );
8 | } else {
9 |
10 | // Browser globals
11 | factory( jQuery.datepicker );
12 | }
13 | }( function( datepicker ) {
14 |
15 | datepicker.regional[ "zh-CN" ] = {
16 | closeText: "关闭",
17 | prevText: "<上月",
18 | nextText: "下月>",
19 | currentText: "今天",
20 | monthNames: [ "一月","二月","三月","四月","五月","六月",
21 | "七月","八月","九月","十月","十一月","十二月" ],
22 | monthNamesShort: [ "一月","二月","三月","四月","五月","六月",
23 | "七月","八月","九月","十月","十一月","十二月" ],
24 | dayNames: [ "星期日","星期一","星期二","星期三","星期四","星期五","星期六" ],
25 | dayNamesShort: [ "周日","周一","周二","周三","周四","周五","周六" ],
26 | dayNamesMin: [ "日","一","二","三","四","五","六" ],
27 | weekHeader: "周",
28 | dateFormat: "yy-mm-dd",
29 | firstDay: 1,
30 | isRTL: false,
31 | showMonthAfterYear: true,
32 | yearSuffix: "年" };
33 | datepicker.setDefaults( datepicker.regional[ "zh-CN" ] );
34 |
35 | return datepicker.regional[ "zh-CN" ];
36 |
37 | } ) );
--------------------------------------------------------------------------------
/src/main/java/com/wzh/secondshop/services/UserService.java:
--------------------------------------------------------------------------------
1 | package com.wzh.secondshop.services;
2 |
3 | import com.wzh.secondshop.mappers.UserMapper;
4 | import com.wzh.secondshop.models.User;
5 | import org.springframework.beans.factory.annotation.Autowired;
6 | import org.springframework.stereotype.Service;
7 | import org.springframework.transaction.annotation.Transactional;
8 |
9 | import java.util.List;
10 |
11 | @Service
12 | public class UserService {
13 |
14 | @Autowired
15 | private UserMapper userMapper;
16 |
17 | @Transactional
18 | public List getAllUser() {
19 | return userMapper.getAllUser();
20 | }
21 |
22 | @Transactional
23 | public User getUserById(int id) {
24 | return userMapper.getUserById(id);
25 | }
26 |
27 | @Transactional
28 | public User getUserByEmail(String email) {
29 | return userMapper.getUserByEmail(email);
30 | }
31 |
32 | @Transactional
33 | public User getUserByMobile(String mobile) {
34 | return userMapper.getUserByMobile(mobile);
35 | }
36 |
37 | @Transactional
38 | public Boolean registerUser(User user) {
39 | return userMapper.insertUser(user) > 0;
40 | }
41 |
42 | @Transactional
43 | public Boolean updateUser(User user) {
44 | return userMapper.updateUser(user) > 0;
45 | }
46 |
47 | @Transactional
48 | public Boolean deleteUser(Integer userId) {
49 | return userMapper.deleteUser(userId) > 0;
50 | }
51 |
52 | @Transactional
53 | public Boolean updateUserStatus(Integer statusId, Integer userId) {
54 | return userMapper.updateUserStatus(statusId, userId) > 0;
55 | }
56 |
57 | @Transactional
58 | public Boolean updatePassword(String newPassword, String code,
59 | Integer userId) {
60 | return userMapper.updatePassword(newPassword, code, userId) > 0;
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 162.CampusSecond_handTradingPlatformManagementSystem
2 |
3 | 群: 123300273(大佬群 2TB学习资料,讲解)(入群获取sql文件)
4 |
5 | 162.校园二手交易平台管理系统
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | ## 简介
16 |
17 |
18 | > 本代码来源于网络,仅供学习参考使用,请入群(123300273)后联系群主索要sql文件!
19 | >
20 | > 提供1.远程部署/2.修改代码/3.设计文档指导/4.框架代码讲解等服务
21 |
22 |
23 |
24 |
25 | ## 环境
26 |
27 | - IntelliJ IDEA 2009.3
28 |
29 | - Mysql 5.7.26
30 |
31 | - Tomcat 9.0.73
32 |
33 | - JDK 1.8
34 |
35 |
36 |
37 |
38 | ## 缩略图
39 |
40 |
41 | 
42 | 
43 | 
44 | 
45 | 
46 | 
47 | 
48 |
49 |
50 |
51 | ## License
52 |
53 | ##### [个人站点: 全栈九九六(Java全栈知识资料下载)](https://www.blog996.com/)
54 | ##### [个人博客: 博客园精品博客](https://www.cnblogs.com/yysbolg/)
55 | ##### [更多论文: 全目录查看](https://www.blog996.com/md/2021-09-22-1632317852192.html)
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/src/main/java/com/wzh/secondshop/mappers/UserMapper.java:
--------------------------------------------------------------------------------
1 | package com.wzh.secondshop.mappers;
2 |
3 | import com.wzh.secondshop.models.User;
4 | import org.apache.ibatis.annotations.Delete;
5 | import org.apache.ibatis.annotations.Insert;
6 | import org.apache.ibatis.annotations.Select;
7 | import org.apache.ibatis.annotations.Update;
8 |
9 | import java.util.List;
10 |
11 | public interface UserMapper {
12 |
13 | @Select("select * from user_table;")
14 | List getAllUser();
15 |
16 | @Select("select * from user_table where id = #{id}")
17 | User getUserById(int id);
18 |
19 | @Select("select * from user_table where email = #{email}")
20 | User getUserByEmail(String email);
21 |
22 | @Select("select * from user_table where mobile = #{mobile}")
23 | User getUserByMobile(String mobile);
24 |
25 | @Insert("insert into user_table (name, mobile, email, password, code, photo_url, role_id, gender, register_date, status_id) " +
26 | "values (#{name}, #{mobile}, #{email}, #{password}, #{code}, '/statics/image/photos/default/default.png', 102, #{gender}, now(), 4);")
27 | int insertUser(User user);
28 |
29 | @Update("UPDATE user_table SET name = #{name}, mobile = #{mobile}, email = #{email}, gender = #{gender}, photo_url = #{photoUrl} where id = #{id};")
30 | int updateUser(User user);
31 |
32 | @Delete("delete from user_table where id = #{userId};")
33 | int deleteUser(Integer userId);
34 |
35 | @Update("update user_table set status_id = #{0} where id = #{1};")
36 | int updateUserStatus(Integer statusId, Integer userId);
37 |
38 | @Update("update user_table set password = #{0}, code = #{1} where id = #{2};")
39 | int updatePassword(String newPassword, String code, Integer userId);
40 | }
41 |
--------------------------------------------------------------------------------
/src/main/webapp/WEB-INF/views/home/header.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=UTF-8"
2 | pageEncoding="UTF-8"%>
3 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
4 |
45 |
--------------------------------------------------------------------------------
/src/main/java/com/wzh/secondshop/mappers/OrderMapper.java:
--------------------------------------------------------------------------------
1 | package com.wzh.secondshop.mappers;
2 |
3 | import com.wzh.secondshop.models.Order;
4 | import org.apache.ibatis.annotations.*;
5 |
6 | import java.util.List;
7 |
8 | public interface OrderMapper {
9 | @Select("select * from order_table where customer_id = #{customerId} ORDER BY submit_date DESC;")
10 | List getOrderByCustomerId(Integer customerId);
11 |
12 | @Select("select * from order_table ORDER BY submit_date DESC;")
13 | List getOrderList();
14 |
15 | @Select("select * from order_table where seller_id = #{sellerId} ORDER BY submit_date DESC;")
16 | List getOrderBySellerId(Integer sellerId);
17 |
18 | @Select("select * from order_table where id = #{orderId} ORDER BY submit_date DESC;")
19 | Order getOrderById(Integer orderId);
20 |
21 | @Select("select * from order_table where customer_id = #{0} and id != #{1} ORDER BY submit_date DESC;")
22 | List getOtherOrderByCustomerId(Integer customerId, Integer orderId);
23 |
24 | @Select("select * from order_table where seller_id = #{0} and id != #{1} ORDER BY submit_date DESC;")
25 | List getOtherOrderBySellerId(Integer sellerId, Integer orderId);
26 |
27 | @Update("update order_table set status_id = #{0}, end_date = now() where id = #{1};")
28 | int updateStatus(Integer statusId, Integer orderId);
29 |
30 | @Delete("DELETE FROM order_table WHERE id = #{orderId};")
31 | int deleteOrderById(Integer orderId);
32 |
33 | @Insert("insert into order_table(good_name, seller, seller_id, customer, customer_id, good_id, money, status_id, submit_date ) "
34 | + "values(#{goodName}, #{seller}, #{sellerId}, #{customer}, #{customerId}, #{goodId}, #{money}, 2, now());")
35 | @Options(useGeneratedKeys = true, keyProperty = "id")
36 | int insertOrder(Order order);
37 | }
38 |
--------------------------------------------------------------------------------
/src/main/java/com/wzh/secondshop/mappers/ReviewMapper.java:
--------------------------------------------------------------------------------
1 | package com.wzh.secondshop.mappers;
2 |
3 | import com.wzh.secondshop.models.Reply;
4 | import com.wzh.secondshop.models.Review;
5 | import org.apache.ibatis.annotations.*;
6 |
7 | import java.util.List;
8 |
9 | public interface ReviewMapper {
10 | @Select("select * from review_table where good_id = #{goodId} ORDER BY upload_date DESC;")
11 | List getReviewByGoodId(Integer goodId);
12 |
13 | @Select("select * from reply_table where review_id = #{reviewId} ORDER BY upload_date;")
14 | List getReplyByReviewId(Integer reviewId);
15 |
16 | @Insert("insert into review_table(good_id, from_user, from_user_id, to_user_id, text, upload_date, status) values(#{goodId}, #{fromUser}, #{fromUserId}, #{toUserId}, #{text}, now(), 0);")
17 | int insertReview(Review review);
18 |
19 | @Insert("insert into reply_table (review_id, from_user, from_user_id, to_user, to_user_id, text, upload_date, status) values(#{reviewId}, #{fromUser}, #{fromUserId}, #{toUser}, #{toUserId}, #{text}, now(), 0);")
20 | int insertReply(Reply reply);
21 |
22 | @Select("select * from review_table where to_user_id = #{toUserId} ORDER BY upload_date DESC;")
23 | List getReviewByToUserId(Integer toUserId);
24 |
25 | @Select("select * from reply_table where to_user_id = #{toUserId} ORDER BY upload_date DESC;")
26 | List getReplyByToUserId(Integer toUserId);
27 |
28 | @Select("select good_id from review_table where id = #{reviewId}")
29 | Integer getGoodIdByReviewId(Integer reviewId);
30 |
31 | @Update("UPDATE review_table SET status = #{0} WHERE id = #{1};")
32 | int updateReviewStatus(int status, Integer reviewId);
33 |
34 | @Update("UPDATE reply_table SET status = #{0} WHERE id = #{1};")
35 | int updateReplyStatus(int status, Integer replyId);
36 | }
37 |
--------------------------------------------------------------------------------
/src/main/java/com/wzh/secondshop/services/ReviewService.java:
--------------------------------------------------------------------------------
1 | package com.wzh.secondshop.services;
2 |
3 | import com.wzh.secondshop.mappers.ReviewMapper;
4 | import com.wzh.secondshop.models.Reply;
5 | import com.wzh.secondshop.models.Review;
6 | import org.springframework.beans.factory.annotation.Autowired;
7 | import org.springframework.stereotype.Service;
8 | import org.springframework.transaction.annotation.Transactional;
9 |
10 | import java.util.List;
11 |
12 | @Service
13 | public class ReviewService {
14 | @Autowired
15 | private ReviewMapper reviewMapper;
16 |
17 | @Transactional
18 | public List gerReviewByGoodId(Integer goodId) {
19 | return reviewMapper.getReviewByGoodId(goodId);
20 | }
21 |
22 | @Transactional
23 | public List gerReplyByReviewId(Integer reviewId) {
24 | return reviewMapper.getReplyByReviewId(reviewId);
25 | }
26 |
27 | @Transactional
28 | public int insertReview(Review review) {
29 | return reviewMapper.insertReview(review);
30 | }
31 |
32 | @Transactional
33 | public int insertReply(Reply reply) {
34 | return reviewMapper.insertReply(reply);
35 | }
36 |
37 | @Transactional
38 | public List gerReviewByToUserId(Integer toUserId) {
39 | return reviewMapper.getReviewByToUserId(toUserId);
40 | }
41 |
42 | @Transactional
43 | public List gerReplyByToUserId(Integer toUserId) {
44 | return reviewMapper.getReplyByToUserId(toUserId);
45 | }
46 |
47 | @Transactional
48 | public int updateReviewStatus(int status, Integer reviewId) {
49 | return reviewMapper.updateReviewStatus(status, reviewId);
50 | }
51 |
52 | @Transactional
53 | public int updateReplyStatus(int status, Integer replyId) {
54 | return reviewMapper.updateReplyStatus(status, replyId);
55 | }
56 |
57 | @Transactional
58 | public Integer getGoodIdByReviewId(Integer reviewId) {
59 | return reviewMapper.getGoodIdByReviewId(reviewId);
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/src/main/java/com/wzh/secondshop/models/Reply.java:
--------------------------------------------------------------------------------
1 | package com.wzh.secondshop.models;
2 |
3 | import java.text.SimpleDateFormat;
4 |
5 | /**
6 | * 回复表
7 | *
8 | * @author WEN
9 | *
10 | */
11 | public class Reply {
12 | private int id;
13 | private int reviewId;
14 | private String fromUser;
15 | private int fromUserId;
16 | private String toUser;
17 | private int toUserId;
18 | private String text;
19 | private String uploadDate;
20 | private int status;
21 |
22 | public int getId() {
23 | return id;
24 | }
25 |
26 | public void setId(int id) {
27 | this.id = id;
28 | }
29 |
30 | public int getReviewId() {
31 | return reviewId;
32 | }
33 |
34 | public void setReviewId(int reviewId) {
35 | this.reviewId = reviewId;
36 | }
37 |
38 | public String getFromUser() {
39 | return fromUser;
40 | }
41 |
42 | public void setFromUser(String fromUser) {
43 | this.fromUser = fromUser;
44 | }
45 |
46 | public int getFromUserId() {
47 | return fromUserId;
48 | }
49 |
50 | public void setFromUserId(int fromUserId) {
51 | this.fromUserId = fromUserId;
52 | }
53 |
54 | public String getToUser() {
55 | return toUser;
56 | }
57 |
58 | public void setToUser(String toUser) {
59 | this.toUser = toUser;
60 | }
61 |
62 | public int getToUserId() {
63 | return toUserId;
64 | }
65 |
66 | public void setToUserId(int toUserId) {
67 | this.toUserId = toUserId;
68 | }
69 |
70 | public String getText() {
71 | return text;
72 | }
73 |
74 | public void setText(String text) {
75 | this.text = text;
76 | }
77 |
78 | public String getUploadDate() {
79 | return uploadDate;
80 | }
81 |
82 | public void setUploadDate(java.sql.Timestamp uploadDate) {
83 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
84 | this.uploadDate = sdf.format(uploadDate);
85 | }
86 |
87 | public int getStatus() {
88 | return status;
89 | }
90 |
91 | public void setStatus(int status) {
92 | this.status = status;
93 | }
94 |
95 | }
96 |
--------------------------------------------------------------------------------
/src/main/java/com/wzh/secondshop/services/OrderService.java:
--------------------------------------------------------------------------------
1 | package com.wzh.secondshop.services;
2 |
3 | import com.wzh.secondshop.mappers.OrderMapper;
4 | import com.wzh.secondshop.models.Order;
5 | import org.springframework.beans.factory.annotation.Autowired;
6 | import org.springframework.stereotype.Service;
7 | import org.springframework.transaction.annotation.Transactional;
8 |
9 | import java.util.List;
10 |
11 | @Service
12 | public class OrderService {
13 | @Autowired
14 | private OrderMapper orderMapper;
15 |
16 | @Transactional
17 | public List getOrderByCustomerId(Integer customerId){
18 | return orderMapper.getOrderByCustomerId(customerId);
19 | }
20 |
21 | @Transactional
22 | public List getOrderList(){
23 | return orderMapper.getOrderList();
24 | }
25 |
26 | @Transactional
27 | public List getOrderBySellerId(Integer sellerId){
28 | return orderMapper.getOrderBySellerId(sellerId);
29 | }
30 |
31 | @Transactional
32 | public List getOtherOrderByCustomerId(Integer customerId, Integer orderId){
33 | return orderMapper.getOtherOrderByCustomerId(customerId, orderId);
34 | }
35 |
36 | @Transactional
37 | public List getOtherOrderBySellerId(Integer sellerId, Integer orderId){
38 | return orderMapper.getOtherOrderBySellerId(sellerId, orderId);
39 | }
40 |
41 | @Transactional
42 | public Order getOrderById(Integer orderId){
43 | return orderMapper.getOrderById(orderId);
44 | }
45 |
46 | @Transactional
47 | public int updateStatus(Integer statusId, Integer orderId){
48 | return orderMapper.updateStatus(statusId, orderId);
49 | }
50 |
51 | @Transactional
52 | public int deleteOrderById(Integer orderId){
53 | return orderMapper.deleteOrderById(orderId);
54 | }
55 | @Transactional
56 | public int insertOrder(Order order){
57 | return orderMapper.insertOrder(order);
58 | }
59 |
60 | }
61 |
--------------------------------------------------------------------------------
/src/main/java/com/wzh/secondshop/models/Review.java:
--------------------------------------------------------------------------------
1 | package com.wzh.secondshop.models;
2 |
3 | import java.text.SimpleDateFormat;
4 | import java.util.List;
5 |
6 | /**
7 | * 评论表
8 | *
9 | * @author WEN
10 | *
11 | */
12 | public class Review {
13 | private int id;
14 | private int goodId;
15 | private String fromUser;
16 | private int fromUserId;
17 | private int toUserId;
18 | private String text;
19 | private String uploadDate;
20 | private List replys;
21 | private int status;
22 |
23 | public int getId() {
24 | return id;
25 | }
26 |
27 | public void setId(int id) {
28 | this.id = id;
29 | }
30 |
31 | public int getGoodId() {
32 | return goodId;
33 | }
34 |
35 | public void setGoodId(int goodId) {
36 | this.goodId = goodId;
37 | }
38 |
39 | public String getFromUser() {
40 | return fromUser;
41 | }
42 |
43 | public void setFromUser(String fromUser) {
44 | this.fromUser = fromUser;
45 | }
46 |
47 | public int getFromUserId() {
48 | return fromUserId;
49 | }
50 |
51 | public void setFromUserId(int fromUserId) {
52 | this.fromUserId = fromUserId;
53 | }
54 |
55 | public int getToUserId() {
56 | return toUserId;
57 | }
58 |
59 | public void setToUserId(int toUserId) {
60 | this.toUserId = toUserId;
61 | }
62 |
63 | public String getText() {
64 | return text;
65 | }
66 |
67 | public void setText(String text) {
68 | this.text = text;
69 | }
70 |
71 | public String getUploadDate() {
72 | return uploadDate;
73 | }
74 |
75 | public void setUploadDate(java.sql.Timestamp uploadDate) {
76 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
77 | this.uploadDate = sdf.format(uploadDate);
78 | }
79 |
80 | public List getReplys() {
81 | return replys;
82 | }
83 |
84 | public void setReplys(List replys) {
85 | this.replys = replys;
86 | }
87 |
88 | public int getStatus() {
89 | return status;
90 | }
91 |
92 | public void setStatus(int status) {
93 | this.status = status;
94 | }
95 |
96 | }
97 |
--------------------------------------------------------------------------------
/src/main/webapp/WEB-INF/views/admin/adminLogin.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=UTF-8"
2 | pageEncoding="UTF-8"%>
3 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
4 |
5 |
6 |
7 |
8 | 登录
9 | ">
11 | ">
12 |
13 | ); background-size: cover">
15 |
16 |
17 |
管理员登录
18 |
19 |
20 |
21 |
22 |
24 |
" method="post">
25 |
26 |
28 |
29 |
30 |
31 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
">用户登录
42 |
43 |
44 | ">
45 | ">
46 |
47 |
--------------------------------------------------------------------------------
/src/main/java/com/wzh/secondshop/controllers/CollectController.java:
--------------------------------------------------------------------------------
1 | package com.wzh.secondshop.controllers;
2 |
3 | import com.wzh.secondshop.models.Collect;
4 | import com.wzh.secondshop.services.CollectService;
5 | import com.wzh.secondshop.services.GoodService;
6 | import org.springframework.beans.factory.annotation.Autowired;
7 | import org.springframework.http.ResponseEntity;
8 | import org.springframework.stereotype.Controller;
9 | import org.springframework.web.bind.annotation.PathVariable;
10 | import org.springframework.web.bind.annotation.RequestBody;
11 | import org.springframework.web.bind.annotation.RequestMapping;
12 | import org.springframework.web.bind.annotation.RequestMethod;
13 |
14 | import java.util.List;
15 |
16 | @Controller
17 | @RequestMapping(value = "/collect")
18 | public class CollectController {
19 | private final CollectService collectService;
20 | private final GoodService goodService;
21 |
22 | @Autowired
23 | public CollectController(CollectService collectService, GoodService goodService) {
24 | this.collectService = collectService;
25 | this.goodService = goodService;
26 | }
27 |
28 | @RequestMapping(value = "/insert", method = RequestMethod.POST)
29 | public ResponseEntity insertCollect(@RequestBody Collect collect){
30 | return ResponseEntity.ok(collectService.insertCollect(collect));
31 | }
32 |
33 | @RequestMapping(value = "/delete/{collectId}&{userId}", method = RequestMethod.GET)
34 | public ResponseEntity deleteCollect(@PathVariable Integer collectId,
35 | @PathVariable Integer userId){
36 | Boolean success = collectService.deleteCollect(collectId);
37 | if (success){
38 | List collects = collectService.getCollectByUserId(userId);
39 | for (Collect collect : collects){
40 | collect.setGood(goodService.getGoodById(collect.getGoodId()));
41 | }
42 | return ResponseEntity.ok(collects);
43 | }
44 | return ResponseEntity.ok(success);
45 | }
46 | }
47 |
48 |
--------------------------------------------------------------------------------
/src/main/java/com/wzh/secondshop/services/TypeService.java:
--------------------------------------------------------------------------------
1 | package com.wzh.secondshop.services;
2 |
3 | import com.wzh.secondshop.mappers.FirstTypeMapper;
4 | import com.wzh.secondshop.mappers.SecondTypeMapper;
5 | import com.wzh.secondshop.models.FirstType;
6 | import com.wzh.secondshop.models.SecondType;
7 | import org.springframework.beans.factory.annotation.Autowired;
8 | import org.springframework.stereotype.Service;
9 | import org.springframework.transaction.annotation.Transactional;
10 |
11 | import java.util.List;
12 |
13 | @Service
14 | public class TypeService {
15 | @Autowired
16 | private FirstTypeMapper firstTypeMapper;
17 | @Autowired
18 | private SecondTypeMapper secondTypeMapper;
19 |
20 | @Transactional
21 | public List getAllFirstType() {
22 | return firstTypeMapper.getAllFirstType();
23 | }
24 |
25 | @Transactional
26 | public List getSecondTypeByFirstTypeId(int firstTypeId) {
27 | return secondTypeMapper.getSecondTypeByFirstTypeId(firstTypeId);
28 | }
29 |
30 | @Transactional
31 | public SecondType getSecondTypeById(int secondTypeId) {
32 | return secondTypeMapper.getSecondTypeById(secondTypeId);
33 | }
34 |
35 | @Transactional
36 | public Boolean createFirstType(FirstType firstType) {
37 | Integer firstTypeId = firstTypeMapper.getFirstTypeLastId();
38 | if (firstTypeId == null) {
39 | firstTypeId = 1000;
40 | }
41 | firstType.setId(firstTypeId + 1);
42 | return firstTypeMapper.createFirstType(firstType) > 0;
43 | }
44 |
45 | @Transactional
46 | public Boolean createSecondType(SecondType secondType) {
47 | Integer firstTypeId = secondTypeMapper.getSecondTypeLastId(secondType
48 | .getFirstTypeId());
49 | if (firstTypeId == null) {
50 | firstTypeId = secondType.getFirstTypeId() * 1000;
51 | }
52 | secondType.setId(firstTypeId + 1);
53 | return secondTypeMapper.createSecondType(secondType) > 0;
54 | }
55 |
56 | @Transactional
57 | public Boolean deleteFirstType(Integer firstTypeId) {
58 | return firstTypeMapper.deleteFirstType(firstTypeId) > 0;
59 | }
60 |
61 | @Transactional
62 | public Boolean deleteSecondType(Integer secondTypeId) {
63 | return secondTypeMapper.deleteSecondType(secondTypeId) > 0;
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/src/main/webapp/WEB-INF/views/home/login.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=UTF-8"
2 | pageEncoding="UTF-8"%>
3 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
4 |
5 |
6 |
7 |
8 | 登录
9 | ">
11 | ">
12 |
13 | ); background-size: cover">
15 |
16 |
17 |
欢迎登录校园二手交易平台
18 |
19 |
20 |
21 |
50 | ">
51 | ">
52 |
53 |
--------------------------------------------------------------------------------
/src/main/webapp/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
11 |
12 | encodingFilter
13 | org.springframework.web.filter.CharacterEncodingFilter
14 | true
15 |
16 | encoding
17 | UTF-8
18 |
19 |
20 | forceEncoding
21 | true
22 |
23 |
24 |
25 | encodingFilter
26 | /*
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 | DispatcherServlet
42 | org.springframework.web.servlet.DispatcherServlet
43 |
44 | contextConfigLocation
45 | classpath*:spring/*.xml
46 |
47 | 1
48 | true
49 |
50 |
51 |
52 | DispatcherServlet
53 | /
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/src/main/java/com/wzh/secondshop/models/Order.java:
--------------------------------------------------------------------------------
1 | package com.wzh.secondshop.models;
2 |
3 | import java.text.SimpleDateFormat;
4 |
5 | /**
6 | * 订单表
7 | *
8 | * @author WEN
9 | *
10 | */
11 | public class Order {
12 | private int id;
13 | private String goodName;
14 | private String seller;
15 | private int sellerId;
16 | private String customer;
17 | private int customerId;
18 | private int goodId;
19 | private int money;
20 | private String submitDate;
21 | private String endDate;
22 | private int statusId;
23 |
24 | public int getId() {
25 | return id;
26 | }
27 |
28 | public void setId(int id) {
29 | this.id = id;
30 | }
31 |
32 | public String getGoodName() {
33 | return goodName;
34 | }
35 |
36 | public void setGoodName(String goodName) {
37 | this.goodName = goodName;
38 | }
39 |
40 | public String getSeller() {
41 | return seller;
42 | }
43 |
44 | public void setSeller(String seller) {
45 | this.seller = seller;
46 | }
47 |
48 | public int getSellerId() {
49 | return sellerId;
50 | }
51 |
52 | public void setSellerId(int sellerId) {
53 | this.sellerId = sellerId;
54 | }
55 |
56 | public String getCustomer() {
57 | return customer;
58 | }
59 |
60 | public void setCustomer(String customer) {
61 | this.customer = customer;
62 | }
63 |
64 | public int getCustomerId() {
65 | return customerId;
66 | }
67 |
68 | public void setCustomerId(int customerId) {
69 | this.customerId = customerId;
70 | }
71 |
72 | public int getGoodId() {
73 | return goodId;
74 | }
75 |
76 | public void setGoodId(int goodId) {
77 | this.goodId = goodId;
78 | }
79 |
80 | public int getMoney() {
81 | return money;
82 | }
83 |
84 | public void setMoney(int money) {
85 | this.money = money;
86 | }
87 |
88 | public String getSubmitDate() {
89 | return submitDate;
90 | }
91 |
92 | public void setSubmitDate(java.sql.Timestamp submitDate) {
93 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
94 | this.submitDate = sdf.format(submitDate);
95 | }
96 |
97 | public String getEndDate() {
98 | return endDate;
99 | }
100 |
101 | public void setEndDate(java.sql.Timestamp endDate) {
102 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
103 | this.endDate = sdf.format(endDate);
104 | }
105 |
106 | public int getStatusId() {
107 | return statusId;
108 | }
109 |
110 | public void setStatusId(int statusId) {
111 | this.statusId = statusId;
112 | }
113 |
114 | }
115 |
--------------------------------------------------------------------------------
/src/main/java/com/wzh/secondshop/models/User.java:
--------------------------------------------------------------------------------
1 | package com.wzh.secondshop.models;
2 |
3 | import java.text.SimpleDateFormat;
4 |
5 | /**
6 | * 用户表
7 | *
8 | * @author WEN
9 | *
10 | */
11 | public class User {
12 | private int id;
13 | private String name;
14 | private String mobile;
15 | private String email;
16 | private String password;
17 | private String password2;
18 | private String code;
19 | private String photoUrl;
20 | private int roleId;
21 | private int statusId;
22 | private String gender;
23 | private String registerDate;
24 |
25 | public int getStatusId() {
26 | return statusId;
27 | }
28 |
29 | public void setStatusId(int statusId) {
30 | this.statusId = statusId;
31 | }
32 |
33 | public String getPassword2() {
34 | return password2;
35 | }
36 |
37 | public void setPassword2(String password2) {
38 | this.password2 = password2;
39 | }
40 |
41 | public String getPhotoUrl() {
42 | return photoUrl;
43 | }
44 |
45 | public void setPhotoUrl(String photoUrl) {
46 | this.photoUrl = photoUrl;
47 | }
48 |
49 | public int getId() {
50 | return id;
51 | }
52 |
53 | public void setId(int id) {
54 | this.id = id;
55 | }
56 |
57 | public String getName() {
58 | return name;
59 | }
60 |
61 | public void setName(String name) {
62 | this.name = name;
63 | }
64 |
65 | public String getMobile() {
66 | return mobile;
67 | }
68 |
69 | public void setMobile(String mobile) {
70 | this.mobile = mobile;
71 | }
72 |
73 | public String getEmail() {
74 | return email;
75 | }
76 |
77 | public void setEmail(String email) {
78 | this.email = email;
79 | }
80 |
81 | public String getPassword() {
82 | return password;
83 | }
84 |
85 | public void setPassword(String password) {
86 | this.password = password;
87 | }
88 |
89 | public String getCode() {
90 | return code;
91 | }
92 |
93 | public void setCode(String code) {
94 | this.code = code;
95 | }
96 |
97 | public int getRoleId() {
98 | return roleId;
99 | }
100 |
101 | public void setRoleId(int roleId) {
102 | this.roleId = roleId;
103 | }
104 |
105 | public String getGender() {
106 | return gender;
107 | }
108 |
109 | public void setGender(String gender) {
110 | this.gender = gender;
111 | }
112 |
113 | public String getRegisterDate() {
114 | return registerDate;
115 | }
116 |
117 | public void setRegisterDate(java.sql.Timestamp registerDate) {
118 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
119 | this.registerDate = sdf.format(registerDate);
120 | }
121 |
122 | }
123 |
--------------------------------------------------------------------------------
/src/main/webapp/statics/js/simpleAlert.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created by Dasate on 2017/9/14.
3 | * QQ361899429
4 | */
5 | var simpleAlert = function (opts) {
6 | //设置默认参数
7 | var opt = {
8 | "closeAll": false,
9 | "content": "",
10 | "buttons": {}
11 | }
12 | //合并参数
13 | var option = $.extend(opt, opts);
14 | //事件
15 | var dialog = {}
16 | var $simpleAlert = $('');
17 | var $shelter = $('
');
18 | var $simpleAlertBody = $('
');
19 | var $simpleAlertBodyClose = $('

');
20 | var $simpleAlertBodyContent = $('
' + option.content + '
');
21 | dialog.init = function () {
22 | $simpleAlertBody.append($simpleAlertBodyClose).append($simpleAlertBodyContent);
23 | var num = 0;
24 | var only = false;
25 | var onlyArr = [];
26 | for (var i = 0; i < 2; i++) {
27 | for (var key in option.buttons) {
28 | switch (i) {
29 | case 0:
30 | onlyArr.push(key);
31 | break;
32 | case 1:
33 | if (onlyArr.length <= 1) {
34 | only = true;
35 | } else {
36 | only = false;
37 | }
38 | num++;
39 | var $btn = $('
')
40 | $btn.bind("click", option.buttons[key]);
41 | if (only) {
42 | $btn.addClass("onlyOne")
43 | }
44 | $simpleAlertBody.append($btn);
45 | break;
46 | }
47 |
48 | }
49 | }
50 | $simpleAlert.append($shelter).append($simpleAlertBody);
51 | $("body").append($simpleAlert);
52 | $simpleAlertBody.show().animate({"marginTop":"-128px","opacity":"1"},300);
53 | }
54 | //右上角关闭按键事件
55 | $simpleAlertBodyClose.bind("click", function () {
56 | option.closeAll=false;
57 | dialog.close();
58 | })
59 | dialog.close = function () {
60 | if(option.closeAll){
61 | $(".simpleAlert").remove()
62 | }else {
63 | $simpleAlertBody.animate({"marginTop": "-188px", "opacity": "0"}, 200, function () {
64 | $(".simpleAlert").last().remove()
65 | });
66 | }
67 | }
68 | dialog.init();
69 | return dialog;
70 | }
--------------------------------------------------------------------------------
/src/main/resources/spring/servlet-context.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
49 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/src/main/java/com/wzh/secondshop/models/Good.java:
--------------------------------------------------------------------------------
1 | package com.wzh.secondshop.models;
2 |
3 | import java.text.SimpleDateFormat;
4 |
5 | /**
6 | * 物品表
7 | *
8 | * @author WEN
9 | *
10 | */
11 | public class Good {
12 | private int id;
13 | private String name;
14 | private String photoUrl;
15 | private int firstTypeId;
16 | private int secondTypeId;
17 | private SecondType goodSecondType;
18 | private String describe;
19 | private String uploadDate;
20 | private float prise;
21 | private int statusId;
22 | private int userId;
23 | private User goodUser;
24 | private String update;
25 |
26 | public int getId() {
27 | return id;
28 | }
29 |
30 | public void setId(int id) {
31 | this.id = id;
32 | }
33 |
34 | public String getName() {
35 | return name;
36 | }
37 |
38 | public void setName(String name) {
39 | this.name = name;
40 | }
41 |
42 | public String getPhotoUrl() {
43 | return photoUrl;
44 | }
45 |
46 | public void setPhotoUrl(String photoUrl) {
47 | this.photoUrl = photoUrl;
48 | }
49 |
50 | public int getFirstTypeId() {
51 | return firstTypeId;
52 | }
53 |
54 | public void setFirstTypeId(int firstTypeId) {
55 | this.firstTypeId = firstTypeId;
56 | }
57 |
58 | public int getSecondTypeId() {
59 | return secondTypeId;
60 | }
61 |
62 | public void setSecondTypeId(int secondTypeId) {
63 | this.secondTypeId = secondTypeId;
64 | }
65 |
66 | public SecondType getGoodSecondType() {
67 | return goodSecondType;
68 | }
69 |
70 | public void setGoodSecondType(SecondType goodSecondType) {
71 | this.goodSecondType = goodSecondType;
72 | }
73 |
74 | public String getDescribe() {
75 | return describe;
76 | }
77 |
78 | public void setDescribe(String describe) {
79 | this.describe = describe;
80 | }
81 |
82 | public String getUploadDate() {
83 | return uploadDate;
84 | }
85 |
86 | public void setUploadDate(String uploadDate) {
87 | this.uploadDate = uploadDate;
88 | }
89 |
90 | public float getPrise() {
91 | return prise;
92 | }
93 |
94 | public void setPrise(float prise) {
95 | this.prise = prise;
96 | }
97 |
98 | public int getStatusId() {
99 | return statusId;
100 | }
101 |
102 | public void setStatusId(int statusId) {
103 | this.statusId = statusId;
104 | }
105 |
106 | public int getUserId() {
107 | return userId;
108 | }
109 |
110 | public void setUserId(int userId) {
111 | this.userId = userId;
112 | }
113 |
114 | public User getGoodUser() {
115 | return goodUser;
116 | }
117 |
118 | public void setGoodUser(User goodUser) {
119 | this.goodUser = goodUser;
120 | }
121 |
122 | public String getUpdate() {
123 | return update;
124 | }
125 |
126 | public void setUpdate(java.sql.Timestamp update) {
127 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
128 | this.update = sdf.format(update);
129 | }
130 |
131 | }
132 |
--------------------------------------------------------------------------------
/src/main/java/com/wzh/secondshop/services/GoodService.java:
--------------------------------------------------------------------------------
1 | package com.wzh.secondshop.services;
2 |
3 | import com.wzh.secondshop.mappers.GoodMapper;
4 | import com.wzh.secondshop.models.Good;
5 | import org.springframework.beans.factory.annotation.Autowired;
6 | import org.springframework.stereotype.Service;
7 | import org.springframework.transaction.annotation.Transactional;
8 |
9 | import java.util.List;
10 |
11 | @Service
12 | public class GoodService {
13 | @Autowired
14 | private GoodMapper goodMapper;
15 |
16 | @Transactional
17 | public List
getAllGoods(int offset, int limit) {
18 | return goodMapper.getAllGoods(offset, limit);
19 | }
20 |
21 | @Transactional
22 | public List getAllGoodList() {
23 | return goodMapper.getAllGoodList();
24 | }
25 |
26 | @Transactional
27 | public List getGoodsBySearchAndType(String searchText,
28 | Integer secondTypeId, int offset, int limit) {
29 | if (!searchText.equals("")) {
30 | searchText = "%" + searchText + "%";
31 | return goodMapper.getGoodsBySearch(searchText, offset, limit);
32 | } else if (secondTypeId != null) {
33 | return goodMapper.getGoodsByType(secondTypeId, offset, limit);
34 | } else {
35 | return goodMapper.getAllGoods(offset, limit);
36 | }
37 | }
38 |
39 | @Transactional
40 | public int getGoodsBySearchAndTypeCount(String searchText,
41 | Integer secondTypeId) {
42 | if (!searchText.equals("")) {
43 | searchText = "%" + searchText + "%";
44 | return goodMapper.getGoodsBySearchCount(searchText);
45 | } else if (secondTypeId != null) {
46 | return goodMapper.getGoodsByTypeCount(secondTypeId);
47 | } else {
48 | return goodMapper.getAllGoodsCount();
49 | }
50 | }
51 |
52 | @Transactional
53 | public Good getGoodById(int goodId) {
54 | return goodMapper.getGoodById(goodId);
55 | }
56 |
57 | @Transactional
58 | public List getRECGoods(int secondTypeId, int goodId) {
59 | return goodMapper.getRECGoods(secondTypeId, goodId);
60 | }
61 |
62 | @Transactional
63 | public List getGoodByUserId(Integer userId) {
64 | return goodMapper.getGoodByUserId(userId);
65 | }
66 |
67 | @Transactional
68 | public List getGoodStatusByUserId(Integer userId) {
69 | return goodMapper.getGoodStatusByUserId(userId);
70 | }
71 |
72 | @Transactional
73 | public int insertGood(Good good) {
74 | return goodMapper.insterGood(good);
75 | }
76 |
77 | @Transactional
78 | public int updateGoodPhotoUrl(String photoUrl, Integer goodId) {
79 | return goodMapper.updateGoodPhotoUrl(photoUrl, goodId);
80 | }
81 |
82 | @Transactional
83 | public int updateGoodStatusId(Integer statusId, Integer goodId) {
84 | return goodMapper.updateGoodStatusId(statusId, goodId);
85 | }
86 |
87 | @Transactional
88 | public int updateGood(Good good) {
89 | return goodMapper.updateGood(good);
90 | }
91 |
92 | @Transactional
93 | public String getPhotoUrlByGoodId(Integer goodId) {
94 | return goodMapper.getPhotoUrlByGoodId(goodId);
95 | }
96 |
97 | @Transactional
98 | public int deleteGood(Integer goodId) {
99 | return goodMapper.deleteGood(goodId);
100 | }
101 |
102 | @Transactional
103 | public List getGoodsAdminByType(Integer secondTypeId) {
104 | return goodMapper.getGoodsAdminByTypeId(secondTypeId);
105 | }
106 | }
107 |
--------------------------------------------------------------------------------
/src/main/java/com/wzh/secondshop/mappers/GoodMapper.java:
--------------------------------------------------------------------------------
1 | package com.wzh.secondshop.mappers;
2 |
3 | import java.util.List;
4 |
5 | import org.apache.ibatis.annotations.Delete;
6 | import org.apache.ibatis.annotations.Insert;
7 | import org.apache.ibatis.annotations.Options;
8 | import org.apache.ibatis.annotations.Select;
9 | import org.apache.ibatis.annotations.Update;
10 |
11 | import com.wzh.secondshop.models.Good;
12 |
13 | public interface GoodMapper {
14 | @Select("Select * from good_table where status_id = 1 ORDER BY upload_date DESC LIMIT #{0}, #{1};")
15 | List getAllGoods(int offset, int limit);
16 |
17 | @Select("Select * from good_table ORDER BY upload_date DESC;")
18 | List getAllGoodList();
19 |
20 | @Select("Select * from good_table WHERE second_type_id = #{0} and status_id = 1 ORDER BY upload_date DESC;")
21 | List getGoodsByTypeId(Integer secondTypeId);
22 |
23 | @Select("Select * from good_table WHERE second_type_id = #{0} ORDER BY upload_date DESC;")
24 | List getGoodsAdminByTypeId(Integer secondTypeId);
25 |
26 | @Select("Select count(*) from good_table where status_id = 1;")
27 | int getAllGoodsCount();
28 |
29 | @Select("Select * from good_table WHERE name like #{0} and status_id = 1 ORDER BY upload_date DESC LIMIT #{1}, #{2};")
30 | List getGoodsBySearch(String searchText, int offset, int limit);
31 |
32 | @Select("Select count(*) from good_table WHERE name like #{0} and status_id = 1;")
33 | int getGoodsBySearchCount(String searchText);
34 |
35 | @Select("Select * from good_table WHERE second_type_id = #{0} and status_id = 1 ORDER BY upload_date DESC LIMIT #{1}, #{2};")
36 | List getGoodsByType(Integer secondTypeId, int offset, int limit);
37 |
38 | @Select("Select count(*) from good_table WHERE second_type_id = #{0} and status_id = 1;")
39 | int getGoodsByTypeCount(Integer secondTypeId);
40 |
41 | @Select("Select * from good_table WHERE id = #{goodId};")
42 | Good getGoodById(int goodId);
43 |
44 | @Select("SELECT * FROM good_table WHERE second_type_id = #{0} AND id != #{1} and status_id = 1 ORDER BY upload_date DESC LIMIT 0, 5;")
45 | List getRECGoods(Integer secondTypeId, Integer goodId);
46 |
47 | @Select("SELECT * FROM good_table WHERE user_id = #{userId} and status_id = 1 ORDER BY upload_date DESC;")
48 | List getGoodStatusByUserId(Integer userId);
49 |
50 | @Select("SELECT * FROM good_table WHERE user_id = #{userId} ORDER BY upload_date DESC;")
51 | List getGoodByUserId(Integer userId);
52 |
53 | @Insert("insert into good_table (name, photo_url, first_type_id, second_type_id, prise, `describe`, user_id, status_id, upload_date, `update`) "
54 | + "values (#{name}, #{photoUrl}, #{firstTypeId}, #{secondTypeId}, #{prise}, #{describe}, #{userId}, 1, now(), now())")
55 | @Options(useGeneratedKeys = true, keyProperty = "id")
56 | int insterGood(Good good);
57 |
58 | @Update("UPDATE good_table SET photo_url = #{0}, `update` = now() WHERE id = #{1};")
59 | int updateGoodPhotoUrl(String photoUrl, Integer goodId);
60 |
61 | @Select("select photo_url from good_table where id = #{goodId};")
62 | String getPhotoUrlByGoodId(Integer goodId);
63 |
64 | @Update("UPDATE good_table SET status_id = #{0}, `update` = now() WHERE id = #{1};")
65 | int updateGoodStatusId(Integer statusId, Integer goodId);
66 |
67 | @Update("UPDATE good_table SET name = #{name}, first_type_id = #{firstTypeId}, second_type_id = #{secondTypeId}, prise = #{prise}, `describe` = #{describe} WHERE id = #{id};")
68 | int updateGood(Good good);
69 |
70 | @Delete("delete from good_table where id = #{goodId};")
71 | int deleteGood(Integer goodId);
72 | }
73 |
--------------------------------------------------------------------------------
/src/main/java/com/wzh/secondshop/controllers/TypeController.java:
--------------------------------------------------------------------------------
1 | package com.wzh.secondshop.controllers;
2 |
3 | import com.wzh.secondshop.models.FirstType;
4 | import com.wzh.secondshop.models.SecondType;
5 | import com.wzh.secondshop.services.GoodService;
6 | import com.wzh.secondshop.services.TypeService;
7 | import org.springframework.beans.factory.annotation.Autowired;
8 | import org.springframework.http.ResponseEntity;
9 | import org.springframework.stereotype.Controller;
10 | import org.springframework.web.bind.annotation.PathVariable;
11 | import org.springframework.web.bind.annotation.RequestBody;
12 | import org.springframework.web.bind.annotation.RequestMapping;
13 | import org.springframework.web.bind.annotation.RequestMethod;
14 |
15 | import java.util.List;
16 |
17 | @Controller
18 | @RequestMapping("type")
19 | public class TypeController {
20 | private final TypeService typeService;
21 | private final GoodService goodService;
22 |
23 | @Autowired
24 | public TypeController(TypeService typeService, GoodService goodService) {
25 | this.typeService = typeService;
26 | this.goodService = goodService;
27 | }
28 |
29 | @RequestMapping(value = "/secondType/{firstTypeId}", method = RequestMethod.GET)
30 | public ResponseEntity getSecondTypeId(@PathVariable Integer firstTypeId) {
31 | List secondTypes = typeService
32 | .getSecondTypeByFirstTypeId(firstTypeId);
33 | if (secondTypes == null) {
34 | return ResponseEntity.ok("isNull");
35 | }
36 | return ResponseEntity.ok(secondTypes);
37 | }
38 |
39 | @RequestMapping(value = "/secondType/delete/{secondTypeId}", method = RequestMethod.GET)
40 | public ResponseEntity deleteSecondType(@PathVariable Integer secondTypeId) {
41 | Boolean success = goodService.getGoodsAdminByType(secondTypeId)
42 | .isEmpty();
43 | System.out.println(goodService.getGoodsAdminByType(secondTypeId));
44 | if (success) {
45 | Integer thisFirstTypeId = typeService.getSecondTypeById(
46 | secondTypeId).getFirstTypeId();
47 | success = typeService.deleteSecondType(secondTypeId);
48 | if (success) {
49 | List secondTypeList = typeService
50 | .getSecondTypeByFirstTypeId(thisFirstTypeId);
51 | if (secondTypeList == null) {
52 | return ResponseEntity.ok("isNull");
53 | }
54 | return ResponseEntity.ok(secondTypeList);
55 | }
56 | }
57 | return ResponseEntity.ok(success);
58 | }
59 |
60 | @RequestMapping(value = "/firstType/delete/{firstTypeId}", method = RequestMethod.GET)
61 | public ResponseEntity deleteFirstType(@PathVariable Integer firstTypeId) {
62 | Boolean success = typeService.getSecondTypeByFirstTypeId(firstTypeId)
63 | .isEmpty();
64 | if (success) {
65 | success = typeService.deleteFirstType(firstTypeId);
66 | if (success) {
67 | List firstTypeList = typeService.getAllFirstType();
68 | if (firstTypeList == null) {
69 | return ResponseEntity.ok("isNull");
70 | }
71 | return ResponseEntity.ok(firstTypeList);
72 | }
73 | }
74 | return ResponseEntity.ok(success);
75 | }
76 |
77 | @RequestMapping(value = "/secondType/create", method = RequestMethod.POST)
78 | public ResponseEntity createSecondType(@RequestBody SecondType secondType) {
79 | Integer thisFirstTypeId = secondType.getFirstTypeId();
80 | Boolean success = typeService.createSecondType(secondType);
81 | if (success) {
82 | List secondTypeList = typeService
83 | .getSecondTypeByFirstTypeId(thisFirstTypeId);
84 | return ResponseEntity.ok(secondTypeList);
85 | }
86 | return ResponseEntity.ok(success);
87 | }
88 |
89 | @RequestMapping(value = "/firstType/create", method = RequestMethod.POST)
90 | public ResponseEntity createSecondType(@RequestBody FirstType firstType) {
91 | Boolean success = typeService.createFirstType(firstType);
92 | if (success) {
93 | List firstTypeList = typeService.getAllFirstType();
94 | return ResponseEntity.ok(firstTypeList);
95 | }
96 | return ResponseEntity.ok(success);
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/src/main/resources/spring/mybatis.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/src/main/java/com/wzh/secondshop/controllers/OrderController.java:
--------------------------------------------------------------------------------
1 | package com.wzh.secondshop.controllers;
2 |
3 | import com.wzh.secondshop.models.Order;
4 | import com.wzh.secondshop.models.User;
5 | import com.wzh.secondshop.services.GoodService;
6 | import com.wzh.secondshop.services.OrderService;
7 | import org.springframework.beans.factory.annotation.Autowired;
8 | import org.springframework.http.ResponseEntity;
9 | import org.springframework.stereotype.Controller;
10 | import org.springframework.ui.ModelMap;
11 | import org.springframework.web.bind.annotation.*;
12 |
13 | import javax.servlet.http.HttpSession;
14 | import java.util.List;
15 |
16 | @Controller
17 | public class OrderController {
18 | private final GoodService goodService;
19 | private final OrderService orderService;
20 |
21 | @Autowired
22 | public OrderController(GoodService goodService, OrderService orderService) {
23 | this.goodService = goodService;
24 | this.orderService = orderService;
25 | }
26 |
27 | @RequestMapping(value = "/user/orderInfo", method = RequestMethod.GET)
28 | public String getOrderInfo(ModelMap model,
29 | @RequestParam(value = "orderId", required = false) Integer orderId,
30 | HttpSession session) {
31 | User sessionUser = (User) session.getAttribute("user");
32 | if (sessionUser == null) {
33 | return "redirect:/";
34 | }
35 | Order orderInfo = orderService.getOrderById(orderId);
36 | List orders = orderService.getOtherOrderByCustomerId(
37 | sessionUser.getId(), orderId);
38 | model.addAttribute("orderInfo", orderInfo);
39 | model.addAttribute("orders", orders);
40 | return "user/orderInfo";
41 | }
42 |
43 | @RequestMapping(value = "/user/sellerInfo", method = RequestMethod.GET)
44 | public String getSellerInfo(ModelMap model,
45 | @RequestParam(value = "orderId", required = false) Integer orderId,
46 | HttpSession session) {
47 | User sessionUser = (User) session.getAttribute("user");
48 | if (sessionUser == null) {
49 | return "redirect:/";
50 | }
51 | Order orderInfo = orderService.getOrderById(orderId);
52 | List orders = orderService.getOtherOrderBySellerId(
53 | sessionUser.getId(), orderId);
54 | model.addAttribute("orderInfo", orderInfo);
55 | model.addAttribute("orders", orders);
56 | System.out.println("sellerInfo.size:" + orders.size());
57 | return "user/sellerInfo";
58 | }
59 |
60 | @RequestMapping(value = "/user/order/delete/{orderId}", method = RequestMethod.GET)
61 | public ResponseEntity deleteOrderById(@PathVariable Integer orderId) {
62 | Boolean success;
63 | success = orderService.deleteOrderById(orderId) > 0;
64 | return ResponseEntity.ok(success);
65 | }
66 |
67 | @RequestMapping(value = "/user/sellerOrder/delete/{orderId}&{goodId}", method = RequestMethod.GET)
68 | public ResponseEntity deleteSellerOrderById(@PathVariable Integer orderId,
69 | @PathVariable Integer goodId) {
70 | Boolean success;
71 | success = goodService.updateGoodStatusId(1, goodId) > 0;
72 | if (success) {
73 | success = orderService.deleteOrderById(orderId) > 0;
74 | }
75 | return ResponseEntity.ok(success);
76 | }
77 |
78 | @RequestMapping(value = "/user/order/update/status/{orderId}&{statusId}", method = RequestMethod.GET)
79 | public ResponseEntity updateOrderStatus(@PathVariable Integer orderId,
80 | @PathVariable Integer statusId) {
81 | Boolean success = orderService.updateStatus(statusId, orderId) > 0;
82 | if (success) {
83 | Order order = orderService.getOrderById(orderId);
84 | return ResponseEntity.ok(order);
85 | }
86 | return ResponseEntity.ok(success);
87 | }
88 |
89 | @RequestMapping(value = "/user/order/create", method = RequestMethod.POST)
90 | public ResponseEntity createOrder(@RequestBody Order order) {
91 | Boolean success = orderService.insertOrder(order) > 0;
92 | if (success) {
93 | success = goodService.updateGoodStatusId(0, order.getGoodId()) > 0;
94 | if (success) {
95 | return ResponseEntity.ok(order.getId());
96 | } else {
97 | orderService.deleteOrderById(order.getId());
98 | return ResponseEntity.ok(success);
99 | }
100 | }
101 | return ResponseEntity.ok(success);
102 | }
103 |
104 | @RequestMapping(value = "/user/order/allOrder", method = RequestMethod.GET)
105 | public ResponseEntity getAllOrders() {
106 | List orderList = orderService.getOrderList();
107 | return ResponseEntity.ok(orderList);
108 | }
109 | }
110 |
--------------------------------------------------------------------------------
/src/main/webapp/WEB-INF/views/home/register.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=UTF-8"
2 | pageEncoding="UTF-8"%>
3 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
4 | <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
5 | <%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
6 |
7 |
8 |
9 |
10 | 用户注册
11 |
12 | ">
14 | ">
16 | ">
18 | ">
19 | ); background-size: cover">
21 |
22 |
23 |
24 |
新用户注册
25 |
26 |
27 |
29 |
31 |
32 |
33 | 姓名
34 |
36 |
37 |
38 |
39 |
40 |
41 | 性别
42 |
43 | 男
44 | 女
45 |
46 |
47 |
48 |
49 |
50 |
51 | 手机
52 |
54 |
55 |
56 |
57 |
58 |
59 |
60 | 邮箱
61 |
63 |
64 |
65 |
66 |
67 |
68 |
69 | 密码
70 |
72 |
73 |
74 |
75 |
76 |
77 | 确认密码
78 |
80 |
81 |
82 |
83 |
84 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
107 | ">
108 | ">
109 | ">
110 | ">
112 |
113 |
--------------------------------------------------------------------------------
/src/main/java/com/wzh/secondshop/controllers/HomeController.java:
--------------------------------------------------------------------------------
1 | package com.wzh.secondshop.controllers;
2 |
3 | import com.wzh.secondshop.models.User;
4 | import com.wzh.secondshop.services.UserService;
5 | import com.wzh.secondshop.utils.InfoCheck;
6 | import com.wzh.secondshop.utils.RandomString;
7 | import org.springframework.beans.factory.annotation.Autowired;
8 | import org.springframework.stereotype.Controller;
9 | import org.springframework.ui.ModelMap;
10 | import org.springframework.util.DigestUtils;
11 | import org.springframework.web.bind.annotation.RequestMapping;
12 | import org.springframework.web.bind.annotation.RequestMethod;
13 | import org.springframework.web.bind.annotation.RequestParam;
14 |
15 | import javax.servlet.http.HttpServletRequest;
16 | import javax.servlet.http.HttpSession;
17 | import javax.validation.Valid;
18 |
19 | @Controller
20 | public class HomeController {
21 | private final UserService userService;
22 |
23 | @Autowired
24 | public HomeController(UserService userService) {
25 | this.userService = userService;
26 | }
27 |
28 | @RequestMapping(value = "/login", method = RequestMethod.GET)
29 | public String loginPage(ModelMap mode, HttpServletRequest request) {
30 | String preURL = request.getHeader("Referer");
31 | mode.addAttribute("preURL", preURL);
32 | return "home/login";
33 | }
34 |
35 | @RequestMapping(value = "/login", method = RequestMethod.POST)
36 | public String loginSubmit(ModelMap model,
37 | @RequestParam(value = "preURL", required = false, defaultValue = "") String preURL,
38 | @RequestParam(value = "email", required = false) String email,
39 | @RequestParam(value = "password", required = false) String password,
40 | HttpSession session) {
41 | User user = userService.getUserByEmail(email);
42 | String message;
43 | if (user != null){
44 | String mdsPass = DigestUtils.md5DigestAsHex((password + user.getCode()).getBytes());
45 | if (!mdsPass .equals(user.getPassword())){
46 | message = "用户密码错误!";
47 | } else {
48 | if (user.getStatusId() == 4){
49 | session.setAttribute("user",user);
50 | if (preURL.equals("")){
51 | return "redirect:/";
52 | } else {
53 | return "redirect:" + preURL;
54 | }
55 | } else {
56 | message = "用户已失效!";
57 | }
58 | }
59 | } else {
60 | message = "用户不存在!";
61 | }
62 | model.addAttribute("message", message);
63 | return "home/login";
64 | }
65 |
66 |
67 | @RequestMapping(value = "/logout", method = RequestMethod.GET)
68 | public String logout(@RequestParam(required = false, defaultValue = "false" )String logout, HttpSession session){
69 | if (logout.equals("true")){
70 | session.removeAttribute("user");
71 | }
72 | return "redirect:/";
73 | }
74 |
75 | @RequestMapping(value = "/register", method = RequestMethod.GET)
76 | public String registerPage(ModelMap model) {
77 | User user = new User();
78 | model.addAttribute("user", user);
79 | return "home/register";
80 | }
81 |
82 | @RequestMapping(value = "/register", method = RequestMethod.POST)
83 | public String registerSuccess(ModelMap model,
84 | @Valid User user) {
85 | String status;
86 | Boolean insertSuccess;
87 | InfoCheck infoCheck = new InfoCheck();
88 | if (!infoCheck.isMobile(user.getMobile())){
89 | status = "请输入正确的手机号!";
90 | } else if (!infoCheck.isEmail(user.getEmail())){
91 | status = "请输入正确的邮箱!";
92 | } else if (userService.getUserByMobile(user.getMobile()) != null) {
93 | status = "此手机号码已使用!";
94 | } else if (userService.getUserByEmail(user.getEmail()) != null) {
95 | status = "此邮箱已使用!";
96 | } else if (user.getPassword2() == null){
97 | status = "请确认密码!";
98 | } else {
99 | RandomString randomString = new RandomString();
100 | user.setCode(randomString.getRandomString(5));
101 | String md5Pass = DigestUtils.md5DigestAsHex((user.getPassword() + user.getCode()).getBytes());
102 | user.setPassword(md5Pass);
103 | insertSuccess = userService.registerUser(user);
104 | if (insertSuccess){
105 | return "home/login";
106 | } else {
107 | status = "注册失败!";
108 | model.addAttribute("user", user);
109 | model.addAttribute("status", status);
110 | return "home/register";
111 | }
112 | }
113 | System.out.println(user.getMobile());
114 | System.out.println(status);
115 | model.addAttribute("user", user);
116 | model.addAttribute("status", status);
117 | return "home/register";
118 | }
119 | }
--------------------------------------------------------------------------------
/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 | com.wzh.secondshop
5 | wzh-secondshop
6 | war
7 | 1.0-SNAPSHOT
8 | wzh-secondshop Maven Webapp
9 | http://maven.apache.org
10 |
11 |
12 |
13 | javax
14 | javaee-web-api
15 | 6.0
16 | provided
17 |
18 |
19 |
20 | org.springframework
21 | spring-context
22 | 4.3.3.RELEASE
23 |
24 |
25 | commons-logging
26 | commons-logging
27 |
28 |
29 |
30 |
31 |
32 | org.springframework
33 | spring-webmvc
34 | 4.3.3.RELEASE
35 |
36 |
37 |
38 | jstl
39 | jstl
40 | 1.2
41 |
42 |
43 |
44 |
45 | javax.validation
46 | validation-api
47 | 1.1.0.Final
48 |
49 |
50 | org.hibernate
51 | hibernate-validator
52 | 5.2.4.Final
53 |
54 |
55 |
56 |
57 | mysql
58 | mysql-connector-java
59 | 5.1.34
60 |
61 |
62 |
63 |
64 | commons-dbcp
65 | commons-dbcp
66 | 1.4
67 |
68 |
69 |
70 |
71 | org.mybatis
72 | mybatis
73 | 3.4.0
74 |
75 |
76 |
77 | org.mybatis
78 | mybatis-spring
79 | 1.3.0
80 |
81 |
82 |
83 |
84 | org.springframework
85 | spring-jdbc
86 | 4.3.3.RELEASE
87 |
88 |
89 |
90 |
91 | org.slf4j
92 | jcl-over-slf4j
93 | 1.7.21
94 |
95 |
96 |
97 | ch.qos.logback
98 | logback-classic
99 | 1.1.7
100 |
101 |
102 | junit
103 | junit
104 | RELEASE
105 |
106 |
107 |
108 |
109 | com.fasterxml.jackson.core
110 | jackson-databind
111 | 2.8.7
112 |
113 |
114 |
115 |
116 | commons-fileupload
117 | commons-fileupload
118 | 1.3.1
119 |
120 |
121 | commons-io
122 | commons-io
123 | 2.4
124 |
125 |
126 |
127 |
128 |
129 | wzh-secondshop
130 |
131 |
132 | org.apache.maven.plugins
133 | maven-compiler-plugin
134 | 3.3
135 |
136 | 1.8
137 | 1.8
138 | UTF-8
139 | true
140 |
141 |
142 |
143 |
144 |
145 |
--------------------------------------------------------------------------------
/src/main/java/com/wzh/secondshop/controllers/AdminController.java:
--------------------------------------------------------------------------------
1 | package com.wzh.secondshop.controllers;
2 |
3 | import com.wzh.secondshop.models.FirstType;
4 | import com.wzh.secondshop.models.Good;
5 | import com.wzh.secondshop.models.Order;
6 | import com.wzh.secondshop.models.User;
7 | import com.wzh.secondshop.services.GoodService;
8 | import com.wzh.secondshop.services.OrderService;
9 | import com.wzh.secondshop.services.TypeService;
10 | import com.wzh.secondshop.services.UserService;
11 | import org.springframework.beans.factory.annotation.Autowired;
12 | import org.springframework.http.ResponseEntity;
13 | import org.springframework.stereotype.Controller;
14 | import org.springframework.ui.ModelMap;
15 | import org.springframework.util.DigestUtils;
16 | import org.springframework.web.bind.annotation.PathVariable;
17 | import org.springframework.web.bind.annotation.RequestMapping;
18 | import org.springframework.web.bind.annotation.RequestMethod;
19 | import org.springframework.web.bind.annotation.RequestParam;
20 |
21 | import javax.servlet.http.HttpSession;
22 | import java.util.List;
23 |
24 | @Controller
25 | @RequestMapping(value = "admin")
26 | public class AdminController {
27 |
28 | private final UserService userService;
29 | private final GoodService goodService;
30 | private final TypeService typeService;
31 | private final OrderService orderService;
32 |
33 | @Autowired
34 | public AdminController(UserService userService, GoodService goodService, TypeService typeService, OrderService orderService) {
35 | this.userService = userService;
36 | this.goodService = goodService;
37 | this.typeService = typeService;
38 | this.orderService = orderService;
39 | }
40 |
41 | @RequestMapping(value = "/adminLogin", method = RequestMethod.GET)
42 | public String getAdminLogin(){
43 | return "admin/adminLogin";
44 | }
45 |
46 | @RequestMapping(value = "/adminLogin", method = RequestMethod.POST)
47 | public String postAdminLogin(ModelMap model,
48 | @RequestParam(value = "email", required = false) String email,
49 | @RequestParam(value = "password", required = false) String password,
50 | HttpSession session) {
51 | User admin = userService.getUserByEmail(email);
52 | String message;
53 | if (admin != null){
54 | String mdsPass = DigestUtils.md5DigestAsHex((password + admin.getCode()).getBytes());
55 | // if (!mdsPass .equals(admin.getPassword())){
56 | // message = "用户密码错误!";
57 | // }
58 | if (!password .equals(admin.getPassword())){
59 | message = "用户密码错误!";
60 | } else if (admin.getRoleId() != 101){
61 | message = "用户没有权限访问!";
62 | } else {
63 | session.setAttribute("admin",admin);
64 | return "redirect:/admin/adminPage";
65 | }
66 | } else {
67 | message = "用户不存在!";
68 | }
69 | model.addAttribute("message", message);
70 | return "admin/adminLogin";
71 | }
72 |
73 | @RequestMapping(value = "/adminLogout", method = RequestMethod.GET)
74 | public String adminLogout(@RequestParam(required = false, defaultValue = "false" )String adminLogout, HttpSession session){
75 | if (adminLogout.equals("true")){
76 | session.removeAttribute("admin");
77 | }
78 | // adminLogout = "false";
79 | return "redirect:/";
80 | }
81 |
82 | @RequestMapping(value = "/adminPage", method = RequestMethod.GET)
83 | public String getAdminPage(ModelMap model,
84 | HttpSession session){
85 | User admin = (User) session.getAttribute("admin");
86 | if (admin == null){
87 | return "redirect:/admin/adminLogin";
88 | }
89 | List
goodList = goodService.getAllGoodList();
90 | for (Good good : goodList) {
91 | good.setGoodUser(userService.getUserById(good.getUserId()));
92 | good.setGoodSecondType(typeService.getSecondTypeById(good.getSecondTypeId()));
93 | }
94 | List userList = userService.getAllUser();
95 | List firstTypeList = typeService.getAllFirstType();
96 | List orderList = orderService.getOrderList();
97 | model.addAttribute("goodList", goodList);
98 | model.addAttribute("userList", userList);
99 | model.addAttribute("firstTypeList", firstTypeList);
100 | model.addAttribute("orderList", orderList);
101 | return "admin/adminPage";
102 | }
103 | @RequestMapping(value = "/user/update/status/{statusId}&{userId}", method = RequestMethod.GET)
104 | public ResponseEntity updateUserStatus(@PathVariable Integer statusId,
105 | @PathVariable Integer userId){
106 | Boolean success = userService.updateUserStatus(statusId, userId);
107 | if (success){
108 | List userList = userService.getAllUser();
109 | return ResponseEntity.ok(userList);
110 | }
111 | return ResponseEntity.ok(success);
112 | }
113 |
114 | @RequestMapping(value = "/user/delete/{userId}", method = RequestMethod.GET)
115 | public ResponseEntity deleteUser(@PathVariable Integer userId){
116 | Boolean success = userService.deleteUser(userId);
117 | if (success){
118 | List userList = userService.getAllUser();
119 | return ResponseEntity.ok(userList);
120 | }
121 | return ResponseEntity.ok(success);
122 | }
123 |
124 | }
125 |
--------------------------------------------------------------------------------
/src/main/webapp/WEB-INF/views/goods/userGood.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=UTF-8"
2 | pageEncoding="UTF-8"%>
3 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
4 |
5 |
6 |
7 |
8 | ${user.name}发布的物品
9 | ">
11 | ">
13 | ">
15 | ">
16 | ">
18 | ">
19 |
20 |
21 |
22 |
23 |
25 |
26 |
32 |
33 |
35 |
36 |

" width="128px"
37 | height="128px">
38 |
39 |
40 |
41 |
42 |
43 | ${user.name}
44 |
45 |
46 |
47 |
48 |
49 | 昵称:
50 |
51 |
52 | 性别:
53 |
54 |
55 |
56 |
57 |
${user.name}
58 |
${user.gender}
59 |
60 |
61 |
62 |
63 | 手机号:
64 |
65 |
66 | 邮箱:
67 |
68 |
69 |
70 |
71 |
${user.mobile}
72 |
${user.email}
73 |
74 |
75 |
76 |
77 |
79 |
80 | 发布的物品
81 |
82 |
83 |
84 |
114 |
115 |
116 |
118 |
120 | 最新发布的物品
121 |
122 |
123 |
145 |
146 |
147 |
148 |
149 |
150 |
172 | ">
173 | ">
174 | ">
176 |
177 |
--------------------------------------------------------------------------------
/src/main/webapp/WEB-INF/views/home/homeGoods.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=UTF-8"
2 | pageEncoding="UTF-8"%>
3 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
4 |
5 |
6 |
7 |
8 | 首页
9 | ">
11 | ">
13 | ">
15 | ">
16 | ">
17 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
67 |
68 |
164 |
165 |
166 |
167 |
181 | ">
182 | ">
183 | ">
184 | ">
186 |
187 |
--------------------------------------------------------------------------------
/src/main/webapp/WEB-INF/views/user/sellerInfo.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=UTF-8"
2 | pageEncoding="UTF-8"%>
3 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
4 |
5 |
6 |
7 |
8 | 卖出的物品订单信息
9 | ">
11 | ">
13 | ">
15 | ">
16 | ">
17 |
18 |
19 |
20 |
21 |
23 |
24 |
26 |
27 | 卖出的物品
28 |
29 |
30 |
31 |
33 |
34 |
信息明细
35 |
36 |
37 |
39 |
41 |
43 |
44 | 订单号
45 |
46 |
47 | 物品名称
48 |
49 |
50 | 卖家
51 |
52 |
53 | 买家
54 |
55 |
56 | 订单状态
57 |
58 |
59 | 交易时间
60 |
61 |
62 | 结束时间
63 |
64 |
65 |
67 |
68 | ${orderInfo.id}
69 |
70 |
71 | ${orderInfo.goodName}
72 |
73 |
74 | ${orderInfo.seller}
75 |
76 |
77 | ${orderInfo.customer}
78 |
79 |
80 | ${orderInfo.statusId == 2 ? "交易中":"交易完成"}
81 |
82 |
83 | ${orderInfo.submitDate}
84 |
85 |
86 | ${orderInfo.endDate}
87 |
88 |
89 |
90 |
91 |
92 |
95 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
106 |
108 | 卖出的其他物品
109 |
110 |
135 |
136 |
137 |
138 |
139 |
140 |
172 | ">
173 | ">
174 | ">
176 |
177 |
--------------------------------------------------------------------------------
/src/main/webapp/WEB-INF/views/user/orderInfo.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=UTF-8"
2 | pageEncoding="UTF-8"%>
3 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
4 |
5 |
6 |
7 |
8 | 订单信息
9 | ">
11 | ">
13 | ">
15 | ">
16 | ">
17 |
18 |
19 |
20 |
22 |
23 |
29 |
30 |
32 |
33 |
订单信息明细
34 |
35 |
36 |
38 |
40 |
42 |
43 | 订单号
44 |
45 |
46 | 物品名称
47 |
48 |
49 | 卖家
50 |
51 |
52 | 买家
53 |
54 |
55 | 订单状态
56 |
57 |
58 | 交易时间
59 |
60 |
61 | 结束时间
62 |
63 |
64 |
65 |
67 |
68 | ${orderInfo.id}
69 |
70 |
71 | ${orderInfo.goodName}
72 |
73 |
74 | ${orderInfo.seller}
75 |
76 |
77 | ${orderInfo.customer}
78 |
79 |
80 | ${orderInfo.statusId == 2 ? "交易中":"交易完成"}
81 |
82 |
83 | ${orderInfo.submitDate}
84 |
85 |
86 | ${orderInfo.endDate}
87 |
88 |
89 |
90 |
91 |
92 |
93 |
96 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
107 |
109 | 其他订单
110 |
111 |
112 |
137 |
138 |
139 |
140 |
141 |
142 |
192 | ">
193 | ">
194 | ">
196 |
197 |