From 251e98bb68fa8169fb67590b0454e504b045ed76 Mon Sep 17 00:00:00 2001 From: tsukiyalo <2450026988@qq.com> Date: Wed, 18 Dec 2024 14:46:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=A1=E5=BF=AB=E9=80=812024.12.16.v0.0.7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{ => school_lend_back_end}/.gitignore | 0 .../{ => school_lend_back_end}/pom.xml | 0 .../sql/create_table.sql | 0 .../UserCenterApplication.java | 0 .../annotation/AuthCheck.java | 0 .../annotation/SystemLog.java | 0 .../aop/AuthInterceptor.java | 0 .../aop/SystemLogInterceptor.java | 0 .../common/BaseResponse.java | 0 .../common/ErrorCode.java | 0 .../common/ResultUtils.java | 0 .../config/AliPayNotifyHandler.java | 0 .../config/AlipayClients.java | 0 .../config/CorsConfig.java | 0 .../config/JsonConfig.java | 0 .../config/Knife4jConfig.java | 0 .../config/MyBatisPlusConfig.java | 0 .../config/RedisSessionRepositoryConfig.java | 0 .../config/WebsocketConfig.java | 0 .../contant/CommonConstant.java | 0 .../contant/FileConstant.java | 0 .../contant/RedisKeyConstant.java | 0 .../contant/RegexConstant.java | 0 .../contant/SystemLogConstant.java | 0 .../contant/UserConstant.java | 0 .../contant/WebsocketConstant.java | 0 .../controller/BusinessController.java | 50 +++++++++++++-- .../controller/CartController.java | 0 .../controller/CategoryController.java | 0 .../controller/CollectController.java | 0 .../controller/DishesController.java | 0 .../controller/DishesGroupController.java | 0 .../controller/FileController.java | 0 .../controller/OrdersController.java | 28 ++++++++- .../controller/OssController.java | 0 .../controller/PrivateChatController.java | 0 .../controller/PrivateMessageController.java | 0 .../controller/SpecificationsController.java | 0 .../controller/SystemInfoController.java | 0 .../controller/SystemLogController.java | 0 .../controller/TestAlipayController.java | 4 +- .../controller/UserController.java | 0 .../controller/UserRatingController.java | 28 +++++---- .../exception/BusinessException.java | 0 .../exception/GlobalExceptionHandler.java | 0 .../exception/ThrowUtils.java | 0 .../listener/WebSocketEventListener.java | 0 .../manager/SessionManager.java | 0 .../mapper/AttributeMapper.java | 0 .../mapper/BusinessAuthMapper.java | 0 .../mapper/BusinessLevelMapper.java | 0 .../mapper/BusinessMapper.java | 0 .../mapper/CartMapper.java | 0 .../mapper/CategoryMapper.java | 0 .../mapper/CollectMapper.java | 0 .../mapper/DishesGroupMapper.java | 0 .../mapper/DishesMapper.java | 0 .../mapper/OrderDetailsMapper.java | 0 .../mapper/OrdersMapper.java | 0 .../mapper/PrivateMessageMapper.java | 0 .../mapper/SpecificationsDishesMapper.java | 0 .../mapper/SpecificationsMapper.java | 0 .../mapper/SysteminfoMapper.java | 0 .../mapper/SystemlogMapper.java | 0 .../mapper/UserMapper.java | 0 .../mapper/UserRatingMapper.java | 0 .../model/domain/Attribute.java | 0 .../model/domain/Business.java | 0 .../model/domain/BusinessAuth.java | 0 .../model/domain/BusinessLevel.java | 0 .../model/domain/Cart.java | 0 .../model/domain/Category.java | 0 .../model/domain/Collect.java | 0 .../model/domain/Dishes.java | 0 .../model/domain/DishesGroup.java | 0 .../model/domain/OrderDetails.java | 0 .../model/domain/Orders.java | 0 .../model/domain/PrivateMessage.java | 0 .../model/domain/Specifications.java | 0 .../model/domain/SpecificationsDishes.java | 0 .../model/domain/Systeminfo.java | 0 .../model/domain/Systemlog.java | 0 .../model/domain/User.java | 0 .../model/domain/UserLoginRedisInfo.java | 0 .../model/domain/UserRating.java | 0 .../model/dto/CommonRequest.java | 0 .../model/dto/Dishes/DishesAddRequest.java | 0 .../model/dto/Dishes/DishesDeleteRequest.java | 0 .../model/dto/Dishes/DishesQueryRequest.java | 0 .../model/dto/Dishes/DishesUpdateRequest.java | 0 .../DishesGroup/DishesGroupAddRequest.java | 0 .../DishesGroup/DishesGroupDeleteRequest.java | 0 .../DishesGroup/DishesGroupQueryRequest.java | 0 .../DishesGroup/DishesGroupUpdateRequest.java | 0 .../model/dto/PageRequest.java | 0 .../dto/attribute/AttributeAddRequest.java | 0 .../dto/attribute/AttributeUpdateRequest.java | 0 .../dto/business/BusinessAddRequest.java | 0 .../dto/business/BusinessQueryRequest.java | 0 .../dto/business/BusinessUpdateMyRequest.java | 0 .../dto/business/BusinessUpdateRequest.java | 0 .../model/dto/cart/CartAddRequest.java | 0 .../model/dto/cart/CartDeleteRequest.java | 0 .../model/dto/cart/CartQueryRequest.java | 0 .../model/dto/cart/CartUpdateRequest.java | 0 .../dto/category/CategoryAddRequest.java | 0 .../dto/category/CategoryDeleteRequest.java | 0 .../dto/category/CategoryUpdateRequest.java | 0 .../model/dto/collect/CollectAddRequest.java | 0 .../model/dto/file/UploadFileRequest.java | 0 .../model/dto/log/LogQueryRequest.java | 0 .../model/dto/order/MyOrderQueryRequest.java | 0 .../model/dto/order/OrderAddRequest.java | 0 .../model/dto/order/OrderCountRequest.java | 0 .../dto/order/OrderDetailAddRequest.java | 0 .../model/dto/order/OrderQueryRequest.java | 0 .../SpecificationsAddRequest.java | 0 .../SpecificationsMyQueryRequest.java | 0 .../SpecificationsQueryRequest.java | 0 .../SpecificationsUpdateRequest.java | 0 .../model/dto/system/SystemAddRequest.java | 0 .../model/dto/system/SystemDeleteRequest.java | 0 .../model/dto/system/SystemQueryRequest.java | 0 .../model/dto/user/UserAddRequest.java | 0 .../model/dto/user/UserDeleteRequest.java | 0 .../model/dto/user/UserLoginRequest.java | 0 .../model/dto/user/UserQueryRequest.java | 0 .../model/dto/user/UserRegisterRequest.java | 0 .../model/dto/user/UserSearchRequest.java | 0 .../model/dto/user/UserUpdateMyRequest.java | 0 .../dto/user/UserUpdatePasswordRequest.java | 0 .../model/dto/user/UserUpdateRequest.java | 0 .../dto/userRating/UserRatingAddRequest.java | 5 ++ .../userRating/UserRatingReviewRequest.java | 24 +++++++ .../model/enums/FileUploadBizEnum.java | 0 .../model/enums/UserRoleEnum.java | 0 .../model/vo/AttributeVO.java | 0 .../model/vo/BusinessAdminVO.java | 0 .../model/vo/BusinessLogVO.java | 0 .../model/vo/BusinessVO.java | 5 ++ .../school_send_back_end/model/vo/CartVO.java | 0 .../model/vo/CollectVO.java | 30 +++++++++ .../model/vo/DishesGroupVO.java | 0 .../model/vo/DishesVO.java | 0 .../model/vo/LoginUserVO.java | 0 .../model/vo/OrderDetailsVO.java | 0 .../model/vo/OrdersExcelVO.java | 0 .../model/vo/OrdersVO.java | 0 .../model/vo/SpecificationsVO.java | 0 .../school_send_back_end/model/vo/UserVO.java | 0 .../scheduler/UpdateBusiness.java | 0 .../scheduler/UpdateOrderState.java | 32 ++++++++++ .../service/AliPayService.java | 2 +- .../service/AttributeService.java | 0 .../service/BusinessAuthService.java | 0 .../service/BusinessLevelService.java | 0 .../service/BusinessService.java | 1 - .../service/CartService.java | 0 .../service/CategoryService.java | 0 .../service/CollectService.java | 0 .../service/DishesGroupService.java | 0 .../service/DishesService.java | 0 .../service/OrderDetailsService.java | 0 .../service/OrdersService.java | 0 .../service/OssService.java | 0 .../service/PrivateMessageService.java | 0 .../service/SpecificationsDishesService.java | 0 .../service/SpecificationsService.java | 0 .../service/SysteminfoService.java | 0 .../service/SystemlogService.java | 0 .../service/UserRatingService.java | 0 .../service/UserService.java | 0 .../service/WebsocketService.java | 0 .../service/impl/AlipayServiceImpl.java | 4 +- .../service/impl/AttributeServiceImpl.java | 0 .../service/impl/BusinessAuthServiceImpl.java | 0 .../impl/BusinessLevelServiceImpl.java | 0 .../service/impl/BusinessServiceImpl.java | 0 .../service/impl/CartServiceImpl.java | 0 .../service/impl/CategoryServiceImpl.java | 0 .../service/impl/CollectServiceImpl.java | 0 .../service/impl/DishesGroupServiceImpl.java | 0 .../service/impl/DishesServiceImpl.java | 0 .../service/impl/OrderDetailsServiceImpl.java | 0 .../service/impl/OrdersServiceImpl.java | 0 .../service/impl/OssServiceImpl.java | 0 .../impl/PrivateMessageServiceImpl.java | 0 .../impl/SpecificationsDishesServiceImpl.java | 0 .../impl/SpecificationsServiceImpl.java | 0 .../service/impl/SysteminfoServiceImpl.java | 0 .../service/impl/SystemlogServiceImpl.java | 0 .../service/impl/UserRatingServiceImpl.java | 2 +- .../service/impl/UserServiceImpl.java | 0 .../utils/ConstantPropertiesUtil.java | 0 .../utils/ExcelUtils.java | 0 .../school_send_back_end/utils/NetUtils.java | 0 .../utils/RandomNumberGenerator.java | 0 .../utils/RedisKeyUtils.java | 0 .../utils/RegexUtils.java | 0 .../school_send_back_end/utils/SqlUtils.java | 0 .../utils/UniqueNumberGenerator.java | 63 +++++++++++++++++++ .../src/main/resources/application-dev.yml | 14 +++++ .../src/main/resources/application-prod.yml | 14 +++++ .../src/main/resources/application.yml | 5 +- .../main/resources/mapper/AttributeMapper.xml | 0 .../resources/mapper/BusinessAuthMapper.xml | 0 .../resources/mapper/BusinessLevelMapper.xml | 0 .../main/resources/mapper/BusinessMapper.xml | 0 .../src/main/resources/mapper/CartMapper.xml | 0 .../main/resources/mapper/CategoryMapper.xml | 0 .../main/resources/mapper/CollectMapper.xml | 0 .../resources/mapper/DishesGroupMapper.xml | 0 .../main/resources/mapper/DishesMapper.xml | 0 .../resources/mapper/OrderDetailsMapper.xml | 0 .../main/resources/mapper/OrdersMapper.xml | 0 .../resources/mapper/PrivateMessageMapper.xml | 0 .../mapper/SpecificationsDishesMapper.xml | 0 .../resources/mapper/SpecificationsMapper.xml | 0 .../resources/mapper/SysteminfoMapper.xml | 0 .../main/resources/mapper/SystemlogMapper.xml | 0 .../src/main/resources/mapper/UserMapper.xml | 0 .../resources/mapper/UserRatingMapper.xml | 0 .../src/main/resources/static/index.html | 0 .../UserCenterApplicationTests.java | 23 +++++++ .../controller/UserControllerTest.java | 0 .../dto/business/BusinessAddRequest.java | 0 .../utils/UniqueNumberGenerator.java | 44 ------------- .../UserCenterApplicationTests.java | 14 ----- 228 files changed, 305 insertions(+), 87 deletions(-) rename school_lend_back_end/{ => school_lend_back_end}/.gitignore (100%) rename school_lend_back_end/{ => school_lend_back_end}/pom.xml (100%) rename school_lend_back_end/{ => school_lend_back_end}/sql/create_table.sql (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/UserCenterApplication.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/annotation/AuthCheck.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/annotation/SystemLog.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/aop/AuthInterceptor.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/aop/SystemLogInterceptor.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/common/BaseResponse.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/common/ErrorCode.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/common/ResultUtils.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/config/AliPayNotifyHandler.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/config/AlipayClients.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/config/CorsConfig.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/config/JsonConfig.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/config/Knife4jConfig.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/config/MyBatisPlusConfig.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/config/RedisSessionRepositoryConfig.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/config/WebsocketConfig.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/contant/CommonConstant.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/contant/FileConstant.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/contant/RedisKeyConstant.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/contant/RegexConstant.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/contant/SystemLogConstant.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/contant/UserConstant.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/contant/WebsocketConstant.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/controller/BusinessController.java (81%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/controller/CartController.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/controller/CategoryController.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/controller/CollectController.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/controller/DishesController.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/controller/DishesGroupController.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/controller/FileController.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/controller/OrdersController.java (92%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/controller/OssController.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/controller/PrivateChatController.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/controller/PrivateMessageController.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/controller/SpecificationsController.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/controller/SystemInfoController.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/controller/SystemLogController.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/controller/TestAlipayController.java (99%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/controller/UserController.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/controller/UserRatingController.java (84%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/exception/BusinessException.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/exception/GlobalExceptionHandler.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/exception/ThrowUtils.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/listener/WebSocketEventListener.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/manager/SessionManager.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/mapper/AttributeMapper.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/mapper/BusinessAuthMapper.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/mapper/BusinessLevelMapper.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/mapper/BusinessMapper.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/mapper/CartMapper.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/mapper/CategoryMapper.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/mapper/CollectMapper.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/mapper/DishesGroupMapper.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/mapper/DishesMapper.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/mapper/OrderDetailsMapper.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/mapper/OrdersMapper.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/mapper/PrivateMessageMapper.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/mapper/SpecificationsDishesMapper.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/mapper/SpecificationsMapper.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/mapper/SysteminfoMapper.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/mapper/SystemlogMapper.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/mapper/UserMapper.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/mapper/UserRatingMapper.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/domain/Attribute.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/domain/Business.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/domain/BusinessAuth.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/domain/BusinessLevel.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/domain/Cart.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/domain/Category.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/domain/Collect.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/domain/Dishes.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/domain/DishesGroup.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/domain/OrderDetails.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/domain/Orders.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/domain/PrivateMessage.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/domain/Specifications.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/domain/SpecificationsDishes.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/domain/Systeminfo.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/domain/Systemlog.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/domain/User.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/domain/UserLoginRedisInfo.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/domain/UserRating.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/CommonRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/Dishes/DishesAddRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/Dishes/DishesDeleteRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/Dishes/DishesQueryRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/Dishes/DishesUpdateRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/DishesGroup/DishesGroupAddRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/DishesGroup/DishesGroupDeleteRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/DishesGroup/DishesGroupQueryRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/DishesGroup/DishesGroupUpdateRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/PageRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/attribute/AttributeAddRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/attribute/AttributeUpdateRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/business/BusinessAddRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/business/BusinessQueryRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/business/BusinessUpdateMyRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/business/BusinessUpdateRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/cart/CartAddRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/cart/CartDeleteRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/cart/CartQueryRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/cart/CartUpdateRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/category/CategoryAddRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/category/CategoryDeleteRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/category/CategoryUpdateRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/collect/CollectAddRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/file/UploadFileRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/log/LogQueryRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/order/MyOrderQueryRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/order/OrderAddRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/order/OrderCountRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/order/OrderDetailAddRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/order/OrderQueryRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/specifications/SpecificationsAddRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/specifications/SpecificationsMyQueryRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/specifications/SpecificationsQueryRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/specifications/SpecificationsUpdateRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/system/SystemAddRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/system/SystemDeleteRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/system/SystemQueryRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserAddRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserDeleteRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserLoginRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserQueryRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserRegisterRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserSearchRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserUpdateMyRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserUpdatePasswordRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserUpdateRequest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/dto/userRating/UserRatingAddRequest.java (87%) create mode 100644 school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/userRating/UserRatingReviewRequest.java rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/enums/FileUploadBizEnum.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/enums/UserRoleEnum.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/vo/AttributeVO.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/vo/BusinessAdminVO.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/vo/BusinessLogVO.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/vo/BusinessVO.java (95%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/vo/CartVO.java (100%) create mode 100644 school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/CollectVO.java rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/vo/DishesGroupVO.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/vo/DishesVO.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/vo/LoginUserVO.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/vo/OrderDetailsVO.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/vo/OrdersExcelVO.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/vo/OrdersVO.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/vo/SpecificationsVO.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/model/vo/UserVO.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/scheduler/UpdateBusiness.java (100%) create mode 100644 school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/scheduler/UpdateOrderState.java rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/service/AliPayService.java (84%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/service/AttributeService.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/service/BusinessAuthService.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/service/BusinessLevelService.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/service/BusinessService.java (96%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/service/CartService.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/service/CategoryService.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/service/CollectService.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/service/DishesGroupService.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/service/DishesService.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/service/OrderDetailsService.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/service/OrdersService.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/service/OssService.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/service/PrivateMessageService.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/service/SpecificationsDishesService.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/service/SpecificationsService.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/service/SysteminfoService.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/service/SystemlogService.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/service/UserRatingService.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/service/UserService.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/service/WebsocketService.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/service/impl/AlipayServiceImpl.java (98%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/service/impl/AttributeServiceImpl.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/service/impl/BusinessAuthServiceImpl.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/service/impl/BusinessLevelServiceImpl.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/service/impl/BusinessServiceImpl.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/service/impl/CartServiceImpl.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/service/impl/CategoryServiceImpl.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/service/impl/CollectServiceImpl.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/service/impl/DishesGroupServiceImpl.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/service/impl/DishesServiceImpl.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/service/impl/OrderDetailsServiceImpl.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/service/impl/OrdersServiceImpl.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/service/impl/OssServiceImpl.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/service/impl/PrivateMessageServiceImpl.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/service/impl/SpecificationsDishesServiceImpl.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/service/impl/SpecificationsServiceImpl.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/service/impl/SysteminfoServiceImpl.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/service/impl/SystemlogServiceImpl.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/service/impl/UserRatingServiceImpl.java (98%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/service/impl/UserServiceImpl.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/utils/ConstantPropertiesUtil.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/utils/ExcelUtils.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/utils/NetUtils.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/utils/RandomNumberGenerator.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/utils/RedisKeyUtils.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/utils/RegexUtils.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/java/com/bsz/school_send_back_end/utils/SqlUtils.java (100%) create mode 100644 school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/utils/UniqueNumberGenerator.java create mode 100644 school_lend_back_end/school_lend_back_end/src/main/resources/application-dev.yml create mode 100644 school_lend_back_end/school_lend_back_end/src/main/resources/application-prod.yml rename school_lend_back_end/{ => school_lend_back_end}/src/main/resources/application.yml (99%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/resources/mapper/AttributeMapper.xml (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/resources/mapper/BusinessAuthMapper.xml (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/resources/mapper/BusinessLevelMapper.xml (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/resources/mapper/BusinessMapper.xml (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/resources/mapper/CartMapper.xml (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/resources/mapper/CategoryMapper.xml (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/resources/mapper/CollectMapper.xml (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/resources/mapper/DishesGroupMapper.xml (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/resources/mapper/DishesMapper.xml (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/resources/mapper/OrderDetailsMapper.xml (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/resources/mapper/OrdersMapper.xml (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/resources/mapper/PrivateMessageMapper.xml (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/resources/mapper/SpecificationsDishesMapper.xml (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/resources/mapper/SpecificationsMapper.xml (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/resources/mapper/SysteminfoMapper.xml (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/resources/mapper/SystemlogMapper.xml (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/resources/mapper/UserMapper.xml (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/resources/mapper/UserRatingMapper.xml (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/main/resources/static/index.html (100%) create mode 100644 school_lend_back_end/school_lend_back_end/src/test/java/com/bsz/school_send_back_end/UserCenterApplicationTests.java rename school_lend_back_end/{ => school_lend_back_end}/src/test/java/com/bsz/school_send_back_end/controller/UserControllerTest.java (100%) rename school_lend_back_end/{ => school_lend_back_end}/src/test/java/com/bsz/school_send_back_end/model/dto/business/BusinessAddRequest.java (100%) delete mode 100644 school_lend_back_end/src/main/java/com/bsz/school_send_back_end/utils/UniqueNumberGenerator.java delete mode 100644 school_lend_back_end/src/test/java/com/bsz/school_send_back_end/UserCenterApplicationTests.java diff --git a/school_lend_back_end/.gitignore b/school_lend_back_end/school_lend_back_end/.gitignore similarity index 100% rename from school_lend_back_end/.gitignore rename to school_lend_back_end/school_lend_back_end/.gitignore diff --git a/school_lend_back_end/pom.xml b/school_lend_back_end/school_lend_back_end/pom.xml similarity index 100% rename from school_lend_back_end/pom.xml rename to school_lend_back_end/school_lend_back_end/pom.xml diff --git a/school_lend_back_end/sql/create_table.sql b/school_lend_back_end/school_lend_back_end/sql/create_table.sql similarity index 100% rename from school_lend_back_end/sql/create_table.sql rename to school_lend_back_end/school_lend_back_end/sql/create_table.sql diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/UserCenterApplication.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/UserCenterApplication.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/UserCenterApplication.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/UserCenterApplication.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/annotation/AuthCheck.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/annotation/AuthCheck.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/annotation/AuthCheck.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/annotation/AuthCheck.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/annotation/SystemLog.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/annotation/SystemLog.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/annotation/SystemLog.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/annotation/SystemLog.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/aop/AuthInterceptor.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/aop/AuthInterceptor.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/aop/AuthInterceptor.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/aop/AuthInterceptor.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/aop/SystemLogInterceptor.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/aop/SystemLogInterceptor.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/aop/SystemLogInterceptor.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/aop/SystemLogInterceptor.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/common/BaseResponse.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/common/BaseResponse.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/common/BaseResponse.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/common/BaseResponse.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/common/ErrorCode.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/common/ErrorCode.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/common/ErrorCode.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/common/ErrorCode.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/common/ResultUtils.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/common/ResultUtils.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/common/ResultUtils.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/common/ResultUtils.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/config/AliPayNotifyHandler.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/config/AliPayNotifyHandler.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/config/AliPayNotifyHandler.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/config/AliPayNotifyHandler.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/config/AlipayClients.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/config/AlipayClients.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/config/AlipayClients.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/config/AlipayClients.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/config/CorsConfig.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/config/CorsConfig.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/config/CorsConfig.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/config/CorsConfig.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/config/JsonConfig.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/config/JsonConfig.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/config/JsonConfig.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/config/JsonConfig.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/config/Knife4jConfig.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/config/Knife4jConfig.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/config/Knife4jConfig.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/config/Knife4jConfig.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/config/MyBatisPlusConfig.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/config/MyBatisPlusConfig.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/config/MyBatisPlusConfig.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/config/MyBatisPlusConfig.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/config/RedisSessionRepositoryConfig.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/config/RedisSessionRepositoryConfig.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/config/RedisSessionRepositoryConfig.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/config/RedisSessionRepositoryConfig.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/config/WebsocketConfig.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/config/WebsocketConfig.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/config/WebsocketConfig.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/config/WebsocketConfig.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/contant/CommonConstant.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/contant/CommonConstant.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/contant/CommonConstant.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/contant/CommonConstant.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/contant/FileConstant.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/contant/FileConstant.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/contant/FileConstant.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/contant/FileConstant.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/contant/RedisKeyConstant.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/contant/RedisKeyConstant.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/contant/RedisKeyConstant.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/contant/RedisKeyConstant.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/contant/RegexConstant.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/contant/RegexConstant.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/contant/RegexConstant.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/contant/RegexConstant.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/contant/SystemLogConstant.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/contant/SystemLogConstant.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/contant/SystemLogConstant.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/contant/SystemLogConstant.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/contant/UserConstant.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/contant/UserConstant.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/contant/UserConstant.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/contant/UserConstant.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/contant/WebsocketConstant.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/contant/WebsocketConstant.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/contant/WebsocketConstant.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/contant/WebsocketConstant.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/BusinessController.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/BusinessController.java similarity index 81% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/BusinessController.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/BusinessController.java index f8e967c..5d2623d 100644 --- a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/BusinessController.java +++ b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/BusinessController.java @@ -1,7 +1,9 @@ package com.bsz.school_send_back_end.controller; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.bsz.school_send_back_end.annotation.AuthCheck; import com.bsz.school_send_back_end.common.BaseResponse; @@ -10,18 +12,14 @@ import com.bsz.school_send_back_end.common.ResultUtils; import com.bsz.school_send_back_end.contant.UserConstant; import com.bsz.school_send_back_end.exception.BusinessException; import com.bsz.school_send_back_end.exception.ThrowUtils; -import com.bsz.school_send_back_end.model.domain.Business; -import com.bsz.school_send_back_end.model.domain.BusinessAuth; -import com.bsz.school_send_back_end.model.domain.User; +import com.bsz.school_send_back_end.model.domain.*; import com.bsz.school_send_back_end.model.dto.business.BusinessAddRequest; import com.bsz.school_send_back_end.model.dto.business.BusinessQueryRequest; import com.bsz.school_send_back_end.model.dto.business.BusinessUpdateMyRequest; import com.bsz.school_send_back_end.model.dto.business.BusinessUpdateRequest; import com.bsz.school_send_back_end.model.vo.BusinessAdminVO; import com.bsz.school_send_back_end.model.vo.BusinessVO; -import com.bsz.school_send_back_end.service.BusinessAuthService; -import com.bsz.school_send_back_end.service.BusinessService; -import com.bsz.school_send_back_end.service.UserService; +import com.bsz.school_send_back_end.service.*; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.BeanUtils; @@ -52,6 +50,12 @@ public class BusinessController { @Resource private UserService userService; + @Resource + private CollectService collectService; + + @Resource + private BusinessLevelService businessLevelService; + @PostMapping("/add") public BaseResponse addBusiness(@RequestBody BusinessAddRequest businessAddRequest) { @@ -166,6 +170,40 @@ public class BusinessController { return ResultUtils.success(businessAdminVO); } + /** + * 根据id查询 + */ + @GetMapping("/my/getById") + @AuthCheck(mustRole = UserConstant.DEFAULT_ROLE) + public BaseResponse getMyBusinessById(@RequestParam Long id, HttpServletRequest request) { + if (id <= 0) { + throw new BusinessException(ErrorCode.PARAMS_ERROR); + } + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(Business::getId, id); + Business business = businessService.getOne(queryWrapper); + ThrowUtils.throwIf(business == null, ErrorCode.OPERATION_ERROR, "没有找到商家"); + + BusinessVO businessVO = new BusinessVO(); + BeanUtils.copyProperties(business, businessVO); + User loginUser = userService.getLoginUser(request); + Long loginUserId = loginUser.getId(); + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(Collect::getUserId, loginUserId); + wrapper.eq(Collect::getBusinessId, id); + long count = collectService.count(wrapper); + Collect collect = collectService.getOne(wrapper); + if (count > 0) { + businessVO.setCollectId(collect.getId()); + } else{ + businessVO.setCollectId(0L); + } + BusinessLevel level = businessLevelService.getOne(Wrappers.lambdaQuery() + .eq(BusinessLevel::getBusinessId, id)); + businessVO.setLevel(level.getLevel()); + return ResultUtils.success(businessVO); + } + /** * 根据当前登录用户获取商家信息 */ diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/CartController.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/CartController.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/CartController.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/CartController.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/CategoryController.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/CategoryController.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/CategoryController.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/CategoryController.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/CollectController.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/CollectController.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/CollectController.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/CollectController.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/DishesController.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/DishesController.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/DishesController.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/DishesController.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/DishesGroupController.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/DishesGroupController.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/DishesGroupController.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/DishesGroupController.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/FileController.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/FileController.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/FileController.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/FileController.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/OrdersController.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/OrdersController.java similarity index 92% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/OrdersController.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/OrdersController.java index 05780fa..bd6a165 100644 --- a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/OrdersController.java +++ b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/OrdersController.java @@ -146,6 +146,7 @@ public class OrdersController { * 根据 id 获取订单信息 */ @GetMapping("/get/my") + @AuthCheck(mustRole = UserConstant.DEFAULT_ROLE) public BaseResponse getOrderVOByMyId(@RequestParam Long id, HttpServletRequest request) { if (id <= 0) { throw new BusinessException(ErrorCode.PARAMS_ERROR); @@ -399,7 +400,9 @@ public class OrdersController { Orders orders = ordersService.getOne(queryWrapper); Business loginBusiness = businessService.getLoginBusiness(request); Long businessId = loginBusiness.getId(); - ThrowUtils.throwIf(!businessId.equals(orders.getBusinessId()), ErrorCode.FORBIDDEN_ERROR, "当前订单不属于当前登录用户"); + ThrowUtils.throwIf(!businessId.equals(orders.getBusinessId()), ErrorCode.FORBIDDEN_ERROR, + "当前订单不属于当前登录用户"); + ThrowUtils.throwIf(!orders.getState().equals(1), ErrorCode.OPERATION_ERROR,"当前订单状态不是已支付状态"); LambdaUpdateWrapper updateWrapper = new LambdaUpdateWrapper<>(); updateWrapper.set(Orders::getState,4); updateWrapper.eq(Orders::getId, id); @@ -409,6 +412,29 @@ public class OrdersController { return ResultUtils.success(true); } + @PostMapping("/update/user") + @AuthCheck(mustRole = UserConstant.DEFAULT_ROLE) + public BaseResponse updateOrderStateByUser (@RequestBody CommonRequest commonRequest, HttpServletRequest request){ + if (commonRequest == null) { + throw new BusinessException(ErrorCode.PARAMS_ERROR); + } + + Long orderId = commonRequest.getId(); + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(Orders::getId, orderId); + Orders orders = ordersService.getOne(queryWrapper); + User loginUser = userService.getLoginUser(request); + ThrowUtils.throwIf(!loginUser.getId().equals(orders.getUserId()), ErrorCode.OPERATION_ERROR, + "当前订单不属于该用户"); + ThrowUtils.throwIf(!orders.getState().equals(4), ErrorCode.OPERATION_ERROR,"该订单未出餐"); + LambdaUpdateWrapper updateWrapper = new LambdaUpdateWrapper<>(); + updateWrapper.set(Orders::getState, 5); + updateWrapper.eq(Orders::getId, orderId); + boolean update = ordersService.update(updateWrapper); + ThrowUtils.throwIf(!update, ErrorCode.OPERATION_ERROR,"修改订单状态失败"); + return ResultUtils.success(true); + } + private BaseResponse getStringBaseResponse(String type, String startTime, String endTime, QueryWrapper queryWrapper) { queryWrapper.ge(StringUtils.isNotBlank(startTime), "createTime", startTime); diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/OssController.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/OssController.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/OssController.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/OssController.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/PrivateChatController.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/PrivateChatController.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/PrivateChatController.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/PrivateChatController.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/PrivateMessageController.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/PrivateMessageController.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/PrivateMessageController.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/PrivateMessageController.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/SpecificationsController.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/SpecificationsController.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/SpecificationsController.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/SpecificationsController.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/SystemInfoController.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/SystemInfoController.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/SystemInfoController.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/SystemInfoController.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/SystemLogController.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/SystemLogController.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/SystemLogController.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/SystemLogController.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/TestAlipayController.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/TestAlipayController.java similarity index 99% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/TestAlipayController.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/TestAlipayController.java index 60f3d66..9b8bb9d 100644 --- a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/TestAlipayController.java +++ b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/TestAlipayController.java @@ -142,7 +142,7 @@ public class TestAlipayController { throw new BusinessException(ErrorCode.NO_AUTH, "你不是该订单用户!"); } - String tradeNo = aliPayService.createPayment(String.valueOf(orderId), miniOpenId, order.getTotalPrice()); + String tradeNo = aliPayService.createPayment(String.valueOf(orderId), miniOpenId, order.getTotalPrice(), order.getBusinessId()); log.info("tradeNo:" + tradeNo); return ResultUtils.success(tradeNo); } @@ -190,7 +190,7 @@ public class TestAlipayController { model.setOutTradeNo(orderNo); model.setRefundAmount(String.valueOf(orders.getTotalPrice())); //退款请求单号 要求唯一 需改 - String number = UniqueNumberGenerator.generateNumber(); + String number = UniqueNumberGenerator.generateNumber(orders.getBusinessId()); model.setOutRequestNo(number); log.info("outRequestNo:" + number); request.setBizModel(model); diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/UserController.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/UserController.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/UserController.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/UserController.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/UserRatingController.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/UserRatingController.java similarity index 84% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/UserRatingController.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/UserRatingController.java index b629019..6c87f00 100644 --- a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/UserRatingController.java +++ b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/controller/UserRatingController.java @@ -10,13 +10,11 @@ import com.bsz.school_send_back_end.common.ResultUtils; import com.bsz.school_send_back_end.contant.UserConstant; import com.bsz.school_send_back_end.exception.BusinessException; import com.bsz.school_send_back_end.exception.ThrowUtils; -import com.bsz.school_send_back_end.model.domain.Business; import com.bsz.school_send_back_end.model.domain.User; import com.bsz.school_send_back_end.model.domain.UserRating; import com.bsz.school_send_back_end.model.dto.CommonRequest; import com.bsz.school_send_back_end.model.dto.userRating.UserRatingAddRequest; import com.bsz.school_send_back_end.model.dto.userRating.UserRatingReviewRequest; -import com.bsz.school_send_back_end.service.BusinessService; import com.bsz.school_send_back_end.service.UserRatingService; import com.bsz.school_send_back_end.service.UserService; import lombok.extern.slf4j.Slf4j; @@ -41,9 +39,6 @@ public class UserRatingController { @Resource private UserService userService; - @Resource - private BusinessService businessService; - /** * 添加用户评分 * @param userRatingAddRequest 用户评分请求 @@ -51,6 +46,7 @@ public class UserRatingController { * @return 是否添加成功 */ @PostMapping("/add") + @AuthCheck(mustRole = UserConstant.DEFAULT_ROLE) public BaseResponse addRating (@RequestBody UserRatingAddRequest userRatingAddRequest, HttpServletRequest request) { if (userRatingAddRequest == null) { throw new BusinessException(ErrorCode.PARAMS_ERROR); @@ -70,11 +66,18 @@ public class UserRatingController { * @return 是否删除成功 */ @PostMapping("/delete") - public BaseResponse deleteUserRating (@RequestBody CommonRequest commonRequest) { + @AuthCheck(mustRole = UserConstant.DEFAULT_ROLE) + public BaseResponse deleteUserRating (@RequestBody CommonRequest commonRequest, HttpServletRequest request) { if (commonRequest == null) { throw new BusinessException(ErrorCode.PARAMS_ERROR); } - boolean remove = userRatingService.removeById(commonRequest.getId()); + Long id = commonRequest.getId(); + User loginUser = userService.getLoginUser(request); + Long loginUserId = loginUser.getId(); + UserRating rating = userRatingService.getOne(Wrappers.lambdaQuery().eq(UserRating::getId, id)); + ThrowUtils.throwIf(!rating.getUserId().equals(loginUserId), ErrorCode.OPERATION_ERROR, + "当前评分不属于该用户"); + boolean remove = userRatingService.removeById(id); ThrowUtils.throwIf(!remove, ErrorCode.SYSTEM_ERROR, "删除失败"); return ResultUtils.success(true); @@ -94,14 +97,15 @@ public class UserRatingController { } /** - * 展示当前用户评分 - * @param request 当前用户 + * 查看商家评分 * @return 评分列表 */ @PostMapping("/list/business") - public BaseResponse> listUserRatingByBusiness (HttpServletRequest request) { - Business loginBusiness = businessService.getLoginBusiness(request); - Long businessId = loginBusiness.getId(); + public BaseResponse> listUserRatingByBusiness (@RequestBody CommonRequest commonRequest) { + if (commonRequest == null) { + throw new BusinessException(ErrorCode.PARAMS_ERROR); + } + Long businessId = commonRequest.getId(); List list = userRatingService.list(Wrappers.lambdaQuery() .eq(UserRating::getBusinessId, businessId)); return ResultUtils.success(list); diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/exception/BusinessException.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/exception/BusinessException.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/exception/BusinessException.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/exception/BusinessException.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/exception/GlobalExceptionHandler.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/exception/GlobalExceptionHandler.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/exception/GlobalExceptionHandler.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/exception/GlobalExceptionHandler.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/exception/ThrowUtils.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/exception/ThrowUtils.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/exception/ThrowUtils.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/exception/ThrowUtils.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/listener/WebSocketEventListener.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/listener/WebSocketEventListener.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/listener/WebSocketEventListener.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/listener/WebSocketEventListener.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/manager/SessionManager.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/manager/SessionManager.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/manager/SessionManager.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/manager/SessionManager.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/AttributeMapper.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/AttributeMapper.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/AttributeMapper.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/AttributeMapper.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/BusinessAuthMapper.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/BusinessAuthMapper.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/BusinessAuthMapper.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/BusinessAuthMapper.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/BusinessLevelMapper.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/BusinessLevelMapper.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/BusinessLevelMapper.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/BusinessLevelMapper.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/BusinessMapper.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/BusinessMapper.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/BusinessMapper.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/BusinessMapper.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/CartMapper.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/CartMapper.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/CartMapper.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/CartMapper.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/CategoryMapper.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/CategoryMapper.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/CategoryMapper.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/CategoryMapper.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/CollectMapper.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/CollectMapper.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/CollectMapper.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/CollectMapper.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/DishesGroupMapper.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/DishesGroupMapper.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/DishesGroupMapper.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/DishesGroupMapper.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/DishesMapper.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/DishesMapper.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/DishesMapper.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/DishesMapper.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/OrderDetailsMapper.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/OrderDetailsMapper.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/OrderDetailsMapper.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/OrderDetailsMapper.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/OrdersMapper.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/OrdersMapper.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/OrdersMapper.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/OrdersMapper.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/PrivateMessageMapper.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/PrivateMessageMapper.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/PrivateMessageMapper.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/PrivateMessageMapper.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/SpecificationsDishesMapper.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/SpecificationsDishesMapper.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/SpecificationsDishesMapper.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/SpecificationsDishesMapper.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/SpecificationsMapper.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/SpecificationsMapper.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/SpecificationsMapper.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/SpecificationsMapper.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/SysteminfoMapper.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/SysteminfoMapper.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/SysteminfoMapper.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/SysteminfoMapper.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/SystemlogMapper.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/SystemlogMapper.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/SystemlogMapper.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/SystemlogMapper.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/UserMapper.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/UserMapper.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/UserMapper.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/UserMapper.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/UserRatingMapper.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/UserRatingMapper.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/UserRatingMapper.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/mapper/UserRatingMapper.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/Attribute.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/Attribute.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/Attribute.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/Attribute.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/Business.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/Business.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/Business.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/Business.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/BusinessAuth.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/BusinessAuth.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/BusinessAuth.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/BusinessAuth.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/BusinessLevel.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/BusinessLevel.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/BusinessLevel.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/BusinessLevel.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/Cart.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/Cart.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/Cart.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/Cart.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/Category.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/Category.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/Category.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/Category.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/Collect.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/Collect.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/Collect.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/Collect.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/Dishes.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/Dishes.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/Dishes.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/Dishes.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/DishesGroup.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/DishesGroup.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/DishesGroup.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/DishesGroup.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/OrderDetails.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/OrderDetails.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/OrderDetails.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/OrderDetails.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/Orders.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/Orders.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/Orders.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/Orders.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/PrivateMessage.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/PrivateMessage.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/PrivateMessage.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/PrivateMessage.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/Specifications.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/Specifications.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/Specifications.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/Specifications.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/SpecificationsDishes.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/SpecificationsDishes.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/SpecificationsDishes.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/SpecificationsDishes.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/Systeminfo.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/Systeminfo.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/Systeminfo.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/Systeminfo.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/Systemlog.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/Systemlog.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/Systemlog.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/Systemlog.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/User.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/User.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/User.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/User.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/UserLoginRedisInfo.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/UserLoginRedisInfo.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/UserLoginRedisInfo.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/UserLoginRedisInfo.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/UserRating.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/UserRating.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/UserRating.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/domain/UserRating.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/CommonRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/CommonRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/CommonRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/CommonRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/Dishes/DishesAddRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/Dishes/DishesAddRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/Dishes/DishesAddRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/Dishes/DishesAddRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/Dishes/DishesDeleteRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/Dishes/DishesDeleteRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/Dishes/DishesDeleteRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/Dishes/DishesDeleteRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/Dishes/DishesQueryRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/Dishes/DishesQueryRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/Dishes/DishesQueryRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/Dishes/DishesQueryRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/Dishes/DishesUpdateRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/Dishes/DishesUpdateRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/Dishes/DishesUpdateRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/Dishes/DishesUpdateRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/DishesGroup/DishesGroupAddRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/DishesGroup/DishesGroupAddRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/DishesGroup/DishesGroupAddRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/DishesGroup/DishesGroupAddRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/DishesGroup/DishesGroupDeleteRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/DishesGroup/DishesGroupDeleteRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/DishesGroup/DishesGroupDeleteRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/DishesGroup/DishesGroupDeleteRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/DishesGroup/DishesGroupQueryRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/DishesGroup/DishesGroupQueryRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/DishesGroup/DishesGroupQueryRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/DishesGroup/DishesGroupQueryRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/DishesGroup/DishesGroupUpdateRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/DishesGroup/DishesGroupUpdateRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/DishesGroup/DishesGroupUpdateRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/DishesGroup/DishesGroupUpdateRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/PageRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/PageRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/PageRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/PageRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/attribute/AttributeAddRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/attribute/AttributeAddRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/attribute/AttributeAddRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/attribute/AttributeAddRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/attribute/AttributeUpdateRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/attribute/AttributeUpdateRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/attribute/AttributeUpdateRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/attribute/AttributeUpdateRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/business/BusinessAddRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/business/BusinessAddRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/business/BusinessAddRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/business/BusinessAddRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/business/BusinessQueryRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/business/BusinessQueryRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/business/BusinessQueryRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/business/BusinessQueryRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/business/BusinessUpdateMyRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/business/BusinessUpdateMyRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/business/BusinessUpdateMyRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/business/BusinessUpdateMyRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/business/BusinessUpdateRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/business/BusinessUpdateRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/business/BusinessUpdateRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/business/BusinessUpdateRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/cart/CartAddRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/cart/CartAddRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/cart/CartAddRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/cart/CartAddRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/cart/CartDeleteRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/cart/CartDeleteRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/cart/CartDeleteRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/cart/CartDeleteRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/cart/CartQueryRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/cart/CartQueryRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/cart/CartQueryRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/cart/CartQueryRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/cart/CartUpdateRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/cart/CartUpdateRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/cart/CartUpdateRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/cart/CartUpdateRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/category/CategoryAddRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/category/CategoryAddRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/category/CategoryAddRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/category/CategoryAddRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/category/CategoryDeleteRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/category/CategoryDeleteRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/category/CategoryDeleteRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/category/CategoryDeleteRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/category/CategoryUpdateRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/category/CategoryUpdateRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/category/CategoryUpdateRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/category/CategoryUpdateRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/collect/CollectAddRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/collect/CollectAddRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/collect/CollectAddRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/collect/CollectAddRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/file/UploadFileRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/file/UploadFileRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/file/UploadFileRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/file/UploadFileRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/log/LogQueryRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/log/LogQueryRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/log/LogQueryRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/log/LogQueryRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/order/MyOrderQueryRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/order/MyOrderQueryRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/order/MyOrderQueryRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/order/MyOrderQueryRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/order/OrderAddRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/order/OrderAddRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/order/OrderAddRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/order/OrderAddRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/order/OrderCountRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/order/OrderCountRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/order/OrderCountRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/order/OrderCountRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/order/OrderDetailAddRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/order/OrderDetailAddRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/order/OrderDetailAddRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/order/OrderDetailAddRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/order/OrderQueryRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/order/OrderQueryRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/order/OrderQueryRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/order/OrderQueryRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/specifications/SpecificationsAddRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/specifications/SpecificationsAddRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/specifications/SpecificationsAddRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/specifications/SpecificationsAddRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/specifications/SpecificationsMyQueryRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/specifications/SpecificationsMyQueryRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/specifications/SpecificationsMyQueryRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/specifications/SpecificationsMyQueryRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/specifications/SpecificationsQueryRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/specifications/SpecificationsQueryRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/specifications/SpecificationsQueryRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/specifications/SpecificationsQueryRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/specifications/SpecificationsUpdateRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/specifications/SpecificationsUpdateRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/specifications/SpecificationsUpdateRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/specifications/SpecificationsUpdateRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/system/SystemAddRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/system/SystemAddRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/system/SystemAddRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/system/SystemAddRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/system/SystemDeleteRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/system/SystemDeleteRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/system/SystemDeleteRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/system/SystemDeleteRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/system/SystemQueryRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/system/SystemQueryRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/system/SystemQueryRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/system/SystemQueryRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserAddRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserAddRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserAddRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserAddRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserDeleteRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserDeleteRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserDeleteRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserDeleteRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserLoginRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserLoginRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserLoginRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserLoginRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserQueryRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserQueryRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserQueryRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserQueryRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserRegisterRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserRegisterRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserRegisterRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserRegisterRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserSearchRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserSearchRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserSearchRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserSearchRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserUpdateMyRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserUpdateMyRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserUpdateMyRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserUpdateMyRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserUpdatePasswordRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserUpdatePasswordRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserUpdatePasswordRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserUpdatePasswordRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserUpdateRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserUpdateRequest.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserUpdateRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/user/UserUpdateRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/userRating/UserRatingAddRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/userRating/UserRatingAddRequest.java similarity index 87% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/userRating/UserRatingAddRequest.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/userRating/UserRatingAddRequest.java index 836a57e..b30f87b 100644 --- a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/userRating/UserRatingAddRequest.java +++ b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/userRating/UserRatingAddRequest.java @@ -26,4 +26,9 @@ public class UserRatingAddRequest implements Serializable { * 评分 */ private Integer rating; + + /** + * 评论 + */ + private String review; } diff --git a/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/userRating/UserRatingReviewRequest.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/userRating/UserRatingReviewRequest.java new file mode 100644 index 0000000..dd326b0 --- /dev/null +++ b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/dto/userRating/UserRatingReviewRequest.java @@ -0,0 +1,24 @@ +package com.bsz.school_send_back_end.model.dto.userRating; + +import lombok.Data; + +import java.io.Serial; +import java.io.Serializable; + +@Data +public class UserRatingReviewRequest implements Serializable { + + /** + * id + */ + private Long id; + + /** + * 商家回复内容 + */ + private String businessReview; + + @Serial + private static final long serialVersionUID = -2254826620684237034L; + +} diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/enums/FileUploadBizEnum.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/enums/FileUploadBizEnum.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/enums/FileUploadBizEnum.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/enums/FileUploadBizEnum.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/enums/UserRoleEnum.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/enums/UserRoleEnum.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/enums/UserRoleEnum.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/enums/UserRoleEnum.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/AttributeVO.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/AttributeVO.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/AttributeVO.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/AttributeVO.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/BusinessAdminVO.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/BusinessAdminVO.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/BusinessAdminVO.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/BusinessAdminVO.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/BusinessLogVO.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/BusinessLogVO.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/BusinessLogVO.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/BusinessLogVO.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/BusinessVO.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/BusinessVO.java similarity index 95% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/BusinessVO.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/BusinessVO.java index 47f6405..04c46e0 100644 --- a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/BusinessVO.java +++ b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/BusinessVO.java @@ -96,4 +96,9 @@ public class BusinessVO implements Serializable { */ private Integer level; + /** + * 收藏id + */ + private Long collectId; + } \ No newline at end of file diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/CartVO.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/CartVO.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/CartVO.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/CartVO.java diff --git a/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/CollectVO.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/CollectVO.java new file mode 100644 index 0000000..2bbec22 --- /dev/null +++ b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/CollectVO.java @@ -0,0 +1,30 @@ +package com.bsz.school_send_back_end.model.vo; + +import com.bsz.school_send_back_end.model.domain.Business; +import lombok.Data; + +import java.io.Serial; +import java.io.Serializable; + + +@Data +public class CollectVO implements Serializable { + + /** + * id + */ + private Long id; + + /** + * 用户id + */ + private Long userId; + + /** + * 商家列表 + */ + private Business business; + + @Serial + private static final long serialVersionUID = 3261824681080618286L; +} diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/DishesGroupVO.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/DishesGroupVO.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/DishesGroupVO.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/DishesGroupVO.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/DishesVO.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/DishesVO.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/DishesVO.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/DishesVO.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/LoginUserVO.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/LoginUserVO.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/LoginUserVO.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/LoginUserVO.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/OrderDetailsVO.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/OrderDetailsVO.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/OrderDetailsVO.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/OrderDetailsVO.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/OrdersExcelVO.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/OrdersExcelVO.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/OrdersExcelVO.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/OrdersExcelVO.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/OrdersVO.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/OrdersVO.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/OrdersVO.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/OrdersVO.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/SpecificationsVO.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/SpecificationsVO.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/SpecificationsVO.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/SpecificationsVO.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/UserVO.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/UserVO.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/UserVO.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/model/vo/UserVO.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/scheduler/UpdateBusiness.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/scheduler/UpdateBusiness.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/scheduler/UpdateBusiness.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/scheduler/UpdateBusiness.java diff --git a/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/scheduler/UpdateOrderState.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/scheduler/UpdateOrderState.java new file mode 100644 index 0000000..3d9f78f --- /dev/null +++ b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/scheduler/UpdateOrderState.java @@ -0,0 +1,32 @@ +package com.bsz.school_send_back_end.scheduler; + +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; +import com.bsz.school_send_back_end.model.domain.Orders; +import com.bsz.school_send_back_end.service.OrdersService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; +import java.time.LocalDateTime; +import java.util.Date; + +@Component +@Slf4j +public class UpdateOrderState { + + @Resource + private OrdersService ordersService; + + @Scheduled(cron = "0 0 */1 * * ?") + public void updateState() { + LocalDateTime twelveHoursAgo = LocalDateTime.now().minusHours(12); + LambdaUpdateWrapper updateWrapper = new LambdaUpdateWrapper<>(); + updateWrapper.eq(Orders::getState, 4) + .le(Orders::getCreateTime, twelveHoursAgo); + Orders orders = new Orders(); + orders.setState(5); + ordersService.update(orders, updateWrapper); + log.info("订单状态修改时间: " + new Date()); + } +} diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/AliPayService.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/AliPayService.java similarity index 84% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/AliPayService.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/AliPayService.java index da6aa9c..776ed5a 100644 --- a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/AliPayService.java +++ b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/AliPayService.java @@ -4,5 +4,5 @@ import java.math.BigDecimal; public interface AliPayService { - String createPayment(String orderId, String miniOpenId, BigDecimal amount); + String createPayment(String orderId, String miniOpenId, BigDecimal amount, Long businessId); } diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/AttributeService.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/AttributeService.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/AttributeService.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/AttributeService.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/BusinessAuthService.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/BusinessAuthService.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/BusinessAuthService.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/BusinessAuthService.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/BusinessLevelService.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/BusinessLevelService.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/BusinessLevelService.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/BusinessLevelService.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/BusinessService.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/BusinessService.java similarity index 96% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/BusinessService.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/BusinessService.java index 41fdbf7..87d90ec 100644 --- a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/BusinessService.java +++ b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/BusinessService.java @@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.bsz.school_send_back_end.model.domain.Business; import com.baomidou.mybatisplus.extension.service.IService; import com.bsz.school_send_back_end.model.domain.BusinessAuth; -import com.bsz.school_send_back_end.model.domain.DishesGroup; import com.bsz.school_send_back_end.model.domain.User; import com.bsz.school_send_back_end.model.dto.business.BusinessQueryRequest; import com.bsz.school_send_back_end.model.vo.BusinessVO; diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/CartService.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/CartService.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/CartService.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/CartService.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/CategoryService.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/CategoryService.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/CategoryService.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/CategoryService.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/CollectService.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/CollectService.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/CollectService.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/CollectService.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/DishesGroupService.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/DishesGroupService.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/DishesGroupService.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/DishesGroupService.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/DishesService.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/DishesService.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/DishesService.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/DishesService.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/OrderDetailsService.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/OrderDetailsService.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/OrderDetailsService.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/OrderDetailsService.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/OrdersService.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/OrdersService.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/OrdersService.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/OrdersService.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/OssService.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/OssService.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/OssService.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/OssService.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/PrivateMessageService.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/PrivateMessageService.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/PrivateMessageService.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/PrivateMessageService.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/SpecificationsDishesService.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/SpecificationsDishesService.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/SpecificationsDishesService.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/SpecificationsDishesService.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/SpecificationsService.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/SpecificationsService.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/SpecificationsService.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/SpecificationsService.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/SysteminfoService.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/SysteminfoService.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/SysteminfoService.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/SysteminfoService.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/SystemlogService.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/SystemlogService.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/SystemlogService.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/SystemlogService.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/UserRatingService.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/UserRatingService.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/UserRatingService.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/UserRatingService.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/UserService.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/UserService.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/UserService.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/UserService.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/WebsocketService.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/WebsocketService.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/WebsocketService.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/WebsocketService.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/AlipayServiceImpl.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/AlipayServiceImpl.java similarity index 98% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/AlipayServiceImpl.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/AlipayServiceImpl.java index a0807b0..74ddfc6 100644 --- a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/AlipayServiceImpl.java +++ b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/AlipayServiceImpl.java @@ -37,7 +37,7 @@ public class AlipayServiceImpl implements AliPayService { @Override @Transactional(rollbackFor = Exception.class) - public synchronized String createPayment(String orderId, String miniOpenId, BigDecimal amount) { + public synchronized String createPayment(String orderId, String miniOpenId, BigDecimal amount, Long businessId) { //创建客户 AlipayClients clients = new AlipayClients(); //AlipayClient client = clients.alipayClient(); @@ -48,7 +48,7 @@ public class AlipayServiceImpl implements AliPayService { //请求参数 沙箱内部参数 - String outTradeNo = UniqueNumberGenerator.generateNumber(); + String outTradeNo = UniqueNumberGenerator.generateNumber(businessId); Orders order = ordersService.getById(orderId); if (order == null) { diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/AttributeServiceImpl.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/AttributeServiceImpl.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/AttributeServiceImpl.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/AttributeServiceImpl.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/BusinessAuthServiceImpl.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/BusinessAuthServiceImpl.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/BusinessAuthServiceImpl.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/BusinessAuthServiceImpl.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/BusinessLevelServiceImpl.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/BusinessLevelServiceImpl.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/BusinessLevelServiceImpl.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/BusinessLevelServiceImpl.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/BusinessServiceImpl.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/BusinessServiceImpl.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/BusinessServiceImpl.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/BusinessServiceImpl.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/CartServiceImpl.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/CartServiceImpl.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/CartServiceImpl.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/CartServiceImpl.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/CategoryServiceImpl.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/CategoryServiceImpl.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/CategoryServiceImpl.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/CategoryServiceImpl.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/CollectServiceImpl.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/CollectServiceImpl.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/CollectServiceImpl.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/CollectServiceImpl.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/DishesGroupServiceImpl.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/DishesGroupServiceImpl.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/DishesGroupServiceImpl.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/DishesGroupServiceImpl.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/DishesServiceImpl.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/DishesServiceImpl.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/DishesServiceImpl.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/DishesServiceImpl.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/OrderDetailsServiceImpl.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/OrderDetailsServiceImpl.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/OrderDetailsServiceImpl.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/OrderDetailsServiceImpl.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/OrdersServiceImpl.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/OrdersServiceImpl.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/OrdersServiceImpl.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/OrdersServiceImpl.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/OssServiceImpl.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/OssServiceImpl.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/OssServiceImpl.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/OssServiceImpl.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/PrivateMessageServiceImpl.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/PrivateMessageServiceImpl.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/PrivateMessageServiceImpl.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/PrivateMessageServiceImpl.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/SpecificationsDishesServiceImpl.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/SpecificationsDishesServiceImpl.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/SpecificationsDishesServiceImpl.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/SpecificationsDishesServiceImpl.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/SpecificationsServiceImpl.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/SpecificationsServiceImpl.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/SpecificationsServiceImpl.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/SpecificationsServiceImpl.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/SysteminfoServiceImpl.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/SysteminfoServiceImpl.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/SysteminfoServiceImpl.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/SysteminfoServiceImpl.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/SystemlogServiceImpl.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/SystemlogServiceImpl.java similarity index 100% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/SystemlogServiceImpl.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/SystemlogServiceImpl.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/UserRatingServiceImpl.java b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/UserRatingServiceImpl.java similarity index 98% rename from school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/UserRatingServiceImpl.java rename to school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/UserRatingServiceImpl.java index a4dc813..ebe200f 100644 --- a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/UserRatingServiceImpl.java +++ b/school_lend_back_end/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/service/impl/UserRatingServiceImpl.java @@ -65,7 +65,7 @@ public class UserRatingServiceImpl extends ServiceImpl merchantSequenceMap = new HashMap<>(); + private static final Random random = new Random(); // 随机数生成器 + private static final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd"); + + /** + * 根据商家ID生成17位的唯一取餐编号 + * 格式:日期(8位) + 随机数(5位) + 序列号(4位) + * + * @param businessId 商家ID + * @return 唯一编号 + */ + public static synchronized String generateNumber(Long businessId) { + // 获取当前日期 + String currentDate = dateFormat.format(new Date()); + + // 生成商家当天的唯一key + String key = businessId + "_" + currentDate; + + // 获取商家当前日期的序列号,没有则初始化为1 + int sequenceNumber = merchantSequenceMap.getOrDefault(key, 1); + + // 更新商家的序列号 + merchantSequenceMap.put(key, sequenceNumber + 1); + + // 生成中间5位的随机数 + int middleRandom = 10000 + random.nextInt(90000); // 生成10000到99999之间的随机数 + + // 格式化序列号为4位 + String sequenceStr = String.format("%04d", sequenceNumber); + + // 组合并返回结果 + return currentDate + middleRandom + sequenceStr; + } + + @Scheduled(cron = "0 0 0 * * ?") + public static void cleanOldData() { + String currentDate = dateFormat.format(new Date()); + Iterator iterator = merchantSequenceMap.keySet().iterator(); + + while (iterator.hasNext()) { + String key = iterator.next(); + String date = key.split("_")[1]; // 获取key中的日期部分 + if (!date.equals(currentDate)) { + iterator.remove(); // 移除过期的key + } + } + } +} diff --git a/school_lend_back_end/school_lend_back_end/src/main/resources/application-dev.yml b/school_lend_back_end/school_lend_back_end/src/main/resources/application-dev.yml new file mode 100644 index 0000000..b880f02 --- /dev/null +++ b/school_lend_back_end/school_lend_back_end/src/main/resources/application-dev.yml @@ -0,0 +1,14 @@ +spring: + datasource: + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://154.8.193.216/xiaokuaisong + username: xiaokuaisong + password: 12345678 + redis: + host: 154.8.193.216 + port: 6379 + database: 3 + password: Cksys6509 + timeout: 60000 +knife4j: + enable: true diff --git a/school_lend_back_end/school_lend_back_end/src/main/resources/application-prod.yml b/school_lend_back_end/school_lend_back_end/src/main/resources/application-prod.yml new file mode 100644 index 0000000..b880f02 --- /dev/null +++ b/school_lend_back_end/school_lend_back_end/src/main/resources/application-prod.yml @@ -0,0 +1,14 @@ +spring: + datasource: + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://154.8.193.216/xiaokuaisong + username: xiaokuaisong + password: 12345678 + redis: + host: 154.8.193.216 + port: 6379 + database: 3 + password: Cksys6509 + timeout: 60000 +knife4j: + enable: true diff --git a/school_lend_back_end/src/main/resources/application.yml b/school_lend_back_end/school_lend_back_end/src/main/resources/application.yml similarity index 99% rename from school_lend_back_end/src/main/resources/application.yml rename to school_lend_back_end/school_lend_back_end/src/main/resources/application.yml index cb943d2..325a20a 100644 --- a/school_lend_back_end/src/main/resources/application.yml +++ b/school_lend_back_end/school_lend_back_end/src/main/resources/application.yml @@ -35,7 +35,8 @@ server: port: 9999 servlet: context-path: /api - + session: + timeout: 86400s mybatis-plus: configuration: map-underscore-to-camel-case: false @@ -46,8 +47,6 @@ mybatis-plus: logic-not-delete-value: 0 -session: - timeout: 86400 aliyun: oss: file: diff --git a/school_lend_back_end/src/main/resources/mapper/AttributeMapper.xml b/school_lend_back_end/school_lend_back_end/src/main/resources/mapper/AttributeMapper.xml similarity index 100% rename from school_lend_back_end/src/main/resources/mapper/AttributeMapper.xml rename to school_lend_back_end/school_lend_back_end/src/main/resources/mapper/AttributeMapper.xml diff --git a/school_lend_back_end/src/main/resources/mapper/BusinessAuthMapper.xml b/school_lend_back_end/school_lend_back_end/src/main/resources/mapper/BusinessAuthMapper.xml similarity index 100% rename from school_lend_back_end/src/main/resources/mapper/BusinessAuthMapper.xml rename to school_lend_back_end/school_lend_back_end/src/main/resources/mapper/BusinessAuthMapper.xml diff --git a/school_lend_back_end/src/main/resources/mapper/BusinessLevelMapper.xml b/school_lend_back_end/school_lend_back_end/src/main/resources/mapper/BusinessLevelMapper.xml similarity index 100% rename from school_lend_back_end/src/main/resources/mapper/BusinessLevelMapper.xml rename to school_lend_back_end/school_lend_back_end/src/main/resources/mapper/BusinessLevelMapper.xml diff --git a/school_lend_back_end/src/main/resources/mapper/BusinessMapper.xml b/school_lend_back_end/school_lend_back_end/src/main/resources/mapper/BusinessMapper.xml similarity index 100% rename from school_lend_back_end/src/main/resources/mapper/BusinessMapper.xml rename to school_lend_back_end/school_lend_back_end/src/main/resources/mapper/BusinessMapper.xml diff --git a/school_lend_back_end/src/main/resources/mapper/CartMapper.xml b/school_lend_back_end/school_lend_back_end/src/main/resources/mapper/CartMapper.xml similarity index 100% rename from school_lend_back_end/src/main/resources/mapper/CartMapper.xml rename to school_lend_back_end/school_lend_back_end/src/main/resources/mapper/CartMapper.xml diff --git a/school_lend_back_end/src/main/resources/mapper/CategoryMapper.xml b/school_lend_back_end/school_lend_back_end/src/main/resources/mapper/CategoryMapper.xml similarity index 100% rename from school_lend_back_end/src/main/resources/mapper/CategoryMapper.xml rename to school_lend_back_end/school_lend_back_end/src/main/resources/mapper/CategoryMapper.xml diff --git a/school_lend_back_end/src/main/resources/mapper/CollectMapper.xml b/school_lend_back_end/school_lend_back_end/src/main/resources/mapper/CollectMapper.xml similarity index 100% rename from school_lend_back_end/src/main/resources/mapper/CollectMapper.xml rename to school_lend_back_end/school_lend_back_end/src/main/resources/mapper/CollectMapper.xml diff --git a/school_lend_back_end/src/main/resources/mapper/DishesGroupMapper.xml b/school_lend_back_end/school_lend_back_end/src/main/resources/mapper/DishesGroupMapper.xml similarity index 100% rename from school_lend_back_end/src/main/resources/mapper/DishesGroupMapper.xml rename to school_lend_back_end/school_lend_back_end/src/main/resources/mapper/DishesGroupMapper.xml diff --git a/school_lend_back_end/src/main/resources/mapper/DishesMapper.xml b/school_lend_back_end/school_lend_back_end/src/main/resources/mapper/DishesMapper.xml similarity index 100% rename from school_lend_back_end/src/main/resources/mapper/DishesMapper.xml rename to school_lend_back_end/school_lend_back_end/src/main/resources/mapper/DishesMapper.xml diff --git a/school_lend_back_end/src/main/resources/mapper/OrderDetailsMapper.xml b/school_lend_back_end/school_lend_back_end/src/main/resources/mapper/OrderDetailsMapper.xml similarity index 100% rename from school_lend_back_end/src/main/resources/mapper/OrderDetailsMapper.xml rename to school_lend_back_end/school_lend_back_end/src/main/resources/mapper/OrderDetailsMapper.xml diff --git a/school_lend_back_end/src/main/resources/mapper/OrdersMapper.xml b/school_lend_back_end/school_lend_back_end/src/main/resources/mapper/OrdersMapper.xml similarity index 100% rename from school_lend_back_end/src/main/resources/mapper/OrdersMapper.xml rename to school_lend_back_end/school_lend_back_end/src/main/resources/mapper/OrdersMapper.xml diff --git a/school_lend_back_end/src/main/resources/mapper/PrivateMessageMapper.xml b/school_lend_back_end/school_lend_back_end/src/main/resources/mapper/PrivateMessageMapper.xml similarity index 100% rename from school_lend_back_end/src/main/resources/mapper/PrivateMessageMapper.xml rename to school_lend_back_end/school_lend_back_end/src/main/resources/mapper/PrivateMessageMapper.xml diff --git a/school_lend_back_end/src/main/resources/mapper/SpecificationsDishesMapper.xml b/school_lend_back_end/school_lend_back_end/src/main/resources/mapper/SpecificationsDishesMapper.xml similarity index 100% rename from school_lend_back_end/src/main/resources/mapper/SpecificationsDishesMapper.xml rename to school_lend_back_end/school_lend_back_end/src/main/resources/mapper/SpecificationsDishesMapper.xml diff --git a/school_lend_back_end/src/main/resources/mapper/SpecificationsMapper.xml b/school_lend_back_end/school_lend_back_end/src/main/resources/mapper/SpecificationsMapper.xml similarity index 100% rename from school_lend_back_end/src/main/resources/mapper/SpecificationsMapper.xml rename to school_lend_back_end/school_lend_back_end/src/main/resources/mapper/SpecificationsMapper.xml diff --git a/school_lend_back_end/src/main/resources/mapper/SysteminfoMapper.xml b/school_lend_back_end/school_lend_back_end/src/main/resources/mapper/SysteminfoMapper.xml similarity index 100% rename from school_lend_back_end/src/main/resources/mapper/SysteminfoMapper.xml rename to school_lend_back_end/school_lend_back_end/src/main/resources/mapper/SysteminfoMapper.xml diff --git a/school_lend_back_end/src/main/resources/mapper/SystemlogMapper.xml b/school_lend_back_end/school_lend_back_end/src/main/resources/mapper/SystemlogMapper.xml similarity index 100% rename from school_lend_back_end/src/main/resources/mapper/SystemlogMapper.xml rename to school_lend_back_end/school_lend_back_end/src/main/resources/mapper/SystemlogMapper.xml diff --git a/school_lend_back_end/src/main/resources/mapper/UserMapper.xml b/school_lend_back_end/school_lend_back_end/src/main/resources/mapper/UserMapper.xml similarity index 100% rename from school_lend_back_end/src/main/resources/mapper/UserMapper.xml rename to school_lend_back_end/school_lend_back_end/src/main/resources/mapper/UserMapper.xml diff --git a/school_lend_back_end/src/main/resources/mapper/UserRatingMapper.xml b/school_lend_back_end/school_lend_back_end/src/main/resources/mapper/UserRatingMapper.xml similarity index 100% rename from school_lend_back_end/src/main/resources/mapper/UserRatingMapper.xml rename to school_lend_back_end/school_lend_back_end/src/main/resources/mapper/UserRatingMapper.xml diff --git a/school_lend_back_end/src/main/resources/static/index.html b/school_lend_back_end/school_lend_back_end/src/main/resources/static/index.html similarity index 100% rename from school_lend_back_end/src/main/resources/static/index.html rename to school_lend_back_end/school_lend_back_end/src/main/resources/static/index.html diff --git a/school_lend_back_end/school_lend_back_end/src/test/java/com/bsz/school_send_back_end/UserCenterApplicationTests.java b/school_lend_back_end/school_lend_back_end/src/test/java/com/bsz/school_send_back_end/UserCenterApplicationTests.java new file mode 100644 index 0000000..38b6f02 --- /dev/null +++ b/school_lend_back_end/school_lend_back_end/src/test/java/com/bsz/school_send_back_end/UserCenterApplicationTests.java @@ -0,0 +1,23 @@ +package com.bsz.school_send_back_end; + +import com.bsz.school_send_back_end.utils.UniqueNumberGenerator; +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class UserCenterApplicationTests { + + public static void main(String[] args) { + Long merchantId1 = 1826604625395048449l; + Long merchantId2 = 1826604625395048450l; + + // 商家1的取餐码 + System.out.println(UniqueNumberGenerator.generateNumber(merchantId1)); // 商家1序列号0001 + System.out.println(UniqueNumberGenerator.generateNumber(merchantId1)); // 商家1序列号0002 + + // 商家2的取餐码 + System.out.println(UniqueNumberGenerator.generateNumber(merchantId2)); // 商家2序列号0001 + System.out.println(UniqueNumberGenerator.generateNumber(merchantId2)); // 商家2序列号0002 + } + +} diff --git a/school_lend_back_end/src/test/java/com/bsz/school_send_back_end/controller/UserControllerTest.java b/school_lend_back_end/school_lend_back_end/src/test/java/com/bsz/school_send_back_end/controller/UserControllerTest.java similarity index 100% rename from school_lend_back_end/src/test/java/com/bsz/school_send_back_end/controller/UserControllerTest.java rename to school_lend_back_end/school_lend_back_end/src/test/java/com/bsz/school_send_back_end/controller/UserControllerTest.java diff --git a/school_lend_back_end/src/test/java/com/bsz/school_send_back_end/model/dto/business/BusinessAddRequest.java b/school_lend_back_end/school_lend_back_end/src/test/java/com/bsz/school_send_back_end/model/dto/business/BusinessAddRequest.java similarity index 100% rename from school_lend_back_end/src/test/java/com/bsz/school_send_back_end/model/dto/business/BusinessAddRequest.java rename to school_lend_back_end/school_lend_back_end/src/test/java/com/bsz/school_send_back_end/model/dto/business/BusinessAddRequest.java diff --git a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/utils/UniqueNumberGenerator.java b/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/utils/UniqueNumberGenerator.java deleted file mode 100644 index 3f0344c..0000000 --- a/school_lend_back_end/src/main/java/com/bsz/school_send_back_end/utils/UniqueNumberGenerator.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.bsz.school_send_back_end.utils; - -import org.springframework.stereotype.Component; - -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.Random; - -/** - * 取餐码生成 - * @author bsz - */ -@Component -public class UniqueNumberGenerator { - private static int sequenceNumber = 1; // 初始化每天的序列号,从1开始 - private static String lastDate = ""; // 记录上次生成数字的日期 - private static final Random random = new Random(); // 随机数生成器 - - // 生成17位的唯一编号 - public static String generateNumber() { - // 获取当前日期的年月日格式 (前8位) - SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd"); - String dateStr = dateFormat.format(new Date()); - - // 检查日期是否变更,如果变更则重置序列号 - if (!dateStr.equals(lastDate)) { - lastDate = dateStr; - sequenceNumber = 1; // 每天重置为0001 - } - - // 生成中间5位的随机数 - int middleRandom = 10000 + random.nextInt(90000); // 生成10000到99999之间的随机数 - - // 格式化后四位的序列号 - String sequenceStr = String.format("%04d", sequenceNumber); - - // 更新序列号,为下一次调用准备 - sequenceNumber++; - - // 组合并返回结果 - return dateStr + middleRandom + sequenceStr; - } - -} diff --git a/school_lend_back_end/src/test/java/com/bsz/school_send_back_end/UserCenterApplicationTests.java b/school_lend_back_end/src/test/java/com/bsz/school_send_back_end/UserCenterApplicationTests.java deleted file mode 100644 index a780bb9..0000000 --- a/school_lend_back_end/src/test/java/com/bsz/school_send_back_end/UserCenterApplicationTests.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.bsz.school_send_back_end; - -import com.bsz.school_send_back_end.utils.UniqueNumberGenerator; -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; - -@SpringBootTest -class UserCenterApplicationTests { - - public static void main(String[] args) { - System.out.println(UniqueNumberGenerator.generateNumber()); - } - -}