diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 8ab5285..0000000 --- a/.gitignore +++ /dev/null @@ -1,34 +0,0 @@ -HELP.md -target/ -!.mvn/wrapper/maven-wrapper.jar -!**/src/main/**/target/ -!**/src/test/**/target/ - -### STS ### -.apt_generated -.classpath -.factorypath -.project -.settings -.springBeans -.sts4-cache -bin - -### IntelliJ IDEA ### -.idea -*.iws -*.iml -*.ipr - -### NetBeans ### -/nbproject/private/ -/nbbuild/ -/dist/ -/nbdist/ -/.nb-gradle/ -build/ -!**/src/main/**/build/ -!**/src/test/**/build/ - -### VS Code ### -.vscode/ diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 261eeb9..0000000 --- a/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/README.md b/README.md deleted file mode 100644 index 6cb0e2f..0000000 --- a/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# c7-523 - diff --git a/src/main/java/com/qsd/orange/config/SpringSecurityConfig.java b/config/SpringSecurityConfig.java similarity index 100% rename from src/main/java/com/qsd/orange/config/SpringSecurityConfig.java rename to config/SpringSecurityConfig.java diff --git a/src/main/java/com/qsd/orange/config/WebConfig.java b/config/WebConfig.java similarity index 100% rename from src/main/java/com/qsd/orange/config/WebConfig.java rename to config/WebConfig.java diff --git a/src/main/java/com/qsd/orange/controller/AnnouncementController.java b/controller/AnnouncementController.java similarity index 100% rename from src/main/java/com/qsd/orange/controller/AnnouncementController.java rename to controller/AnnouncementController.java diff --git a/src/main/java/com/qsd/orange/controller/CarController.java b/controller/CarController.java similarity index 100% rename from src/main/java/com/qsd/orange/controller/CarController.java rename to controller/CarController.java diff --git a/src/main/java/com/qsd/orange/controller/CheckController.java b/controller/CheckController.java similarity index 100% rename from src/main/java/com/qsd/orange/controller/CheckController.java rename to controller/CheckController.java diff --git a/src/main/java/com/qsd/orange/controller/CustomerController.java b/controller/CustomerController.java similarity index 100% rename from src/main/java/com/qsd/orange/controller/CustomerController.java rename to controller/CustomerController.java diff --git a/src/main/java/com/qsd/orange/controller/RentController.java b/controller/RentController.java similarity index 100% rename from src/main/java/com/qsd/orange/controller/RentController.java rename to controller/RentController.java diff --git a/src/main/java/com/qsd/orange/controller/RouteController.java b/controller/RouteController.java similarity index 100% rename from src/main/java/com/qsd/orange/controller/RouteController.java rename to controller/RouteController.java diff --git a/src/main/java/com/qsd/orange/controller/StatisticsController.java b/controller/StatisticsController.java similarity index 100% rename from src/main/java/com/qsd/orange/controller/StatisticsController.java rename to controller/StatisticsController.java diff --git a/src/main/java/com/qsd/orange/controller/SystemAnnouncementController.java b/controller/SystemAnnouncementController.java similarity index 100% rename from src/main/java/com/qsd/orange/controller/SystemAnnouncementController.java rename to controller/SystemAnnouncementController.java diff --git a/src/main/java/com/qsd/orange/controller/SystemCarController.java b/controller/SystemCarController.java similarity index 100% rename from src/main/java/com/qsd/orange/controller/SystemCarController.java rename to controller/SystemCarController.java diff --git a/src/main/java/com/qsd/orange/controller/SystemCheckController.java b/controller/SystemCheckController.java similarity index 100% rename from src/main/java/com/qsd/orange/controller/SystemCheckController.java rename to controller/SystemCheckController.java diff --git a/src/main/java/com/qsd/orange/controller/SystemRentController.java b/controller/SystemRentController.java similarity index 100% rename from src/main/java/com/qsd/orange/controller/SystemRentController.java rename to controller/SystemRentController.java diff --git a/src/main/java/com/qsd/orange/controller/SystemResourceController.java b/controller/SystemResourceController.java similarity index 100% rename from src/main/java/com/qsd/orange/controller/SystemResourceController.java rename to controller/SystemResourceController.java diff --git a/src/main/java/com/qsd/orange/controller/SystemUserController.java b/controller/SystemUserController.java similarity index 100% rename from src/main/java/com/qsd/orange/controller/SystemUserController.java rename to controller/SystemUserController.java diff --git a/src/main/java/com/qsd/orange/controller/UserController.java b/controller/UserController.java similarity index 100% rename from src/main/java/com/qsd/orange/controller/UserController.java rename to controller/UserController.java diff --git a/pom.xml b/pom.xml deleted file mode 100644 index 76e7e84..0000000 --- a/pom.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - 4.0.0 - - org.springframework.boot - spring-boot-starter-parent - 2.3.4.RELEASE - - - com.qsd - orangecar - 1.0 - orange_car - 橘子汽车出租系统 - - - 1.8 - - - - - - org.springframework.boot - spring-boot-starter-jdbc - - - org.springframework.boot - spring-boot-starter-thymeleaf - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-devtools - - - - - mysql - mysql-connector-java - - - com.baomidou - mybatis-plus-boot-starter - 3.4.0 - - - - org.hibernate.validator - hibernate-validator - - - - cn.hutool - hutool-all - 5.4.2 - - - - org.springframework.boot - spring-boot-starter-security - - - org.springframework.boot - spring-boot-starter-test - test - - - org.junit.vintage - junit-vintage-engine - - - - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - - - diff --git a/src/main/java/com/qsd/orange/Application.java b/src/main/java/com/qsd/orange/Application.java deleted file mode 100644 index dcdca1c..0000000 --- a/src/main/java/com/qsd/orange/Application.java +++ /dev/null @@ -1,15 +0,0 @@ - - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.transaction.annotation.EnableTransactionManagement; - -@SpringBootApplication -@EnableTransactionManagement -public class Application { - - public static void main(String[] args) { - SpringApplication.run(Application.class, args); - } - -} diff --git a/src/main/java/com/qsd/orange/dao/AnnouncementDao.java b/src/main/java/com/qsd/orange/dao/AnnouncementDao.java deleted file mode 100644 index 5727b68..0000000 --- a/src/main/java/com/qsd/orange/dao/AnnouncementDao.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.qsd.orange.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.qsd.orange.po.SysAnnouncement; -import org.apache.ibatis.annotations.Mapper; - -@Mapper -public interface AnnouncementDao extends BaseMapper { -} diff --git a/src/main/java/com/qsd/orange/dao/CarDao.java b/src/main/java/com/qsd/orange/dao/CarDao.java deleted file mode 100644 index 134a554..0000000 --- a/src/main/java/com/qsd/orange/dao/CarDao.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.qsd.orange.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.qsd.orange.po.BusCar; -import org.apache.ibatis.annotations.Mapper; - - -@Mapper -public interface CarDao extends BaseMapper { -} diff --git a/src/main/java/com/qsd/orange/dao/CheckDao.java b/src/main/java/com/qsd/orange/dao/CheckDao.java deleted file mode 100644 index 9991f8d..0000000 --- a/src/main/java/com/qsd/orange/dao/CheckDao.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.qsd.orange.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.qsd.orange.po.BusCheck; -import org.apache.ibatis.annotations.Mapper; - -@Mapper -public interface CheckDao extends BaseMapper { -} diff --git a/src/main/java/com/qsd/orange/dao/CustomerDao.java b/src/main/java/com/qsd/orange/dao/CustomerDao.java deleted file mode 100644 index 07d53de..0000000 --- a/src/main/java/com/qsd/orange/dao/CustomerDao.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.qsd.orange.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.qsd.orange.po.BusCustomer; -import org.apache.ibatis.annotations.Mapper; - -@Mapper -public interface CustomerDao extends BaseMapper { -} diff --git a/src/main/java/com/qsd/orange/dao/RentDao.java b/src/main/java/com/qsd/orange/dao/RentDao.java deleted file mode 100644 index 501f7e2..0000000 --- a/src/main/java/com/qsd/orange/dao/RentDao.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.qsd.orange.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.qsd.orange.po.BusRent; -import org.apache.ibatis.annotations.Mapper; - - -@Mapper -public interface RentDao extends BaseMapper { - - String selectCarNumber(String id); - -} diff --git a/src/main/java/com/qsd/orange/dao/StatisticsDao.java b/src/main/java/com/qsd/orange/dao/StatisticsDao.java deleted file mode 100644 index 5652e02..0000000 --- a/src/main/java/com/qsd/orange/dao/StatisticsDao.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.qsd.orange.dao; - -import com.qsd.orange.vo.StatisticsVo; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -@Mapper -public interface StatisticsDao { - - /** - * 获取地区统计 - * */ - List getRegionVo(); - /** - * 业务员年度销售额 - * @param year 年份 - * */ - List getSalesman(@Param("year") String year); - - List getCompany(@Param("year") String year); -} diff --git a/src/main/java/com/qsd/orange/dao/UserDao.java b/src/main/java/com/qsd/orange/dao/UserDao.java deleted file mode 100644 index 5ab92f8..0000000 --- a/src/main/java/com/qsd/orange/dao/UserDao.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.qsd.orange.dao; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.qsd.orange.po.SysUser; -import org.apache.ibatis.annotations.Mapper; - - -@Mapper -public interface UserDao extends BaseMapper { - - SysUser selectOneById(String username); - -} diff --git a/src/main/java/com/qsd/orange/exception/LoginException.java b/src/main/java/com/qsd/orange/exception/LoginException.java deleted file mode 100644 index c4cc36d..0000000 --- a/src/main/java/com/qsd/orange/exception/LoginException.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.qsd.orange.exception; - -import com.qsd.orange.global.HttpResult; -import com.qsd.orange.global.R; -import org.springframework.security.core.userdetails.UsernameNotFoundException; -import org.springframework.web.bind.annotation.ControllerAdvice; -import org.springframework.web.bind.annotation.ExceptionHandler; - - -@ControllerAdvice -public class LoginException { - - @ExceptionHandler(UsernameNotFoundException.class) - public R usernameNotFoundException(){ - return R.error(HttpResult.USERNAME_OR_PASSWORD_ERROR); - } - -} diff --git a/src/main/java/com/qsd/orange/exception/ParamException.java b/src/main/java/com/qsd/orange/exception/ParamException.java deleted file mode 100644 index 863ad59..0000000 --- a/src/main/java/com/qsd/orange/exception/ParamException.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.qsd.orange.exception; - -import com.qsd.orange.global.HttpResult; -import com.qsd.orange.global.R; -import org.springframework.web.bind.MissingServletRequestParameterException; -import org.springframework.web.bind.annotation.ExceptionHandler; -import org.springframework.web.bind.annotation.RestControllerAdvice; - -@RestControllerAdvice -public class ParamException { - - @ExceptionHandler(MissingServletRequestParameterException.class) - public R missingServletRequestParameterException(MissingServletRequestParameterException e){ - return R.error(HttpResult.PARAM_LACK); - } - -} diff --git a/src/main/java/com/qsd/orange/exception/ValidationException.java b/src/main/java/com/qsd/orange/exception/ValidationException.java deleted file mode 100644 index df9f14b..0000000 --- a/src/main/java/com/qsd/orange/exception/ValidationException.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.qsd.orange.exception; - -import com.qsd.orange.global.HttpResult; -import com.qsd.orange.global.R; -import org.springframework.validation.BindException; -import org.springframework.web.bind.MethodArgumentNotValidException; -import org.springframework.web.bind.annotation.ExceptionHandler; -import org.springframework.web.bind.annotation.RestControllerAdvice; - -import javax.validation.UnexpectedTypeException; - -@RestControllerAdvice -public class ValidationException { - - @ExceptionHandler({ - MethodArgumentNotValidException.class, - BindException.class, - UnexpectedTypeException.class - }) - public R validation(){ - return R.error(HttpResult.PARAM_ERROR); - } - -} diff --git a/src/main/java/com/qsd/orange/global/HttpResult.java b/src/main/java/com/qsd/orange/global/HttpResult.java deleted file mode 100644 index beea782..0000000 --- a/src/main/java/com/qsd/orange/global/HttpResult.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.qsd.orange.global; - -public enum HttpResult { - - SUCCESS(200, "成功"), - UN_AUTHORIZED(403, "权限错误"), - NOT_FOUND(404, "资源未找到"), - SERVER_ERROR(500, "服务器错误"), - USERNAME_OR_PASSWORD_ERROR(501, "用户名或密码错误"), - CAR_IS_RENTING(502, "车辆已被出租"), - USER_INFO_ERROR(503, "用户信息错误"), - PARAM_ERROR(504, "参数错误"), - DATE_ERROR(505, "参数日期错误"), - CAR_IS_RETURN(506, "车辆已归还"), - PARAM_LACK(507, "参数缺少"), - PASSWORD_NOT_SAME(508, "新密码与旧密码不能相同"); - - private Integer code; - private String message; - - HttpResult(Integer code, String message) { - this.code = code; - this.message = message; - } - - public Integer getCode() { - return code; - } - - public void setCode(Integer code) { - this.code = code; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } -} diff --git a/src/main/java/com/qsd/orange/global/R.java b/src/main/java/com/qsd/orange/global/R.java deleted file mode 100644 index cca3134..0000000 --- a/src/main/java/com/qsd/orange/global/R.java +++ /dev/null @@ -1,113 +0,0 @@ -package com.qsd.orange.global; - -import java.util.HashMap; -import java.util.Map; - -import com.baomidou.mybatisplus.core.metadata.IPage; - - -public class R { - - private Boolean success; - private Integer code; - private String message; - private Map data = new HashMap(); - - private R() { - } - - public R success(Boolean success) { - this.setSuccess(success); - return this; - } - - public R message(String message) { - this.setMessage(message); - return this; - } - - public R code(Integer code) { - this.setCode(code); - return this; - } - - public R data(String key, Object value) { - this.data.put(key, value); - return this; - } - - public R data(Map map) { - this.setData(map); - return this; - } - - public R page(IPage page) { - this.data("total", page.getTotal()).data("record", page.getRecords()); - return this; - } - - public Boolean getSuccess() { - return success; - } - - public void setSuccess(Boolean success) { - this.success = success; - } - - public Integer getCode() { - return code; - } - - public void setCode(Integer code) { - this.code = code; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public Map getData() { - return data; - } - - public void setData(Map data) { - this.data = data; - } - - public static R choose(boolean flag) { - if (flag) { - return success(); - } else { - return error(); - } - } - - public static R success() { - R r = new R(); - r.setSuccess(true); - r.setCode(200); - r.setMessage("成功"); - return r; - } - - public static R error() { - R r = new R(); - r.setSuccess(false); - r.setCode(500); - r.setMessage("失败"); - return r; - } - - public static R error(HttpResult result) { - R r = new R(); - r.setSuccess(false); - r.setCode(result.getCode()); - r.setMessage(result.getMessage()); - return r; - } - -} diff --git a/src/main/java/com/qsd/orange/po/BusCar.java b/src/main/java/com/qsd/orange/po/BusCar.java deleted file mode 100644 index 0b83238..0000000 --- a/src/main/java/com/qsd/orange/po/BusCar.java +++ /dev/null @@ -1,125 +0,0 @@ -package com.qsd.orange.po; - -import java.io.Serializable; -import java.sql.Timestamp; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.fasterxml.jackson.annotation.JsonFormat; - -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Null; - -/** - * 汽车表 - */ -@TableName("bus_car") -public class BusCar implements Serializable { - - private static final long serialVersionUID = 7074654537514458969L; - @TableId(type = IdType.NONE) - @NotBlank - private String number; - @NotBlank - private String brand; - @NotBlank - private String color; - @TableField("buy_price") - @NotNull - private Double buyPrice; - @TableField("rent_price") - @NotNull - private Double rentPrice; - //押金 - @NotNull - private Double deposit; - //出租状态 - @Null - private Integer status; - @NotBlank - private String description; - @NotBlank - private String image; - @Null - @JsonFormat(pattern="yyyy-MM-dd HH:mm", timezone="GMT+8") - private Timestamp created; - @Null - private String operator; - @Null - private Integer exist; - public String getNumber() { - return number; - } - public void setNumber(String number) { - this.number = number; - } - public String getBrand() { - return brand; - } - public void setBrand(String brand) { - this.brand = brand; - } - public String getColor() { - return color; - } - public void setColor(String color) { - this.color = color; - } - public Double getBuyPrice() { - return buyPrice; - } - public void setBuyPrice(Double buyPrice) { - this.buyPrice = buyPrice; - } - public Double getRentPrice() { - return rentPrice; - } - public void setRentPrice(Double rentPrice) { - this.rentPrice = rentPrice; - } - public Double getDeposit() { - return deposit; - } - public void setDeposit(Double deposit) { - this.deposit = deposit; - } - public Integer getStatus() { - return status; - } - public void setStatus(Integer status) { - this.status = status; - } - public String getDescription() { - return description; - } - public void setDescription(String description) { - this.description = description; - } - public String getImage() { - return image; - } - public void setImage(String image) { - this.image = image; - } - public Timestamp getCreated() { - return created; - } - public void setCreated(Timestamp created) { - this.created = created; - } - public String getOperator() { - return operator; - } - public void setOperator(String operator) { - this.operator = operator; - } - public Integer getExist() { - return exist; - } - public void setExist(Integer exist) { - this.exist = exist; - } -} diff --git a/src/main/java/com/qsd/orange/po/BusCheck.java b/src/main/java/com/qsd/orange/po/BusCheck.java deleted file mode 100644 index 28f7d53..0000000 --- a/src/main/java/com/qsd/orange/po/BusCheck.java +++ /dev/null @@ -1,74 +0,0 @@ -package com.qsd.orange.po; - -import java.io.Serializable; -import java.sql.Timestamp; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.fasterxml.jackson.annotation.JsonFormat; - -/** - * 还车表 - */ -@TableName("bus_check") -public class BusCheck implements Serializable { - - private static final long serialVersionUID = 7083995801146703176L; - @TableId(type = IdType.NONE) - private String id; - @TableField("check_date") - @JsonFormat(pattern="yyyy-MM-dd HH:mm", timezone="GMT+8") - private Timestamp checkDate; - private String description; - private String problem; - private Double compensate; - private String operator; - @TableField("rent_id") - private String rentId; - public String getId() { - return id; - } - public void setId(String id) { - this.id = id; - } - public Timestamp getCheckDate() { - return checkDate; - } - public void setCheckDate(Timestamp checkDate) { - this.checkDate = checkDate; - } - public String getDescription() { - return description; - } - public void setDescription(String description) { - this.description = description; - } - public String getProblem() { - return problem; - } - public void setProblem(String problem) { - this.problem = problem; - } - public Double getCompensate() { - return compensate; - } - public void setCompensate(Double compensate) { - this.compensate = compensate; - } - public String getOperator() { - return operator; - } - public void setOperator(String operator) { - this.operator = operator; - } - public String getRentId() { - return rentId; - } - public void setRentId(String rentId) { - this.rentId = rentId; - } - - -} diff --git a/src/main/java/com/qsd/orange/po/BusCustomer.java b/src/main/java/com/qsd/orange/po/BusCustomer.java deleted file mode 100644 index da7e488..0000000 --- a/src/main/java/com/qsd/orange/po/BusCustomer.java +++ /dev/null @@ -1,96 +0,0 @@ -package com.qsd.orange.po; - -import java.io.Serializable; -import java.sql.Timestamp; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.fasterxml.jackson.annotation.JsonFormat; - -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.Null; - -/** - * 客户表 - */ -@TableName("bus_customer") -public class BusCustomer implements Serializable { - - private static final long serialVersionUID = 6658064314710608402L; - @TableId(type = IdType.NONE) - @NotBlank - private String identity; - @NotBlank - private String name; - private Integer gender; - private String address; - private String phone; - private String career; - @JsonFormat(pattern="yyyy-MM-dd HH:mm", timezone="GMT+8") - @Null - private Timestamp created; - @Null - private Boolean exist; - @Null - private String operator; - - public String getIdentity() { - return identity; - } - public void setIdentity(String identity) { - this.identity = identity; - } - public String getName() { - return name; - } - public void setName(String name) { - this.name = name; - } - public Integer getGender() { - return gender; - } - public void setGender(Integer gender) { - this.gender = gender; - } - public String getAddress() { - return address; - } - public void setAddress(String address) { - this.address = address; - } - public String getPhone() { - return phone; - } - public void setPhone(String phone) { - this.phone = phone; - } - public String getCareer() { - return career; - } - public void setCareer(String career) { - this.career = career; - } - public Timestamp getCreated() { - return created; - } - public void setCreated(Timestamp created) { - this.created = created; - } - - public Boolean getExist() { - return exist; - } - - public void setExist(Boolean exist) { - this.exist = exist; - } - - public String getOperator() { - return operator; - } - - public void setOperator(String operator) { - this.operator = operator; - } -} diff --git a/src/main/java/com/qsd/orange/po/BusRent.java b/src/main/java/com/qsd/orange/po/BusRent.java deleted file mode 100644 index 0ae6601..0000000 --- a/src/main/java/com/qsd/orange/po/BusRent.java +++ /dev/null @@ -1,102 +0,0 @@ -package com.qsd.orange.po; - -import java.io.Serializable; -import java.sql.Date; -import java.sql.Timestamp; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.fasterxml.jackson.annotation.JsonFormat; - -/** - * 出租单号 - */ -@TableName("bus_rent") -public class BusRent implements Serializable { - - private static final long serialVersionUID = 6129197607180087634L; - @TableId(type = IdType.NONE) - private String id; - private Double price; - @TableField("begin_time") - @JsonFormat(pattern="yyyy-MM-dd", timezone="GMT+8") - private Date beginTime; - @TableField("return_time") - @JsonFormat(pattern="yyyy-MM-dd", timezone="GMT+8") - private Date returnTime; - @TableField("real_time") - @JsonFormat(pattern="yyyy-MM-dd HH:mm", timezone="GMT+8") - private Timestamp realTime; - @TableField("rent_status") - private Integer rentStatus; - @TableField("customer_identity") - private String customerIdentity; - @TableField("car_number") - private String carNumber; - private String operator; - private Timestamp created; - - public String getId() { - return id; - } - public void setId(String id) { - this.id = id; - } - public Double getPrice() { - return price; - } - public void setPrice(Double price) { - this.price = price; - } - public Date getBeginTime() { - return beginTime; - } - public void setBeginTime(Date beginTime) { - this.beginTime = beginTime; - } - public Date getReturnTime() { - return returnTime; - } - public void setReturnTime(Date returnTime) { - this.returnTime = returnTime; - } - public Timestamp getRealTime() { - return realTime; - } - public void setRealTime(Timestamp realTime) { - this.realTime = realTime; - } - public Integer getRentStatus() { - return rentStatus; - } - public void setRentStatus(Integer rentStatus) { - this.rentStatus = rentStatus; - } - public String getCustomerIdentity() { - return customerIdentity; - } - public void setCustomerIdentity(String customerIdentity) { - this.customerIdentity = customerIdentity; - } - public String getCarNumber() { - return carNumber; - } - public void setCarNumber(String carNumber) { - this.carNumber = carNumber; - } - public String getOperator() { - return operator; - } - public void setOperator(String operator) { - this.operator = operator; - } - public Timestamp getCreated() { - return created; - } - public void setCreated(Timestamp created) { - this.created = created; - } - -} diff --git a/src/main/java/com/qsd/orange/po/SysAnnouncement.java b/src/main/java/com/qsd/orange/po/SysAnnouncement.java deleted file mode 100644 index 16e4e40..0000000 --- a/src/main/java/com/qsd/orange/po/SysAnnouncement.java +++ /dev/null @@ -1,64 +0,0 @@ -package com.qsd.orange.po; - -import java.io.Serializable; -import java.sql.Timestamp; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.fasterxml.jackson.annotation.JsonFormat; - -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.Null; - -/** - * 系统通知 - */ -@TableName("sys_announcement") -public class SysAnnouncement implements Serializable { - - private static final long serialVersionUID = 4845165626198699466L; - @TableId(type = IdType.AUTO) - @Null - private Integer id; - @NotBlank - private String title; - @NotBlank - private String content; - @JsonFormat(pattern="yyyy-MM-dd HH:mm", timezone="GMT+8") - @Null - private Timestamp created; - @Null - private String operator; - public Integer getId() { - return id; - } - public void setId(Integer id) { - this.id = id; - } - public String getTitle() { - return title; - } - public void setTitle(String title) { - this.title = title; - } - public String getContent() { - return content; - } - public void setContent(String content) { - this.content = content; - } - public Timestamp getCreated() { - return created; - } - public void setCreated(Timestamp created) { - this.created = created; - } - public String getOperator() { - return operator; - } - public void setOperator(String operator) { - this.operator = operator; - } - -} diff --git a/src/main/java/com/qsd/orange/po/SysUser.java b/src/main/java/com/qsd/orange/po/SysUser.java deleted file mode 100644 index e91d67e..0000000 --- a/src/main/java/com/qsd/orange/po/SysUser.java +++ /dev/null @@ -1,92 +0,0 @@ -package com.qsd.orange.po; - -import java.io.Serializable; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; - -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.Null; - -/** - * 用户表 - */ -@TableName("sys_user") -public class SysUser implements Serializable { - - private static final long serialVersionUID = 5546148053917409573L; - @TableId(type = IdType.NONE) - @NotBlank - private String username; - @Null - private String password; - @NotBlank - private String identity; - @NotBlank - private String name; - private Integer gender; - private String address; - private String phone; - private String position; - @Null - private Integer type; - - public String getUsername() { - return username; - } - public void setUsername(String username) { - this.username = username; - } - public String getPassword() { - return password; - } - public void setPassword(String password) { - this.password = password; - } - public String getIdentity() { - return identity; - } - public void setIdentity(String identity) { - this.identity = identity; - } - public String getName() { - return name; - } - public void setName(String name) { - this.name = name; - } - public Integer getGender() { - return gender; - } - public void setGender(Integer gender) { - this.gender = gender; - } - public String getAddress() { - return address; - } - public void setAddress(String address) { - this.address = address; - } - public String getPhone() { - return phone; - } - public void setPhone(String phone) { - this.phone = phone; - } - public String getPosition() { - return position; - } - public void setPosition(String position) { - this.position = position; - } - public Integer getType() { - return type; - } - public void setType(Integer type) { - this.type = type; - } - - - -} diff --git a/src/main/java/com/qsd/orange/security/AccessFailureHandler.java b/src/main/java/com/qsd/orange/security/AccessFailureHandler.java deleted file mode 100644 index 9f05d8d..0000000 --- a/src/main/java/com/qsd/orange/security/AccessFailureHandler.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.qsd.orange.security; - -import cn.hutool.json.JSONUtil; -import com.qsd.orange.global.HttpResult; -import com.qsd.orange.global.R; -import org.springframework.security.access.AccessDeniedException; -import org.springframework.security.web.access.AccessDeniedHandler; -import org.springframework.stereotype.Component; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; - -/** - * 认证失败处理器 - */ -@Component -public class AccessFailureHandler implements AccessDeniedHandler { - - @Override - public void handle(HttpServletRequest request, HttpServletResponse response, AccessDeniedException accessDeniedException) throws IOException, ServletException { - accessDeniedException.printStackTrace(); - response.setHeader("Content-Type", "application/json;charset=utf-8"); - response.getWriter().print(JSONUtil.parseObj(R.error(HttpResult.UN_AUTHORIZED)).toJSONString(4)); - } - -} diff --git a/src/main/java/com/qsd/orange/security/LoginFailureHandler.java b/src/main/java/com/qsd/orange/security/LoginFailureHandler.java deleted file mode 100644 index 3ebdf84..0000000 --- a/src/main/java/com/qsd/orange/security/LoginFailureHandler.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.qsd.orange.security; - -import cn.hutool.json.JSONUtil; -import com.qsd.orange.global.HttpResult; -import com.qsd.orange.global.R; -import org.springframework.security.core.AuthenticationException; -import org.springframework.security.web.authentication.AuthenticationFailureHandler; -import org.springframework.stereotype.Controller; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; - -@Controller -public class LoginFailureHandler implements AuthenticationFailureHandler { - - @Override - public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response, AuthenticationException exception) throws IOException, ServletException { - response.setCharacterEncoding("utf-8"); - response.setContentType("application/json;charset=utf-8"); - response.getWriter().print(JSONUtil.toJsonStr(R.error(HttpResult.USERNAME_OR_PASSWORD_ERROR))); - } - -} diff --git a/src/main/java/com/qsd/orange/security/LoginSuccessHandler.java b/src/main/java/com/qsd/orange/security/LoginSuccessHandler.java deleted file mode 100644 index e619b11..0000000 --- a/src/main/java/com/qsd/orange/security/LoginSuccessHandler.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.qsd.orange.security; - -import cn.hutool.json.JSONUtil; -import com.qsd.orange.global.R; -import org.springframework.security.core.Authentication; -import org.springframework.security.web.authentication.AuthenticationSuccessHandler; -import org.springframework.stereotype.Controller; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; - -@Controller -public class LoginSuccessHandler implements AuthenticationSuccessHandler { - - @Override - public void onAuthenticationSuccess(HttpServletRequest request, - HttpServletResponse response, - Authentication authentication) throws IOException, ServletException { - response.setCharacterEncoding("utf-8"); - response.setContentType("application/json;charset=utf-8"); - response.getWriter().print(JSONUtil.toJsonStr(R.success())); - } - -} diff --git a/src/main/java/com/qsd/orange/service/AnnouncementService.java b/src/main/java/com/qsd/orange/service/AnnouncementService.java deleted file mode 100644 index f1e4e2b..0000000 --- a/src/main/java/com/qsd/orange/service/AnnouncementService.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.qsd.orange.service; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.qsd.orange.po.SysAnnouncement; - -public interface AnnouncementService { - - //查询全部公告 - IPage all(Integer page, Integer limit); - //新增一条公告 - int add(SysAnnouncement announcement, String username); - //更新一条公告 - int update(SysAnnouncement announcement); - -} diff --git a/src/main/java/com/qsd/orange/service/CarService.java b/src/main/java/com/qsd/orange/service/CarService.java deleted file mode 100644 index c85ba95..0000000 --- a/src/main/java/com/qsd/orange/service/CarService.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.qsd.orange.service; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.qsd.orange.po.BusCar; - -public interface CarService { - - /** - * 查询全部汽车 - * @param page 页码 - * @param limit 每页数目 - * @param status 是否出租 - * */ - IPage queryAllCar(Integer page, Integer limit, Integer status); - /** - * 查询全部汽车 - * @param page 页码 - * @param limit 每页数目 - * @param status 是否出租 - * @param brand 汽车品牌 - * @param color 汽车颜色 - * */ - IPage queryCar(Integer page, Integer limit, Integer status, String brand, String color); - /** - * 查询全部汽车 - * 管理员 - * */ - IPage queryAllCarSys(Integer page, Integer limit, Integer status); - /** - * 查询全部汽车 - * 管理员 - * */ - IPage queryCarSys(Integer page, Integer limit, Integer status, String brand, String color); - IPage queryCarByNumber(Integer page, Integer limit, String number); - /** - * 增加一个车辆信息 - * @param username 用户名 - * @param car 汽车信息 - * */ - int add(String username, BusCar car); - /** - * 修改车辆信息 - * @param car 车辆信息 - * */ - int update(BusCar car); - /** - * 修改车辆状态,是否启用/报废 - * @param number 车牌号 - * @param exist 状态 - * */ - int updateExist(String number, Integer exist); - -} diff --git a/src/main/java/com/qsd/orange/service/CheckService.java b/src/main/java/com/qsd/orange/service/CheckService.java deleted file mode 100644 index 6785ea1..0000000 --- a/src/main/java/com/qsd/orange/service/CheckService.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.qsd.orange.service; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.qsd.orange.po.BusCheck; - -public interface CheckService { - - /** - * 汽车入库 - * @param id 出租单号 - * @param problem 存在的问题 - * @param compensate 赔偿金额 - * @param description 问题描述 - * @param operator 操作员 - * */ - int add(String id, String problem, Double compensate, String description, String operator); - /** - * 查询全部检查单 - * @param page 页码 - * @param limit 每页数目 - * */ - IPage all(Integer page, Integer limit); - /** - * 查询一个检查单 - * @param id 出租单号 - * */ - BusCheck search(String id); - -} diff --git a/src/main/java/com/qsd/orange/service/CustomerService.java b/src/main/java/com/qsd/orange/service/CustomerService.java deleted file mode 100644 index d4f0c60..0000000 --- a/src/main/java/com/qsd/orange/service/CustomerService.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.qsd.orange.service; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.qsd.orange.po.BusCustomer; - -public interface CustomerService { - - /** - * 查询全部客户,根据添加日期 - * */ - IPage queryCustomers(Integer page, Integer limit); - /** - * 查询客户根据条件,并分页 - * @param page 页码 - * @param limit 每页数目 - * @param type 查询的类型 - * @param keyword 查询的字段 - * */ - IPage queryByCustomer(Integer page, Integer limit, String type, String keyword); - /** - * 根据身份证号查询一个用户 - * */ - BusCustomer queryOne(String identity); - /** - * 增加一个客户 - * @param operator 操作人员 - * @param customer 客户信息 - * */ - int addCustomer(String operator, BusCustomer customer); - /** - * 更新客户信息 - * @param customer 客户信息 - * */ - int updateCustomer(BusCustomer customer); - -} diff --git a/src/main/java/com/qsd/orange/service/RentService.java b/src/main/java/com/qsd/orange/service/RentService.java deleted file mode 100644 index 2f375af..0000000 --- a/src/main/java/com/qsd/orange/service/RentService.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.qsd.orange.service; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.qsd.orange.po.BusRent; - -import java.util.Map; - -public interface RentService { - - /** - * 增加一张出租单 - * 首先检查车辆状态,再进行增加 - * -2:车辆未找到;-1:车辆已被出租;0:客户未查到;1:成功 - * @param identity 用户身份证 - * @param number 车牌号 - * @param username 操作员 - * @return 返回完整出租单?还是只是结果? - * */ - int add(String identity, String number, String returnTime, String username); - /** - * 查询全部的出租单 - * @param page 页码 - * @param limit 每页数目 - * */ - IPage all(Integer page, Integer limit); - /** - * 根据类型搜索出租单 - * @param page 页码 - * @param limit 每页数目 - * @param type 类型 - * @param keyword 关键字 - * */ - IPage search(Integer page, Integer limit, String type, String keyword); - /** - * 修改归还日期 - * @param id 出租单号 - * @param returnTime 新归还日期 - * @return 0:出租单未找到;-1:新归还日期少于开始日期;-2:新归还日期少于今天;1:成功;-3:参数错误 - * */ - int updateReturnTime(String id, String returnTime); - /** - * 查询出租单详情、客户详情、车辆详情 - * @param id 出租单号 - * */ - Map info(String id); - /** - * 查询全部的出租单 - * @param page 页码 - * @param limit 每页数目 - * */ - IPage sysAll(Integer page, Integer limit); - /** - * 根据类型搜索出租单 - * @param page 页码 - * @param limit 每页数目 - * @param status 出租状态 - * @param type 类型 - * @param keyword 关键字 - * */ - IPage sysSearch(Integer page, Integer limit, Integer status, String type, String keyword); - -} diff --git a/src/main/java/com/qsd/orange/service/UserService.java b/src/main/java/com/qsd/orange/service/UserService.java deleted file mode 100644 index 01dc795..0000000 --- a/src/main/java/com/qsd/orange/service/UserService.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.qsd.orange.service; - -import com.qsd.orange.po.SysUser; - -import java.util.List; - - -public interface UserService { - - /** - * 注册一个用户 - * @param user 用户信息 - * @return 1:成功,0:失败 - * */ - int add(SysUser user); - /** - * 更新用户信息 - * @param user 用户信息 - * @return 1:成功,0:失败 - * */ - int update(SysUser user); - /*** - * 更新密码 - * @param username 要更新的用户名 - * @param oldPassword 旧密码 - * @param newPassword 新密码 - * @return 0:失败,1:成功,-1:未变,-2:原密码错误 - */ - int updatePassword(String username, String oldPassword, String newPassword); - /** - * 获取用户信息 - * @param username 用户名 - * */ - SysUser getInfo(String username); - /** - * 查询全部用户,不包括管理员 - * */ - List all(); - /** - * 将用户密码重置为123456 - * @param username 用户名 - * */ - int reset(String username); - -} diff --git a/src/main/java/com/qsd/orange/service/impl/AnnouncementServiceImpl.java b/src/main/java/com/qsd/orange/service/impl/AnnouncementServiceImpl.java deleted file mode 100644 index 9c793e4..0000000 --- a/src/main/java/com/qsd/orange/service/impl/AnnouncementServiceImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.qsd.orange.service.impl; - -import cn.hutool.core.date.DateUtil; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.qsd.orange.dao.AnnouncementDao; -import com.qsd.orange.po.SysAnnouncement; -import com.qsd.orange.service.AnnouncementService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -@Service -public class AnnouncementServiceImpl implements AnnouncementService { - - @Autowired - private AnnouncementDao announcementDao; - - @Override - public IPage all(Integer page, Integer limit) { - return announcementDao.selectPage(new Page<>(page, limit), new QueryWrapper().orderByDesc("created")); - } - - @Override - public int add(SysAnnouncement announcement, String username) { - announcement.setOperator(username); - announcement.setCreated(DateUtil.date().toTimestamp()); - return announcementDao.insert(announcement); - } - - @Override - public int update(SysAnnouncement announcement) { - SysAnnouncement temp = new SysAnnouncement(); - temp.setId(announcement.getId()); - temp.setTitle(announcement.getTitle()); - temp.setContent(announcement.getContent()); - return announcementDao.updateById(temp); - } - -} diff --git a/src/main/java/com/qsd/orange/service/impl/CarServiceImpl.java b/src/main/java/com/qsd/orange/service/impl/CarServiceImpl.java deleted file mode 100644 index dcda6d6..0000000 --- a/src/main/java/com/qsd/orange/service/impl/CarServiceImpl.java +++ /dev/null @@ -1,97 +0,0 @@ -package com.qsd.orange.service.impl; - -import cn.hutool.core.date.DateUtil; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.qsd.orange.dao.CarDao; -import com.qsd.orange.po.BusCar; -import com.qsd.orange.service.CarService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -@Service -public class CarServiceImpl implements CarService { - - @Autowired - private CarDao carDao; - - @Override - public IPage queryAllCar(Integer page, Integer limit, Integer status) { - return carDao.selectPage( - new Page<>(page, limit), - new QueryWrapper() - .and(true, i -> i - .eq(status >= 0, "status", status) - .eq("exist", 1) - ).orderByDesc("created")); - } - - @Override - public IPage queryCar(Integer page, Integer limit, Integer status, String brand, String color) { - return carDao.selectPage( - new Page<>(page, limit), - new QueryWrapper() - .and(true, i -> i - .like(brand != "", "brand", brand) - .like(color != "", "color", color) - .eq("exist", 1) - ) - .orderByDesc("created")); - } - - @Override - public IPage queryAllCarSys(Integer page, Integer limit, Integer status) { - return carDao.selectPage( - new Page<>(page, limit), - new QueryWrapper().eq(status >= 0, "status", status).orderByDesc("created")); - } - - @Override - public IPage queryCarSys(Integer page, Integer limit, Integer status, String brand, String color) { - return carDao.selectPage( - new Page<>(page, limit), - new QueryWrapper() - .and(true, i -> i - .like(brand != "", "brand", brand) - .like(color != "", "color", color) - ) - .orderByDesc("created")); - } - - @Override - public IPage queryCarByNumber(Integer page, Integer limit, String number) { - return carDao.selectPage( - new Page<>(page, limit), - new QueryWrapper() - .and(true, i -> i - .eq(true, "status", 0) - .eq(!number.equals(""), "number", number) - .eq("exist", 1) - ) - .orderByDesc("created")); - } - - @Override - public int add(String username, BusCar car) { - car.setCreated(DateUtil.date().toTimestamp()); - car.setOperator(username); - car.setStatus(0); - car.setExist(1); - return carDao.insert(car); - } - - @Override - public int update(BusCar car) { - return carDao.updateById(car); - } - - @Override - public int updateExist(String number, Integer exist) { - BusCar car = new BusCar(); - car.setNumber(number); - car.setExist(exist); - return carDao.updateById(car); - } - -} diff --git a/src/main/java/com/qsd/orange/service/impl/CheckServiceImpl.java b/src/main/java/com/qsd/orange/service/impl/CheckServiceImpl.java deleted file mode 100644 index 85d1887..0000000 --- a/src/main/java/com/qsd/orange/service/impl/CheckServiceImpl.java +++ /dev/null @@ -1,78 +0,0 @@ -package com.qsd.orange.service.impl; - -import cn.hutool.core.date.DateUtil; -import cn.hutool.core.util.RandomUtil; -import cn.hutool.core.util.StrUtil; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.qsd.orange.dao.CarDao; -import com.qsd.orange.dao.CheckDao; -import com.qsd.orange.dao.RentDao; -import com.qsd.orange.po.BusCar; -import com.qsd.orange.po.BusCheck; -import com.qsd.orange.po.BusRent; -import com.qsd.orange.service.CheckService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.sql.Timestamp; - -@Service -public class CheckServiceImpl implements CheckService { - - @Autowired - private CheckDao checkDao; - @Autowired - private RentDao rentDao; - @Autowired - private CarDao carDao; - - @Override - @Transactional - public int add(String id, String problem, Double compensate, String description, String operator) { - String number = rentDao.selectCarNumber(id); - if(StrUtil.isEmpty(number)){ - return 0; - } - BusCheck check = new BusCheck(); - Timestamp returnTime = DateUtil.date().toTimestamp(); - check.setId("JC_" + DateUtil.date().toString("yyyyMMdd") + "_" + System.currentTimeMillis() + "_" + RandomUtil.randomNumbers(4)); - check.setCheckDate(returnTime); - check.setCompensate(compensate); - check.setDescription(description); - check.setProblem(problem); - check.setRentId(id); - check.setOperator(operator); - int insert = checkDao.insert(check); - if (insert > 0){ - //修改出租单状态 - BusRent rent = new BusRent(); - rent.setId(id); - rent.setRentStatus(1); - rent.setRealTime(returnTime); - rentDao.updateById(rent); - //修改车辆状态 - BusCar car = new BusCar(); - car.setNumber(number); - car.setStatus(0); - carDao.updateById(car); - } - return insert; - } - - @Override - public IPage all(Integer page, Integer limit) { - return checkDao.selectPage( - new Page<>(page, limit), - new QueryWrapper().orderByDesc("check_date") - ); - } - - @Override - public BusCheck search(String id) { - return checkDao.selectById(id); - } - -} diff --git a/src/main/java/com/qsd/orange/service/impl/CustomerServiceImpl.java b/src/main/java/com/qsd/orange/service/impl/CustomerServiceImpl.java deleted file mode 100644 index 8b28a63..0000000 --- a/src/main/java/com/qsd/orange/service/impl/CustomerServiceImpl.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.qsd.orange.service.impl; - -import cn.hutool.core.date.DateUtil; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.qsd.orange.dao.CustomerDao; -import com.qsd.orange.po.BusCustomer; -import com.qsd.orange.service.CustomerService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - - -@Service -public class CustomerServiceImpl implements CustomerService { - - @Autowired - private CustomerDao customerDao; - - @Override - public IPage queryCustomers(Integer page, Integer limit) { - return customerDao.selectPage(new Page<>(page, limit), new QueryWrapper().orderByDesc(true, "created")); - } - - @Override - public IPage queryByCustomer(Integer page, Integer limit, String type, String keyword) { - return customerDao.selectPage(new Page<>(page, limit), new QueryWrapper().like(true, type, keyword).orderByDesc(true, "created")); - } - - @Override - public BusCustomer queryOne(String identity) { - return customerDao.selectOne(new QueryWrapper().eq("identity", identity)); - } - - @Override - public int addCustomer(String operator, BusCustomer customer) { - customer.setCreated(DateUtil.date().toTimestamp()); - customer.setOperator(operator); - return customerDao.insert(customer); - } - - @Override - public int updateCustomer(BusCustomer customer) { - return customerDao.updateById(customer); - } - - -} diff --git a/src/main/java/com/qsd/orange/service/impl/RentServiceImpl.java b/src/main/java/com/qsd/orange/service/impl/RentServiceImpl.java deleted file mode 100644 index f8d36d3..0000000 --- a/src/main/java/com/qsd/orange/service/impl/RentServiceImpl.java +++ /dev/null @@ -1,154 +0,0 @@ -package com.qsd.orange.service.impl; - -import cn.hutool.core.date.DateException; -import cn.hutool.core.date.DateTime; -import cn.hutool.core.date.DateUtil; -import cn.hutool.core.util.RandomUtil; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.qsd.orange.dao.CarDao; -import com.qsd.orange.dao.CustomerDao; -import com.qsd.orange.dao.RentDao; -import com.qsd.orange.po.BusCar; -import com.qsd.orange.po.BusCustomer; -import com.qsd.orange.po.BusRent; -import com.qsd.orange.service.RentService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.HashMap; -import java.util.Map; - -@Service -public class RentServiceImpl implements RentService { - - @Autowired - private CarDao carDao; - @Autowired - private RentDao rentDao; - @Autowired - private CustomerDao customerDao; - - @Override - public int add(String identity, String number, String returnTime, String username) { - //查找车辆信息 - BusCar car = carDao.selectById(number); - if (car == null){ - return -2; - } - if (car.getStatus() == 1){ - return -1; - } - BusRent rent = new BusRent(); - rent.setCreated(DateUtil.date().toTimestamp()); - rent.setBeginTime(DateUtil.date().toSqlDate()); - rent.setRentStatus(0); - rent.setCarNumber(number); - rent.setReturnTime(DateUtil.parse(returnTime).toSqlDate()); - rent.setOperator(username); - rent.setPrice(car.getRentPrice()); - rent.setCustomerIdentity(identity); - rent.setId("CZ_" + DateUtil.date().toString("yyyyMMdd") + "_" + System.currentTimeMillis() + "_" + RandomUtil.randomNumbers(4)); - int insert = rentDao.insert(rent); - if (insert == 0){ - return 0; - } - //修改汽车状态 - BusCar busCar = new BusCar(); - busCar.setNumber(number); - busCar.setStatus(1); - return carDao.updateById(busCar); - } - - @Override - public IPage all(Integer page, Integer limit) { - return rentDao.selectPage( - new Page<>(page, limit), - new QueryWrapper() - .eq("rent_status", 0) - .orderByDesc("created")); - } - - @Override - public IPage search(Integer page, Integer limit, String type, String keyword) { - return rentDao.selectPage( - new Page<>(page, limit), - new QueryWrapper() - .and(true, i -> i - .eq("rent_status", 0) - .like(type, keyword)) - .orderByDesc("created")); - } - - @Override - public int updateReturnTime(String id, String returnTime) { - //首先获取原本开始日期、归还日期 - BusRent rent = rentDao.selectById(id); - if (rent == null){ - return 0; - } - DateTime returnDate = null; - try { - returnDate = DateUtil.parse(returnTime); - }catch (DateException e){ - return -3; - } - if (returnDate.isBefore(rent.getBeginTime())){ - return -1; - } - if (returnDate.isBefore(DateUtil.date())){ - return -2; - } - if (returnDate.compareTo(rent.getReturnTime()) == 0){ - return 1; - } - BusRent newRent = new BusRent(); - newRent.setId(id); - newRent.setReturnTime(returnDate.toSqlDate()); - //进行比对 - return rentDao.updateById(newRent); - } - - @Override - public Map info(String id) { - Map info = new HashMap<>(); - //出租单、车辆信息、客户信息 - BusRent rent = rentDao.selectById(id); - if (rent == null){ - info.put("status", 0); - return info; - } - if (rent.getRentStatus() == 1){ - info.put("status", -1); - return info; - } - info.put("status", 1); - info.put("rent", rent); - BusCustomer customer = customerDao.selectById(rent.getCustomerIdentity()); - info.put("customer", customer); - BusCar car = carDao.selectById(rent.getCarNumber()); - info.put("car", car); - return info; - } - - @Override - public IPage sysAll(Integer page, Integer limit) { - return rentDao.selectPage( - new Page<>(page, limit), - new QueryWrapper() - .orderByDesc("created")); - } - - @Override - public IPage sysSearch(Integer page, Integer limit, Integer status, String type, String keyword) { - return rentDao.selectPage( - new Page<>(page, limit), - new QueryWrapper() - .and(true, i -> i - .eq(status != 2, "rent_status", status) - .like(type, keyword)) - .orderByDesc("created")); - } - -} diff --git a/src/main/java/com/qsd/orange/service/impl/UserDetailsServiceImpl.java b/src/main/java/com/qsd/orange/service/impl/UserDetailsServiceImpl.java deleted file mode 100644 index b455856..0000000 --- a/src/main/java/com/qsd/orange/service/impl/UserDetailsServiceImpl.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.qsd.orange.service.impl; - -import com.qsd.orange.dao.UserDao; -import com.qsd.orange.po.SysUser; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.core.authority.AuthorityUtils; -import org.springframework.security.core.userdetails.User; -import org.springframework.security.core.userdetails.UserDetails; -import org.springframework.security.core.userdetails.UserDetailsService; -import org.springframework.security.core.userdetails.UsernameNotFoundException; -import org.springframework.stereotype.Service; - - -@Service -public class UserDetailsServiceImpl implements UserDetailsService { - - @Autowired - private UserDao userDao; - - @Override - public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { - SysUser user = userDao.selectById(username); - if (user == null){ - throw new UsernameNotFoundException("用户名没有找到"); - } - return new User(username, - user.getPassword(), - AuthorityUtils.commaSeparatedStringToAuthorityList("ROLE_" + user.getType().toString())); - } -} diff --git a/src/main/java/com/qsd/orange/service/impl/UserServiceImpl.java b/src/main/java/com/qsd/orange/service/impl/UserServiceImpl.java deleted file mode 100644 index 44c761c..0000000 --- a/src/main/java/com/qsd/orange/service/impl/UserServiceImpl.java +++ /dev/null @@ -1,73 +0,0 @@ -package com.qsd.orange.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.qsd.orange.dao.UserDao; -import com.qsd.orange.po.SysUser; -import com.qsd.orange.service.UserService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; -import org.springframework.stereotype.Service; - -import java.util.List; - -@Service -public class UserServiceImpl implements UserService { - - @Autowired - private UserDao userDao; - @Autowired - private BCryptPasswordEncoder passwordEncoder; - - @Override - public int add(SysUser user) { - user.setType(0); - //设置密码 - String password = passwordEncoder.encode("123456"); - user.setPassword(password); - return userDao.insert(user); - } - - @Override - public int update(SysUser user) { - return userDao.updateById(user); - } - - @Override - public int updatePassword(String username, String oldPassword, String newPassword) { - SysUser user = userDao.selectById(username); - //真实密码 - String password = user.getPassword(); - //判断原密码是否正确 - if (!passwordEncoder.matches(oldPassword, password)){ - return -2; - } - newPassword = passwordEncoder.encode(newPassword); - //判断新密码与原密码是否相同 - if (password.equals(newPassword)){ - return -1; - } - SysUser up = new SysUser(); - up.setUsername(username); - up.setPassword(newPassword); - return userDao.updateById(up); - } - - @Override - public SysUser getInfo(String username) { - return userDao.selectOneById(username); - } - - @Override - public List all() { - return userDao.selectList(new QueryWrapper().eq("type", 0)); - } - - @Override - public int reset(String username) { - SysUser user = new SysUser(); - user.setUsername(username); - user.setPassword(passwordEncoder.encode("123456")); - return userDao.updateById(user); - } - -} diff --git a/src/main/java/com/qsd/orange/vo/StatisticsVo.java b/src/main/java/com/qsd/orange/vo/StatisticsVo.java deleted file mode 100644 index eafbdc2..0000000 --- a/src/main/java/com/qsd/orange/vo/StatisticsVo.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.qsd.orange.vo; - -import java.io.Serializable; - -public class StatisticsVo implements Serializable { - - private static final long serialVersionUID = 1L; - private String name; - private Integer value; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Integer getValue() { - return value; - } - - public void setValue(Integer value) { - this.value = value; - } -} diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml deleted file mode 100644 index 93b9265..0000000 --- a/src/main/resources/application.yml +++ /dev/null @@ -1,23 +0,0 @@ -server: - port: 8081 - -spring: - application: - name: orangecar - datasource: - url: jdbc:mysql://localhost:3306/carrent?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8 - username: root - password: 599377 - driver-class-name: com.mysql.cj.jdbc.Driver - thymeleaf: - cache: false - encoding: UTF-8 - servlet: - multipart: - max-file-size: 20MB - max-request-size: 20MB - -mybatis-plus: - mapper-locations: classpath:mapper/*.xml - type-aliases-package: com.qsd.orange.po - diff --git a/src/main/resources/mapper/RentDao.xml b/src/main/resources/mapper/RentDao.xml deleted file mode 100644 index 09b8ae7..0000000 --- a/src/main/resources/mapper/RentDao.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/src/main/resources/mapper/StatisticsDao.xml b/src/main/resources/mapper/StatisticsDao.xml deleted file mode 100644 index fabcb70..0000000 --- a/src/main/resources/mapper/StatisticsDao.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/src/main/resources/mapper/UserDao.xml b/src/main/resources/mapper/UserDao.xml deleted file mode 100644 index 3c5b66d..0000000 --- a/src/main/resources/mapper/UserDao.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/src/main/resources/static/business/check.html b/src/main/resources/static/business/check.html deleted file mode 100644 index 78e46fe..0000000 --- a/src/main/resources/static/business/check.html +++ /dev/null @@ -1,277 +0,0 @@ - - - - - 橘子汽车租赁 - - - - - - - -
-
-
-
查询条件
-
-
-
- -
- -
- -
-
-
-
-
-
- -
-
-
生成检查单
-
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
-
-
- -
- -
-
-
-
-
-
- - -
-
-
-
-
-
-
- -
-
-
-
车辆信息
-
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
-
-
-
-
-
-
出租单信息
-
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
-
-
-
-
-
-
客户信息
-
-
-
- -
- -
-
-
- -
- -
-
-
- -
- - - -
-
-
- -
- -
-
-
-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src/main/resources/static/business/rent.html b/src/main/resources/static/business/rent.html deleted file mode 100644 index f46afb3..0000000 --- a/src/main/resources/static/business/rent.html +++ /dev/null @@ -1,336 +0,0 @@ - - - - - 橘子汽车租赁 - - - - - -
-
-
-
查询条件
-
-
-
- -
- -
- -
-
-
-
-
-
-
-
车辆列表
-
- -
-
- -
- -
- -
-
- -
-
-
-
-
- - - - - - - \ No newline at end of file diff --git a/src/main/resources/static/business/rents.html b/src/main/resources/static/business/rents.html deleted file mode 100644 index 20bcd7c..0000000 --- a/src/main/resources/static/business/rents.html +++ /dev/null @@ -1,212 +0,0 @@ - - - - - 橘子汽车租赁 - - - - - -
-
-
查询条件
-
-
-
- -
- -
-
-
- -
- - - -
-
-
-
- - -
-
-
-
-
-
-
-
-
-
出租单管理
-
-
-
-
-
-
- - - - - \ No newline at end of file diff --git a/src/main/resources/static/car.html b/src/main/resources/static/car.html deleted file mode 100644 index 174d263..0000000 --- a/src/main/resources/static/car.html +++ /dev/null @@ -1,172 +0,0 @@ - - - - - 橘子汽车租赁 - - - - - -
-
-
-
查询条件
-
-
-
- -
- - - -
-
-
- -
- -
-
-
- -
- -
-
-
-
- - -
-
-
-
-
-
-
-
-
车辆列表
-
- -
-
-
-
-
- - - - \ No newline at end of file diff --git a/src/main/resources/static/carhome.html b/src/main/resources/static/carhome.html deleted file mode 100644 index 133b624..0000000 --- a/src/main/resources/static/carhome.html +++ /dev/null @@ -1,1078 +0,0 @@ - - - - - - - -
- - - - - - - - - - \ No newline at end of file diff --git a/src/main/resources/static/error/403.html b/src/main/resources/static/error/403.html deleted file mode 100644 index 68ba8f2..0000000 --- a/src/main/resources/static/error/403.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - Title - - -没有权限 - - \ No newline at end of file diff --git a/src/main/resources/static/favicon.ico b/src/main/resources/static/favicon.ico deleted file mode 100644 index 7a85d65..0000000 Binary files a/src/main/resources/static/favicon.ico and /dev/null differ diff --git a/src/main/resources/static/home.html b/src/main/resources/static/home.html deleted file mode 100644 index cf73621..0000000 --- a/src/main/resources/static/home.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - 橘子汽车租赁 - - - - - -
-
-
-
公司公告
-
-
-
-
-
-
-
-
当前日历
-
-
-
-
-
-
-
-
当前时间
-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src/main/resources/static/image/ad.png b/src/main/resources/static/image/ad.png deleted file mode 100644 index 4069598..0000000 Binary files a/src/main/resources/static/image/ad.png and /dev/null differ diff --git a/src/main/resources/static/image/boat-1.jpg b/src/main/resources/static/image/boat-1.jpg deleted file mode 100644 index 807270e..0000000 Binary files a/src/main/resources/static/image/boat-1.jpg and /dev/null differ diff --git a/src/main/resources/static/image/boat-2.jpg b/src/main/resources/static/image/boat-2.jpg deleted file mode 100644 index 8999710..0000000 Binary files a/src/main/resources/static/image/boat-2.jpg and /dev/null differ diff --git a/src/main/resources/static/image/boat-3.jpg b/src/main/resources/static/image/boat-3.jpg deleted file mode 100644 index 7970ec9..0000000 Binary files a/src/main/resources/static/image/boat-3.jpg and /dev/null differ diff --git a/src/main/resources/static/image/boat-4.jpg b/src/main/resources/static/image/boat-4.jpg deleted file mode 100644 index 7582e32..0000000 Binary files a/src/main/resources/static/image/boat-4.jpg and /dev/null differ diff --git a/src/main/resources/static/image/destination-1.jpg b/src/main/resources/static/image/destination-1.jpg deleted file mode 100644 index 3252f6c..0000000 Binary files a/src/main/resources/static/image/destination-1.jpg and /dev/null differ diff --git a/src/main/resources/static/image/destination-2.jpg b/src/main/resources/static/image/destination-2.jpg deleted file mode 100644 index b5d54c5..0000000 Binary files a/src/main/resources/static/image/destination-2.jpg and /dev/null differ diff --git a/src/main/resources/static/image/destination-3.jpg b/src/main/resources/static/image/destination-3.jpg deleted file mode 100644 index 3e5e648..0000000 Binary files a/src/main/resources/static/image/destination-3.jpg and /dev/null differ diff --git a/src/main/resources/static/image/destination-4.jpg b/src/main/resources/static/image/destination-4.jpg deleted file mode 100644 index f0ce8ed..0000000 Binary files a/src/main/resources/static/image/destination-4.jpg and /dev/null differ diff --git a/src/main/resources/static/image/destination-5.jpg b/src/main/resources/static/image/destination-5.jpg deleted file mode 100644 index 2f39b79..0000000 Binary files a/src/main/resources/static/image/destination-5.jpg and /dev/null differ diff --git a/src/main/resources/static/image/dfb.png b/src/main/resources/static/image/dfb.png deleted file mode 100644 index afb0bed..0000000 Binary files a/src/main/resources/static/image/dfb.png and /dev/null differ diff --git a/src/main/resources/static/image/drg.png b/src/main/resources/static/image/drg.png deleted file mode 100644 index 175e562..0000000 Binary files a/src/main/resources/static/image/drg.png and /dev/null differ diff --git a/src/main/resources/static/image/eq.png b/src/main/resources/static/image/eq.png deleted file mode 100644 index 602726e..0000000 Binary files a/src/main/resources/static/image/eq.png and /dev/null differ diff --git a/src/main/resources/static/image/est.png b/src/main/resources/static/image/est.png deleted file mode 100644 index 8ee8f25..0000000 Binary files a/src/main/resources/static/image/est.png and /dev/null differ diff --git a/src/main/resources/static/image/fse.png b/src/main/resources/static/image/fse.png deleted file mode 100644 index 6e268db..0000000 Binary files a/src/main/resources/static/image/fse.png and /dev/null differ diff --git a/src/main/resources/static/image/g.png b/src/main/resources/static/image/g.png deleted file mode 100644 index f191387..0000000 Binary files a/src/main/resources/static/image/g.png and /dev/null differ diff --git a/src/main/resources/static/image/gh.png b/src/main/resources/static/image/gh.png deleted file mode 100644 index b4f9d11..0000000 Binary files a/src/main/resources/static/image/gh.png and /dev/null differ diff --git a/src/main/resources/static/image/hd.png b/src/main/resources/static/image/hd.png deleted file mode 100644 index fc38dbb..0000000 Binary files a/src/main/resources/static/image/hd.png and /dev/null differ diff --git a/src/main/resources/static/image/hero-background.jpg b/src/main/resources/static/image/hero-background.jpg deleted file mode 100644 index 92814b4..0000000 Binary files a/src/main/resources/static/image/hero-background.jpg and /dev/null differ diff --git a/src/main/resources/static/image/hero-background11.jpg b/src/main/resources/static/image/hero-background11.jpg deleted file mode 100644 index f04ef4b..0000000 Binary files a/src/main/resources/static/image/hero-background11.jpg and /dev/null differ diff --git a/src/main/resources/static/image/hero-background2 (2).jpg b/src/main/resources/static/image/hero-background2 (2).jpg deleted file mode 100644 index dabb73d..0000000 Binary files a/src/main/resources/static/image/hero-background2 (2).jpg and /dev/null differ diff --git a/src/main/resources/static/image/hero-background2.jpg b/src/main/resources/static/image/hero-background2.jpg deleted file mode 100644 index 8f520f1..0000000 Binary files a/src/main/resources/static/image/hero-background2.jpg and /dev/null differ diff --git a/src/main/resources/static/image/hm.png b/src/main/resources/static/image/hm.png deleted file mode 100644 index ab776bc..0000000 Binary files a/src/main/resources/static/image/hm.png and /dev/null differ diff --git a/src/main/resources/static/image/icon-boat.png b/src/main/resources/static/image/icon-boat.png deleted file mode 100644 index 77f48c2..0000000 Binary files a/src/main/resources/static/image/icon-boat.png and /dev/null differ diff --git a/src/main/resources/static/image/jg.png b/src/main/resources/static/image/jg.png deleted file mode 100644 index eab9b78..0000000 Binary files a/src/main/resources/static/image/jg.png and /dev/null differ diff --git a/src/main/resources/static/image/jyg.png b/src/main/resources/static/image/jyg.png deleted file mode 100644 index a8a4629..0000000 Binary files a/src/main/resources/static/image/jyg.png and /dev/null differ diff --git a/src/main/resources/static/image/qweq.png b/src/main/resources/static/image/qweq.png deleted file mode 100644 index fec0cde..0000000 Binary files a/src/main/resources/static/image/qweq.png and /dev/null differ diff --git a/src/main/resources/static/image/rent-boat-background.jpg b/src/main/resources/static/image/rent-boat-background.jpg deleted file mode 100644 index 1a03488..0000000 Binary files a/src/main/resources/static/image/rent-boat-background.jpg and /dev/null differ diff --git a/src/main/resources/static/image/rent-boat-background1.jpg b/src/main/resources/static/image/rent-boat-background1.jpg deleted file mode 100644 index 9ca5620..0000000 Binary files a/src/main/resources/static/image/rent-boat-background1.jpg and /dev/null differ diff --git a/src/main/resources/static/image/rent-boat-background11.jpg b/src/main/resources/static/image/rent-boat-background11.jpg deleted file mode 100644 index bf14ca3..0000000 Binary files a/src/main/resources/static/image/rent-boat-background11.jpg and /dev/null differ diff --git a/src/main/resources/static/image/rqw.png b/src/main/resources/static/image/rqw.png deleted file mode 100644 index b2a0929..0000000 Binary files a/src/main/resources/static/image/rqw.png and /dev/null differ diff --git a/src/main/resources/static/image/site-identity.png b/src/main/resources/static/image/site-identity.png deleted file mode 100644 index 7c83a4d..0000000 Binary files a/src/main/resources/static/image/site-identity.png and /dev/null differ diff --git a/src/main/resources/static/image/sound-off.png b/src/main/resources/static/image/sound-off.png deleted file mode 100644 index 1c304b7..0000000 Binary files a/src/main/resources/static/image/sound-off.png and /dev/null differ diff --git a/src/main/resources/static/image/sound-on.png b/src/main/resources/static/image/sound-on.png deleted file mode 100644 index e8147ec..0000000 Binary files a/src/main/resources/static/image/sound-on.png and /dev/null differ diff --git a/src/main/resources/static/image/tencent.png b/src/main/resources/static/image/tencent.png deleted file mode 100644 index 5230e34..0000000 Binary files a/src/main/resources/static/image/tencent.png and /dev/null differ diff --git a/src/main/resources/static/image/wa.png b/src/main/resources/static/image/wa.png deleted file mode 100644 index bec23fb..0000000 Binary files a/src/main/resources/static/image/wa.png and /dev/null differ diff --git a/src/main/resources/static/image/wda.png b/src/main/resources/static/image/wda.png deleted file mode 100644 index 69a4b10..0000000 Binary files a/src/main/resources/static/image/wda.png and /dev/null differ diff --git a/src/main/resources/static/image/wechat.png b/src/main/resources/static/image/wechat.png deleted file mode 100644 index b5ba953..0000000 Binary files a/src/main/resources/static/image/wechat.png and /dev/null differ diff --git a/src/main/resources/static/image/weibo.png b/src/main/resources/static/image/weibo.png deleted file mode 100644 index d2b965f..0000000 Binary files a/src/main/resources/static/image/weibo.png and /dev/null differ diff --git a/src/main/resources/static/image/ygg.png b/src/main/resources/static/image/ygg.png deleted file mode 100644 index 4170fdb..0000000 Binary files a/src/main/resources/static/image/ygg.png and /dev/null differ diff --git a/src/main/resources/static/login.html b/src/main/resources/static/login.html deleted file mode 100644 index bfd37d7..0000000 --- a/src/main/resources/static/login.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - 橙子汽车租赁 - - - - - - - - -
-
登录
-
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
-
- -
-
- -
-
-
- - - - \ No newline at end of file diff --git a/src/main/resources/static/statistics/company.html b/src/main/resources/static/statistics/company.html deleted file mode 100644 index 52e5860..0000000 --- a/src/main/resources/static/statistics/company.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - 公司年度月份销售额 - - - - - - -
-
-
-
- -
-
-
- -
-
- -
-
-
- -
-
-
-
-
- - - \ No newline at end of file diff --git a/src/main/resources/static/statistics/region.html b/src/main/resources/static/statistics/region.html deleted file mode 100644 index bbeb739..0000000 --- a/src/main/resources/static/statistics/region.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - 客户地区统计 - - - - - - -
-
-
-
-
-
-
-
-
- - - \ No newline at end of file diff --git a/src/main/resources/static/statistics/salesman.html b/src/main/resources/static/statistics/salesman.html deleted file mode 100644 index 8c9ce3a..0000000 --- a/src/main/resources/static/statistics/salesman.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - 业务员年度销售额 - - - - - - -
-
-
-
- -
-
-
- -
-
- -
-
-
- -
-
-
-
-
- - - \ No newline at end of file diff --git a/src/main/resources/static/system/announcement.html b/src/main/resources/static/system/announcement.html deleted file mode 100644 index ebe0077..0000000 --- a/src/main/resources/static/system/announcement.html +++ /dev/null @@ -1,199 +0,0 @@ - - - - - 橘子汽车租赁 - - - - - - -
-
-
-
公告管理
-
-
-
-
-
-
- - - - - - \ No newline at end of file diff --git a/src/main/resources/static/system/car.html b/src/main/resources/static/system/car.html deleted file mode 100644 index 88c34d3..0000000 --- a/src/main/resources/static/system/car.html +++ /dev/null @@ -1,421 +0,0 @@ - - - - - 橘子汽车租赁 - - - - - -
-
-
-
查询条件
-
-
-
- -
- - - -
-
-
- -
- -
-
-
- -
- -
-
-
-
- - -
-
-
-
-
-
-
-
-
车辆列表
-
- -
-
-
-
-
- - - - - - - - \ No newline at end of file diff --git a/src/main/resources/static/system/check.html b/src/main/resources/static/system/check.html deleted file mode 100644 index df313dc..0000000 --- a/src/main/resources/static/system/check.html +++ /dev/null @@ -1,145 +0,0 @@ - - - - - 橘子汽车租赁 - - - - - -
-
-
-
查询条件
-
-
-
- -
- -
- -
-
-
-
-
-
-
-
检查单管理
-
-
-
-
-
-
- - - - \ No newline at end of file diff --git a/src/main/resources/static/system/rent.html b/src/main/resources/static/system/rent.html deleted file mode 100644 index 2dc29bc..0000000 --- a/src/main/resources/static/system/rent.html +++ /dev/null @@ -1,124 +0,0 @@ - - - - - 橘子汽车租赁 - - - - - -
-
-
查询条件
-
-
-
- -
- -
-
-
- -
- - - -
-
-
- -
- - - -
-
-
-
- - -
-
-
-
-
-
-
-
-
-
出租单管理
-
-
-
-
-
-
- - - \ No newline at end of file diff --git a/src/main/resources/static/system/user.html b/src/main/resources/static/system/user.html deleted file mode 100644 index 2cc7f51..0000000 --- a/src/main/resources/static/system/user.html +++ /dev/null @@ -1,261 +0,0 @@ - - - - - 橘子汽车租赁 - - - - -
-
-
-
全部用户
-
- -
-
-
-
-
- - - - - - - - \ No newline at end of file diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html deleted file mode 100644 index 120ac55..0000000 --- a/src/main/resources/templates/index.html +++ /dev/null @@ -1,147 +0,0 @@ - - - - - 阿耀汽车租赁 - - - - - - - - - - \ No newline at end of file diff --git a/src/main/resources/templates/self.html b/src/main/resources/templates/self.html deleted file mode 100644 index e501217..0000000 --- a/src/main/resources/templates/self.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - 橘子汽车租赁 - - - - - - - -
-
-
-
个人中心
-
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- - -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
-
- - -
-
-
-
-
-
-
-
-
密码修改
-
-
-
- -
- -
-
-
- -
- -
-
-
-
- - -
-
-
-
-
-
-
- - - \ No newline at end of file diff --git a/src/test/java/com/qsd/orange/ApplicationTests.java b/src/test/java/com/qsd/orange/ApplicationTests.java deleted file mode 100644 index 3a76011..0000000 --- a/src/test/java/com/qsd/orange/ApplicationTests.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.qsd.orange; - -import org.junit.jupiter.api.Test; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; - -@SpringBootTest -class ApplicationTests { - - @Autowired - private BCryptPasswordEncoder bCryptPasswordEncoder; - - @Test - void contextLoads() { - String encode = bCryptPasswordEncoder.encode("123456"); - System.out.println(encode); - } - -} diff --git a/src/test/java/com/qsd/orange/MD5Test.java b/src/test/java/com/qsd/orange/MD5Test.java deleted file mode 100644 index 54e9ff9..0000000 --- a/src/test/java/com/qsd/orange/MD5Test.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.qsd.orange; - -import cn.hutool.crypto.digest.DigestAlgorithm; -import cn.hutool.crypto.digest.Digester; - -/** - * @Author Esion - * @Date 2020/9/23 19:42 - * @Version 1.0 - */ -public class MD5Test { - - public static void main(String[] args) { - String password = "123456"; - Digester md5 = new Digester(DigestAlgorithm.MD5); - password = md5.digestHex(password); - System.out.println(password); - } - -} diff --git a/数据库文件/carrent.sql b/数据库文件/carrent.sql new file mode 100644 index 0000000..8a9e4c5 --- /dev/null +++ b/数据库文件/carrent.sql @@ -0,0 +1,194 @@ +/* + Navicat Premium Data Transfer + + Source Server : liwenyao + Source Server Type : MySQL + Source Server Version : 80100 + Source Host : localhost:3306 + Source Schema : carrent + + Target Server Type : MySQL + Target Server Version : 80100 + File Encoding : 65001 + + Date: 02/01/2024 11:18:18 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for bus_car +-- ---------------------------- +DROP TABLE IF EXISTS `bus_car`; +CREATE TABLE `bus_car` ( + `number` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '车牌号', + `brand` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '汽车品牌', + `color` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '汽车颜色', + `buy_price` double(10, 2) NULL DEFAULT NULL COMMENT '购买价格', + `rent_price` double(10, 2) NULL DEFAULT NULL COMMENT '出租价格', + `deposit` double(10, 2) NULL DEFAULT NULL COMMENT '押金', + `status` tinyint(1) NULL DEFAULT NULL COMMENT '车辆状态;0:未出租,1:已出租', + `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '汽车描述', + `image` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '汽车图片', + `created` datetime NULL DEFAULT NULL COMMENT '录入时间', + `operator` varchar(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '操作人', + `exist` tinyint(1) NULL DEFAULT 1 COMMENT '是否存在;0:报废;1:能用', + PRIMARY KEY (`number`) USING BTREE, + INDEX `fk_car_user`(`operator` ASC) USING BTREE, + CONSTRAINT `fk_car_user` FOREIGN KEY (`operator`) REFERENCES `sys_user` (`username`) ON DELETE SET NULL ON UPDATE SET NULL +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of bus_car +-- ---------------------------- +INSERT INTO `bus_car` VALUES ('云EHBJYT', '吉利', '乌贼墨色', 496219.00, 994.00, 351.00, 0, 'If you wait, all that happens is you get older. Instead of wondering when your next vacation is, maybe you should set up a life you don’t need to escape from. Navicat Cloud provides ', NULL, '2021-01-26 09:45:59', 'admin', 1); +INSERT INTO `bus_car` VALUES ('京GZ1O8M', '阿尔法·罗密欧', '暗灰', 138941.00, 723.00, 239.00, 0, 'The Navigation pane employs tree structure which allows you to take action upon the database and their objects through their pop-up menus quickly and easily.', NULL, '2020-11-14 17:02:17', '小鸡', 1); +INSERT INTO `bus_car` VALUES ('京UHWMME', '哈弗', '橘色', 377672.00, 706.00, 113.00, 0, 'In a Telnet session, all communications, including username and password, are transmitted in plain-text, allowing anyone to listen-in on your session and steal passwords and other information.', NULL, '2021-12-31 20:22:49', '小鸡', 1); +INSERT INTO `bus_car` VALUES ('冀LT92OU', '阿尔法·罗密欧', '铜色', 760809.00, 630.00, 215.00, 0, 'If you wait, all that happens is you get older. Such sessions are also susceptible to session hijacking, where a malicious user takes over your session once you have authenticated.', NULL, '2023-01-09 07:05:49', '小鸡', 1); +INSERT INTO `bus_car` VALUES ('冀ODQBWL', '吉利', '昏灰', 22357.00, 961.00, 447.00, 0, 'The repository database can be an existing MySQL, MariaDB, PostgreSQL, SQL Server, or Amazon RDS instance.', NULL, '2022-07-11 16:17:16', '小鸡', 1); +INSERT INTO `bus_car` VALUES ('吉EAQRGM', '奥迪', '茉莉黄', 742424.00, 535.00, 484.00, 0, 'There is no way to happiness. Happiness is the way. Such sessions are also susceptible to session hijacking, where a malicious user takes over your session once you have authenticated.', NULL, '2020-07-16 22:12:33', 'admin', 1); +INSERT INTO `bus_car` VALUES ('吉K6IW10', '比亚迪', '橘色', 346451.00, 794.00, 173.00, 0, 'SQL Editor allows you to create and edit SQL text, prepare and execute selected queries. HTTP Tunneling is a method for connecting to a server that uses the same protocol (http://) ', NULL, '2021-03-05 18:56:13', 'admin', 1); +INSERT INTO `bus_car` VALUES ('宁CC4NSS', '哈弗', '咖啡色', 495139.00, 678.00, 474.00, 0, 'In a Telnet session, all communications, including username and password, are transmitted in plain-text, allowing anyone to listen-in on your session and steal passwords and other information.', NULL, '2023-05-20 12:26:39', 'admin', 1); +INSERT INTO `bus_car` VALUES ('宁YQK245', '五菱', '黄色', 232282.00, 682.00, 394.00, 0, 'To open a query using an external editor, control-click it and select Open with External Editor. You can set the file path of an external editor in Preferences.', NULL, '2021-08-10 13:11:36', '小鸡', 1); +INSERT INTO `bus_car` VALUES ('川A ABCDE', '大众', '白色', 66666.00, 666.00, 66.00, 1, 'np', '1704161930792.png', '2023-12-28 15:34:07', 'admin', 1); +INSERT INTO `bus_car` VALUES ('川MVHYSO', '丰田', '驼色', 132107.00, 722.00, 324.00, 0, 'After logged in the Navicat Cloud feature, the Navigation pane will be divided into Navicat Cloud and My Connections sections. Navicat Monitor is a safe, simple and agentless remote ', NULL, '2020-12-24 10:49:49', 'admin', 1); + +-- ---------------------------- +-- Table structure for bus_check +-- ---------------------------- +DROP TABLE IF EXISTS `bus_check`; +CREATE TABLE `bus_check` ( + `id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '检查单号', + `check_date` datetime NULL DEFAULT NULL COMMENT '检查时间', + `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '描述', + `problem` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '存在的问题', + `compensate` double(8, 2) NULL DEFAULT NULL COMMENT '赔偿金额', + `operator` varchar(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '操作人员', + `rent_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '租车单号', + PRIMARY KEY (`id`) USING BTREE, + INDEX `fk_check_user`(`operator` ASC) USING BTREE, + INDEX `fk_check_rent`(`rent_id` ASC) USING BTREE, + CONSTRAINT `fk_check_rent` FOREIGN KEY (`rent_id`) REFERENCES `bus_rent` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT, + CONSTRAINT `fk_check_user` FOREIGN KEY (`operator`) REFERENCES `sys_user` (`username`) ON DELETE SET NULL ON UPDATE SET NULL +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of bus_check +-- ---------------------------- +INSERT INTO `bus_check` VALUES ('JC_20240102_1704162547127_3508', '2024-01-02 10:29:07', '无', '无', 0.00, 'admin', 'CZ_20240102_1704162477832_7739'); + +-- ---------------------------- +-- Table structure for bus_customer +-- ---------------------------- +DROP TABLE IF EXISTS `bus_customer`; +CREATE TABLE `bus_customer` ( + `identity` varchar(18) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '身份证号', + `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '姓名', + `gender` tinyint(1) NULL DEFAULT 0 COMMENT '性别', + `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '地址', + `phone` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '电话', + `career` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '职位', + `created` datetime NULL DEFAULT NULL COMMENT '录入时间', + `exist` tinyint(1) NULL DEFAULT 1 COMMENT '是否存在。1:存在;0:不存在', + `operator` varchar(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '录入人员', + PRIMARY KEY (`identity`) USING BTREE, + INDEX `fk_customer_user`(`operator` ASC) USING BTREE, + CONSTRAINT `fk_customer_user` FOREIGN KEY (`operator`) REFERENCES `sys_user` (`username`) ON DELETE SET NULL ON UPDATE SET NULL +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of bus_customer +-- ---------------------------- +INSERT INTO `bus_customer` VALUES ('108787198111207413', '秦子异', 2, '黄浦区淮海中路365号', '14396493517', '私人教练', '2008-09-27 21:24:45', 2, 'admin'); +INSERT INTO `bus_customer` VALUES ('119953181902105196', '贾杰宏', 1, '西城区复兴门内大街487号', '15631332418', '专案经理', '2000-01-27 09:10:54', 1, 'admin'); +INSERT INTO `bus_customer` VALUES ('258226188208280154', '马致远', 1, '成华区玉双路6号164号', '16289706480', '兽医助理', '2012-08-14 12:09:49', 1, 'admin'); +INSERT INTO `bus_customer` VALUES ('300571194211107822', '罗震南', 2, '天河区大信商圈大信南路269号', '16599695335', '移动应用程式开发人员', '2001-12-26 03:00:21', 2, 'admin'); +INSERT INTO `bus_customer` VALUES ('339221184110206562', '陈震南', 1, '锦江区人民南路四段819号', '13581682771', '社交媒体协调员', '2020-09-28 12:43:20', 2, 'admin'); +INSERT INTO `bus_customer` VALUES ('346945394304311953', '程子异', 1, '罗湖区清水河一路386号', '14615053663', '医生', '2021-11-17 04:54:14', 1, 'admin'); +INSERT INTO `bus_customer` VALUES ('418436188812095433', '范岚', 2, '東城区東直門內大街556号', '14695387885', '水疗经理', '2022-06-09 08:36:35', 2, 'admin'); +INSERT INTO `bus_customer` VALUES ('49451036650808972X', '许晓明', 2, '天河区天河路892号', '13998091957', '商务记者', '2016-02-22 16:22:58', 2, 'admin'); +INSERT INTO `bus_customer` VALUES ('495231198111308127', '吴子韬', 1, '乐丰六路543号', '15912837535', '婚礼筹办者', '2003-05-28 08:08:24', 2, 'admin'); +INSERT INTO `bus_customer` VALUES ('541689194010306813', '段子异', 1, '越秀区中山二路297号', '15431370461', '牙医', '2005-08-02 04:31:33', 1, 'admin'); +INSERT INTO `bus_customer` VALUES ('756044187011206351', '梁子韬', 1, '福田区景田东一街242号', '14826931439', '纹身艺术家', '2001-03-18 09:24:56', 1, 'admin'); +INSERT INTO `bus_customer` VALUES ('817448192206209752', '潘秀英', 2, '东泰五街748号', '14287152178', '理发师', '2012-06-06 23:36:32', 1, 'admin'); +INSERT INTO `bus_customer` VALUES ('831627296107302440', '叶子韬', 1, '龙岗区学园一巷140号', '15173658605', '物流协调员', '2001-03-09 09:50:09', 1, 'admin'); +INSERT INTO `bus_customer` VALUES ('851878193311102149', '杨安琪', 2, '浦东新区健祥路2号', '14258371214', '客戶協調員', '2013-10-03 19:38:52', 1, 'admin'); +INSERT INTO `bus_customer` VALUES ('912814321611107025', '莫安琪', 1, '黄浦区淮海中路185号', '15108429935', '软件开发员', '2014-11-13 16:44:31', 1, 'admin'); + +-- ---------------------------- +-- Table structure for bus_rent +-- ---------------------------- +DROP TABLE IF EXISTS `bus_rent`; +CREATE TABLE `bus_rent` ( + `id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '出租单号', + `price` double(8, 2) NULL DEFAULT NULL COMMENT '实际出租价格', + `begin_time` date NULL DEFAULT NULL COMMENT '开始时间', + `return_time` date NULL DEFAULT NULL COMMENT '还车时间', + `real_time` datetime NULL DEFAULT NULL COMMENT '实际还车时间', + `rent_status` tinyint(1) NULL DEFAULT NULL COMMENT '出租状态:0:出租中;1:已归还', + `customer_identity` varchar(18) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户身份证号', + `car_number` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '汽车车牌', + `operator` varchar(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '操作人员', + `created` datetime NULL DEFAULT NULL COMMENT '录入时间', + PRIMARY KEY (`id`) USING BTREE, + INDEX `fk_rent_car`(`car_number` ASC) USING BTREE, + INDEX `fk_rent_customer`(`customer_identity` ASC) USING BTREE, + INDEX `fk_rent_user`(`operator` ASC) USING BTREE, + CONSTRAINT `fk_rent_car` FOREIGN KEY (`car_number`) REFERENCES `bus_car` (`number`) ON DELETE SET NULL ON UPDATE SET NULL, + CONSTRAINT `fk_rent_customer` FOREIGN KEY (`customer_identity`) REFERENCES `bus_customer` (`identity`) ON DELETE SET NULL ON UPDATE SET NULL, + CONSTRAINT `fk_rent_user` FOREIGN KEY (`operator`) REFERENCES `sys_user` (`username`) ON DELETE SET NULL ON UPDATE SET NULL +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of bus_rent +-- ---------------------------- +INSERT INTO `bus_rent` VALUES ('CZ_20240102_1704162477832_7739', 666.00, '2024-01-02', '2024-01-04', '2024-01-02 10:29:07', 1, '418436188812095433', '川A ABCDE', 'admin', '2024-01-02 10:27:58'); +INSERT INTO `bus_rent` VALUES ('CZ_20240102_1704163560019_6817', 666.00, '2024-01-02', '2024-01-04', NULL, 0, '418436188812095433', '川A ABCDE', 'admin', '2024-01-02 10:46:00'); + +-- ---------------------------- +-- Table structure for sys_announcement +-- ---------------------------- +DROP TABLE IF EXISTS `sys_announcement`; +CREATE TABLE `sys_announcement` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID', + `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标题', + `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '内容', + `created` datetime NULL DEFAULT NULL COMMENT '创建时间', + `operator` varchar(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '操作人', + PRIMARY KEY (`id`) USING BTREE, + INDEX `fk_new_user`(`operator` ASC) USING BTREE, + CONSTRAINT `fk_new_user` FOREIGN KEY (`operator`) REFERENCES `sys_user` (`username`) ON DELETE SET NULL ON UPDATE SET NULL +) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of sys_announcement +-- ---------------------------- +INSERT INTO `sys_announcement` VALUES (2, '第一篇公告启动!', '

内容为重复测试

', '2023-12-25 22:39:53', 'admin'); +INSERT INTO `sys_announcement` VALUES (3, '第二篇公告!', '

12月26日上午,由成华区反恐怖工作领导小组主办,成华区委政法委、成华区公安分局、西南财经大学天府学院、中共成华区委西南财经大学天府学院校地联动国家安全教育办公室承办的2023年“全民反恐 共创平安”主题宣传教育活动在西财天府学院成都校区(东区)238报告厅开展。成华区公安分局副局长、区反恐办主任廖科,成华区公安分局政保大队大队长、区反恐办副主任王军,成华区委政法委陈佩玥和学校党委副书记管勇出席活动。活动参与学生200余人,覆盖学生1000余人。

', '2024-01-02 10:49:57', 'admin'); + +-- ---------------------------- +-- Table structure for sys_user +-- ---------------------------- +DROP TABLE IF EXISTS `sys_user`; +CREATE TABLE `sys_user` ( + `username` varchar(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户名', + `password` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '密码', + `identity` varchar(18) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '身份证号', + `name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '真实姓名', + `gender` tinyint(1) NULL DEFAULT NULL COMMENT '性别', + `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '家庭地址', + `phone` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '电话', + `position` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '职位', + `type` tinyint(1) NULL DEFAULT NULL COMMENT '帐户类型:0:普通用户;1:管理员', + PRIMARY KEY (`username`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of sys_user +-- ---------------------------- +INSERT INTO `sys_user` VALUES ('admin', '$2a$10$/NvtR/RRWl1L2aSkw2BYEuVbTI1ZBVsnUXuEo81.IqjZuGBg9ZAsu', '100000000000000000', '李文耀', 1, '崇州市金带街上城花庭168号', '16608036828', '管理员', 1); +INSERT INTO `sys_user` VALUES ('小猫', '$2a$10$LInOVAtDX6lXaeEZv4UOR.pV72cQcR1nCe2WvnSDuYNA9APVSzzKu', '100000000000000003', '陈独秀', 1, '崇州市金带街上城花庭168号', '13608057687', '', 0); +INSERT INTO `sys_user` VALUES ('小鸡', '$2a$10$CpKluq4D/Fpq2xb3UzJlf.AHJpu/AOd8WaFiOSrbRCsyebk4UQSOq', '100000000000000002', '蔡徐坤', 1, 'daw', '15281119592', '', 0); + +SET FOREIGN_KEY_CHECKS = 1;