├── .classpath ├── .gitignore ├── .project ├── .settings ├── .jsdtscope ├── com.genuitec.eclipse.migration.prefs ├── org.eclipse.core.resources.prefs ├── org.eclipse.jdt.core.prefs ├── org.eclipse.wst.common.component ├── org.eclipse.wst.common.project.facet.core.xml ├── org.eclipse.wst.jsdt.ui.superType.container └── org.eclipse.wst.jsdt.ui.superType.name ├── LICENSE ├── README.md ├── WebRoot ├── .gitignore ├── META-INF │ └── MANIFEST.MF ├── WEB-INF │ ├── .gitignore │ ├── classes │ │ ├── .gitignore │ │ ├── controller │ │ │ ├── AdminServlet.class │ │ │ ├── AllReleaseServlet.class │ │ │ ├── ChangePwdServlet.class │ │ │ ├── CheckServlet.class │ │ │ ├── GetSession_login.class │ │ │ ├── LogoutServlet.class │ │ │ ├── MyOrdersServlet.class │ │ │ ├── OrderDetailServlet.class │ │ │ ├── RegisterServlet.class │ │ │ ├── SignUpServlet.class │ │ │ ├── StoreInfoServlet.class │ │ │ └── UserInfoServlet.class │ │ ├── dao │ │ │ ├── .gitignore │ │ │ ├── AdminDAO.class │ │ │ ├── PositionDAO.class │ │ │ ├── ReceiveOrdersDAO.class │ │ │ ├── ReleaseOrdersDAO.class │ │ │ ├── SchoolDAO.class │ │ │ ├── TestPositionDAOImpl.class │ │ │ ├── TestReceiveOrdersImpl.class │ │ │ ├── TestReleaseOrdersDAOImpl.class │ │ │ ├── TestSchoolDAOImpl.class │ │ │ ├── TestUserDAOImpl.class │ │ │ ├── UserDAO.class │ │ │ ├── ZhCN_to16.class │ │ │ └── impl │ │ │ │ ├── AdminDAOImpl.class │ │ │ │ ├── PositionDAOImpl.class │ │ │ │ ├── ReceiveOrdersDAOImpl.class │ │ │ │ ├── ReleaseOrdersDAOImpl.class │ │ │ │ ├── SchoolDAOImpl.class │ │ │ │ └── UserDAOImpl.class │ │ ├── db.properties │ │ ├── duanxin │ │ │ ├── Duanxin.class │ │ │ ├── DuanxinExcuse.class │ │ │ └── DuanxinTest.class │ │ ├── entity │ │ │ ├── Admin.class │ │ │ ├── JsonMsg.class │ │ │ ├── Position.class │ │ │ ├── ReceiveOrders.class │ │ │ ├── ReleaseOrders.class │ │ │ ├── School.class │ │ │ └── User.class │ │ ├── service │ │ │ ├── .gitignore │ │ │ ├── AdminService.class │ │ │ ├── PositionService.class │ │ │ ├── ReceiveOrdersService.class │ │ │ ├── ReleaseOrdersService.class │ │ │ ├── SchoolService.class │ │ │ ├── TestPositionServiceImpl.class │ │ │ ├── TestReceiveOrdersServiceImpl.class │ │ │ ├── TestReleaseOrdersServiceImpl.class │ │ │ ├── TestSchoolServiceImpl.class │ │ │ ├── TestUserServiceImpl.class │ │ │ ├── UserService.class │ │ │ └── impl │ │ │ │ ├── AdminServiceImpl.class │ │ │ │ ├── PositionServiceImpl.class │ │ │ │ ├── ReceiveOrdersServiceImpl.class │ │ │ │ ├── ReleaseOrdersServiceImpl.class │ │ │ │ ├── SchoolServiceImpl.class │ │ │ │ └── UserServiceImpl.class │ │ └── utils │ │ │ ├── DBUtil.class │ │ │ └── PageBean.class │ ├── lib │ │ ├── com.sun.rowset.jar │ │ ├── commons-codec-1.12.jar │ │ ├── commons-fileupload-1.4.jar │ │ ├── commons-io-1.3.2.jar │ │ ├── commons-lang3-3.0.1.jar │ │ ├── commons-logging-1.2.jar │ │ ├── httpclient-4.5.3.jar │ │ ├── httpcore-4.4.6.jar │ │ ├── httpmime-4.5.3.jar │ │ ├── jackson-annotations-2.9.8.jar │ │ ├── jackson-core-2.9.8.jar │ │ ├── jackson-databind-2.9.8.jar │ │ ├── json-20170516.jar │ │ ├── mysql-connector-java-8.0.11.jar │ │ └── qcloudsms-1.0.6.jar │ └── web.xml ├── admin │ ├── .gitignore │ ├── .project │ ├── css │ │ ├── bootstrap.min.css │ │ ├── font-awesome.min.css │ │ ├── home.css │ │ ├── index.css │ │ ├── login.css │ │ └── other.css │ ├── fonts │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.svg │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ ├── fontawesome-webfont.woff2 │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ └── glyphicons-halflings-regular.woff │ ├── img │ │ ├── avatar-mini.jpg │ │ ├── avatar-mini2.jpg │ │ ├── avatar-mini3.jpg │ │ ├── avatar-mini4.jpg │ │ ├── avatar1.jpg │ │ ├── avatar1_small.jpg │ │ ├── chart-texture.jpg │ │ ├── customSelect-arrow.gif │ │ ├── follower-avatar.jpg │ │ ├── left-arrow.png │ │ ├── nav-expand.png │ │ ├── right-arrow.png │ │ ├── ring.jpg │ │ ├── search-icon.jpg │ │ ├── sm-img-1.jpg │ │ ├── sm-img-2.jpg │ │ └── sm-img-3.jpg │ ├── index.jsp │ ├── js │ │ ├── bootstrap.min.js │ │ ├── echarts.js │ │ ├── echarts.simple.js │ │ ├── getUserinfo.js │ │ ├── home.js │ │ ├── index.js │ │ ├── login.js │ │ ├── other.js │ │ └── three.min.js │ ├── login.jsp │ ├── orderinfo.jsp │ ├── positioninfo.jsp │ ├── schoolinfo.jsp │ └── userinfo.jsp └── user │ ├── .gitignore │ ├── .project │ ├── about.jsp │ ├── css │ ├── TothingWay.css │ ├── exchange.css │ ├── font-awesome.min.css │ ├── forum.css │ ├── help-code.css │ ├── help.css │ ├── index.css │ ├── login_register.css │ ├── personal.css │ ├── repository.css │ ├── resource-search.css │ ├── resource.css │ ├── storceInfo.css │ ├── update.css │ └── userinfo.css │ ├── fonts │ ├── .gitignore │ ├── FontAwesome.otf │ ├── fontawesome-webfont.eot │ ├── fontawesome-webfont.svg │ ├── fontawesome-webfont.ttf │ ├── fontawesome-webfont.woff │ ├── fontawesome-webfont.woff2 │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ ├── glyphicons-halflings-regular.woff2 │ ├── icomoon.eot │ ├── icomoon.svg │ ├── icomoon.ttf │ ├── icomoon.woff │ └── lato │ │ ├── lato-regular.ttf │ │ └── lato-regular.woff │ ├── images │ ├── 11.jpg │ ├── 12.jpg │ ├── 13.jpg │ ├── 14.jpg │ ├── 15.jpg │ ├── 16.jpg │ ├── 17.jpg │ ├── 18.jpg │ ├── 19.jpg │ ├── NavIcon.png │ ├── NavIcon1.png │ ├── NavIcon2.png │ ├── NavIcon3.png │ ├── NavIcon4.png │ ├── about_title.png │ ├── anli_banner.png │ ├── backimg4.jpg │ ├── banner.jpg │ ├── banner1.jpg │ ├── banner2.jpg │ ├── banner3.jpg │ ├── banner4.jpg │ ├── banner5.jpg │ ├── bg2x.png │ ├── company_default.png │ ├── grey.png │ ├── hzdzkj.jpg │ ├── hzsfdx.jpg │ ├── i.png │ ├── m.png │ ├── p.png │ ├── p2.jpg │ ├── p3.jpg │ ├── p4.jpg │ ├── p5.jpg │ ├── p6.jpg │ ├── p7.jpg │ ├── p8.jpg │ ├── p9.jpg │ ├── part2-pic12x.png │ ├── part2-pic22x.png │ ├── part5-bg2x.png │ ├── plant.jpg │ ├── service.png │ ├── slide1.jpg │ ├── slide2.jpg │ ├── slide3.jpg │ ├── star_s.png │ ├── userimg.jpg │ ├── vip_bg.png │ ├── work_banner1.jpg │ ├── work_banner2.jpg │ ├── wx.png │ ├── z.png │ ├── zhaopin_banner.png │ ├── zj.jpg │ ├── zj2.jpg │ ├── zj3.jpg │ ├── zj4.jpg │ ├── zj5.jpg │ ├── zj6.jpg │ ├── zjgsdx.png │ ├── zjlg.jpg │ └── zjweuedu.png │ ├── index.jsp │ ├── js │ ├── TothingWay.js │ ├── adm.js │ ├── forum.js │ ├── function.js │ ├── help-code.js │ ├── help.js │ ├── index.js │ ├── jquery-1.5.1.js │ ├── jquery.raty.js │ ├── jquery.scrollTo.min.js │ ├── login_register.js │ ├── repository.js │ ├── resource.js │ ├── stickUp.js │ ├── storeinfo.js │ └── userinfo.js │ ├── order-detail.jsp │ ├── resource-index.jsp │ ├── storeinfo.jsp │ └── userinfo.jsp ├── campuspt.sql └── src ├── .gitignore ├── controller ├── AdminServlet.java ├── AllReleaseServlet.java ├── ChangePwdServlet.java ├── CheckServlet.java ├── GetSession_login.java ├── LogoutServlet.java ├── MyOrdersServlet.java ├── OrderDetailServlet.java ├── RegisterServlet.java ├── SignUpServlet.java ├── StoreInfoServlet.java └── UserInfoServlet.java ├── dao ├── .gitignore ├── AdminDAO.java ├── PositionDAO.java ├── ReceiveOrdersDAO.java ├── ReleaseOrdersDAO.java ├── SchoolDAO.java ├── TestPositionDAOImpl.java ├── TestReceiveOrdersImpl.java ├── TestReleaseOrdersDAOImpl.java ├── TestSchoolDAOImpl.java ├── TestUserDAOImpl.java ├── UserDAO.java ├── ZhCN_to16.java └── impl │ ├── AdminDAOImpl.java │ ├── PositionDAOImpl.java │ ├── ReceiveOrdersDAOImpl.java │ ├── ReleaseOrdersDAOImpl.java │ ├── SchoolDAOImpl.java │ └── UserDAOImpl.java ├── db.properties ├── duanxin ├── Duanxin.java ├── DuanxinExcuse.java └── DuanxinTest.java ├── entity ├── Admin.java ├── JsonMsg.java ├── Position.java ├── ReceiveOrders.java ├── ReleaseOrders.java ├── School.java └── User.java ├── service ├── .gitignore ├── AdminService.java ├── PositionService.java ├── ReceiveOrdersService.java ├── ReleaseOrdersService.java ├── SchoolService.java ├── TestPositionServiceImpl.java ├── TestReceiveOrdersServiceImpl.java ├── TestReleaseOrdersServiceImpl.java ├── TestSchoolServiceImpl.java ├── TestUserServiceImpl.java ├── UserService.java └── impl │ ├── AdminServiceImpl.java │ ├── PositionServiceImpl.java │ ├── ReceiveOrdersServiceImpl.java │ ├── ReleaseOrdersServiceImpl.java │ ├── SchoolServiceImpl.java │ └── UserServiceImpl.java └── utils ├── DBUtil.java └── PageBean.java /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /src/ 2 | /WebRoot/ 3 | /campuspt.sql/ 4 | /README.md/ -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | CampusPT 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.wst.common.project.facet.core.builder 15 | 16 | 17 | 18 | 19 | org.eclipse.wst.validation.validationbuilder 20 | 21 | 22 | 23 | 24 | com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator 25 | 26 | 27 | 28 | 29 | com.aptana.ide.core.unifiedBuilder 30 | 31 | 32 | 33 | 34 | 35 | com.aptana.projects.webnature 36 | org.eclipse.jem.workbench.JavaEMFNature 37 | org.eclipse.wst.common.modulecore.ModuleCoreNature 38 | org.eclipse.wst.common.project.facet.core.nature 39 | org.eclipse.jdt.core.javanature 40 | org.eclipse.wst.jsdt.core.jsNature 41 | 42 | 43 | 44 | 1557967476327 45 | 46 | 26 47 | 48 | org.eclipse.ui.ide.multiFilter 49 | 1.0-name-matches-false-false-node_modules 50 | 51 | 52 | 53 | 1557967476338 54 | 55 | 26 56 | 57 | org.eclipse.ui.ide.multiFilter 58 | 1.0-name-matches-false-false-node_modules 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /.settings/.jsdtscope: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.settings/com.genuitec.eclipse.migration.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | performed.operation.resolve.unknown.runtime=1.0 3 | -------------------------------------------------------------------------------- /.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//WebRoot/user/quiz-index.jsp=UTF-8 3 | -------------------------------------------------------------------------------- /.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 4 | org.eclipse.jdt.core.compiler.compliance=1.8 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.source=1.8 8 | -------------------------------------------------------------------------------- /.settings/org.eclipse.wst.common.component: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.settings/org.eclipse.wst.common.project.facet.core.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.settings/org.eclipse.wst.jsdt.ui.superType.container: -------------------------------------------------------------------------------- 1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary -------------------------------------------------------------------------------- /.settings/org.eclipse.wst.jsdt.ui.superType.name: -------------------------------------------------------------------------------- 1 | Window -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | CampusPT 2 | 3 | ​ ***首页展示*** 4 | ![](https://s1.ax1x.com/2020/07/10/UKAd6U.png) 5 | -------------------------------------------------------------------------------- /WebRoot/.gitignore: -------------------------------------------------------------------------------- 1 | /META-INF/ 2 | /WEB-INF/ 3 | /admin/ 4 | /user/ 5 | -------------------------------------------------------------------------------- /WebRoot/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /WebRoot/WEB-INF/.gitignore: -------------------------------------------------------------------------------- 1 | /classes/ 2 | /.gitignore 3 | /web.xml 4 | -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/.gitignore: -------------------------------------------------------------------------------- 1 | /controller/ 2 | /dao/ 3 | /entity/ 4 | /service/ 5 | /utils/ 6 | -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/controller/AdminServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/controller/AdminServlet.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/controller/AllReleaseServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/controller/AllReleaseServlet.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/controller/ChangePwdServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/controller/ChangePwdServlet.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/controller/CheckServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/controller/CheckServlet.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/controller/GetSession_login.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/controller/GetSession_login.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/controller/LogoutServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/controller/LogoutServlet.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/controller/MyOrdersServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/controller/MyOrdersServlet.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/controller/OrderDetailServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/controller/OrderDetailServlet.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/controller/RegisterServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/controller/RegisterServlet.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/controller/SignUpServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/controller/SignUpServlet.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/controller/StoreInfoServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/controller/StoreInfoServlet.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/controller/UserInfoServlet.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/controller/UserInfoServlet.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/dao/.gitignore: -------------------------------------------------------------------------------- 1 | /impl/ 2 | -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/dao/AdminDAO.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/dao/AdminDAO.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/dao/PositionDAO.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/dao/PositionDAO.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/dao/ReceiveOrdersDAO.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/dao/ReceiveOrdersDAO.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/dao/ReleaseOrdersDAO.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/dao/ReleaseOrdersDAO.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/dao/SchoolDAO.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/dao/SchoolDAO.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/dao/TestPositionDAOImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/dao/TestPositionDAOImpl.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/dao/TestReceiveOrdersImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/dao/TestReceiveOrdersImpl.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/dao/TestReleaseOrdersDAOImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/dao/TestReleaseOrdersDAOImpl.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/dao/TestSchoolDAOImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/dao/TestSchoolDAOImpl.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/dao/TestUserDAOImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/dao/TestUserDAOImpl.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/dao/UserDAO.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/dao/UserDAO.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/dao/ZhCN_to16.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/dao/ZhCN_to16.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/dao/impl/AdminDAOImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/dao/impl/AdminDAOImpl.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/dao/impl/PositionDAOImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/dao/impl/PositionDAOImpl.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/dao/impl/ReceiveOrdersDAOImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/dao/impl/ReceiveOrdersDAOImpl.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/dao/impl/ReleaseOrdersDAOImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/dao/impl/ReleaseOrdersDAOImpl.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/dao/impl/SchoolDAOImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/dao/impl/SchoolDAOImpl.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/dao/impl/UserDAOImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/dao/impl/UserDAOImpl.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/db.properties: -------------------------------------------------------------------------------- 1 | driverName =com.mysql.cj.jdbc.Driver 2 | url = jdbc:mysql://localhost:3306/campuspt?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone = UTC 3 | username =root 4 | password =123456 -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/duanxin/Duanxin.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/duanxin/Duanxin.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/duanxin/DuanxinExcuse.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/duanxin/DuanxinExcuse.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/duanxin/DuanxinTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/duanxin/DuanxinTest.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/entity/Admin.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/entity/Admin.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/entity/JsonMsg.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/entity/JsonMsg.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/entity/Position.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/entity/Position.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/entity/ReceiveOrders.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/entity/ReceiveOrders.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/entity/ReleaseOrders.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/entity/ReleaseOrders.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/entity/School.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/entity/School.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/entity/User.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/entity/User.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/service/.gitignore: -------------------------------------------------------------------------------- 1 | /impl/ 2 | -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/service/AdminService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/service/AdminService.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/service/PositionService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/service/PositionService.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/service/ReceiveOrdersService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/service/ReceiveOrdersService.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/service/ReleaseOrdersService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/service/ReleaseOrdersService.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/service/SchoolService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/service/SchoolService.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/service/TestPositionServiceImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/service/TestPositionServiceImpl.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/service/TestReceiveOrdersServiceImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/service/TestReceiveOrdersServiceImpl.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/service/TestReleaseOrdersServiceImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/service/TestReleaseOrdersServiceImpl.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/service/TestSchoolServiceImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/service/TestSchoolServiceImpl.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/service/TestUserServiceImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/service/TestUserServiceImpl.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/service/UserService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/service/UserService.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/service/impl/AdminServiceImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/service/impl/AdminServiceImpl.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/service/impl/PositionServiceImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/service/impl/PositionServiceImpl.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/service/impl/ReceiveOrdersServiceImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/service/impl/ReceiveOrdersServiceImpl.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/service/impl/ReleaseOrdersServiceImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/service/impl/ReleaseOrdersServiceImpl.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/service/impl/SchoolServiceImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/service/impl/SchoolServiceImpl.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/service/impl/UserServiceImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/service/impl/UserServiceImpl.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/utils/DBUtil.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/utils/DBUtil.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/classes/utils/PageBean.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/classes/utils/PageBean.class -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/com.sun.rowset.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/lib/com.sun.rowset.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/commons-codec-1.12.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/lib/commons-codec-1.12.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/commons-fileupload-1.4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/lib/commons-fileupload-1.4.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/commons-io-1.3.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/lib/commons-io-1.3.2.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/commons-lang3-3.0.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/lib/commons-lang3-3.0.1.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/commons-logging-1.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/lib/commons-logging-1.2.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/httpclient-4.5.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/lib/httpclient-4.5.3.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/httpcore-4.4.6.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/lib/httpcore-4.4.6.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/httpmime-4.5.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/lib/httpmime-4.5.3.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/jackson-annotations-2.9.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/lib/jackson-annotations-2.9.8.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/jackson-core-2.9.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/lib/jackson-core-2.9.8.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/jackson-databind-2.9.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/lib/jackson-databind-2.9.8.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/json-20170516.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/lib/json-20170516.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/mysql-connector-java-8.0.11.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/lib/mysql-connector-java-8.0.11.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/qcloudsms-1.0.6.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/WEB-INF/lib/qcloudsms-1.0.6.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | CampusPT 4 | 5 | AllReleaseServlet 6 | controller.AllReleaseServlet 7 | 8 | 9 | OrderDetailServlet 10 | controller.OrderDetailServlet 11 | 12 | 13 | 14 | GetSession_login 15 | controller.GetSession_login 16 | 17 | 18 | LogoutServlet 19 | controller.LogoutServlet 20 | 21 | 22 | 23 | 24 | RegisterServlet 25 | controller.RegisterServlet 26 | 27 | 28 | StoreInfoServlet 29 | controller.StoreInfoServlet 30 | 31 | 32 | ChangePwdServlet 33 | controller.ChangePwdServlet 34 | 35 | 36 | UserInfoServlet 37 | controller.UserInfoServlet 38 | 39 | 40 | MyOrdersServlet 41 | controller.MyOrdersServlet 42 | 43 | 44 | SignUpServlet 45 | controller.SignUpServlet 46 | 47 | 48 | CheckServlet 49 | controller.CheckServlet 50 | 51 | 52 | AdminServlet 53 | controller.AdminServlet 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | AllReleaseServlet 69 | /user/allreleaseorders.do 70 | 71 | 72 | OrderDetailServlet 73 | /user/odetail.do 74 | 75 | 76 | 77 | 78 | GetSession_login 79 | /GetSession_login.do 80 | 81 | 82 | LogoutServlet 83 | /user/logout.do 84 | 85 | 86 | LogoutServlet 87 | /admin/logout.do 88 | 89 | 90 | 91 | 92 | RegisterServlet 93 | /reg.do 94 | 95 | 96 | StoreInfoServlet 97 | /user/store.do 98 | 99 | 100 | ChangePwdServlet 101 | /changepwd.do 102 | 103 | 104 | UserInfoServlet 105 | /user/userinfo.do 106 | 107 | 108 | MyOrdersServlet 109 | /user/myrel.do 110 | 111 | 112 | SignUpServlet 113 | /user/signup.do 114 | 115 | 116 | CheckServlet 117 | /check.do 118 | 119 | 120 | AdminServlet 121 | /admin/admin.do 122 | 123 | 124 | index.html 125 | index.htm 126 | index.jsp 127 | default.html 128 | default.htm 129 | default.jsp 130 | 131 | -------------------------------------------------------------------------------- /WebRoot/admin/.gitignore: -------------------------------------------------------------------------------- 1 | /css/ 2 | /fonts/ 3 | /img/ 4 | /js/ 5 | -------------------------------------------------------------------------------- /WebRoot/admin/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | admin 4 | 5 | 6 | 7 | 8 | 9 | com.aptana.ide.core.unifiedBuilder 10 | 11 | 12 | 13 | 14 | 15 | com.aptana.projects.webnature 16 | 17 | 18 | 19 | 1557537325557 20 | 21 | 26 22 | 23 | org.eclipse.ui.ide.multiFilter 24 | 1.0-name-matches-false-false-node_modules 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /WebRoot/admin/css/login.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #F1F2F7; 3 | margin: 0px; 4 | overflow: hidden; 5 | } 6 | .login_box{ 7 | position: fixed; 8 | z-index: 6; 9 | left: 50%; 10 | top: 20%; 11 | width: 350px; 12 | margin-left: -175px; 13 | background-color: #FFFFFF; 14 | border-radius: 6px; 15 | text-align: center; 16 | } 17 | 18 | .login_title{ 19 | background-color: #41cac0; 20 | color: #FFFFFF; 21 | font-size: 24px; 22 | height: 60px; 23 | line-height: 60px; 24 | border-radius: 6px 6px 0 0; 25 | text-transform: uppercase; 26 | font-weight: 300; 27 | font-family: 'Open Sans', sans-serif; 28 | } 29 | 30 | .login_wrap{ 31 | padding: 20px 10px 20px 10px; 32 | } 33 | .login_input{ 34 | margin-bottom: 15px; 35 | border: 1px solid #eaeaea; 36 | box-shadow: none; 37 | font-size: 12px; 38 | height: 40px; 39 | } 40 | .btn_login{ 41 | background: #f67a6e; 42 | color: #fff; 43 | text-transform: uppercase; 44 | font-weight: 300; 45 | font-family: 'Open Sans', sans-serif; 46 | margin: 20px 0 20px 0; 47 | } 48 | .btn_login:hover{ 49 | color: #FFFFFF; 50 | } 51 | -------------------------------------------------------------------------------- /WebRoot/admin/css/other.css: -------------------------------------------------------------------------------- 1 | .userinfo_table{ 2 | margin: 20px; 3 | } 4 | .title_head{ 5 | margin-top: 20px; 6 | height: 60px; 7 | line-height: 60px; 8 | border-radius: 6px 6px 0 0; 9 | color: #FFFFFF; 10 | } 11 | .user_color{ 12 | background-color: #41cac0; 13 | } 14 | .school_color{ 15 | background-color: #ff6c60; 16 | } 17 | .order_color{ 18 | background-color: #f8d347; 19 | } 20 | .revenue_head{ 21 | width: 60px; 22 | height: 60px; 23 | text-align: center; 24 | line-height: 60px; 25 | font-size: 24px; 26 | color: #FFFFFF; 27 | } 28 | .title_head h3{ 29 | font-size: 20px; 30 | margin-left: 20px; 31 | } 32 | .title_head span{ 33 | padding:0 20px 0 20px; 34 | font-size: 20px; 35 | display: block; 36 | } 37 | .title_head span{ 38 | background-color: rgba(0,0,0,0.1); 39 | } 40 | .title_head>.revenue_head{ 41 | background-color: rgba(0,0,0,0.1); 42 | } 43 | .search{ 44 | background:none; 45 | font-size: 20px; 46 | margin-right: 30px; 47 | cursor: pointer; 48 | transition: .5s; 49 | height: 40px; 50 | margin-top: 10px; 51 | line-height: 40px; 52 | 53 | } 54 | .search input::-webkit-input-placeholder{ 55 | color: #FFFFFF; 56 | font-size: 14px; 57 | } 58 | .search_user{ 59 | background: none; 60 | width: 0px; 61 | height: 100%; 62 | border: none; 63 | font-size: 14px; 64 | transition: .5s; 65 | outline: none; 66 | } 67 | .search_user:focus{ 68 | outline: none; 69 | } 70 | .search:hover{ 71 | border: 1px solid #FFFFFF; 72 | border-radius: 6px; 73 | padding-left: 6px; 74 | } 75 | .search:hover .search_user{ 76 | width: 200px; 77 | } 78 | .addSchool_btn{ 79 | margin-right: 30px; 80 | height: 40px; 81 | margin-top: 10px; 82 | background-color: rgba(0,0,0,0.1); 83 | } 84 | .addSchool_btn:hover{ 85 | color: #FFFFFF; 86 | } 87 | 88 | .addSchool_btn:focus{ 89 | border: none; 90 | outline: none; 91 | } 92 | .port_color{ 93 | background-color: #5BC0DE; 94 | } 95 | -------------------------------------------------------------------------------- /WebRoot/admin/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/admin/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /WebRoot/admin/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/admin/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /WebRoot/admin/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/admin/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /WebRoot/admin/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/admin/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /WebRoot/admin/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/admin/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /WebRoot/admin/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/admin/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /WebRoot/admin/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/admin/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /WebRoot/admin/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/admin/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /WebRoot/admin/img/avatar-mini.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/admin/img/avatar-mini.jpg -------------------------------------------------------------------------------- /WebRoot/admin/img/avatar-mini2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/admin/img/avatar-mini2.jpg -------------------------------------------------------------------------------- /WebRoot/admin/img/avatar-mini3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/admin/img/avatar-mini3.jpg -------------------------------------------------------------------------------- /WebRoot/admin/img/avatar-mini4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/admin/img/avatar-mini4.jpg -------------------------------------------------------------------------------- /WebRoot/admin/img/avatar1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/admin/img/avatar1.jpg -------------------------------------------------------------------------------- /WebRoot/admin/img/avatar1_small.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/admin/img/avatar1_small.jpg -------------------------------------------------------------------------------- /WebRoot/admin/img/chart-texture.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/admin/img/chart-texture.jpg -------------------------------------------------------------------------------- /WebRoot/admin/img/customSelect-arrow.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/admin/img/customSelect-arrow.gif -------------------------------------------------------------------------------- /WebRoot/admin/img/follower-avatar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/admin/img/follower-avatar.jpg -------------------------------------------------------------------------------- /WebRoot/admin/img/left-arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/admin/img/left-arrow.png -------------------------------------------------------------------------------- /WebRoot/admin/img/nav-expand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/admin/img/nav-expand.png -------------------------------------------------------------------------------- /WebRoot/admin/img/right-arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/admin/img/right-arrow.png -------------------------------------------------------------------------------- /WebRoot/admin/img/ring.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/admin/img/ring.jpg -------------------------------------------------------------------------------- /WebRoot/admin/img/search-icon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/admin/img/search-icon.jpg -------------------------------------------------------------------------------- /WebRoot/admin/img/sm-img-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/admin/img/sm-img-1.jpg -------------------------------------------------------------------------------- /WebRoot/admin/img/sm-img-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/admin/img/sm-img-2.jpg -------------------------------------------------------------------------------- /WebRoot/admin/img/sm-img-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/admin/img/sm-img-3.jpg -------------------------------------------------------------------------------- /WebRoot/admin/js/echarts.simple.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one 3 | * or more contributor license agreements. See the NOTICE file 4 | * distributed with this work for additional information 5 | * regarding copyright ownership. The ASF licenses this file 6 | * to you under the Apache License, Version 2.0 (the 7 | * "License"); you may not use this file except in compliance 8 | * with the License. You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, 13 | * software distributed under the License is distributed on an 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | * KIND, either express or implied. See the License for the 16 | * specific language governing permissions and limitations 17 | * under the License. 18 | */ 19 | 20 | export * from './src/echarts'; 21 | 22 | import './src/component/dataset'; 23 | 24 | import './src/chart/line'; 25 | import './src/chart/bar'; 26 | import './src/chart/pie'; 27 | import './src/component/gridSimple'; -------------------------------------------------------------------------------- /WebRoot/admin/js/home.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | onSize(); 3 | mainCanvas(); 4 | $(window).resize(function () { 5 | onSize(); 6 | mainCanvas(); 7 | }); 8 | $("#headerRightMy").click(function () { 9 | $("#AlertA").toggle("slow"); 10 | }) 11 | $(".panel").click(function () { 12 | ckh(this); 13 | }) 14 | 15 | }); 16 | 17 | function mainCanvas() { 18 | // 基于准备好的dom,初始化echarts实例 19 | var myChart = echarts.init(document.getElementById('main')); 20 | 21 | // 指定图表的配置项和数据 22 | var dataAxis = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sept', 'Oct', 'Nov', 'Dec']; 23 | var data = [220, 182, 191, 234, 290, 330, 310, 123, 442, 321, 90, 149]; 24 | var yMax = 100; 25 | var dataShadow = []; 26 | 27 | for (var i = 0; i < data.length; i++) { 28 | dataShadow.push(yMax); 29 | } 30 | 31 | option = { 32 | 33 | title: { 34 | text: '', 35 | subtext: '' 36 | }, 37 | 38 | xAxis: { 39 | data: dataAxis, 40 | axisLabel: { 41 | inside: true, 42 | textStyle: { 43 | color: '#fff' 44 | } 45 | }, 46 | axisTick: { 47 | show: false 48 | }, 49 | axisLine: { 50 | show: false 51 | }, 52 | z: 10 53 | }, 54 | yAxis: { 55 | axisLine: { 56 | show: false 57 | }, 58 | axisTick: { 59 | show: false 60 | }, 61 | axisLabel: { 62 | textStyle: { 63 | color: '#999' 64 | } 65 | } 66 | }, 67 | dataZoom: [{ 68 | type: 'inside' 69 | }], 70 | 71 | series: [{ // For shadow 72 | type: 'bar', 73 | itemStyle: { 74 | normal: { 75 | color: 'rgba(0,0,0,0.05)' 76 | } 77 | }, 78 | barGap: '-100%', 79 | barCategoryGap: '40%', 80 | data: dataShadow, 81 | animation: true 82 | }, 83 | { 84 | type: 'bar', 85 | itemStyle: { 86 | normal: { 87 | color: new echarts.graphic.LinearGradient( 88 | 0, 0, 0, 1, 89 | [{ 90 | offset: 0, 91 | color: '#BFC2CD' 92 | }, 93 | { 94 | offset: 0.5, 95 | color: '#BFC2CD' 96 | }, 97 | { 98 | offset: 1, 99 | color: '#BFC2CD' 100 | } 101 | ] 102 | ) 103 | ,label: { 104 | show: true, //开启显示 105 | position: 'top', //在上方显示 106 | textStyle: { //数值样式 107 | color: '#BFC2CD', 108 | fontSize: 16 109 | } 110 | } 111 | }, 112 | emphasis: { 113 | color: new echarts.graphic.LinearGradient( 114 | 0, 0, 0, 1, 115 | [{ 116 | offset: 0, 117 | color: '#e8403f' 118 | }, 119 | { 120 | offset: 0.7, 121 | color: '#e8403f' 122 | }, 123 | { 124 | offset: 1, 125 | color: '#e8403f' 126 | } 127 | ] 128 | ) 129 | } 130 | }, 131 | data: data 132 | } 133 | ] 134 | }; 135 | 136 | // Enable data zoom when user click bar. 137 | var zoomSize = 6; 138 | myChart.on('click', function (params) { 139 | console.log(dataAxis[Math.max(params.dataIndex - zoomSize / 2, 0)]); 140 | myChart.dispatchAction({ 141 | type: 'dataZoom', 142 | startValue: dataAxis[Math.max(params.dataIndex - zoomSize / 2, 0)], 143 | endValue: dataAxis[Math.min(params.dataIndex + zoomSize / 2, data.length - 1)] 144 | }); 145 | }); 146 | 147 | // 使用刚指定的配置项和数据显示图表。 148 | myChart.setOption(option); 149 | } 150 | 151 | function onSize() { 152 | if ($(window).width() > 767) { 153 | $("#in_width").addClass("in_width"); 154 | $("#nav_box").addClass("nav_box"); 155 | $("#in_width").height($(".box_container").height()); 156 | $("#main canvas").width($("#main").width()); 157 | } else { 158 | $("#in_width").removeClass("in_width"); 159 | $("#nav_box").removeClass("nav_box"); 160 | $("#in_width").height("100%"); 161 | } 162 | } 163 | 164 | function ckh(obj) { 165 | $(obj).addClass("panel_active"); 166 | $(obj).siblings().removeClass("panel_active"); 167 | } -------------------------------------------------------------------------------- /WebRoot/admin/js/index.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | onSize(); 3 | mainCanvas(); 4 | $(window).resize(function () { 5 | onSize(); 6 | mainCanvas(); 7 | }); 8 | $("#headerRightMy").click(function () { 9 | $("#AlertA").toggle("slow"); 10 | }) 11 | $(".panel").click(function () { 12 | ckh(this); 13 | }) 14 | 15 | }); 16 | 17 | function mainCanvas() { 18 | // 基于准备好的dom,初始化echarts实例 19 | var myChart = echarts.init(document.getElementById('main')); 20 | 21 | // 指定图表的配置项和数据 22 | var dataAxis = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sept', 'Oct', 'Nov', 'Dec']; 23 | var data = [220, 182, 191, 234, 290, 330, 310, 123, 442, 321, 90, 149]; 24 | var yMax = 100; 25 | var dataShadow = []; 26 | 27 | for (var i = 0; i < data.length; i++) { 28 | dataShadow.push(yMax); 29 | } 30 | 31 | option = { 32 | 33 | title: { 34 | text: '', 35 | subtext: '' 36 | }, 37 | 38 | xAxis: { 39 | data: dataAxis, 40 | axisLabel: { 41 | inside: true, 42 | textStyle: { 43 | color: '#fff' 44 | } 45 | }, 46 | axisTick: { 47 | show: false 48 | }, 49 | axisLine: { 50 | show: false 51 | }, 52 | z: 10 53 | }, 54 | yAxis: { 55 | axisLine: { 56 | show: false 57 | }, 58 | axisTick: { 59 | show: false 60 | }, 61 | axisLabel: { 62 | textStyle: { 63 | color: '#999' 64 | } 65 | } 66 | }, 67 | dataZoom: [{ 68 | type: 'inside' 69 | }], 70 | 71 | series: [{ // For shadow 72 | type: 'bar', 73 | itemStyle: { 74 | normal: { 75 | color: 'rgba(0,0,0,0.05)' 76 | } 77 | }, 78 | barGap: '-100%', 79 | barCategoryGap: '40%', 80 | data: dataShadow, 81 | animation: true 82 | }, 83 | { 84 | type: 'bar', 85 | itemStyle: { 86 | normal: { 87 | color: new echarts.graphic.LinearGradient( 88 | 0, 0, 0, 1, 89 | [{ 90 | offset: 0, 91 | color: '#BFC2CD' 92 | }, 93 | { 94 | offset: 0.5, 95 | color: '#BFC2CD' 96 | }, 97 | { 98 | offset: 1, 99 | color: '#BFC2CD' 100 | } 101 | ] 102 | ) 103 | ,label: { 104 | show: true, //开启显示 105 | position: 'top', //在上方显示 106 | textStyle: { //数值样式 107 | color: '#BFC2CD', 108 | fontSize: 16 109 | } 110 | } 111 | }, 112 | emphasis: { 113 | color: new echarts.graphic.LinearGradient( 114 | 0, 0, 0, 1, 115 | [{ 116 | offset: 0, 117 | color: '#e8403f' 118 | }, 119 | { 120 | offset: 0.7, 121 | color: '#e8403f' 122 | }, 123 | { 124 | offset: 1, 125 | color: '#e8403f' 126 | } 127 | ] 128 | ) 129 | } 130 | }, 131 | data: data 132 | } 133 | ] 134 | }; 135 | 136 | // Enable data zoom when user click bar. 137 | var zoomSize = 6; 138 | myChart.on('click', function (params) { 139 | console.log(dataAxis[Math.max(params.dataIndex - zoomSize / 2, 0)]); 140 | myChart.dispatchAction({ 141 | type: 'dataZoom', 142 | startValue: dataAxis[Math.max(params.dataIndex - zoomSize / 2, 0)], 143 | endValue: dataAxis[Math.min(params.dataIndex + zoomSize / 2, data.length - 1)] 144 | }); 145 | }); 146 | 147 | // 使用刚指定的配置项和数据显示图表。 148 | myChart.setOption(option); 149 | } 150 | 151 | function onSize() { 152 | if ($(window).width() > 767) { 153 | $("#in_width").addClass("in_width"); 154 | $("#nav_box").addClass("nav_box"); 155 | $("#in_width").height(($(document).height()-60)); 156 | $("#main canvas").width($("#main").width()); 157 | } else { 158 | $("#in_width").removeClass("in_width"); 159 | $("#nav_box").removeClass("nav_box"); 160 | $("#in_width").height("100%"); 161 | } 162 | } 163 | 164 | function ckh(obj) { 165 | $(obj).addClass("panel_active"); 166 | $(obj).siblings().removeClass("panel_active"); 167 | } -------------------------------------------------------------------------------- /WebRoot/admin/js/login.js: -------------------------------------------------------------------------------- 1 | var SEPARATION = 100, 2 | AMOUNTX = 50, 3 | AMOUNTY = 50; 4 | 5 | var container; 6 | var camera, scene, renderer; 7 | 8 | var particles, particle, count = 0; 9 | 10 | var mouseX = 0, 11 | mouseY = 0; 12 | 13 | var windowHalfX = window.innerWidth / 2; 14 | var windowHalfY = window.innerHeight / 2; 15 | init(); 16 | animate(); 17 | 18 | 19 | function init() { 20 | 21 | container = document.createElement('div'); 22 | document.body.appendChild(container); 23 | 24 | camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 1, 10000); 25 | camera.position.z = 1000; 26 | 27 | scene = new THREE.Scene(); 28 | 29 | particles = new Array(); 30 | 31 | var PI2 = Math.PI * 2; 32 | var material = new THREE.ParticleCanvasMaterial({ 33 | 34 | color: 0xCCCCCC, 35 | program: function(context) { 36 | 37 | context.beginPath(); 38 | context.arc(0, 0, 1, 0, PI2, true); 39 | context.fill(); 40 | 41 | } 42 | 43 | }); 44 | 45 | var i = 0; 46 | 47 | for(var ix = 0; ix < AMOUNTX; ix++) { 48 | 49 | for(var iy = 0; iy < AMOUNTY; iy++) { 50 | 51 | particle = particles[i++] = new THREE.Particle(material); 52 | particle.position.x = ix * SEPARATION - ((AMOUNTX * SEPARATION) / 2); 53 | particle.position.z = iy * SEPARATION - ((AMOUNTY * SEPARATION) / 2); 54 | scene.add(particle); 55 | 56 | } 57 | 58 | } 59 | 60 | renderer = new THREE.CanvasRenderer(); 61 | renderer.setSize(window.innerWidth, window.innerHeight); 62 | container.appendChild(renderer.domElement); 63 | 64 | document.addEventListener('mousemove', onDocumentMouseMove, false); 65 | document.addEventListener('touchstart', onDocumentTouchStart, false); 66 | document.addEventListener('touchmove', onDocumentTouchMove, false); 67 | 68 | // 69 | 70 | window.addEventListener('resize', onWindowResize, false); 71 | 72 | } 73 | 74 | function onWindowResize() { 75 | 76 | windowHalfX = window.innerWidth / 2; 77 | windowHalfY = window.innerHeight / 2; 78 | 79 | camera.aspect = window.innerWidth / window.innerHeight; 80 | camera.updateProjectionMatrix(); 81 | 82 | renderer.setSize(window.innerWidth, window.innerHeight); 83 | 84 | } 85 | 86 | // 87 | 88 | function onDocumentMouseMove(event) { 89 | 90 | mouseX = event.clientX - windowHalfX; 91 | mouseY = event.clientY - windowHalfY; 92 | 93 | } 94 | 95 | function onDocumentTouchStart(event) { 96 | 97 | if(event.touches.length === 1) { 98 | 99 | event.preventDefault(); 100 | 101 | mouseX = event.touches[0].pageX - windowHalfX; 102 | mouseY = event.touches[0].pageY - windowHalfY; 103 | 104 | } 105 | 106 | } 107 | 108 | function onDocumentTouchMove(event) { 109 | 110 | if(event.touches.length === 1) { 111 | 112 | event.preventDefault(); 113 | 114 | mouseX = event.touches[0].pageX - windowHalfX; 115 | mouseY = event.touches[0].pageY - windowHalfY; 116 | 117 | } 118 | 119 | } 120 | 121 | // 122 | 123 | function animate() { 124 | 125 | requestAnimationFrame(animate); 126 | 127 | render(); 128 | 129 | } 130 | 131 | function render() { 132 | 133 | camera.position.x += (mouseX - camera.position.x) * .05; 134 | camera.position.y += (-mouseY - camera.position.y) * .05; 135 | camera.lookAt(scene.position); 136 | 137 | var i = 0; 138 | 139 | for(var ix = 0; ix < AMOUNTX; ix++) { 140 | 141 | for(var iy = 0; iy < AMOUNTY; iy++) { 142 | 143 | particle = particles[i++]; 144 | particle.position.y = (Math.sin((ix + count) * 0.3) * 50) + (Math.sin((iy + count) * 0.5) * 50); 145 | particle.scale.x = particle.scale.y = (Math.sin((ix + count) * 0.3) + 1) * 2 + (Math.sin((iy + count) * 0.5) + 1) * 2; 146 | 147 | } 148 | 149 | } 150 | 151 | renderer.render(scene, camera); 152 | 153 | count += 0.1; 154 | } 155 | $("#btn_login").click(function(){ 156 | var login_username=$("#login_username").val(); 157 | var login_password=$("#login_password").val(); 158 | $.ajax({ 159 | data:{ 160 | adminname:login_username, 161 | password:login_password, 162 | op:"check_an" 163 | }, 164 | url:"../check.do", 165 | type:"POST", 166 | success:function(data){ 167 | var jsonData=JSON.parse(data); 168 | if(jsonData.status == 200){ 169 | alert(jsonData.msg); 170 | window.location.href="admin.do?op=count_all"; 171 | }else{ 172 | alert(jsonData.msg); 173 | 174 | } 175 | } 176 | }) 177 | }) -------------------------------------------------------------------------------- /WebRoot/admin/js/other.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | onSize(); 3 | $(window).resize(function() { 4 | onSize(); 5 | }); 6 | $("#headerRightMy").click(function() { 7 | $("#AlertA").toggle("slow"); 8 | }) 9 | $(".panel").click(function() { 10 | ckh(this); 11 | }) 12 | }); 13 | 14 | function onSize() { 15 | if ($(window).width() > 767) { 16 | $("#in_width").addClass("in_width"); 17 | $("#nav_box").addClass("nav_box"); 18 | $("#in_width").height(($(document).height() - 60)); 19 | } else { 20 | $("#in_width").removeClass("in_width"); 21 | $("#nav_box").removeClass("nav_box"); 22 | $("#in_width").height("100%"); 23 | } 24 | } 25 | 26 | function ckh(obj) { 27 | $(obj).addClass("panel_active"); 28 | $(obj).siblings().removeClass("panel_active"); 29 | } 30 | function snamenull() { 31 | $("#add_school_input").val(""); 32 | } 33 | -------------------------------------------------------------------------------- /WebRoot/admin/login.jsp: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | CampusPT 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 24 | 25 | 26 | 27 |
28 |
29 | 32 | 37 |
38 |
39 | 40 | 41 | 43 | 44 | 45 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /WebRoot/admin/orderinfo.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> 2 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 3 | <%@ page isELIgnored="false"%> 4 | 5 | 6 | 7 | 8 | 9 | 10 | CampusPT 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 25 | 26 | 27 | 28 |
29 |
30 |
31 |
32 |
33 |
34 | CampusPT 36 |
37 |
38 |
39 |
40 |
41 | 42 | ${sessionScope.admin.adminName } 43 | 44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 | 52 | 53 | 注销 54 | 55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 | 118 |
119 |
120 |
121 |
122 |
123 |
124 | 125 |
126 |

