From 91b8986e0649891e9af19ee2073fd72559323b27 Mon Sep 17 00:00:00 2001 From: helltractor <1664309610@qq.com> Date: Mon, 8 Jul 2024 16:19:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=A1=B9=E7=9B=AE=E7=BB=93?= =?UTF-8?q?=E6=9E=84=EF=BC=8C=E5=90=88=E5=B9=B6=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- enjoy-build/pom.xml | 10 +-- enjoy-common/pom.xml | 37 ++++++---- .../java/com/enjoy/annotation/AutoFill.java | 0 .../main/java/com/enjoy/dto/CategoryDTO.java | 8 +-- .../com/enjoy/dto/CategoryPageQueryDTO.java | 8 +-- .../com/enjoy/dto/DataOverViewQueryDTO.java | 0 .../src/main/java/com/enjoy/dto/DishDTO.java | 14 ++-- .../java/com/enjoy/dto/DishPageQueryDTO.java | 4 +- .../main/java/com/enjoy/dto/EmployeeDTO.java | 0 .../java/com/enjoy/dto/EmployeeLoginDTO.java | 0 .../com/enjoy/dto/EmployeePageQueryDTO.java | 6 +- .../java/com/enjoy/dto/GoodsSalesDTO.java | 4 +- .../java/com/enjoy/dto/OrdersCancelDTO.java | 3 +- .../java/com/enjoy/dto/OrdersConfirmDTO.java | 3 +- .../main/java/com/enjoy/dto/OrdersDTO.java | 26 +++---- .../com/enjoy/dto/OrdersPageQueryDTO.java | 0 .../java/com/enjoy/dto/OrdersPaymentDTO.java | 4 +- .../com/enjoy/dto/OrdersRejectionDTO.java | 2 +- .../java/com/enjoy/dto/OrdersSubmitDTO.java | 28 +++++--- .../java/com/enjoy/dto/PasswordEditDTO.java | 6 +- .../main/java/com/enjoy/dto/SetmealDTO.java | 14 ++-- .../com/enjoy/dto/SetmealPageQueryDTO.java | 4 +- .../java/com/enjoy/dto/ShoppingCartDTO.java | 2 + .../main/java/com/enjoy/dto/UserLoginDTO.java | 0 .../java/com/enjoy/entity/AddressBook.java | 27 ++++---- .../main/java/com/enjoy/entity/Category.java | 17 ++--- .../src/main/java/com/enjoy/entity/Dish.java | 12 ++-- .../java/com/enjoy/entity/DishFlavor.java | 6 +- .../main/java/com/enjoy/entity/Employee.java | 4 +- .../java/com/enjoy/entity/OrderDetail.java | 16 ++--- .../main/java/com/enjoy/entity/Orders.java | 48 ++++++------- .../main/java/com/enjoy/entity/Setmeal.java | 13 ++-- .../java/com/enjoy/entity/SetmealDish.java | 11 +-- .../java/com/enjoy/entity/ShoppingCart.java | 17 ++--- .../src/main/java/com/enjoy/entity/User.java | 15 ++-- .../java/com/enjoy/vo/BusinessDataVO.java | 0 .../main/java/com/enjoy/vo/DishItemVO.java | 1 + .../java/com/enjoy/vo/DishOverViewVO.java | 2 + .../src/main/java/com/enjoy/vo/DishVO.java | 12 +++- .../java/com/enjoy/vo/EmployeeLoginVO.java | 0 .../java/com/enjoy/vo/OrderOverViewVO.java | 2 + .../java/com/enjoy/vo/OrderPaymentVO.java | 31 +++++++++ .../main/java/com/enjoy/vo/OrderReportVO.java | 12 ++-- .../java/com/enjoy/vo/OrderStatisticsVO.java | 8 ++- .../main/java/com/enjoy/vo/OrderSubmitVO.java | 13 ++-- .../src/main/java/com/enjoy/vo/OrderVO.java | 4 +- .../java/com/enjoy/vo/SalesTop10ReportVO.java | 4 +- .../java/com/enjoy/vo/SetmealOverViewVO.java | 2 + .../src/main/java/com/enjoy/vo/SetmealVO.java | 18 ++--- .../java/com/enjoy/vo/TurnoverReportVO.java | 4 +- .../main/java/com/enjoy/vo/UserLoginVO.java | 2 + .../main/java/com/enjoy/vo/UserReportVO.java | 6 +- enjoy-pojo/pom.xml | 30 -------- .../java/com/enjoy/vo/OrderPaymentVO.java | 22 ------ enjoy-server/pom.xml | 68 +++++++------------ .../main/java/com/enjoy/EnjoyApplication.java | 2 +- .../com/enjoy/config/WebMvcConfiguration.java | 8 +-- .../{ => user}/AddressBookController.java | 2 +- .../enjoy/handler/GlobalExceptionHandler.java | 9 +-- .../interceptor/JwtTokenAdminInterceptor.java | 5 +- .../interceptor/JwtTokenUserInterceptor.java | 5 +- .../com/enjoy/mapper/AddressBookMapper.java | 4 +- .../src/main/resources/mapper/DishMapper.xml | 34 +++++++--- .../main/resources/mapper/SetmealMapper.xml | 52 +++++++++----- pom.xml | 59 ++++++++-------- 65 files changed, 417 insertions(+), 373 deletions(-) rename {enjoy-server => enjoy-common}/src/main/java/com/enjoy/annotation/AutoFill.java (100%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/dto/CategoryDTO.java (73%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/dto/CategoryPageQueryDTO.java (71%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/dto/DataOverViewQueryDTO.java (100%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/dto/DishDTO.java (78%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/dto/DishPageQueryDTO.java (83%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/dto/EmployeeDTO.java (100%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/dto/EmployeeLoginDTO.java (100%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/dto/EmployeePageQueryDTO.java (78%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/dto/GoodsSalesDTO.java (90%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/dto/OrdersCancelDTO.java (86%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/dto/OrdersConfirmDTO.java (65%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/dto/OrdersDTO.java (71%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/dto/OrdersPageQueryDTO.java (100%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/dto/OrdersPaymentDTO.java (85%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/dto/OrdersRejectionDTO.java (89%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/dto/OrdersSubmitDTO.java (67%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/dto/PasswordEditDTO.java (83%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/dto/SetmealDTO.java (78%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/dto/SetmealPageQueryDTO.java (84%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/dto/ShoppingCartDTO.java (95%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/dto/UserLoginDTO.java (100%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/entity/AddressBook.java (74%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/entity/Category.java (76%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/entity/Dish.java (86%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/entity/DishFlavor.java (88%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/entity/Employee.java (88%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/entity/OrderDetail.java (85%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/entity/Orders.java (74%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/entity/Setmeal.java (86%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/entity/SetmealDish.java (84%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/entity/ShoppingCart.java (85%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/entity/User.java (80%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/vo/BusinessDataVO.java (100%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/vo/DishItemVO.java (98%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/vo/DishOverViewVO.java (97%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/vo/DishVO.java (92%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/vo/EmployeeLoginVO.java (100%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/vo/OrderOverViewVO.java (98%) create mode 100644 enjoy-common/src/main/java/com/enjoy/vo/OrderPaymentVO.java rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/vo/OrderReportVO.java (65%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/vo/OrderStatisticsVO.java (76%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/vo/OrderSubmitVO.java (82%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/vo/OrderVO.java (90%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/vo/SalesTop10ReportVO.java (69%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/vo/SetmealOverViewVO.java (97%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/vo/SetmealVO.java (79%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/vo/TurnoverReportVO.java (71%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/vo/UserLoginVO.java (97%) rename {enjoy-pojo => enjoy-common}/src/main/java/com/enjoy/vo/UserReportVO.java (66%) delete mode 100644 enjoy-pojo/pom.xml delete mode 100644 enjoy-pojo/src/main/java/com/enjoy/vo/OrderPaymentVO.java rename enjoy-server/src/main/java/com/enjoy/controller/{ => user}/AddressBookController.java (98%) diff --git a/enjoy-build/pom.xml b/enjoy-build/pom.xml index 0a88093..fe73438 100644 --- a/enjoy-build/pom.xml +++ b/enjoy-build/pom.xml @@ -1,6 +1,6 @@ - 4.0.0 @@ -10,10 +10,4 @@ enjoy-build - - - 21 - 21 - UTF-8 - \ No newline at end of file diff --git a/enjoy-common/pom.xml b/enjoy-common/pom.xml index f10879d..8e3300a 100644 --- a/enjoy-common/pom.xml +++ b/enjoy-common/pom.xml @@ -10,45 +10,58 @@ 4.0.0 enjoy-common 1.0-SNAPSHOT + - org.projectlombok - lombok + org.springframework.boot + spring-boot-starter-json + - com.alibaba - fastjson + org.springframework.boot + spring-boot-configuration-processor + true + - commons-lang - commons-lang + org.projectlombok + lombok + - org.springframework.boot - spring-boot-starter-json + commons-lang + commons-lang + io.jsonwebtoken jjwt - + - org.springframework.boot - spring-boot-configuration-processor - true + com.alibaba + fastjson + com.aliyun.oss aliyun-sdk-oss + javax.xml.bind jaxb-api + com.github.wechatpay-apiv3 wechatpay-apache-httpclient + + + com.github.xiaoymin + knife4j-spring-boot-starter + diff --git a/enjoy-server/src/main/java/com/enjoy/annotation/AutoFill.java b/enjoy-common/src/main/java/com/enjoy/annotation/AutoFill.java similarity index 100% rename from enjoy-server/src/main/java/com/enjoy/annotation/AutoFill.java rename to enjoy-common/src/main/java/com/enjoy/annotation/AutoFill.java diff --git a/enjoy-pojo/src/main/java/com/enjoy/dto/CategoryDTO.java b/enjoy-common/src/main/java/com/enjoy/dto/CategoryDTO.java similarity index 73% rename from enjoy-pojo/src/main/java/com/enjoy/dto/CategoryDTO.java rename to enjoy-common/src/main/java/com/enjoy/dto/CategoryDTO.java index 40ccae0..6597766 100644 --- a/enjoy-pojo/src/main/java/com/enjoy/dto/CategoryDTO.java +++ b/enjoy-common/src/main/java/com/enjoy/dto/CategoryDTO.java @@ -7,16 +7,16 @@ @Data public class CategoryDTO implements Serializable { - //主键 + // 主键 private Long id; - //类型 1 菜品分类 2 套餐分类 + // 类型 1 菜品分类 2 套餐分类 private Integer type; - //分类名称 + // 分类名称 private String name; - //排序 + // 排序 private Integer sort; } diff --git a/enjoy-pojo/src/main/java/com/enjoy/dto/CategoryPageQueryDTO.java b/enjoy-common/src/main/java/com/enjoy/dto/CategoryPageQueryDTO.java similarity index 71% rename from enjoy-pojo/src/main/java/com/enjoy/dto/CategoryPageQueryDTO.java rename to enjoy-common/src/main/java/com/enjoy/dto/CategoryPageQueryDTO.java index a00d39e..cac9829 100644 --- a/enjoy-pojo/src/main/java/com/enjoy/dto/CategoryPageQueryDTO.java +++ b/enjoy-common/src/main/java/com/enjoy/dto/CategoryPageQueryDTO.java @@ -7,16 +7,16 @@ @Data public class CategoryPageQueryDTO implements Serializable { - //页码 + // 页码 private int page; - //每页记录数 + // 每页记录数 private int pageSize; - //分类名称 + // 分类名称 private String name; - //分类类型 1菜品分类 2套餐分类 + // 分类类型 1菜品分类 2套餐分类 private Integer type; } diff --git a/enjoy-pojo/src/main/java/com/enjoy/dto/DataOverViewQueryDTO.java b/enjoy-common/src/main/java/com/enjoy/dto/DataOverViewQueryDTO.java similarity index 100% rename from enjoy-pojo/src/main/java/com/enjoy/dto/DataOverViewQueryDTO.java rename to enjoy-common/src/main/java/com/enjoy/dto/DataOverViewQueryDTO.java diff --git a/enjoy-pojo/src/main/java/com/enjoy/dto/DishDTO.java b/enjoy-common/src/main/java/com/enjoy/dto/DishDTO.java similarity index 78% rename from enjoy-pojo/src/main/java/com/enjoy/dto/DishDTO.java rename to enjoy-common/src/main/java/com/enjoy/dto/DishDTO.java index 916c0be..609c7cb 100644 --- a/enjoy-pojo/src/main/java/com/enjoy/dto/DishDTO.java +++ b/enjoy-common/src/main/java/com/enjoy/dto/DishDTO.java @@ -12,19 +12,19 @@ public class DishDTO implements Serializable { private Long id; - //菜品名称 + // 菜品名称 private String name; - //菜品分类id + // 菜品分类id private Long categoryId; - //菜品价格 + // 菜品价格 private BigDecimal price; - //图片 + // 图片 private String image; - //描述信息 + // 描述信息 private String description; - //0 停售 1 起售 + // 0 停售 1 起售 private Integer status; - //口味 + // 口味 private List flavors = new ArrayList<>(); } diff --git a/enjoy-pojo/src/main/java/com/enjoy/dto/DishPageQueryDTO.java b/enjoy-common/src/main/java/com/enjoy/dto/DishPageQueryDTO.java similarity index 83% rename from enjoy-pojo/src/main/java/com/enjoy/dto/DishPageQueryDTO.java rename to enjoy-common/src/main/java/com/enjoy/dto/DishPageQueryDTO.java index ada0056..5185532 100644 --- a/enjoy-pojo/src/main/java/com/enjoy/dto/DishPageQueryDTO.java +++ b/enjoy-common/src/main/java/com/enjoy/dto/DishPageQueryDTO.java @@ -13,10 +13,10 @@ public class DishPageQueryDTO implements Serializable { private String name; - //分类id + // 分类id private Integer categoryId; - //状态 0表示禁用 1表示启用 + // 状态 0表示禁用 1表示启用 private Integer status; } diff --git a/enjoy-pojo/src/main/java/com/enjoy/dto/EmployeeDTO.java b/enjoy-common/src/main/java/com/enjoy/dto/EmployeeDTO.java similarity index 100% rename from enjoy-pojo/src/main/java/com/enjoy/dto/EmployeeDTO.java rename to enjoy-common/src/main/java/com/enjoy/dto/EmployeeDTO.java diff --git a/enjoy-pojo/src/main/java/com/enjoy/dto/EmployeeLoginDTO.java b/enjoy-common/src/main/java/com/enjoy/dto/EmployeeLoginDTO.java similarity index 100% rename from enjoy-pojo/src/main/java/com/enjoy/dto/EmployeeLoginDTO.java rename to enjoy-common/src/main/java/com/enjoy/dto/EmployeeLoginDTO.java diff --git a/enjoy-pojo/src/main/java/com/enjoy/dto/EmployeePageQueryDTO.java b/enjoy-common/src/main/java/com/enjoy/dto/EmployeePageQueryDTO.java similarity index 78% rename from enjoy-pojo/src/main/java/com/enjoy/dto/EmployeePageQueryDTO.java rename to enjoy-common/src/main/java/com/enjoy/dto/EmployeePageQueryDTO.java index e9a005b..bdf3b28 100644 --- a/enjoy-pojo/src/main/java/com/enjoy/dto/EmployeePageQueryDTO.java +++ b/enjoy-common/src/main/java/com/enjoy/dto/EmployeePageQueryDTO.java @@ -7,13 +7,13 @@ @Data public class EmployeePageQueryDTO implements Serializable { - //员工姓名 + // 员工姓名 private String name; - //页码 + // 页码 private int page; - //每页显示记录数 + // 每页显示记录数 private int pageSize; } diff --git a/enjoy-pojo/src/main/java/com/enjoy/dto/GoodsSalesDTO.java b/enjoy-common/src/main/java/com/enjoy/dto/GoodsSalesDTO.java similarity index 90% rename from enjoy-pojo/src/main/java/com/enjoy/dto/GoodsSalesDTO.java rename to enjoy-common/src/main/java/com/enjoy/dto/GoodsSalesDTO.java index 6ed18c2..cb0115a 100644 --- a/enjoy-pojo/src/main/java/com/enjoy/dto/GoodsSalesDTO.java +++ b/enjoy-common/src/main/java/com/enjoy/dto/GoodsSalesDTO.java @@ -12,9 +12,9 @@ @NoArgsConstructor @Builder public class GoodsSalesDTO implements Serializable { - //商品名称 + // 商品名称 private String name; - //销量 + // 销量 private Integer number; } diff --git a/enjoy-pojo/src/main/java/com/enjoy/dto/OrdersCancelDTO.java b/enjoy-common/src/main/java/com/enjoy/dto/OrdersCancelDTO.java similarity index 86% rename from enjoy-pojo/src/main/java/com/enjoy/dto/OrdersCancelDTO.java rename to enjoy-common/src/main/java/com/enjoy/dto/OrdersCancelDTO.java index 296e2e2..9f05fde 100644 --- a/enjoy-pojo/src/main/java/com/enjoy/dto/OrdersCancelDTO.java +++ b/enjoy-common/src/main/java/com/enjoy/dto/OrdersCancelDTO.java @@ -8,7 +8,8 @@ public class OrdersCancelDTO implements Serializable { private Long id; - //订单取消原因 + + // 订单取消原因 private String cancelReason; } diff --git a/enjoy-pojo/src/main/java/com/enjoy/dto/OrdersConfirmDTO.java b/enjoy-common/src/main/java/com/enjoy/dto/OrdersConfirmDTO.java similarity index 65% rename from enjoy-pojo/src/main/java/com/enjoy/dto/OrdersConfirmDTO.java rename to enjoy-common/src/main/java/com/enjoy/dto/OrdersConfirmDTO.java index 3eefd97..c425ad4 100644 --- a/enjoy-pojo/src/main/java/com/enjoy/dto/OrdersConfirmDTO.java +++ b/enjoy-common/src/main/java/com/enjoy/dto/OrdersConfirmDTO.java @@ -8,7 +8,8 @@ public class OrdersConfirmDTO implements Serializable { private Long id; - //订单状态 1待付款 2待接单 3 已接单 4 派送中 5 已完成 6 已取消 7 退款 + + // 订单状态 1待付款 2待接单 3 已接单 4 派送中 5 已完成 6 已取消 7 退款 private Integer status; } diff --git a/enjoy-pojo/src/main/java/com/enjoy/dto/OrdersDTO.java b/enjoy-common/src/main/java/com/enjoy/dto/OrdersDTO.java similarity index 71% rename from enjoy-pojo/src/main/java/com/enjoy/dto/OrdersDTO.java rename to enjoy-common/src/main/java/com/enjoy/dto/OrdersDTO.java index f942889..ef46bd8 100644 --- a/enjoy-pojo/src/main/java/com/enjoy/dto/OrdersDTO.java +++ b/enjoy-common/src/main/java/com/enjoy/dto/OrdersDTO.java @@ -13,43 +13,43 @@ public class OrdersDTO implements Serializable { private Long id; - //订单号 + // 订单号 private String number; - //订单状态 1待付款,2待派送,3已派送,4已完成,5已取消 + // 订单状态 1待付款,2待派送,3已派送,4已完成,5已取消 private Integer status; - //下单用户id + // 下单用户id private Long userId; - //地址id + // 地址id private Long addressBookId; - //下单时间 + // 下单时间 private LocalDateTime orderTime; - //结账时间 + // 结账时间 private LocalDateTime checkoutTime; - //支付方式 1微信,2支付宝 + // 支付方式 1微信,2支付宝 private Integer payMethod; - //实收金额 + // 实收金额 private BigDecimal amount; - //备注 + // 备注 private String remark; - //用户名 + // 用户名 private String userName; - //手机号 + // 手机号 private String phone; - //地址 + // 地址 private String address; - //收货人 + // 收货人 private String consignee; private List orderDetails; diff --git a/enjoy-pojo/src/main/java/com/enjoy/dto/OrdersPageQueryDTO.java b/enjoy-common/src/main/java/com/enjoy/dto/OrdersPageQueryDTO.java similarity index 100% rename from enjoy-pojo/src/main/java/com/enjoy/dto/OrdersPageQueryDTO.java rename to enjoy-common/src/main/java/com/enjoy/dto/OrdersPageQueryDTO.java diff --git a/enjoy-pojo/src/main/java/com/enjoy/dto/OrdersPaymentDTO.java b/enjoy-common/src/main/java/com/enjoy/dto/OrdersPaymentDTO.java similarity index 85% rename from enjoy-pojo/src/main/java/com/enjoy/dto/OrdersPaymentDTO.java rename to enjoy-common/src/main/java/com/enjoy/dto/OrdersPaymentDTO.java index 08d2628..5eb5b5a 100644 --- a/enjoy-pojo/src/main/java/com/enjoy/dto/OrdersPaymentDTO.java +++ b/enjoy-common/src/main/java/com/enjoy/dto/OrdersPaymentDTO.java @@ -6,10 +6,10 @@ @Data public class OrdersPaymentDTO implements Serializable { - //订单号 + // 订单号 private String orderNumber; - //付款方式 + // 付款方式 private Integer payMethod; } diff --git a/enjoy-pojo/src/main/java/com/enjoy/dto/OrdersRejectionDTO.java b/enjoy-common/src/main/java/com/enjoy/dto/OrdersRejectionDTO.java similarity index 89% rename from enjoy-pojo/src/main/java/com/enjoy/dto/OrdersRejectionDTO.java rename to enjoy-common/src/main/java/com/enjoy/dto/OrdersRejectionDTO.java index 2acb4a5..ae8e27e 100644 --- a/enjoy-pojo/src/main/java/com/enjoy/dto/OrdersRejectionDTO.java +++ b/enjoy-common/src/main/java/com/enjoy/dto/OrdersRejectionDTO.java @@ -9,7 +9,7 @@ public class OrdersRejectionDTO implements Serializable { private Long id; - //订单拒绝原因 + // 订单拒绝原因 private String rejectionReason; } diff --git a/enjoy-pojo/src/main/java/com/enjoy/dto/OrdersSubmitDTO.java b/enjoy-common/src/main/java/com/enjoy/dto/OrdersSubmitDTO.java similarity index 67% rename from enjoy-pojo/src/main/java/com/enjoy/dto/OrdersSubmitDTO.java rename to enjoy-common/src/main/java/com/enjoy/dto/OrdersSubmitDTO.java index 9fcfde3..509156d 100644 --- a/enjoy-pojo/src/main/java/com/enjoy/dto/OrdersSubmitDTO.java +++ b/enjoy-common/src/main/java/com/enjoy/dto/OrdersSubmitDTO.java @@ -9,23 +9,33 @@ @Data public class OrdersSubmitDTO implements Serializable { - //地址簿id + + // 地址簿id private Long addressBookId; - //付款方式 + + // 付款方式 private int payMethod; - //备注 + + // 备注 private String remark; - //预计送达时间 + + // 预计送达时间 @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime estimatedDeliveryTime; - //配送状态 1立即送出 0选择具体时间 + + // 配送状态 1立即送出 0选择具体时间 private Integer deliveryStatus; - //餐具数量 + + // 餐具数量 private Integer tablewareNumber; - //餐具数量状态 1按餐量提供 0选择具体数量 + + // 餐具数量状态 1按餐量提供 0选择具体数量 private Integer tablewareStatus; - //打包费 + + // 打包费 private Integer packAmount; - //总金额 + + // 总金额 private BigDecimal amount; } diff --git a/enjoy-pojo/src/main/java/com/enjoy/dto/PasswordEditDTO.java b/enjoy-common/src/main/java/com/enjoy/dto/PasswordEditDTO.java similarity index 83% rename from enjoy-pojo/src/main/java/com/enjoy/dto/PasswordEditDTO.java rename to enjoy-common/src/main/java/com/enjoy/dto/PasswordEditDTO.java index 56d1da6..a25d19a 100644 --- a/enjoy-pojo/src/main/java/com/enjoy/dto/PasswordEditDTO.java +++ b/enjoy-common/src/main/java/com/enjoy/dto/PasswordEditDTO.java @@ -7,13 +7,13 @@ @Data public class PasswordEditDTO implements Serializable { - //员工id + // 员工id private Long empId; - //旧密码 + // 旧密码 private String oldPassword; - //新密码 + // 新密码 private String newPassword; } diff --git a/enjoy-pojo/src/main/java/com/enjoy/dto/SetmealDTO.java b/enjoy-common/src/main/java/com/enjoy/dto/SetmealDTO.java similarity index 78% rename from enjoy-pojo/src/main/java/com/enjoy/dto/SetmealDTO.java rename to enjoy-common/src/main/java/com/enjoy/dto/SetmealDTO.java index 0f461e2..c86aae4 100644 --- a/enjoy-pojo/src/main/java/com/enjoy/dto/SetmealDTO.java +++ b/enjoy-common/src/main/java/com/enjoy/dto/SetmealDTO.java @@ -13,25 +13,25 @@ public class SetmealDTO implements Serializable { private Long id; - //分类id + // 分类id private Long categoryId; - //套餐名称 + // 套餐名称 private String name; - //套餐价格 + // 套餐价格 private BigDecimal price; - //状态 0:停用 1:启用 + // 状态 0:停用 1:启用 private Integer status; - //描述信息 + // 描述信息 private String description; - //图片 + // 图片 private String image; - //套餐菜品关系 + // 套餐菜品关系 private List setmealDishes = new ArrayList<>(); } diff --git a/enjoy-pojo/src/main/java/com/enjoy/dto/SetmealPageQueryDTO.java b/enjoy-common/src/main/java/com/enjoy/dto/SetmealPageQueryDTO.java similarity index 84% rename from enjoy-pojo/src/main/java/com/enjoy/dto/SetmealPageQueryDTO.java rename to enjoy-common/src/main/java/com/enjoy/dto/SetmealPageQueryDTO.java index 08a7d12..83c025c 100644 --- a/enjoy-pojo/src/main/java/com/enjoy/dto/SetmealPageQueryDTO.java +++ b/enjoy-common/src/main/java/com/enjoy/dto/SetmealPageQueryDTO.java @@ -13,10 +13,10 @@ public class SetmealPageQueryDTO implements Serializable { private String name; - //分类id + // 分类id private Integer categoryId; - //状态 0表示禁用 1表示启用 + // 状态 0表示禁用 1表示启用 private Integer status; } diff --git a/enjoy-pojo/src/main/java/com/enjoy/dto/ShoppingCartDTO.java b/enjoy-common/src/main/java/com/enjoy/dto/ShoppingCartDTO.java similarity index 95% rename from enjoy-pojo/src/main/java/com/enjoy/dto/ShoppingCartDTO.java rename to enjoy-common/src/main/java/com/enjoy/dto/ShoppingCartDTO.java index e8ba609..4675fed 100644 --- a/enjoy-pojo/src/main/java/com/enjoy/dto/ShoppingCartDTO.java +++ b/enjoy-common/src/main/java/com/enjoy/dto/ShoppingCartDTO.java @@ -8,7 +8,9 @@ public class ShoppingCartDTO implements Serializable { private Long dishId; + private Long setmealId; + private String dishFlavor; } diff --git a/enjoy-pojo/src/main/java/com/enjoy/dto/UserLoginDTO.java b/enjoy-common/src/main/java/com/enjoy/dto/UserLoginDTO.java similarity index 100% rename from enjoy-pojo/src/main/java/com/enjoy/dto/UserLoginDTO.java rename to enjoy-common/src/main/java/com/enjoy/dto/UserLoginDTO.java diff --git a/enjoy-pojo/src/main/java/com/enjoy/entity/AddressBook.java b/enjoy-common/src/main/java/com/enjoy/entity/AddressBook.java similarity index 74% rename from enjoy-pojo/src/main/java/com/enjoy/entity/AddressBook.java rename to enjoy-common/src/main/java/com/enjoy/entity/AddressBook.java index 73ed16a..4b1cd58 100644 --- a/enjoy-pojo/src/main/java/com/enjoy/entity/AddressBook.java +++ b/enjoy-common/src/main/java/com/enjoy/entity/AddressBook.java @@ -20,42 +20,43 @@ public class AddressBook implements Serializable { private Long id; - //用户id + // 用户id private Long userId; - //收货人 + // 收货人 private String consignee; - //手机号 + // 手机号 private String phone; - //性别 0 女 1 男 + // 性别 0 女 1 男 private String sex; - //省级区划编号 + // 省级区划编号 private String provinceCode; - //省级名称 + // 省级名称 private String provinceName; - //市级区划编号 + // 市级区划编号 private String cityCode; - //市级名称 + // 市级名称 private String cityName; - //区级区划编号 + // 区级区划编号 private String districtCode; - //区级名称 + // 区级名称 private String districtName; - //详细地址 + // 详细地址 private String detail; - //标签 + // 标签 private String label; - //是否默认 0否 1是 + // 是否默认 0否 1是 private Integer isDefault; + } diff --git a/enjoy-pojo/src/main/java/com/enjoy/entity/Category.java b/enjoy-common/src/main/java/com/enjoy/entity/Category.java similarity index 76% rename from enjoy-pojo/src/main/java/com/enjoy/entity/Category.java rename to enjoy-common/src/main/java/com/enjoy/entity/Category.java index 6845e6e..0b6102b 100644 --- a/enjoy-pojo/src/main/java/com/enjoy/entity/Category.java +++ b/enjoy-common/src/main/java/com/enjoy/entity/Category.java @@ -18,27 +18,28 @@ public class Category implements Serializable { private Long id; - //类型: 1菜品分类 2套餐分类 + // 类型: 1菜品分类 2套餐分类 private Integer type; - //分类名称 + // 分类名称 private String name; - //顺序 + // 顺序 private Integer sort; - //分类状态 0标识禁用 1表示启用 + // 分类状态 0标识禁用 1表示启用 private Integer status; - //创建时间 + // 创建时间 private LocalDateTime createTime; - //更新时间 + // 更新时间 private LocalDateTime updateTime; - //创建人 + // 创建人 private Long createUser; - //修改人 + // 修改人 private Long updateUser; + } diff --git a/enjoy-pojo/src/main/java/com/enjoy/entity/Dish.java b/enjoy-common/src/main/java/com/enjoy/entity/Dish.java similarity index 86% rename from enjoy-pojo/src/main/java/com/enjoy/entity/Dish.java rename to enjoy-common/src/main/java/com/enjoy/entity/Dish.java index d9a281c..0e7111c 100644 --- a/enjoy-pojo/src/main/java/com/enjoy/entity/Dish.java +++ b/enjoy-common/src/main/java/com/enjoy/entity/Dish.java @@ -22,22 +22,22 @@ public class Dish implements Serializable { private Long id; - //菜品名称 + // 菜品名称 private String name; - //菜品分类id + // 菜品分类id private Long categoryId; - //菜品价格 + // 菜品价格 private BigDecimal price; - //图片 + // 图片 private String image; - //描述信息 + // 描述信息 private String description; - //0 停售 1 起售 + // 0 停售 1 起售 private Integer status; private LocalDateTime createTime; diff --git a/enjoy-pojo/src/main/java/com/enjoy/entity/DishFlavor.java b/enjoy-common/src/main/java/com/enjoy/entity/DishFlavor.java similarity index 88% rename from enjoy-pojo/src/main/java/com/enjoy/entity/DishFlavor.java rename to enjoy-common/src/main/java/com/enjoy/entity/DishFlavor.java index d5ec680..6476c50 100644 --- a/enjoy-pojo/src/main/java/com/enjoy/entity/DishFlavor.java +++ b/enjoy-common/src/main/java/com/enjoy/entity/DishFlavor.java @@ -20,13 +20,13 @@ public class DishFlavor implements Serializable { private Long id; - //菜品id + // 菜品id private Long dishId; - //口味名称 + // 口味名称 private String name; - //口味数据list + // 口味数据list private String value; } diff --git a/enjoy-pojo/src/main/java/com/enjoy/entity/Employee.java b/enjoy-common/src/main/java/com/enjoy/entity/Employee.java similarity index 88% rename from enjoy-pojo/src/main/java/com/enjoy/entity/Employee.java rename to enjoy-common/src/main/java/com/enjoy/entity/Employee.java index 27238b8..72bc60a 100644 --- a/enjoy-pojo/src/main/java/com/enjoy/entity/Employee.java +++ b/enjoy-common/src/main/java/com/enjoy/entity/Employee.java @@ -32,10 +32,10 @@ public class Employee implements Serializable { private Integer status; - //@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + // @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime createTime; - //@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + // @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime updateTime; private Long createUser; diff --git a/enjoy-pojo/src/main/java/com/enjoy/entity/OrderDetail.java b/enjoy-common/src/main/java/com/enjoy/entity/OrderDetail.java similarity index 85% rename from enjoy-pojo/src/main/java/com/enjoy/entity/OrderDetail.java rename to enjoy-common/src/main/java/com/enjoy/entity/OrderDetail.java index 68b7f4b..ec960c7 100644 --- a/enjoy-pojo/src/main/java/com/enjoy/entity/OrderDetail.java +++ b/enjoy-common/src/main/java/com/enjoy/entity/OrderDetail.java @@ -21,27 +21,27 @@ public class OrderDetail implements Serializable { private Long id; - //名称 + // 名称 private String name; - //订单id + // 订单id private Long orderId; - //菜品id + // 菜品id private Long dishId; - //套餐id + // 套餐id private Long setmealId; - //口味 + // 口味 private String dishFlavor; - //数量 + // 数量 private Integer number; - //金额 + // 金额 private BigDecimal amount; - //图片 + // 图片 private String image; } diff --git a/enjoy-pojo/src/main/java/com/enjoy/entity/Orders.java b/enjoy-common/src/main/java/com/enjoy/entity/Orders.java similarity index 74% rename from enjoy-pojo/src/main/java/com/enjoy/entity/Orders.java rename to enjoy-common/src/main/java/com/enjoy/entity/Orders.java index 6494084..b5415d7 100644 --- a/enjoy-pojo/src/main/java/com/enjoy/entity/Orders.java +++ b/enjoy-common/src/main/java/com/enjoy/entity/Orders.java @@ -34,77 +34,77 @@ public class Orders implements Serializable { public static final Integer UN_PAID = 0; public static final Integer PAID = 1; public static final Integer REFUND = 2; - private static final long serialVersionUID = 1L; private Long id; - //订单号 + // 订单号 private String number; - //订单状态 1待付款 2待接单 3已接单 4派送中 5已完成 6已取消 7退款 + // 订单状态 1待付款 2待接单 3已接单 4派送中 5已完成 6已取消 7退款 private Integer status; - //下单用户id + // 下单用户id private Long userId; - //地址id + // 地址id private Long addressBookId; - //下单时间 + // 下单时间 private LocalDateTime orderTime; - //结账时间 + // 结账时间 private LocalDateTime checkoutTime; - //支付方式 1微信,2支付宝 + // 支付方式 1微信,2支付宝 private Integer payMethod; - //支付状态 0未支付 1已支付 2退款 + // 支付状态 0未支付 1已支付 2退款 private Integer payStatus; - //实收金额 + // 实收金额 private BigDecimal amount; - //备注 + // 备注 private String remark; - //用户名 + // 用户名 private String userName; - //手机号 + // 手机号 private String phone; - //地址 + // 地址 private String address; - //收货人 + // 收货人 private String consignee; - //订单取消原因 + // 订单取消原因 private String cancelReason; - //订单拒绝原因 + // 订单拒绝原因 private String rejectionReason; - //订单取消时间 + // 订单取消时间 private LocalDateTime cancelTime; - //预计送达时间 + // 预计送达时间 private LocalDateTime estimatedDeliveryTime; - //配送状态 1立即送出 0选择具体时间 + // 配送状态 1立即送出 0选择具体时间 private Integer deliveryStatus; - //送达时间 + // 送达时间 private LocalDateTime deliveryTime; - //打包费 + // 打包费 private int packAmount; - //餐具数量 + // 餐具数量 private int tablewareNumber; - //餐具数量状态 1按餐量提供 0选择具体数量 + // 餐具数量状态 1按餐量提供 0选择具体数量 private Integer tablewareStatus; + } diff --git a/enjoy-pojo/src/main/java/com/enjoy/entity/Setmeal.java b/enjoy-common/src/main/java/com/enjoy/entity/Setmeal.java similarity index 86% rename from enjoy-pojo/src/main/java/com/enjoy/entity/Setmeal.java rename to enjoy-common/src/main/java/com/enjoy/entity/Setmeal.java index c938a25..8172c5e 100644 --- a/enjoy-pojo/src/main/java/com/enjoy/entity/Setmeal.java +++ b/enjoy-common/src/main/java/com/enjoy/entity/Setmeal.java @@ -22,22 +22,22 @@ public class Setmeal implements Serializable { private Long id; - //分类id + // 分类id private Long categoryId; - //套餐名称 + // 套餐名称 private String name; - //套餐价格 + // 套餐价格 private BigDecimal price; - //状态 0:停用 1:启用 + // 状态 0:停用 1:启用 private Integer status; - //描述信息 + // 描述信息 private String description; - //图片 + // 图片 private String image; private LocalDateTime createTime; @@ -47,4 +47,5 @@ public class Setmeal implements Serializable { private Long createUser; private Long updateUser; + } diff --git a/enjoy-pojo/src/main/java/com/enjoy/entity/SetmealDish.java b/enjoy-common/src/main/java/com/enjoy/entity/SetmealDish.java similarity index 84% rename from enjoy-pojo/src/main/java/com/enjoy/entity/SetmealDish.java rename to enjoy-common/src/main/java/com/enjoy/entity/SetmealDish.java index 89ee494..8963967 100644 --- a/enjoy-pojo/src/main/java/com/enjoy/entity/SetmealDish.java +++ b/enjoy-common/src/main/java/com/enjoy/entity/SetmealDish.java @@ -21,18 +21,19 @@ public class SetmealDish implements Serializable { private Long id; - //套餐id + // 套餐id private Long setmealId; - //菜品id + // 菜品id private Long dishId; - //菜品名称 (冗余字段) + // 菜品名称 (冗余字段) private String name; - //菜品原价 + // 菜品原价 private BigDecimal price; - //份数 + // 份数 private Integer copies; + } diff --git a/enjoy-pojo/src/main/java/com/enjoy/entity/ShoppingCart.java b/enjoy-common/src/main/java/com/enjoy/entity/ShoppingCart.java similarity index 85% rename from enjoy-pojo/src/main/java/com/enjoy/entity/ShoppingCart.java rename to enjoy-common/src/main/java/com/enjoy/entity/ShoppingCart.java index 0e25b35..f828e21 100644 --- a/enjoy-pojo/src/main/java/com/enjoy/entity/ShoppingCart.java +++ b/enjoy-common/src/main/java/com/enjoy/entity/ShoppingCart.java @@ -22,29 +22,30 @@ public class ShoppingCart implements Serializable { private Long id; - //名称 + // 名称 private String name; - //用户id + // 用户id private Long userId; - //菜品id + // 菜品id private Long dishId; - //套餐id + // 套餐id private Long setmealId; - //口味 + // 口味 private String dishFlavor; - //数量 + // 数量 private Integer number; - //金额 + // 金额 private BigDecimal amount; - //图片 + // 图片 private String image; private LocalDateTime createTime; + } diff --git a/enjoy-pojo/src/main/java/com/enjoy/entity/User.java b/enjoy-common/src/main/java/com/enjoy/entity/User.java similarity index 80% rename from enjoy-pojo/src/main/java/com/enjoy/entity/User.java rename to enjoy-common/src/main/java/com/enjoy/entity/User.java index a27580a..9167d8f 100644 --- a/enjoy-pojo/src/main/java/com/enjoy/entity/User.java +++ b/enjoy-common/src/main/java/com/enjoy/entity/User.java @@ -18,24 +18,25 @@ public class User implements Serializable { private Long id; - //微信用户唯一标识 + // 微信用户唯一标识 private String openid; - //姓名 + // 姓名 private String name; - //手机号 + // 手机号 private String phone; - //性别 0 女 1 男 + // 性别 0 女 1 男 private String sex; - //身份证号 + // 身份证号 private String idNumber; - //头像 + // 头像 private String avatar; - //注册时间 + // 注册时间 private LocalDateTime createTime; + } diff --git a/enjoy-pojo/src/main/java/com/enjoy/vo/BusinessDataVO.java b/enjoy-common/src/main/java/com/enjoy/vo/BusinessDataVO.java similarity index 100% rename from enjoy-pojo/src/main/java/com/enjoy/vo/BusinessDataVO.java rename to enjoy-common/src/main/java/com/enjoy/vo/BusinessDataVO.java diff --git a/enjoy-pojo/src/main/java/com/enjoy/vo/DishItemVO.java b/enjoy-common/src/main/java/com/enjoy/vo/DishItemVO.java similarity index 98% rename from enjoy-pojo/src/main/java/com/enjoy/vo/DishItemVO.java rename to enjoy-common/src/main/java/com/enjoy/vo/DishItemVO.java index bf712c5..f177cab 100644 --- a/enjoy-pojo/src/main/java/com/enjoy/vo/DishItemVO.java +++ b/enjoy-common/src/main/java/com/enjoy/vo/DishItemVO.java @@ -24,4 +24,5 @@ public class DishItemVO implements Serializable { //菜品描述 private String description; + } diff --git a/enjoy-pojo/src/main/java/com/enjoy/vo/DishOverViewVO.java b/enjoy-common/src/main/java/com/enjoy/vo/DishOverViewVO.java similarity index 97% rename from enjoy-pojo/src/main/java/com/enjoy/vo/DishOverViewVO.java rename to enjoy-common/src/main/java/com/enjoy/vo/DishOverViewVO.java index d6a06fd..74c9249 100644 --- a/enjoy-pojo/src/main/java/com/enjoy/vo/DishOverViewVO.java +++ b/enjoy-common/src/main/java/com/enjoy/vo/DishOverViewVO.java @@ -15,9 +15,11 @@ @NoArgsConstructor @AllArgsConstructor public class DishOverViewVO implements Serializable { + // 已启售数量 private Integer sold; // 已停售数量 private Integer discontinued; + } diff --git a/enjoy-pojo/src/main/java/com/enjoy/vo/DishVO.java b/enjoy-common/src/main/java/com/enjoy/vo/DishVO.java similarity index 92% rename from enjoy-pojo/src/main/java/com/enjoy/vo/DishVO.java rename to enjoy-common/src/main/java/com/enjoy/vo/DishVO.java index 2c8f308..1ce3df0 100644 --- a/enjoy-pojo/src/main/java/com/enjoy/vo/DishVO.java +++ b/enjoy-common/src/main/java/com/enjoy/vo/DishVO.java @@ -19,24 +19,34 @@ public class DishVO implements Serializable { private Long id; + //菜品名称 private String name; + //菜品分类id private Long categoryId; + //菜品价格 private BigDecimal price; + //图片 private String image; + //描述信息 private String description; + //0 停售 1 起售 private Integer status; + //更新时间 private LocalDateTime updateTime; + //分类名称 private String categoryName; + //菜品关联的口味 private List flavors = new ArrayList<>(); - //private Integer copies; + private Integer copies; + } diff --git a/enjoy-pojo/src/main/java/com/enjoy/vo/EmployeeLoginVO.java b/enjoy-common/src/main/java/com/enjoy/vo/EmployeeLoginVO.java similarity index 100% rename from enjoy-pojo/src/main/java/com/enjoy/vo/EmployeeLoginVO.java rename to enjoy-common/src/main/java/com/enjoy/vo/EmployeeLoginVO.java diff --git a/enjoy-pojo/src/main/java/com/enjoy/vo/OrderOverViewVO.java b/enjoy-common/src/main/java/com/enjoy/vo/OrderOverViewVO.java similarity index 98% rename from enjoy-pojo/src/main/java/com/enjoy/vo/OrderOverViewVO.java rename to enjoy-common/src/main/java/com/enjoy/vo/OrderOverViewVO.java index fa16ce4..8ca7a39 100644 --- a/enjoy-pojo/src/main/java/com/enjoy/vo/OrderOverViewVO.java +++ b/enjoy-common/src/main/java/com/enjoy/vo/OrderOverViewVO.java @@ -15,6 +15,7 @@ @NoArgsConstructor @AllArgsConstructor public class OrderOverViewVO implements Serializable { + //待接单数量 private Integer waitingOrders; @@ -29,4 +30,5 @@ public class OrderOverViewVO implements Serializable { //全部订单 private Integer allOrders; + } diff --git a/enjoy-common/src/main/java/com/enjoy/vo/OrderPaymentVO.java b/enjoy-common/src/main/java/com/enjoy/vo/OrderPaymentVO.java new file mode 100644 index 0000000..8c666f0 --- /dev/null +++ b/enjoy-common/src/main/java/com/enjoy/vo/OrderPaymentVO.java @@ -0,0 +1,31 @@ +package com.enjoy.vo; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class OrderPaymentVO implements Serializable { + + // 随机字符串 + private String nonceStr; + + // 签名 + private String paySign; + + // 时间戳 + private String timeStamp; + + // 签名算法 + private String signType; + + // 统一下单接口返回的 prepay_id 参数值 + private String packageStr; + +} diff --git a/enjoy-pojo/src/main/java/com/enjoy/vo/OrderReportVO.java b/enjoy-common/src/main/java/com/enjoy/vo/OrderReportVO.java similarity index 65% rename from enjoy-pojo/src/main/java/com/enjoy/vo/OrderReportVO.java rename to enjoy-common/src/main/java/com/enjoy/vo/OrderReportVO.java index 3078fe0..89563ad 100644 --- a/enjoy-pojo/src/main/java/com/enjoy/vo/OrderReportVO.java +++ b/enjoy-common/src/main/java/com/enjoy/vo/OrderReportVO.java @@ -13,22 +13,22 @@ @AllArgsConstructor public class OrderReportVO implements Serializable { - //日期,以逗号分隔,例如:2022-10-01,2022-10-02,2022-10-03 + // 日期,以逗号分隔,例如:2022-10-01,2022-10-02,2022-10-03 private String dateList; - //每日订单数,以逗号分隔,例如:260,210,215 + // 每日订单数,以逗号分隔,例如:260,210,215 private String orderCountList; - //每日有效订单数,以逗号分隔,例如:20,21,10 + // 每日有效订单数,以逗号分隔,例如:20,21,10 private String validOrderCountList; - //订单总数 + // 订单总数 private Integer totalOrderCount; - //有效订单数 + // 有效订单数 private Integer validOrderCount; - //订单完成率 + // 订单完成率 private Double orderCompletionRate; } diff --git a/enjoy-pojo/src/main/java/com/enjoy/vo/OrderStatisticsVO.java b/enjoy-common/src/main/java/com/enjoy/vo/OrderStatisticsVO.java similarity index 76% rename from enjoy-pojo/src/main/java/com/enjoy/vo/OrderStatisticsVO.java rename to enjoy-common/src/main/java/com/enjoy/vo/OrderStatisticsVO.java index 82af37e..7a9c3a7 100644 --- a/enjoy-pojo/src/main/java/com/enjoy/vo/OrderStatisticsVO.java +++ b/enjoy-common/src/main/java/com/enjoy/vo/OrderStatisticsVO.java @@ -6,12 +6,14 @@ @Data public class OrderStatisticsVO implements Serializable { - //待接单数量 + + // 待接单数量 private Integer toBeConfirmed; - //待派送数量 + // 待派送数量 private Integer confirmed; - //派送中数量 + // 派送中数量 private Integer deliveryInProgress; + } diff --git a/enjoy-pojo/src/main/java/com/enjoy/vo/OrderSubmitVO.java b/enjoy-common/src/main/java/com/enjoy/vo/OrderSubmitVO.java similarity index 82% rename from enjoy-pojo/src/main/java/com/enjoy/vo/OrderSubmitVO.java rename to enjoy-common/src/main/java/com/enjoy/vo/OrderSubmitVO.java index 7ac18e4..848efc9 100644 --- a/enjoy-pojo/src/main/java/com/enjoy/vo/OrderSubmitVO.java +++ b/enjoy-common/src/main/java/com/enjoy/vo/OrderSubmitVO.java @@ -14,12 +14,17 @@ @NoArgsConstructor @AllArgsConstructor public class OrderSubmitVO implements Serializable { - //订单id + + // 订单id private Long id; - //订单号 + + // 订单号 private String orderNumber; - //订单金额 + + // 订单金额 private BigDecimal orderAmount; - //下单时间 + + // 下单时间 private LocalDateTime orderTime; + } diff --git a/enjoy-pojo/src/main/java/com/enjoy/vo/OrderVO.java b/enjoy-common/src/main/java/com/enjoy/vo/OrderVO.java similarity index 90% rename from enjoy-pojo/src/main/java/com/enjoy/vo/OrderVO.java rename to enjoy-common/src/main/java/com/enjoy/vo/OrderVO.java index 9b02306..fa418bc 100644 --- a/enjoy-pojo/src/main/java/com/enjoy/vo/OrderVO.java +++ b/enjoy-common/src/main/java/com/enjoy/vo/OrderVO.java @@ -14,10 +14,10 @@ @AllArgsConstructor public class OrderVO extends Orders implements Serializable { - //订单菜品信息 + // 订单菜品信息 private String orderDishes; - //订单详情 + // 订单详情 private List orderDetailList; } diff --git a/enjoy-pojo/src/main/java/com/enjoy/vo/SalesTop10ReportVO.java b/enjoy-common/src/main/java/com/enjoy/vo/SalesTop10ReportVO.java similarity index 69% rename from enjoy-pojo/src/main/java/com/enjoy/vo/SalesTop10ReportVO.java rename to enjoy-common/src/main/java/com/enjoy/vo/SalesTop10ReportVO.java index 29b9223..c48162d 100644 --- a/enjoy-pojo/src/main/java/com/enjoy/vo/SalesTop10ReportVO.java +++ b/enjoy-common/src/main/java/com/enjoy/vo/SalesTop10ReportVO.java @@ -13,10 +13,10 @@ @AllArgsConstructor public class SalesTop10ReportVO implements Serializable { - //商品名称列表,以逗号分隔,例如:鱼香肉丝,宫保鸡丁,水煮鱼 + // 商品名称列表,以逗号分隔,例如:鱼香肉丝,宫保鸡丁,水煮鱼 private String nameList; - //销量列表,以逗号分隔,例如:260,215,200 + // 销量列表,以逗号分隔,例如:260,215,200 private String numberList; } diff --git a/enjoy-pojo/src/main/java/com/enjoy/vo/SetmealOverViewVO.java b/enjoy-common/src/main/java/com/enjoy/vo/SetmealOverViewVO.java similarity index 97% rename from enjoy-pojo/src/main/java/com/enjoy/vo/SetmealOverViewVO.java rename to enjoy-common/src/main/java/com/enjoy/vo/SetmealOverViewVO.java index 04e447d..aa3c2cf 100644 --- a/enjoy-pojo/src/main/java/com/enjoy/vo/SetmealOverViewVO.java +++ b/enjoy-common/src/main/java/com/enjoy/vo/SetmealOverViewVO.java @@ -15,9 +15,11 @@ @NoArgsConstructor @AllArgsConstructor public class SetmealOverViewVO implements Serializable { + // 已启售数量 private Integer sold; // 已停售数量 private Integer discontinued; + } diff --git a/enjoy-pojo/src/main/java/com/enjoy/vo/SetmealVO.java b/enjoy-common/src/main/java/com/enjoy/vo/SetmealVO.java similarity index 79% rename from enjoy-pojo/src/main/java/com/enjoy/vo/SetmealVO.java rename to enjoy-common/src/main/java/com/enjoy/vo/SetmealVO.java index 5401012..82d9405 100644 --- a/enjoy-pojo/src/main/java/com/enjoy/vo/SetmealVO.java +++ b/enjoy-common/src/main/java/com/enjoy/vo/SetmealVO.java @@ -20,30 +20,30 @@ public class SetmealVO implements Serializable { private Long id; - //分类id + // 分类id private Long categoryId; - //套餐名称 + // 套餐名称 private String name; - //套餐价格 + // 套餐价格 private BigDecimal price; - //状态 0:停用 1:启用 + // 状态 0:停用 1:启用 private Integer status; - //描述信息 + // 描述信息 private String description; - //图片 + // 图片 private String image; - //更新时间 + // 更新时间 private LocalDateTime updateTime; - //分类名称 + // 分类名称 private String categoryName; - //套餐和菜品的关联关系 + // 套餐和菜品的关联关系 private List setmealDishes = new ArrayList<>(); } diff --git a/enjoy-pojo/src/main/java/com/enjoy/vo/TurnoverReportVO.java b/enjoy-common/src/main/java/com/enjoy/vo/TurnoverReportVO.java similarity index 71% rename from enjoy-pojo/src/main/java/com/enjoy/vo/TurnoverReportVO.java rename to enjoy-common/src/main/java/com/enjoy/vo/TurnoverReportVO.java index d54e536..16c1878 100644 --- a/enjoy-pojo/src/main/java/com/enjoy/vo/TurnoverReportVO.java +++ b/enjoy-common/src/main/java/com/enjoy/vo/TurnoverReportVO.java @@ -13,10 +13,10 @@ @AllArgsConstructor public class TurnoverReportVO implements Serializable { - //日期,以逗号分隔,例如:2022-10-01,2022-10-02,2022-10-03 + // 日期,以逗号分隔,例如:2022-10-01,2022-10-02,2022-10-03 private String dateList; - //营业额,以逗号分隔,例如:406.0,1520.0,75.0 + // 营业额,以逗号分隔,例如:406.0,1520.0,75.0 private String turnoverList; } diff --git a/enjoy-pojo/src/main/java/com/enjoy/vo/UserLoginVO.java b/enjoy-common/src/main/java/com/enjoy/vo/UserLoginVO.java similarity index 97% rename from enjoy-pojo/src/main/java/com/enjoy/vo/UserLoginVO.java rename to enjoy-common/src/main/java/com/enjoy/vo/UserLoginVO.java index 3ab34f1..82fc548 100644 --- a/enjoy-pojo/src/main/java/com/enjoy/vo/UserLoginVO.java +++ b/enjoy-common/src/main/java/com/enjoy/vo/UserLoginVO.java @@ -14,7 +14,9 @@ public class UserLoginVO implements Serializable { private Long id; + private String openid; + private String token; } diff --git a/enjoy-pojo/src/main/java/com/enjoy/vo/UserReportVO.java b/enjoy-common/src/main/java/com/enjoy/vo/UserReportVO.java similarity index 66% rename from enjoy-pojo/src/main/java/com/enjoy/vo/UserReportVO.java rename to enjoy-common/src/main/java/com/enjoy/vo/UserReportVO.java index 60dbb17..7bac70a 100644 --- a/enjoy-pojo/src/main/java/com/enjoy/vo/UserReportVO.java +++ b/enjoy-common/src/main/java/com/enjoy/vo/UserReportVO.java @@ -13,13 +13,13 @@ @AllArgsConstructor public class UserReportVO implements Serializable { - //日期,以逗号分隔,例如:2022-10-01,2022-10-02,2022-10-03 + // 日期,以逗号分隔,例如:2022-10-01,2022-10-02,2022-10-03 private String dateList; - //用户总量,以逗号分隔,例如:200,210,220 + // 用户总量,以逗号分隔,例如:200,210,220 private String totalUserList; - //新增用户,以逗号分隔,例如:20,21,10 + // 新增用户,以逗号分隔,例如:20,21,10 private String newUserList; } diff --git a/enjoy-pojo/pom.xml b/enjoy-pojo/pom.xml deleted file mode 100644 index e3e25eb..0000000 --- a/enjoy-pojo/pom.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - enjoy-delicious-food - com.enjoy - 1.0-SNAPSHOT - - 4.0.0 - enjoy-pojo - 1.0-SNAPSHOT - - - org.projectlombok - lombok - - - - com.fasterxml.jackson.core - jackson-databind - 2.9.2 - - - - com.github.xiaoymin - knife4j-spring-boot-starter - - - diff --git a/enjoy-pojo/src/main/java/com/enjoy/vo/OrderPaymentVO.java b/enjoy-pojo/src/main/java/com/enjoy/vo/OrderPaymentVO.java deleted file mode 100644 index 4fdbcac..0000000 --- a/enjoy-pojo/src/main/java/com/enjoy/vo/OrderPaymentVO.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.enjoy.vo; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; - -import java.io.Serializable; - -@Data -@Builder -@NoArgsConstructor -@AllArgsConstructor -public class OrderPaymentVO implements Serializable { - - private String nonceStr; //随机字符串 - private String paySign; //签名 - private String timeStamp; //时间戳 - private String signType; //签名算法 - private String packageStr; //统一下单接口返回的 prepay_id 参数值 - -} diff --git a/enjoy-server/pom.xml b/enjoy-server/pom.xml index 81324d9..339db03 100644 --- a/enjoy-server/pom.xml +++ b/enjoy-server/pom.xml @@ -7,22 +7,17 @@ com.enjoy 1.0-SNAPSHOT + 4.0.0 enjoy-server - + com.enjoy enjoy-common 1.0-SNAPSHOT - - com.enjoy - enjoy-pojo - 1.0-SNAPSHOT - - org.springframework.boot spring-boot-starter @@ -40,10 +35,24 @@ compile + + org.springframework.boot + spring-boot-starter-data-redis + + + + org.springframework.boot + spring-boot-starter-cache + + + + org.springframework.boot + spring-boot-starter-websocket + + mysql mysql-connector-java - runtime @@ -66,11 +75,6 @@ druid-spring-boot-starter - - com.github.pagehelper - pagehelper-spring-boot-starter - - org.aspectj aspectjrt @@ -81,26 +85,6 @@ aspectjweaver - - com.github.xiaoymin - knife4j-spring-boot-starter - - - - org.springframework.boot - spring-boot-starter-data-redis - - - - org.springframework.boot - spring-boot-starter-cache - - - - org.springframework.boot - spring-boot-starter-websocket - - javax.xml.bind jaxb-api @@ -121,15 +105,15 @@ org.apache.httpcomponents httpclient - - - - - org.springframework.boot - spring-boot-maven-plugin - - - + + com.github.xiaoymin + knife4j-spring-boot-starter + + + com.github.pagehelper + pagehelper-spring-boot-starter + + diff --git a/enjoy-server/src/main/java/com/enjoy/EnjoyApplication.java b/enjoy-server/src/main/java/com/enjoy/EnjoyApplication.java index 0cfe5c1..d7b40a7 100644 --- a/enjoy-server/src/main/java/com/enjoy/EnjoyApplication.java +++ b/enjoy-server/src/main/java/com/enjoy/EnjoyApplication.java @@ -13,6 +13,6 @@ public class EnjoyApplication { public static void main(String[] args) { SpringApplication.run(EnjoyApplication.class, args); - log.info("server started"); + log.info("Server started. Open http://localhost/#/login in your browser to login."); } } diff --git a/enjoy-server/src/main/java/com/enjoy/config/WebMvcConfiguration.java b/enjoy-server/src/main/java/com/enjoy/config/WebMvcConfiguration.java index 79ece9e..c330a31 100644 --- a/enjoy-server/src/main/java/com/enjoy/config/WebMvcConfiguration.java +++ b/enjoy-server/src/main/java/com/enjoy/config/WebMvcConfiguration.java @@ -36,7 +36,6 @@ public class WebMvcConfiguration extends WebMvcConfigurationSupport { /** * 注册自定义拦截器 - * * @param registry */ protected void addInterceptors(InterceptorRegistry registry) { @@ -55,8 +54,6 @@ protected void addInterceptors(InterceptorRegistry registry) { /** * 通过knife4j生成接口文档 - * - * @return */ @Bean public Docket docket() { @@ -77,7 +74,6 @@ public Docket docket() { /** * 设置静态资源映射 - * * @param registry */ protected void addResourceHandlers(ResourceHandlerRegistry registry) { @@ -88,7 +84,6 @@ protected void addResourceHandlers(ResourceHandlerRegistry registry) { /** * 扩展Spring MVC 框架的消息转换器 - * * @param converters */ protected void extendMessageConverters(List> converters) { @@ -100,4 +95,5 @@ protected void extendMessageConverters(List> converters) // 将自己的消息转换器加入容器中 converters.add(0, converter); } -} + +} \ No newline at end of file diff --git a/enjoy-server/src/main/java/com/enjoy/controller/AddressBookController.java b/enjoy-server/src/main/java/com/enjoy/controller/user/AddressBookController.java similarity index 98% rename from enjoy-server/src/main/java/com/enjoy/controller/AddressBookController.java rename to enjoy-server/src/main/java/com/enjoy/controller/user/AddressBookController.java index 67b2933..9474ac6 100644 --- a/enjoy-server/src/main/java/com/enjoy/controller/AddressBookController.java +++ b/enjoy-server/src/main/java/com/enjoy/controller/user/AddressBookController.java @@ -1,4 +1,4 @@ -package com.enjoy.controller; +package com.enjoy.controller.user; import com.enjoy.context.BaseContext; import com.enjoy.entity.AddressBook; diff --git a/enjoy-server/src/main/java/com/enjoy/handler/GlobalExceptionHandler.java b/enjoy-server/src/main/java/com/enjoy/handler/GlobalExceptionHandler.java index 7e02bc0..f6e5ddc 100644 --- a/enjoy-server/src/main/java/com/enjoy/handler/GlobalExceptionHandler.java +++ b/enjoy-server/src/main/java/com/enjoy/handler/GlobalExceptionHandler.java @@ -18,9 +18,6 @@ public class GlobalExceptionHandler { /** * 捕获业务异常 - * - * @param ex - * @return */ @ExceptionHandler public Result exceptionHandler(BaseException ex) { @@ -30,9 +27,6 @@ public Result exceptionHandler(BaseException ex) { /** * 处理SQL异常 - * - * @param ex - * @return */ @ExceptionHandler public Result exceptionHandler(SQLIntegrityConstraintViolationException ex) { @@ -47,4 +41,5 @@ public Result exceptionHandler(SQLIntegrityConstraintViolationException ex) { return Result.error(MessageConstant.UNKNOWN_ERROR); } } -} + +} \ No newline at end of file diff --git a/enjoy-server/src/main/java/com/enjoy/interceptor/JwtTokenAdminInterceptor.java b/enjoy-server/src/main/java/com/enjoy/interceptor/JwtTokenAdminInterceptor.java index 0fd2874..cf2a3ea 100644 --- a/enjoy-server/src/main/java/com/enjoy/interceptor/JwtTokenAdminInterceptor.java +++ b/enjoy-server/src/main/java/com/enjoy/interceptor/JwtTokenAdminInterceptor.java @@ -53,9 +53,10 @@ public boolean preHandle(HttpServletRequest request, HttpServletResponse respons //3、通过,放行 return true; } catch (Exception ex) { - //4、不通过,响应401状态码 + //4、不通过,响应 401 状态码 response.setStatus(401); return false; } } -} + +} \ No newline at end of file diff --git a/enjoy-server/src/main/java/com/enjoy/interceptor/JwtTokenUserInterceptor.java b/enjoy-server/src/main/java/com/enjoy/interceptor/JwtTokenUserInterceptor.java index 0c09ed9..734e7a5 100644 --- a/enjoy-server/src/main/java/com/enjoy/interceptor/JwtTokenUserInterceptor.java +++ b/enjoy-server/src/main/java/com/enjoy/interceptor/JwtTokenUserInterceptor.java @@ -52,9 +52,10 @@ public boolean preHandle(HttpServletRequest request, HttpServletResponse respons //3、通过,放行 return true; } catch (Exception ex) { - //4、不通过,响应401状态码 + //4、不通过,响应 401 状态码 response.setStatus(401); return false; } } -} + +} \ No newline at end of file diff --git a/enjoy-server/src/main/java/com/enjoy/mapper/AddressBookMapper.java b/enjoy-server/src/main/java/com/enjoy/mapper/AddressBookMapper.java index 837c3c7..69833ca 100644 --- a/enjoy-server/src/main/java/com/enjoy/mapper/AddressBookMapper.java +++ b/enjoy-server/src/main/java/com/enjoy/mapper/AddressBookMapper.java @@ -12,7 +12,6 @@ public interface AddressBookMapper { * 条件查询 * * @param addressBook - * @return */ List list(AddressBook addressBook); @@ -32,7 +31,6 @@ public interface AddressBookMapper { * 根据id查询 * * @param id - * @return */ @Select("select * from address_book where id = #{id}") AddressBook getById(Long id); @@ -60,4 +58,4 @@ public interface AddressBookMapper { @Delete("delete from address_book where id = #{id}") void deleteById(Long id); -} +} \ No newline at end of file diff --git a/enjoy-server/src/main/resources/mapper/DishMapper.xml b/enjoy-server/src/main/resources/mapper/DishMapper.xml index 70ee5cf..804b85d 100644 --- a/enjoy-server/src/main/resources/mapper/DishMapper.xml +++ b/enjoy-server/src/main/resources/mapper/DishMapper.xml @@ -24,8 +24,10 @@ #{description}, update_time = #{updateTime}, - update_user =#{updateUser}, - status =#{status}, + update_user = + #{updateUser}, + status = + #{status}, where id = #{id} @@ -34,9 +36,14 @@ select d.*, c.name as categoryName from dish d left outer join category c on d.category_id = c.id - and d.name like concat('%', #{name}, '%') - and d.category_id = #{categoryId} - and d.status = #{status} + and d.name like concat('%', + #{name}, + '%' + ) + and d.category_id = + #{categoryId} + and d.status = + #{status} order by d.create_time desc @@ -44,9 +51,14 @@ @@ -54,8 +66,10 @@ diff --git a/enjoy-server/src/main/resources/mapper/SetmealMapper.xml b/enjoy-server/src/main/resources/mapper/SetmealMapper.xml index b4dc86a..5613c11 100644 --- a/enjoy-server/src/main/resources/mapper/SetmealMapper.xml +++ b/enjoy-server/src/main/resources/mapper/SetmealMapper.xml @@ -15,14 +15,22 @@ update setmeal - name = #{name}, - category_id = #{categoryId}, - price = #{price}, - status = #{status}, - description = #{description}, - image = #{image}, - update_time = #{updateTime}, - update_user = #{updateUser} + name = + #{name}, + category_id = + #{categoryId}, + price = + #{price}, + status = + #{status}, + description = + #{description}, + image = + #{image}, + update_time = + #{updateTime}, + update_user = + #{updateUser} where id=#{id}; @@ -33,13 +41,18 @@ from setmeal s left join category c on s.category_id = c.id - and s.name like concat('%',#{name},'%') + and s.name like concat('%', + #{name}, + '%' + ) - and s.status=#{status} + and s.status= + #{status} - and s.category_id=#{categoryId} + and s.category_id= + #{categoryId} order by s.create_time desc @@ -58,9 +71,14 @@ select * from setmeal - and name like concat('%',#{name},'%') - and category_id = #{categoryId} - and status = #{status} + and name like concat('%', + #{name}, + '%' + ) + and category_id = + #{categoryId} + and status = + #{status} @@ -69,10 +87,12 @@ select count(id) from setmeal - and status = #{status} + and status = + #{status} - and category_id = #{categoryId} + and category_id = + #{categoryId} diff --git a/pom.xml b/pom.xml index 41485df..4512745 100644 --- a/pom.xml +++ b/pom.xml @@ -8,18 +8,19 @@ org.springframework.boot 2.7.3 + com.enjoy enjoy-delicious-food pom 1.0-SNAPSHOT + enjoy-common - enjoy-pojo enjoy-server enjoy-build + - 1.0-SNAPSHOT 8.0.22 2.2.0 1.18.30 @@ -33,6 +34,8 @@ 0.9.1 2.3.1 3.16 + 0.4.8 + 4.5.13 @@ -55,18 +58,18 @@ ${lombok} - - com.alibaba - fastjson - ${fastjson} - - commons-lang commons-lang ${commons.lang} + + com.alibaba + fastjson + ${fastjson} + + com.alibaba druid-spring-boot-starter @@ -74,15 +77,15 @@ - com.github.pagehelper - pagehelper-spring-boot-starter - ${pagehelper} + com.aliyun.oss + aliyun-sdk-oss + ${aliyun.sdk.oss} - com.github.xiaoymin - knife4j-spring-boot-starter - ${knife4j} + javax.xml.bind + jaxb-api + ${jaxb-api} @@ -103,18 +106,6 @@ ${jjwt} - - com.aliyun.oss - aliyun-sdk-oss - ${aliyun.sdk.oss} - - - - javax.xml.bind - jaxb-api - ${jaxb-api} - - org.apache.poi @@ -132,14 +123,26 @@ org.apache.httpcomponents httpclient - 4.5.13 + ${httpcomponents} com.github.wechatpay-apiv3 wechatpay-apache-httpclient - 0.4.8 + ${wechatpay-apiv3} + + + + com.github.pagehelper + pagehelper-spring-boot-starter + ${pagehelper} + + + + com.github.xiaoymin + knife4j-spring-boot-starter + ${knife4j}