127 | 所有订单 128 |

129 | 130 | CampusPT 131 | 132 |
133 |
134 | 135 | 136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 | 144 | 146 | 147 | 148 | 150 | 151 | 153 | 154 | 155 | 156 | -------------------------------------------------------------------------------- /WebRoot/user/.gitignore: -------------------------------------------------------------------------------- 1 | /css/ 2 | /fonts/ 3 | /images/ 4 | /js/ 5 | -------------------------------------------------------------------------------- /WebRoot/user/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | user 4 | 5 | 6 | 7 | 8 | 9 | com.aptana.ide.core.unifiedBuilder 10 | 11 | 12 | 13 | 14 | 15 | com.aptana.projects.webnature 16 | 17 | 18 | 19 | 1557293669729 20 | 21 | 26 22 | 23 | org.eclipse.ui.ide.multiFilter 24 | 1.0-name-matches-false-false-node_modules 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /WebRoot/user/css/login_register.css: -------------------------------------------------------------------------------- 1 | #conter_user_info ul{ 2 | padding: 0; 3 | text-align: center; 4 | } 5 | .dropdown-menu{ 6 | min-width: 120px; 7 | } 8 | .divider{ 9 | margin: 0; 10 | } 11 | .register_tips{ 12 | display: none; 13 | } 14 | .slide_banner1{ 15 | background: url(../images/banner4.jpg)no-repeat center center; 16 | background-size: cover; 17 | } 18 | 19 | .slide_banner2{ 20 | background: url(../images/plant.jpg)no-repeat center center; 21 | background-size: cover; 22 | 23 | } 24 | 25 | .slide_banner3{ 26 | background: url(../images/banner1.jpg)no-repeat center center; 27 | background-size: cover; 28 | } 29 | .banner_wrapper{ 30 | height: 100%; 31 | } 32 | #conter_user_info{ 33 | display:none; 34 | } 35 | #login_username_tip{ 36 | display:none; 37 | } 38 | #login_password_tip{ 39 | display:none; 40 | } 41 | 42 | -------------------------------------------------------------------------------- /WebRoot/user/css/storceInfo.css: -------------------------------------------------------------------------------- 1 | .salary { 2 | float: right; 3 | margin-top: 36px; 4 | font-size: 16px; 5 | color: #ccc; 6 | margin-right: 20px; 7 | } 8 | .list_btn { 9 | background-color: #fd8000; 10 | color: #fff; 11 | width: 150px; 12 | text-align: center; 13 | border-radius: 6px; 14 | float: right; 15 | padding: 10px; 16 | } 17 | .list_btn visited{ 18 | color: #fff; 19 | } 20 | .companyInfo li{ 21 | margin-top: 10px; 22 | } 23 | .nav-tab li{ 24 | margin: 0 16px 0 0; 25 | padding: 0; 26 | } 27 | -------------------------------------------------------------------------------- /WebRoot/user/css/update.css: -------------------------------------------------------------------------------- 1 | .fc{ 2 | color: #999999; 3 | font-size: 14px; 4 | line-height: 24px; 5 | } 6 | #fm{ 7 | color: #666666; 8 | } 9 | #fn{ 10 | color: #666666; 11 | } 12 | #fb{ 13 | color: #666666; 14 | } 15 | .more_information{ 16 | font-size: 14px; 17 | color: #4b4b4b; 18 | text-decoration: none; 19 | letter-spacing: -0.48px; 20 | line-height: 24px; 21 | 22 | } 23 | /*.company{ 24 | float: left; 25 | } 26 | .people{ 27 | float: left; 28 | } 29 | .middle-inf{ 30 | float: left; 31 | }*/ 32 | -------------------------------------------------------------------------------- /WebRoot/user/css/userinfo.css: -------------------------------------------------------------------------------- 1 | .userinfo_nav { 2 | background-color: #1e1b29; 3 | color: #a5a4a9; 4 | border-bottom: 1px #2a2639 solid; 5 | } 6 | 7 | .userinfo_nav li { 8 | background-color: #1e1b29; 9 | } 10 | 11 | #conter_user_info { 12 | line-height: 50px; 13 | } 14 | 15 | #conter_user_info a { 16 | margin: 0; 17 | padding: 0; 18 | display: inline; 19 | } 20 | 21 | .userinfo_nav a:hover { 22 | color: #FFFFFF !important; 23 | } 24 | 25 | .bgcolor { 26 | background-color: #1e1b29; 27 | color: #a5a4a9; 28 | height: 120px; 29 | } 30 | 31 | .userinfo_header_img img { 32 | width: 100px; 33 | height: 100px; 34 | border-radius: 50%; 35 | cursor: pointer; 36 | } 37 | 38 | .margin-top-50 { 39 | margin-top: 50px; 40 | } 41 | 42 | .userinfo_header_img_box { 43 | position: relative; 44 | } 45 | 46 | .userinfo_header_img { 47 | width: 220px; 48 | margin: 0 auto; 49 | padding: 10px 60px 10px 60px; 50 | background-color: #22212e; 51 | position: absolute; 52 | left: 50%; 53 | margin-left: -110px; 54 | transition: width 1s; 55 | -moz-transition: width 1s; 56 | /* Firefox 4 */ 57 | -webkit-transition: width 1s; 58 | /* Safari and Chrome */ 59 | -o-transition: width 1s; 60 | /* Opera */ 61 | } 62 | 63 | .userinfo_header_img:hover { 64 | width: 300px; 65 | } 66 | 67 | .userinfo_title h3 { 68 | font-size: 20px; 69 | } 70 | 71 | .nav-tabs>li.active>a, 72 | .nav-tabs>li.active>a:focus, 73 | .nav-tabs>li.active>a:hover { 74 | border: none; 75 | background-color: #F5F5F5; 76 | } 77 | 78 | .nav-tabs>li>a { 79 | border: none; 80 | } 81 | 82 | .nav-tabs { 83 | border: none; 84 | } 85 | 86 | #myTab { 87 | background-color: #f5f5f5; 88 | text-align: center; 89 | border-radius: 6px; 90 | } 91 | 92 | .userinfo_table { 93 | vertical-align: middle; 94 | padding-left: 20px; 95 | } 96 | 97 | .userinfo_table tr { 98 | border-bottom: 1px solid #ededed; 99 | } 100 | 101 | .userinfo_table tr th { 102 | height: 60px; 103 | display: block; 104 | float: left; 105 | width: 100%; 106 | vertical-align: middle; 107 | font-size: 16px; 108 | font-style: normal; 109 | font-weight: 500; 110 | } 111 | .table>tbody>tr>th{ 112 | line-height: 44px; 113 | padding-left: 20px; 114 | } 115 | .userinfo_table tbody tr td { 116 | vertical-align: middle; 117 | color: #999; 118 | } 119 | .table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th, .table>thead>tr>td, .table>thead>tr>th{ 120 | 121 | border: none; 122 | } 123 | .userinfo_change td{ 124 | padding-right: 50px !important; 125 | } 126 | .nav-stacked>li+li{ 127 | padding: 10px 0 10px 0; 128 | } 129 | .modal .modal-body .input-wrapper input { 130 | font-size: 14px; 131 | line-height: 18px; 132 | box-sizing: border-box; 133 | width: 100%; 134 | height: 48px; 135 | padding: 15px 15px; 136 | color: #666; 137 | border: 0; 138 | outline: 0; 139 | } 140 | .modal .modal-body .input-wrapper { 141 | position: relative; 142 | border-bottom: 1px solid #e5e5e5; 143 | } 144 | .modal .modal-body { 145 | padding: 0; 146 | } 147 | .modal .modal-title { 148 | font-size: 16px; 149 | color: #888; 150 | } 151 | .modal .btn-primary { 152 | border: none; 153 | background: #1e90ff; 154 | } 155 | 156 | /*已接单和已发单css*/ 157 | .table_release tr td{ 158 | text-align: center; 159 | vertical-align: middle; 160 | } 161 | #release tr td,#release tr th{ 162 | text-align: center; 163 | vertical-align: middle; 164 | } 165 | 166 | #recOrd tr td,#recOrd tr th{ 167 | text-align: center; 168 | vertical-align: middle; 169 | } 170 | 171 | #receive tr td,#receive tr th{ 172 | text-align: center; 173 | vertical-align: middle; 174 | } 175 | 176 | 177 | .list-group-item{ 178 | height: 55px; 179 | padding-top: 15px; 180 | } 181 | .release_title input{ 182 | width: 90%; 183 | height: 35px; 184 | border: none; 185 | margin-bottom: 15px; 186 | text-align: center; 187 | margin-left: 35px; 188 | } 189 | .release_rec_num input{ 190 | width: 45%; 191 | height: 40px; 192 | float: left; 193 | margin-left: 35px; 194 | margin-bottom: 15px; 195 | border: none; 196 | text-align: center; 197 | } 198 | .release_salary input{ 199 | width: 45%; 200 | height: 40px; 201 | float: left; 202 | margin-bottom: 15px; 203 | border: none; 204 | text-align: center; 205 | } 206 | .release_sid_fropdown select{ 207 | width: 30%; 208 | height:40px; 209 | outline:0; 210 | float: left; 211 | margin-left: 18px; 212 | } 213 | .release_pid_fropdown select{ 214 | width: 30%; 215 | height:40px; 216 | outline:0; 217 | float: left; 218 | margin-left: 10px; 219 | } 220 | .release_pay select{ 221 | width: 30%; 222 | height:40px; 223 | outline:0; 224 | float: left; 225 | margin-left: 10px; 226 | } 227 | .release_descrip textarea{ 228 | width: 90%; 229 | height: 100px; 230 | margin-top: 15px; 231 | margin-bottom: 15px; 232 | margin-left: 30px; 233 | } 234 | 235 | .modal .modal-body .input-wrapper span{ 236 | font-size: 12px; 237 | position: absolute; 238 | top: 15px; 239 | right: 15px; 240 | color: #e74c3c; 241 | } 242 | 243 | .fa fa-star{ 244 | font-size:32px; 245 | } 246 | .starI{ 247 | cursor:pointer; 248 | height:80px; 249 | text-align: center; 250 | vertical-align: middle; 251 | } 252 | .controllerStarColor{ 253 | color:#FFAA00; 254 | } 255 | 256 | 257 | 258 | 259 | -------------------------------------------------------------------------------- /WebRoot/user/fonts/.gitignore: -------------------------------------------------------------------------------- 1 | /lato/ 2 | -------------------------------------------------------------------------------- /WebRoot/user/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /WebRoot/user/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /WebRoot/user/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /WebRoot/user/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /WebRoot/user/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /WebRoot/user/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /WebRoot/user/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /WebRoot/user/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /WebRoot/user/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /WebRoot/user/fonts/icomoon.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/fonts/icomoon.eot -------------------------------------------------------------------------------- /WebRoot/user/fonts/icomoon.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/fonts/icomoon.ttf -------------------------------------------------------------------------------- /WebRoot/user/fonts/icomoon.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/fonts/icomoon.woff -------------------------------------------------------------------------------- /WebRoot/user/fonts/lato/lato-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/fonts/lato/lato-regular.ttf -------------------------------------------------------------------------------- /WebRoot/user/fonts/lato/lato-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/fonts/lato/lato-regular.woff -------------------------------------------------------------------------------- /WebRoot/user/images/11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/11.jpg -------------------------------------------------------------------------------- /WebRoot/user/images/12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/12.jpg -------------------------------------------------------------------------------- /WebRoot/user/images/13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/13.jpg -------------------------------------------------------------------------------- /WebRoot/user/images/14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/14.jpg -------------------------------------------------------------------------------- /WebRoot/user/images/15.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/15.jpg -------------------------------------------------------------------------------- /WebRoot/user/images/16.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/16.jpg -------------------------------------------------------------------------------- /WebRoot/user/images/17.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/17.jpg -------------------------------------------------------------------------------- /WebRoot/user/images/18.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/18.jpg -------------------------------------------------------------------------------- /WebRoot/user/images/19.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/19.jpg -------------------------------------------------------------------------------- /WebRoot/user/images/NavIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/NavIcon.png -------------------------------------------------------------------------------- /WebRoot/user/images/NavIcon1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/NavIcon1.png -------------------------------------------------------------------------------- /WebRoot/user/images/NavIcon2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/NavIcon2.png -------------------------------------------------------------------------------- /WebRoot/user/images/NavIcon3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/NavIcon3.png -------------------------------------------------------------------------------- /WebRoot/user/images/NavIcon4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/NavIcon4.png -------------------------------------------------------------------------------- /WebRoot/user/images/about_title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/about_title.png -------------------------------------------------------------------------------- /WebRoot/user/images/anli_banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/anli_banner.png -------------------------------------------------------------------------------- /WebRoot/user/images/backimg4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/backimg4.jpg -------------------------------------------------------------------------------- /WebRoot/user/images/banner.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/banner.jpg -------------------------------------------------------------------------------- /WebRoot/user/images/banner1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/banner1.jpg -------------------------------------------------------------------------------- /WebRoot/user/images/banner2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/banner2.jpg -------------------------------------------------------------------------------- /WebRoot/user/images/banner3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/banner3.jpg -------------------------------------------------------------------------------- /WebRoot/user/images/banner4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/banner4.jpg -------------------------------------------------------------------------------- /WebRoot/user/images/banner5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/banner5.jpg -------------------------------------------------------------------------------- /WebRoot/user/images/bg2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/bg2x.png -------------------------------------------------------------------------------- /WebRoot/user/images/company_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/company_default.png -------------------------------------------------------------------------------- /WebRoot/user/images/grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/grey.png -------------------------------------------------------------------------------- /WebRoot/user/images/hzdzkj.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/hzdzkj.jpg -------------------------------------------------------------------------------- /WebRoot/user/images/hzsfdx.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/hzsfdx.jpg -------------------------------------------------------------------------------- /WebRoot/user/images/i.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/i.png -------------------------------------------------------------------------------- /WebRoot/user/images/m.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/m.png -------------------------------------------------------------------------------- /WebRoot/user/images/p.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/p.png -------------------------------------------------------------------------------- /WebRoot/user/images/p2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/p2.jpg -------------------------------------------------------------------------------- /WebRoot/user/images/p3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/p3.jpg -------------------------------------------------------------------------------- /WebRoot/user/images/p4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/p4.jpg -------------------------------------------------------------------------------- /WebRoot/user/images/p5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/p5.jpg -------------------------------------------------------------------------------- /WebRoot/user/images/p6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/p6.jpg -------------------------------------------------------------------------------- /WebRoot/user/images/p7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/p7.jpg -------------------------------------------------------------------------------- /WebRoot/user/images/p8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/p8.jpg -------------------------------------------------------------------------------- /WebRoot/user/images/p9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/p9.jpg -------------------------------------------------------------------------------- /WebRoot/user/images/part2-pic12x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/part2-pic12x.png -------------------------------------------------------------------------------- /WebRoot/user/images/part2-pic22x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/part2-pic22x.png -------------------------------------------------------------------------------- /WebRoot/user/images/part5-bg2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/part5-bg2x.png -------------------------------------------------------------------------------- /WebRoot/user/images/plant.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/plant.jpg -------------------------------------------------------------------------------- /WebRoot/user/images/service.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/service.png -------------------------------------------------------------------------------- /WebRoot/user/images/slide1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/slide1.jpg -------------------------------------------------------------------------------- /WebRoot/user/images/slide2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/slide2.jpg -------------------------------------------------------------------------------- /WebRoot/user/images/slide3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/slide3.jpg -------------------------------------------------------------------------------- /WebRoot/user/images/star_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/star_s.png -------------------------------------------------------------------------------- /WebRoot/user/images/userimg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/userimg.jpg -------------------------------------------------------------------------------- /WebRoot/user/images/vip_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/vip_bg.png -------------------------------------------------------------------------------- /WebRoot/user/images/work_banner1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/work_banner1.jpg -------------------------------------------------------------------------------- /WebRoot/user/images/work_banner2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/work_banner2.jpg -------------------------------------------------------------------------------- /WebRoot/user/images/wx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/wx.png -------------------------------------------------------------------------------- /WebRoot/user/images/z.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/z.png -------------------------------------------------------------------------------- /WebRoot/user/images/zhaopin_banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/zhaopin_banner.png -------------------------------------------------------------------------------- /WebRoot/user/images/zj.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/zj.jpg -------------------------------------------------------------------------------- /WebRoot/user/images/zj2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/zj2.jpg -------------------------------------------------------------------------------- /WebRoot/user/images/zj3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/zj3.jpg -------------------------------------------------------------------------------- /WebRoot/user/images/zj4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/zj4.jpg -------------------------------------------------------------------------------- /WebRoot/user/images/zj5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/zj5.jpg -------------------------------------------------------------------------------- /WebRoot/user/images/zj6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/zj6.jpg -------------------------------------------------------------------------------- /WebRoot/user/images/zjgsdx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/zjgsdx.png -------------------------------------------------------------------------------- /WebRoot/user/images/zjlg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/zjlg.jpg -------------------------------------------------------------------------------- /WebRoot/user/images/zjweuedu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxyPostman/port-time/6ef9425db573b054518388a621dd5629130fb68c/WebRoot/user/images/zjweuedu.png -------------------------------------------------------------------------------- /WebRoot/user/js/forum.js: -------------------------------------------------------------------------------- 1 | window.onscroll = function() { 2 | var oScrollToTop = document.getElementById("scrollToTop"); 3 | if (document.documentElement.scrollTop + document.body.scrollTop > 300) { 4 | oScrollToTop.style.display = "block"; 5 | startMove(oScrollToTop, { 6 | opacity: 100 7 | }); 8 | } else { 9 | oScrollToTop.style.display = "none"; 10 | startMove(oScrollToTop, { 11 | opacity: 0 12 | }) 13 | } 14 | } 15 | $('#scrollToTop').click(function() { 16 | $('html,body').animate({ 17 | scrollTop: '0px' 18 | }, 800); 19 | }); 20 | $('[data-toggle="tooltip"]').tooltip(); 21 | $('.btn-quiz').click(function() { 22 | $('#new-quiz').css('display', 'block'); 23 | return false; 24 | }); 25 | $('#quiz-close').click(function() { 26 | $('#new-quiz').css('display', 'none'); 27 | return false; 28 | }); 29 | $('.btn-topic').click(function() { 30 | $('#new-topic').css('display', 'block'); 31 | }); 32 | $('#topic-close').click(function() { 33 | $('#new-topic').css('display', 'none'); 34 | }); 35 | $('.full-screen-btn2').click(function() { 36 | if ($("#icon-btn2").hasClass("glyphicon-chevron-up")) { 37 | $('#text-editor2').css('height', '500'); 38 | $("#icon-btn2").removeClass("glyphicon-chevron-up"); 39 | $("#icon-btn2").addClass("glyphicon-chevron-down"); 40 | } else { 41 | $('#text-editor2').css('height', '250'); 42 | $("#icon-btn2").removeClass("glyphicon-chevron-down"); 43 | $("#icon-btn2").addClass("glyphicon-chevron-up"); 44 | } 45 | }); 46 | $('.full-screen-btn1').click(function() { 47 | if ($("#icon-btn").hasClass("glyphicon-chevron-up")) { 48 | $('#text-editor').css('height', '500'); 49 | $("#icon-btn").removeClass("glyphicon-chevron-up"); 50 | $("#icon-btn").addClass("glyphicon-chevron-down"); 51 | } else { 52 | $('#text-editor').css('height', '250'); 53 | $("#icon-btn").removeClass("glyphicon-chevron-down"); 54 | $("#icon-btn").addClass("glyphicon-chevron-up"); 55 | } 56 | }); 57 | $('input').iCheck({ 58 | checkboxClass: 'icheckbox_minimal-grey', 59 | radioClass: 'iradio_minimal-grey', 60 | increaseArea: '20%' // optional 61 | }); 62 | var editor = new wangEditor('text-editor'); 63 | editor.create(); -------------------------------------------------------------------------------- /WebRoot/user/js/function.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | $('input').iCheck({ 3 | checkboxClass: 'icheckbox_minimal-grey', 4 | radioClass: 'iradio_minimal-grey', 5 | increaseArea: '20%' // optional 6 | }); 7 | $('[data-toggle="tooltip"]').tooltip(); 8 | $(".upload-avatar").click(function() { 9 | $("#upload-main").addClass('animated fadeOutUp'); 10 | $("#upload-main").removeClass('fadeInDown'); 11 | setTimeout(function() { 12 | $("#upload-main").css('display', 'none'); 13 | $("#upload-success").css('display', 'block'); 14 | $("#upload-success").addClass('animated fadeInDown'); 15 | $("#upload-main").removeClass('animated fadeOutUp'); 16 | }, 500); 17 | }); 18 | $(".upload-back").click(function() { 19 | $("#upload-success").removeClass('fadeInDown'); 20 | $("#upload-success").addClass('fadeOutUp'); 21 | setTimeout(function() { 22 | $("#upload-success").css('display', 'none'); 23 | $("#upload-main").css('display', 'block'); 24 | $("#upload-main").addClass('animated fadeInDown'); 25 | $("#upload-success").removeClass('animated fadeOutUp'); 26 | }, 500); 27 | }); 28 | $('#edit-avatar').on('hide.bs.modal', function(e) { 29 | setTimeout(function() { 30 | $("#upload-main").removeClass('animated fadeInDown'); 31 | $("#upload-main").removeClass('animated fadeOutUp'); 32 | $("#upload-success").removeClass('animated fadeOutUp'); 33 | $("#upload-success").removeClass('animated fadeInDown'); 34 | $("#upload-main").css('display', 'block'); 35 | $("#upload-success").css('display', 'none'); 36 | }, 500); 37 | }) 38 | $('.full-screen-btn').click(function() { 39 | if ($("#icon-btn").hasClass("glyphicon-chevron-up")) { 40 | $('#text-editor').css('height', '500'); 41 | $("#icon-btn").removeClass("glyphicon-chevron-up"); 42 | $("#icon-btn").addClass("glyphicon-chevron-down"); 43 | } else { 44 | $('#text-editor').css('height', '250'); 45 | $("#icon-btn").removeClass("glyphicon-chevron-down"); 46 | $("#icon-btn").addClass("glyphicon-chevron-up"); 47 | } 48 | }); 49 | $('.btn-quiz').click(function() { 50 | $('#new-quiz').css('display', 'block'); 51 | }); 52 | $('#quiz-close').click(function() { 53 | $('#new-quiz').css('display', 'none'); 54 | }); 55 | var editor = new wangEditor('text-editor'); 56 | editor.create(); 57 | $.stellar({ 58 | horizontalScrolling: false, 59 | responsive: true 60 | }); 61 | }); -------------------------------------------------------------------------------- /WebRoot/user/js/help.js: -------------------------------------------------------------------------------- 1 | window.onload = function() { 2 | // Swiper 3 | var mainSwiper = new Swiper('#swiper-main', { 4 | mode: 'vertical', 5 | mousewheelControl: true, 6 | resistance: '100%', 7 | keyboardControl: true, 8 | speed: 800, 9 | onFirstInit: function(swiper) { 10 | swiperAnimateCache(swiper); //隐藏动画元素 11 | swiperAnimate(swiper); //初始化完成开始动画 12 | }, 13 | onSlideChangeEnd: function(swiper) { 14 | swiperAnimate(swiper); //每个slide切换结束时也运行当前slide动画 15 | if (mainSwiper.slides[1].isActive()) { 16 | setTimeout(function() { 17 | $("#resource-contain").addClass("active"); 18 | }, 800); 19 | } else { 20 | $("#resource-contain").removeClass("active"); 21 | } 22 | }, 23 | }); 24 | $("#arrow").click(function() { 25 | mainSwiper.swipeNext(); 26 | }); 27 | } -------------------------------------------------------------------------------- /WebRoot/user/js/jquery.scrollTo.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * jquery.scrollTo.min.js 3 | */ 4 | ;(function(f){"use strict";"function"===typeof define&&define.amd?define(["jquery"],f):"undefined"!==typeof module&&module.exports?module.exports=f(require("jquery")):f(jQuery)})(function($){"use strict";function n(a){return!a.nodeName||-1!==$.inArray(a.nodeName.toLowerCase(),["iframe","#document","html","body"])}function h(a){return $.isFunction(a)||$.isPlainObject(a)?a:{top:a,left:a}}var p=$.scrollTo=function(a,d,b){return $(window).scrollTo(a,d,b)};p.defaults={axis:"xy",duration:0,limit:!0};$.fn.scrollTo=function(a,d,b){"object"=== typeof d&&(b=d,d=0);"function"===typeof b&&(b={onAfter:b});"max"===a&&(a=9E9);b=$.extend({},p.defaults,b);d=d||b.duration;var u=b.queue&&1=f[g]?0:Math.min(f[g],n));!a&&1 lastScrollTop) { 19 | scrollDir = "down" 20 | } else { 21 | scrollDir = "up" 22 | } 23 | lastScrollTop = st 24 | }); 25 | $.fn.stickUp = function(options) { 26 | $(this).addClass("stuckMenu"); 27 | var objn = 0; 28 | if (options != null) { 29 | for (var o in options.parts) { 30 | if (options.parts.hasOwnProperty(o)) { 31 | content[objn] = options.parts[objn]; 32 | objn++ 33 | } 34 | } 35 | if (objn == 0) { 36 | console.log("error:needs arguments") 37 | } 38 | itemClass = options.itemClass; 39 | itemHover = options.itemHover; 40 | if (options.topMargin != null) { 41 | if (options.topMargin == "auto") { 42 | topMargin = parseInt($(".stuckMenu").css("margin-top")) 43 | } else { 44 | if (isNaN(options.topMargin) && options.topMargin.search("px") > 0) { 45 | topMargin = parseInt(options.topMargin.replace("px", "")) 46 | } else { 47 | if (!isNaN(parseInt(options.topMargin))) { 48 | topMargin = parseInt(options.topMargin) 49 | } else { 50 | console.log("incorrect argument, ignored."); 51 | topMargin = 0 52 | } 53 | } 54 | } 55 | } else { 56 | topMargin = 0 57 | } 58 | menuSize = $("." + itemClass).size() 59 | } 60 | stickyHeight = parseInt($(this).height()); 61 | stickyMarginB = parseInt($(this).css("margin-bottom")); 62 | currentMarginT = parseInt($(this).next().closest("div").css("margin-top")); 63 | vartop = parseInt($(this).offset().top) 64 | }; 65 | $(document).on("scroll", function() { 66 | varscroll = parseInt($(document).scrollTop()); 67 | if (menuSize != null) { 68 | for (var i = 0; i < menuSize; i++) { 69 | contentTop[i] = $("#" + content[i] + "").offset().top; 70 | 71 | function bottomView(i) { 72 | contentView = $("#" + content[i] + "").height() * 0.4; 73 | testView = contentTop[i] - contentView; 74 | if (varscroll > testView) { 75 | $("." + itemClass).removeClass(itemHover); 76 | $("." + itemClass + ":eq(" + i + ")").addClass(itemHover) 77 | } else { 78 | if (varscroll < 50) { 79 | $("." + itemClass).removeClass(itemHover); 80 | $("." + itemClass + ":eq(0)").addClass(itemHover) 81 | } 82 | } 83 | } 84 | if (scrollDir == "down" && varscroll > contentTop[i] - 50 && varscroll < contentTop[i] + 50) { 85 | $("." + itemClass).removeClass(itemHover); 86 | $("." + itemClass + ":eq(" + i + ")").addClass(itemHover) 87 | } 88 | if (scrollDir == "up") { 89 | bottomView(i) 90 | } 91 | } 92 | } 93 | if (vartop < varscroll + topMargin) { 94 | $(".stuckMenu").addClass("isStuck"); 95 | $(".stuckMenu").next().closest("div").css({ 96 | "margin-top": stickyHeight + stickyMarginB + currentMarginT + "px" 97 | }, 10); 98 | $(".stuckMenu").css("position", "fixed"); 99 | $(".isStuck").css({ 100 | top: "66px" 101 | }, 10, function() {}) 102 | } 103 | if (varscroll + topMargin < vartop) { 104 | $(".stuckMenu").removeClass("isStuck"); 105 | $(".stuckMenu").next().closest("div").css({ 106 | "margin-top": currentMarginT + "px" 107 | }, 10); 108 | $(".stuckMenu").css("position", "static") 109 | } 110 | }) 111 | $('.nav-tab').stickUp(); 112 | $(".exchange").click(function() { 113 | $.scrollTo('body', 500); 114 | }); 115 | $(".water").click(function() { 116 | $.scrollTo('body', 500); 117 | }); 118 | }) 119 | }); -------------------------------------------------------------------------------- /WebRoot/user/js/storeinfo.js: -------------------------------------------------------------------------------- 1 | $(function(){ 2 | //设置评分星星宽度 3 | console.log(parseFloat($("#score_num").text().trim())/5); 4 | var width=parseFloat($("#score_num").text().trim())/5*100+"%"; 5 | $("#star").width(width); 6 | }); 7 | -------------------------------------------------------------------------------- /src/.gitignore: -------------------------------------------------------------------------------- 1 | /controller/ 2 | /dao/ 3 | /entity/ 4 | /service/ 5 | /utils/ 6 | -------------------------------------------------------------------------------- /src/controller/AllReleaseServlet.java: -------------------------------------------------------------------------------- 1 | package controller; 2 | 3 | import java.io.IOException; 4 | import java.io.PrintWriter; 5 | import java.util.ArrayList; 6 | import java.util.List; 7 | 8 | import javax.servlet.ServletException; 9 | import javax.servlet.http.HttpServlet; 10 | import javax.servlet.http.HttpServletRequest; 11 | import javax.servlet.http.HttpServletResponse; 12 | 13 | import dao.ReleaseOrdersDAO; 14 | import entity.Position; 15 | import entity.ReleaseOrders; 16 | import entity.School; 17 | import service.PositionService; 18 | import service.ReleaseOrdersService; 19 | import service.SchoolService; 20 | import service.impl.PositionServiceImpl; 21 | import service.impl.ReleaseOrdersServiceImpl; 22 | import service.impl.SchoolServiceImpl; 23 | import utils.PageBean; 24 | 25 | public class AllReleaseServlet extends HttpServlet { 26 | private final String PAGESIZE="5"; 27 | 28 | public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 29 | 30 | doPost(request, response); 31 | 32 | 33 | 34 | } 35 | 36 | 37 | public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 38 | 39 | request.setCharacterEncoding("utf-8"); 40 | String currentPage=request.getParameter("currentPage"); 41 | String pageSize=request.getParameter("pageSize"); 42 | int iCurrentPage=1; 43 | int iPageSize=5; 44 | if(currentPage!=null){ 45 | iCurrentPage=Integer.parseInt(currentPage); 46 | } 47 | if(pageSize==null){ 48 | pageSize=PAGESIZE; 49 | } 50 | 51 | 52 | 53 | 54 | 55 | ReleaseOrdersService releaseOrdersService = new ReleaseOrdersServiceImpl(); 56 | PositionService positionService = new PositionServiceImpl(); 57 | SchoolService schoolService = new SchoolServiceImpl(); 58 | List schoolList = schoolService.findAll(); 59 | List positionList = positionService.findAll(); 60 | //List ordersList =releaseOrdersService.findAllByPage(iCurrentPage, iPageSize); 61 | 62 | PageBean pb = null ; 63 | Position position = null; 64 | School school = null; 65 | String sname = request.getParameter("sname"); 66 | String pname =request.getParameter("pname"); 67 | String title=request.getParameter("title"); 68 | if(sname==null){ 69 | sname=""; 70 | } 71 | if(pname==null) 72 | pname=""; 73 | 74 | if(title==null){ 75 | title=""; 76 | } 77 | if(sname!=""&&pname!=""){ 78 | position =positionService.findPositionByName(pname); 79 | school =schoolService.findBySname(sname); 80 | pb=releaseOrdersService.findBySiPiTiPageBean(school.getSid(), position.getPid(), title,iCurrentPage, iPageSize); 81 | } 82 | if(pname!="" && sname==""){ 83 | position =positionService.findPositionByName(pname); 84 | pb=releaseOrdersService.findByPiTiPageBean( position.getPid(),title, iCurrentPage, iPageSize); 85 | } 86 | if(pname=="" && sname!=""){ 87 | 88 | school =schoolService.findBySname(sname); 89 | System.out.println(school); 90 | pb=releaseOrdersService.findBySiTiPageBean(school.getSid(), title, iCurrentPage, iPageSize); 91 | } 92 | if(pname=="" && sname==""){ 93 | pb=releaseOrdersService.findByTitlePageBean(title, iCurrentPage, iPageSize); 94 | } 95 | 96 | //request.setAttribute("currentPage", currentPage); 97 | request.setAttribute("position", position); 98 | request.setAttribute("title", title); 99 | request.setAttribute("school", school); 100 | request.setAttribute("PageBean", pb); 101 | request.setAttribute("schoolList", schoolList); 102 | request.setAttribute("positionList", positionList); 103 | request.getRequestDispatcher("resource-index.jsp").forward(request, response); 104 | 105 | } 106 | 107 | } 108 | -------------------------------------------------------------------------------- /src/controller/ChangePwdServlet.java: -------------------------------------------------------------------------------- 1 | package controller; 2 | 3 | import java.io.IOException; 4 | import java.io.PrintWriter; 5 | 6 | import javax.servlet.ServletException; 7 | import javax.servlet.http.HttpServlet; 8 | import javax.servlet.http.HttpServletRequest; 9 | import javax.servlet.http.HttpServletResponse; 10 | 11 | import com.fasterxml.jackson.databind.ObjectMapper; 12 | 13 | import dao.ZhCN_to16; 14 | import entity.JsonMsg; 15 | import entity.User; 16 | import service.UserService; 17 | import service.impl.UserServiceImpl; 18 | 19 | public class ChangePwdServlet extends HttpServlet { 20 | 21 | /** 22 | * The doGet method of the servlet.
23 | * 24 | * This method is called when a form has its tag value method equals to get. 25 | * 26 | * @param request the request send by the client to the server 27 | * @param response the response send by the server to the client 28 | * @throws ServletException if an error occurred 29 | * @throws IOException if an error occurred 30 | */ 31 | public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 32 | 33 | response.setContentType("text/html"); 34 | PrintWriter out = response.getWriter(); 35 | out.println(""); 36 | out.println(""); 37 | out.println(" A Servlet"); 38 | out.println(" "); 39 | out.print(" This is "); 40 | out.print(this.getClass()); 41 | out.println(", using the GET method"); 42 | out.println(" "); 43 | out.println(""); 44 | out.flush(); 45 | out.close(); 46 | } 47 | 48 | /** 49 | * The doPost method of the servlet.
50 | * 51 | * This method is called when a form has its tag value method equals to post. 52 | * 53 | * @param request the request send by the client to the server 54 | * @param response the response send by the server to the client 55 | * @throws ServletException if an error occurred 56 | * @throws IOException if an error occurred 57 | */ 58 | public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 59 | 60 | response.setContentType("text/html"); 61 | response.setCharacterEncoding("utf-8"); 62 | PrintWriter out = response.getWriter(); 63 | UserService userService = new UserServiceImpl(); 64 | 65 | String input_new_pwd=request.getParameter("input_new_pwd"); 66 | String input_new_pwd1=request.getParameter("input_new_pwd1"); 67 | String password=request.getParameter("password"); 68 | Integer uid = Integer.parseInt(request.getParameter("uid")); 69 | User user = userService.findUserById(uid); 70 | JsonMsg jsonMsg=null; 71 | if(!user.getPassword().equals(password)){ 72 | jsonMsg = JsonMsg.makeFail("原密码错误!请重试!", null); 73 | jsonMsg.setData(1); 74 | }else if(input_new_pwd==""){ 75 | jsonMsg = JsonMsg.makeFail("新密码不能为空!", null); 76 | jsonMsg.setData(2); 77 | } 78 | else if(!input_new_pwd.equals(input_new_pwd1)){ 79 | jsonMsg = JsonMsg.makeFail("两次输入密码不同!请重试!", null); 80 | jsonMsg.setData(3); 81 | }else if(input_new_pwd.equals(password)){ 82 | jsonMsg = JsonMsg.makeFail("新密码与旧密码相同!请重试!", null); 83 | jsonMsg.setData(4); 84 | }else{ 85 | boolean isok = userService.updatePwd(uid,input_new_pwd); 86 | 87 | if(isok){ 88 | jsonMsg=JsonMsg.makeSuccess("修改密码成功",null); 89 | }else{ 90 | jsonMsg=JsonMsg.makeFail("修改密码失败", null); 91 | 92 | } 93 | } 94 | // 序列化jsonMsg 95 | ObjectMapper objectMapper = new ObjectMapper(); 96 | String writeValueAsString = objectMapper.writeValueAsString(jsonMsg); 97 | out.println(ZhCN_to16.Aescape(writeValueAsString)); 98 | 99 | } 100 | 101 | } 102 | -------------------------------------------------------------------------------- /src/controller/CheckServlet.java: -------------------------------------------------------------------------------- 1 | package controller; 2 | 3 | import java.io.IOException; 4 | import java.io.PrintWriter; 5 | 6 | import javax.servlet.ServletException; 7 | import javax.servlet.http.HttpServlet; 8 | import javax.servlet.http.HttpServletRequest; 9 | import javax.servlet.http.HttpServletResponse; 10 | import javax.servlet.http.HttpSession; 11 | 12 | import com.fasterxml.jackson.databind.ObjectMapper; 13 | 14 | import entity.Admin; 15 | import entity.JsonMsg; 16 | import entity.User; 17 | import service.AdminService; 18 | import service.UserService; 19 | import service.impl.AdminServiceImpl; 20 | import service.impl.UserServiceImpl; 21 | 22 | public class CheckServlet extends HttpServlet { 23 | 24 | /** 25 | * The doGet method of the servlet.
26 | * 27 | * This method is called when a form has its tag value method equals to get. 28 | * 29 | * @param request the request send by the client to the server 30 | * @param response the response send by the server to the client 31 | * @throws ServletException if an error occurred 32 | * @throws IOException if an error occurred 33 | */ 34 | public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 35 | 36 | doPost(request, response); 37 | } 38 | 39 | /** 40 | * The doPost method of the servlet.
41 | * 42 | * This method is called when a form has its tag value method equals to post. 43 | * 44 | * @param request the request send by the client to the server 45 | * @param response the response send by the server to the client 46 | * @throws ServletException if an error occurred 47 | * @throws IOException if an error occurred 48 | */ 49 | public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 50 | 51 | /* 允许跨域的主机地址 */ 52 | response.setHeader("Access-Control-Allow-Origin", "*"); 53 | /* 允许跨域的请求方法GET, POST, HEAD 等 */ 54 | response.setHeader("Access-Control-Allow-Methods", "*"); 55 | /* 重新预检验跨域的缓存时间 (s) */ 56 | response.setHeader("Access-Control-Max-Age", "3600"); 57 | /* 允许跨域的请求头 */ 58 | response.setHeader("Access-Control-Allow-Headers", "*"); 59 | /* 是否携带cookie */ 60 | response.setHeader("Access-Control-Allow-Credentials", "true"); 61 | 62 | response.setContentType("text/html"); 63 | response.setCharacterEncoding("utf-8"); 64 | PrintWriter out=response.getWriter(); 65 | String phone=request.getParameter("register_phone"); 66 | String op = request.getParameter("op"); 67 | 68 | 69 | UserService userService=new UserServiceImpl(); 70 | JsonMsg jsonMsg = null; 71 | if(op.equals("check_phone")){ 72 | 73 | boolean isok = userService.countByPhone(phone); 74 | if(phone==null){ 75 | jsonMsg=JsonMsg.makeFail("请填写手机号码", null); 76 | }else{ 77 | if(isok){ 78 | jsonMsg=JsonMsg.makeSuccess("",null); 79 | }else{ 80 | jsonMsg=JsonMsg.makeFail("该号码已被注册!请更换", null); 81 | } 82 | } 83 | 84 | }else if(op.equals("check_un")){ 85 | String username = request.getParameter("username"); 86 | String password = request.getParameter("password"); 87 | User user = userService.findUserByUsername(username); 88 | if (user != null) { 89 | if (user.getPassword().equals(password)) { 90 | //user.setPassword(null); 91 | // 取得session 92 | HttpSession session = request.getSession(); 93 | session.setAttribute("user", user); 94 | jsonMsg = JsonMsg.makeSuccess("成功", user); 95 | } else { 96 | // 密码输错 97 | jsonMsg = JsonMsg.makeFail("用户名或密码错误!请重试!", null); 98 | } 99 | } else { 100 | System.out.println("没找到! "); 101 | // 没有找到该用户 102 | jsonMsg = JsonMsg.makeFail("用户名或密码错误!请重试!", null); 103 | } 104 | }else if(op.equals("check_run")){ 105 | String username=request.getParameter("register_username"); 106 | boolean b = userService.countByUserName(username); 107 | if(b){ 108 | jsonMsg=JsonMsg.makeSuccess("",null); 109 | }else{ 110 | jsonMsg=JsonMsg.makeFail("该用户名已被占用!", null); 111 | } 112 | }else if(op.equals("check_an")){ //管理员登录 113 | String adminname = request.getParameter("adminname"); 114 | String password = request.getParameter("password"); 115 | AdminService adminService=new AdminServiceImpl(); 116 | Admin admin = adminService.findByAdminname(adminname); 117 | if(admin!=null){ 118 | if(admin.getPassword().equals(password)){ 119 | admin.setPassword(""); 120 | HttpSession session = request.getSession(); 121 | session.setAttribute("admin", admin); 122 | jsonMsg = JsonMsg.makeSuccess("登录成功", admin); 123 | } else { 124 | // 密码输错 125 | jsonMsg = JsonMsg.makeFail("用户名或密码错误!请重试!", null); 126 | } 127 | } else { 128 | System.out.println("没找到! "); 129 | // 没有找到该用户 130 | jsonMsg = JsonMsg.makeFail("用户名或密码错误!请重试!", null); 131 | } 132 | } 133 | 134 | 135 | //序列化 136 | ObjectMapper objectMapper=new ObjectMapper(); 137 | String writeVaString=objectMapper.writeValueAsString(jsonMsg); 138 | out.println(writeVaString); 139 | out.flush(); 140 | out.close(); 141 | } 142 | 143 | } 144 | -------------------------------------------------------------------------------- /src/controller/GetSession_login.java: -------------------------------------------------------------------------------- 1 | package controller; 2 | 3 | import java.io.IOException; 4 | import java.io.PrintWriter; 5 | 6 | import javax.servlet.ServletException; 7 | import javax.servlet.http.HttpServlet; 8 | import javax.servlet.http.HttpServletRequest; 9 | import javax.servlet.http.HttpServletResponse; 10 | import javax.servlet.http.HttpSession; 11 | 12 | import com.fasterxml.jackson.databind.ObjectMapper; 13 | 14 | import dao.ZhCN_to16; 15 | import entity.User; 16 | 17 | public class GetSession_login extends HttpServlet { 18 | public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 19 | doPost(request, response); 20 | } 21 | 22 | public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 23 | 24 | /* 允许跨域的主机地址 */ 25 | response.setHeader("Access-Control-Allow-Origin", "*"); 26 | /* 允许跨域的请求方法GET, POST, HEAD 等 */ 27 | response.setHeader("Access-Control-Allow-Methods", "*"); 28 | /* 重新预检验跨域的缓存时间 (s) */ 29 | response.setHeader("Access-Control-Max-Age", "3600"); 30 | /* 允许跨域的请求头 */ 31 | response.setHeader("Access-Control-Allow-Headers", "*"); 32 | /* 是否携带cookie */ 33 | response.setHeader("Access-Control-Allow-Credentials", "true"); 34 | 35 | response.setContentType("text/html"); 36 | HttpSession session = request.getSession(); 37 | PrintWriter out = response.getWriter(); 38 | Object o = session.getAttribute("user"); 39 | if (o != null) { 40 | User user = (User) o; 41 | ObjectMapper objectMapper = new ObjectMapper(); 42 | String writeValueAsString = objectMapper.writeValueAsString(user); 43 | out.println(ZhCN_to16.Aescape(writeValueAsString)); 44 | } else { 45 | out.println(400); 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/controller/LogoutServlet.java: -------------------------------------------------------------------------------- 1 | package controller; 2 | 3 | import java.io.IOException; 4 | import java.io.PrintWriter; 5 | 6 | import javax.servlet.ServletException; 7 | import javax.servlet.http.HttpServlet; 8 | import javax.servlet.http.HttpServletRequest; 9 | import javax.servlet.http.HttpServletResponse; 10 | import javax.servlet.http.HttpSession; 11 | 12 | public class LogoutServlet extends HttpServlet { 13 | 14 | /** 15 | * The doGet method of the servlet.
16 | * 17 | * This method is called when a form has its tag value method equals to get. 18 | * 19 | * @param request the request send by the client to the server 20 | * @param response the response send by the server to the client 21 | * @throws ServletException if an error occurred 22 | * @throws IOException if an error occurred 23 | */ 24 | public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 25 | 26 | doPost(request, response); 27 | } 28 | 29 | /** 30 | * The doPost method of the servlet.
31 | * 32 | * This method is called when a form has its tag value method equals to post. 33 | * 34 | * @param request the request send by the client to the server 35 | * @param response the response send by the server to the client 36 | * @throws ServletException if an error occurred 37 | * @throws IOException if an error occurred 38 | */ 39 | public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 40 | String op = request.getParameter("op"); 41 | 42 | HttpSession session = request.getSession(); 43 | if(op.equals("logout_user")){ 44 | session.setAttribute("user", null); 45 | // request.getRequestDispatcher("index.jsp").forward(request, response); 46 | response.sendRedirect("index.jsp"); 47 | }else if(op.equals("logout_admin")){ 48 | session.setAttribute("admin", null); 49 | // request.getRequestDispatcher("index.jsp").forward(request, response); 50 | response.sendRedirect("login.jsp"); 51 | } 52 | 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /src/controller/OrderDetailServlet.java: -------------------------------------------------------------------------------- 1 | package controller; 2 | 3 | import java.io.IOException; 4 | import java.io.PrintWriter; 5 | 6 | import javax.servlet.ServletException; 7 | import javax.servlet.http.HttpServlet; 8 | import javax.servlet.http.HttpServletRequest; 9 | import javax.servlet.http.HttpServletResponse; 10 | import javax.servlet.http.HttpSession; 11 | import javax.swing.JOptionPane; 12 | 13 | import com.fasterxml.jackson.databind.ObjectMapper; 14 | 15 | import dao.ZhCN_to16; 16 | import entity.ReleaseOrders; 17 | import entity.User; 18 | import service.ReleaseOrdersService; 19 | import service.impl.ReleaseOrdersServiceImpl; 20 | 21 | public class OrderDetailServlet extends HttpServlet { 22 | 23 | /** 24 | * The doGet method of the servlet.
25 | * 26 | * This method is called when a form has its tag value method equals to get. 27 | * 28 | * @param request the request send by the client to the server 29 | * @param response the response send by the server to the client 30 | * @throws ServletException if an error occurred 31 | * @throws IOException if an error occurred 32 | */ 33 | public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 34 | 35 | doPost(request, response); 36 | } 37 | 38 | /** 39 | * The doPost method of the servlet.
40 | * 41 | * This method is called when a form has its tag value method equals to post. 42 | * 43 | * @param request the request send by the client to the server 44 | * @param response the response send by the server to the client 45 | * @throws ServletException if an error occurred 46 | * @throws IOException if an error occurred 47 | */ 48 | public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 49 | 50 | ReleaseOrdersService releaseOrdersService = new ReleaseOrdersServiceImpl(); 51 | String oid = request.getParameter("orderId"); 52 | ReleaseOrders releaseOrders = releaseOrdersService.findById(Integer.parseInt(oid)); 53 | request.setAttribute("rOrder", releaseOrders); 54 | 55 | 56 | response.setCharacterEncoding("UTF-8"); 57 | response.setContentType("text/html"); 58 | request.setAttribute("rOrder", releaseOrders); 59 | request.getRequestDispatcher("order-detail.jsp").forward(request, response); 60 | 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /src/controller/RegisterServlet.java: -------------------------------------------------------------------------------- 1 | package controller; 2 | 3 | import java.io.IOException; 4 | import java.io.PrintWriter; 5 | import java.util.List; 6 | import java.util.Random; 7 | 8 | import javax.servlet.ServletException; 9 | import javax.servlet.http.HttpServlet; 10 | import javax.servlet.http.HttpServletRequest; 11 | import javax.servlet.http.HttpServletResponse; 12 | 13 | import com.fasterxml.jackson.databind.ObjectMapper; 14 | 15 | 16 | import duanxin.Duanxin; 17 | import entity.JsonMsg; 18 | import entity.Position; 19 | import entity.School; 20 | import entity.User; 21 | import service.PositionService; 22 | import service.SchoolService; 23 | import service.UserService; 24 | import service.impl.PositionServiceImpl; 25 | import service.impl.SchoolServiceImpl; 26 | import service.impl.UserServiceImpl; 27 | 28 | public class RegisterServlet extends HttpServlet { 29 | 30 | /** 31 | * The doGet method of the servlet.
32 | * 33 | * This method is called when a form has its tag value method equals to get. 34 | * 35 | * @param request the request send by the client to the server 36 | * @param response the response send by the server to the client 37 | * @throws ServletException if an error occurred 38 | * @throws IOException if an error occurred 39 | */ 40 | public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 41 | 42 | doPost(request, response); 43 | } 44 | 45 | /** 46 | * The doPost method of the servlet.
47 | * 48 | * This method is called when a form has its tag value method equals to post. 49 | * 50 | * @param request the request send by the client to the server 51 | * @param response the response send by the server to the client 52 | * @throws ServletException if an error occurred 53 | * @throws IOException if an error occurred 54 | */ 55 | public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 56 | 57 | SchoolService schoolService=new SchoolServiceImpl(); 58 | 59 | String op = request.getParameter("op"); 60 | 61 | response.setContentType("text/html"); 62 | response.setCharacterEncoding("UTF-8"); 63 | PrintWriter out=response.getWriter(); 64 | request.setCharacterEncoding("utf-8"); 65 | // 读取参数 66 | String username = request.getParameter("register_username"); 67 | String password = request.getParameter("register_password"); 68 | String sname=request.getParameter("register_school"); 69 | String register_phone=request.getParameter("register_phone"); 70 | School school = schoolService.findBySname(sname); 71 | JsonMsg jsonMsg=null; 72 | 73 | if(op==null){ 74 | User user = new User(0, school, username, password, "", register_phone, "", 90, 0, 0); 75 | UserService userService=new UserServiceImpl(); 76 | boolean isok = userService.addUser(user); 77 | if(isok){ 78 | jsonMsg=JsonMsg.makeSuccess("恭喜你,注册成功!",null); 79 | } else { 80 | jsonMsg=JsonMsg.makeFail("注册失败!",null); 81 | } 82 | ObjectMapper objectMapper=new ObjectMapper(); 83 | String ss=objectMapper.writeValueAsString(jsonMsg); 84 | out.println(ss); 85 | }else if(op.equals("getphone")){ 86 | String phone=request.getParameter("phone"); 87 | String cap=""; 88 | Random random=new Random(); 89 | for(int i=0;i<4;i++){ 90 | int t=random.nextInt(10); 91 | cap+=String.valueOf(t); 92 | } 93 | Duanxin.sendOne("您的注册", cap, phone); 94 | ObjectMapper objectMapper=new ObjectMapper(); 95 | String writeVaString=objectMapper.writeValueAsString(cap); 96 | out.println(writeVaString); 97 | }else if(op.equals("getschool")){ 98 | List list = schoolService.findAll(); 99 | jsonMsg=JsonMsg.makeSuccess("查找完成", list); 100 | ObjectMapper objectMapper=new ObjectMapper(); 101 | String writeValueAsString = objectMapper.writeValueAsString(list); 102 | out.println(writeValueAsString); 103 | }else if(op.equals("getposition")){ 104 | PositionService positionService=new PositionServiceImpl(); 105 | List list = positionService.findAll(); 106 | jsonMsg=JsonMsg.makeSuccess("查找成功", list); 107 | ObjectMapper objectMapper=new ObjectMapper(); 108 | String writeValueAsString = objectMapper.writeValueAsString(list); 109 | out.println(writeValueAsString); 110 | } 111 | 112 | out.flush(); 113 | out.close(); 114 | 115 | } 116 | 117 | } 118 | -------------------------------------------------------------------------------- /src/controller/SignUpServlet.java: -------------------------------------------------------------------------------- 1 | package controller; 2 | 3 | import java.io.IOException; 4 | import java.io.PrintWriter; 5 | import java.text.SimpleDateFormat; 6 | import java.util.Date; 7 | 8 | import javax.servlet.ServletException; 9 | import javax.servlet.http.HttpServlet; 10 | import javax.servlet.http.HttpServletRequest; 11 | import javax.servlet.http.HttpServletResponse; 12 | 13 | import com.fasterxml.jackson.databind.ObjectMapper; 14 | 15 | import entity.JsonMsg; 16 | import entity.ReceiveOrders; 17 | import entity.ReleaseOrders; 18 | import entity.User; 19 | import service.ReceiveOrdersService; 20 | import service.ReleaseOrdersService; 21 | import service.UserService; 22 | import service.impl.ReceiveOrdersServiceImpl; 23 | import service.impl.ReleaseOrdersServiceImpl; 24 | import service.impl.UserServiceImpl; 25 | 26 | public class SignUpServlet extends HttpServlet { 27 | 28 | /** 29 | * The doGet method of the servlet.
30 | * 31 | * This method is called when a form has its tag value method equals to get. 32 | * 33 | * @param request the request send by the client to the server 34 | * @param response the response send by the server to the client 35 | * @throws ServletException if an error occurred 36 | * @throws IOException if an error occurred 37 | */ 38 | public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 39 | 40 | doPost(request, response); 41 | } 42 | 43 | /** 44 | * The doPost method of the servlet.
45 | * 46 | * This method is called when a form has its tag value method equals to post. 47 | * 48 | * @param request the request send by the client to the server 49 | * @param response the response send by the server to the client 50 | * @throws ServletException if an error occurred 51 | * @throws IOException if an error occurred 52 | */ 53 | public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 54 | 55 | response.setContentType("text/html"); 56 | response.setCharacterEncoding("utf-8"); 57 | PrintWriter out=response.getWriter(); 58 | ReceiveOrdersService receiveOrdersService = new ReceiveOrdersServiceImpl(); 59 | ReleaseOrdersService releaseOrdersService = new ReleaseOrdersServiceImpl(); 60 | UserService userService = new UserServiceImpl(); 61 | 62 | String uid=request.getParameter("uid"); 63 | Integer oid =Integer.parseInt(request.getParameter("oid")); 64 | ReleaseOrders releaseOrders = releaseOrdersService.findById(oid); 65 | JsonMsg jsonMsg; 66 | if(uid==""){ 67 | jsonMsg=JsonMsg.makeFail("请先登录", null); 68 | jsonMsg.setData(1); 69 | }else{ 70 | User user = userService.findUserById(Integer.parseInt(uid)); 71 | boolean isOne = receiveOrdersService.findByUOid(Integer.parseInt(uid), oid); 72 | //我要获取当前的日期 73 | Date date = new Date(); 74 | //设置要获取到什么样的时间 75 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); 76 | 77 | ReceiveOrders receiveOrders = new ReceiveOrders(0, releaseOrders, user, 0, sdf.format(date)); 78 | if(isOne){ 79 | jsonMsg=JsonMsg.makeFail("您已报名,不需要重复报名!", null); 80 | }else{ 81 | boolean isok = receiveOrdersService.save(receiveOrders); 82 | if(isok){ 83 | jsonMsg=JsonMsg.makeSuccess("报名成功!",null); 84 | }else{ 85 | jsonMsg=JsonMsg.makeFail("报名失败!", null); 86 | } 87 | } 88 | } 89 | 90 | 91 | //序列化 92 | ObjectMapper objectMapper=new ObjectMapper(); 93 | String writeVaString=objectMapper.writeValueAsString(jsonMsg); 94 | out.println(writeVaString); 95 | out.flush(); 96 | out.close(); 97 | } 98 | 99 | } 100 | -------------------------------------------------------------------------------- /src/controller/StoreInfoServlet.java: -------------------------------------------------------------------------------- 1 | package controller; 2 | 3 | import java.io.IOException; 4 | import java.io.PrintWriter; 5 | import java.util.List; 6 | 7 | import javax.servlet.ServletException; 8 | import javax.servlet.http.HttpServlet; 9 | import javax.servlet.http.HttpServletRequest; 10 | import javax.servlet.http.HttpServletResponse; 11 | 12 | import dao.ReleaseOrdersDAO; 13 | import entity.ReleaseOrders; 14 | import entity.User; 15 | import service.ReleaseOrdersService; 16 | import service.UserService; 17 | import service.impl.ReleaseOrdersServiceImpl; 18 | import service.impl.UserServiceImpl; 19 | 20 | public class StoreInfoServlet extends HttpServlet { 21 | 22 | /** 23 | * The doGet method of the servlet.
24 | * 25 | * This method is called when a form has its tag value method equals to get. 26 | * 27 | * @param request the request send by the client to the server 28 | * @param response the response send by the server to the client 29 | * @throws ServletException if an error occurred 30 | * @throws IOException if an error occurred 31 | */ 32 | public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 33 | 34 | doPost(request, response); 35 | } 36 | 37 | /** 38 | * The doPost method of the servlet.
39 | * 40 | * This method is called when a form has its tag value method equals to post. 41 | * 42 | * @param request the request send by the client to the server 43 | * @param response the response send by the server to the client 44 | * @throws ServletException if an error occurred 45 | * @throws IOException if an error occurred 46 | */ 47 | public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 48 | 49 | Integer uid = Integer.parseInt(request.getParameter("uid")); 50 | ReleaseOrdersService releaseOrdersService = new ReleaseOrdersServiceImpl(); 51 | UserService userService = new UserServiceImpl(); 52 | User user = userService.findUserById(uid); 53 | int count =releaseOrdersService.countByUid(uid); 54 | List threeOrdersList=releaseOrdersService.findThree(uid); 55 | request.setAttribute("list", threeOrdersList); 56 | request.setAttribute("user", user); 57 | request.setAttribute("count", count); 58 | request.getRequestDispatcher("storeinfo.jsp").forward(request, response); 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /src/controller/UserInfoServlet.java: -------------------------------------------------------------------------------- 1 | package controller; 2 | 3 | import java.io.IOException; 4 | import java.io.PrintWriter; 5 | import java.util.ArrayList; 6 | import java.util.List; 7 | 8 | import javax.servlet.ServletException; 9 | import javax.servlet.http.HttpServlet; 10 | import javax.servlet.http.HttpServletRequest; 11 | import javax.servlet.http.HttpServletResponse; 12 | 13 | import entity.ReceiveOrders; 14 | import entity.ReleaseOrders; 15 | import service.ReceiveOrdersService; 16 | import service.ReleaseOrdersService; 17 | import service.impl.ReceiveOrdersServiceImpl; 18 | import service.impl.ReleaseOrdersServiceImpl; 19 | 20 | public class UserInfoServlet extends HttpServlet { 21 | 22 | /** 23 | * The doGet method of the servlet.
24 | * 25 | * This method is called when a form has its tag value method equals to get. 26 | * 27 | * @param request the request send by the client to the server 28 | * @param response the response send by the server to the client 29 | * @throws ServletException if an error occurred 30 | * @throws IOException if an error occurred 31 | */ 32 | public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 33 | 34 | doPost(request, response); 35 | } 36 | 37 | /** 38 | * The doPost method of the servlet.
39 | * 40 | * This method is called when a form has its tag value method equals to post. 41 | * 42 | * @param request the request send by the client to the server 43 | * @param response the response send by the server to the client 44 | * @throws ServletException if an error occurred 45 | * @throws IOException if an error occurred 46 | */ 47 | 48 | public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 49 | Integer uid =Integer.parseInt(request.getParameter("uid")); 50 | ReleaseOrdersService releaseOrdersService = new ReleaseOrdersServiceImpl(); 51 | ReceiveOrdersService receiveOrdersService = new ReceiveOrdersServiceImpl(); 52 | List relOList = releaseOrdersService.findByUid(uid); 53 | List recOList = receiveOrdersService.findByUid(uid); 54 | List relRecOList = new ArrayList(); 55 | for(ReleaseOrders r :relOList){ 56 | List list=receiveOrdersService.findByOid(r.getOid()); 57 | relRecOList.addAll(list); 58 | } 59 | request.setAttribute("relRecOList", relRecOList); 60 | request.setAttribute("relOList", relOList); 61 | request.setAttribute("recOList", recOList); 62 | request.getRequestDispatcher("userinfo.jsp").forward(request, response); 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /src/dao/.gitignore: -------------------------------------------------------------------------------- 1 | /impl/ 2 | -------------------------------------------------------------------------------- /src/dao/AdminDAO.java: -------------------------------------------------------------------------------- 1 | package dao; 2 | 3 | import entity.Admin; 4 | 5 | public interface AdminDAO { 6 | public Admin findByAdminname(String adminName); 7 | } 8 | -------------------------------------------------------------------------------- /src/dao/PositionDAO.java: -------------------------------------------------------------------------------- 1 | package dao; 2 | 3 | 4 | import java.util.List; 5 | 6 | import entity.Position; 7 | 8 | 9 | 10 | public interface PositionDAO { 11 | public List findAll(); 12 | 13 | public int deletePositionById(int pid); 14 | 15 | public int updatePosition(Position position); 16 | 17 | public int addPosition(Position position); 18 | 19 | public Position findPositionById(int pid); 20 | 21 | public Position findPositionByName(String pname); 22 | } 23 | -------------------------------------------------------------------------------- /src/dao/ReceiveOrdersDAO.java: -------------------------------------------------------------------------------- 1 | package dao; 2 | 3 | import java.util.List; 4 | 5 | import entity.ReceiveOrders; 6 | 7 | public interface ReceiveOrdersDAO { 8 | public int save(ReceiveOrders receiveOrders); 9 | 10 | public int deleteById(Integer id); 11 | 12 | public int update(ReceiveOrders receiveOrders); 13 | 14 | public int count(); 15 | 16 | public List findAll(); 17 | 18 | public ReceiveOrders findById(Integer id); 19 | 20 | public List findByUid(Integer uid); 21 | 22 | public int findByUOid(Integer uid ,Integer oid); 23 | 24 | public List findByOid(Integer oid); 25 | 26 | public int updateByStatus(Integer status,Integer id); 27 | 28 | public int countByStatus(Integer status); 29 | } 30 | -------------------------------------------------------------------------------- /src/dao/ReleaseOrdersDAO.java: -------------------------------------------------------------------------------- 1 | package dao; 2 | 3 | import java.util.List; 4 | 5 | import entity.ReleaseOrders; 6 | 7 | 8 | public interface ReleaseOrdersDAO { 9 | public int save(ReleaseOrders releaseOrders); 10 | 11 | public int update(ReleaseOrders releaseOrders); 12 | 13 | public List findAll(); 14 | 15 | public int deleteById(Integer id); 16 | 17 | public int deleteByUid(Integer uid); 18 | 19 | public ReleaseOrders findById(Integer id); 20 | 21 | public List findByTitle(String title); 22 | 23 | public List findByPid(Integer pid); 24 | 25 | public List findBySid(Integer sid); 26 | 27 | public List findBySidAndPid(Integer sid,Integer pid); 28 | 29 | public List findByPiTi(Integer pid,String title); 30 | 31 | public List findBySiTi(Integer sid,String title); 32 | 33 | public List findBySiPiTi(Integer sid,Integer pid,String title); 34 | 35 | 36 | 37 | /** 38 | * 分页查询 39 | * @param pid 40 | * @param currentPage 41 | * @param pageSize 42 | * @return 43 | */ 44 | public List findByPidPage(Integer pid,Integer currentPage,Integer pageSize); 45 | 46 | public List findBySidPage(Integer sid,Integer currentPage,Integer pageSize); 47 | 48 | public List findBySidAndPidPage(Integer sid,Integer pid,Integer currentPage,Integer pageSize); 49 | 50 | public List findAllByPage(Integer currentPage,Integer pageSize); 51 | 52 | public List findByPiTiPage(Integer pid,String title,Integer currentPage,Integer pageSize); 53 | 54 | public List findBySiTiPage(Integer sid,String title,Integer currentPage,Integer pageSize); 55 | 56 | public List findBySiPiTiPage(Integer sid,Integer pid,String title,Integer currentPage,Integer pageSize); 57 | 58 | 59 | public List findTitleByPage(String title,Integer currentPage,Integer pageSize); 60 | public int count(); 61 | 62 | public int countByUid(Integer uid); 63 | 64 | //查找最近的三个职位 65 | public List findThree(Integer uid); 66 | 67 | public List findByUid(Integer uid); 68 | 69 | 70 | } 71 | -------------------------------------------------------------------------------- /src/dao/SchoolDAO.java: -------------------------------------------------------------------------------- 1 | package dao; 2 | 3 | 4 | import java.util.List; 5 | 6 | import entity.School; 7 | 8 | 9 | public interface SchoolDAO { 10 | public List findAll(); 11 | 12 | public School findById(int sid); 13 | 14 | public int addSchool(School school); 15 | 16 | public int deleteSchoolById(int sid); 17 | 18 | public int updateSchool(School school); 19 | 20 | public School findBySname(String sname); 21 | } 22 | -------------------------------------------------------------------------------- /src/dao/TestPositionDAOImpl.java: -------------------------------------------------------------------------------- 1 | package dao; 2 | 3 | import java.util.List; 4 | 5 | import org.junit.Before; 6 | import org.junit.Test; 7 | 8 | import dao.impl.PositionDAOImpl; 9 | import entity.Position; 10 | 11 | public class TestPositionDAOImpl { 12 | PositionDAO positionDAO; 13 | 14 | @Before 15 | public void init(){ 16 | positionDAO=new PositionDAOImpl(); 17 | } 18 | 19 | @Test 20 | public void testfindAll(){ 21 | List list = positionDAO.findAll(); 22 | list.forEach(System.out::println); 23 | } 24 | 25 | @Test 26 | public void testaddSchool(){ 27 | Position position = new Position(0, "分类1"); 28 | int i = positionDAO.addPosition(position); 29 | System.out.println(i); 30 | } 31 | 32 | @Test 33 | public void testupdateSchool(){ 34 | Position position = new Position(2, "分类1"); 35 | int i = positionDAO.updatePosition(position); 36 | System.out.println(i); 37 | } 38 | 39 | @Test 40 | public void testdeleteSchoolById(){ 41 | int i = positionDAO.deletePositionById(2); 42 | System.out.println(i); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/dao/TestReceiveOrdersImpl.java: -------------------------------------------------------------------------------- 1 | package dao; 2 | 3 | import java.util.List; 4 | 5 | import org.junit.Before; 6 | import org.junit.Test; 7 | 8 | import dao.impl.ReceiveOrdersDAOImpl; 9 | import entity.ReceiveOrders; 10 | import entity.ReleaseOrders; 11 | import entity.User; 12 | 13 | public class TestReceiveOrdersImpl { 14 | ReceiveOrdersDAO receiveOrdersDAO; 15 | 16 | @Before 17 | public void init(){ 18 | receiveOrdersDAO = new ReceiveOrdersDAOImpl(); 19 | } 20 | 21 | @Test 22 | public void testFindAll(){ 23 | List list = receiveOrdersDAO.findAll(); 24 | list.forEach(System.out::println); 25 | } 26 | 27 | @Test 28 | public void testSave(){ 29 | for(int a=0;a<1;a++){ 30 | ReleaseOrders releaseOrders = new ReleaseOrders(10); 31 | User user = new User(7); 32 | ReceiveOrders receiveOrders = new ReceiveOrders(0, releaseOrders, user, 0,"2019-05-14"); 33 | int i = receiveOrdersDAO.save(receiveOrders); 34 | System.out.println(i); 35 | } 36 | } 37 | 38 | @Test 39 | public void testDeleteById(){ 40 | int i = receiveOrdersDAO.deleteById(3); 41 | System.out.println(i); 42 | } 43 | 44 | @Test 45 | public void testUpdate(){ 46 | ReleaseOrders releaseOrders = new ReleaseOrders(6); 47 | User user = new User(7); 48 | ReceiveOrders receiveOrders = new ReceiveOrders(1, releaseOrders, user, 0,"2019-05-15"); 49 | int i = receiveOrdersDAO.update(receiveOrders); 50 | System.out.println(i); 51 | 52 | } 53 | 54 | @Test 55 | public void testFindById(){ 56 | ReceiveOrders orders = receiveOrdersDAO.findById(1); 57 | System.out.println(orders); 58 | } 59 | 60 | @Test 61 | public void testCount(){ 62 | int i = receiveOrdersDAO.count(); 63 | System.out.println(i); 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /src/dao/TestReleaseOrdersDAOImpl.java: -------------------------------------------------------------------------------- 1 | package dao; 2 | 3 | import java.util.List; 4 | 5 | import org.junit.Before; 6 | import org.junit.Test; 7 | 8 | import dao.impl.ReceiveOrdersDAOImpl; 9 | import dao.impl.ReleaseOrdersDAOImpl; 10 | import entity.Position; 11 | import entity.ReceiveOrders; 12 | import entity.ReleaseOrders; 13 | import entity.School; 14 | import entity.User; 15 | import utils.DBUtil; 16 | 17 | public class TestReleaseOrdersDAOImpl { 18 | ReleaseOrdersDAO releaseOrdersDAO ; 19 | 20 | @Before 21 | public void init(){ 22 | releaseOrdersDAO = new ReleaseOrdersDAOImpl(); 23 | } 24 | 25 | @Test 26 | public void testFindAll(){ 27 | List list = releaseOrdersDAO.findAll(); 28 | list.forEach(System.out::println); 29 | } 30 | 31 | @Test 32 | public void testUpdate(){ 33 | School school = new School(1); 34 | Position position = new Position(1); 35 | User user = new User(7); 36 | ReleaseOrders releaseOrders=new ReleaseOrders(6, school, position, "兼职2", "兼职描述2", "月结", 100,"2000-01-01 01:10:10", user, 100d, 0); 37 | int i=releaseOrdersDAO.update(releaseOrders); 38 | System.out.println(i); 39 | } 40 | 41 | @Test 42 | public void testSave(){ 43 | for(int i=12;i<100;i++){ 44 | School school = new School(1); 45 | Position position = new Position(1); 46 | User user = new User(7); 47 | ReleaseOrders releaseOrders=new ReleaseOrders(6, school, position, "兼职"+i, "兼职描述"+i, "月结", 100,"2000-01-01 01:10:10", user, 100d, 0); 48 | int r=releaseOrdersDAO.save(releaseOrders); 49 | System.out.println(r); 50 | } 51 | } 52 | 53 | @Test 54 | public void testDelete(){ 55 | int i = releaseOrdersDAO.deleteById(7); 56 | System.out.println(i); 57 | } 58 | 59 | @Test 60 | public void findById(){ 61 | ReleaseOrders releaseOrders = releaseOrdersDAO.findById(6); 62 | System.out.println(releaseOrders); 63 | } 64 | 65 | @Test 66 | public void countByUid(){ 67 | int i = releaseOrdersDAO.countByUid(9); 68 | System.out.println(i); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /src/dao/TestSchoolDAOImpl.java: -------------------------------------------------------------------------------- 1 | package dao; 2 | 3 | import java.util.List; 4 | 5 | import org.junit.Before; 6 | import org.junit.Test; 7 | 8 | 9 | 10 | import dao.impl.SchoolDAOImpl; 11 | import entity.School; 12 | 13 | public class TestSchoolDAOImpl { 14 | SchoolDAO schoolDAO ; 15 | 16 | @Before 17 | public void init(){ 18 | schoolDAO = new SchoolDAOImpl(); 19 | } 20 | 21 | @Test 22 | public void testfindAll(){ 23 | List list = schoolDAO.findAll(); 24 | list.forEach(System.out::println); 25 | } 26 | 27 | @Test 28 | public void testaddSchool(){ 29 | School school = new School(0, "浙江理工大学"); 30 | int i = schoolDAO.addSchool(school); 31 | System.out.println(i); 32 | } 33 | 34 | @Test 35 | public void testupdateSchool(){ 36 | School school = new School(2, "浙江大学"); 37 | int i = schoolDAO.updateSchool(school); 38 | System.out.println(i); 39 | } 40 | 41 | @Test 42 | public void testdeleteSchoolById(){ 43 | int i = schoolDAO.deleteSchoolById(4); 44 | System.out.println(i); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/dao/TestUserDAOImpl.java: -------------------------------------------------------------------------------- 1 | package dao; 2 | 3 | import java.util.List; 4 | 5 | import org.junit.Before; 6 | import org.junit.Test; 7 | 8 | import dao.impl.UserDAOImpl; 9 | import entity.School; 10 | import entity.User; 11 | 12 | 13 | public class TestUserDAOImpl { 14 | UserDAO userDAO ; 15 | 16 | @Before 17 | public void init(){ 18 | userDAO=new UserDAOImpl(); 19 | } 20 | 21 | 22 | @Test 23 | public void testFindAll(){ 24 | List list = userDAO.findAll(); 25 | list.forEach(System.out::println); 26 | } 27 | 28 | @Test 29 | public void testAddUser(){ 30 | School school =new School(1); 31 | User user = new User(0, school, "yyy", "123456", "男", "18758157701", "123@qq.com", 90, 100, 0); 32 | int i = userDAO.addUser(user); 33 | System.out.println(i); 34 | } 35 | 36 | @Test 37 | public void testfindUserById(){ 38 | User user = userDAO.findUserById(7); 39 | System.out.println(user); 40 | } 41 | 42 | 43 | @Test 44 | public void testdeleteUserById(){ 45 | int i = userDAO.deleteById(8); 46 | System.out.println(i); 47 | } 48 | 49 | @Test 50 | public void testupdateUserPwd(){ 51 | 52 | User user =new User(7,"666"); 53 | //System.out.println(userDAO.updatePwd(user)); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/dao/UserDAO.java: -------------------------------------------------------------------------------- 1 | package dao; 2 | 3 | import java.util.List; 4 | 5 | import entity.User; 6 | 7 | public interface UserDAO { 8 | //查询所有用户 9 | public List findAll(); 10 | 11 | //通过Id查询用户 12 | public User findUserById(int uid); 13 | 14 | //通过用户名查询用户 15 | public List findByUsername(String username); 16 | 17 | // //通过用户名查找用户是否存在 18 | // public int isExit(String username); 19 | // 20 | // //判断用户名密码是否正确 21 | // public int isValid(User user); 22 | 23 | //添加用户 24 | public int addUser(User user); 25 | 26 | //通过id删除用户 27 | public int deleteById(int uid); 28 | 29 | // //通过用户名修改用户基本信息 30 | // public int updateUserByUsername(User user); 31 | 32 | //通过Id修改用户基本信息 33 | public int updateUser(User user); 34 | 35 | //通过Id修改用户密码 36 | public int updatePwd(Integer uid,String password); 37 | 38 | // 分页查找所有用户 39 | // public List findAllUsersByPage(); 40 | 41 | public int countByUserName(String username); 42 | 43 | public int countByPhone(String phone); 44 | 45 | public int count(); 46 | 47 | public User findUserByUsername(String username); 48 | 49 | public int findTotalScore(Integer uid); 50 | 51 | 52 | public int findAppraiseNum(Integer uid); 53 | 54 | 55 | } 56 | -------------------------------------------------------------------------------- /src/dao/ZhCN_to16.java: -------------------------------------------------------------------------------- 1 | package dao; 2 | 3 | public class ZhCN_to16 { 4 | public static String Aescape(String src) { 5 | int i; 6 | char j; 7 | StringBuffer tmp = new StringBuffer(); 8 | tmp.ensureCapacity(src.length() * 6); 9 | for (i = 0; i < src.length(); i++) { 10 | j = src.charAt(i); 11 | if (Character.isDigit(j) || Character.isLowerCase(j) || Character.isUpperCase(j)) 12 | tmp.append(j); 13 | else if (j < 256) { 14 | tmp.append("%"); 15 | if (j < 16) 16 | tmp.append("0"); 17 | tmp.append(Integer.toString(j, 16)); 18 | } else { 19 | tmp.append("%u"); 20 | tmp.append(Integer.toString(j, 16)); 21 | } 22 | } 23 | return tmp.toString(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/dao/impl/AdminDAOImpl.java: -------------------------------------------------------------------------------- 1 | package dao.impl; 2 | 3 | import java.sql.ResultSet; 4 | import java.sql.SQLException; 5 | 6 | import dao.AdminDAO; 7 | import entity.Admin; 8 | import utils.DBUtil; 9 | 10 | public class AdminDAOImpl implements AdminDAO { 11 | DBUtil dbUtil = new DBUtil(); 12 | 13 | @Override 14 | public Admin findByAdminname(String adminName) { 15 | Admin admin=null; 16 | String sql="select *from tab_admin where adminname=?"; 17 | ResultSet resultSet = dbUtil.query(sql, adminName); 18 | try { 19 | while (resultSet.next()) { 20 | int id=resultSet.getInt("id"); 21 | String adminname = resultSet.getString("adminname"); 22 | String password = resultSet.getString("password"); 23 | 24 | admin=new Admin(id, adminname, password); 25 | } 26 | } catch (SQLException e) { 27 | // TODO Auto-generated catch block 28 | e.printStackTrace(); 29 | }finally{ 30 | if(resultSet!=null){ 31 | try { 32 | resultSet.close(); 33 | } catch (SQLException e) { 34 | // TODO Auto-generated catch block 35 | e.printStackTrace(); 36 | } 37 | } 38 | } 39 | 40 | return admin ; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/dao/impl/PositionDAOImpl.java: -------------------------------------------------------------------------------- 1 | package dao.impl; 2 | 3 | import java.sql.ResultSet; 4 | import java.sql.SQLException; 5 | import java.util.ArrayList; 6 | import java.util.List; 7 | 8 | import dao.PositionDAO; 9 | import entity.Position; 10 | import utils.DBUtil; 11 | 12 | public class PositionDAOImpl implements PositionDAO { 13 | 14 | DBUtil dbUtil = new DBUtil(); 15 | @Override 16 | public List findAll() { 17 | String sql ="select *from tab_position"; 18 | ResultSet rs = dbUtil.query(sql); 19 | ArrayList list = new ArrayList(); 20 | try { 21 | while(rs.next()){ 22 | int pid = rs.getInt("pid"); 23 | String pname=rs.getString("pname"); 24 | Position position = new Position(pid, pname); 25 | list.add(position); 26 | } 27 | } catch (SQLException e) { 28 | e.printStackTrace(); 29 | } 30 | return list; 31 | } 32 | 33 | @Override 34 | public int deletePositionById(int pid) { 35 | String sql="DELETE FROM `campuspt`.`tab_position` WHERE `pid` =?"; 36 | return dbUtil.update(sql, pid); 37 | 38 | } 39 | 40 | @Override 41 | public int updatePosition(Position position) { 42 | String sql="UPDATE `campuspt`.`tab_position` SET `pname` = ? WHERE `pid` = ?"; 43 | return dbUtil.update(sql, position.getPname(),position.getPid()); 44 | } 45 | 46 | @Override 47 | public int addPosition(Position position) { 48 | String sql = "INSERT INTO `campuspt`.`tab_position`(`pname`) VALUES (?)"; 49 | return dbUtil.update(sql, position.getPname()); 50 | 51 | } 52 | 53 | @Override 54 | public Position findPositionById(int pid) { 55 | String sql = "select *from tab_position where pid=?"; 56 | ResultSet rs = dbUtil.query(sql, pid); 57 | Position position = null; 58 | try { 59 | while(rs.next()){ 60 | String pname=rs.getString("pname"); 61 | position=new Position(pid, pname); 62 | } 63 | } catch (SQLException e) { 64 | e.printStackTrace(); 65 | } 66 | return position; 67 | } 68 | 69 | @Override 70 | public Position findPositionByName(String pname) { 71 | String sql = "select *from tab_position where pname=?"; 72 | ResultSet rs = dbUtil.query(sql, pname); 73 | Position position = null; 74 | try { 75 | while(rs.next()){ 76 | Integer pid=rs.getInt("pid"); 77 | position=new Position(pid, pname); 78 | } 79 | } catch (SQLException e) { 80 | e.printStackTrace(); 81 | } 82 | return position; 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /src/dao/impl/ReceiveOrdersDAOImpl.java: -------------------------------------------------------------------------------- 1 | package dao.impl; 2 | 3 | import java.sql.ResultSet; 4 | import java.sql.SQLException; 5 | import java.util.ArrayList; 6 | import java.util.List; 7 | 8 | import javax.sql.RowSet; 9 | import javax.sql.rowset.CachedRowSet; 10 | 11 | import dao.ReceiveOrdersDAO; 12 | import dao.ReleaseOrdersDAO; 13 | import dao.UserDAO; 14 | import entity.ReceiveOrders; 15 | import entity.ReleaseOrders; 16 | import entity.User; 17 | import utils.DBUtil; 18 | 19 | public class ReceiveOrdersDAOImpl implements ReceiveOrdersDAO { 20 | DBUtil dbUtil= new DBUtil(); 21 | UserDAO userDAO = new UserDAOImpl(); 22 | ReleaseOrdersDAO releaseOrderDAO = new ReleaseOrdersDAOImpl(); 23 | @Override 24 | public int save(ReceiveOrders receiveOrders) { 25 | String sql ="INSERT INTO `campuspt`.`tab_receiveorders`(`oid`, `uid`, `status`,receivetime) VALUES (?,?, ?, ?)"; 26 | int i = dbUtil.update(sql, receiveOrders.getReleaseOrders().getOid(),receiveOrders.getUser().getUid(),receiveOrders.getStatus(),receiveOrders.getReceiveTime()); 27 | return i; 28 | } 29 | 30 | @Override 31 | public int deleteById(Integer id) { 32 | String sql="DELETE FROM `campuspt`.`tab_receiveorders` WHERE `id` = ?"; 33 | int i = dbUtil.update(sql, id); 34 | return i; 35 | } 36 | 37 | @Override 38 | public int update(ReceiveOrders receiveOrders) { 39 | String sql="UPDATE `campuspt`.`tab_receiveorders` SET `oid` = ?, `uid` = ?, `status` = ? , where receivetime= ? WHERE `id` = ?"; 40 | int i = dbUtil.update(sql,receiveOrders.getReleaseOrders().getOid(),receiveOrders.getUser().getUid(),receiveOrders.getStatus(),receiveOrders.getReceiveTime(),receiveOrders.getId() ); 41 | return i; 42 | } 43 | 44 | @Override 45 | public int count() { 46 | String sql ="select count(*) from tab_receiveorders"; 47 | ResultSet rs = dbUtil.query(sql); 48 | int count=0; 49 | try { 50 | while(rs.next()){ 51 | count=rs.getInt(1); 52 | } 53 | } catch (SQLException e) { 54 | // TODO Auto-generated catch block 55 | e.printStackTrace(); 56 | } 57 | return count; 58 | } 59 | 60 | @Override 61 | public List findAll() { 62 | String sql ="SELECT * FROM `campuspt`.`tab_receiveorders` by uid desc"; 63 | ResultSet rs = dbUtil.query(sql); 64 | List list = new ArrayList(); 65 | handleList(rs, list); 66 | return list; 67 | } 68 | 69 | private void handleList(ResultSet rs, List list) { 70 | try { 71 | while(rs.next()){ 72 | int id=rs.getInt("id"); 73 | int oid =rs.getInt("oid"); 74 | int uid = rs.getInt("uid"); 75 | int status =rs.getInt("status"); 76 | String receiveTime = rs.getString("receivetime"); 77 | ReleaseOrders releaseOrders =releaseOrderDAO.findById(oid); 78 | User user = userDAO.findUserById(uid); 79 | ReceiveOrders receiveOrders = new ReceiveOrders(id, releaseOrders, user, status,receiveTime); 80 | list.add(receiveOrders); 81 | } 82 | } catch (SQLException e) { 83 | // TODO Auto-generated catch block 84 | e.printStackTrace(); 85 | } 86 | } 87 | 88 | @Override 89 | public ReceiveOrders findById(Integer id) { 90 | String sql ="SELECT * FROM `campuspt`.`tab_receiveorders` where id=? "; 91 | ResultSet rs = dbUtil.query(sql, id); 92 | return handleData(rs); 93 | } 94 | 95 | private ReceiveOrders handleData(ResultSet rs) { 96 | ReceiveOrders receiveOrders=null; 97 | try { 98 | while(rs.next()){ 99 | int id=rs.getInt("id"); 100 | int oid =rs.getInt("oid"); 101 | int uid = rs.getInt("uid"); 102 | int status =rs.getInt("status"); 103 | String receiveTime =rs.getString("receivetime"); 104 | ReleaseOrders releaseOrders =releaseOrderDAO.findById(oid); 105 | User user = userDAO.findUserById(uid); 106 | receiveOrders = new ReceiveOrders(id, releaseOrders, user, status,receiveTime); 107 | 108 | } 109 | } catch (SQLException e) { 110 | // TODO Auto-generated catch block 111 | e.printStackTrace(); 112 | } 113 | return receiveOrders; 114 | } 115 | 116 | @Override 117 | public List findByUid(Integer uid) { 118 | String sql ="SELECT * FROM `campuspt`.`tab_receiveorders` where uid =? order by uid desc"; 119 | ResultSet rs = dbUtil.query(sql,uid); 120 | List list = new ArrayList(); 121 | handleList(rs, list); 122 | return list; 123 | } 124 | 125 | @Override 126 | public int findByUOid(Integer uid, Integer oid) { 127 | String sql ="select count(*) from tab_receiveorders where uid=? and oid=?"; 128 | ResultSet rs = dbUtil.query(sql,uid,oid); 129 | int count=0; 130 | try { 131 | while(rs.next()){ 132 | count=rs.getInt(1); 133 | } 134 | } catch (SQLException e) { 135 | // TODO Auto-generated catch block 136 | e.printStackTrace(); 137 | } 138 | return count; 139 | } 140 | 141 | @Override 142 | public List findByOid(Integer oid) { 143 | String sql ="SELECT * FROM `campuspt`.`tab_receiveorders` where oid =? order by receivetime desc"; 144 | ResultSet rs = dbUtil.query(sql,oid); 145 | List list = new ArrayList(); 146 | handleList(rs, list); 147 | return list; 148 | } 149 | 150 | @Override 151 | public int updateByStatus(Integer status,Integer id) { 152 | String sql ="UPDATE `campuspt`.`tab_receiveorders` SET `status` = ? WHERE `id` = ?"; 153 | int i = dbUtil.update(sql, status,id); 154 | return i; 155 | } 156 | 157 | @Override 158 | public int countByStatus(Integer status) { 159 | String sql ="select count(*) from tab_receiveorders where status=?"; 160 | ResultSet rs = dbUtil.query(sql,status); 161 | int count=0; 162 | try { 163 | while(rs.next()){ 164 | count+=rs.getInt(1); 165 | } 166 | } catch (SQLException e) { 167 | // TODO Auto-generated catch block 168 | e.printStackTrace(); 169 | }finally { 170 | if(rs!=null){ 171 | try { 172 | rs.close(); 173 | } catch (SQLException e) { 174 | // TODO Auto-generated catch block 175 | e.printStackTrace(); 176 | } 177 | } 178 | } 179 | 180 | return count; 181 | } 182 | 183 | } 184 | -------------------------------------------------------------------------------- /src/dao/impl/SchoolDAOImpl.java: -------------------------------------------------------------------------------- 1 | package dao.impl; 2 | 3 | import java.sql.ResultSet; 4 | import java.sql.SQLException; 5 | import java.util.ArrayList; 6 | import java.util.List; 7 | 8 | import dao.SchoolDAO; 9 | import entity.School; 10 | import utils.DBUtil; 11 | 12 | public class SchoolDAOImpl implements SchoolDAO { 13 | 14 | DBUtil dbUtil = new DBUtil(); 15 | @Override 16 | public List findAll() { 17 | String sql = "select *from tab_school"; 18 | ResultSet rs = dbUtil.query(sql); 19 | ArrayList list = new ArrayList(); 20 | try { 21 | while(rs.next()){ 22 | int sid = rs.getInt("sid"); 23 | String sname=rs.getString("sname"); 24 | School school = new School(sid, sname); 25 | list.add(school); 26 | } 27 | } catch (SQLException e) { 28 | e.printStackTrace(); 29 | } 30 | return list; 31 | } 32 | 33 | @Override 34 | public int addSchool(School school) { 35 | String sql = "INSERT INTO `campuspt`.`tab_school`(`sname`) VALUES (?)"; 36 | return dbUtil.update(sql, school.getSname()); 37 | 38 | } 39 | 40 | @Override 41 | public int deleteSchoolById(int sid) { 42 | String sql="DELETE FROM `campuspt`.`tab_school` WHERE `sid` =?"; 43 | return dbUtil.update(sql, sid); 44 | } 45 | 46 | @Override 47 | public int updateSchool(School school) { 48 | String sql="UPDATE `campuspt`.`tab_school` SET `sname` = ? WHERE `sid` = ?"; 49 | return dbUtil.update(sql, school.getSname(),school.getSid()); 50 | } 51 | 52 | @Override 53 | public School findById(int sid) { 54 | String sql = "select *from tab_school where sid=?"; 55 | ResultSet rs = dbUtil.query(sql, sid); 56 | School school = null; 57 | try { 58 | while(rs.next()){ 59 | String sname=rs.getString("sname"); 60 | school=new School(sid, sname); 61 | } 62 | } catch (SQLException e) { 63 | e.printStackTrace(); 64 | } 65 | return school; 66 | } 67 | 68 | @Override 69 | public School findBySname(String sname) { 70 | String sql = "select *from tab_school where sname=?"; 71 | ResultSet rs = dbUtil.query(sql, sname); 72 | School school = null; 73 | try { 74 | while(rs.next()){ 75 | Integer sid =rs.getInt("sid"); 76 | school=new School(sid, sname); 77 | } 78 | } catch (SQLException e) { 79 | e.printStackTrace(); 80 | } 81 | return school; 82 | } 83 | 84 | } 85 | -------------------------------------------------------------------------------- /src/db.properties: -------------------------------------------------------------------------------- 1 | driverName =com.mysql.cj.jdbc.Driver 2 | url = jdbc:mysql://localhost:3306/campuspt?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone = UTC 3 | username =root 4 | password =123456 -------------------------------------------------------------------------------- /src/duanxin/Duanxin.java: -------------------------------------------------------------------------------- 1 | package duanxin; 2 | 3 | 4 | import com.github.qcloudsms.*; 5 | 6 | public class Duanxin { 7 | // 短信应用 SDK AppID 8 | static int appid = 1400172450; // SDK AppID 以1400开头 9 | 10 | // 短信应用 SDK AppKey 11 | static String appkey = "fe722901c24c7d2d5a47be042283a4de"; 12 | 13 | // 需要发送短信的手机号码 14 | // static String[] phoneNumbers = {"21212313123", "12345678902", "12345678903"}; 15 | 16 | // 短信模板 ID,需要在短信应用中申请 17 | static int templateId = 330052; // NOTE: 这里的模板 ID`7839`只是示例,真实的模板 ID 需要在短信控制台中申请 18 | 19 | // 签名 20 | static String smsSign = "小桥流水网"; // NOTE: 签名参数使用的是`签名内容`,而不是`签名ID`。这里的签名"腾讯云"只是示例,真实的签名需要在短信控制台申请 21 | 22 | public static void sendOne(String param1,String param2,String phoneNumber){ 23 | 24 | try { 25 | SmsSingleSender ssender = new SmsSingleSender(appid, appkey); 26 | SmsSingleSenderResult result = ssender.send(0, "86",phoneNumber, 27 | param1+"验证码:"+param2+",请于"+3+"分钟内填写。如非本人操作,请忽略本短信。", "", ""); 28 | } catch (Exception e){ 29 | e.printStackTrace(); 30 | } 31 | } 32 | 33 | 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/duanxin/DuanxinExcuse.java: -------------------------------------------------------------------------------- 1 | package duanxin; 2 | 3 | import java.util.Random; 4 | 5 | public class DuanxinExcuse { 6 | 7 | public static void main(String[] args) { 8 | // TODO Auto-generated method stub 9 | // Math.random(); 10 | Duanxin.sendOne("注册", "1234", "15355424838"); 11 | Random ran=new Random(); 12 | String sst=""; 13 | for(int i=0;i<4;i++){ 14 | int ss=ran.nextInt(10); 15 | sst += String.valueOf(ss); 16 | 17 | 18 | } 19 | System.out.printf(sst); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/duanxin/DuanxinTest.java: -------------------------------------------------------------------------------- 1 | package duanxin; 2 | 3 | 4 | 5 | import org.junit.Before; 6 | import org.junit.Test; 7 | 8 | public class DuanxinTest { 9 | 10 | @Before 11 | public void setUp() throws Exception { 12 | } 13 | 14 | @Test 15 | public static void test() { 16 | Duanxin.sendOne("叶继伟", "Hello World", "18758157701"); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/entity/Admin.java: -------------------------------------------------------------------------------- 1 | package entity; 2 | 3 | public class Admin { 4 | public Integer id; 5 | public String adminName; 6 | public String password; 7 | public Integer getId() { 8 | return id; 9 | } 10 | public void setId(Integer id) { 11 | this.id = id; 12 | } 13 | public String getAdminName() { 14 | return adminName; 15 | } 16 | public void setAdminName(String adminName) { 17 | this.adminName = adminName; 18 | } 19 | public String getPassword() { 20 | return password; 21 | } 22 | public void setPassword(String password) { 23 | this.password = password; 24 | } 25 | public Admin(Integer id, String adminName, String password) { 26 | super(); 27 | this.id = id; 28 | this.adminName = adminName; 29 | this.password = password; 30 | } 31 | 32 | @Override 33 | public String toString() { 34 | return "Admin [id=" + id + ", adminName=" + adminName + ", password=" + password + "]"; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /src/entity/JsonMsg.java: -------------------------------------------------------------------------------- 1 | package entity; 2 | 3 | public class JsonMsg { 4 | 5 | public final static int STATUS_SUCCESS = 200; // 成功标志 6 | public final static int STATUS_FAIL = 400; // 失败表示 7 | public final static int STATUS_ERROR = 500; // 服务出错 8 | public final static int STATUS_AUTH = 100; // 未授权服务 9 | 10 | private int status; // 标志位,代表处理结果 11 | private String msg; // 提示消息 12 | private Object data; // 数据 13 | 14 | public int getStatus() { 15 | return status; 16 | } 17 | 18 | public void setStatus(int status) { 19 | this.status = status; 20 | } 21 | 22 | public String getMsg() { 23 | return msg; 24 | } 25 | 26 | public void setMsg(String msg) { 27 | this.msg = msg; 28 | } 29 | 30 | public Object getData() { 31 | return data; 32 | } 33 | 34 | public void setData(Object data) { 35 | this.data = data; 36 | } 37 | 38 | public JsonMsg() { 39 | super(); 40 | // TODO Auto-generated constructor stub 41 | } 42 | 43 | public JsonMsg(int status, String msg, Object data) { 44 | super(); 45 | this.status = status; 46 | this.msg = msg; 47 | this.data = data; 48 | } 49 | 50 | public JsonMsg(int status, String msg) { 51 | super(); 52 | this.status = status; 53 | this.msg = msg; 54 | } 55 | 56 | // 处理成功消息 57 | public static JsonMsg makeSuccess(String msg, Object data) { 58 | JsonMsg jsonMsg = new JsonMsg(); 59 | jsonMsg.status = STATUS_SUCCESS; 60 | jsonMsg.data = data; 61 | jsonMsg.msg = msg; 62 | return jsonMsg; 63 | } 64 | 65 | // 处理失败消息 66 | public static JsonMsg makeFail(String msg, Object data) { 67 | JsonMsg jsonMsg = new JsonMsg(); 68 | jsonMsg.status = STATUS_FAIL; 69 | jsonMsg.data = data; 70 | jsonMsg.msg = msg; 71 | return jsonMsg; 72 | } 73 | // 处理认证失败的消息 74 | 75 | } 76 | -------------------------------------------------------------------------------- /src/entity/Position.java: -------------------------------------------------------------------------------- 1 | package entity; 2 | 3 | public class Position { 4 | private Integer pid; //职位分类编号 5 | private String pname; //职位分类名称 6 | @Override 7 | public String toString() { 8 | return "Position [pid=" + pid + ", pname=" + pname + "]"; 9 | } 10 | public Integer getPid() { 11 | return pid; 12 | } 13 | public void setPid(Integer pid) { 14 | this.pid = pid; 15 | } 16 | public String getPname() { 17 | return pname; 18 | } 19 | public void setPname(String pname) { 20 | this.pname = pname; 21 | } 22 | public Position(Integer pid, String pname) { 23 | super(); 24 | this.pid = pid; 25 | this.pname = pname; 26 | } 27 | public Position(Integer pid) { 28 | super(); 29 | this.pid = pid; 30 | } 31 | 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/entity/ReceiveOrders.java: -------------------------------------------------------------------------------- 1 | package entity; 2 | 3 | public class ReceiveOrders { 4 | private Integer id; 5 | private ReleaseOrders releaseOrders; 6 | private User user; 7 | private Integer status; 8 | private String receiveTime; 9 | public ReceiveOrders(Integer id, ReleaseOrders releaseOrders, User user, Integer status, String receiveTime) { 10 | super(); 11 | this.id = id; 12 | this.releaseOrders = releaseOrders; 13 | this.user = user; 14 | this.status = status; 15 | this.receiveTime = receiveTime; 16 | } 17 | @Override 18 | public String toString() { 19 | return "ReceiveOrders [id=" + id + ", releaseOrders=" + releaseOrders + ", user=" + user + ", status=" + status 20 | + ", receiveTime=" + receiveTime + "]"; 21 | } 22 | public Integer getId() { 23 | return id; 24 | } 25 | public void setId(Integer id) { 26 | this.id = id; 27 | } 28 | public ReleaseOrders getReleaseOrders() { 29 | return releaseOrders; 30 | } 31 | public void setReleaseOrders(ReleaseOrders releaseOrders) { 32 | this.releaseOrders = releaseOrders; 33 | } 34 | public User getUser() { 35 | return user; 36 | } 37 | public void setUser(User user) { 38 | this.user = user; 39 | } 40 | public Integer getStatus() { 41 | return status; 42 | } 43 | public void setStatus(Integer status) { 44 | this.status = status; 45 | } 46 | public String getReceiveTime() { 47 | return receiveTime; 48 | } 49 | public void setReceiveTime(String receiveTime) { 50 | this.receiveTime = receiveTime; 51 | } 52 | 53 | 54 | 55 | } 56 | -------------------------------------------------------------------------------- /src/entity/ReleaseOrders.java: -------------------------------------------------------------------------------- 1 | package entity; 2 | 3 | public class ReleaseOrders { 4 | private Integer oid; 5 | private School school; 6 | private Position position; 7 | private String title; 8 | private String description; 9 | private String payMethod; 10 | private Integer recruitNum; 11 | private String releaseTime; 12 | private User user; 13 | private Double salary; 14 | private Integer status; 15 | public ReleaseOrders(Integer oid, School school, Position position, String title, String description, 16 | String payMethod, Integer recruitNum, String releaseTime, User user, Double salary, Integer status) { 17 | super(); 18 | this.oid = oid; 19 | this.school = school; 20 | this.position = position; 21 | this.title = title; 22 | this.description = description; 23 | this.payMethod = payMethod; 24 | this.recruitNum = recruitNum; 25 | this.releaseTime = releaseTime; 26 | this.user = user; 27 | this.salary = salary; 28 | this.status = status; 29 | } 30 | @Override 31 | public String toString() { 32 | return "ReleaseOrders [oid=" + oid + ", school=" + school + ", position=" + position + ", title=" + title 33 | + ", description=" + description + ", payMethod=" + payMethod + ", recruitNum=" + recruitNum 34 | + ", releaseTime=" + releaseTime + ", user=" + user + ", salary=" + salary + ", status=" + status + "]"; 35 | } 36 | public Integer getOid() { 37 | return oid; 38 | } 39 | public void setOid(Integer oid) { 40 | this.oid = oid; 41 | } 42 | public School getSchool() { 43 | return school; 44 | } 45 | public void setSchool(School school) { 46 | this.school = school; 47 | } 48 | public Position getPosition() { 49 | return position; 50 | } 51 | public void setPosition(Position position) { 52 | this.position = position; 53 | } 54 | public String getTitle() { 55 | return title; 56 | } 57 | public void setTitle(String title) { 58 | this.title = title; 59 | } 60 | public String getDescription() { 61 | return description; 62 | } 63 | public void setDescription(String description) { 64 | this.description = description; 65 | } 66 | public String getPayMethod() { 67 | return payMethod; 68 | } 69 | public void setPayMethod(String payMethod) { 70 | this.payMethod = payMethod; 71 | } 72 | public Integer getRecruitNum() { 73 | return recruitNum; 74 | } 75 | public void setRecruitNum(Integer recruitNum) { 76 | this.recruitNum = recruitNum; 77 | } 78 | public String getReleaseTime() { 79 | return releaseTime; 80 | } 81 | public void setReleaseTime(String releaseTime) { 82 | this.releaseTime = releaseTime; 83 | } 84 | public User getUser() { 85 | return user; 86 | } 87 | public void setUser(User user) { 88 | this.user = user; 89 | } 90 | public Double getSalary() { 91 | return salary; 92 | } 93 | public void setSalary(Double salary) { 94 | this.salary = salary; 95 | } 96 | public Integer getStatus() { 97 | return status; 98 | } 99 | public void setStatus(Integer status) { 100 | this.status = status; 101 | } 102 | public ReleaseOrders(Integer oid) { 103 | super(); 104 | this.oid = oid; 105 | } 106 | 107 | 108 | 109 | } 110 | -------------------------------------------------------------------------------- /src/entity/School.java: -------------------------------------------------------------------------------- 1 | package entity; 2 | 3 | 4 | 5 | public class School { 6 | private Integer sid; //学校编号 7 | private String sname; //学校名 8 | public Integer getSid() { 9 | return sid; 10 | } 11 | public void setSid(Integer sid) { 12 | this.sid = sid; 13 | } 14 | public String getSname() { 15 | return sname; 16 | } 17 | public void setSname(String sname) { 18 | this.sname = sname; 19 | } 20 | public School(Integer sid, String sname) { 21 | super(); 22 | this.sid = sid; 23 | this.sname = sname; 24 | } 25 | @Override 26 | public String toString() { 27 | return "School [sid=" + sid + ", sname=" + sname + "]"; 28 | } 29 | public School(Integer sid) { 30 | super(); 31 | this.sid = sid; 32 | } 33 | 34 | 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/entity/User.java: -------------------------------------------------------------------------------- 1 | package entity; 2 | 3 | public class User { 4 | private int uid; 5 | private School school; 6 | private String username; 7 | private String password; 8 | private String gender; 9 | private String phone; 10 | private String email; 11 | private int totalScore; 12 | private int appraiseNum; 13 | private int permission; 14 | public User(int uid, School school, String username, String password, String gender, String phone, String email, 15 | int totalScore, int appraiseNum, int permission) { 16 | super(); 17 | this.uid = uid; 18 | this.school = school; 19 | this.username = username; 20 | this.password = password; 21 | this.gender = gender; 22 | this.phone = phone; 23 | this.email = email; 24 | this.totalScore = totalScore; 25 | this.appraiseNum = appraiseNum; 26 | this.permission = permission; 27 | } 28 | @Override 29 | public String toString() { 30 | return "User [uid=" + uid + ", school=" + school + ", username=" + username + ", password=" + password 31 | + ", gender=" + gender + ", phone=" + phone + ", email=" + email + ", totalScore=" + totalScore 32 | + ", appraiseNum=" + appraiseNum + ", permission=" + permission + "]"; 33 | } 34 | public int getUid() { 35 | return uid; 36 | } 37 | public void setUid(int uid) { 38 | this.uid = uid; 39 | } 40 | public School getSchool() { 41 | return school; 42 | } 43 | public void setSchool(School school) { 44 | this.school = school; 45 | } 46 | public String getUsername() { 47 | return username; 48 | } 49 | public void setUsername(String username) { 50 | this.username = username; 51 | } 52 | public String getPassword() { 53 | return password; 54 | } 55 | public void setPassword(String password) { 56 | this.password = password; 57 | } 58 | public String getGender() { 59 | return gender; 60 | } 61 | public void setGender(String gender) { 62 | this.gender = gender; 63 | } 64 | public String getPhone() { 65 | return phone; 66 | } 67 | public void setPhone(String phone) { 68 | this.phone = phone; 69 | } 70 | public String getEmail() { 71 | return email; 72 | } 73 | public void setEmail(String email) { 74 | this.email = email; 75 | } 76 | public int getTotalScore() { 77 | return totalScore; 78 | } 79 | public void setTotalScore(int totalScore) { 80 | this.totalScore = totalScore; 81 | } 82 | public int getAppraiseNum() { 83 | return appraiseNum; 84 | } 85 | public void setAppraiseNum(int appraiseNum) { 86 | this.appraiseNum = appraiseNum; 87 | } 88 | public int getPermission() { 89 | return permission; 90 | } 91 | public void setPermission(int permission) { 92 | this.permission = permission; 93 | } 94 | public User(int uid, String password) { 95 | super(); 96 | this.uid = uid; 97 | this.password = password; 98 | } 99 | public User(int uid) { 100 | super(); 101 | this.uid = uid; 102 | } 103 | 104 | 105 | } 106 | -------------------------------------------------------------------------------- /src/service/.gitignore: -------------------------------------------------------------------------------- 1 | /impl/ 2 | -------------------------------------------------------------------------------- /src/service/AdminService.java: -------------------------------------------------------------------------------- 1 | package service; 2 | 3 | import entity.Admin; 4 | 5 | public interface AdminService { 6 | public Admin findByAdminname(String adminName); 7 | } 8 | -------------------------------------------------------------------------------- /src/service/PositionService.java: -------------------------------------------------------------------------------- 1 | package service; 2 | 3 | import java.util.List; 4 | 5 | import entity.Position; 6 | 7 | public interface PositionService { 8 | public List findAll(); 9 | 10 | public boolean deletePositionById(int pid); 11 | 12 | public boolean updatePosition(Position position); 13 | 14 | public boolean addPosition(Position position); 15 | 16 | public Position findPositionById(int pid); 17 | 18 | public Position findPositionByName(String pname); 19 | } 20 | -------------------------------------------------------------------------------- /src/service/ReceiveOrdersService.java: -------------------------------------------------------------------------------- 1 | package service; 2 | 3 | import java.util.List; 4 | 5 | import entity.ReceiveOrders; 6 | 7 | public interface ReceiveOrdersService { 8 | 9 | public boolean save(ReceiveOrders receiveOrders); 10 | 11 | public boolean deleteById(Integer id); 12 | 13 | public boolean update(ReceiveOrders receiveOrders); 14 | 15 | public int count(); 16 | 17 | public List findAll(); 18 | 19 | public ReceiveOrders findById(Integer id); 20 | 21 | public List findByUid(Integer uid); 22 | 23 | public boolean findByUOid(Integer uid, Integer oid); 24 | 25 | public List findByOid(Integer oid); 26 | 27 | public boolean updateByStatus(Integer status,Integer id); 28 | 29 | public int countByStatus(Integer status); 30 | } 31 | -------------------------------------------------------------------------------- /src/service/ReleaseOrdersService.java: -------------------------------------------------------------------------------- 1 | package service; 2 | 3 | import java.util.List; 4 | 5 | import entity.ReleaseOrders; 6 | import utils.PageBean; 7 | 8 | public interface ReleaseOrdersService { 9 | public boolean save(ReleaseOrders releaseOrders); 10 | 11 | public boolean update(ReleaseOrders releaseOrders); 12 | 13 | public List findAll(); 14 | 15 | public boolean deleteById(Integer id); 16 | 17 | public ReleaseOrders findById(Integer id); 18 | 19 | public List findByTitle(String title); 20 | 21 | public List findByPid(Integer pid); 22 | 23 | public List findBySid(Integer sid); 24 | 25 | public List findBySidAndPid(Integer sid,Integer pid); 26 | 27 | public List findByPiTi(Integer pid,String title); 28 | 29 | public List findBySiTi(Integer sid,String title); 30 | 31 | public List findBySiPiTi(Integer sid,Integer pid,String title); 32 | 33 | 34 | /** 35 | * 分页查询 36 | * @param pid 37 | * @param currentPage 38 | * @param pageSize 39 | * @return 40 | */ 41 | //public List findByPage(int currentPage, int pageSize); 42 | public PageBean findByPidPageBean(Integer pid,Integer currentPage, Integer pageSize); 43 | 44 | public PageBean findBySidPageBean(Integer sid,Integer currentPage, Integer pageSize); 45 | 46 | public PageBean findBySidAndPidPageBean(Integer sid,Integer pid,Integer currentPage, Integer pageSize); 47 | 48 | public PageBean findByPiTiPageBean(Integer pid,String title,Integer currentPage, Integer pageSize); 49 | 50 | public PageBean findBySiTiPageBean(Integer sid,String title,Integer currentPage, Integer pageSize); 51 | 52 | public PageBean findBySiPiTiPageBean(Integer sid,Integer pid,String title,Integer currentPage, Integer pageSize); 53 | 54 | 55 | 56 | 57 | public PageBean findByPageBean(Integer currentPage, Integer pageSize); 58 | 59 | public PageBean findByTitlePageBean(String title,Integer currentPage, Integer pageSize); 60 | 61 | public int count(); 62 | 63 | public int countByUid(Integer uid); 64 | 65 | public List findThree(Integer uid); 66 | 67 | public List findByUid(Integer uid); 68 | 69 | public boolean deleteByUid(Integer uid); 70 | } 71 | -------------------------------------------------------------------------------- /src/service/SchoolService.java: -------------------------------------------------------------------------------- 1 | package service; 2 | 3 | import java.util.List; 4 | 5 | import entity.School; 6 | 7 | public interface SchoolService { 8 | public List findAll(); 9 | 10 | public School findById(int sid); 11 | 12 | public boolean addSchool(School school); 13 | 14 | public boolean deleteSchoolById(int sid); 15 | 16 | public boolean updateSchool(School school); 17 | 18 | public School findBySname(String sname); 19 | } 20 | -------------------------------------------------------------------------------- /src/service/TestPositionServiceImpl.java: -------------------------------------------------------------------------------- 1 | package service; 2 | 3 | public class TestPositionServiceImpl { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /src/service/TestReceiveOrdersServiceImpl.java: -------------------------------------------------------------------------------- 1 | package service; 2 | 3 | public class TestReceiveOrdersServiceImpl { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /src/service/TestReleaseOrdersServiceImpl.java: -------------------------------------------------------------------------------- 1 | package service; 2 | 3 | public class TestReleaseOrdersServiceImpl { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /src/service/TestSchoolServiceImpl.java: -------------------------------------------------------------------------------- 1 | package service; 2 | 3 | public class TestSchoolServiceImpl { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /src/service/TestUserServiceImpl.java: -------------------------------------------------------------------------------- 1 | package service; 2 | 3 | public class TestUserServiceImpl { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /src/service/UserService.java: -------------------------------------------------------------------------------- 1 | package service; 2 | 3 | import java.util.List; 4 | 5 | import entity.User; 6 | 7 | public interface UserService { 8 | //查询所有用户 9 | public List findAll(); 10 | 11 | //通过Id查询用户 12 | public User findUserById(int uid); 13 | 14 | //通过用户名查询用户 15 | public List findByUsername(String username); 16 | 17 | // //通过用户名查找用户是否存在 18 | // public int isExit(String username); 19 | // 20 | // //判断用户名密码是否正确 21 | // public int isValid(User user); 22 | 23 | //添加用户 24 | public boolean addUser(User user); 25 | 26 | //通过id删除用户 27 | public boolean deleteById(int uid); 28 | 29 | // //通过用户名修改用户基本信息 30 | // public int updateUserByUsername(User user); 31 | 32 | //通过Id修改用户基本信息 33 | public boolean updateUser(User user); 34 | 35 | //通过Id修改用户密码 36 | public boolean updatePwd(Integer uid,String password); 37 | 38 | // 分页查找所有用户 39 | // public List findAllUsersByPage(); 40 | 41 | public boolean countByPhone(String phone); 42 | 43 | public boolean countByUserName(String username); 44 | 45 | public int count(); 46 | 47 | public User findUserByUsername(String username); 48 | 49 | public int findTotalScore(Integer uid); 50 | 51 | 52 | public int findAppraiseNum(Integer uid); 53 | } 54 | -------------------------------------------------------------------------------- /src/service/impl/AdminServiceImpl.java: -------------------------------------------------------------------------------- 1 | package service.impl; 2 | 3 | import dao.AdminDAO; 4 | import dao.impl.AdminDAOImpl; 5 | import entity.Admin; 6 | import service.AdminService; 7 | 8 | public class AdminServiceImpl implements AdminService{ 9 | public AdminDAO adminDAO=new AdminDAOImpl(); 10 | @Override 11 | public Admin findByAdminname(String adminName) { 12 | Admin admin = adminDAO.findByAdminname(adminName); 13 | return admin; 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/service/impl/PositionServiceImpl.java: -------------------------------------------------------------------------------- 1 | package service.impl; 2 | 3 | import java.util.List; 4 | 5 | import dao.PositionDAO; 6 | import dao.impl.PositionDAOImpl; 7 | import entity.Position; 8 | import service.PositionService; 9 | 10 | public class PositionServiceImpl implements PositionService { 11 | PositionDAO positionDAO = new PositionDAOImpl(); 12 | @Override 13 | public List findAll() { 14 | List list = positionDAO.findAll(); 15 | return list; 16 | } 17 | 18 | @Override 19 | public boolean deletePositionById(int pid) { 20 | int i = positionDAO.deletePositionById(pid); 21 | return i==1?true:false; 22 | } 23 | 24 | @Override 25 | public boolean updatePosition(Position position) { 26 | int i = positionDAO.updatePosition(position); 27 | return i==1?true:false; 28 | } 29 | 30 | @Override 31 | public boolean addPosition(Position position) { 32 | int i = positionDAO.addPosition(position); 33 | return i==1?true:false; 34 | } 35 | 36 | @Override 37 | public Position findPositionById(int pid) { 38 | Position position = positionDAO.findPositionById(pid); 39 | return position; 40 | } 41 | 42 | @Override 43 | public Position findPositionByName(String pname) { 44 | Position position = positionDAO.findPositionByName(pname); 45 | return position; 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /src/service/impl/ReceiveOrdersServiceImpl.java: -------------------------------------------------------------------------------- 1 | package service.impl; 2 | 3 | import java.util.List; 4 | 5 | import dao.ReceiveOrdersDAO; 6 | import dao.impl.ReceiveOrdersDAOImpl; 7 | import entity.ReceiveOrders; 8 | import service.ReceiveOrdersService; 9 | import service.ReleaseOrdersService; 10 | 11 | public class ReceiveOrdersServiceImpl implements ReceiveOrdersService{ 12 | ReceiveOrdersDAO receiveOrdersDAO =new ReceiveOrdersDAOImpl(); 13 | 14 | @Override 15 | public boolean save(ReceiveOrders receiveOrders) { 16 | int i = receiveOrdersDAO.save(receiveOrders); 17 | return i==1?true:false; 18 | } 19 | 20 | @Override 21 | public boolean deleteById(Integer id) { 22 | int i = receiveOrdersDAO.deleteById(id); 23 | return i==1?true:false; 24 | } 25 | 26 | @Override 27 | public boolean update(ReceiveOrders receiveOrders) { 28 | int i = receiveOrdersDAO.update(receiveOrders); 29 | return i==1?true:false; 30 | } 31 | 32 | @Override 33 | public int count() { 34 | int i = receiveOrdersDAO.count(); 35 | return i; 36 | } 37 | 38 | @Override 39 | public List findAll() { 40 | List list = receiveOrdersDAO.findAll(); 41 | return list; 42 | } 43 | 44 | @Override 45 | public ReceiveOrders findById(Integer id) { 46 | ReceiveOrders orders = receiveOrdersDAO.findById(id); 47 | return orders; 48 | } 49 | 50 | @Override 51 | public List findByUid(Integer uid) { 52 | List list= receiveOrdersDAO.findByUid(uid); 53 | return list; 54 | } 55 | 56 | @Override 57 | public boolean findByUOid(Integer uid, Integer oid) { 58 | int i = receiveOrdersDAO.findByUOid(uid, oid); 59 | return i==1?true:false; 60 | } 61 | 62 | @Override 63 | public List findByOid(Integer oid) { 64 | List list= receiveOrdersDAO.findByOid(oid); 65 | return list; 66 | } 67 | 68 | @Override 69 | public boolean updateByStatus(Integer status, Integer id) { 70 | int i = receiveOrdersDAO.updateByStatus(status, id); 71 | return i==1?true:false; 72 | } 73 | 74 | @Override 75 | public int countByStatus(Integer status) { 76 | int count = receiveOrdersDAO.countByStatus(status); 77 | return count; 78 | } 79 | 80 | } 81 | -------------------------------------------------------------------------------- /src/service/impl/SchoolServiceImpl.java: -------------------------------------------------------------------------------- 1 | package service.impl; 2 | 3 | import java.util.List; 4 | 5 | import dao.SchoolDAO; 6 | import dao.impl.SchoolDAOImpl; 7 | import entity.School; 8 | import service.SchoolService; 9 | 10 | public class SchoolServiceImpl implements SchoolService { 11 | SchoolDAO schoolDAO = new SchoolDAOImpl(); 12 | @Override 13 | public List findAll() { 14 | List list = schoolDAO.findAll(); 15 | return list; 16 | } 17 | 18 | @Override 19 | public School findById(int sid) { 20 | School school = schoolDAO.findById(sid); 21 | return school; 22 | } 23 | 24 | @Override 25 | public boolean addSchool(School school) { 26 | int i = schoolDAO.addSchool(school); 27 | return i==1?true:false; 28 | } 29 | 30 | @Override 31 | public boolean deleteSchoolById(int sid) { 32 | int i = schoolDAO.deleteSchoolById(sid); 33 | return i==1?true:false; 34 | } 35 | 36 | @Override 37 | public boolean updateSchool(School school) { 38 | int i = schoolDAO.updateSchool(school); 39 | return i==1?true:false; 40 | } 41 | 42 | @Override 43 | public School findBySname(String sname) { 44 | School school = schoolDAO.findBySname(sname); 45 | return school; 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /src/service/impl/UserServiceImpl.java: -------------------------------------------------------------------------------- 1 | package service.impl; 2 | 3 | import java.util.List; 4 | 5 | import dao.UserDAO; 6 | import dao.impl.UserDAOImpl; 7 | import entity.User; 8 | import service.UserService; 9 | 10 | public class UserServiceImpl implements UserService { 11 | UserDAO userDAO = new UserDAOImpl(); 12 | @Override 13 | public List findAll() { 14 | List list = userDAO.findAll(); 15 | return list; 16 | } 17 | 18 | @Override 19 | public User findUserById(int uid) { 20 | User user = userDAO.findUserById(uid); 21 | return user; 22 | } 23 | 24 | @Override 25 | public List findByUsername(String username) { 26 | List list = userDAO.findByUsername(username); 27 | return list; 28 | } 29 | 30 | @Override 31 | public boolean addUser(User user) { 32 | int i = userDAO.addUser(user); 33 | return i==1?true:false; 34 | } 35 | 36 | @Override 37 | public boolean deleteById(int uid) { 38 | int i = userDAO.deleteById(uid); 39 | return i==1?true:false; 40 | } 41 | 42 | @Override 43 | public boolean updateUser(User user) { 44 | int i = userDAO.updateUser(user); 45 | return i==1?true:false; 46 | } 47 | 48 | @Override 49 | public boolean updatePwd(Integer uid,String password) { 50 | int i = userDAO.updatePwd(uid,password); 51 | return i==1?true:false; 52 | } 53 | 54 | @Override 55 | public boolean countByPhone(String phone) { 56 | int i = userDAO.countByPhone(phone); 57 | return i==0?true:false; 58 | } 59 | 60 | @Override 61 | public boolean countByUserName(String username) { 62 | int i = userDAO.countByUserName(username); 63 | return i==1?false:true; 64 | } 65 | 66 | @Override 67 | public int count() { 68 | int count = userDAO.count(); 69 | return count; 70 | } 71 | 72 | @Override 73 | public User findUserByUsername(String username) { 74 | User user =userDAO.findUserByUsername( username); 75 | return user; 76 | } 77 | 78 | @Override 79 | public int findTotalScore(Integer uid) { 80 | int totalScore = userDAO.findTotalScore(uid); 81 | return totalScore; 82 | } 83 | 84 | @Override 85 | public int findAppraiseNum(Integer uid) { 86 | int appraiseNum = userDAO.findAppraiseNum(uid); 87 | return appraiseNum; 88 | } 89 | 90 | } 91 | -------------------------------------------------------------------------------- /src/utils/DBUtil.java: -------------------------------------------------------------------------------- 1 | package utils; 2 | 3 | import java.sql.Connection; 4 | import java.sql.DriverManager; 5 | import java.sql.PreparedStatement; 6 | import java.sql.ResultSet; 7 | import java.sql.SQLException; 8 | import java.util.ResourceBundle; 9 | 10 | import javax.sql.rowset.CachedRowSet; 11 | import javax.sql.rowset.RowSetFactory; 12 | import javax.sql.rowset.RowSetProvider; 13 | 14 | public class DBUtil { 15 | // 驱动名子 16 | // private final static String driverName = "com.mysql.jdbc.Driver"; 17 | // // 数据库连接地址 18 | // private final static String url = 19 | // "jdbc:mysql://localhost:3306/zjweu?useUnicode=true&chanacterEncoding=utf8&useSSL=false"; 20 | // // 数据用户名 21 | // private final static String username = "root"; 22 | // private final static String password = "123456"; 23 | 24 | private static String driverName; 25 | // 数据库连接地址 26 | private static String url; 27 | // 数据用户名 28 | private static String username; 29 | private static String password; 30 | 31 | private Connection connection = null; 32 | private PreparedStatement preparedStatement = null; 33 | private ResultSet resultSet = null; 34 | 35 | static { 36 | ResourceBundle resourceBundle = ResourceBundle.getBundle("db"); 37 | driverName = resourceBundle.getString("driverName"); 38 | url = resourceBundle.getString("url"); 39 | username = resourceBundle.getString("username"); 40 | password = resourceBundle.getString("password"); 41 | } 42 | 43 | // 更新数据库操作->insert/update/delete 44 | public int update(String sql, Object... params) { 45 | int r = 0; 46 | try { 47 | getConnection(); 48 | preparedStatement = connection.prepareStatement(sql); 49 | // 设置参数 50 | if (params != null) { 51 | // 不定参数是被当成数组使用 52 | for (int i = 0; i < params.length; i++) { 53 | preparedStatement.setObject(i + 1, params[i]); 54 | 55 | } 56 | } 57 | r = preparedStatement.executeUpdate(); 58 | } catch (SQLException e) { 59 | e.printStackTrace(); 60 | } finally { 61 | if (preparedStatement != null) 62 | try { 63 | preparedStatement.close(); 64 | } catch (SQLException e) { 65 | e.printStackTrace(); 66 | } 67 | if (connection != null) { 68 | try { 69 | connection.close(); 70 | } catch (SQLException e) { 71 | e.printStackTrace(); 72 | 73 | } 74 | } 75 | } 76 | return r; 77 | } 78 | 79 | public CachedRowSet query(String sql, Object... params) { 80 | CachedRowSet cachedRowSet = null; 81 | try { 82 | 83 | getConnection(); 84 | 85 | // 工厂类 86 | RowSetFactory factory = RowSetProvider.newFactory(); 87 | cachedRowSet = factory.createCachedRowSet(); 88 | 89 | // 通过免ai语句生成预编译的操作语句 90 | preparedStatement = connection.prepareStatement(sql); 91 | // 设置参数 92 | if (params != null) { 93 | // 不定参数是被当成数组使用 94 | for (int i = 0; i < params.length; i++) { 95 | preparedStatement.setObject(i + 1, params[i]); 96 | 97 | } 98 | } 99 | // 设置参数(参数位置,参数值) 100 | resultSet = preparedStatement.executeQuery(); 101 | 102 | cachedRowSet.populate(resultSet); 103 | 104 | } catch (SQLException e) { 105 | e.printStackTrace(); 106 | } finally { 107 | close(); 108 | } 109 | return cachedRowSet; 110 | } 111 | 112 | public CachedRowSet queryByPage(String sql, int currentPage, int pageSize, Object... params) { 113 | getConnection(); 114 | CachedRowSet cachedRowSet = null; 115 | try { 116 | preparedStatement = connection.prepareStatement(sql); 117 | if (params != null) { 118 | for (int i = 0; i < params.length; i++) { 119 | preparedStatement.setObject(i + 1, params[i]); 120 | 121 | } 122 | } 123 | 124 | resultSet = preparedStatement.executeQuery(); 125 | RowSetFactory factory = RowSetProvider.newFactory(); 126 | cachedRowSet = factory.createCachedRowSet(); 127 | if (pageSize < 1) 128 | pageSize = 1; 129 | if (currentPage < 1) 130 | currentPage = 1; 131 | cachedRowSet.setPageSize(pageSize); 132 | cachedRowSet.populate(resultSet, (currentPage - 1) * pageSize + 1); 133 | 134 | } catch (Exception e) { 135 | e.printStackTrace(); 136 | } finally { 137 | close(); 138 | } 139 | return cachedRowSet; 140 | } 141 | 142 | public void close() { 143 | if (resultSet != null) { 144 | try { 145 | resultSet.close(); 146 | } catch (SQLException e) { 147 | e.printStackTrace(); 148 | } 149 | } 150 | if (preparedStatement != null) { 151 | try { 152 | preparedStatement.close(); 153 | } catch (SQLException e) { 154 | // TODO Auto-generated catch block e•printStackTrace(); 155 | } 156 | } 157 | if (connection != null) { 158 | try { 159 | connection.close(); 160 | } catch (SQLException e) { 161 | e.printStackTrace(); 162 | } 163 | } 164 | } 165 | 166 | public Connection getConnection() { 167 | // 不要使用单例 168 | // Connection资源是最宝贵的,一般来说会占用大多数的操作时间,所以Connection—定要关闭回收。 169 | try { 170 | Class.forName(driverName); 171 | connection = DriverManager.getConnection(url, username, password); 172 | // 事务处理 173 | // connection.setAutoCommit(false); 174 | // connection.commit(); 175 | // connection.rollback(); 176 | } catch (ClassNotFoundException | SQLException e) { 177 | e.printStackTrace(); 178 | } 179 | return connection; 180 | } 181 | } 182 | -------------------------------------------------------------------------------- /src/utils/PageBean.java: -------------------------------------------------------------------------------- 1 | package utils; 2 | 3 | import java.util.List; 4 | 5 | public class PageBean { 6 | //已知数据 7 | private int currentPage; //当前页,从请求那边传过来。 8 | private int pageSize; //每页显示的数据条数。 9 | private int totalRecord; //总的记录条数。查询数据库得到的数据 10 | //需要计算得来 11 | private int totalPage; //总页数,通过totalRecord和pageSize计算可以得来 12 | //开始索引,也就是我们在数据库中要从第几行数据开始拿,有了startIndex和pageSize, 13 | //就知道了limit语句的两个数据,就能获得每页需要显示的数据了 14 | private int startIndex; 15 | //将每页要显示的数据放在list集合中 16 | private List list; 17 | 18 | //分页显示的页数,比如在页面上显示1,2,3,4,5页,start就为1,end就为5,这个也是算过来的 19 | private int start; 20 | private int end; 21 | 22 | //通过pageNum,pageSize,totalRecord计算得来tatalPage和startIndex 23 | //构造方法中将pageNum,pageSize,totalRecord获得 24 | public PageBean(int currentPage,int pageSize,int totalRecord) { 25 | this.currentPage = currentPage; 26 | this.pageSize = pageSize; 27 | this.totalRecord = totalRecord; 28 | 29 | //totalPage 总页数 30 | if(totalRecord%pageSize==0){ 31 | //说明整除,正好每页显示pageSize条数据,没有多余一页要显示少于pageSize条数据的 32 | this.totalPage = totalRecord / pageSize; 33 | }else{ 34 | //不整除,就要在加一页,来显示多余的数据。 35 | this.totalPage = totalRecord / pageSize +1; 36 | } 37 | //开始索引 38 | this.startIndex = (currentPage-1)*pageSize ; 39 | //显示5页,这里自己可以设置,想显示几页就自己通过下面算法修改 40 | this.start = 1; 41 | this.end = 9; 42 | //显示页数的算法 43 | 44 | if(totalPage <=9){ 45 | //总页数都小于5,那么end就为总页数的值了。 46 | this.end = this.totalPage; 47 | }else{ 48 | //总页数大于5,那么就要根据当前是第几页,来判断start和end为多少了, 49 | this.start = currentPage - 4; 50 | this.end = currentPage + 4; 51 | 52 | if(start < 0){ 53 | //比如当前页是第1页,或者第2页,那么就不如和这个规则, 54 | this.start = 1; 55 | this.end = 9; 56 | } 57 | if(end > this.totalPage){ 58 | //比如当前页是倒数第2页或者最后一页,也同样不符合上面这个规则 59 | this.end = totalPage; 60 | this.start = end - 9; 61 | } 62 | } 63 | } 64 | //get、set方法。 65 | public int getCurrentPage() { 66 | return currentPage; 67 | } 68 | 69 | public void setCurrentPage(int currentPage) { 70 | this.currentPage = currentPage; 71 | } 72 | 73 | public int getPageSize() { 74 | return pageSize; 75 | } 76 | 77 | public void setPageSize(int pageSize) { 78 | this.pageSize = pageSize; 79 | } 80 | 81 | public int getTotalRecord() { 82 | return totalRecord; 83 | } 84 | 85 | public void setTotalRecord(int totalRecord) { 86 | this.totalRecord = totalRecord; 87 | } 88 | 89 | public int getTotalPage() { 90 | return totalPage; 91 | } 92 | 93 | public void setTotalPage(int totalPage) { 94 | this.totalPage = totalPage; 95 | } 96 | 97 | public int getStartIndex() { 98 | return startIndex; 99 | } 100 | 101 | public void setStartIndex(int startIndex) { 102 | this.startIndex = startIndex; 103 | } 104 | 105 | public List getList() { 106 | return list; 107 | } 108 | 109 | public void setList(List list) { 110 | this.list = list; 111 | } 112 | 113 | public int getStart() { 114 | return start; 115 | } 116 | 117 | public void setStart(int start) { 118 | this.start = start; 119 | } 120 | 121 | public int getEnd() { 122 | return end; 123 | } 124 | 125 | public void setEnd(int end) { 126 | this.end = end; 127 | } 128 | 129 | 130 | } --------------------------------------------------------------------------------