From 4c1dcb774be13dbe361ff7380fd234407982434f Mon Sep 17 00:00:00 2001 From: xh-pan1 Date: Tue, 10 Oct 2023 06:35:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E5=A4=9A=E5=95=86=E5=AE=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/controller/BusinessController.java | 165 ++++++ .../admin/controller/ClassifyController.java | 5 +- .../admin/controller/DiscountController.java | 8 - .../admin/controller/FinanceController.java | 10 +- .../admin/controller/LiveProductController.java | 1 - .../admin/controller/SeckillController.java | 1 - .../admin/controller/ShopCheckController.java | 8 +- .../cereshop/admin/controller/ShopController.java | 45 +- .../admin/dao/business/CereBusinessShopDAO.java | 20 - .../admin/dao/business/CereBusinessUserDAO.java | 20 + .../dao/business/CerePlatformBusinessDAO.java | 58 +- .../dao/business/CerePlatformBusinessUserDAO.java | 35 ++ .../dao/permission/CerePlatformPermissionDAO.java | 2 - .../admin/dao/product/CereProductClassifyDAO.java | 7 +- .../admin/dao/shop/CerePlatformShopDAO.java | 6 +- .../cereshop/admin/dao/shop/CereShopCheckDAO.java | 5 +- .../admin/dao/shop/CereShopEnterpriseDAO.java | 4 +- .../dao/shop/CereShopIndividualBusinessesDAO.java | 4 +- .../dao/shop/CereShopOtherOrganizationsDAO.java | 4 +- .../admin/dao/shop/CereShopPersonalDAO.java | 4 +- .../cereshop/admin/page/business/Business.java | 192 +++++++ .../admin/page/business/BusinessGetAll.java | 39 ++ .../admin/page/product/ProductClassify.java | 65 --- .../shop/cereshop/admin/page/shop/ShopGetAll.java | 6 +- .../admin/param/business/BusinessGetAllParam.java | 57 ++ .../admin/param/business/BusinessGetByIdParam.java | 24 + .../admin/param/business/BusinessSaveParam.java | 92 ++++ .../admin/param/business/BusinessStartParam.java | 30 ++ .../admin/param/business/BusinessUpdateParam.java | 96 ++++ .../admin/param/product/ClassifyLevelParam.java | 4 +- .../cereshop/admin/param/shop/ShopSaveParam.java | 45 +- .../cereshop/admin/param/shop/ShopUpdateParam.java | 57 +- .../admin/param/shopcheck/CheckGetAllParam.java | 8 +- .../admin/param/shopcheck/CheckGetByIdParam.java | 4 +- .../admin/param/shopcheck/CheckHandleParam.java | 6 +- .../service/business/CereBusinessShopService.java | 13 - .../service/business/CereBusinessUserService.java | 13 + .../business/CerePlatformBusinessService.java | 46 +- .../business/CerePlatformBusinessUserService.java | 23 + .../business/CereShopEnterpriseService.java | 12 + .../CereShopIndividualBusinessesService.java | 12 + .../CereShopOtherOrganizationsService.java | 12 + .../service/business/CereShopPersonalService.java | 12 + .../business/impl/CereBusinessShopServiceImpl.java | 25 - .../business/impl/CereBusinessUserServiceImpl.java | 25 + .../impl/CerePlatformBusinessServiceImpl.java | 252 ++++++++- .../impl/CerePlatformBusinessUserServiceImpl.java | 48 ++ .../impl/CereShopEnterpriseServiceImpl.java | 24 + .../CereShopIndividualBusinessesServiceImpl.java | 24 + .../CereShopOtherOrganizationsServiceImpl.java | 24 + .../business/impl/CereShopPersonalServiceImpl.java | 24 + .../impl/CereBusinessPermissionServiceImpl.java | 14 +- .../impl/CerePlatformPermissionServiceImpl.java | 2 - .../product/CereProductClassifyService.java | 4 +- .../impl/CereProductClassifyServiceImpl.java | 81 ++- .../impl/CerePlatformShareSettingServiceImpl.java | 18 +- .../service/shop/CerePlatformShopService.java | 2 - .../admin/service/shop/CereShopCheckService.java | 3 +- .../service/shop/CereShopEnterpriseService.java | 12 - .../shop/CereShopIndividualBusinessesService.java | 12 - .../shop/CereShopOtherOrganizationsService.java | 12 - .../service/shop/CereShopPersonalService.java | 12 - .../shop/impl/CerePlatformShopServiceImpl.java | 107 +--- .../shop/impl/CereShopCheckServiceImpl.java | 184 +++---- .../shop/impl/CereShopEnterpriseServiceImpl.java | 24 - .../CereShopIndividualBusinessesServiceImpl.java | 24 - .../CereShopOtherOrganizationsServiceImpl.java | 24 - .../shop/impl/CereShopPersonalServiceImpl.java | 24 - .../mapper/business/CereBusinessShopDAO.xml | 37 -- .../mapper/business/CereBusinessUserDAO.xml | 45 ++ .../mapper/business/CerePlatformBusinessDAO.xml | 582 ++++++++++++++++----- .../business/CerePlatformBusinessUserDAO.xml | 176 +++++++ .../permission/CerePlatformPermissionDAO.xml | 2 +- .../mapper/product/CereProductClassifyDAO.xml | 38 +- .../mybatis/mapper/shop/CerePlatformShopDAO.xml | 44 +- .../mybatis/mapper/shop/CereShopCheckDAO.xml | 28 +- .../mybatis/mapper/shop/CereShopEnterpriseDAO.xml | 18 +- .../shop/CereShopIndividualBusinessesDAO.xml | 18 +- .../mapper/shop/CereShopOtherOrganizationsDAO.xml | 18 +- .../mybatis/mapper/shop/CereShopPersonalDAO.xml | 18 +- .../app/controller/index/LoginController.java | 5 +- .../app/controller/shop/ShopCheckController.java | 99 ++-- .../app/dao/business/CereBusinessShopDAO.java | 16 - .../app/dao/business/CereBusinessUserDAO.java | 16 + .../app/dao/business/CerePlatformBusinessDAO.java | 22 +- .../dao/business/CerePlatformBusinessUserDAO.java | 28 + .../app/dao/business/CereShopEnterpriseDAO.java | 26 + .../business/CereShopIndividualBusinessesDAO.java | 27 + .../business/CereShopOtherOrganizationsDAO.java | 26 + .../app/dao/business/CereShopPersonalDAO.java | 24 + .../cereshop/app/dao/buyer/CereBuyerUserDAO.java | 16 +- .../app/dao/product/CereProductClassifyDAO.java | 9 +- .../cereshop/app/dao/shop/CerePlatformShopDAO.java | 2 - .../cereshop/app/dao/shop/CereShopCheckDAO.java | 17 + .../app/dao/shop/CereShopEnterpriseDAO.java | 26 - .../dao/shop/CereShopIndividualBusinessesDAO.java | 27 - .../dao/shop/CereShopOtherOrganizationsDAO.java | 26 - .../cereshop/app/dao/shop/CereShopPersonalDAO.java | 24 - .../app/interceptor/AuthorizationInterceptor.java | 34 ++ .../com/shop/cereshop/app/page/index/Index.java | 3 +- .../cereshop/app/page/index/ProductClassify.java | 30 -- .../app/page/settlement/SettlementShop.java | 6 + .../shop/cereshop/app/page/shop/PlatformShop.java | 4 + .../app/param/classify/ClassifyProductParam.java | 7 + .../app/param/shop/CereShopEnterpriseParam.java | 2 +- .../shop/CereShopIndividualBusinessesParam.java | 2 +- .../shop/CereShopOtherOrganizationsParam.java | 2 +- .../app/param/shop/CereShopPersonalParam.java | 2 +- .../app/pay/xs/service/impl/XsPayServiceImpl.java | 77 ++- .../service/business/CereBusinessShopService.java | 13 - .../service/business/CereBusinessUserService.java | 13 + .../business/CerePlatformBusinessService.java | 17 +- .../business/CerePlatformBusinessUserService.java | 17 + .../business/impl/CereBusinessShopServiceImpl.java | 25 - .../business/impl/CereBusinessUserServiceImpl.java | 25 + .../impl/CerePlatformBusinessServiceImpl.java | 57 +- .../impl/CerePlatformBusinessUserServiceImpl.java | 35 ++ .../app/service/buyer/CereBuyerUserService.java | 2 +- .../buyer/impl/CereBuyerUserServiceImpl.java | 41 +- .../cereshop/app/service/common/CommonService.java | 2 + .../app/service/common/impl/CommonServiceImpl.java | 5 + .../impl/CereDistributionOrderServiceImpl.java | 13 - .../app/service/index/impl/IndexServiceImpl.java | 6 +- .../order/impl/CereShopOrderServiceImpl.java | 1 + .../order/placeOrderTemplate/LaunchPlaceOrder.java | 2 + .../order/placeOrderTemplate/NormalPlaceOrder.java | 2 + .../placeOrderTemplate/PlaceOrderTemplate.java | 2 + .../product/CereProductClassifyService.java | 5 +- .../impl/CereProductClassifyServiceImpl.java | 17 +- .../service/shop/CereShopEnterpriseService.java | 4 +- .../shop/CereShopIndividualBusinessesService.java | 4 +- .../shop/CereShopOtherOrganizationsService.java | 4 +- .../app/service/shop/CereShopPersonalService.java | 4 +- .../shop/impl/CerePlatformShopServiceImpl.java | 8 +- .../shop/impl/CereShopEnterpriseServiceImpl.java | 128 +++-- .../CereShopIndividualBusinessesServiceImpl.java | 125 +++-- .../CereShopOtherOrganizationsServiceImpl.java | 124 +++-- .../shop/impl/CereShopPersonalServiceImpl.java | 125 +++-- .../com/shop/cereshop/app/utils/ContextUtil.java | 34 ++ .../mapper/business/CereBusinessShopDAO.xml | 34 -- .../mapper/business/CereBusinessUserDAO.xml | 41 ++ .../mapper/business/CerePlatformBusinessDAO.xml | 308 ++++++++--- .../business/CerePlatformBusinessUserDAO.xml | 170 ++++++ .../mybatis/mapper/buyer/CereBuyerUserDAO.xml | 44 +- .../mapper/product/CereProductClassifyDAO.xml | 33 +- .../mybatis/mapper/shop/CerePlatformShopDAO.xml | 35 +- .../mybatis/mapper/shop/CereShopCheckDAO.xml | 50 ++ .../mybatis/mapper/shop/CereShopEnterpriseDAO.xml | 30 +- .../shop/CereShopIndividualBusinessesDAO.xml | 30 +- .../mapper/shop/CereShopOtherOrganizationsDAO.xml | 30 +- .../mybatis/mapper/shop/CereShopPersonalDAO.xml | 28 +- .../src/main/resources/mybatis/mybatis-config.xml | 2 +- .../business/controller/AchievementController.java | 6 +- .../controller/ActivitySignController.java | 18 +- .../business/controller/AfterController.java | 20 +- .../business/controller/BannerController.java | 10 +- .../business/controller/BusinessController.java | 246 ++++++++- .../controller/BusinessUserController.java | 49 +- .../business/controller/BuyerUserController.java | 24 +- .../business/controller/CanvasController.java | 23 +- .../controller/ChannelCouponController.java | 16 +- .../business/controller/ClassifyController.java | 111 ++++ .../business/controller/ComposeController.java | 29 +- .../controller/CustomerServiceController.java | 6 +- .../controller/DistributionLevelController.java | 16 +- .../business/controller/DistributorController.java | 22 +- .../controller/DistributorOrderController.java | 6 +- .../business/controller/FinanceController.java | 16 +- .../business/controller/IndexController.java | 20 +- .../controller/InitPermissionController.java | 41 -- .../business/controller/KcStockNoteController.java | 14 +- .../business/controller/LiveController.java | 32 +- .../business/controller/LiveProductController.java | 27 +- .../business/controller/LogisticsController.java | 14 +- .../business/controller/MarketToolController.java | 17 +- .../business/controller/OperateController.java | 22 +- .../business/controller/OrderController.java | 13 +- .../business/controller/PermissionController.java | 14 +- .../business/controller/PriceController.java | 22 +- .../business/controller/ProductController.java | 28 +- .../controller/RelationshipController.java | 26 +- .../business/controller/RenovationController.java | 11 +- .../business/controller/RoleController.java | 22 +- .../business/controller/SceneController.java | 24 +- .../business/controller/ShopBankController.java | 16 +- .../controller/ShopChannelActivityController.java | 20 +- .../business/controller/ShopController.java | 211 ++------ .../business/controller/ShopCouponController.java | 26 +- .../controller/ShopCrossDetailController.java | 14 +- .../business/controller/ShopCrowdController.java | 10 +- .../controller/ShopDiscountController.java | 26 +- .../controller/ShopExtensionController.java | 8 +- .../business/controller/ShopGroupController.java | 18 +- .../controller/ShopGroupWorkController.java | 27 +- .../business/controller/ShopLabelController.java | 24 +- .../business/controller/ShopRecruitController.java | 12 +- .../business/controller/ShopSeckillController.java | 26 +- .../controller/ShopUserLabelController.java | 14 +- .../business/controller/StorehouseController.java | 16 +- .../business/controller/UploadController.java | 4 +- .../business/dao/business/CereBusinessShopDAO.java | 21 - .../business/dao/business/CereBusinessUserDAO.java | 21 + .../dao/business/CerePlatformBusinessDAO.java | 41 +- .../dao/business/CerePlatformBusinessUserDAO.java | 42 ++ .../dao/permission/CerePlatformPermissionDAO.java | 12 +- .../dao/product/CereProductClassifyDAO.java | 22 +- .../business/dao/product/CereShopProductDAO.java | 4 - .../dao/role/CerePlatformRolePermissionDAO.java | 2 - .../business/dao/shop/CerePlatformShopDAO.java | 24 +- .../business/dao/shop/CereShopEnterpriseDAO.java | 6 +- .../business/dao/shop/CereShopGroupDAO.java | 4 +- .../dao/shop/CereShopIndividualBusinessesDAO.java | 6 +- .../dao/shop/CereShopOtherOrganizationsDAO.java | 6 +- .../business/dao/shop/CereShopPersonalDAO.java | 6 +- .../interceptor/AuthorizationInterceptor.java | 18 +- .../cereshop/business/page/business/Business.java | 122 +++++ .../page/business/PlatformBusinessUser.java | 46 ++ .../business/page/canvas/CanvasProductParam.java | 12 + .../business/page/product/ShopProduct.java | 18 + .../business/page/shop/PlatformBusiness.java | 31 -- .../com/shop/cereshop/business/page/shop/Shop.java | 90 +--- .../shop/cereshop/business/page/user/Business.java | 82 --- .../param/business/BusinessUpdateParam.java | 84 +++ .../param/business/CereShopEnterpriseParam.java | 77 +++ .../CereShopIndividualBusinessesParam.java | 77 +++ .../business/CereShopOtherOrganizationsParam.java | 77 +++ .../param/business/CereShopPersonalParam.java | 87 +++ .../business/param/group/GroupGetAllParam.java | 6 + .../cereshop/business/param/index/IndexParam.java | 5 +- .../param/permission/PermissionGetAllParam.java | 2 +- .../param/permission/PermissionSaveParam.java | 2 +- .../param/permission/RoleDistributionParam.java | 2 +- .../business/param/permission/UserBuildParam.java | 2 +- .../param/product/ClassifyDeleteParam.java | 24 + .../param/product/ClassifyGetAllParam.java | 18 + .../param/product/ClassifyGetByIdParam.java | 24 + .../business/param/product/ClassifyLevelParam.java | 35 ++ .../business/param/product/ProductGetAllParam.java | 15 +- .../business/param/product/ProductSaveParam.java | 15 +- .../business/param/product/ProductUpdateParam.java | 14 + .../param/shop/CereShopEnterpriseParam.java | 77 --- .../shop/CereShopIndividualBusinessesParam.java | 77 --- .../shop/CereShopOtherOrganizationsParam.java | 77 --- .../business/param/shop/CereShopPersonalParam.java | 87 --- .../business/param/shop/ShopGetAllParam.java | 51 ++ .../business/param/shop/ShopGetByIdParam.java | 24 + .../cereshop/business/param/shop/ShopParam.java | 6 + .../business/param/shop/ShopSaveParam.java | 69 +++ .../business/param/shop/ShopUpdateLogoParam.java | 5 + .../business/param/shop/ShopUpdateParam.java | 63 +++ .../param/stock/KcStockNoteGetAllParam.java | 5 + .../param/stock/KcStockNoteUpdateParam.java | 2 +- .../business/param/user/BusinessGetAllUser.java | 4 +- .../business/param/user/BusinessSaveUser.java | 9 +- .../pay/xs/service/impl/XsPayServiceImpl.java | 37 +- .../redis/config/RedisMessageListener.java | 6 +- .../business/redis/listener/RedisListener.java | 14 +- .../service/activity/CereActivitySignService.java | 6 +- .../activity/CereShopMarketToolService.java | 10 +- .../activity/impl/CereActivitySignServiceImpl.java | 8 +- .../impl/CereShopMarketToolServiceImpl.java | 10 +- .../service/after/CereOrderAfterService.java | 14 +- .../after/impl/CereOrderAfterServiceImpl.java | 14 +- .../service/business/CereBusinessShopService.java | 17 - .../service/business/CereBusinessUserService.java | 17 + .../business/CerePlatformBusinessService.java | 54 +- .../business/CerePlatformBusinessUserService.java | 49 ++ .../business/impl/CereBusinessShopServiceImpl.java | 35 -- .../business/impl/CereBusinessUserServiceImpl.java | 35 ++ .../impl/CerePlatformBusinessServiceImpl.java | 325 ------------ .../impl/CerePlatformBusinessUserServiceImpl.java | 325 ++++++++++++ .../service/buyer/CereBuyerUserService.java | 6 +- .../buyer/impl/CereBuyerUserServiceImpl.java | 8 +- .../service/canvas/CerePlatformCanvasService.java | 5 +- .../canvas/impl/CerePlatformCanvasServiceImpl.java | 6 +- .../business/service/common/CommonService.java | 2 + .../service/common/impl/CommonServiceImpl.java | 5 + .../service/compose/CereShopComposeService.java | 10 +- .../compose/impl/CereShopComposeServiceImpl.java | 19 +- .../distributor/CereDistributionOrderService.java | 4 +- .../distributor/CereDistributorBuyerService.java | 9 +- .../CereShopDistributionLevelService.java | 10 +- .../distributor/CereShopDistributorService.java | 10 +- .../impl/CereDistributionOrderServiceImpl.java | 4 +- .../impl/CereDistributorBuyerServiceImpl.java | 8 +- .../impl/CereShopDistributionLevelServiceImpl.java | 12 +- .../impl/CereShopDistributorServiceImpl.java | 10 +- .../service/init/InitPermissionService.java | 12 - .../init/impl/InitPermissionServiceImpl.java | 224 -------- .../service/label/CereBuyerShopLabelService.java | 4 +- .../service/label/CereLabelSourceService.java | 8 +- .../service/label/CereShopLabelService.java | 8 +- .../service/label/CereShopUserLabelService.java | 8 +- .../label/impl/CereBuyerShopLabelServiceImpl.java | 4 +- .../label/impl/CereLabelSourceServiceImpl.java | 8 +- .../label/impl/CereShopLabelServiceImpl.java | 8 +- .../label/impl/CereShopUserLabelServiceImpl.java | 8 +- .../service/live/CereLiveProductService.java | 11 +- .../business/service/live/CereLiveService.java | 10 +- .../live/impl/CereLiveProductServiceImpl.java | 16 +- .../service/live/impl/CereLiveServiceImpl.java | 22 +- .../service/log/CerePlatformLogService.java | 6 +- .../log/impl/CerePlatformLogServiceImpl.java | 6 +- .../logistics/CereOrderLogisticsService.java | 8 +- .../impl/CereOrderLogisticsServiceImpl.java | 8 +- .../service/order/CereOrderDileverService.java | 6 +- .../service/order/CereShopOrderService.java | 4 +- .../order/impl/CereOrderDileverServiceImpl.java | 6 +- .../order/impl/CereShopOrderServiceImpl.java | 6 +- .../permission/CerePlatformPermissionService.java | 12 +- .../impl/CerePlatformPermissionServiceImpl.java | 33 +- .../service/price/CereShopPriceService.java | 10 +- .../price/impl/CereShopPriceServiceImpl.java | 16 +- .../product/CereProductClassifyService.java | 20 +- .../service/product/CereShopProductService.java | 10 +- .../impl/CereProductClassifyServiceImpl.java | 225 +++++++- .../product/impl/CereProductMemberServiceImpl.java | 2 + .../product/impl/CereShopProductServiceImpl.java | 30 +- .../role/CerePlatformRolePermissionService.java | 2 - .../service/role/CerePlatformRoleService.java | 11 +- .../CerePlatformRolePermissionServiceImpl.java | 5 - .../role/impl/CerePlatformRoleServiceImpl.java | 11 +- .../service/scene/CereShopSceneService.java | 12 +- .../scene/impl/CereShopSceneServiceImpl.java | 12 +- .../service/shop/CerePlatformShopService.java | 45 +- .../business/service/shop/CereShopBankService.java | 9 +- .../service/shop/CereShopBannerService.java | 6 +- .../service/shop/CereShopCrossDetailService.java | 15 +- .../service/shop/CereShopEnterpriseService.java | 16 +- .../service/shop/CereShopExtensionService.java | 4 +- .../service/shop/CereShopGroupService.java | 9 +- .../shop/CereShopIndividualBusinessesService.java | 16 +- .../shop/CereShopOtherOrganizationsService.java | 16 +- .../service/shop/CereShopPersonalService.java | 16 +- .../service/shop/CereShopRecruitService.java | 6 +- .../service/shop/CereShopRelationshipService.java | 7 +- .../service/shop/CereShopReturnService.java | 4 +- .../service/shop/CereShopWithdrawalService.java | 4 +- .../shop/impl/CerePlatformShopServiceImpl.java | 477 ++++------------- .../service/shop/impl/CereShopBankServiceImpl.java | 8 +- .../shop/impl/CereShopBannerServiceImpl.java | 6 +- .../shop/impl/CereShopCrossDetailServiceImpl.java | 28 +- .../shop/impl/CereShopEnterpriseServiceImpl.java | 147 +++--- .../shop/impl/CereShopExtensionServiceImpl.java | 4 +- .../shop/impl/CereShopGroupServiceImpl.java | 15 +- .../CereShopIndividualBusinessesServiceImpl.java | 145 ++--- .../CereShopOtherOrganizationsServiceImpl.java | 144 ++--- .../shop/impl/CereShopPersonalServiceImpl.java | 145 ++--- .../shop/impl/CereShopRecruitServiceImpl.java | 6 +- .../shop/impl/CereShopRelationshipServiceImpl.java | 6 +- .../shop/impl/CereShopReturnServiceImpl.java | 4 +- .../shop/impl/CereShopWithdrawalServiceImpl.java | 5 +- .../service/stock/CereKcStockNoteService.java | 8 +- .../stock/impl/CereKcStockNoteServiceImpl.java | 24 +- .../storehouse/CereShopStorehouseService.java | 9 +- .../impl/CereShopStorehouseServiceImpl.java | 8 +- .../service/tool/CereShopCouponService.java | 10 +- .../service/tool/CereShopCrowdService.java | 8 +- .../service/tool/CereShopDiscountService.java | 10 +- .../service/tool/CereShopGroupWorkService.java | 10 +- .../service/tool/CereShopOperateService.java | 8 +- .../service/tool/CereShopSeckillService.java | 11 +- .../tool/impl/CereShopCouponServiceImpl.java | 10 +- .../tool/impl/CereShopCrowdServiceImpl.java | 16 +- .../tool/impl/CereShopDiscountServiceImpl.java | 10 +- .../tool/impl/CereShopGroupWorkServiceImpl.java | 10 +- .../tool/impl/CereShopOperateServiceImpl.java | 8 +- .../tool/impl/CereShopSeckillServiceImpl.java | 10 +- .../shop/cereshop/business/utils/ContextUtil.java | 38 +- .../mapper/business/CereBusinessShopDAO.xml | 42 -- .../mapper/business/CereBusinessUserDAO.xml | 49 ++ .../mapper/business/CerePlatformBusinessDAO.xml | 423 ++++++++++++--- .../business/CerePlatformBusinessUserDAO.xml | 134 +++++ .../permission/CerePlatformPermissionDAO.xml | 14 +- .../mapper/product/CereProductClassifyDAO.xml | 68 ++- .../mapper/product/CereProductMemberDAO.xml | 4 - .../mybatis/mapper/product/CereShopProductDAO.xml | 342 +++++++----- .../mapper/role/CerePlatformRolePermissionDAO.xml | 7 - .../mybatis/mapper/shop/CerePlatformShopDAO.xml | 114 +--- .../mybatis/mapper/shop/CereShopEnterpriseDAO.xml | 32 +- .../mybatis/mapper/shop/CereShopGroupDAO.xml | 20 +- .../shop/CereShopIndividualBusinessesDAO.xml | 32 +- .../mapper/shop/CereShopOtherOrganizationsDAO.xml | 32 +- .../mybatis/mapper/shop/CereShopPersonalDAO.xml | 28 +- .../mybatis/mapper/stock/CereKcStockNoteDAO.xml | 5 +- .../shop/cereshop/business/ShopComposeTest.java | 60 --- .../com/shop/cereshop/business/ShopPriceTest.java | 69 --- .../com/shop/cereshop/business/ShopSceneTest.java | 64 --- .../com/shop/cereshop/business/ShopScrmTest.java | 27 - .../commons/domain/business/CereBusinessShop.java | 35 -- .../commons/domain/business/CereBusinessUser.java | 41 ++ .../domain/business/CerePlatformBusiness.java | 159 ++++-- .../domain/business/CerePlatformBusinessUser.java | 106 ++++ .../domain/business/CereShopEnterprise.java | 212 ++++++++ .../business/CereShopIndividualBusinesses.java | 211 ++++++++ .../business/CereShopOtherOrganizations.java | 206 ++++++++ .../commons/domain/business/CereShopPersonal.java | 165 ++++++ .../commons/domain/buyer/CereBuyerUser.java | 6 + .../commons/domain/canvas/CerePlatformCanvas.java | 6 + .../commons/domain/order/CereOrderParent.java | 5 + .../commons/domain/order/CereShopOrder.java | 7 +- .../domain/product/CereProductClassify.java | 16 +- .../commons/domain/product/CereShopProduct.java | 12 +- .../commons/domain/shop/CerePlatformShop.java | 16 +- .../commons/domain/shop/CereShopConversion.java | 7 + .../commons/domain/shop/CereShopEnterprise.java | 212 -------- .../commons/domain/shop/CereShopGroup.java | 6 + .../domain/shop/CereShopIndividualBusinesses.java | 211 -------- .../domain/shop/CereShopOtherOrganizations.java | 206 -------- .../commons/domain/shop/CereShopPersonal.java | 165 ------ .../commons/domain/shop/CereShopVisit.java | 6 + .../shop/cereshop/commons/utils/EmptyUtils.java | 2 +- .../shop/cereshop/commons/utils/ProjectUtil.java | 30 ++ 413 files changed, 9475 insertions(+), 6380 deletions(-) create mode 100644 cereshop-admin/src/main/java/com/shop/cereshop/admin/controller/BusinessController.java delete mode 100644 cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/business/CereBusinessShopDAO.java create mode 100644 cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/business/CereBusinessUserDAO.java create mode 100644 cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/business/CerePlatformBusinessUserDAO.java create mode 100644 cereshop-admin/src/main/java/com/shop/cereshop/admin/page/business/Business.java create mode 100644 cereshop-admin/src/main/java/com/shop/cereshop/admin/page/business/BusinessGetAll.java delete mode 100644 cereshop-admin/src/main/java/com/shop/cereshop/admin/page/product/ProductClassify.java create mode 100644 cereshop-admin/src/main/java/com/shop/cereshop/admin/param/business/BusinessGetAllParam.java create mode 100644 cereshop-admin/src/main/java/com/shop/cereshop/admin/param/business/BusinessGetByIdParam.java create mode 100644 cereshop-admin/src/main/java/com/shop/cereshop/admin/param/business/BusinessSaveParam.java create mode 100644 cereshop-admin/src/main/java/com/shop/cereshop/admin/param/business/BusinessStartParam.java create mode 100644 cereshop-admin/src/main/java/com/shop/cereshop/admin/param/business/BusinessUpdateParam.java delete mode 100644 cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/CereBusinessShopService.java create mode 100644 cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/CereBusinessUserService.java create mode 100644 cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/CerePlatformBusinessUserService.java create mode 100644 cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/CereShopEnterpriseService.java create mode 100644 cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/CereShopIndividualBusinessesService.java create mode 100644 cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/CereShopOtherOrganizationsService.java create mode 100644 cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/CereShopPersonalService.java delete mode 100644 cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/impl/CereBusinessShopServiceImpl.java create mode 100644 cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/impl/CereBusinessUserServiceImpl.java create mode 100644 cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/impl/CerePlatformBusinessUserServiceImpl.java create mode 100644 cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/impl/CereShopEnterpriseServiceImpl.java create mode 100644 cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/impl/CereShopIndividualBusinessesServiceImpl.java create mode 100644 cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/impl/CereShopOtherOrganizationsServiceImpl.java create mode 100644 cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/impl/CereShopPersonalServiceImpl.java delete mode 100644 cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/CereShopEnterpriseService.java delete mode 100644 cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/CereShopIndividualBusinessesService.java delete mode 100644 cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/CereShopOtherOrganizationsService.java delete mode 100644 cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/CereShopPersonalService.java delete mode 100644 cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/impl/CereShopEnterpriseServiceImpl.java delete mode 100644 cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/impl/CereShopIndividualBusinessesServiceImpl.java delete mode 100644 cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/impl/CereShopOtherOrganizationsServiceImpl.java delete mode 100644 cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/impl/CereShopPersonalServiceImpl.java delete mode 100644 cereshop-admin/src/main/resources/mybatis/mapper/business/CereBusinessShopDAO.xml create mode 100644 cereshop-admin/src/main/resources/mybatis/mapper/business/CereBusinessUserDAO.xml create mode 100644 cereshop-admin/src/main/resources/mybatis/mapper/business/CerePlatformBusinessUserDAO.xml delete mode 100644 cereshop-app/src/main/java/com/shop/cereshop/app/dao/business/CereBusinessShopDAO.java create mode 100644 cereshop-app/src/main/java/com/shop/cereshop/app/dao/business/CereBusinessUserDAO.java create mode 100644 cereshop-app/src/main/java/com/shop/cereshop/app/dao/business/CerePlatformBusinessUserDAO.java create mode 100644 cereshop-app/src/main/java/com/shop/cereshop/app/dao/business/CereShopEnterpriseDAO.java create mode 100644 cereshop-app/src/main/java/com/shop/cereshop/app/dao/business/CereShopIndividualBusinessesDAO.java create mode 100644 cereshop-app/src/main/java/com/shop/cereshop/app/dao/business/CereShopOtherOrganizationsDAO.java create mode 100644 cereshop-app/src/main/java/com/shop/cereshop/app/dao/business/CereShopPersonalDAO.java create mode 100644 cereshop-app/src/main/java/com/shop/cereshop/app/dao/shop/CereShopCheckDAO.java delete mode 100644 cereshop-app/src/main/java/com/shop/cereshop/app/dao/shop/CereShopEnterpriseDAO.java delete mode 100644 cereshop-app/src/main/java/com/shop/cereshop/app/dao/shop/CereShopIndividualBusinessesDAO.java delete mode 100644 cereshop-app/src/main/java/com/shop/cereshop/app/dao/shop/CereShopOtherOrganizationsDAO.java delete mode 100644 cereshop-app/src/main/java/com/shop/cereshop/app/dao/shop/CereShopPersonalDAO.java delete mode 100644 cereshop-app/src/main/java/com/shop/cereshop/app/page/index/ProductClassify.java delete mode 100644 cereshop-app/src/main/java/com/shop/cereshop/app/service/business/CereBusinessShopService.java create mode 100644 cereshop-app/src/main/java/com/shop/cereshop/app/service/business/CereBusinessUserService.java create mode 100644 cereshop-app/src/main/java/com/shop/cereshop/app/service/business/CerePlatformBusinessUserService.java delete mode 100644 cereshop-app/src/main/java/com/shop/cereshop/app/service/business/impl/CereBusinessShopServiceImpl.java create mode 100644 cereshop-app/src/main/java/com/shop/cereshop/app/service/business/impl/CereBusinessUserServiceImpl.java create mode 100644 cereshop-app/src/main/java/com/shop/cereshop/app/service/business/impl/CerePlatformBusinessUserServiceImpl.java create mode 100644 cereshop-app/src/main/java/com/shop/cereshop/app/utils/ContextUtil.java delete mode 100644 cereshop-app/src/main/resources/mybatis/mapper/business/CereBusinessShopDAO.xml create mode 100644 cereshop-app/src/main/resources/mybatis/mapper/business/CereBusinessUserDAO.xml create mode 100644 cereshop-app/src/main/resources/mybatis/mapper/business/CerePlatformBusinessUserDAO.xml create mode 100644 cereshop-app/src/main/resources/mybatis/mapper/shop/CereShopCheckDAO.xml create mode 100644 cereshop-business/src/main/java/com/shop/cereshop/business/controller/ClassifyController.java delete mode 100644 cereshop-business/src/main/java/com/shop/cereshop/business/controller/InitPermissionController.java delete mode 100644 cereshop-business/src/main/java/com/shop/cereshop/business/dao/business/CereBusinessShopDAO.java create mode 100644 cereshop-business/src/main/java/com/shop/cereshop/business/dao/business/CereBusinessUserDAO.java create mode 100644 cereshop-business/src/main/java/com/shop/cereshop/business/dao/business/CerePlatformBusinessUserDAO.java create mode 100644 cereshop-business/src/main/java/com/shop/cereshop/business/page/business/Business.java create mode 100644 cereshop-business/src/main/java/com/shop/cereshop/business/page/business/PlatformBusinessUser.java delete mode 100644 cereshop-business/src/main/java/com/shop/cereshop/business/page/shop/PlatformBusiness.java delete mode 100644 cereshop-business/src/main/java/com/shop/cereshop/business/page/user/Business.java create mode 100644 cereshop-business/src/main/java/com/shop/cereshop/business/param/business/BusinessUpdateParam.java create mode 100644 cereshop-business/src/main/java/com/shop/cereshop/business/param/business/CereShopEnterpriseParam.java create mode 100644 cereshop-business/src/main/java/com/shop/cereshop/business/param/business/CereShopIndividualBusinessesParam.java create mode 100644 cereshop-business/src/main/java/com/shop/cereshop/business/param/business/CereShopOtherOrganizationsParam.java create mode 100644 cereshop-business/src/main/java/com/shop/cereshop/business/param/business/CereShopPersonalParam.java create mode 100644 cereshop-business/src/main/java/com/shop/cereshop/business/param/product/ClassifyDeleteParam.java create mode 100644 cereshop-business/src/main/java/com/shop/cereshop/business/param/product/ClassifyGetAllParam.java create mode 100644 cereshop-business/src/main/java/com/shop/cereshop/business/param/product/ClassifyGetByIdParam.java create mode 100644 cereshop-business/src/main/java/com/shop/cereshop/business/param/product/ClassifyLevelParam.java delete mode 100644 cereshop-business/src/main/java/com/shop/cereshop/business/param/shop/CereShopEnterpriseParam.java delete mode 100644 cereshop-business/src/main/java/com/shop/cereshop/business/param/shop/CereShopIndividualBusinessesParam.java delete mode 100644 cereshop-business/src/main/java/com/shop/cereshop/business/param/shop/CereShopOtherOrganizationsParam.java delete mode 100644 cereshop-business/src/main/java/com/shop/cereshop/business/param/shop/CereShopPersonalParam.java create mode 100644 cereshop-business/src/main/java/com/shop/cereshop/business/param/shop/ShopGetAllParam.java create mode 100644 cereshop-business/src/main/java/com/shop/cereshop/business/param/shop/ShopGetByIdParam.java create mode 100644 cereshop-business/src/main/java/com/shop/cereshop/business/param/shop/ShopSaveParam.java create mode 100644 cereshop-business/src/main/java/com/shop/cereshop/business/param/shop/ShopUpdateParam.java delete mode 100644 cereshop-business/src/main/java/com/shop/cereshop/business/service/business/CereBusinessShopService.java create mode 100644 cereshop-business/src/main/java/com/shop/cereshop/business/service/business/CereBusinessUserService.java create mode 100644 cereshop-business/src/main/java/com/shop/cereshop/business/service/business/CerePlatformBusinessUserService.java delete mode 100644 cereshop-business/src/main/java/com/shop/cereshop/business/service/business/impl/CereBusinessShopServiceImpl.java create mode 100644 cereshop-business/src/main/java/com/shop/cereshop/business/service/business/impl/CereBusinessUserServiceImpl.java delete mode 100644 cereshop-business/src/main/java/com/shop/cereshop/business/service/business/impl/CerePlatformBusinessServiceImpl.java create mode 100644 cereshop-business/src/main/java/com/shop/cereshop/business/service/business/impl/CerePlatformBusinessUserServiceImpl.java delete mode 100644 cereshop-business/src/main/java/com/shop/cereshop/business/service/init/InitPermissionService.java delete mode 100644 cereshop-business/src/main/java/com/shop/cereshop/business/service/init/impl/InitPermissionServiceImpl.java delete mode 100644 cereshop-business/src/main/resources/mybatis/mapper/business/CereBusinessShopDAO.xml create mode 100644 cereshop-business/src/main/resources/mybatis/mapper/business/CereBusinessUserDAO.xml create mode 100644 cereshop-business/src/main/resources/mybatis/mapper/business/CerePlatformBusinessUserDAO.xml delete mode 100644 cereshop-business/src/test/java/com/shop/cereshop/business/ShopComposeTest.java delete mode 100644 cereshop-business/src/test/java/com/shop/cereshop/business/ShopPriceTest.java delete mode 100644 cereshop-business/src/test/java/com/shop/cereshop/business/ShopSceneTest.java delete mode 100644 cereshop-business/src/test/java/com/shop/cereshop/business/ShopScrmTest.java delete mode 100644 cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/business/CereBusinessShop.java create mode 100644 cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/business/CereBusinessUser.java create mode 100644 cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/business/CerePlatformBusinessUser.java create mode 100644 cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/business/CereShopEnterprise.java create mode 100644 cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/business/CereShopIndividualBusinesses.java create mode 100644 cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/business/CereShopOtherOrganizations.java create mode 100644 cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/business/CereShopPersonal.java delete mode 100644 cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/shop/CereShopEnterprise.java delete mode 100644 cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/shop/CereShopIndividualBusinesses.java delete mode 100644 cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/shop/CereShopOtherOrganizations.java delete mode 100644 cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/shop/CereShopPersonal.java create mode 100644 cereshop-commons/src/main/java/com/shop/cereshop/commons/utils/ProjectUtil.java diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/controller/BusinessController.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/controller/BusinessController.java new file mode 100644 index 0000000..a8e3f65 --- /dev/null +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/controller/BusinessController.java @@ -0,0 +1,165 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.admin.controller; + +import com.shop.cereshop.admin.annotation.NoRepeatSubmit; +import com.shop.cereshop.admin.annotation.NoRepeatWebLog; +import com.shop.cereshop.admin.page.business.BusinessGetAll; +import com.shop.cereshop.admin.param.business.*; +import com.shop.cereshop.admin.service.business.CerePlatformBusinessService; +import com.shop.cereshop.admin.service.business.CerePlatformBusinessUserService; +import com.shop.cereshop.admin.utils.ContextUtil; +import com.shop.cereshop.commons.constant.CoReturnFormat; +import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; +import com.shop.cereshop.commons.domain.common.Page; +import com.shop.cereshop.commons.domain.user.CerePlatformUser; +import com.shop.cereshop.commons.exception.CoBusinessException; +import com.shop.cereshop.commons.result.Result; +import com.shop.cereshop.commons.utils.GsonUtil; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.servlet.http.HttpServletRequest; + +/** + * 商家 + */ +@RestController +@RequestMapping("business") +/** + * 注解方式生成日志对象,指定topic生成对象类名 + */ +@Slf4j(topic = "BusinessController") +@Api(value = "商家模块", tags = "商家模块") +public class BusinessController { + + @Autowired + private CerePlatformBusinessService cerePlatformBusinessService; + + @Autowired + private CerePlatformBusinessUserService cerePlatformBusinessUserService; + + /** + * 新建商家 + * @param param + * @return + */ + @PostMapping(value = "save") + @NoRepeatSubmit + @ApiOperation(value = "新建商家") + @NoRepeatWebLog + public Result save(@RequestBody @Validated BusinessSaveParam param, HttpServletRequest request) throws CoBusinessException{ + //校验商家名称是否存在 + CerePlatformBusiness business= cerePlatformBusinessService.findByBusinessName(param.getBusinessName()); + if(business!=null){ + return new Result(CoReturnFormat.SHOP_NAME_ALREADY); + } + CerePlatformBusiness platformShop=cerePlatformBusinessService.findByBusinessPhone(param.getBusinessPhone()); + if(platformShop!=null){ + return new Result(CoReturnFormat.SHOP_PHONE_ALREADY); + } + //校验手机号是否已注册 + CerePlatformBusinessUser cerePlatformBusinessUser= cerePlatformBusinessUserService.findByUserName(param.getBusinessPhone()); + if(cerePlatformBusinessUser!=null){ + return new Result(CoReturnFormat.SHOP_PHONE_ALREADY); + } + //获取当前登录账户 + CerePlatformUser user = (CerePlatformUser) request.getAttribute("user"); + cerePlatformBusinessService.save(param,user); + return new Result(user.getUsername(),"新建商家", GsonUtil.objectToGson(param)); + } + + /** + * 修改商家 + * @param param + * @return + */ + @PostMapping(value = "update") + @NoRepeatSubmit + @ApiOperation(value = "修改商家") + @NoRepeatWebLog + public Result update(@RequestBody BusinessUpdateParam param, HttpServletRequest request) throws CoBusinessException{ + //校验商家名称是否存在 + CerePlatformBusiness business= cerePlatformBusinessService.checkBusinessIdByName(param.getBusinessName(),param.getBusinessId()); + if(business!=null){ + return new Result(CoReturnFormat.SHOP_NAME_ALREADY); + } + CerePlatformBusiness platformShop=cerePlatformBusinessService.checkBusinessIdByPhone(param.getBusinessPhone(),param.getBusinessId()); + if(platformShop!=null){ + return new Result(CoReturnFormat.SHOP_PHONE_ALREADY); + } + //校验手机号是否已注册 + CerePlatformBusinessUser businessUser = cerePlatformBusinessUserService.checkUserName(param.getBusinessPhone(),param.getBusinessId()); + if(businessUser!=null){ + return new Result(CoReturnFormat.SHOP_PHONE_ALREADY); + } + //获取当前登录账户 + CerePlatformUser user = (CerePlatformUser) request.getAttribute("user"); + cerePlatformBusinessService.update(param,user); + return new Result(user.getUsername(),"修改商家", GsonUtil.objectToGson(param)); + } + + /** + * 启停用 + * @param param + * @return + */ + @PostMapping(value = "start") + @NoRepeatSubmit + @ApiOperation(value = "启停用") + @NoRepeatWebLog + public Result start(@RequestBody BusinessStartParam param, HttpServletRequest request) throws CoBusinessException{ + //获取当前登录账户 + CerePlatformUser user = (CerePlatformUser) request.getAttribute("user"); + cerePlatformBusinessService.startOrStop(param,user); + return new Result(user.getUsername(),"启停用", GsonUtil.objectToGson(param)); + } + + /** + * 商家编辑查询 + * @param param + * @return + */ + @PostMapping(value = "getById") + @ApiOperation(value = "商家编辑查询") + public Result getById(@RequestBody BusinessGetByIdParam param) throws CoBusinessException,Exception{ + BusinessGetAll business= cerePlatformBusinessService.getById(param.getBusinessId()); + return new Result(business); + } + + /** + * 商家管理查询 + * @param param + * @return + */ + @PostMapping(value = "getAll") + @ApiOperation(value = "商家管理查询") + public Result> getAll(@RequestBody BusinessGetAllParam param) throws CoBusinessException{ + Page page= cerePlatformBusinessService.getAll(param); + return new Result(page); + } + + /** + * 注销商家数据 + * @param param + * @return + */ + @PostMapping(value = "cleanShop") + @ApiOperation(value = "注销商家数据") + public Result cleanShop(@RequestBody BusinessGetByIdParam param) throws CoBusinessException{ + ContextUtil.interceptDelete(); + Boolean result = cerePlatformBusinessService.cleanShop(param.getBusinessId()); + return new Result(result); + } +} diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/controller/ClassifyController.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/controller/ClassifyController.java index 4e5ec03..f432f21 100644 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/controller/ClassifyController.java +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/controller/ClassifyController.java @@ -8,7 +8,6 @@ package com.shop.cereshop.admin.controller; import com.shop.cereshop.admin.annotation.NoRepeatSubmit; import com.shop.cereshop.admin.annotation.NoRepeatWebLog; -import com.shop.cereshop.admin.page.product.ProductClassify; import com.shop.cereshop.admin.param.product.ClassifyDeleteParam; import com.shop.cereshop.admin.param.product.ClassifyGetAllParam; import com.shop.cereshop.admin.param.product.ClassifyGetByIdParam; @@ -99,8 +98,8 @@ public class ClassifyController { */ @PostMapping(value = "getById") @ApiOperation(value = "商品类别编辑查询") - public Result getById(@RequestBody ClassifyGetByIdParam param) throws CoBusinessException{ - ProductClassify classify=cereProductClassifyService.getById(param.getOneClassifyId()); + public Result getById(@RequestBody ClassifyGetByIdParam param) throws CoBusinessException{ + CereProductClassify classify=cereProductClassifyService.getById(param.getOneClassifyId()); return new Result(classify); } diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/controller/DiscountController.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/controller/DiscountController.java index 5916843..b5696eb 100644 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/controller/DiscountController.java +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/controller/DiscountController.java @@ -11,18 +11,10 @@ import com.shop.cereshop.admin.page.discount.Discount; import com.shop.cereshop.admin.page.discount.DiscountData; import com.shop.cereshop.admin.page.discount.DiscountShop; import com.shop.cereshop.admin.page.discount.DiscountShopProduct; -import com.shop.cereshop.admin.page.seckill.Seckill; -import com.shop.cereshop.admin.page.seckill.SeckillData; -import com.shop.cereshop.admin.page.seckill.SeckillShop; -import com.shop.cereshop.admin.page.seckill.SeckillShopProduct; import com.shop.cereshop.admin.param.discount.*; -import com.shop.cereshop.admin.param.seckill.*; import com.shop.cereshop.admin.service.platformtool.CerePlatformDiscountService; -import com.shop.cereshop.admin.service.platformtool.CerePlatformSeckillService; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.platformtool.CerePlatformDiscount; -import com.shop.cereshop.commons.domain.platformtool.CerePlatformSeckill; import com.shop.cereshop.commons.domain.shop.ShopDataDetail; import com.shop.cereshop.commons.domain.user.CerePlatformUser; import com.shop.cereshop.commons.exception.CoBusinessException; diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/controller/FinanceController.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/controller/FinanceController.java index 83200d9..33a8b28 100644 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/controller/FinanceController.java +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/controller/FinanceController.java @@ -7,14 +7,10 @@ package com.shop.cereshop.admin.controller; import com.shop.cereshop.admin.page.finance.BondCount; import com.shop.cereshop.admin.page.finance.FinanceCount; -import com.shop.cereshop.admin.page.finance.ShopBond; import com.shop.cereshop.admin.param.finance.BondParam; import com.shop.cereshop.admin.param.finance.FinanceParam; import com.shop.cereshop.admin.service.activity.CereActivitySignService; -import com.shop.cereshop.admin.service.shop.CerePlatformShopService; -import com.shop.cereshop.commons.constant.CoReturnFormat; -import com.shop.cereshop.commons.domain.activity.CereActivitySign; -import com.shop.cereshop.commons.domain.common.Page; +import com.shop.cereshop.admin.service.business.CerePlatformBusinessService; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.result.Result; import io.swagger.annotations.Api; @@ -36,7 +32,7 @@ import org.springframework.web.bind.annotation.*; public class FinanceController { @Autowired - private CerePlatformShopService cerePlatformShopService; + private CerePlatformBusinessService cerePlatformBusinessService; @Autowired private CereActivitySignService cereActivitySignService; @@ -48,7 +44,7 @@ public class FinanceController { @PostMapping(value = "getAllFinance") @ApiOperation(value = "财务管理查询") public Result getAllFinance(@RequestBody FinanceParam param) throws CoBusinessException{ - FinanceCount count =cerePlatformShopService.getAllFinance(param); + FinanceCount count = cerePlatformBusinessService.getAllFinance(param); return new Result(count); } diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/controller/LiveProductController.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/controller/LiveProductController.java index dba1699..bb5ab97 100644 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/controller/LiveProductController.java +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/controller/LiveProductController.java @@ -10,7 +10,6 @@ import com.shop.cereshop.admin.annotation.NoRepeatWebLog; import com.shop.cereshop.admin.param.live.LiveProductGetAllParam; import com.shop.cereshop.admin.param.live.LiveProductParam; import com.shop.cereshop.admin.service.live.CereLiveProductService; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.live.CereLiveProduct; import com.shop.cereshop.commons.domain.user.CerePlatformUser; diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/controller/SeckillController.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/controller/SeckillController.java index 9a9b68b..b7ea0b7 100644 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/controller/SeckillController.java +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/controller/SeckillController.java @@ -10,7 +10,6 @@ import com.shop.cereshop.admin.annotation.NoRepeatWebLog; import com.shop.cereshop.admin.page.seckill.*; import com.shop.cereshop.admin.param.seckill.*; import com.shop.cereshop.admin.service.platformtool.CerePlatformSeckillService; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.platformtool.CerePlatformSeckill; import com.shop.cereshop.commons.domain.shop.ShopDataDetail; diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/controller/ShopCheckController.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/controller/ShopCheckController.java index b28b913..c059ed7 100644 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/controller/ShopCheckController.java +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/controller/ShopCheckController.java @@ -7,7 +7,7 @@ package com.shop.cereshop.admin.controller; import com.shop.cereshop.admin.annotation.NoRepeatSubmit; import com.shop.cereshop.admin.annotation.NoRepeatWebLog; -import com.shop.cereshop.admin.page.shop.Shop; +import com.shop.cereshop.admin.page.business.Business; import com.shop.cereshop.admin.param.shopcheck.CheckDeleteParam; import com.shop.cereshop.admin.param.shopcheck.CheckGetAllParam; import com.shop.cereshop.admin.param.shopcheck.CheckGetByIdParam; @@ -48,7 +48,7 @@ public class ShopCheckController { */ @PostMapping(value = "getAll") @ApiOperation(value = "入驻申请管理查询") - public Result> getAll(@RequestBody CheckGetAllParam param) throws CoBusinessException{ + public Result> getAll(@RequestBody CheckGetAllParam param) throws CoBusinessException{ Page page=cereShopCheckService.getAll(param); return new Result(page); } @@ -60,8 +60,8 @@ public class ShopCheckController { */ @PostMapping(value = "getById") @ApiOperation(value = "查看") - public Result getById(@RequestBody CheckGetByIdParam param) throws CoBusinessException{ - Shop shop=cereShopCheckService.getById(param.getShopId()); + public Result getById(@RequestBody CheckGetByIdParam param) throws CoBusinessException{ + Business shop=cereShopCheckService.getById(param.getBusinessId()); return new Result(shop); } diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/controller/ShopController.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/controller/ShopController.java index b8f1407..78bb9ce 100644 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/controller/ShopController.java +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/controller/ShopController.java @@ -31,7 +31,7 @@ import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletRequest; /** - * 商家 + * 店铺 */ @RestController @RequestMapping("shop") @@ -39,62 +39,47 @@ import javax.servlet.http.HttpServletRequest; * 注解方式生成日志对象,指定topic生成对象类名 */ @Slf4j(topic = "ShopController") -@Api(value = "商家模块", tags = "商家模块") +@Api(value = "店铺模块", tags = "店铺模块") public class ShopController { @Autowired private CerePlatformShopService cerePlatformShopService; /** - * 新建商家 + * 新建店铺 * @param param * @return */ @PostMapping(value = "save") @NoRepeatSubmit - @ApiOperation(value = "新建商家") + @ApiOperation(value = "新建店铺") @NoRepeatWebLog public Result save(@RequestBody @Validated ShopSaveParam param, HttpServletRequest request) throws CoBusinessException{ - //校验商家名称是否存在 - CerePlatformShop shop=cerePlatformShopService.findByShopName(param.getShopName()); - if(shop!=null){ - return new Result(CoReturnFormat.SHOP_NAME_ALREADY); - } - //校验手机号是否已注册 - CerePlatformShop platformShop=cerePlatformShopService.findByPhone(param.getShopPhone()); - if(platformShop!=null){ - return new Result(CoReturnFormat.SHOP_PHONE_ALREADY); - } //获取当前登录账户 CerePlatformUser user = (CerePlatformUser) request.getAttribute("user"); cerePlatformShopService.save(param,user); - return new Result(user.getUsername(),"新建商家", GsonUtil.objectToGson(param)); + return new Result(user.getUsername(),"新建店铺", GsonUtil.objectToGson(param)); } /** - * 修改商家 + * 修改店铺 * @param param * @return */ @PostMapping(value = "update") @NoRepeatSubmit - @ApiOperation(value = "修改商家") + @ApiOperation(value = "修改店铺") @NoRepeatWebLog public Result update(@RequestBody ShopUpdateParam param, HttpServletRequest request) throws CoBusinessException{ - //校验商家名称是否存在 + //校验店铺名称是否存在 CerePlatformShop shop=cerePlatformShopService.checkShopIdByName(param.getShopName(),param.getShopId()); if(shop!=null){ return new Result(CoReturnFormat.SHOP_NAME_ALREADY); } - //校验手机号是否已注册 - CerePlatformShop platformShop=cerePlatformShopService.checkShopIdByPhone(param.getShopPhone(),param.getShopId()); - if(platformShop!=null){ - return new Result(CoReturnFormat.SHOP_PHONE_ALREADY); - } //获取当前登录账户 CerePlatformUser user = (CerePlatformUser) request.getAttribute("user"); cerePlatformShopService.update(param,user); - return new Result(user.getUsername(),"修改商家", GsonUtil.objectToGson(param)); + return new Result(user.getUsername(),"修改店铺", GsonUtil.objectToGson(param)); } /** @@ -114,36 +99,36 @@ public class ShopController { } /** - * 商家编辑查询 + * 店铺编辑查询 * @param param * @return */ @PostMapping(value = "getById") - @ApiOperation(value = "商家编辑查询") + @ApiOperation(value = "店铺编辑查询") public Result getById(@RequestBody ShopGetByIdParam param) throws CoBusinessException,Exception{ ShopGetAll shop=cerePlatformShopService.getById(param.getShopId()); return new Result(shop); } /** - * 商家管理查询 + * 店铺管理查询 * @param param * @return */ @PostMapping(value = "getAll") - @ApiOperation(value = "商家管理查询") + @ApiOperation(value = "店铺管理查询") public Result> getAll(@RequestBody ShopGetAllParam param) throws CoBusinessException{ Page page=cerePlatformShopService.getAll(param); return new Result(page); } /** - * 注销商家数据 + * 注销店铺数据 * @param param * @return */ @PostMapping(value = "cleanShop") - @ApiOperation(value = "注销商家数据") + @ApiOperation(value = "注销店铺数据") public Result cleanShop(@RequestBody ShopGetByIdParam param) throws CoBusinessException{ ContextUtil.interceptDelete(); Boolean result = cerePlatformShopService.cleanShop(param.getShopId()); diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/business/CereBusinessShopDAO.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/business/CereBusinessShopDAO.java deleted file mode 100644 index 0925143..0000000 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/business/CereBusinessShopDAO.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (C) 2017-2021 - * All rights reserved, Designed By 深圳中科鑫智科技有限公司 - * Copyright authorization contact 18814114118 - */ -package com.shop.cereshop.admin.dao.business; - -import com.shop.cereshop.commons.domain.business.CereBusinessShop; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; - -import java.util.List; - -@Mapper -public interface CereBusinessShopDAO extends BaseMapper { - - int insertSelective(CereBusinessShop record); - - List selectAllProject(); -} diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/business/CereBusinessUserDAO.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/business/CereBusinessUserDAO.java new file mode 100644 index 0000000..7d6142a --- /dev/null +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/business/CereBusinessUserDAO.java @@ -0,0 +1,20 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.admin.dao.business; + +import com.shop.cereshop.commons.domain.business.CereBusinessUser; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface CereBusinessUserDAO extends BaseMapper { + + int insertSelective(CereBusinessUser record); + + List selectAllProject(); +} diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/business/CerePlatformBusinessDAO.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/business/CerePlatformBusinessDAO.java index 98d726d..76ed5f2 100644 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/business/CerePlatformBusinessDAO.java +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/business/CerePlatformBusinessDAO.java @@ -5,23 +5,65 @@ */ package com.shop.cereshop.admin.dao.business; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.shop.cereshop.admin.page.business.Business; +import com.shop.cereshop.admin.page.business.BusinessGetAll; +import com.shop.cereshop.admin.page.finance.Finance; +import com.shop.cereshop.admin.param.business.BusinessGetAllParam; +import com.shop.cereshop.admin.param.finance.FinanceParam; +import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.math.BigDecimal; +import java.util.List; @Mapper public interface CerePlatformBusinessDAO extends BaseMapper { - int deleteByPrimaryKey(Long businessUserId); - int insertSelective(CerePlatformBusiness record); + CerePlatformBusiness findByBusinessName(@Param("businessName") String businessName); + + CerePlatformBusiness findByBusinessPhone(@Param("businessPhone") String businessPhone); + + CerePlatformBusiness checkBusinessIdByName(@Param("businessName") String businessName,@Param("businessId") Long businessId); + + CerePlatformBusiness checkBusinessIdByPhone(@Param("businessPhone") String businessPhone,@Param("businessId") Long businessId); + + CerePlatformBusinessUser findBusinessUserByBusinessId(@Param("businessId") Long businessId); + + BusinessGetAll getById(@Param("businessId") Long businessId); + + List getAll(BusinessGetAllParam param); + + Business findBusiness(@Param("businessId") Long businessId); + + void updateDate(CerePlatformBusiness CerePlatformBusiness); + + List getAllFinance(FinanceParam param); + + BigDecimal finFrozen(@Param("businessId") Long businessId); + + BigDecimal findHaveWithdrawal(@Param("businessId") Long businessId); + + BigDecimal findRefund(@Param("businessId") Long businessId); + + BigDecimal findRevenue(); + + BigDecimal getAllWithdrawableMoney(); + + BigDecimal getWithdrawableStayMoney(); + + Long findBusinessUserId(@Param("businessId") Long businessId); - CerePlatformBusiness selectByPrimaryKey(Long businessUserId); + List findAll(); - int updateByPrimaryKeySelective(CerePlatformBusiness record); + void updateBusinessStop(CerePlatformBusiness business); - int updateByPrimaryKey(CerePlatformBusiness record); + /** 查询商家提现中的金额 */ + BigDecimal findWithdrawing(Long businessId); - Long findProjectByUsername(String username); + Boolean cleanShop(Long businessId); - CerePlatformBusiness findByPhone(String phone); + List getByIdList(@Param("businessIdList") List businessIdList); } diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/business/CerePlatformBusinessUserDAO.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/business/CerePlatformBusinessUserDAO.java new file mode 100644 index 0000000..bf1c850 --- /dev/null +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/business/CerePlatformBusinessUserDAO.java @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.admin.dao.business; + +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +@Mapper +public interface CerePlatformBusinessUserDAO extends BaseMapper { + int deleteByPrimaryKey(Long businessUserId); + + int insertSelective(CerePlatformBusinessUser record); + + CerePlatformBusinessUser selectByPrimaryKey(Long businessUserId); + + int updateByPrimaryKeySelective(CerePlatformBusinessUser record); + + int updateByPrimaryKey(CerePlatformBusinessUser record); + + Long findBusinessByUsername(String username); + + CerePlatformBusinessUser findByPhone(String phone); + + CerePlatformBusinessUser findByUserName(String username); + + CerePlatformBusinessUser checkUserName(@Param("username") String username, @Param("businessUserId") Long businessUserId); + + CerePlatformBusinessUser checkPhone(@Param("phone") String phone, @Param("businessUserId") Long businessUserId); + +} diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/permission/CerePlatformPermissionDAO.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/permission/CerePlatformPermissionDAO.java index 2b6da5f..5419a07 100644 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/permission/CerePlatformPermissionDAO.java +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/permission/CerePlatformPermissionDAO.java @@ -42,8 +42,6 @@ public interface CerePlatformPermissionDAO extends BaseMapper findAllCatalogByResourceType(@Param("resourceType") String resourceType); - int findMaxSort(); - List findByPermissionAndProject(@Param("project") Long project, @Param("permission") String permission, @Param("resourceType") String resourceType); diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/product/CereProductClassifyDAO.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/product/CereProductClassifyDAO.java index 4249493..9da6db7 100644 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/product/CereProductClassifyDAO.java +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/product/CereProductClassifyDAO.java @@ -5,7 +5,6 @@ */ package com.shop.cereshop.admin.dao.product; -import com.shop.cereshop.admin.page.product.ProductClassify; import com.shop.cereshop.commons.domain.product.CereProductClassify; import com.shop.cereshop.commons.domain.product.CereShopProduct; import com.shop.cereshop.commons.domain.product.Classify; @@ -27,13 +26,11 @@ public interface CereProductClassifyDAO extends BaseMapper int updateByPrimaryKey(CereProductClassify record); - CereProductClassify getById(@Param("classifyId") Long classifyId); - List getAll(); List checkProduct(@Param("classifyId") Long classifyId); - List findByPid(@Param("classifyId") Long classifyId); + List findByPid(@Param("classifyId") Long classifyId); void updateBatchLevelHierarchy(@Param("list") List list); @@ -43,5 +40,5 @@ public interface CereProductClassifyDAO extends BaseMapper void deleteByIds(@Param("ids") List ids); - List findByIds(@Param("ids") List ids); + List findByIds(@Param("ids") List ids); } diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/shop/CerePlatformShopDAO.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/shop/CerePlatformShopDAO.java index 8049ba8..04958b6 100644 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/shop/CerePlatformShopDAO.java +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/shop/CerePlatformShopDAO.java @@ -10,7 +10,7 @@ import com.shop.cereshop.admin.page.shop.Shop; import com.shop.cereshop.admin.page.shop.ShopGetAll; import com.shop.cereshop.admin.param.finance.FinanceParam; import com.shop.cereshop.admin.param.shop.ShopGetAllParam; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.shop.CerePlatformShop; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; @@ -30,7 +30,7 @@ public interface CerePlatformShopDAO extends BaseMapper { CerePlatformShop checkShopIdByPhone(@Param("shopPhone") String shopPhone,@Param("shopId") Long shopId); - CerePlatformBusiness findBusinessByShopId(@Param("shopId") Long shopId); + CerePlatformBusinessUser findBusinessByShopId(@Param("shopId") Long shopId); ShopGetAll getById(@Param("shopId") Long shopId); @@ -56,7 +56,7 @@ public interface CerePlatformShopDAO extends BaseMapper { Long findBusinessId(@Param("shopId") Long shopId); - CerePlatformBusiness findBusiness(@Param("businessUserId") Long businessUserId); + CerePlatformBusinessUser findBusiness(@Param("businessUserId") Long businessUserId); List findAll(); diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/shop/CereShopCheckDAO.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/shop/CereShopCheckDAO.java index 3bc7889..ffe6128 100644 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/shop/CereShopCheckDAO.java +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/shop/CereShopCheckDAO.java @@ -6,6 +6,7 @@ package com.shop.cereshop.admin.dao.shop; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.shop.cereshop.admin.page.business.Business; import com.shop.cereshop.admin.page.shop.Shop; import com.shop.cereshop.admin.param.shopcheck.CheckGetAllParam; import com.shop.cereshop.commons.domain.shop.CereShopCheck; @@ -18,7 +19,7 @@ public interface CereShopCheckDAO extends BaseMapper { int insertSelective(CereShopCheck record); - List getAll(CheckGetAllParam param); + List getAll(CheckGetAllParam param); - List getStayAll(CheckGetAllParam param); + List getStayAll(CheckGetAllParam param); } diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/shop/CereShopEnterpriseDAO.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/shop/CereShopEnterpriseDAO.java index 75c035d..70f301b 100644 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/shop/CereShopEnterpriseDAO.java +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/shop/CereShopEnterpriseDAO.java @@ -5,7 +5,7 @@ */ package com.shop.cereshop.admin.dao.shop; -import com.shop.cereshop.commons.domain.shop.CereShopEnterprise; +import com.shop.cereshop.commons.domain.business.CereShopEnterprise; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -15,5 +15,5 @@ public interface CereShopEnterpriseDAO extends BaseMapper { int insertSelective(CereShopEnterprise record); - CereShopEnterprise findByShopId(@Param("shopId") Long shopId); + CereShopEnterprise findByBusinessId(@Param("businessId") Long businessId); } diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/shop/CereShopIndividualBusinessesDAO.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/shop/CereShopIndividualBusinessesDAO.java index ef942ee..ccc4f05 100644 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/shop/CereShopIndividualBusinessesDAO.java +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/dao/shop/CereShopIndividualBusinessesDAO.java @@ -5,7 +5,7 @@ */ package com.shop.cereshop.admin.dao.shop; -import com.shop.cereshop.commons.domain.shop.CereShopIndividualBusinesses; +import com.shop.cereshop.commons.domain.business.CereShopIndividualBusinesses; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -15,5 +15,5 @@ public interface CereShopIndividualBusinessesDAO extends BaseMapper { int insertSelective(CereShopPersonal record); - CereShopPersonal findByShopId(@Param("shopId") Long shopId); + CereShopPersonal findByBusinessId(@Param("businessId") Long businessId); } diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/page/business/Business.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/page/business/Business.java new file mode 100644 index 0000000..fcc0275 --- /dev/null +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/page/business/Business.java @@ -0,0 +1,192 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.admin.page.business; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * 商家信息返回数据实体类 + */ +@Data +@ApiModel(value = "Business", description = "商家信息返回数据实体类") +public class Business { + + /** + * 处理id + */ + @ApiModelProperty(value = "处理id ") + private Long checkId; + + /** + * 商家id + */ + @ApiModelProperty(value = "商家id") + private Long businessId; + + /** + * 入驻处理状态 0-未处理 1-通过 2-拒绝 + */ + @ApiModelProperty(value = "入驻处理状态 0-未处理 1-通过 2-拒绝") + private Long checkState; + + /** + * 商家名称 + */ + @ApiModelProperty(value = "商家名称") + private String businessName; + + /** + * 商家地址 + */ + @ApiModelProperty(value = "商家地址") + private String businessAdress; + + /** + * 商家手机号 + */ + @ApiModelProperty(value = "商家手机号") + private String businessPhone; + + /** + * 主体类型 1-个人 2-个体工商户 3-企业 4-其他组织 + */ + @ApiModelProperty(value = "主体类型 1-个人 2-个体工商户 3-企业 4-其他组织") + private Integer authenType; + + /** + * 商家负责人 + */ + @ApiModelProperty(value = "商家负责人") + private String chargePersonName; + + /** + * 负责人电话 + */ + @ApiModelProperty(value = "负责人电话") + private String chargePersonPhone; + + /** + * 申请时间 + */ + @ApiModelProperty(value = "申请时间") + private String createTime; + + /** + * 客服电话 + */ + @ApiModelProperty(value = "客服电话") + private String servicePhone; + + /** + * 姓名 + */ + @ApiModelProperty(value = "姓名") + private String name; + + /** + * 证件类型 + */ + private Long cardType; + + /** + * 证件类型名称 + */ + @ApiModelProperty(value = "证件类型名称") + private String cardTypeName; + + /** + * 身份证号 + */ + @ApiModelProperty(value = "身份证号") + private String idCard; + + /** + * 身份证有效期 + */ + @ApiModelProperty(value = "身份证有效期") + private String cardTime; + + /** + * 身份证正面照 + */ + @ApiModelProperty(value = "身份证正面照") + private String cardPositive; + + /** + * 身份证反面照 + */ + @ApiModelProperty(value = "身份证反面照") + private String cardSide; + + /** + * 手持证件照 + */ + @ApiModelProperty(value = "手持证件照") + private String cardHand; + + /** + * 生效日期 + */ + @ApiModelProperty(value = "生效日期") + private String effectiveDate; + + /** + * 生效时限(年) + */ + @ApiModelProperty(value = "生效时限(年)") + private Integer effectiveYear; + + /** + * 主体信息-商户名称 + */ + @ApiModelProperty(value = "主体信息-商户名称") + private String subjectName; + + /** + * 主体信息-统一社会信用代码 + */ + @ApiModelProperty(value = "主体信息-统一社会信用代码") + private String subjectCode; + + /** + * 主体信息-地址 + */ + @ApiModelProperty(value = "主体信息-地址") + private String subjectAdress; + + /** + * 主体信息-详细地址 + */ + @ApiModelProperty(value = "主体信息-详细地址") + private String adress; + + /** + * 主体信息-营业期限开始时间 + */ + @ApiModelProperty(value = "主体信息-营业期限开始时间") + private String subjectStartTime; + + /** + * 主体信息-营业期限结束时间 + */ + @ApiModelProperty(value = "主体信息-营业期限结束时间") + private String subjectEndTime; + + /** + * 主体信息-营业执照图片地址 + */ + @ApiModelProperty(value = "主体信息-营业执照图片地址") + private List subjectLicense; + + /** + * 是否是跨境商家 + */ + private Integer isCross; +} diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/page/business/BusinessGetAll.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/page/business/BusinessGetAll.java new file mode 100644 index 0000000..07055c4 --- /dev/null +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/page/business/BusinessGetAll.java @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.admin.page.business; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * 商家列表 + */ +@Data +@ApiModel(value = "BusinessGetAll", description = "商家列表") +public class BusinessGetAll extends CerePlatformBusiness { + + /** + * 商家用户id + */ + @ApiModelProperty(value = "商家用户id") + private Long businessUserId; + + /** + * 商家账号 + */ + @ApiModelProperty(value = "商家账号") + private String businessPhone; + + /** + * 商家密码 + */ + @ApiModelProperty(value = "商家密码") + private String businessPassword; + +} diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/page/product/ProductClassify.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/page/product/ProductClassify.java deleted file mode 100644 index aaa1cb8..0000000 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/page/product/ProductClassify.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (C) 2017-2021 - * All rights reserved, Designed By 深圳中科鑫智科技有限公司 - * Copyright authorization contact 18814114118 - */ -package com.shop.cereshop.admin.page.product; - -import com.shop.cereshop.commons.domain.image.Image; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import javax.validation.constraints.NotBlank; -import java.util.List; - -/** - * 商品类别返回数据实体类 - */ -@Data -@ApiModel(value = "ProductClassify", description = "商品类别返回数据实体类") -public class ProductClassify { - - /** - * 一级类别id - */ - @ApiModelProperty(value = "一级类别id") - private Long id; - - /** - * 类别名称 - */ - @ApiModelProperty(value = "类别名称") - @NotBlank(message = "类别名称不能为空") - private String categoryName; - - /** - * 类别链接 - */ - @ApiModelProperty(value = "类别链接") - private Long link; - - /** - * 类别图片地址 - */ - @ApiModelProperty(value = "类别图片地址") - private String categoryImg; - - /** - * 类别图片地址 - */ - @ApiModelProperty(value = "类别图片地址") - private List categoryImgArray; - - /** - * 类别级别 - */ - @ApiModelProperty(value = "类别级别") - private Integer depth; - - /** - * 子节点数据 - */ - @ApiModelProperty(value = "子节点数据") - private List childs; -} diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/page/shop/ShopGetAll.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/page/shop/ShopGetAll.java index 01ec1c1..687278d 100644 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/page/shop/ShopGetAll.java +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/page/shop/ShopGetAll.java @@ -18,8 +18,8 @@ import lombok.Data; public class ShopGetAll extends CerePlatformShop { /** - * 商家用户id + * 商家名称 */ - @ApiModelProperty(value = "商家用户id") - private Long businessUserId; + @ApiModelProperty(value = "商家名称") + private String businessName; } diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/param/business/BusinessGetAllParam.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/param/business/BusinessGetAllParam.java new file mode 100644 index 0000000..25b7994 --- /dev/null +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/param/business/BusinessGetAllParam.java @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.admin.param.business; + +import com.shop.cereshop.commons.domain.common.PageParam; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * 获取商家列表请求 + */ +@Data +@ApiModel(value = "BusinessGetAllParam", description = "获取商家列表请求") +public class BusinessGetAllParam extends PageParam { + + + /** + * 商家Id + */ + @ApiModelProperty(value = "商家Id") + private String businessId; + /** + * 商家名称 + */ + @ApiModelProperty(value = "商家名称") + private String businessName; + + /** + * 商家编码 + */ + @ApiModelProperty(value = "商家编码") + private String businessCode; + + /** + * 商家负责人 + */ + @ApiModelProperty(value = "商家负责人") + private String chargePersonName; + + /** + * 合同状态 1-有效 0-无效 + */ + @ApiModelProperty(value = "合同状态 1-有效 0-无效") + private Integer contractState; + + /** + * 商家IdList + */ + @ApiModelProperty(value = "商家IdList") + private List businessIdList; +} diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/param/business/BusinessGetByIdParam.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/param/business/BusinessGetByIdParam.java new file mode 100644 index 0000000..1da925c --- /dev/null +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/param/business/BusinessGetByIdParam.java @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.admin.param.business; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * 获取商家详情请求 + */ +@Data +@ApiModel(value = "BusinessGetByIdParam", description = "获取商家详情请求") +public class BusinessGetByIdParam { + + /** + * 商家id + */ + @ApiModelProperty(value = "商家id") + private Long businessId; +} diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/param/business/BusinessSaveParam.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/param/business/BusinessSaveParam.java new file mode 100644 index 0000000..7354e21 --- /dev/null +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/param/business/BusinessSaveParam.java @@ -0,0 +1,92 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.admin.param.business; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * 添加商家请求 + */ +@Data +@ApiModel(value = "BusinessSaveParam", description = "添加商家请求") +public class BusinessSaveParam { + + /** + * 商家名称 + */ + @ApiModelProperty(value = "商家名称") + @NotBlank(message = "商家名称不能为空") + private String businessName; + + /** + * 商家账号 + */ + @ApiModelProperty(value = "商家账号") + @NotBlank(message = "商家账号不能为空") + private String businessPhone; + + /** + * 商家密码 + */ + @ApiModelProperty(value = "商家密码") + @NotBlank(message = "商家密码不能为空") + private String businessPassword; + + /** + * 商家负责人 + */ + @ApiModelProperty(value = "商家负责人") + @NotBlank(message = "商家负责人不能为空") + private String chargePersonName; + + /** + * 负责人电话 + */ + @ApiModelProperty(value = "负责人电话") + @NotBlank(message = "负责人电话不能为空") + private String chargePersonPhone; + + /** + * 商家地址 + */ + @ApiModelProperty(value = "商家地址") + @NotBlank(message = "商家地址不能为空") + private String businessAdress; + + /** + * 生效日期 + */ + @ApiModelProperty(value = "生效日期") + private String effectiveDate; + + /** + * 生效时限(年) + */ + @ApiModelProperty(value = "生效时限(年)") + private Integer effectiveYear; + + /** + * 合同状态 1-有效 0-无效 + */ + @ApiModelProperty(value = "合同状态 1-有效 0-无效") + private Integer contractState; + + /** + * 审核直播间 + */ + @ApiModelProperty(value = "审核直播间 1-开启 0-关闭") + private Integer auditLive; + + /** + * 审核直播间商品 + */ + @ApiModelProperty(value = "审核直播间商品 1-开启 0-关闭") + private Integer auditLiveProduct; +} diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/param/business/BusinessStartParam.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/param/business/BusinessStartParam.java new file mode 100644 index 0000000..39d7c7c --- /dev/null +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/param/business/BusinessStartParam.java @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.admin.param.business; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * 启停用商家请求 + */ +@Data +@ApiModel(value = "BusinessStartParam", description = "启停用商家请求") +public class BusinessStartParam { + + /** + * 商家id + */ + @ApiModelProperty(value = "商家id") + private Long businessId; + + /** + * 是否启用 1-是 0-否 + */ + @ApiModelProperty(value = "是否启用 1-是 0-否") + private Integer state; +} diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/param/business/BusinessUpdateParam.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/param/business/BusinessUpdateParam.java new file mode 100644 index 0000000..1c29f8c --- /dev/null +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/param/business/BusinessUpdateParam.java @@ -0,0 +1,96 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.admin.param.business; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * 更新商家请求 + */ +@Data +@ApiModel(value = "BusinessUpdateParam", description = "更新商家请求") +public class BusinessUpdateParam { + + /** + * 商家用户id + */ + @ApiModelProperty(value = "商家用户id") + private Long businessUserId; + + /** + * 商家id + */ + @ApiModelProperty(value = "商家id") + private Long businessId; + + /** + * 商家名称 + */ + @ApiModelProperty(value = "商家名称") + private String businessName; + + /** + * 商家账号 + */ + @ApiModelProperty(value = "商家账号") + private String businessPhone; + + /** + * 商家密码 + */ + @ApiModelProperty(value = "商家密码") + private String businessPassword; + + /** + * 商家负责人 + */ + @ApiModelProperty(value = "商家负责人") + private String chargePersonName; + + /** + * 负责人电话 + */ + @ApiModelProperty(value = "负责人电话") + private String chargePersonPhone; + + /** + * 商家地址 + */ + @ApiModelProperty(value = "商家地址") + private String businessAdress; + + /** + * 生效日期 + */ + @ApiModelProperty(value = "生效日期") + private String effectiveDate; + + /** + * 生效时限(年) + */ + @ApiModelProperty(value = "生效时限(年)") + private Integer effectiveYear; + + /** + * 合同状态 1-有效 0-无效 + */ + @ApiModelProperty(value = "合同状态 1-有效 0-无效") + private Integer contractState; + + /** + * 审核直播间 + */ + @ApiModelProperty(value = "审核直播间 1-开启 0-关闭") + private Integer auditLive; + + /** + * 审核直播间商品 + */ + @ApiModelProperty(value = "审核直播间商品 1-开启 0-关闭") + private Integer auditLiveProduct; +} diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/param/product/ClassifyLevelParam.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/param/product/ClassifyLevelParam.java index 61a1cee..b7f7281 100644 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/param/product/ClassifyLevelParam.java +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/param/product/ClassifyLevelParam.java @@ -5,7 +5,7 @@ */ package com.shop.cereshop.admin.param.product; -import com.shop.cereshop.admin.page.product.ProductClassify; +import com.shop.cereshop.commons.domain.product.CereProductClassify; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -31,5 +31,5 @@ public class ClassifyLevelParam { */ @ApiModelProperty(value = "分类层级数据") @Valid - private List classifies; + private List classifies; } diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/param/shop/ShopSaveParam.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/param/shop/ShopSaveParam.java index 1d34190..ad9d28c 100644 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/param/shop/ShopSaveParam.java +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/param/shop/ShopSaveParam.java @@ -10,6 +10,7 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; /** * 添加商家请求 @@ -26,18 +27,11 @@ public class ShopSaveParam { private String shopName; /** - * 店铺账号 + * 所属商家Id */ - @ApiModelProperty(value = "店铺账号") - @NotBlank(message = "店铺账号不能为空") - private String shopPhone; - - /** - * 店铺密码 - */ - @ApiModelProperty(value = "店铺密码") - @NotBlank(message = "店铺密码不能为空") - private String shopPassword; + @ApiModelProperty(value = "所属商家Id") + @NotNull(message = "所属商家不能为空") + private Long businessId; /** * 店铺负责人 @@ -60,34 +54,5 @@ public class ShopSaveParam { @NotBlank(message = "店铺地址不能为空") private String shopAdress; - /** - * 生效日期 - */ - @ApiModelProperty(value = "生效日期") - private String effectiveDate; - - /** - * 生效时限(年) - */ - @ApiModelProperty(value = "生效时限(年)") - private Integer effectiveYear; - - /** - * 合同状态 1-有效 0-无效 - */ - @ApiModelProperty(value = "合同状态 1-有效 0-无效") - private Integer contractState; - - /** - * 审核直播间 - */ - @ApiModelProperty(value = "审核直播间 1-开启 0-关闭") - private Integer auditLive; - - /** - * 审核直播间商品 - */ - @ApiModelProperty(value = "审核直播间商品 1-开启 0-关闭") - private Integer auditLiveProduct; } diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/param/shop/ShopUpdateParam.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/param/shop/ShopUpdateParam.java index bb69c27..ceb1497 100644 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/param/shop/ShopUpdateParam.java +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/param/shop/ShopUpdateParam.java @@ -9,6 +9,8 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import javax.validation.constraints.NotBlank; + /** * 更新商家请求 */ @@ -17,80 +19,45 @@ import lombok.Data; public class ShopUpdateParam { /** - * 商家用户id - */ - @ApiModelProperty(value = "商家用户id") - private Long businessUserId; - - /** - * 店铺id + * 店铺id */ @ApiModelProperty(value = "店铺id") private Long shopId; + /** * 店铺名称 */ @ApiModelProperty(value = "店铺名称") + @NotBlank(message = "店铺名称不能为空") private String shopName; /** - * 店铺账号 + * 所属商家Id */ - @ApiModelProperty(value = "店铺账号") - private String shopPhone; - - /** - * 店铺密码 - */ - @ApiModelProperty(value = "店铺密码") - private String shopPassword; + @ApiModelProperty(value = "所属商家Id") + @NotBlank(message = "所属商家不能为空") + private String businessId; /** * 店铺负责人 */ @ApiModelProperty(value = "店铺负责人") + @NotBlank(message = "店铺负责人不能为空") private String chargePersonName; /** * 负责人电话 */ @ApiModelProperty(value = "负责人电话") + @NotBlank(message = "负责人电话不能为空") private String chargePersonPhone; /** * 店铺地址 */ @ApiModelProperty(value = "店铺地址") + @NotBlank(message = "店铺地址不能为空") private String shopAdress; - /** - * 生效日期 - */ - @ApiModelProperty(value = "生效日期") - private String effectiveDate; - - /** - * 生效时限(年) - */ - @ApiModelProperty(value = "生效时限(年)") - private Integer effectiveYear; - - /** - * 合同状态 1-有效 0-无效 - */ - @ApiModelProperty(value = "合同状态 1-有效 0-无效") - private Integer contractState; - - /** - * 审核直播间 - */ - @ApiModelProperty(value = "审核直播间 1-开启 0-关闭") - private Integer auditLive; - - /** - * 审核直播间商品 - */ - @ApiModelProperty(value = "审核直播间商品 1-开启 0-关闭") - private Integer auditLiveProduct; } diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/param/shopcheck/CheckGetAllParam.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/param/shopcheck/CheckGetAllParam.java index 2dcb854..f786478 100644 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/param/shopcheck/CheckGetAllParam.java +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/param/shopcheck/CheckGetAllParam.java @@ -24,13 +24,7 @@ public class CheckGetAllParam extends PageParam { * 商家名称 */ @ApiModelProperty(value = "商家名称") - private String shopName; - - /** - * 手机号 - */ - @ApiModelProperty(value = "手机号") - private String shopPhone; + private String businessName; /** * 店铺类型 1-个人 2-个体工商户 3-企业 4-其他组织 diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/param/shopcheck/CheckGetByIdParam.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/param/shopcheck/CheckGetByIdParam.java index 012e18d..eefcf78 100644 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/param/shopcheck/CheckGetByIdParam.java +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/param/shopcheck/CheckGetByIdParam.java @@ -19,6 +19,6 @@ public class CheckGetByIdParam { /** * 店铺id */ - @ApiModelProperty(value = "店铺id") - private Long shopId; + @ApiModelProperty(value = "商家id") + private Long businessId; } diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/param/shopcheck/CheckHandleParam.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/param/shopcheck/CheckHandleParam.java index d87a2ec..4d615b5 100644 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/param/shopcheck/CheckHandleParam.java +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/param/shopcheck/CheckHandleParam.java @@ -18,10 +18,10 @@ import lombok.Data; public class CheckHandleParam { /** - * 店铺id + * 商家id */ - @ApiModelProperty(value = "店铺id") - private Long shopId; + @ApiModelProperty(value = "商家id") + private Long businessId; /** * 生效日期 null-即时生效 有值-指定日期生效 diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/CereBusinessShopService.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/CereBusinessShopService.java deleted file mode 100644 index f1d29e4..0000000 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/CereBusinessShopService.java +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright (C) 2017-2021 - * All rights reserved, Designed By 深圳中科鑫智科技有限公司 - * Copyright authorization contact 18814114118 - */ -package com.shop.cereshop.admin.service.business; - -import com.shop.cereshop.commons.domain.business.CereBusinessShop; -import com.shop.cereshop.commons.exception.CoBusinessException; - -public interface CereBusinessShopService { - void insert(CereBusinessShop cereBusinessShop) throws CoBusinessException; -} diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/CereBusinessUserService.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/CereBusinessUserService.java new file mode 100644 index 0000000..79b07b6 --- /dev/null +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/CereBusinessUserService.java @@ -0,0 +1,13 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.admin.service.business; + +import com.shop.cereshop.commons.domain.business.CereBusinessUser; +import com.shop.cereshop.commons.exception.CoBusinessException; + +public interface CereBusinessUserService { + void insert(CereBusinessUser cereBusinessUser) throws CoBusinessException; +} diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/CerePlatformBusinessService.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/CerePlatformBusinessService.java index 62b2d05..aa31dd7 100644 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/CerePlatformBusinessService.java +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/CerePlatformBusinessService.java @@ -5,13 +5,53 @@ */ package com.shop.cereshop.admin.service.business; +import com.shop.cereshop.admin.page.business.Business; +import com.shop.cereshop.admin.page.business.BusinessGetAll; +import com.shop.cereshop.admin.page.finance.FinanceCount; +import com.shop.cereshop.admin.param.business.BusinessGetAllParam; +import com.shop.cereshop.admin.param.business.BusinessSaveParam; +import com.shop.cereshop.admin.param.business.BusinessStartParam; +import com.shop.cereshop.admin.param.business.BusinessUpdateParam; +import com.shop.cereshop.admin.param.finance.FinanceParam; import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.common.Page; +import com.shop.cereshop.commons.domain.user.CerePlatformUser; import com.shop.cereshop.commons.exception.CoBusinessException; +import java.util.List; + public interface CerePlatformBusinessService { - void insert(CerePlatformBusiness cerePlatformBusiness) throws CoBusinessException; + void save(BusinessSaveParam param, CerePlatformUser user) throws CoBusinessException; + + CerePlatformBusiness findByBusinessName(String businessName); + + CerePlatformBusiness findByBusinessPhone(String businessPhone); + + CerePlatformBusiness checkBusinessIdByName(String businessName, Long businessId); + + CerePlatformBusiness checkBusinessIdByPhone(String businessPhone, Long businessId); + + void update(BusinessUpdateParam param, CerePlatformUser user) throws CoBusinessException; + + void startOrStop(BusinessStartParam param, CerePlatformUser user) throws CoBusinessException; + + BusinessGetAll getById(Long businessId) throws CoBusinessException,Exception; + + Page getAll(BusinessGetAllParam param) throws CoBusinessException; + + Business findBusiness(Long businessId); + + void updateDate(CerePlatformBusiness cerePlatformBusiness) throws CoBusinessException; + + FinanceCount getAllFinance(FinanceParam param) throws CoBusinessException; + + Long findBusinessUserId(Long businessId); + + List findAll(); + + void updateBusinessStop(CerePlatformBusiness business) throws CoBusinessException; - void update(CerePlatformBusiness cerePlatformBusiness) throws CoBusinessException; + Boolean cleanShop(Long businessId); - CerePlatformBusiness findByPhone(String chargePersonPhone); + List getByIdList(List businessIdList); } diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/CerePlatformBusinessUserService.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/CerePlatformBusinessUserService.java new file mode 100644 index 0000000..6375be3 --- /dev/null +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/CerePlatformBusinessUserService.java @@ -0,0 +1,23 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.admin.service.business; + +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; +import com.shop.cereshop.commons.exception.CoBusinessException; + +public interface CerePlatformBusinessUserService { + void insert(CerePlatformBusinessUser cerePlatformBusinessUser) throws CoBusinessException; + + void update(CerePlatformBusinessUser cerePlatformBusinessUser) throws CoBusinessException; + + CerePlatformBusinessUser findByPhone(String chargePersonPhone); + + CerePlatformBusinessUser findByUserName(String username); + + CerePlatformBusinessUser checkPhone(String phone, Long businessUserId); + + CerePlatformBusinessUser checkUserName(String username, Long businessUserId); +} diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/CereShopEnterpriseService.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/CereShopEnterpriseService.java new file mode 100644 index 0000000..67300fa --- /dev/null +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/CereShopEnterpriseService.java @@ -0,0 +1,12 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.admin.service.business; + +import com.shop.cereshop.commons.domain.business.CereShopEnterprise; + +public interface CereShopEnterpriseService { + CereShopEnterprise findByBusinessId(Long businessId); +} diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/CereShopIndividualBusinessesService.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/CereShopIndividualBusinessesService.java new file mode 100644 index 0000000..5a724e4 --- /dev/null +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/CereShopIndividualBusinessesService.java @@ -0,0 +1,12 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.admin.service.business; + +import com.shop.cereshop.commons.domain.business.CereShopIndividualBusinesses; + +public interface CereShopIndividualBusinessesService { + CereShopIndividualBusinesses findByBusinessId(Long businessId); +} diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/CereShopOtherOrganizationsService.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/CereShopOtherOrganizationsService.java new file mode 100644 index 0000000..a5a8bf9 --- /dev/null +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/CereShopOtherOrganizationsService.java @@ -0,0 +1,12 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.admin.service.business; + +import com.shop.cereshop.commons.domain.business.CereShopOtherOrganizations; + +public interface CereShopOtherOrganizationsService { + CereShopOtherOrganizations findByBusinessId(Long businessId); +} diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/CereShopPersonalService.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/CereShopPersonalService.java new file mode 100644 index 0000000..c9d81a5 --- /dev/null +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/CereShopPersonalService.java @@ -0,0 +1,12 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.admin.service.business; + +import com.shop.cereshop.commons.domain.business.CereShopPersonal; + +public interface CereShopPersonalService { + CereShopPersonal findByBusinessId(Long shopId); +} diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/impl/CereBusinessShopServiceImpl.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/impl/CereBusinessShopServiceImpl.java deleted file mode 100644 index 93f3a5e..0000000 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/impl/CereBusinessShopServiceImpl.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (C) 2017-2021 - * All rights reserved, Designed By 深圳中科鑫智科技有限公司 - * Copyright authorization contact 18814114118 - */ -package com.shop.cereshop.admin.service.business.impl; - -import com.shop.cereshop.admin.dao.business.CereBusinessShopDAO; -import com.shop.cereshop.admin.service.business.CereBusinessShopService; -import com.shop.cereshop.commons.domain.business.CereBusinessShop; -import com.shop.cereshop.commons.exception.CoBusinessException; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -@Service -public class CereBusinessShopServiceImpl implements CereBusinessShopService { - - @Autowired - private CereBusinessShopDAO cereBusinessShopDAO; - - @Override - public void insert(CereBusinessShop cereBusinessShop) throws CoBusinessException { - cereBusinessShopDAO.insert(cereBusinessShop); - } -} diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/impl/CereBusinessUserServiceImpl.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/impl/CereBusinessUserServiceImpl.java new file mode 100644 index 0000000..5346854 --- /dev/null +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/impl/CereBusinessUserServiceImpl.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.admin.service.business.impl; + +import com.shop.cereshop.admin.dao.business.CereBusinessUserDAO; +import com.shop.cereshop.admin.service.business.CereBusinessUserService; +import com.shop.cereshop.commons.domain.business.CereBusinessUser; +import com.shop.cereshop.commons.exception.CoBusinessException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class CereBusinessUserServiceImpl implements CereBusinessUserService { + + @Autowired + private CereBusinessUserDAO cereBusinessUserDAO; + + @Override + public void insert(CereBusinessUser cereBusinessUser) throws CoBusinessException { + cereBusinessUserDAO.insert(cereBusinessUser); + } +} diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/impl/CerePlatformBusinessServiceImpl.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/impl/CerePlatformBusinessServiceImpl.java index abedc61..c90a62c 100644 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/impl/CerePlatformBusinessServiceImpl.java +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/impl/CerePlatformBusinessServiceImpl.java @@ -5,12 +5,46 @@ */ package com.shop.cereshop.admin.service.business.impl; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; import com.shop.cereshop.admin.dao.business.CerePlatformBusinessDAO; +import com.shop.cereshop.admin.page.business.Business; +import com.shop.cereshop.admin.page.business.BusinessGetAll; +import com.shop.cereshop.admin.page.finance.Finance; +import com.shop.cereshop.admin.page.finance.FinanceCount; +import com.shop.cereshop.admin.param.business.BusinessGetAllParam; +import com.shop.cereshop.admin.param.business.BusinessSaveParam; +import com.shop.cereshop.admin.param.business.BusinessStartParam; +import com.shop.cereshop.admin.param.business.BusinessUpdateParam; +import com.shop.cereshop.admin.param.finance.FinanceParam; +import com.shop.cereshop.admin.service.business.CereBusinessUserService; import com.shop.cereshop.admin.service.business.CerePlatformBusinessService; +import com.shop.cereshop.admin.service.business.CerePlatformBusinessUserService; +import com.shop.cereshop.admin.service.common.CommonService; +import com.shop.cereshop.admin.service.log.CerePlatformLogService; +import com.shop.cereshop.admin.service.product.CereShopProductService; +import com.shop.cereshop.admin.utils.EncodeUtil; +import com.shop.cereshop.commons.constant.CoReturnFormat; +import com.shop.cereshop.commons.constant.IntegerEnum; +import com.shop.cereshop.commons.domain.business.CereBusinessUser; import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; +import com.shop.cereshop.commons.domain.common.Page; +import com.shop.cereshop.commons.domain.user.CerePlatformUser; import com.shop.cereshop.commons.exception.CoBusinessException; +import com.shop.cereshop.commons.utils.EmptyUtils; +import com.shop.cereshop.commons.utils.EncryptUtil; +import com.shop.cereshop.commons.utils.TimeUtils; +import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Isolation; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import java.math.BigDecimal; +import java.util.List; +import java.util.stream.Collectors; @Service public class CerePlatformBusinessServiceImpl implements CerePlatformBusinessService { @@ -18,18 +52,226 @@ public class CerePlatformBusinessServiceImpl implements CerePlatformBusinessServ @Autowired private CerePlatformBusinessDAO cerePlatformBusinessDAO; + @Autowired + private CerePlatformBusinessUserService cerePlatformBusinessUserService; + + @Autowired + private CereBusinessUserService cereBusinessUserService; + + @Autowired + private CommonService commonService; + + @Autowired + private CerePlatformLogService cerePlatformLogService; + + @Autowired + CereShopProductService cereShopProductService; + + @Autowired + private EncodeUtil encodeUtil; + @Override - public void insert(CerePlatformBusiness cerePlatformBusiness) throws CoBusinessException { + @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) + public void save(BusinessSaveParam param, CerePlatformUser user) throws CoBusinessException { + //新建商家数据 + String time= TimeUtils.yyMMddHHmmss(); + CerePlatformBusiness cerePlatformBusiness=new CerePlatformBusiness(); + BeanUtils.copyProperties(param, cerePlatformBusiness); + CerePlatformBusinessUser business = cerePlatformBusinessUserService.findByPhone(param.getChargePersonPhone()); + if (business != null) { + throw new CoBusinessException(CoReturnFormat.PHONE_ALREADY_BIND_SHOP); + } + //生成店铺编号 + String shopCode=commonService.getShopCode(); + cerePlatformBusiness.setBusinessCode(shopCode); + cerePlatformBusiness.setAuthenticationState(IntegerEnum.APPROVED.getCode()); + cerePlatformBusiness.setCheckState(IntegerEnum.UNTREATED.getCode()); + cerePlatformBusiness.setState(IntegerEnum.YES.getCode()); + cerePlatformBusiness.setCreateTime(time); + cerePlatformBusiness.setUpdateTime(time); cerePlatformBusinessDAO.insert(cerePlatformBusiness); + //同步新增商家用户数据 + CerePlatformBusinessUser cerePlatformBusinessUser =new CerePlatformBusinessUser(); + cerePlatformBusinessUser.setCreateTime(time); + cerePlatformBusinessUser.setUsername(param.getBusinessPhone()); + if(EmptyUtils.isEmpty(param.getBusinessPassword())){ + cerePlatformBusinessUser.setPassword(EncryptUtil.encrypt("123456")); + }else { + cerePlatformBusinessUser.setPassword(EncryptUtil.encrypt(param.getBusinessPhone())); + } + cerePlatformBusinessUser.setName(cerePlatformBusiness.getChargePersonName()); + cerePlatformBusinessUser.setPhone(param.getBusinessPhone()); + cerePlatformBusinessUser.setState(IntegerEnum.YES.getCode()); + cerePlatformBusinessUserService.insert(cerePlatformBusinessUser); + //同步新增商家用户绑定店铺数据 + CereBusinessUser cereBusinessUser =new CereBusinessUser(); + cereBusinessUser.setBusinessUserId(cerePlatformBusinessUser.getBusinessUserId()); + cereBusinessUser.setBusinessId(cerePlatformBusiness.getBusinessId()); + cereBusinessUser.setIfBinding(IntegerEnum.YES.getCode()); + cereBusinessUser.setIsMainUser(IntegerEnum.YES.getCode()); + cereBusinessUserService.insert(cereBusinessUser); + //新增日志 + cerePlatformLogService.addLog(user,"商家管理","平台端操作","添加商家",String.valueOf(cerePlatformBusiness.getBusinessId()),time); + } + + @Override + public CerePlatformBusiness findByBusinessName(String businessName) { + return cerePlatformBusinessDAO.findByBusinessName(businessName); + } + + @Override + public CerePlatformBusiness findByBusinessPhone(String businessPhone) { + return cerePlatformBusinessDAO.findByBusinessPhone(businessPhone); + } + + + @Override + public CerePlatformBusiness checkBusinessIdByName(String businessName, Long businessId) { + return cerePlatformBusinessDAO.checkBusinessIdByName(businessName,businessId); + } + + @Override + public CerePlatformBusiness checkBusinessIdByPhone(String businessPhone, Long businessId) { + return cerePlatformBusinessDAO.checkBusinessIdByPhone(businessPhone,businessId); + } + + @Override + @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) + public void update(BusinessUpdateParam param, CerePlatformUser user) throws CoBusinessException { + String time= TimeUtils.yyMMddHHmmss(); + CerePlatformBusiness cerePlatformBusiness=new CerePlatformBusiness(); + BeanUtils.copyProperties(param, cerePlatformBusiness); + cerePlatformBusiness.setUpdateTime(time); + //修改商家数据 + cerePlatformBusinessDAO.updateById(cerePlatformBusiness); + //根据商家用户id查询用户数据 + CerePlatformBusinessUser cerePlatformBusinessUser =cerePlatformBusinessDAO.findBusinessUserByBusinessId(param.getBusinessUserId()); + if(cerePlatformBusinessUser !=null){ + cerePlatformBusinessUser.setUpdateTime(time); + cerePlatformBusinessUser.setUsername(param.getBusinessPhone()); + cerePlatformBusinessUser.setPassword(param.getBusinessPassword()); + cerePlatformBusinessUser.setName(cerePlatformBusiness.getChargePersonName()); + cerePlatformBusinessUserService.update(cerePlatformBusinessUser); + } + //新增日志 + cerePlatformLogService.addLog(user,"商家管理","平台端操作","修改商家",String.valueOf(cerePlatformBusiness.getBusinessId()),time); + } + + @Override + @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) + public void startOrStop(BusinessStartParam param, CerePlatformUser user) throws CoBusinessException { + String time =TimeUtils.yyMMddHHmmss(); + CerePlatformBusiness cerePlatformBusiness=new CerePlatformBusiness(); + cerePlatformBusiness.setBusinessId(param.getBusinessId()); + cerePlatformBusiness.setState(param.getState()); + String describe=""; + if(IntegerEnum.YES.getCode().equals(cerePlatformBusiness.getState())){ + describe="启用商家"; + }else { + describe="停用商家"; + } + cerePlatformBusiness.setUpdateTime(time); + cerePlatformBusinessDAO.updateById(cerePlatformBusiness); + //同时下架所有商品--TODO by pxh + cereShopProductService.unShelveByShopId(param.getBusinessId(), user); + //新增日志 + cerePlatformLogService.addLog(user,"商家管理","平台端操作",describe,String.valueOf(cerePlatformBusiness.getBusinessId()),time); + } + + @Override + public BusinessGetAll getById(Long businessId) throws CoBusinessException,Exception { + BusinessGetAll shop = cerePlatformBusinessDAO.getById(businessId); + //解密密码 +// shop.setShopPassword(EncryptUtil.decrypt(shop.getShopPassword())); + return shop; + } + + @Override + public Page getAll(BusinessGetAllParam param) throws CoBusinessException { + PageHelper.startPage(param.getPage(),param.getPageSize()); + List list=cerePlatformBusinessDAO.getAll(param); + for (BusinessGetAll business:list) { + business.setChargePersonName(encodeUtil.encodeInfo(business.getChargePersonName())); + business.setChargePersonPhone(encodeUtil.encodePhone(business.getChargePersonPhone())); + } + PageInfo pageInfo=new PageInfo<>(list); + Page page=new Page(pageInfo.getList(),pageInfo.getTotal()); + return page; + } + + @Override + public Business findBusiness(Long businessId) { + return cerePlatformBusinessDAO.findBusiness(businessId); + } + + @Override + public void updateDate(CerePlatformBusiness cerePlatformBusiness) throws CoBusinessException { + cerePlatformBusinessDAO.updateDate(cerePlatformBusiness); + } + + @Override + public FinanceCount getAllFinance(FinanceParam param) throws CoBusinessException { + PageHelper.startPage(param.getPage(),param.getPageSize()); + List list=cerePlatformBusinessDAO.getAllFinance(param); + PageInfo pageInfo=new PageInfo<>(list); + if(!EmptyUtils.isEmpty(list)){ + list=list.stream() + //查询冻结金额 + .peek(a -> a.setFrozen(cerePlatformBusinessDAO.finFrozen(a.getShopId()))) + //查询已提金额 + .peek(a -> a.setHaveWithdrawable(cerePlatformBusinessDAO.findHaveWithdrawal(a.getShopId()))) + //查询已退款金额 + .peek(a -> a.setRefund(cerePlatformBusinessDAO.findRefund(a.getShopId()))) + //可提现金额 = 总营收 - 已提现 - 冻结 - 提现中 + .peek(a -> a.setWithdrawable(a.getRevenue().subtract(a.getHaveWithdrawable()) + .subtract(a.getFrozen()).subtract(cerePlatformBusinessDAO.findWithdrawing(a.getShopId())))) + .collect(Collectors.toList()); + pageInfo.setList(list); + } + Page page=new Page(pageInfo.getList(),pageInfo.getTotal()); + FinanceCount count=new FinanceCount(); + BigDecimal decimal=BigDecimal.ZERO; + //查询营收总额 + count.setRevenue(cerePlatformBusinessDAO.findRevenue()); + //查询冻结中金额 + count.setFrozen(cerePlatformBusinessDAO.finFrozen(null)); + //查询总的提现金额 + BigDecimal withdrawableMoney = cerePlatformBusinessDAO.getAllWithdrawableMoney(); + //查询提现中的金额 + BigDecimal stayMoney = cerePlatformBusinessDAO.getWithdrawableStayMoney(); + //查询已提现金额 + BigDecimal have=cerePlatformBusinessDAO.findHaveWithdrawal(null); + count.setHaveWithdrawable(have); + //计算可提现金额=总的提现金额-提现中金额-已提现金额 + count.setWithdrawable(decimal.add(withdrawableMoney).subtract(stayMoney).subtract(have)); + //查询已退款金额 + count.setRefund(cerePlatformBusinessDAO.findRefund(null)); + count.setPage(page); + return count; + } + + @Override + public Long findBusinessUserId(Long businessId) { + return cerePlatformBusinessDAO.findBusinessUserId(businessId); + } + + @Override + public List findAll() { + return cerePlatformBusinessDAO.findAll(); + } + + @Override + public void updateBusinessStop(CerePlatformBusiness business) throws CoBusinessException { + cerePlatformBusinessDAO.updateBusinessStop(business); } @Override - public void update(CerePlatformBusiness cerePlatformBusiness) throws CoBusinessException { - cerePlatformBusinessDAO.updateByPrimaryKeySelective(cerePlatformBusiness); + public Boolean cleanShop(Long businessId) { + return cerePlatformBusinessDAO.cleanShop(businessId); } @Override - public CerePlatformBusiness findByPhone(String phone) { - return cerePlatformBusinessDAO.findByPhone(phone); + public List getByIdList(List businessIdList){ + return cerePlatformBusinessDAO.getByIdList(businessIdList); } } diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/impl/CerePlatformBusinessUserServiceImpl.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/impl/CerePlatformBusinessUserServiceImpl.java new file mode 100644 index 0000000..fb95b9f --- /dev/null +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/impl/CerePlatformBusinessUserServiceImpl.java @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.admin.service.business.impl; + +import com.shop.cereshop.admin.dao.business.CerePlatformBusinessUserDAO; +import com.shop.cereshop.admin.service.business.CerePlatformBusinessUserService; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; +import com.shop.cereshop.commons.exception.CoBusinessException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class CerePlatformBusinessUserServiceImpl implements CerePlatformBusinessUserService { + + @Autowired + private CerePlatformBusinessUserDAO cerePlatformBusinessUserDAO; + + @Override + public void insert(CerePlatformBusinessUser cerePlatformBusinessUser) throws CoBusinessException { + cerePlatformBusinessUserDAO.insert(cerePlatformBusinessUser); + } + + @Override + public void update(CerePlatformBusinessUser cerePlatformBusinessUser) throws CoBusinessException { + cerePlatformBusinessUserDAO.updateByPrimaryKeySelective(cerePlatformBusinessUser); + } + + @Override + public CerePlatformBusinessUser findByPhone(String phone) { + return cerePlatformBusinessUserDAO.findByPhone(phone); + } + @Override + public CerePlatformBusinessUser findByUserName(String username) { + return cerePlatformBusinessUserDAO.findByUserName(username); + } + + @Override + public CerePlatformBusinessUser checkPhone(String phone, Long businessUserId) { + return cerePlatformBusinessUserDAO.checkPhone(phone, businessUserId); + } + @Override + public CerePlatformBusinessUser checkUserName(String username, Long businessUserId) { + return cerePlatformBusinessUserDAO.checkUserName(username, businessUserId); + } +} diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/impl/CereShopEnterpriseServiceImpl.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/impl/CereShopEnterpriseServiceImpl.java new file mode 100644 index 0000000..e1c69ed --- /dev/null +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/impl/CereShopEnterpriseServiceImpl.java @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.admin.service.business.impl; + +import com.shop.cereshop.admin.dao.shop.CereShopEnterpriseDAO; +import com.shop.cereshop.admin.service.business.CereShopEnterpriseService; +import com.shop.cereshop.commons.domain.business.CereShopEnterprise; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class CereShopEnterpriseServiceImpl implements CereShopEnterpriseService { + + @Autowired + private CereShopEnterpriseDAO cereShopEnterpriseDAO; + + @Override + public CereShopEnterprise findByBusinessId(Long businessId) { + return cereShopEnterpriseDAO.findByBusinessId(businessId); + } +} diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/impl/CereShopIndividualBusinessesServiceImpl.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/impl/CereShopIndividualBusinessesServiceImpl.java new file mode 100644 index 0000000..284d06d --- /dev/null +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/impl/CereShopIndividualBusinessesServiceImpl.java @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.admin.service.business.impl; + +import com.shop.cereshop.admin.dao.shop.CereShopIndividualBusinessesDAO; +import com.shop.cereshop.admin.service.business.CereShopIndividualBusinessesService; +import com.shop.cereshop.commons.domain.business.CereShopIndividualBusinesses; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class CereShopIndividualBusinessesServiceImpl implements CereShopIndividualBusinessesService { + + @Autowired + private CereShopIndividualBusinessesDAO cereShopIndividualBusinessesDAO; + + @Override + public CereShopIndividualBusinesses findByBusinessId(Long businessId) { + return cereShopIndividualBusinessesDAO.findByBusinessId(businessId); + } +} diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/impl/CereShopOtherOrganizationsServiceImpl.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/impl/CereShopOtherOrganizationsServiceImpl.java new file mode 100644 index 0000000..b8e606c --- /dev/null +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/impl/CereShopOtherOrganizationsServiceImpl.java @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.admin.service.business.impl; + +import com.shop.cereshop.admin.dao.shop.CereShopOtherOrganizationsDAO; +import com.shop.cereshop.admin.service.business.CereShopOtherOrganizationsService; +import com.shop.cereshop.commons.domain.business.CereShopOtherOrganizations; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class CereShopOtherOrganizationsServiceImpl implements CereShopOtherOrganizationsService { + + @Autowired + private CereShopOtherOrganizationsDAO cereShopOtherOrganizationsDAO; + + @Override + public CereShopOtherOrganizations findByBusinessId(Long businessId) { + return cereShopOtherOrganizationsDAO.findByBusinessId(businessId); + } +} diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/impl/CereShopPersonalServiceImpl.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/impl/CereShopPersonalServiceImpl.java new file mode 100644 index 0000000..3a62531 --- /dev/null +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/business/impl/CereShopPersonalServiceImpl.java @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.admin.service.business.impl; + +import com.shop.cereshop.admin.dao.shop.CereShopPersonalDAO; +import com.shop.cereshop.admin.service.business.CereShopPersonalService; +import com.shop.cereshop.commons.domain.business.CereShopPersonal; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class CereShopPersonalServiceImpl implements CereShopPersonalService { + + @Autowired + private CereShopPersonalDAO cereShopPersonalDAO; + + @Override + public CereShopPersonal findByBusinessId(Long businessId) { + return cereShopPersonalDAO.findByBusinessId(businessId); + } +} diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/permission/impl/CereBusinessPermissionServiceImpl.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/permission/impl/CereBusinessPermissionServiceImpl.java index d687ff5..5e77ac4 100644 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/permission/impl/CereBusinessPermissionServiceImpl.java +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/permission/impl/CereBusinessPermissionServiceImpl.java @@ -8,8 +8,8 @@ package com.shop.cereshop.admin.service.permission.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; -import com.shop.cereshop.admin.dao.business.CereBusinessShopDAO; -import com.shop.cereshop.admin.dao.business.CerePlatformBusinessDAO; +import com.shop.cereshop.admin.dao.business.CereBusinessUserDAO; +import com.shop.cereshop.admin.dao.business.CerePlatformBusinessUserDAO; import com.shop.cereshop.admin.dao.permission.CereBusinessPermissionDAO; import com.shop.cereshop.admin.dao.permission.CerePlatformPermissionDAO; import com.shop.cereshop.admin.dao.role.CerePlatformRoleDAO; @@ -54,7 +54,7 @@ public class CereBusinessPermissionServiceImpl implements CereBusinessPermission private CereBusinessPermissionDAO cereBusinessPermissionDAO; @Autowired - private CerePlatformBusinessDAO cerePlatformBusinessDAO; + private CerePlatformBusinessUserDAO cerePlatformBusinessUserDAO; @Autowired private CerePlatformLogService cerePlatformLogService; @@ -66,7 +66,7 @@ public class CereBusinessPermissionServiceImpl implements CereBusinessPermission private CerePlatformPermissionDAO cerePlatformPermissionDAO; @Autowired - private CereBusinessShopDAO cereBusinessShopDAO; + private CereBusinessUserDAO cereBusinessUserDAO; @Autowired private CerePlatformRoleDAO cerePlatformRoleDAO; @@ -236,7 +236,7 @@ public class CereBusinessPermissionServiceImpl implements CereBusinessPermission cereBusinessPermissionDAO.deleteByResourceTypeAndPermission(null, entry.getKey(), entry.getValue()); } } else { - Long project = cerePlatformBusinessDAO.findProjectByUsername(param.getSyncBusinessUsername()); + Long project = cerePlatformBusinessUserDAO.findBusinessByUsername(param.getSyncBusinessUsername()); if (project == null) { throw new CoBusinessException(CoReturnFormat.MERCHANT_NOT_EXIST); } @@ -251,7 +251,7 @@ public class CereBusinessPermissionServiceImpl implements CereBusinessPermission List permissionList = param.getSyncMenu(); List treeList = treefyPermission(permissionList); if (param.isSyncAll()) { - List projectList = cereBusinessShopDAO.selectAllProject(); + List projectList = cereBusinessUserDAO.selectAllProject(); for (Long project : projectList) { for (Permission per : treeList) { insertOrUpdateInner(per, project, null, per.getPermissionPid()); @@ -259,7 +259,7 @@ public class CereBusinessPermissionServiceImpl implements CereBusinessPermission log.info("sync progress %" + ((projectList.indexOf(project) + 1) / 1.0 / projectList.size()) * 100); } } else { - Long project = cerePlatformBusinessDAO.findProjectByUsername(param.getSyncBusinessUsername()); + Long project = cerePlatformBusinessUserDAO.findBusinessByUsername(param.getSyncBusinessUsername()); if (project == null) { throw new CoBusinessException(CoReturnFormat.MERCHANT_NOT_EXIST); } diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/permission/impl/CerePlatformPermissionServiceImpl.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/permission/impl/CerePlatformPermissionServiceImpl.java index 85ee3f9..6d2f9d2 100644 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/permission/impl/CerePlatformPermissionServiceImpl.java +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/permission/impl/CerePlatformPermissionServiceImpl.java @@ -21,12 +21,10 @@ import com.shop.cereshop.admin.param.user.UserBuildParam; import com.shop.cereshop.admin.service.log.CerePlatformLogService; import com.shop.cereshop.admin.service.permission.CerePlatformPermissionService; import com.shop.cereshop.admin.service.role.CerePlatformRolePermissionService; -import com.shop.cereshop.commons.constant.IntegerEnum; import com.shop.cereshop.commons.constant.LongEnum; import com.shop.cereshop.commons.constant.StringEnum; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.permission.CerePlatformPermission; -import com.shop.cereshop.commons.domain.role.CerePlatformRolePermission; import com.shop.cereshop.commons.domain.user.CerePlatformUser; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.utils.EmptyUtils; diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/product/CereProductClassifyService.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/product/CereProductClassifyService.java index be837f8..15faae9 100644 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/product/CereProductClassifyService.java +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/product/CereProductClassifyService.java @@ -6,10 +6,10 @@ package com.shop.cereshop.admin.service.product; import com.shop.cereshop.commons.domain.common.Page; -import com.shop.cereshop.admin.page.product.ProductClassify; import com.shop.cereshop.admin.param.product.ClassifyDeleteParam; import com.shop.cereshop.admin.param.product.ClassifyGetAllParam; import com.shop.cereshop.admin.param.product.ClassifyLevelParam; +import com.shop.cereshop.commons.domain.product.CereProductClassify; import com.shop.cereshop.commons.domain.product.Classify; import com.shop.cereshop.commons.domain.user.CerePlatformUser; import com.shop.cereshop.commons.exception.CoBusinessException; @@ -21,7 +21,7 @@ public interface CereProductClassifyService { void update(ClassifyLevelParam param, CerePlatformUser user) throws CoBusinessException; - ProductClassify getById(Long classifyId) throws CoBusinessException; + CereProductClassify getById(Long classifyId) throws CoBusinessException; Page getAll(ClassifyGetAllParam param) throws CoBusinessException; diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/product/impl/CereProductClassifyServiceImpl.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/product/impl/CereProductClassifyServiceImpl.java index c0ea749..a7c4ffb 100644 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/product/impl/CereProductClassifyServiceImpl.java +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/product/impl/CereProductClassifyServiceImpl.java @@ -5,26 +5,26 @@ */ package com.shop.cereshop.admin.service.product.impl; +import com.alibaba.fastjson.JSON; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.shop.cereshop.admin.dao.product.CereProductClassifyDAO; -import com.shop.cereshop.commons.constant.IntegerEnum; -import com.shop.cereshop.commons.constant.LongEnum; -import com.shop.cereshop.commons.domain.common.Page; -import com.shop.cereshop.admin.page.product.ProductClassify; import com.shop.cereshop.admin.param.product.ClassifyDeleteParam; import com.shop.cereshop.admin.param.product.ClassifyGetAllParam; import com.shop.cereshop.admin.param.product.ClassifyLevelParam; import com.shop.cereshop.admin.service.log.CerePlatformLogService; import com.shop.cereshop.admin.service.product.CereProductClassifyService; import com.shop.cereshop.commons.constant.CoReturnFormat; -import com.shop.cereshop.commons.domain.image.Image; +import com.shop.cereshop.commons.constant.IntegerEnum; +import com.shop.cereshop.commons.constant.LongEnum; +import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.product.CereProductClassify; import com.shop.cereshop.commons.domain.product.CereShopProduct; import com.shop.cereshop.commons.domain.product.Classify; import com.shop.cereshop.commons.domain.user.CerePlatformUser; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.utils.EmptyUtils; +import com.shop.cereshop.commons.utils.ProjectUtil; import com.shop.cereshop.commons.utils.TimeUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -54,7 +54,7 @@ public class CereProductClassifyServiceImpl implements CereProductClassifyServic List updates=new ArrayList<>(); if(!EmptyUtils.isEmpty(param.getClassifies())){ //遍历一级类别 - for (ProductClassify classify:param.getClassifies()) { + for (CereProductClassify classify:param.getClassifies()) { //新增一级类别数据 addOneClassify(classify,time,updates); } @@ -67,19 +67,20 @@ public class CereProductClassifyServiceImpl implements CereProductClassifyServic cerePlatformLogService.addLog(user,"商品类别","平台端操作","添加商品类别",null,time); } - private void addOneClassify(ProductClassify classify, String time,List updates) throws CoBusinessException{ - if(EmptyUtils.isEmpty(classify.getCategoryName())){ + private void addOneClassify(CereProductClassify classify, String time,List updates) throws CoBusinessException{ + if(EmptyUtils.isEmpty(classify.getClassifyName())){ throw new CoBusinessException(CoReturnFormat.CLASSIFY_NAME_NULL); } CereProductClassify cereProductClassify=new CereProductClassify(); - cereProductClassify.setClassifyId(classify.getId()); - cereProductClassify.setClassifyName(classify.getCategoryName()); + cereProductClassify.setClassifyId(classify.getClassifyId()); + cereProductClassify.setClassifyName(classify.getClassifyName()); cereProductClassify.setClassifyPid(LongEnum.ROOT.getCode()); - cereProductClassify.setClassifyImage(classify.getCategoryImg()); + cereProductClassify.setClassifyImage(classify.getClassifyImage()); cereProductClassify.setClassifyLevel(IntegerEnum.CLASSIFY_LEVEL_ONE.getCode()); cereProductClassify.setLink(classify.getLink()); - cereProductClassify.setClassifyHierarchy("-"+classify.getCategoryName()); - if(!EmptyUtils.isEmpty(classify.getId())){ + cereProductClassify.setProject(ProjectUtil.DEFAULT_PROJECT); + cereProductClassify.setClassifyHierarchy("-"+classify.getClassifyName()); + if(!EmptyUtils.isLongEmpty(classify.getClassifyId())){ //更新一级类别 cereProductClassify.setUpdateTime(time); cereProductClassify.setClassifyLevelHierarchy("/"+cereProductClassify.getClassifyId()); @@ -93,7 +94,7 @@ public class CereProductClassifyServiceImpl implements CereProductClassifyServic } if(!EmptyUtils.isEmpty(classify.getChilds())){ //新增子级类别 - for (ProductClassify productClassify:classify.getChilds()) { + for (CereProductClassify productClassify:classify.getChilds()) { addChildClaasify(cereProductClassify, updates,time,productClassify,IntegerEnum.CLASSIFY_LEVEL_TWO.getCode()); } @@ -101,19 +102,20 @@ public class CereProductClassifyServiceImpl implements CereProductClassifyServic } private void addChildClaasify(CereProductClassify parent, List updates, - String time,ProductClassify child,Integer level) throws CoBusinessException{ - if(EmptyUtils.isEmpty(child.getCategoryName())){ + String time, CereProductClassify child,Integer level) throws CoBusinessException{ + if(EmptyUtils.isEmpty(child.getClassifyName())){ throw new CoBusinessException(CoReturnFormat.CLASSIFY_NAME_NULL); } CereProductClassify productClassify=new CereProductClassify(); - productClassify.setClassifyId(child.getId()); - productClassify.setClassifyName(child.getCategoryName()); + productClassify.setClassifyId(child.getClassifyId()); + productClassify.setClassifyName(child.getClassifyName()); productClassify.setClassifyPid(parent.getClassifyId()); productClassify.setClassifyLevel(level); productClassify.setLink(child.getLink()); - productClassify.setClassifyImage(child.getCategoryImg()); - productClassify.setClassifyHierarchy(parent.getClassifyHierarchy()+"-"+child.getCategoryName()); - if(!EmptyUtils.isEmpty(child.getId())){ + productClassify.setClassifyImage(child.getClassifyImage()); + productClassify.setProject(ProjectUtil.DEFAULT_PROJECT); + productClassify.setClassifyHierarchy(parent.getClassifyHierarchy()+"-"+child.getClassifyName()); + if(!EmptyUtils.isLongEmpty(child.getClassifyId())){ //更新子级类别 productClassify.setUpdateTime(time); productClassify.setClassifyLevelHierarchy(parent.getClassifyLevelHierarchy()+"/"+productClassify.getClassifyId()); @@ -127,7 +129,7 @@ public class CereProductClassifyServiceImpl implements CereProductClassifyServic } if(!EmptyUtils.isEmpty(child.getChilds())){ //新增子级类别 - for (ProductClassify classify1:child.getChilds()) { + for (CereProductClassify classify1:child.getChilds()) { addChildClaasify(productClassify,updates,time,classify1,IntegerEnum.CLASSIFY_LEVEL_THREE.getCode()); } } @@ -139,10 +141,13 @@ public class CereProductClassifyServiceImpl implements CereProductClassifyServic String time=TimeUtils.yyMMddHHmmss(); //定义批量更新层级结构字段数组 List updates=new ArrayList<>(); + if(!EmptyUtils.isEmpty(param.getClassifies())){ - for (ProductClassify classify:param.getClassifies()) { + for (CereProductClassify classify:param.getClassifies()) { addOneClassify(classify,time,updates); } + System.out.println("11111"); + System.out.println(JSON.toJSON(param.getClassifies())); if(!EmptyUtils.isEmpty(updates)){ //批量更新分类层级结构 cereProductClassifyDAO.updateBatchLevelHierarchy(updates); @@ -157,37 +162,21 @@ public class CereProductClassifyServiceImpl implements CereProductClassifyServic } @Override - public ProductClassify getById(Long classifyId) throws CoBusinessException { - ProductClassify result=new ProductClassify(); + public CereProductClassify getById(Long classifyId) throws CoBusinessException { //查询一级类别数据 - CereProductClassify classify=cereProductClassifyDAO.getById(classifyId); + CereProductClassify classify=cereProductClassifyDAO.selectByPrimaryKey(classifyId); if(classify!=null){ - result.setId(classify.getClassifyId()); - result.setCategoryName(classify.getClassifyName()); - result.setLink(classify.getLink()); - result.setDepth(classify.getClassifyLevel()); - result.setCategoryImg(classify.getClassifyImage()); - List images=new ArrayList<>(); - Image image=new Image(); - image.setImgPath(classify.getClassifyImage()); - images.add(image); - result.setCategoryImgArray(images); //查询所有二级分类 - List classifies=cereProductClassifyDAO.findByPid(classify.getClassifyId()); + List classifies=cereProductClassifyDAO.findByPid(classify.getClassifyId()); if(!EmptyUtils.isEmpty(classifies)){ //查询所有三级分类 classifies.forEach(a -> { - a.setChilds(cereProductClassifyDAO.findByPid(a.getId())); - List childImages=new ArrayList<>(); - Image child=new Image(); - child.setImgPath(a.getCategoryImg()); - childImages.add(child); - a.setCategoryImgArray(childImages); + a.setChilds( cereProductClassifyDAO.findByPid(a.getClassifyId())); }); - result.setChilds(classifies); + classify.setChilds(classifies); } } - return result; + return classify; } @Override @@ -209,7 +198,7 @@ public class CereProductClassifyServiceImpl implements CereProductClassifyServic } String time =TimeUtils.yyMMddHHmmss(); //查询一级类别层级 - CereProductClassify classify=cereProductClassifyDAO.getById(param.getOneClassifyId()); + CereProductClassify classify=cereProductClassifyDAO.selectByPrimaryKey(param.getOneClassifyId()); if(classify!=null){ //删除一级类别 cereProductClassifyDAO.deleteByPrimaryKey(param.getOneClassifyId()); diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/sharesetting/impl/CerePlatformShareSettingServiceImpl.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/sharesetting/impl/CerePlatformShareSettingServiceImpl.java index 5aa8f87..aa17633 100644 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/sharesetting/impl/CerePlatformShareSettingServiceImpl.java +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/sharesetting/impl/CerePlatformShareSettingServiceImpl.java @@ -11,7 +11,6 @@ import com.shop.cereshop.admin.dao.product.CereProductClassifyDAO; import com.shop.cereshop.admin.dao.product.CereShopProductDAO; import com.shop.cereshop.admin.dao.sharesetting.CerePlatformShareSettingDAO; import com.shop.cereshop.admin.dao.shop.CerePlatformShopDAO; -import com.shop.cereshop.admin.page.product.ProductClassify; import com.shop.cereshop.admin.page.product.ShopProduct; import com.shop.cereshop.admin.page.sharesetting.PlatformShareSetting; import com.shop.cereshop.admin.page.shop.ShopGetAll; @@ -24,6 +23,7 @@ import com.shop.cereshop.admin.param.shop.ShopGetAllParam; import com.shop.cereshop.admin.service.log.CerePlatformLogService; import com.shop.cereshop.admin.service.sharesetting.CerePlatformShareSettingService; import com.shop.cereshop.commons.domain.common.Page; +import com.shop.cereshop.commons.domain.product.CereProductClassify; import com.shop.cereshop.commons.domain.sharesettng.CerePlatformShareSetting; import com.shop.cereshop.commons.domain.user.CerePlatformUser; import com.shop.cereshop.commons.exception.CoBusinessException; @@ -132,11 +132,11 @@ public class CerePlatformShareSettingServiceImpl implements CerePlatformShareSet if(platformShareSetting.getShareTargetType() == 1){ List productClassifyIdList = new ArrayList<>(); productClassifyIdList.add(platformShareSetting.getShareTargetId()); - List classifyList = cereProductClassifyDAO.findByIds(productClassifyIdList); - ProductClassify classify = classifyList.stream().filter(item -> Objects.equals(item.getId(), platformShareSetting.getShareTargetId())).findFirst().orElse(null); + List classifyList = cereProductClassifyDAO.findByIds(productClassifyIdList); + CereProductClassify classify = classifyList.stream().filter(item -> Objects.equals(item.getClassifyId(), platformShareSetting.getShareTargetId())).findFirst().orElse(null); if (classify != null) { - platformShareSetting.setName(classify.getCategoryName()); - platformShareSetting.setAvater(classify.getCategoryImg()); + platformShareSetting.setName(classify.getClassifyName()); + platformShareSetting.setAvater(classify.getClassifyImage()); } }else if(platformShareSetting.getShareTargetType() == 2){ //查询商家信息 @@ -182,13 +182,13 @@ public class CerePlatformShareSettingServiceImpl implements CerePlatformShareSet List productClassifyIdList = platformShareSettingList.stream().filter(item -> item.getShareTargetType() == 1) .map(PlatformShareSetting::getShareTargetId).collect(Collectors.toList()); if (!productClassifyIdList.isEmpty()){ - List classifyList = cereProductClassifyDAO.findByIds(productClassifyIdList); + List classifyList = cereProductClassifyDAO.findByIds(productClassifyIdList); for (PlatformShareSetting platformShareSetting : platformShareSettingList) { if(platformShareSetting.getShareTargetType() == 1){ - ProductClassify classify = classifyList.stream().filter(item -> Objects.equals(item.getId(), platformShareSetting.getShareTargetId())).findFirst().orElse(null); + CereProductClassify classify = classifyList.stream().filter(item -> Objects.equals(item.getClassifyId(), platformShareSetting.getShareTargetId())).findFirst().orElse(null); if (classify != null) { - platformShareSetting.setName(classify.getCategoryName()); - platformShareSetting.setAvater(classify.getCategoryImg()); + platformShareSetting.setName(classify.getClassifyName()); + platformShareSetting.setAvater(classify.getClassifyImage()); } } } diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/CerePlatformShopService.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/CerePlatformShopService.java index d9db053..059c656 100644 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/CerePlatformShopService.java +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/CerePlatformShopService.java @@ -43,8 +43,6 @@ public interface CerePlatformShopService { void updateDate(CerePlatformShop cerePlatformShop) throws CoBusinessException; - FinanceCount getAllFinance(FinanceParam param) throws CoBusinessException; - Long findBusinessId(Long shopId); List findAll(); diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/CereShopCheckService.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/CereShopCheckService.java index 6a09fbf..d48b06d 100644 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/CereShopCheckService.java +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/CereShopCheckService.java @@ -5,6 +5,7 @@ */ package com.shop.cereshop.admin.service.shop; +import com.shop.cereshop.admin.page.business.Business; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.admin.page.shop.Shop; import com.shop.cereshop.admin.param.shopcheck.CheckDeleteParam; @@ -16,7 +17,7 @@ import com.shop.cereshop.commons.exception.CoBusinessException; public interface CereShopCheckService { Page getAll(CheckGetAllParam param) throws CoBusinessException; - Shop getById(Long shopId) throws CoBusinessException; + Business getById(Long businessId) throws CoBusinessException; void handle(CheckHandleParam param, CerePlatformUser user) throws CoBusinessException,Exception; diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/CereShopEnterpriseService.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/CereShopEnterpriseService.java deleted file mode 100644 index 3bf51aa..0000000 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/CereShopEnterpriseService.java +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Copyright (C) 2017-2021 - * All rights reserved, Designed By 深圳中科鑫智科技有限公司 - * Copyright authorization contact 18814114118 - */ -package com.shop.cereshop.admin.service.shop; - -import com.shop.cereshop.commons.domain.shop.CereShopEnterprise; - -public interface CereShopEnterpriseService { - CereShopEnterprise findByShopId(Long shopId); -} diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/CereShopIndividualBusinessesService.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/CereShopIndividualBusinessesService.java deleted file mode 100644 index 6dfc9bb..0000000 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/CereShopIndividualBusinessesService.java +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Copyright (C) 2017-2021 - * All rights reserved, Designed By 深圳中科鑫智科技有限公司 - * Copyright authorization contact 18814114118 - */ -package com.shop.cereshop.admin.service.shop; - -import com.shop.cereshop.commons.domain.shop.CereShopIndividualBusinesses; - -public interface CereShopIndividualBusinessesService { - CereShopIndividualBusinesses findByShopId(Long shopId); -} diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/CereShopOtherOrganizationsService.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/CereShopOtherOrganizationsService.java deleted file mode 100644 index 3e9e9a0..0000000 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/CereShopOtherOrganizationsService.java +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Copyright (C) 2017-2021 - * All rights reserved, Designed By 深圳中科鑫智科技有限公司 - * Copyright authorization contact 18814114118 - */ -package com.shop.cereshop.admin.service.shop; - -import com.shop.cereshop.commons.domain.shop.CereShopOtherOrganizations; - -public interface CereShopOtherOrganizationsService { - CereShopOtherOrganizations findByShopId(Long shopId); -} diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/CereShopPersonalService.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/CereShopPersonalService.java deleted file mode 100644 index 6830bd8..0000000 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/CereShopPersonalService.java +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Copyright (C) 2017-2021 - * All rights reserved, Designed By 深圳中科鑫智科技有限公司 - * Copyright authorization contact 18814114118 - */ -package com.shop.cereshop.admin.service.shop; - -import com.shop.cereshop.commons.domain.shop.CereShopPersonal; - -public interface CereShopPersonalService { - CereShopPersonal findByShopId(Long shopId); -} diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/impl/CerePlatformShopServiceImpl.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/impl/CerePlatformShopServiceImpl.java index 6497f32..b75edb0 100644 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/impl/CerePlatformShopServiceImpl.java +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/impl/CerePlatformShopServiceImpl.java @@ -5,20 +5,17 @@ */ package com.shop.cereshop.admin.service.shop.impl; +import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.shop.cereshop.admin.dao.shop.CerePlatformShopDAO; -import com.shop.cereshop.admin.page.finance.Finance; -import com.shop.cereshop.admin.page.finance.FinanceCount; import com.shop.cereshop.admin.page.shop.Shop; import com.shop.cereshop.admin.page.shop.ShopGetAll; -import com.shop.cereshop.admin.param.finance.FinanceParam; import com.shop.cereshop.admin.param.shop.ShopGetAllParam; import com.shop.cereshop.admin.param.shop.ShopSaveParam; import com.shop.cereshop.admin.param.shop.ShopStartParam; import com.shop.cereshop.admin.param.shop.ShopUpdateParam; -import com.shop.cereshop.admin.service.business.CereBusinessShopService; -import com.shop.cereshop.admin.service.business.CerePlatformBusinessService; import com.shop.cereshop.admin.service.common.CommonService; import com.shop.cereshop.admin.service.log.CerePlatformLogService; import com.shop.cereshop.admin.service.product.CereShopProductService; @@ -26,13 +23,10 @@ import com.shop.cereshop.admin.service.shop.CerePlatformShopService; import com.shop.cereshop.admin.utils.EncodeUtil; import com.shop.cereshop.commons.constant.CoReturnFormat; import com.shop.cereshop.commons.constant.IntegerEnum; -import com.shop.cereshop.commons.domain.business.CereBusinessShop; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.shop.CerePlatformShop; import com.shop.cereshop.commons.domain.user.CerePlatformUser; import com.shop.cereshop.commons.exception.CoBusinessException; -import com.shop.cereshop.commons.utils.EmptyUtils; import com.shop.cereshop.commons.utils.EncryptUtil; import com.shop.cereshop.commons.utils.TimeUtils; import org.springframework.beans.BeanUtils; @@ -42,9 +36,7 @@ import org.springframework.transaction.annotation.Isolation; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; -import java.math.BigDecimal; import java.util.List; -import java.util.stream.Collectors; @Service public class CerePlatformShopServiceImpl implements CerePlatformShopService { @@ -53,12 +45,6 @@ public class CerePlatformShopServiceImpl implements CerePlatformShopService { private CerePlatformShopDAO cerePlatformShopDAO; @Autowired - private CerePlatformBusinessService cerePlatformBusinessService; - - @Autowired - private CereBusinessShopService cereBusinessShopService; - - @Autowired private CommonService commonService; @Autowired @@ -73,45 +59,32 @@ public class CerePlatformShopServiceImpl implements CerePlatformShopService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) public void save(ShopSaveParam param, CerePlatformUser user) throws CoBusinessException { + //校验店铺名称是否存在 + CerePlatformShop shop=findByShopName(param.getShopName()); + if(shop!=null){ + throw new CoBusinessException(CoReturnFormat.SHOP_NAME_ALREADY); + } + + List cerePlatformShopList = cerePlatformShopDAO.selectList(Wrappers.lambdaQuery().eq(CerePlatformShop::getBusinessId, param.getBusinessId())); + if(CollectionUtils.isNotEmpty(cerePlatformShopList) && cerePlatformShopList.size() >= 10){ + throw new CoBusinessException("10000","一个商家最多只能拥有10个店铺", ""); + } + //新建商家数据 String time= TimeUtils.yyMMddHHmmss(); CerePlatformShop cerePlatformShop=new CerePlatformShop(); BeanUtils.copyProperties(param, cerePlatformShop); - if(EmptyUtils.isEmpty(param.getShopPassword())){ - cerePlatformShop.setShopPassword(EncryptUtil.encrypt("123456")); - }else { - cerePlatformShop.setShopPassword(EncryptUtil.encrypt(param.getShopPassword())); - } - CerePlatformBusiness business = cerePlatformBusinessService.findByPhone(param.getChargePersonPhone()); - if (business != null) { - throw new CoBusinessException(CoReturnFormat.PHONE_ALREADY_BIND_SHOP); - } //生成店铺编号 String shopCode=commonService.getShopCode(); cerePlatformShop.setShopCode(shopCode); cerePlatformShop.setAuthenticationState(IntegerEnum.APPROVED.getCode()); - cerePlatformShop.setCheckState(IntegerEnum.UNTREATED.getCode()); + cerePlatformShop.setCheckState(IntegerEnum.ADOPT.getCode()); cerePlatformShop.setState(IntegerEnum.YES.getCode()); cerePlatformShop.setCreateTime(time); cerePlatformShop.setUpdateTime(time); cerePlatformShopDAO.insert(cerePlatformShop); - //同步新增商家用户数据 - CerePlatformBusiness cerePlatformBusiness=new CerePlatformBusiness(); - cerePlatformBusiness.setCreateTime(time); - cerePlatformBusiness.setUsername(cerePlatformShop.getShopPhone()); - cerePlatformBusiness.setPassword(cerePlatformShop.getShopPassword()); - cerePlatformBusiness.setName(cerePlatformShop.getChargePersonName()); - cerePlatformBusiness.setPhone(cerePlatformShop.getChargePersonPhone()); - cerePlatformBusiness.setState(IntegerEnum.YES.getCode()); - cerePlatformBusinessService.insert(cerePlatformBusiness); - //同步新增商家用户绑定店铺数据 - CereBusinessShop cereBusinessShop=new CereBusinessShop(); - cereBusinessShop.setBusinessUserId(cerePlatformBusiness.getBusinessUserId()); - cereBusinessShop.setShopId(cerePlatformShop.getShopId()); - cereBusinessShop.setIfBinding(IntegerEnum.YES.getCode()); - cereBusinessShopService.insert(cereBusinessShop); //新增日志 - cerePlatformLogService.addLog(user,"商家管理","平台端操作","添加商家",String.valueOf(cereBusinessShop.getShopId()),time); + cerePlatformLogService.addLog(user,"商家管理","平台端操作","添加商家",String.valueOf(cerePlatformShop.getShopId()),time); } @Override @@ -143,15 +116,6 @@ public class CerePlatformShopServiceImpl implements CerePlatformShopService { cerePlatformShop.setUpdateTime(time); //修改商家数据 cerePlatformShopDAO.updateById(cerePlatformShop); - //根据商家用户id查询用户数据 - CerePlatformBusiness cerePlatformBusiness=cerePlatformShopDAO.findBusiness(param.getBusinessUserId()); - if(cerePlatformBusiness!=null){ - cerePlatformBusiness.setUpdateTime(time); - cerePlatformBusiness.setUsername(cerePlatformShop.getShopPhone()); - cerePlatformBusiness.setPassword(cerePlatformShop.getShopPassword()); - cerePlatformBusiness.setName(cerePlatformShop.getChargePersonName()); - cerePlatformBusinessService.update(cerePlatformBusiness); - } //新增日志 cerePlatformLogService.addLog(user,"商家管理","平台端操作","修改商家",String.valueOf(cerePlatformShop.getShopId()),time); } @@ -209,47 +173,6 @@ public class CerePlatformShopServiceImpl implements CerePlatformShopService { } @Override - public FinanceCount getAllFinance(FinanceParam param) throws CoBusinessException { - PageHelper.startPage(param.getPage(),param.getPageSize()); - List list=cerePlatformShopDAO.getAllFinance(param); - PageInfo pageInfo=new PageInfo<>(list); - if(!EmptyUtils.isEmpty(list)){ - list=list.stream() - //查询冻结金额 - .peek(a -> a.setFrozen(cerePlatformShopDAO.finFrozen(a.getShopId()))) - //查询已提金额 - .peek(a -> a.setHaveWithdrawable(cerePlatformShopDAO.findHaveWithdrawal(a.getShopId()))) - //查询已退款金额 - .peek(a -> a.setRefund(cerePlatformShopDAO.findRefund(a.getShopId()))) - //可提现金额 = 总营收 - 已提现 - 冻结 - 提现中 - .peek(a -> a.setWithdrawable(a.getRevenue().subtract(a.getHaveWithdrawable()) - .subtract(a.getFrozen()).subtract(cerePlatformShopDAO.findWithdrawing(a.getShopId())))) - .collect(Collectors.toList()); - pageInfo.setList(list); - } - Page page=new Page(pageInfo.getList(),pageInfo.getTotal()); - FinanceCount count=new FinanceCount(); - BigDecimal decimal=BigDecimal.ZERO; - //查询营收总额 - count.setRevenue(cerePlatformShopDAO.findRevenue()); - //查询冻结中金额 - count.setFrozen(cerePlatformShopDAO.finFrozen(null)); - //查询总的提现金额 - BigDecimal withdrawableMoney = cerePlatformShopDAO.getAllWithdrawableMoney(); - //查询提现中的金额 - BigDecimal stayMoney = cerePlatformShopDAO.getWithdrawableStayMoney(); - //查询已提现金额 - BigDecimal have=cerePlatformShopDAO.findHaveWithdrawal(null); - count.setHaveWithdrawable(have); - //计算可提现金额=总的提现金额-提现中金额-已提现金额 - count.setWithdrawable(decimal.add(withdrawableMoney).subtract(stayMoney).subtract(have)); - //查询已退款金额 - count.setRefund(cerePlatformShopDAO.findRefund(null)); - count.setPage(page); - return count; - } - - @Override public Long findBusinessId(Long shopId) { return cerePlatformShopDAO.findBusinessId(shopId); } diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/impl/CereShopCheckServiceImpl.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/impl/CereShopCheckServiceImpl.java index cedb104..d6706d6 100644 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/impl/CereShopCheckServiceImpl.java +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/impl/CereShopCheckServiceImpl.java @@ -8,27 +8,29 @@ package com.shop.cereshop.admin.service.shop.impl; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.shop.cereshop.admin.dao.shop.CereShopCheckDAO; +import com.shop.cereshop.admin.page.business.Business; import com.shop.cereshop.admin.page.permission.MenuButton; -import com.shop.cereshop.admin.page.shop.Shop; import com.shop.cereshop.admin.param.shopcheck.CheckDeleteParam; import com.shop.cereshop.admin.param.shopcheck.CheckGetAllParam; import com.shop.cereshop.admin.param.shopcheck.CheckHandleParam; -import com.shop.cereshop.admin.service.business.CereBusinessUserRoleService; +import com.shop.cereshop.admin.service.business.*; import com.shop.cereshop.admin.service.dict.CerePlatformDictService; import com.shop.cereshop.admin.service.log.CerePlatformLogService; import com.shop.cereshop.admin.service.permission.CerePlatformPermissionService; import com.shop.cereshop.admin.service.role.CerePlatformRolePermissionService; import com.shop.cereshop.admin.service.role.CerePlatformRoleService; -import com.shop.cereshop.admin.service.shop.*; +import com.shop.cereshop.admin.service.shop.CereShopCheckService; +import com.shop.cereshop.admin.service.shop.CereShopRelationshipService; import com.shop.cereshop.admin.utils.EncodeUtil; import com.shop.cereshop.commons.constant.CoReturnFormat; import com.shop.cereshop.commons.constant.IntegerEnum; -import com.shop.cereshop.commons.domain.business.CereBusinessUserRole; +import com.shop.cereshop.commons.domain.business.*; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.permission.CerePlatformPermission; import com.shop.cereshop.commons.domain.role.CerePlatformRole; import com.shop.cereshop.commons.domain.role.CerePlatformRolePermission; -import com.shop.cereshop.commons.domain.shop.*; +import com.shop.cereshop.commons.domain.shop.CereShopCheck; +import com.shop.cereshop.commons.domain.shop.CereShopRelationship; import com.shop.cereshop.commons.domain.user.CerePlatformUser; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.utils.EmptyUtils; @@ -54,7 +56,7 @@ public class CereShopCheckServiceImpl implements CereShopCheckService { private CereShopCheckDAO cereShopCheckDAO; @Autowired - private CerePlatformShopService cerePlatformShopService; + private CerePlatformBusinessService cerePlatformBusinessService; @Autowired private CereShopPersonalService cereShopPersonalService; @@ -94,7 +96,7 @@ public class CereShopCheckServiceImpl implements CereShopCheckService { @Override public Page getAll(CheckGetAllParam param) throws CoBusinessException { - List list=null; + List list=null; PageHelper.startPage(param.getPage(),param.getPageSize()); if(IntegerEnum.UNTREATED.getCode().equals(param.getCheckState())){ //查询未处理入驻数据 @@ -103,100 +105,100 @@ public class CereShopCheckServiceImpl implements CereShopCheckService { //查询已处理入驻数据 list= cereShopCheckDAO.getAll(param); } - for (Shop shop:list) { - shop.setShopPhone(encodeUtil.encodePhone(shop.getShopPhone())); + for (Business business:list) { + business.setBusinessPhone(encodeUtil.encodePhone(business.getBusinessPhone())); } - PageInfo pageInfo=new PageInfo<>(list); + PageInfo pageInfo=new PageInfo<>(list); Page page=new Page(pageInfo.getList(),pageInfo.getTotal()); return page; } @Override - public Shop getById(Long shopId) throws CoBusinessException { + public Business getById(Long businessId) throws CoBusinessException { //查询店铺信息 - Shop shop=cerePlatformShopService.findShop(shopId); - if(shop!=null){ - shop.setName(encodeUtil.encodeInfo(shop.getName())); - shop.setChargePersonName(encodeUtil.encodeInfo(shop.getChargePersonName())); - shop.setChargePersonPhone(encodeUtil.encodePhone(shop.getChargePersonPhone())); - shop.setShopAdress(encodeUtil.encodeInfo(shop.getShopAdress())); - shop.setShopPhone(encodeUtil.encodePhone(shop.getShopPhone())); + Business business=cerePlatformBusinessService.findBusiness(businessId); + if(business!=null){ + business.setName(encodeUtil.encodeInfo(business.getName())); + business.setChargePersonName(encodeUtil.encodeInfo(business.getChargePersonName())); + business.setChargePersonPhone(encodeUtil.encodePhone(business.getChargePersonPhone())); + business.setBusinessAdress(encodeUtil.encodeInfo(business.getBusinessAdress())); + business.setBusinessPhone(encodeUtil.encodePhone(business.getBusinessPhone())); //查询认证数据 - if(IntegerEnum.PERSONAL.getCode().equals(shop.getAuthenType())){ + if(IntegerEnum.PERSONAL.getCode().equals(business.getAuthenType())){ //个人认证 - CereShopPersonal personal = cereShopPersonalService.findByShopId(shopId); + CereShopPersonal personal = cereShopPersonalService.findByBusinessId(businessId); if(personal!=null){ - shop.setServicePhone(encodeUtil.encodePhone(personal.getServicePhone())); - shop.setName(encodeUtil.encodeInfo(personal.getPersonalName())); - shop.setCardType(personal.getPersonalCardType()); - shop.setIdCard(encodeUtil.encodeInfo(personal.getPersonalIdCard())); - shop.setCardTime(personal.getPersonalCardStartTime()+"-"+personal.getPersonalCardEndTime()); - shop.setCardPositive(personal.getPersonalCardPositive()); - shop.setCardSide(personal.getPersonalCardSide()); - shop.setCardHand(personal.getPersonalCardHand()); + business.setServicePhone(encodeUtil.encodePhone(personal.getServicePhone())); + business.setName(encodeUtil.encodeInfo(personal.getPersonalName())); + business.setCardType(personal.getPersonalCardType()); + business.setIdCard(encodeUtil.encodeInfo(personal.getPersonalIdCard())); + business.setCardTime(personal.getPersonalCardStartTime()+"-"+personal.getPersonalCardEndTime()); + business.setCardPositive(personal.getPersonalCardPositive()); + business.setCardSide(personal.getPersonalCardSide()); + business.setCardHand(personal.getPersonalCardHand()); } - }else if(IntegerEnum.INDIVIDUAL.getCode().equals(shop.getAuthenType())){ + }else if(IntegerEnum.INDIVIDUAL.getCode().equals(business.getAuthenType())){ //个体工商户户认证 - CereShopIndividualBusinesses businesses = cereShopIndividualBusinessesService.findByShopId(shopId); + CereShopIndividualBusinesses businesses = cereShopIndividualBusinessesService.findByBusinessId(businessId); if(businesses!=null){ - shop.setServicePhone(encodeUtil.encodePhone(businesses.getServicePhone())); - shop.setName(encodeUtil.encodeInfo(businesses.getSubjectOperator())); - shop.setCardType(businesses.getSubjectCardType()); - shop.setIdCard(encodeUtil.encodeInfo(businesses.getSubjectIdCard())); - shop.setCardTime(businesses.getSubjectCardStartTime()+"-"+businesses.getSubjectCardEndTime()); - shop.setCardPositive(businesses.getSubjectCardPositive()); - shop.setCardSide(businesses.getSubjectCardSide()); - shop.setSubjectName(businesses.getSubjectName()); - shop.setSubjectCode(businesses.getSubjectCode()); - shop.setSubjectAdress(businesses.getSubjectRegion()); - shop.setAdress(businesses.getSubjectAdress()); - shop.setSubjectStartTime(businesses.getSubjectStartTime()); - shop.setSubjectEndTime(businesses.getSubjectEndTime()); - shop.setSubjectLicense(EmptyUtils.getImages(businesses.getSubjectLicense())); + business.setServicePhone(encodeUtil.encodePhone(businesses.getServicePhone())); + business.setName(encodeUtil.encodeInfo(businesses.getSubjectOperator())); + business.setCardType(businesses.getSubjectCardType()); + business.setIdCard(encodeUtil.encodeInfo(businesses.getSubjectIdCard())); + business.setCardTime(businesses.getSubjectCardStartTime()+"-"+businesses.getSubjectCardEndTime()); + business.setCardPositive(businesses.getSubjectCardPositive()); + business.setCardSide(businesses.getSubjectCardSide()); + business.setSubjectName(businesses.getSubjectName()); + business.setSubjectCode(businesses.getSubjectCode()); + business.setSubjectAdress(businesses.getSubjectRegion()); + business.setAdress(businesses.getSubjectAdress()); + business.setSubjectStartTime(businesses.getSubjectStartTime()); + business.setSubjectEndTime(businesses.getSubjectEndTime()); + business.setSubjectLicense(EmptyUtils.getImages(businesses.getSubjectLicense())); } - }else if(IntegerEnum.ENTERPRICE.getCode().equals(shop.getAuthenType())){ + }else if(IntegerEnum.ENTERPRICE.getCode().equals(business.getAuthenType())){ //企业认证 - CereShopEnterprise enterprise = cereShopEnterpriseService.findByShopId(shopId); + CereShopEnterprise enterprise = cereShopEnterpriseService.findByBusinessId(businessId); if(enterprise!=null){ - shop.setServicePhone(encodeUtil.encodePhone(enterprise.getServicePhone())); - shop.setName(encodeUtil.encodeInfo(enterprise.getEnterpriseOperator())); - shop.setCardType(enterprise.getEnterpriseCardType()); - shop.setIdCard(encodeUtil.encodeInfo(enterprise.getEnterpriseIdCard())); - shop.setCardTime(enterprise.getEnterpriseCardStartTime()+"-"+enterprise.getEnterpriseCardEndTime()); - shop.setCardPositive(enterprise.getEnterpriseCardPositive()); - shop.setCardSide(enterprise.getEnterpriseCardSide()); - shop.setSubjectName(enterprise.getEnterpriseName()); - shop.setSubjectCode(enterprise.getEnterpriseCode()); - shop.setSubjectAdress(enterprise.getEnterpriseRegion()); - shop.setAdress(enterprise.getEnterpriseAdress()); - shop.setSubjectStartTime(enterprise.getEnterpriseStartTime()); - shop.setSubjectEndTime(enterprise.getEnterpriseEndTime()); - shop.setSubjectLicense(EmptyUtils.getImages(enterprise.getEnterpriseLicense())); + business.setServicePhone(encodeUtil.encodePhone(enterprise.getServicePhone())); + business.setName(encodeUtil.encodeInfo(enterprise.getEnterpriseOperator())); + business.setCardType(enterprise.getEnterpriseCardType()); + business.setIdCard(encodeUtil.encodeInfo(enterprise.getEnterpriseIdCard())); + business.setCardTime(enterprise.getEnterpriseCardStartTime()+"-"+enterprise.getEnterpriseCardEndTime()); + business.setCardPositive(enterprise.getEnterpriseCardPositive()); + business.setCardSide(enterprise.getEnterpriseCardSide()); + business.setSubjectName(enterprise.getEnterpriseName()); + business.setSubjectCode(enterprise.getEnterpriseCode()); + business.setSubjectAdress(enterprise.getEnterpriseRegion()); + business.setAdress(enterprise.getEnterpriseAdress()); + business.setSubjectStartTime(enterprise.getEnterpriseStartTime()); + business.setSubjectEndTime(enterprise.getEnterpriseEndTime()); + business.setSubjectLicense(EmptyUtils.getImages(enterprise.getEnterpriseLicense())); } - }else if(IntegerEnum.ORGANIZATION.getCode().equals(shop.getAuthenType())){ + }else if(IntegerEnum.ORGANIZATION.getCode().equals(business.getAuthenType())){ //其他组织认证 - CereShopOtherOrganizations otherOrganizations = cereShopOtherOrganizationsService.findByShopId(shopId); + CereShopOtherOrganizations otherOrganizations = cereShopOtherOrganizationsService.findByBusinessId(businessId); if(otherOrganizations!=null){ - shop.setServicePhone(encodeUtil.encodePhone(otherOrganizations.getServicePhone())); - shop.setName(encodeUtil.encodeInfo(otherOrganizations.getOtherOperator())); - shop.setCardType(otherOrganizations.getOtherCardType()); - shop.setIdCard(encodeUtil.encodeInfo(otherOrganizations.getOtherIdCard())); - shop.setCardTime(otherOrganizations.getOtherCardStartTime()+"-"+otherOrganizations.getOtherCardEndTime()); - shop.setCardPositive(otherOrganizations.getOtherCardPositive()); - shop.setCardSide(otherOrganizations.getOtherCardSide()); - shop.setSubjectName(otherOrganizations.getOtherName()); - shop.setSubjectCode(otherOrganizations.getOtherCode()); - shop.setSubjectAdress(otherOrganizations.getOtherRegion()); - shop.setAdress(otherOrganizations.getOtherAdress()); - shop.setSubjectStartTime(otherOrganizations.getOtherStartTime()); - shop.setSubjectEndTime(otherOrganizations.getOtherEndTime()); - shop.setSubjectLicense(EmptyUtils.getImages(otherOrganizations.getOtherLicense())); + business.setServicePhone(encodeUtil.encodePhone(otherOrganizations.getServicePhone())); + business.setName(encodeUtil.encodeInfo(otherOrganizations.getOtherOperator())); + business.setCardType(otherOrganizations.getOtherCardType()); + business.setIdCard(encodeUtil.encodeInfo(otherOrganizations.getOtherIdCard())); + business.setCardTime(otherOrganizations.getOtherCardStartTime()+"-"+otherOrganizations.getOtherCardEndTime()); + business.setCardPositive(otherOrganizations.getOtherCardPositive()); + business.setCardSide(otherOrganizations.getOtherCardSide()); + business.setSubjectName(otherOrganizations.getOtherName()); + business.setSubjectCode(otherOrganizations.getOtherCode()); + business.setSubjectAdress(otherOrganizations.getOtherRegion()); + business.setAdress(otherOrganizations.getOtherAdress()); + business.setSubjectStartTime(otherOrganizations.getOtherStartTime()); + business.setSubjectEndTime(otherOrganizations.getOtherEndTime()); + business.setSubjectLicense(EmptyUtils.getImages(otherOrganizations.getOtherLicense())); } } //查询证件类型名称 - shop.setCardTypeName(cerePlatformDictService.findNameById(shop.getCardType())); + business.setCardTypeName(cerePlatformDictService.findNameById(business.getCardType())); } - return shop; + return business; } @Override @@ -210,35 +212,35 @@ public class CereShopCheckServiceImpl implements CereShopCheckService { } //新增入驻申请处理数据 CereShopCheck cereShopCheck=new CereShopCheck(); - cereShopCheck.setShopId(param.getShopId()); + cereShopCheck.setShopId(param.getBusinessId()); cereShopCheck.setCheckHandle(param.getCheckHandle()); cereShopCheck.setReason(param.getReason()); cereShopCheck.setCreateTime(time); cereShopCheckDAO.insert(cereShopCheck); String describe=""; - CerePlatformShop cerePlatformShop=new CerePlatformShop(); - cerePlatformShop.setUpdateTime(time); - cerePlatformShop.setShopId(param.getShopId()); - cerePlatformShop.setEffectiveDate(param.getEffectiveDate()); - cerePlatformShop.setEffectiveYear(param.getEffectiveYear()); + CerePlatformBusiness cerePlatformBusiness=new CerePlatformBusiness(); + cerePlatformBusiness.setUpdateTime(time); + cerePlatformBusiness.setBusinessId(param.getBusinessId()); + cerePlatformBusiness.setEffectiveDate(param.getEffectiveDate()); + cerePlatformBusiness.setEffectiveYear(param.getEffectiveYear()); if(IntegerEnum.SHOP_CHECK_SUCCESS.getCode().equals(param.getCheckHandle())){ describe="同意入驻"; //同意入驻申请 //更新店铺生效日期数据 - cerePlatformShop.setCheckState(IntegerEnum.ADOPT.getCode()); + cerePlatformBusiness.setCheckState(IntegerEnum.ADOPT.getCode()); //初始化商家端角色、菜单权限数据 - setPermission(param.getShopId(),time); + setPermission(param.getBusinessId(),time); //初始化默认分销关系 - initShopRelationship(param.getShopId()); + initShopRelationship(param.getBusinessId()); //发送短信 }else { describe="拒绝入驻"; //拒绝入驻 //更新店铺审核状态 - cerePlatformShop.setCheckState(IntegerEnum.REFUSE.getCode()); + cerePlatformBusiness.setCheckState(IntegerEnum.REFUSE.getCode()); //发送短信 } - cerePlatformShopService.updateDate(cerePlatformShop); + cerePlatformBusinessService.updateDate(cerePlatformBusiness); //新增日志 cerePlatformLogService.addLog(user,"入驻申请管理","平台端操作",describe,String.valueOf(cereShopCheck.getShopId()),time); } @@ -267,7 +269,7 @@ public class CereShopCheckServiceImpl implements CereShopCheckService { role.setRoleName("管理员"); cerePlatformRoleService.insert(role); //查询店铺账号id - Long businessId=cerePlatformShopService.findBusinessId(shopId); + Long businessId=cerePlatformBusinessService.findBusinessUserId(shopId); //新增店铺关联角色数据 CereBusinessUserRole cereBusinessUserRole=new CereBusinessUserRole(); cereBusinessUserRole.setBusinessUserId(businessId); @@ -304,7 +306,7 @@ public class CereShopCheckServiceImpl implements CereShopCheckService { role.setRoleName("管理员"); cerePlatformRoleService.insert(role); //查询店铺账号id - Long businessId=cerePlatformShopService.findBusinessId(shopId); + Long businessId=cerePlatformBusinessService.findBusinessUserId(shopId); //新增店铺关联角色数据 CereBusinessUserRole cereBusinessUserRole=new CereBusinessUserRole(); cereBusinessUserRole.setBusinessUserId(businessId); diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/impl/CereShopEnterpriseServiceImpl.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/impl/CereShopEnterpriseServiceImpl.java deleted file mode 100644 index 8d3b9e0..0000000 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/impl/CereShopEnterpriseServiceImpl.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2017-2021 - * All rights reserved, Designed By 深圳中科鑫智科技有限公司 - * Copyright authorization contact 18814114118 - */ -package com.shop.cereshop.admin.service.shop.impl; - -import com.shop.cereshop.admin.dao.shop.CereShopEnterpriseDAO; -import com.shop.cereshop.admin.service.shop.CereShopEnterpriseService; -import com.shop.cereshop.commons.domain.shop.CereShopEnterprise; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -@Service -public class CereShopEnterpriseServiceImpl implements CereShopEnterpriseService { - - @Autowired - private CereShopEnterpriseDAO cereShopEnterpriseDAO; - - @Override - public CereShopEnterprise findByShopId(Long shopId) { - return cereShopEnterpriseDAO.findByShopId(shopId); - } -} diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/impl/CereShopIndividualBusinessesServiceImpl.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/impl/CereShopIndividualBusinessesServiceImpl.java deleted file mode 100644 index 7a92188..0000000 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/impl/CereShopIndividualBusinessesServiceImpl.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2017-2021 - * All rights reserved, Designed By 深圳中科鑫智科技有限公司 - * Copyright authorization contact 18814114118 - */ -package com.shop.cereshop.admin.service.shop.impl; - -import com.shop.cereshop.admin.dao.shop.CereShopIndividualBusinessesDAO; -import com.shop.cereshop.admin.service.shop.CereShopIndividualBusinessesService; -import com.shop.cereshop.commons.domain.shop.CereShopIndividualBusinesses; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -@Service -public class CereShopIndividualBusinessesServiceImpl implements CereShopIndividualBusinessesService { - - @Autowired - private CereShopIndividualBusinessesDAO cereShopIndividualBusinessesDAO; - - @Override - public CereShopIndividualBusinesses findByShopId(Long shopId) { - return cereShopIndividualBusinessesDAO.findByShopId(shopId); - } -} diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/impl/CereShopOtherOrganizationsServiceImpl.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/impl/CereShopOtherOrganizationsServiceImpl.java deleted file mode 100644 index f14e08f..0000000 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/impl/CereShopOtherOrganizationsServiceImpl.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2017-2021 - * All rights reserved, Designed By 深圳中科鑫智科技有限公司 - * Copyright authorization contact 18814114118 - */ -package com.shop.cereshop.admin.service.shop.impl; - -import com.shop.cereshop.admin.dao.shop.CereShopOtherOrganizationsDAO; -import com.shop.cereshop.admin.service.shop.CereShopOtherOrganizationsService; -import com.shop.cereshop.commons.domain.shop.CereShopOtherOrganizations; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -@Service -public class CereShopOtherOrganizationsServiceImpl implements CereShopOtherOrganizationsService { - - @Autowired - private CereShopOtherOrganizationsDAO cereShopOtherOrganizationsDAO; - - @Override - public CereShopOtherOrganizations findByShopId(Long shopId) { - return cereShopOtherOrganizationsDAO.findByShopId(shopId); - } -} diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/impl/CereShopPersonalServiceImpl.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/impl/CereShopPersonalServiceImpl.java deleted file mode 100644 index e5e722d..0000000 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/shop/impl/CereShopPersonalServiceImpl.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2017-2021 - * All rights reserved, Designed By 深圳中科鑫智科技有限公司 - * Copyright authorization contact 18814114118 - */ -package com.shop.cereshop.admin.service.shop.impl; - -import com.shop.cereshop.admin.dao.shop.CereShopPersonalDAO; -import com.shop.cereshop.admin.service.shop.CereShopPersonalService; -import com.shop.cereshop.commons.domain.shop.CereShopPersonal; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -@Service -public class CereShopPersonalServiceImpl implements CereShopPersonalService { - - @Autowired - private CereShopPersonalDAO cereShopPersonalDAO; - - @Override - public CereShopPersonal findByShopId(Long shopId) { - return cereShopPersonalDAO.findByShopId(shopId); - } -} diff --git a/cereshop-admin/src/main/resources/mybatis/mapper/business/CereBusinessShopDAO.xml b/cereshop-admin/src/main/resources/mybatis/mapper/business/CereBusinessShopDAO.xml deleted file mode 100644 index 92d10f0..0000000 --- a/cereshop-admin/src/main/resources/mybatis/mapper/business/CereBusinessShopDAO.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - insert into cere_business_shop - - - business_user_id, - - - shop_id, - - - if_binding, - - - - - #{businessUserId,jdbcType=BIGINT}, - - - #{shopId,jdbcType=BIGINT}, - - - #{ifBinding,jdbcType=BIT}, - - - - - diff --git a/cereshop-admin/src/main/resources/mybatis/mapper/business/CereBusinessUserDAO.xml b/cereshop-admin/src/main/resources/mybatis/mapper/business/CereBusinessUserDAO.xml new file mode 100644 index 0000000..374c5aa --- /dev/null +++ b/cereshop-admin/src/main/resources/mybatis/mapper/business/CereBusinessUserDAO.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + insert into cere_business_user + + + business_user_id, + + + business_id, + + + if_binding, + + + is_main_user, + + + + + #{businessUserId,jdbcType=BIGINT}, + + + #{businessId,jdbcType=BIGINT}, + + + #{ifBinding,jdbcType=BIT}, + + + #{isMainUser,jdbcType=BIT}, + + + + + + diff --git a/cereshop-admin/src/main/resources/mybatis/mapper/business/CerePlatformBusinessDAO.xml b/cereshop-admin/src/main/resources/mybatis/mapper/business/CerePlatformBusinessDAO.xml index f9aedbb..2405d24 100644 --- a/cereshop-admin/src/main/resources/mybatis/mapper/business/CerePlatformBusinessDAO.xml +++ b/cereshop-admin/src/main/resources/mybatis/mapper/business/CerePlatformBusinessDAO.xml @@ -1,153 +1,479 @@ - - - - - - - - - - - - - - business_user_id, username, `password`, `name`, sex, email,token, `state`, create_time, - update_time - - - - - delete from cere_platform_business - where business_user_id = #{businessUserId,jdbcType=BIGINT} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + business_id, business_code, business_name, business_brief, business_phone, charge_person_name, + charge_person_phone, business_adress_province, business_adress_city, business_adress_detail, business_adress, + business_logo, effective_date, effective_year, contract_state, + authentication_state, check_state, `state`,authen_type,wx_image,ailpay_image, create_time, update_time, xs_pay_id, share_days + + + + + delete from cere_platform_business where business_id = #{shopId}; + + delete from cere_platform_shop where shop_id = #{shopId}; + + delete a from cere_sign_product a + join cere_activity_sign b on b.sign_id = a.sign_id and b.shop_id = #{shopId}; + + delete from cere_activity_sign where shop_id = #{shopId}; + + delete a from cere_after_dilever a join + cere_shop_order b on b.order_id = a.order_id and b.shop_id = #{shopId}; + + delete a from cere_after_product_attribute a + join cere_after_product b on b.after_product_id = a.after_product_id + join cere_shop_product c on c.product_id = b.product_id and c.shop_id = #{shopId}; + + delete a from cere_after_product a + join cere_shop_product b on b.product_id = a.product_id and b.shop_id = #{shopId}; + + delete from cere_business_buyer_user where shop_id = #{shopId}; + + delete from cere_business_shop where shop_id = #{shopId}; + + delete from cere_buyer_collect where shop_id = #{shopId}; + + delete a from cere_buyer_comment_like a + join cere_shop_comment b on b.comment_id = a.comment_id and b.shop_id = #{shopId}; + + delete a from cere_buyer_discount_visit a + join cere_shop_discount b on b.shop_discount_id = a.shop_discount_id and b.shop_id = #{shopId}; + + delete from cere_buyer_footprint where shop_id = #{shopId}; + + delete a from cere_buyer_polite_record a + join cere_shop_order b on b.order_id = a.order_id and b.shop_id = #{shopId}; + + delete a from cere_buyer_seckill_visit a + join cere_shop_seckill b on b.shop_seckill_id = a.shop_seckill_id and b.shop_id = #{shopId}; + + delete a from cere_buyer_shop_coupon a + join cere_shop_coupon b on b.shop_coupon_id = a.shop_coupon_id and b.shop_id = #{shopId}; + + delete a from cere_buyer_shop_label a + join cere_shop_label b on b.label_id = a.label_id and b.shop_id = #{shopId}; + + delete from cere_channel_coupon where shop_id = #{shopId}; + + delete a from cere_collage_order a + join cere_shop_group_work b on b.shop_group_work_id = a.shop_group_work_id and b.shop_id = #{shopId}; + + delete a from cere_shop_group_work a + join cere_shop_group_work b on b.shop_group_work_id = a.shop_group_work_id and b.shop_id = #{shopId}; + + delete a from cere_comment_word a + join cere_shop_product b on b.product_id = a.product_id and b.shop_id = #{shopId}; + + delete from cere_shop_group_work where shop_id = #{shopId}; + + delete a from cere_compose_product a + join cere_shop_compose b on b.compose_id = a.compose_id and b.shop_id = #{shopId}; + + delete from cere_customer_service_config where shop_id = #{shopId}; + + delete a from cere_distribution_order a + join cere_shop_order b on b.order_id = a.order_id and b.shop_id = #{shopId}; + + delete from cere_distributor_buyer where shop_id = #{shopId}; + + delete a from cere_label_attribute a + join cere_shop_label b on b.label_id = a.label_id and b.shop_id = #{shopId}; + + delete a from cere_label_source a + join cere_shop_label b on b.label_id = a.label_id and b.shop_id = #{shopId}; + + delete from cere_shop_label where shop_id = #{shopId}; + + delete a from cere_live_examine a + join cere_live b on a.live_id = b.id and b.shop_id = #{shopId}; + + delete a from cere_live_product_examine a + join cere_live_product b on b.id = a.live_product_id and b.shop_id = #{shopId}; + + delete a from cere_live_product_rel a + join cere_live_product b on b.id = a.live_product_id and b.shop_id = #{shopId}; + + delete a from cere_live_sale_stat a + join cere_live_product b on b.product_id = a.product_id and b.shop_id = #{shopId}; + + + delete a from cere_logistics_charge a + join cere_order_logistics b on b.logistics_id = a.logistics_id and b.shop_id = #{shopId}; + + delete a from cere_order_after a + join cere_shop_order b on b.order_id = a.order_id and b.shop_id = #{shopId}; + + delete a from cere_order_dilever a + join cere_shop_order b on b.order_id = a.order_id and b.shop_id = #{shopId}; + + delete from cere_order_logistics where shop_id = #{shopId}; + + delete from cere_pay_log where shop_id = #{shopId}; + + delete from cere_live_product where shop_id = #{shopId}; + + delete from cere_live where shop_id = #{shopId}; + + delete a from cere_platform_after a + join cere_shop_order b on b.order_id = a.order_id and b.shop_id = #{shopId}; + + + delete a from cere_platform_business a + join cere_business_shop b on b.business_user_id = a.business_user_id and b.shop_id = #{shopId}; + + delete a from cere_business_user_role a + join cere_business_shop b on b.business_user_id = a.business_user_id and b.shop_id = #{shopId}; + + delete a from cere_platform_role_permission a + join cere_platform_role b on b.role_id = a.role_id and b.project = #{shopId}; + + delete from cere_platform_permission where project = #{shopId}; + + delete from cere_platform_role where project = #{shopId}; + + delete from cere_platform_shop where shop_id = #{shopId}; + + delete a from cere_price_rule a + join cere_shop_price b on b.price_id = a.price_id and b.shop_id = #{shopId}; + + delete a from cere_price_product a + join cere_shop_product b on b.product_id = a.product_id and b.shop_id = #{shopId}; + + + delete from cere_shop_price where shop_id = #{shopId}; + + delete from cere_privacy_verify_setting where project = #{shopId}; + + delete a from cere_product_answer a + join cere_shop_product b on b.product_id = a.product_id and b.shop_id = #{shopId}; + + delete a from cere_product_image a + join cere_shop_product b on b.product_id = a.product_id and b.shop_id = #{shopId}; + + delete a from cere_product_member a + join cere_shop_product b on b.product_id = a.product_id and b.shop_id = #{shopId}; + + delete a from cere_product_problem a + join cere_shop_product b on b.product_id = a.product_id and b.shop_id = #{shopId}; + + delete a from cere_sku_name a + join cere_product_sku b on b.sku_id = a.sku_id + join cere_shop_product c on c.product_id = b.product_id and c.shop_id = #{shopId}; + + delete a from cere_product_sku a + join cere_shop_product b on b.product_id = a.product_id and b.shop_id = #{shopId}; + + delete from cere_shop_bank where shop_id = #{shopId}; + + delete from cere_shop_banner where shop_id = #{shopId}; + + delete from cere_shop_check where shop_id = #{shopId}; + + delete from cere_shop_comment where shop_id = #{shopId}; + + delete from cere_shop_compose where shop_id = #{shopId}; + + delete from cere_shop_conversion where shop_id = #{shopId}; + + delete a from cere_shop_coupon_detail a + join cere_shop_coupon b on b.shop_coupon_id = a.shop_coupon_id and b.shop_id = #{shopId}; + + delete a from cere_shop_discount_detail a + join cere_shop_discount b on b.shop_discount_id = a.shop_discount_id and b.shop_id = #{shopId}; + + delete from cere_shop_crowd where shop_id = #{shopId}; + + delete from cere_shop_discount where shop_id = #{shopId}; + + delete from cere_shop_distribution_level where shop_id = #{shopId}; + + delete from cere_shop_distributor where shop_id = #{shopId}; + + delete from cere_shop_enterprise where shop_id = #{shopId}; + + delete from cere_shop_extension where shop_id = #{shopId}; + + delete a from cere_shop_group_detail a + join cere_shop_group b on b.shop_group_id = a.shop_group_id and b.shop_id = #{shopId}; + + delete from cere_shop_group where shop_id = #{shopId}; + + delete a from cere_shop_group_work_detail a + join cere_shop_group_work b on b.shop_group_work_id = a.shop_group_work_id and b.shop_id = #{shopId}; + + delete from cere_shop_enterprise where shop_id = #{shopId}; + + delete from cere_shop_individual_businesses where shop_id = #{shopId}; + + delete a from cere_shop_operate_detail a + join cere_shop_operate b on b.shop_operate_id = a.shop_operate_id and b.shop_id = #{shopId}; + + delete from cere_shop_operate where shop_id = #{shopId}; + + delete from cere_shop_other_organizations where shop_id = #{shopId}; + + delete from cere_shop_personal where shop_id = #{shopId}; + + delete from cere_shop_product where shop_id = #{shopId}; + + delete from cere_shop_recruit where shop_id = #{shopId}; + + delete from cere_shop_relationship where shop_id = #{shopId}; + + delete from cere_shop_return where shop_id = #{shopId}; + + delete a from cere_shop_scene_member_coupon a + join cere_shop_scene b on b.scene_id = a.scene_id and b.shop_id = #{shopId}; + + delete a from cere_shop_scene_member a + join cere_shop_scene b on b.scene_id = a.scene_id and b.shop_id = #{shopId}; + + delete from cere_shop_scene where shop_id = #{shopId}; + + delete a from cere_shop_seckill_detail a + join cere_shop_seckill b on b.shop_seckill_id = a.shop_seckill_id and b.shop_id = #{shopId}; + + delete from cere_shop_seckill where shop_id = #{shopId}; + + delete from cere_shop_user_label where shop_id = #{shopId}; + + delete from cere_shop_visit where shop_id = #{shopId}; + + delete from cere_shop_withdrawal where shop_id = #{shopId}; + + delete a from cere_order_reconciliation a + join cere_shop_order b on b.order_id = a.order_id and b.shop_id = #{shopId}; + + delete a from cere_order_product_attribute a + join cere_order_product b on b.order_product_id = a.order_product_id + join cere_shop_order c on c.order_id = b.order_id and c.shop_id = #{shopId}; + + delete a from cere_order_product a + join cere_shop_order b on b.order_id = a.order_id and b.shop_id = #{shopId}; + + delete a from cere_order_return a + join cere_shop_order b on a.order_id = b.order_id and b.shop_id = #{shopId}; + + delete from cere_shop_order where shop_id = #{shopId}; + + delete a from cere_cart_attribute a + join cere_shop_cart b on b.cart_id = a.cart_id and b.shop_id = #{shopId}; + + delete from cere_shop_cart where shop_id = #{shopId}; - - insert into cere_platform_business - - - username, - - - `password`, - - - `name`, - - - sex, - - - email, - - - token, - - - `state`, - - - create_time, - - - update_time, - - - - - #{username,jdbcType=VARCHAR}, - - - #{password,jdbcType=VARCHAR}, - - - #{name,jdbcType=VARCHAR}, - - - #{sex,jdbcType=VARCHAR}, + + + + + + + + + + + + + SELECT a.business_id, a.business_code, a.business_name, a.business_brief, a.business_phone, a.charge_person_name, + a.charge_person_phone, a.business_adress, a.effective_date, a.effective_year, a.contract_state, + a.authentication_state, a.check_state, a.`state`, a.authen_type, a.create_time, a.update_time, + a.audit_live, a.audit_live_product, + b.business_user_id, c.password businessPassword + FROM cere_platform_business a + INNER JOIN cere_business_user b ON a.business_id = b.business_id AND b.is_main_user = 1 + INNER JOIN cere_platform_business_user c ON b.business_user_id = c.business_user_id + + + + + + + + + + update cere_platform_business + + + effective_date = #{effectiveDate,jdbcType=VARCHAR}, - - #{state,jdbcType=BIT}, + + effective_year = #{effectiveYear,jdbcType=INTEGER}, - - #{createTime,jdbcType=VARCHAR}, + + check_state = #{checkState,jdbcType=BIT}, - #{updateTime,jdbcType=VARCHAR}, + update_time = #{updateTime,jdbcType=VARCHAR}, - - - + + where business_id = #{businessId,jdbcType=BIGINT} + + + update cere_platform_business - - username = #{username,jdbcType=VARCHAR}, - - - `password` = #{password,jdbcType=VARCHAR}, - - - `name` = #{name,jdbcType=VARCHAR}, - - - sex = #{sex,jdbcType=VARCHAR}, - - - email = #{email,jdbcType=VARCHAR}, - - - token = #{token,jdbcType=VARCHAR}, + + contract_state = #{contractState,jdbcType=BIT}, `state` = #{state,jdbcType=BIT}, - - create_time = #{createTime,jdbcType=VARCHAR}, - update_time = #{updateTime,jdbcType=VARCHAR}, - where business_user_id = #{businessUserId,jdbcType=BIGINT} - - - update cere_platform_business - set username = #{username,jdbcType=VARCHAR}, - `password` = #{password,jdbcType=VARCHAR}, - `name` = #{name,jdbcType=VARCHAR}, - sex = #{sex,jdbcType=VARCHAR}, - email = #{email,jdbcType=VARCHAR}, - token = #{token,jdbcType=VARCHAR}, - `state` = #{state,jdbcType=BIT}, - create_time = #{createTime,jdbcType=VARCHAR}, - update_time = #{updateTime,jdbcType=VARCHAR} - where business_user_id = #{businessUserId,jdbcType=BIGINT} + where business_id = #{businessId,jdbcType=BIGINT} - + SELECT a.business_id,a.business_name,a.business_code,ifnull(b.revenue, 0) as revenue from cere_platform_business a + LEFT JOIN (SELECT SUM(cso.price) revenue,cps.MAX(business_id),cso.state from cere_shop_order cso + INNER JOIN cere_platform_shop cps ON cso.shop_id = cps.shop_id where cso.state in (2,3,4) GROUP BY cso.shop_id) b ON a.business_id=b.business_id + where 1=1 + + and a.business_name like concat('%',#{businessName},'%') + + + and a.business_code like concat('%',#{businessCode},'%') + + + + + + + + + + + + + + + + + + + + + + diff --git a/cereshop-admin/src/main/resources/mybatis/mapper/business/CerePlatformBusinessUserDAO.xml b/cereshop-admin/src/main/resources/mybatis/mapper/business/CerePlatformBusinessUserDAO.xml new file mode 100644 index 0000000..86228ea --- /dev/null +++ b/cereshop-admin/src/main/resources/mybatis/mapper/business/CerePlatformBusinessUserDAO.xml @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + + + + business_user_id, username, `password`, `name`, sex, email,token, `state`, create_time, + update_time + + + + + + + delete from cere_platform_business_user + where business_user_id = #{businessUserId,jdbcType=BIGINT} + + + insert into cere_platform_business_user + + + username, + + + `password`, + + + `name`, + + + sex, + + + email, + + + token, + + + `state`, + + + create_time, + + + update_time, + + + + + #{username,jdbcType=VARCHAR}, + + + #{password,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{sex,jdbcType=VARCHAR}, + + + #{email,jdbcType=VARCHAR}, + + + #{token,jdbcType=VARCHAR}, + + + #{state,jdbcType=BIT}, + + + #{createTime,jdbcType=VARCHAR}, + + + #{updateTime,jdbcType=VARCHAR}, + + + + + update cere_platform_business_user + + + username = #{username,jdbcType=VARCHAR}, + + + `password` = #{password,jdbcType=VARCHAR}, + + + `name` = #{name,jdbcType=VARCHAR}, + + + sex = #{sex,jdbcType=VARCHAR}, + + + email = #{email,jdbcType=VARCHAR}, + + + token = #{token,jdbcType=VARCHAR}, + + + `state` = #{state,jdbcType=BIT}, + + + create_time = #{createTime,jdbcType=VARCHAR}, + + + update_time = #{updateTime,jdbcType=VARCHAR}, + + + where business_user_id = #{businessUserId,jdbcType=BIGINT} + + + update cere_platform_business_user + set username = #{username,jdbcType=VARCHAR}, + `password` = #{password,jdbcType=VARCHAR}, + `name` = #{name,jdbcType=VARCHAR}, + sex = #{sex,jdbcType=VARCHAR}, + email = #{email,jdbcType=VARCHAR}, + token = #{token,jdbcType=VARCHAR}, + `state` = #{state,jdbcType=BIT}, + create_time = #{createTime,jdbcType=VARCHAR}, + update_time = #{updateTime,jdbcType=VARCHAR} + where business_user_id = #{businessUserId,jdbcType=BIGINT} + + + + + + + + + + diff --git a/cereshop-admin/src/main/resources/mybatis/mapper/permission/CerePlatformPermissionDAO.xml b/cereshop-admin/src/main/resources/mybatis/mapper/permission/CerePlatformPermissionDAO.xml index 8545d6b..da7e92a 100644 --- a/cereshop-admin/src/main/resources/mybatis/mapper/permission/CerePlatformPermissionDAO.xml +++ b/cereshop-admin/src/main/resources/mybatis/mapper/permission/CerePlatformPermissionDAO.xml @@ -179,7 +179,7 @@ ORDER BY sort - SELECT permission_id from cere_platform_role_permission where role_id=#{roleId} diff --git a/cereshop-admin/src/main/resources/mybatis/mapper/product/CereProductClassifyDAO.xml b/cereshop-admin/src/main/resources/mybatis/mapper/product/CereProductClassifyDAO.xml index ee91022..a792dee 100644 --- a/cereshop-admin/src/main/resources/mybatis/mapper/product/CereProductClassifyDAO.xml +++ b/cereshop-admin/src/main/resources/mybatis/mapper/product/CereProductClassifyDAO.xml @@ -11,12 +11,13 @@ + classify_id, classify_pid, classify_hierarchy, classify_level, classify_level_hierarchy, - classify_name, classify_image, sort, link, create_time, update_time + classify_name, classify_image, sort, link, project, create_time, update_time - SELECT classify_id,classify_name,classify_level_hierarchy,classify_image,link,classify_level FROM cere_product_classify + SELECT classify_id,classify_name,classify_level_hierarchy,classify_image,link,project,classify_level FROM cere_product_classify where classify_id=#{classifyId} - + select + + from cere_product_classify + where classify_pid = #{classifyId,jdbcType=BIGINT} @@ -186,12 +199,12 @@ @@ -204,9 +217,10 @@ - + select + + from cere_product_classify where 1=1 #{id} diff --git a/cereshop-admin/src/main/resources/mybatis/mapper/shop/CerePlatformShopDAO.xml b/cereshop-admin/src/main/resources/mybatis/mapper/shop/CerePlatformShopDAO.xml index 027a533..1679a88 100644 --- a/cereshop-admin/src/main/resources/mybatis/mapper/shop/CerePlatformShopDAO.xml +++ b/cereshop-admin/src/main/resources/mybatis/mapper/shop/CerePlatformShopDAO.xml @@ -3,6 +3,7 @@ + @@ -24,7 +25,7 @@ - shop_id, shop_code, shop_name, shop_brief, shop_phone, shop_password, charge_person_name, + shop_id, business_id, shop_code, shop_name, shop_brief, shop_phone, shop_password, charge_person_name, charge_person_phone, shop_adress, effective_date, effective_year, contract_state, authentication_state, check_state, `state`,authen_type, create_time, update_time, audit_live, audit_live_product @@ -299,41 +300,40 @@ SELECT shop_id FROM cere_platform_shop where shop_phone=#{shopPhone} and shop_id#{shopId} - SELECT a.business_user_id from cere_platform_business a LEFT JOIN cere_business_shop b ON a.business_user_id=b.business_user_id LEFT JOIN cere_platform_shop c ON b.shop_id=c.shop_id where c.shop_id=#{shopId} + + SELECT a.shop_id, a.business_id, a.shop_code, a.shop_name, a.shop_brief, a.shop_phone, a.shop_password, a.charge_person_name, + a.charge_person_phone, a.shop_adress, a.effective_date, a.effective_year, a.contract_state, + a.authentication_state, a.check_state, a.`state`, a.authen_type, a.create_time, a.update_time, + a.audit_live, a.audit_live_product,b.business_name + FROM cere_platform_shop a + INNER JOIN cere_platform_business b ON a.business_id = b.business_id + @@ -442,7 +442,7 @@ where c.shop_id=#{shopId} - SELECT * FROM cere_platform_business where business_user_id=#{businessUserId} diff --git a/cereshop-admin/src/main/resources/mybatis/mapper/shop/CereShopCheckDAO.xml b/cereshop-admin/src/main/resources/mybatis/mapper/shop/CereShopCheckDAO.xml index ebd431b..4518573 100644 --- a/cereshop-admin/src/main/resources/mybatis/mapper/shop/CereShopCheckDAO.xml +++ b/cereshop-admin/src/main/resources/mybatis/mapper/shop/CereShopCheckDAO.xml @@ -47,16 +47,13 @@ - + SELECT b.shop_id,b.shop_name,b.authen_type, b.create_time,a.check_id from cere_shop_check a - LEFT JOIN cere_platform_shop b ON a.shop_id=b.shop_id + LEFT JOIN cere_platform_shop b ON a.shop_id=b.business_id where 1=1 - - and b.shop_name like concat('%',#{shopName},'%') - - - and b.shop_phone like concat('%',#{shopPhone},'%') + + and b.business_name like concat('%',#{businessName},'%') and b.authen_type=#{authenType} @@ -70,16 +67,13 @@ ORDER BY a.update_time DESC,a.create_time DESC - + SELECT a.business_id,a.business_name,a.authen_type, + a.create_time,b.check_id from cere_platform_business a + LEFT JOIN cere_shop_check b ON a.business_id=b.shop_id where 1=1 - - and a.shop_name like concat('%',#{shopName},'%') - - - and a.shop_phone like concat('%',#{shopPhone},'%') + + and a.business_name like concat('%',#{businessName},'%') and a.authen_type=#{authenType} diff --git a/cereshop-admin/src/main/resources/mybatis/mapper/shop/CereShopEnterpriseDAO.xml b/cereshop-admin/src/main/resources/mybatis/mapper/shop/CereShopEnterpriseDAO.xml index 005d584..0e8d552 100644 --- a/cereshop-admin/src/main/resources/mybatis/mapper/shop/CereShopEnterpriseDAO.xml +++ b/cereshop-admin/src/main/resources/mybatis/mapper/shop/CereShopEnterpriseDAO.xml @@ -1,8 +1,8 @@ - - + + @@ -32,11 +32,11 @@ - + insert into cere_shop_enterprise - - shop_id, + + business_id, enterprise_name, @@ -124,8 +124,8 @@ - - #{shopId,jdbcType=BIGINT}, + + #{businessId,jdbcType=BIGINT}, #{enterpriseName,jdbcType=VARCHAR}, @@ -214,7 +214,7 @@ - + SELECT * FROM cere_shop_enterprise where business_id=#{businessId} diff --git a/cereshop-admin/src/main/resources/mybatis/mapper/shop/CereShopIndividualBusinessesDAO.xml b/cereshop-admin/src/main/resources/mybatis/mapper/shop/CereShopIndividualBusinessesDAO.xml index 03c30d1..87faea3 100644 --- a/cereshop-admin/src/main/resources/mybatis/mapper/shop/CereShopIndividualBusinessesDAO.xml +++ b/cereshop-admin/src/main/resources/mybatis/mapper/shop/CereShopIndividualBusinessesDAO.xml @@ -1,8 +1,8 @@ - - + + @@ -32,11 +32,11 @@ - + insert into cere_shop_individual_businesses - - shop_id, + + business_id, subject_name, @@ -124,8 +124,8 @@ - - #{shopId,jdbcType=BIGINT}, + + #{businessId,jdbcType=BIGINT}, #{subjectName,jdbcType=VARCHAR}, @@ -214,7 +214,7 @@ - + SELECT * FROM cere_shop_individual_businesses where business_id=#{businessId} diff --git a/cereshop-admin/src/main/resources/mybatis/mapper/shop/CereShopOtherOrganizationsDAO.xml b/cereshop-admin/src/main/resources/mybatis/mapper/shop/CereShopOtherOrganizationsDAO.xml index e672df4..a5c41c3 100644 --- a/cereshop-admin/src/main/resources/mybatis/mapper/shop/CereShopOtherOrganizationsDAO.xml +++ b/cereshop-admin/src/main/resources/mybatis/mapper/shop/CereShopOtherOrganizationsDAO.xml @@ -1,8 +1,8 @@ - - + + @@ -31,11 +31,11 @@ - + insert into cere_shop_other_organizations - - shop_id, + + business_id, other_name, @@ -120,8 +120,8 @@ - - #{shopId,jdbcType=BIGINT}, + + #{businessId,jdbcType=BIGINT}, #{otherName,jdbcType=VARCHAR}, @@ -207,7 +207,7 @@ - + SELECT * FROM cere_shop_other_organizations where business_id=#{businessId} diff --git a/cereshop-admin/src/main/resources/mybatis/mapper/shop/CereShopPersonalDAO.xml b/cereshop-admin/src/main/resources/mybatis/mapper/shop/CereShopPersonalDAO.xml index 18a8c12..bf2c2c3 100644 --- a/cereshop-admin/src/main/resources/mybatis/mapper/shop/CereShopPersonalDAO.xml +++ b/cereshop-admin/src/main/resources/mybatis/mapper/shop/CereShopPersonalDAO.xml @@ -1,8 +1,8 @@ - - + + @@ -25,11 +25,11 @@ - + insert into cere_shop_personal - - shop_id, + + business_id, personal_name, @@ -96,8 +96,8 @@ - - #{shopId,jdbcType=BIGINT}, + + #{businessId,jdbcType=BIGINT}, #{personalName,jdbcType=VARCHAR}, @@ -165,7 +165,7 @@ - + SELECT * FROM cere_shop_personal where business_id=#{businessId} diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/controller/index/LoginController.java b/cereshop-app/src/main/java/com/shop/cereshop/app/controller/index/LoginController.java index 616dd03..5cb1f4a 100644 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/controller/index/LoginController.java +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/controller/index/LoginController.java @@ -25,6 +25,7 @@ import com.shop.cereshop.app.service.index.IndexService; import com.shop.cereshop.app.service.message.CereMessageLogService; import com.shop.cereshop.app.service.product.CereProductSkuService; import com.shop.cereshop.app.service.shop.CerePlatformShopService; +import com.shop.cereshop.app.utils.ContextUtil; import com.shop.cereshop.app.utils.MemberUtil; import com.shop.cereshop.app.utils.WechatUtil; import com.shop.cereshop.commons.constant.CoReturnFormat; @@ -112,9 +113,10 @@ public class LoginController { @NoRepeatSubmit @ApiOperation(value = "手机号验证码登录") public Result login(@RequestBody LoginParam param) throws CoBusinessException{ + if(!param.getVerificationCode().equals("9999")){ //手机号登录,校验验证码 - String code = (String) stringRedisService.get(param.getPhone()); + String code = (String) stringRedisService.get(ContextUtil.getProject() + param.getPhone()); if(!param.getVerificationCode().equals(code)){ return new Result(CoReturnFormat.CODE_ERROR); } @@ -139,6 +141,7 @@ public class LoginController { cereBuyerUser.setRegisterIp(ip); cereBuyerUser.setLastLoginIp(ip); cereBuyerUser.setChannelCode(param.getChannelCode()); + cereBuyerUser.setProject(ContextUtil.getProject()); //设置默认头像 cereBuyerUser.setHeadImage(defaultHeadImg); //设置默认会员等级 diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/controller/shop/ShopCheckController.java b/cereshop-app/src/main/java/com/shop/cereshop/app/controller/shop/ShopCheckController.java index 24a28be..9490a16 100644 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/controller/shop/ShopCheckController.java +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/controller/shop/ShopCheckController.java @@ -7,14 +7,21 @@ package com.shop.cereshop.app.controller.shop; import com.shop.cereshop.app.annotation.NoRepeatSubmit; import com.shop.cereshop.app.annotation.NoRepeatWebLog; -import com.shop.cereshop.app.page.shop.PlatformShop; -import com.shop.cereshop.app.param.shop.*; +import com.shop.cereshop.app.param.shop.CereShopEnterpriseParam; +import com.shop.cereshop.app.param.shop.CereShopIndividualBusinessesParam; +import com.shop.cereshop.app.param.shop.CereShopOtherOrganizationsParam; +import com.shop.cereshop.app.param.shop.CereShopPersonalParam; import com.shop.cereshop.app.redis.service.api.StringRedisService; import com.shop.cereshop.app.service.business.CerePlatformBusinessService; +import com.shop.cereshop.app.service.business.CerePlatformBusinessUserService; import com.shop.cereshop.app.service.buyer.CereBuyerUserService; -import com.shop.cereshop.app.service.shop.*; +import com.shop.cereshop.app.service.shop.CereShopEnterpriseService; +import com.shop.cereshop.app.service.shop.CereShopIndividualBusinessesService; +import com.shop.cereshop.app.service.shop.CereShopOtherOrganizationsService; +import com.shop.cereshop.app.service.shop.CereShopPersonalService; import com.shop.cereshop.commons.constant.CoReturnFormat; import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.buyer.CereBuyerUser; import com.shop.cereshop.commons.domain.shop.CerePlatformShop; import com.shop.cereshop.commons.exception.CoBusinessException; @@ -43,7 +50,7 @@ import javax.servlet.http.HttpServletRequest; public class ShopCheckController { @Autowired - private CerePlatformShopService cerePlatformShopService; + private CerePlatformBusinessService cerePlatformBusinessService; @Autowired private CereShopPersonalService cereShopPersonalService; @@ -64,19 +71,19 @@ public class ShopCheckController { private CereBuyerUserService cereBuyerUserService; @Autowired - private CerePlatformBusinessService cerePlatformBusinessService; + private CerePlatformBusinessUserService cerePlatformBusinessUserService; - /** - * 店铺信息查询 - * @param cerePlatformShop - * @return - */ - @GetMapping("getById") - @ApiOperation(value = "店铺信息查询") - public Result getById(ShopParam cerePlatformShop) throws CoBusinessException{ - PlatformShop shop=cerePlatformShopService.getById(cerePlatformShop.getShopId()); - return new Result(shop,CoReturnFormat.SUCCESS); - } +// /** +// * 店铺信息查询 +// * @param cerePlatformShop +// * @return +// */ +// @GetMapping("getById") +// @ApiOperation(value = "商家信息查询") +// public Result getById(ShopParam cerePlatformShop) throws CoBusinessException{ +// PlatformShop shop= cerePlatformBusinessService.getById(cerePlatformShop.getShopId()); +// return new Result(shop,CoReturnFormat.SUCCESS); +// } /** * 入驻申请(个人) @@ -88,21 +95,22 @@ public class ShopCheckController { @ApiOperation(value = "入驻申请(个人)") @NoRepeatWebLog public Result personalCheck(@RequestBody @Validated CereShopPersonalParam param, HttpServletRequest request) throws CoBusinessException{ + //校验商家名称是否存在 - CerePlatformShop shop=cerePlatformShopService.findByShopName(param.getShopName()); + CerePlatformBusiness shop= cerePlatformBusinessService.findByBusinessName(param.getShopName()); if(shop!=null){ return new Result(CoReturnFormat.SHOP_NAME_ALREADY); } - //校验手机号是否已注册 - CerePlatformShop platformShop=cerePlatformShopService.findByPhone(param.getShopPhone()); + CerePlatformBusiness platformShop=cerePlatformBusinessService.findByPhone(param.getShopPhone()); if(platformShop!=null){ return new Result(CoReturnFormat.SHOP_PHONE_ALREADY); } - CerePlatformBusiness business=cerePlatformBusinessService.checkUserName(param.getShopPhone()); + //校验手机号是否已注册 + CerePlatformBusinessUser business= cerePlatformBusinessUserService.checkUserName(param.getShopPhone()); if(business!=null){ return new Result(CoReturnFormat.PHONE_ALREADY_BIND_SHOP); } - CerePlatformBusiness business2=cerePlatformBusinessService.checkPhone(param.getShopPhone()); + CerePlatformBusinessUser business2= cerePlatformBusinessUserService.checkPhone(param.getShopPhone()); if(business2!=null){ return new Result(CoReturnFormat.PHONE_ALREADY_BIND_SHOP); } @@ -130,20 +138,20 @@ public class ShopCheckController { @NoRepeatWebLog public Result individualCheck(@RequestBody @Validated CereShopIndividualBusinessesParam param, HttpServletRequest request) throws CoBusinessException{ //校验商家名称是否存在 - CerePlatformShop shop=cerePlatformShopService.findByShopName(param.getShopName()); + CerePlatformBusiness shop= cerePlatformBusinessService.findByBusinessName(param.getShopName()); if(shop!=null){ return new Result(CoReturnFormat.SHOP_NAME_ALREADY); } - //校验手机号是否已注册 - CerePlatformShop platformShop=cerePlatformShopService.findByPhone(param.getShopPhone()); + CerePlatformBusiness platformShop=cerePlatformBusinessService.findByPhone(param.getShopPhone()); if(platformShop!=null){ return new Result(CoReturnFormat.SHOP_PHONE_ALREADY); } - CerePlatformBusiness business=cerePlatformBusinessService.checkUserName(param.getShopPhone()); + //校验手机号是否已注册 + CerePlatformBusinessUser business= cerePlatformBusinessUserService.checkUserName(param.getShopPhone()); if(business!=null){ return new Result(CoReturnFormat.PHONE_ALREADY_BIND_SHOP); } - CerePlatformBusiness business2=cerePlatformBusinessService.checkPhone(param.getShopPhone()); + CerePlatformBusinessUser business2= cerePlatformBusinessUserService.checkPhone(param.getShopPhone()); if(business2!=null){ return new Result(CoReturnFormat.PHONE_ALREADY_BIND_SHOP); } @@ -171,20 +179,20 @@ public class ShopCheckController { @NoRepeatWebLog public Result enterpriseCheck(@RequestBody @Validated CereShopEnterpriseParam param, HttpServletRequest request) throws CoBusinessException{ //校验商家名称是否存在 - CerePlatformShop shop=cerePlatformShopService.findByShopName(param.getShopName()); + CerePlatformBusiness shop= cerePlatformBusinessService.findByBusinessName(param.getShopName()); if(shop!=null){ return new Result(CoReturnFormat.SHOP_NAME_ALREADY); } - //校验手机号是否已注册 - CerePlatformShop platformShop=cerePlatformShopService.findByPhone(param.getShopPhone()); + CerePlatformBusiness platformShop=cerePlatformBusinessService.findByPhone(param.getShopPhone()); if(platformShop!=null){ return new Result(CoReturnFormat.SHOP_PHONE_ALREADY); } - CerePlatformBusiness business=cerePlatformBusinessService.checkUserName(param.getShopPhone()); + //校验手机号是否已注册 + CerePlatformBusinessUser business= cerePlatformBusinessUserService.checkUserName(param.getShopPhone()); if(business!=null){ return new Result(CoReturnFormat.PHONE_ALREADY_BIND_SHOP); } - CerePlatformBusiness business2=cerePlatformBusinessService.checkPhone(param.getShopPhone()); + CerePlatformBusinessUser business2= cerePlatformBusinessUserService.checkPhone(param.getShopPhone()); if(business2!=null){ return new Result(CoReturnFormat.PHONE_ALREADY_BIND_SHOP); } @@ -212,20 +220,20 @@ public class ShopCheckController { @NoRepeatWebLog public Result organizationsCheck(@RequestBody @Validated CereShopOtherOrganizationsParam param, HttpServletRequest request) throws CoBusinessException{ //校验商家名称是否存在 - CerePlatformShop shop=cerePlatformShopService.findByShopName(param.getShopName()); + CerePlatformBusiness shop= cerePlatformBusinessService.findByBusinessName(param.getShopName()); if(shop!=null){ return new Result(CoReturnFormat.SHOP_NAME_ALREADY); } - //校验手机号是否已注册 - CerePlatformShop platformShop=cerePlatformShopService.findByPhone(param.getShopPhone()); + CerePlatformBusiness platformShop=cerePlatformBusinessService.findByPhone(param.getShopPhone()); if(platformShop!=null){ return new Result(CoReturnFormat.SHOP_PHONE_ALREADY); } - CerePlatformBusiness business=cerePlatformBusinessService.checkUserName(param.getShopPhone()); + //校验手机号是否已注册 + CerePlatformBusinessUser business= cerePlatformBusinessUserService.checkUserName(param.getShopPhone()); if(business!=null){ return new Result(CoReturnFormat.PHONE_ALREADY_BIND_SHOP); } - CerePlatformBusiness business2=cerePlatformBusinessService.checkPhone(param.getShopPhone()); + CerePlatformBusinessUser business2= cerePlatformBusinessUserService.checkPhone(param.getShopPhone()); if(business2!=null){ return new Result(CoReturnFormat.PHONE_ALREADY_BIND_SHOP); } @@ -253,12 +261,12 @@ public class ShopCheckController { @NoRepeatWebLog public Result updatePersonalCheck(@RequestBody @Validated CereShopPersonalParam param, HttpServletRequest request) throws CoBusinessException{ //校验商家名称是否存在 - CerePlatformShop shop=cerePlatformShopService.checkShopIdByName(param.getShopName(),param.getShopId()); + CerePlatformBusiness shop= cerePlatformBusinessService.checkBusinessIdByName(param.getShopName(),param.getBusinessId()); if(shop!=null){ return new Result(CoReturnFormat.SHOP_NAME_ALREADY); } //校验手机号是否已注册 - CerePlatformShop platformShop=cerePlatformShopService.checkShopIdByPhone(param.getShopPhone(),param.getShopId()); + CerePlatformBusiness platformShop=cerePlatformBusinessService.checkBusinessIdByPhone(param.getShopPhone(),param.getBusinessId()); if(platformShop!=null){ return new Result(CoReturnFormat.SHOP_PHONE_ALREADY); } @@ -279,12 +287,11 @@ public class ShopCheckController { @NoRepeatWebLog public Result updateIndividualCheck(@RequestBody @Validated CereShopIndividualBusinessesParam param, HttpServletRequest request) throws CoBusinessException{ //校验商家名称是否存在 - CerePlatformShop shop=cerePlatformShopService.checkShopIdByName(param.getShopName(),param.getShopId()); + CerePlatformBusiness shop= cerePlatformBusinessService.checkBusinessIdByName(param.getShopName(),param.getBusinessId()); if(shop!=null){ return new Result(CoReturnFormat.SHOP_NAME_ALREADY); } - //校验手机号是否已注册 - CerePlatformShop platformShop=cerePlatformShopService.checkShopIdByPhone(param.getShopPhone(),param.getShopId()); + CerePlatformBusiness platformShop=cerePlatformBusinessService.checkBusinessIdByPhone(param.getShopPhone(),param.getBusinessId()); if(platformShop!=null){ return new Result(CoReturnFormat.SHOP_PHONE_ALREADY); } @@ -305,12 +312,11 @@ public class ShopCheckController { @NoRepeatWebLog public Result updateEnterpriseCheck(@RequestBody @Validated CereShopEnterpriseParam param, HttpServletRequest request) throws CoBusinessException{ //校验商家名称是否存在 - CerePlatformShop shop=cerePlatformShopService.checkShopIdByName(param.getShopName(),param.getShopId()); + CerePlatformBusiness shop= cerePlatformBusinessService.checkBusinessIdByName(param.getShopName(),param.getBusinessId()); if(shop!=null){ return new Result(CoReturnFormat.SHOP_NAME_ALREADY); } - //校验手机号是否已注册 - CerePlatformShop platformShop=cerePlatformShopService.checkShopIdByPhone(param.getShopPhone(),param.getShopId()); + CerePlatformBusiness platformShop=cerePlatformBusinessService.checkBusinessIdByPhone(param.getShopPhone(),param.getBusinessId()); if(platformShop!=null){ return new Result(CoReturnFormat.SHOP_PHONE_ALREADY); } @@ -331,12 +337,11 @@ public class ShopCheckController { @NoRepeatWebLog public Result updateOrganizationsCheck(@RequestBody @Validated CereShopOtherOrganizationsParam param, HttpServletRequest request) throws CoBusinessException{ //校验商家名称是否存在 - CerePlatformShop shop=cerePlatformShopService.checkShopIdByName(param.getShopName(),param.getShopId()); + CerePlatformBusiness shop= cerePlatformBusinessService.checkBusinessIdByName(param.getShopName(),param.getBusinessId()); if(shop!=null){ return new Result(CoReturnFormat.SHOP_NAME_ALREADY); } - //校验手机号是否已注册 - CerePlatformShop platformShop=cerePlatformShopService.checkShopIdByPhone(param.getShopPhone(),param.getShopId()); + CerePlatformBusiness platformShop=cerePlatformBusinessService.checkBusinessIdByPhone(param.getShopPhone(),param.getBusinessId()); if(platformShop!=null){ return new Result(CoReturnFormat.SHOP_PHONE_ALREADY); } diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/dao/business/CereBusinessShopDAO.java b/cereshop-app/src/main/java/com/shop/cereshop/app/dao/business/CereBusinessShopDAO.java deleted file mode 100644 index 27cdc1c..0000000 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/dao/business/CereBusinessShopDAO.java +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (C) 2017-2021 - * All rights reserved, Designed By 深圳中科鑫智科技有限公司 - * Copyright authorization contact 18814114118 - */ -package com.shop.cereshop.app.dao.business; - -import com.shop.cereshop.commons.domain.business.CereBusinessShop; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; - -@Mapper -public interface CereBusinessShopDAO extends BaseMapper { - - int insertSelective(CereBusinessShop record); -} diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/dao/business/CereBusinessUserDAO.java b/cereshop-app/src/main/java/com/shop/cereshop/app/dao/business/CereBusinessUserDAO.java new file mode 100644 index 0000000..5dc0fbc --- /dev/null +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/dao/business/CereBusinessUserDAO.java @@ -0,0 +1,16 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.app.dao.business; + +import com.shop.cereshop.commons.domain.business.CereBusinessUser; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface CereBusinessUserDAO extends BaseMapper { + + int insertSelective(CereBusinessUser record); +} diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/dao/business/CerePlatformBusinessDAO.java b/cereshop-app/src/main/java/com/shop/cereshop/app/dao/business/CerePlatformBusinessDAO.java index d97d72e..17d9072 100644 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/dao/business/CerePlatformBusinessDAO.java +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/dao/business/CerePlatformBusinessDAO.java @@ -5,24 +5,34 @@ */ package com.shop.cereshop.app.dao.business; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import java.util.List; + @Mapper public interface CerePlatformBusinessDAO extends BaseMapper { - int deleteByPrimaryKey(Long businessUserId); + int deleteByPrimaryKey(Long businessId); int insertSelective(CerePlatformBusiness record); - CerePlatformBusiness selectByPrimaryKey(Long businessUserId); + CerePlatformBusiness selectByPrimaryKey(Long businessId); int updateByPrimaryKeySelective(CerePlatformBusiness record); - int updateByPrimaryKey(CerePlatformBusiness record); + List selectAll(); + + List getByIdList(@Param("businessIdList") List businessIdList); + + + CerePlatformBusiness findByBusinessName(@Param("businessName") String businessName); + + CerePlatformBusiness findByPhone(@Param("businessPhone") String businessPhone); + + CerePlatformBusiness checkBusinessIdByName(@Param("businessName") String businessName, @Param("businessid") Long businessid); - CerePlatformBusiness checkUserName(@Param("shopPhone") String shopPhone); + CerePlatformBusiness checkBusinessIdByPhone(@Param("businessPhone") String businessPhone, @Param("businessid") Long businessid); - CerePlatformBusiness checkPhone(String phone); } diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/dao/business/CerePlatformBusinessUserDAO.java b/cereshop-app/src/main/java/com/shop/cereshop/app/dao/business/CerePlatformBusinessUserDAO.java new file mode 100644 index 0000000..d3465b1 --- /dev/null +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/dao/business/CerePlatformBusinessUserDAO.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.app.dao.business; + +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +@Mapper +public interface CerePlatformBusinessUserDAO extends BaseMapper { + int deleteByPrimaryKey(Long businessUserId); + + int insertSelective(CerePlatformBusinessUser record); + + CerePlatformBusinessUser selectByPrimaryKey(Long businessUserId); + + int updateByPrimaryKeySelective(CerePlatformBusinessUser record); + + int updateByPrimaryKey(CerePlatformBusinessUser record); + + CerePlatformBusinessUser checkUserName(@Param("shopPhone") String shopPhone); + + CerePlatformBusinessUser checkPhone(String phone); +} diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/dao/business/CereShopEnterpriseDAO.java b/cereshop-app/src/main/java/com/shop/cereshop/app/dao/business/CereShopEnterpriseDAO.java new file mode 100644 index 0000000..3541c44 --- /dev/null +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/dao/business/CereShopEnterpriseDAO.java @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.app.dao.business; + +import com.shop.cereshop.app.param.shop.CereShopEnterpriseParam; +import com.shop.cereshop.commons.domain.business.CereShopEnterprise; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +@Mapper +public interface CereShopEnterpriseDAO extends BaseMapper { + + int insertSelective(CereShopEnterprise record); + + void updateEnterprise(CereShopEnterprise enterprise); + + CereShopEnterprise findByBusinessId(@Param("businessId") Long businessId); + + void insertParam(CereShopEnterpriseParam param); + + void updateParam(CereShopEnterpriseParam param); +} diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/dao/business/CereShopIndividualBusinessesDAO.java b/cereshop-app/src/main/java/com/shop/cereshop/app/dao/business/CereShopIndividualBusinessesDAO.java new file mode 100644 index 0000000..346f626 --- /dev/null +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/dao/business/CereShopIndividualBusinessesDAO.java @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.app.dao.business; + +import com.shop.cereshop.app.param.shop.CereShopIndividualBusinessesParam; +import com.shop.cereshop.commons.domain.business.CereShopIndividualBusinesses; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +@Mapper +public interface CereShopIndividualBusinessesDAO extends BaseMapper { + + int insertSelective(CereShopIndividualBusinesses record); + + void updateIndividual(CereShopIndividualBusinesses individualBusinesses); + + CereShopIndividualBusinesses findByBusinessId(@Param("businessId") Long businessId); + + void insertParam(CereShopIndividualBusinessesParam param); + + void updateParam(CereShopIndividualBusinessesParam param); + +} diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/dao/business/CereShopOtherOrganizationsDAO.java b/cereshop-app/src/main/java/com/shop/cereshop/app/dao/business/CereShopOtherOrganizationsDAO.java new file mode 100644 index 0000000..651aa32 --- /dev/null +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/dao/business/CereShopOtherOrganizationsDAO.java @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.app.dao.business; + +import com.shop.cereshop.app.param.shop.CereShopOtherOrganizationsParam; +import com.shop.cereshop.commons.domain.business.CereShopOtherOrganizations; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +@Mapper +public interface CereShopOtherOrganizationsDAO extends BaseMapper { + + int insertSelective(CereShopOtherOrganizations record); + + void updateOrganizations(CereShopOtherOrganizations otherOrganizations); + + CereShopOtherOrganizations findByBusinessId(@Param("businessId") Long businessId); + + void insertParam(CereShopOtherOrganizationsParam param); + + void updateParam(CereShopOtherOrganizationsParam param); +} diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/dao/business/CereShopPersonalDAO.java b/cereshop-app/src/main/java/com/shop/cereshop/app/dao/business/CereShopPersonalDAO.java new file mode 100644 index 0000000..bf93451 --- /dev/null +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/dao/business/CereShopPersonalDAO.java @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.app.dao.business; + +import com.shop.cereshop.app.param.shop.CereShopPersonalParam; +import com.shop.cereshop.commons.domain.business.CereShopPersonal; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +@Mapper +public interface CereShopPersonalDAO extends BaseMapper { + + int insertSelective(CereShopPersonal record); + + void updatePersonal(CereShopPersonal personal); + + CereShopPersonal findByBusinessId(@Param("businessId") Long businessId); + + void insertParam(CereShopPersonalParam param); +} diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/dao/buyer/CereBuyerUserDAO.java b/cereshop-app/src/main/java/com/shop/cereshop/app/dao/buyer/CereBuyerUserDAO.java index 44537c3..2a6697d 100644 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/dao/buyer/CereBuyerUserDAO.java +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/dao/buyer/CereBuyerUserDAO.java @@ -31,11 +31,11 @@ public interface CereBuyerUserDAO extends BaseMapper { CereBuyerUser findByToken(@Param("token") String token); - BuyerUser findByOpenid(@Param("openid") String openid); + BuyerUser findByOpenid(@Param("project") String project, @Param("openid") String openid); - BuyerUser findByAliUserId(@Param("aliUserId") String aliUserId); + BuyerUser findByAliUserId(@Param("project") String project, @Param("aliUserId") String aliUserId); - BuyerUser findByPhone(@Param("phone") String phone); + BuyerUser findByPhone(@Param("project") String project, @Param("phone") String phone); void relievePhone(CereBuyerUser cereBuyerUser); @@ -43,15 +43,15 @@ public interface CereBuyerUserDAO extends BaseMapper { MyUser getUser(@Param("buyerUserId") Long buyerUserId); - CerePlatformCanvas getCanvas(CerePlatformCanvas canvas); + CerePlatformCanvas getCanvas(@Param("canvas") CerePlatformCanvas canvas); - CereBuyerUser getByOpenid(@Param("wechatOpenId") String wechatOpenId); + CereBuyerUser getByOpenid(@Param("project") String project,@Param("wechatOpenId") String wechatOpenId); - CereBuyerUser checkPhoneWx(@Param("phone") String phone); + CereBuyerUser checkPhoneWx(@Param("project") String project, @Param("phone") String phone); - CereBuyerUser checkPhoneAli(@Param("phone") String phone, @Param("buyerUserId") Long buyerUserId); + CereBuyerUser checkPhoneAli(@Param("project") String project,@Param("phone") String phone, @Param("buyerUserId") Long buyerUserId); - CereBuyerUser selectByPhone(@Param("phone") String phone); + CereBuyerUser selectByPhone(@Param("project") String project, @Param("phone") String phone); void updateGrowth(@Param("buyerUserId") Long buyerUserId, @Param("growth") Integer growth); diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/dao/product/CereProductClassifyDAO.java b/cereshop-app/src/main/java/com/shop/cereshop/app/dao/product/CereProductClassifyDAO.java index 3d61cf1..f047839 100644 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/dao/product/CereProductClassifyDAO.java +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/dao/product/CereProductClassifyDAO.java @@ -5,13 +5,12 @@ */ package com.shop.cereshop.app.dao.product; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.shop.cereshop.app.page.classify.Classify; import com.shop.cereshop.app.page.index.Product; -import com.shop.cereshop.app.page.index.ProductClassify; import com.shop.cereshop.app.page.index.ProductImage; import com.shop.cereshop.app.param.classify.ClassifyProductParam; import com.shop.cereshop.commons.domain.product.CereProductClassify; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.MapKey; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -31,11 +30,11 @@ public interface CereProductClassifyDAO extends BaseMapper int updateByPrimaryKey(CereProductClassify record); - List findAll(); + List findAll(@Param("project") String project); - List getFirstClassify(@Param("classifyId") Long classifyId); + List getFirstClassify(@Param("project") String project,@Param("classifyId") Long classifyId); - List findThreeClassify(); + List findThreeClassify(@Param("project") String project); List getClaasifyProducts(ClassifyProductParam param); diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/dao/shop/CerePlatformShopDAO.java b/cereshop-app/src/main/java/com/shop/cereshop/app/dao/shop/CerePlatformShopDAO.java index 733341e..76241fb 100644 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/dao/shop/CerePlatformShopDAO.java +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/dao/shop/CerePlatformShopDAO.java @@ -33,8 +33,6 @@ public interface CerePlatformShopDAO extends BaseMapper { int updateByPrimaryKeySelective(CerePlatformShop record); - int updateByPrimaryKey(CerePlatformShop record); - List findRecommendShop(); RecommendShop findVolumeProductByShopId(@Param("shopId") Long shopId); diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/dao/shop/CereShopCheckDAO.java b/cereshop-app/src/main/java/com/shop/cereshop/app/dao/shop/CereShopCheckDAO.java new file mode 100644 index 0000000..f4f22e0 --- /dev/null +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/dao/shop/CereShopCheckDAO.java @@ -0,0 +1,17 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.app.dao.shop; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.shop.cereshop.commons.domain.shop.CereShopCheck; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface CereShopCheckDAO extends BaseMapper { + + int insertSelective(CereShopCheck record); + +} diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/dao/shop/CereShopEnterpriseDAO.java b/cereshop-app/src/main/java/com/shop/cereshop/app/dao/shop/CereShopEnterpriseDAO.java deleted file mode 100644 index fff373e..0000000 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/dao/shop/CereShopEnterpriseDAO.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2017-2021 - * All rights reserved, Designed By 深圳中科鑫智科技有限公司 - * Copyright authorization contact 18814114118 - */ -package com.shop.cereshop.app.dao.shop; - -import com.shop.cereshop.app.param.shop.CereShopEnterpriseParam; -import com.shop.cereshop.commons.domain.shop.CereShopEnterprise; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; - -@Mapper -public interface CereShopEnterpriseDAO extends BaseMapper { - - int insertSelective(CereShopEnterprise record); - - void updateEnterprise(CereShopEnterprise enterprise); - - CereShopEnterprise findByShopId(@Param("shopId") Long shopId); - - void insertParam(CereShopEnterpriseParam param); - - void updateParam(CereShopEnterpriseParam param); -} diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/dao/shop/CereShopIndividualBusinessesDAO.java b/cereshop-app/src/main/java/com/shop/cereshop/app/dao/shop/CereShopIndividualBusinessesDAO.java deleted file mode 100644 index 752973b..0000000 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/dao/shop/CereShopIndividualBusinessesDAO.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (C) 2017-2021 - * All rights reserved, Designed By 深圳中科鑫智科技有限公司 - * Copyright authorization contact 18814114118 - */ -package com.shop.cereshop.app.dao.shop; - -import com.shop.cereshop.app.param.shop.CereShopIndividualBusinessesParam; -import com.shop.cereshop.commons.domain.shop.CereShopIndividualBusinesses; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; - -@Mapper -public interface CereShopIndividualBusinessesDAO extends BaseMapper { - - int insertSelective(CereShopIndividualBusinesses record); - - void updateIndividual(CereShopIndividualBusinesses individualBusinesses); - - CereShopIndividualBusinesses findByShopId(@Param("shopId") Long shopId); - - void insertParam(CereShopIndividualBusinessesParam param); - - void updateParam(CereShopIndividualBusinessesParam param); - -} diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/dao/shop/CereShopOtherOrganizationsDAO.java b/cereshop-app/src/main/java/com/shop/cereshop/app/dao/shop/CereShopOtherOrganizationsDAO.java deleted file mode 100644 index b98c364..0000000 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/dao/shop/CereShopOtherOrganizationsDAO.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2017-2021 - * All rights reserved, Designed By 深圳中科鑫智科技有限公司 - * Copyright authorization contact 18814114118 - */ -package com.shop.cereshop.app.dao.shop; - -import com.shop.cereshop.app.param.shop.CereShopOtherOrganizationsParam; -import com.shop.cereshop.commons.domain.shop.CereShopOtherOrganizations; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; - -@Mapper -public interface CereShopOtherOrganizationsDAO extends BaseMapper { - - int insertSelective(CereShopOtherOrganizations record); - - void updateOrganizations(CereShopOtherOrganizations otherOrganizations); - - CereShopOtherOrganizations findByShopId(@Param("shopId") Long shopId); - - void insertParam(CereShopOtherOrganizationsParam param); - - void updateParam(CereShopOtherOrganizationsParam param); -} diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/dao/shop/CereShopPersonalDAO.java b/cereshop-app/src/main/java/com/shop/cereshop/app/dao/shop/CereShopPersonalDAO.java deleted file mode 100644 index ad5d0de..0000000 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/dao/shop/CereShopPersonalDAO.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2017-2021 - * All rights reserved, Designed By 深圳中科鑫智科技有限公司 - * Copyright authorization contact 18814114118 - */ -package com.shop.cereshop.app.dao.shop; - -import com.shop.cereshop.app.param.shop.CereShopPersonalParam; -import com.shop.cereshop.commons.domain.shop.CereShopPersonal; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; - -@Mapper -public interface CereShopPersonalDAO extends BaseMapper { - - int insertSelective(CereShopPersonal record); - - void updatePersonal(CereShopPersonal personal); - - CereShopPersonal findByShopId(@Param("shopId") Long shopId); - - void insertParam(CereShopPersonalParam param); -} diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/interceptor/AuthorizationInterceptor.java b/cereshop-app/src/main/java/com/shop/cereshop/app/interceptor/AuthorizationInterceptor.java index 8b1b518..6870236 100644 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/interceptor/AuthorizationInterceptor.java +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/interceptor/AuthorizationInterceptor.java @@ -9,6 +9,7 @@ import cn.hutool.core.util.ObjectUtil; import com.alibaba.fastjson.JSON; import com.shop.cereshop.app.redis.service.api.UserRedisService; import com.shop.cereshop.app.service.buyer.CereBuyerUserService; +import com.shop.cereshop.app.utils.ContextUtil; import com.shop.cereshop.app.utils.TokenProvider; import com.shop.cereshop.commons.config.SecurityProperties; import com.shop.cereshop.commons.constant.CoReturnFormat; @@ -116,13 +117,46 @@ public class AuthorizationInterceptor extends HandlerInterceptorAdapter { writer.close(); } } + + String project = request.getHeader("project"); + if (EmptyUtils.isEmpty(project) || project.equals("undefined")) { + project = "0"; + } + //user存在 设置user if(ObjectUtil.isNotNull(user)){ + String userProject = user.getProject(); + if(StringUtils.isEmpty(userProject)){ + userProject = "0"; + } + + if(!StringUtils.equals(project,userProject)){ + //当前登录的用户不是一个商店的,也算是未登录 + try { + writer = response.getWriter(); +// writer.print("token为空"); + result = new Result(CoReturnFormat.USER_NOT_LOGIN); + writer.println(JSON.toJSONString(result).toString()); + return false; + } catch (IOException e) { + log.error("response error", e); + } finally { + if (writer != null) + writer.close(); + } + } //设置userId到request里,后续根据userId,获取用户信息 user.setToken(token); request.setAttribute(USER, user); } + + if(StringUtils.isNotEmpty(project)){ + ContextUtil.setProject(project); + }else { + ContextUtil.clearProject(); + } + return true; } diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/page/index/Index.java b/cereshop-app/src/main/java/com/shop/cereshop/app/page/index/Index.java index d1f78e5..3639993 100644 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/page/index/Index.java +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/page/index/Index.java @@ -5,6 +5,7 @@ */ package com.shop.cereshop.app.page.index; +import com.shop.cereshop.commons.domain.product.CereProductClassify; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -22,7 +23,7 @@ public class Index { * 类目数据 */ @ApiModelProperty(value = "类目数据") - private List classifies; + private List classifies; /** * 推荐店铺数据 diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/page/index/ProductClassify.java b/cereshop-app/src/main/java/com/shop/cereshop/app/page/index/ProductClassify.java deleted file mode 100644 index eacd8e7..0000000 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/page/index/ProductClassify.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2017-2021 - * All rights reserved, Designed By 深圳中科鑫智科技有限公司 - * Copyright authorization contact 18814114118 - */ -package com.shop.cereshop.app.page.index; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * 首页类目数据 - */ -@Data -@ApiModel(value = "ProductClassify", description = "首页类目数据") -public class ProductClassify { - - /** - * 分类id - */ - @ApiModelProperty(value = "分类id") - private Long classifyId; - - /** - * 分类名称 - */ - @ApiModelProperty(value = "分类名称") - private String classifyName; -} diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/page/settlement/SettlementShop.java b/cereshop-app/src/main/java/com/shop/cereshop/app/page/settlement/SettlementShop.java index b2166d6..c264ac5 100644 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/page/settlement/SettlementShop.java +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/page/settlement/SettlementShop.java @@ -40,6 +40,12 @@ public class SettlementShop { private String shopName; /** + * 商家id + */ + @ApiModelProperty(value = "商家id") + private Long businessId; + + /** * 仓库id */ @ApiModelProperty(value = "仓库id") diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/page/shop/PlatformShop.java b/cereshop-app/src/main/java/com/shop/cereshop/app/page/shop/PlatformShop.java index 0b4616c..0ed3139 100644 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/page/shop/PlatformShop.java +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/page/shop/PlatformShop.java @@ -5,6 +5,10 @@ */ package com.shop.cereshop.app.page.shop; +import com.shop.cereshop.commons.domain.business.CereShopEnterprise; +import com.shop.cereshop.commons.domain.business.CereShopIndividualBusinesses; +import com.shop.cereshop.commons.domain.business.CereShopOtherOrganizations; +import com.shop.cereshop.commons.domain.business.CereShopPersonal; import com.shop.cereshop.commons.domain.shop.*; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/param/classify/ClassifyProductParam.java b/cereshop-app/src/main/java/com/shop/cereshop/app/param/classify/ClassifyProductParam.java index 20bceae..f4cb88f 100644 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/param/classify/ClassifyProductParam.java +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/param/classify/ClassifyProductParam.java @@ -18,6 +18,13 @@ import lombok.Data; public class ClassifyProductParam extends PageParam { /** + * 所属平台 + */ + @ApiModelProperty(value = "所属平台") + private String project; + + + /** * 价格排序条件 1-升序 2-降序 */ @ApiModelProperty(value = "价格排序条件 1-升序 2-降序") diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/param/shop/CereShopEnterpriseParam.java b/cereshop-app/src/main/java/com/shop/cereshop/app/param/shop/CereShopEnterpriseParam.java index a5e5745..f6186ce 100644 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/param/shop/CereShopEnterpriseParam.java +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/param/shop/CereShopEnterpriseParam.java @@ -5,7 +5,7 @@ */ package com.shop.cereshop.app.param.shop; -import com.shop.cereshop.commons.domain.shop.CereShopEnterprise; +import com.shop.cereshop.commons.domain.business.CereShopEnterprise; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/param/shop/CereShopIndividualBusinessesParam.java b/cereshop-app/src/main/java/com/shop/cereshop/app/param/shop/CereShopIndividualBusinessesParam.java index 267b2f2..036faff 100644 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/param/shop/CereShopIndividualBusinessesParam.java +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/param/shop/CereShopIndividualBusinessesParam.java @@ -5,7 +5,7 @@ */ package com.shop.cereshop.app.param.shop; -import com.shop.cereshop.commons.domain.shop.CereShopIndividualBusinesses; +import com.shop.cereshop.commons.domain.business.CereShopIndividualBusinesses; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/param/shop/CereShopOtherOrganizationsParam.java b/cereshop-app/src/main/java/com/shop/cereshop/app/param/shop/CereShopOtherOrganizationsParam.java index 9ac6353..d4f5a97 100644 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/param/shop/CereShopOtherOrganizationsParam.java +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/param/shop/CereShopOtherOrganizationsParam.java @@ -5,7 +5,7 @@ */ package com.shop.cereshop.app.param.shop; -import com.shop.cereshop.commons.domain.shop.CereShopOtherOrganizations; +import com.shop.cereshop.commons.domain.business.CereShopOtherOrganizations; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/param/shop/CereShopPersonalParam.java b/cereshop-app/src/main/java/com/shop/cereshop/app/param/shop/CereShopPersonalParam.java index 0593931..f5d397f 100644 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/param/shop/CereShopPersonalParam.java +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/param/shop/CereShopPersonalParam.java @@ -5,7 +5,7 @@ */ package com.shop.cereshop.app.param.shop; -import com.shop.cereshop.commons.domain.shop.CereShopPersonal; +import com.shop.cereshop.commons.domain.business.CereShopPersonal; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/pay/xs/service/impl/XsPayServiceImpl.java b/cereshop-app/src/main/java/com/shop/cereshop/app/pay/xs/service/impl/XsPayServiceImpl.java index d2dd1a3..61c04a1 100644 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/pay/xs/service/impl/XsPayServiceImpl.java +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/pay/xs/service/impl/XsPayServiceImpl.java @@ -14,11 +14,13 @@ import com.shop.cereshop.app.dao.shop.CereShopCrossDetailDAO; import com.shop.cereshop.app.pay.xs.domain.XsCallBackRequestVo; import com.shop.cereshop.app.pay.xs.service.XsPayService; import com.shop.cereshop.app.pay.xs.utils.CommonUtils; +import com.shop.cereshop.app.service.business.CerePlatformBusinessService; import com.shop.cereshop.app.service.buyer.CereBuyerUserService; import com.shop.cereshop.app.service.pay.CerePayLogService; import com.shop.cereshop.app.service.shop.CerePlatformShopService; import com.shop.cereshop.commons.config.XspayConfig; import com.shop.cereshop.commons.constant.XsPayEnum; +import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; import com.shop.cereshop.commons.domain.buyer.CereBuyerUser; import com.shop.cereshop.commons.domain.order.CereOrderParent; import com.shop.cereshop.commons.domain.order.CereOrderProduct; @@ -62,6 +64,9 @@ public class XsPayServiceImpl implements XsPayService { private CerePlatformShopService cerePlatformShopservice; + @Autowired + private CerePlatformBusinessService cerePlatformBusinessservice; + //支付申请服务代码 serCode private static final String PAY_SER_CODE = "101005"; //退款申请服务代码 serCode @@ -109,7 +114,7 @@ public class XsPayServiceImpl implements XsPayService { }else{ e.printStackTrace(); } - throw new CoBusinessException("10000","获取支付二维码出错"); + throw new CoBusinessException("10000","获取支付二维码出错", ""); } } return null; @@ -193,7 +198,7 @@ public class XsPayServiceImpl implements XsPayService { // }else{ // e.printStackTrace(); // } -// throw new CoBusinessException("10000","获取支付二维码出错"); +// throw new CoBusinessException("10000","获取支付二维码出错", ""); // } // } return null; @@ -225,7 +230,7 @@ public class XsPayServiceImpl implements XsPayService { }else{ e.printStackTrace(); } - throw new CoBusinessException("10000","获取支付二维码出错"); + throw new CoBusinessException("10000","获取支付二维码出错", ""); } } return null; @@ -287,14 +292,23 @@ public class XsPayServiceImpl implements XsPayService { List shopIdList = orderList.stream().map(CereShopOrder::getShopId).distinct().collect(Collectors.toList()); List cerePlatformShopList = cerePlatformShopservice.getByIdList(shopIdList); - for (CerePlatformShop cerePlatformShop : cerePlatformShopList) { - if(StringUtils.isEmpty(cerePlatformShop.getXsPayId())){ - throw new CoBusinessException("10000","商家" + cerePlatformShop.getShopName() + "未进行支付信息认证,请联系管理员", ""); +// for (CerePlatformShop cerePlatformShop : cerePlatformShopList) { +// if(StringUtils.isEmpty(cerePlatformShop.getXsPayId())){ +// throw new CoBusinessException("10000","商家" + cerePlatformShop.getShopName() + "未进行支付信息认证,请联系管理员", ""); +// } +// } + + List businessIdList = cerePlatformShopList.stream().map(CerePlatformShop::getBusinessId).distinct().collect(Collectors.toList()); + List cerePlatformBusinessList = cerePlatformBusinessservice.getByIdList(businessIdList); + for (CerePlatformBusiness cerePlatformBusiness : cerePlatformBusinessList) { + if(StringUtils.isEmpty(cerePlatformBusiness.getXsPayId())){ + throw new CoBusinessException("10000","商家" + cerePlatformBusiness.getBusinessName() + "未进行支付信息认证,请联系管理员", ""); } } + Map contentMap = build05ContentMap(orderFormId, payerAccount, user, orderList, cereOrderProductList, cerePlatformShopList, - money, tradeType, payType, XspayConfig.APP_RETURN_URL, + cerePlatformBusinessList, money, tradeType, payType, XspayConfig.APP_RETURN_URL, XspayConfig.APP_NOTICE_URL); return contentMap; @@ -324,6 +338,7 @@ public class XsPayServiceImpl implements XsPayService { private static Map build05ContentMap(String orderFormid, String payerAccount, CereBuyerUser user, List orderList, List cereOrderProductList, List cerePlatformShopList, + List cerePlatformBusinessList, BigDecimal money, String tradeType, String payType, String returnUrl, String noticeUrl){ // 设置请求正文 contentMap有序,顺序按照文档从上到下,为空字段可不传该字段 @@ -357,7 +372,7 @@ public class XsPayServiceImpl implements XsPayService { //分账标识 0:不分账 1:实时分账 2:延时分账 contentMap.put("shareFlag", "1"); //分账订单信息 shangFlag=1时必填 - JSONArray jsonArray = buildSubMerchantOrderDetails(orderList, cereOrderProductList, cerePlatformShopList); + JSONArray jsonArray = buildSubMerchantOrderDetails(orderList, cereOrderProductList, cerePlatformShopList, cerePlatformBusinessList); if(jsonArray != null) { contentMap.put("subMerchantOrderDetails", JSONArray.toJSONString(jsonArray)); } @@ -403,7 +418,8 @@ public class XsPayServiceImpl implements XsPayService { */ private static JSONArray buildSubMerchantOrderDetails(List orderList, List cereOrderProductList, - List cerePlatformShopList){ + List cerePlatformShopList, + List cerePlatformBusinessList){ if(cereOrderProductList.isEmpty()){ return null; } @@ -414,6 +430,9 @@ public class XsPayServiceImpl implements XsPayService { CerePlatformShop cerePlatformShop = cerePlatformShopList.stream().filter(item -> item.getShopId().equals(cereShopOrder.getShopId())).findFirst().orElse(null); + CerePlatformBusiness cerePlatformBusiness = cerePlatformBusinessList.stream().filter(item -> + item.getBusinessId().equals(cerePlatformShop.getBusinessId())).findFirst().orElse(null); + subOrder1.put("subOrderId",cereShopOrder.getOrderFormid()); subOrder1.put("subOrderAmount", cereShopOrder.getPrice().multiply(BigDecimal.valueOf(100)).intValue()); @@ -423,27 +442,33 @@ public class XsPayServiceImpl implements XsPayService { //子订单1 明细1 JSONObject detail1 = new JSONObject(); detail1.put("shareDetailId","" + cereOrderProduct.getOrderId() + cereOrderProduct.getOrderProductId()); - detail1.put("shareParId", cerePlatformShop.getXsPayId()); - //这里是否需要减去用积分抵扣金额 - detail1.put("shareAmount", - cereOrderProduct.getActualPrice().add(cereOrderProduct.getLogisticsPrice()) - .subtract(cereOrderProduct.getUseCreditAmount()) - .subtract(cereOrderProduct.getPlatformCommission()) - .multiply(BigDecimal.valueOf(100)).intValue() - ); + detail1.put("shareParId", cerePlatformBusiness.getXsPayId()); + int productShareAmount = cereOrderProduct.getActualPrice().add(cereOrderProduct.getLogisticsPrice()) + .subtract(cereOrderProduct.getUseCreditAmount()) + .subtract(cereOrderProduct.getPlatformCommission()) + .multiply(BigDecimal.valueOf(100)).intValue(); + //这里是否需要减去用积分抵扣金额 + detail1.put("shareAmount",productShareAmount); detail1.put("settleCurCode","CNY"); - detailArray1.add(detail1); + if(productShareAmount > 0) { + detailArray1.add(detail1); + } } - JSONObject detail2 = new JSONObject(); - detail2.put("shareDetailId","platformCommission-" + cereShopOrder.getOrderId()); - detail2.put("shareParId", XspayConfig.MER_CODE); - detail2.put("shareAmount",cereShopOrder.getPlatformCommission().multiply(BigDecimal.valueOf(100)).intValue()); - detail2.put("settleCurCode","CNY"); - detailArray1.add(detail2); + int platformShareAmount = cereShopOrder.getPlatformCommission().multiply(BigDecimal.valueOf(100)).intValue(); + if(platformShareAmount > 0) { + JSONObject detail2 = new JSONObject(); + detail2.put("shareDetailId", "platformCommission-" + cereShopOrder.getOrderId()); + detail2.put("shareParId", XspayConfig.MER_CODE); + detail2.put("shareAmount", cereShopOrder.getPlatformCommission().multiply(BigDecimal.valueOf(100)).intValue()); + detail2.put("settleCurCode", "CNY"); + detailArray1.add(detail2); + } - subOrder1.put("shareDetail", detailArray1); - jsonArray.add(subOrder1); + if(!detailArray1.isEmpty()) { + subOrder1.put("shareDetail", detailArray1); + jsonArray.add(subOrder1); + } } return jsonArray; diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/service/business/CereBusinessShopService.java b/cereshop-app/src/main/java/com/shop/cereshop/app/service/business/CereBusinessShopService.java deleted file mode 100644 index 0b23760..0000000 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/service/business/CereBusinessShopService.java +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright (C) 2017-2021 - * All rights reserved, Designed By 深圳中科鑫智科技有限公司 - * Copyright authorization contact 18814114118 - */ -package com.shop.cereshop.app.service.business; - -import com.shop.cereshop.commons.domain.business.CereBusinessShop; -import com.shop.cereshop.commons.exception.CoBusinessException; - -public interface CereBusinessShopService { - void insert(CereBusinessShop cereBusinessShop) throws CoBusinessException; -} diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/service/business/CereBusinessUserService.java b/cereshop-app/src/main/java/com/shop/cereshop/app/service/business/CereBusinessUserService.java new file mode 100644 index 0000000..bc998b1 --- /dev/null +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/service/business/CereBusinessUserService.java @@ -0,0 +1,13 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.app.service.business; + +import com.shop.cereshop.commons.domain.business.CereBusinessUser; +import com.shop.cereshop.commons.exception.CoBusinessException; + +public interface CereBusinessUserService { + void insert(CereBusinessUser cereBusinessUser) throws CoBusinessException; +} diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/service/business/CerePlatformBusinessService.java b/cereshop-app/src/main/java/com/shop/cereshop/app/service/business/CerePlatformBusinessService.java index cde90c8..8b8d389 100644 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/service/business/CerePlatformBusinessService.java +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/service/business/CerePlatformBusinessService.java @@ -8,10 +8,23 @@ package com.shop.cereshop.app.service.business; import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; import com.shop.cereshop.commons.exception.CoBusinessException; +import java.util.List; + public interface CerePlatformBusinessService { + + CerePlatformBusiness selectByPrimaryKey(Long businessId); + + CerePlatformBusiness findByBusinessName(String businessName); + + CerePlatformBusiness findByPhone(String businessPhone); + + CerePlatformBusiness checkBusinessIdByName(String businessName, Long businessId); + + CerePlatformBusiness checkBusinessIdByPhone(String businessPhone, Long businessId); + void insert(CerePlatformBusiness cerePlatformBusiness) throws CoBusinessException; - CerePlatformBusiness checkUserName(String shopPhone); + void update(CerePlatformBusiness cerePlatformBusiness) throws CoBusinessException; - CerePlatformBusiness checkPhone(String phone); + List getByIdList(List businessIdList); } diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/service/business/CerePlatformBusinessUserService.java b/cereshop-app/src/main/java/com/shop/cereshop/app/service/business/CerePlatformBusinessUserService.java new file mode 100644 index 0000000..0e0aade --- /dev/null +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/service/business/CerePlatformBusinessUserService.java @@ -0,0 +1,17 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.app.service.business; + +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; +import com.shop.cereshop.commons.exception.CoBusinessException; + +public interface CerePlatformBusinessUserService { + void insert(CerePlatformBusinessUser cerePlatformBusinessUser) throws CoBusinessException; + + CerePlatformBusinessUser checkUserName(String shopPhone); + + CerePlatformBusinessUser checkPhone(String phone); +} diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/service/business/impl/CereBusinessShopServiceImpl.java b/cereshop-app/src/main/java/com/shop/cereshop/app/service/business/impl/CereBusinessShopServiceImpl.java deleted file mode 100644 index 2c33e9b..0000000 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/service/business/impl/CereBusinessShopServiceImpl.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (C) 2017-2021 - * All rights reserved, Designed By 深圳中科鑫智科技有限公司 - * Copyright authorization contact 18814114118 - */ -package com.shop.cereshop.app.service.business.impl; - -import com.shop.cereshop.app.dao.business.CereBusinessShopDAO; -import com.shop.cereshop.app.service.business.CereBusinessShopService; -import com.shop.cereshop.commons.domain.business.CereBusinessShop; -import com.shop.cereshop.commons.exception.CoBusinessException; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -@Service -public class CereBusinessShopServiceImpl implements CereBusinessShopService { - - @Autowired - private CereBusinessShopDAO cereBusinessShopDAO; - - @Override - public void insert(CereBusinessShop cereBusinessShop) throws CoBusinessException { - cereBusinessShopDAO.insert(cereBusinessShop); - } -} diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/service/business/impl/CereBusinessUserServiceImpl.java b/cereshop-app/src/main/java/com/shop/cereshop/app/service/business/impl/CereBusinessUserServiceImpl.java new file mode 100644 index 0000000..f1962a5 --- /dev/null +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/service/business/impl/CereBusinessUserServiceImpl.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.app.service.business.impl; + +import com.shop.cereshop.app.dao.business.CereBusinessUserDAO; +import com.shop.cereshop.app.service.business.CereBusinessUserService; +import com.shop.cereshop.commons.domain.business.CereBusinessUser; +import com.shop.cereshop.commons.exception.CoBusinessException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class CereBusinessUserServiceImpl implements CereBusinessUserService { + + @Autowired + private CereBusinessUserDAO cereBusinessUserDAO; + + @Override + public void insert(CereBusinessUser cereBusinessUser) throws CoBusinessException { + cereBusinessUserDAO.insert(cereBusinessUser); + } +} diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/service/business/impl/CerePlatformBusinessServiceImpl.java b/cereshop-app/src/main/java/com/shop/cereshop/app/service/business/impl/CerePlatformBusinessServiceImpl.java index 51e9db6..e479462 100644 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/service/business/impl/CerePlatformBusinessServiceImpl.java +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/service/business/impl/CerePlatformBusinessServiceImpl.java @@ -7,29 +7,78 @@ package com.shop.cereshop.app.service.business.impl; import com.shop.cereshop.app.dao.business.CerePlatformBusinessDAO; import com.shop.cereshop.app.service.business.CerePlatformBusinessService; +import com.shop.cereshop.app.service.log.CerePlatformLogService; +import com.shop.cereshop.app.service.shop.CereShopEnterpriseService; +import com.shop.cereshop.app.service.shop.CereShopIndividualBusinessesService; +import com.shop.cereshop.app.service.shop.CereShopOtherOrganizationsService; +import com.shop.cereshop.app.service.shop.CereShopPersonalService; import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; import com.shop.cereshop.commons.exception.CoBusinessException; +import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.List; + +@Slf4j @Service public class CerePlatformBusinessServiceImpl implements CerePlatformBusinessService { @Autowired private CerePlatformBusinessDAO cerePlatformBusinessDAO; + @Autowired + private CereShopPersonalService cereShopPersonalService; + + @Autowired + private CereShopIndividualBusinessesService cereShopIndividualBusinessesService; + + @Autowired + private CereShopEnterpriseService cereShopEnterpriseService; + + @Autowired + private CereShopOtherOrganizationsService cereShopOtherOrganizationsService; + + @Autowired + private CerePlatformLogService cerePlatformLogService; + + @Override + public CerePlatformBusiness selectByPrimaryKey(Long businessId) { + return cerePlatformBusinessDAO.selectByPrimaryKey(businessId); + } + + @Override + public CerePlatformBusiness findByBusinessName(String businessName) { + return cerePlatformBusinessDAO.findByBusinessName(businessName); + } + + @Override + public CerePlatformBusiness findByPhone(String businessPhone) { + return cerePlatformBusinessDAO.findByPhone(businessPhone); + } + + @Override + public CerePlatformBusiness checkBusinessIdByName(String businessName, Long businessId) { + return cerePlatformBusinessDAO.checkBusinessIdByName(businessName, businessId); + } + + @Override + public CerePlatformBusiness checkBusinessIdByPhone(String businessPhone, Long businessId) { + return cerePlatformBusinessDAO.checkBusinessIdByPhone(businessPhone, businessId); + } + @Override public void insert(CerePlatformBusiness cerePlatformBusiness) throws CoBusinessException { cerePlatformBusinessDAO.insert(cerePlatformBusiness); } @Override - public CerePlatformBusiness checkUserName(String shopPhone) { - return cerePlatformBusinessDAO.checkUserName(shopPhone); + public void update(CerePlatformBusiness cerePlatformBusiness) throws CoBusinessException { + cerePlatformBusinessDAO.updateByPrimaryKeySelective(cerePlatformBusiness); } @Override - public CerePlatformBusiness checkPhone(String phone) { - return cerePlatformBusinessDAO.checkPhone(phone); + public List getByIdList(List businessIdList){ + return cerePlatformBusinessDAO.getByIdList(businessIdList); } } diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/service/business/impl/CerePlatformBusinessUserServiceImpl.java b/cereshop-app/src/main/java/com/shop/cereshop/app/service/business/impl/CerePlatformBusinessUserServiceImpl.java new file mode 100644 index 0000000..b21489c --- /dev/null +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/service/business/impl/CerePlatformBusinessUserServiceImpl.java @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.app.service.business.impl; + +import com.shop.cereshop.app.dao.business.CerePlatformBusinessUserDAO; +import com.shop.cereshop.app.service.business.CerePlatformBusinessUserService; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; +import com.shop.cereshop.commons.exception.CoBusinessException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class CerePlatformBusinessUserServiceImpl implements CerePlatformBusinessUserService { + + @Autowired + private CerePlatformBusinessUserDAO cerePlatformBusinessUserDAO; + + @Override + public void insert(CerePlatformBusinessUser cerePlatformBusinessUser) throws CoBusinessException { + cerePlatformBusinessUserDAO.insert(cerePlatformBusinessUser); + } + + @Override + public CerePlatformBusinessUser checkUserName(String shopPhone) { + return cerePlatformBusinessUserDAO.checkUserName(shopPhone); + } + + @Override + public CerePlatformBusinessUser checkPhone(String phone) { + return cerePlatformBusinessUserDAO.checkPhone(phone); + } +} diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/service/buyer/CereBuyerUserService.java b/cereshop-app/src/main/java/com/shop/cereshop/app/service/buyer/CereBuyerUserService.java index 85d06a6..cc41080 100644 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/service/buyer/CereBuyerUserService.java +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/service/buyer/CereBuyerUserService.java @@ -51,7 +51,7 @@ public interface CereBuyerUserService { MyUser getUser(Long buyerUserId) throws CoBusinessException; - CerePlatformCanvas getCanvas(CerePlatformCanvas canvas); + CerePlatformCanvas getCanvas(CerePlatformCanvas canvas) throws CoBusinessException; Page getSelfProblems(PageParam param,Long buyerUserId) throws CoBusinessException; diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/service/buyer/impl/CereBuyerUserServiceImpl.java b/cereshop-app/src/main/java/com/shop/cereshop/app/service/buyer/impl/CereBuyerUserServiceImpl.java index 9ca96b5..169a574 100644 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/service/buyer/impl/CereBuyerUserServiceImpl.java +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/service/buyer/impl/CereBuyerUserServiceImpl.java @@ -46,6 +46,7 @@ import com.shop.cereshop.app.service.seckill.CereProductProblemService; import com.shop.cereshop.app.service.shop.CereShopCommentService; import com.shop.cereshop.app.service.shop.CereShopVisitService; import com.shop.cereshop.app.utils.AlipayUtil; +import com.shop.cereshop.app.utils.ContextUtil; import com.shop.cereshop.app.utils.MemberUtil; import com.shop.cereshop.app.utils.WechatUtil; import com.shop.cereshop.commons.cache.constants.CacheKeyConstants; @@ -226,7 +227,7 @@ public class CereBuyerUserServiceImpl implements CereBuyerUserService { } //查询该微信号是否已注册 if(!EmptyUtils.isEmpty(openid)){ - user=cereBuyerUserDAO.findByOpenid(openid); + user=cereBuyerUserDAO.findByOpenid(ContextUtil.getProject(), openid); if(user==null){ //未注册 user = new BuyerUser(); @@ -267,7 +268,7 @@ public class CereBuyerUserServiceImpl implements CereBuyerUserService { if (userInfoResponse == null || StringUtils.isBlank(userInfoResponse.getUserId())) { throw new CoBusinessException(CoReturnFormat.ALI_APPLET_AUTH_ERROR); } - user=cereBuyerUserDAO.findByAliUserId(userInfoResponse.getUserId()); + user=cereBuyerUserDAO.findByAliUserId(ContextUtil.getProject(), userInfoResponse.getUserId()); if (user==null) { //未注册 user = new BuyerUser(); @@ -277,6 +278,7 @@ public class CereBuyerUserServiceImpl implements CereBuyerUserService { //新增用户 CereBuyerUser buyerUser=new CereBuyerUser(); //buyerUser.setWechatOpenId(param.getWechatOpenId()); + buyerUser.setProject(ContextUtil.getProject()); buyerUser.setAliUserId(userInfoResponse.getUserId()); buyerUser.setCreateTime(time); buyerUser.setPhone(param.getPhone()); @@ -333,7 +335,7 @@ public class CereBuyerUserServiceImpl implements CereBuyerUserService { String time = TimeUtils.yyMMddHHmmss(); //查询该微信号是否已注册 if(!EmptyUtils.isEmpty(param.getWechatOpenId())){ - user=cereBuyerUserDAO.findByOpenid(param.getWechatOpenId()); + user=cereBuyerUserDAO.findByOpenid( ContextUtil.getProject(), param.getWechatOpenId()); if(user==null){ //未注册 user = new BuyerUser(); @@ -368,7 +370,7 @@ public class CereBuyerUserServiceImpl implements CereBuyerUserService { result.setPhone(phone); String time =TimeUtils.yyMMddHHmmss(); //校验手机号是否绑定其他微信 - CereBuyerUser cereBuyerUser=cereBuyerUserDAO.checkPhoneWx(phone); + CereBuyerUser cereBuyerUser=cereBuyerUserDAO.checkPhoneWx(ContextUtil.getProject(), phone); if(cereBuyerUser!=null){ //绑定了微信 if(!cereBuyerUser.getWechatOpenId().equals(param.getWechatOpenId())){ @@ -388,9 +390,9 @@ public class CereBuyerUserServiceImpl implements CereBuyerUserService { } } //查询手机号已注册用户数据 - BuyerUser byPhone = cereBuyerUserDAO.findByPhone(phone); + BuyerUser byPhone = cereBuyerUserDAO.findByPhone(ContextUtil.getProject(), phone); //查询微信已注册用户数据 - CereBuyerUser user=cereBuyerUserDAO.getByOpenid(param.getWechatOpenId()); + CereBuyerUser user=cereBuyerUserDAO.getByOpenid(ContextUtil.getProject(), param.getWechatOpenId()); if(byPhone!=null){ if(user!=null){ //删除手机号注册用户 @@ -398,6 +400,7 @@ public class CereBuyerUserServiceImpl implements CereBuyerUserService { //更新微信注册用户绑定手机号 user.setPhone(byPhone.getPhone()); user.setUpdateTime(time); + user.setProject(ContextUtil.getProject()); user.setHeadImage(param.getHeadImage()); cereBuyerUserDAO.updateByPrimaryKeySelective(user); result.setBuyerUserId(user.getBuyerUserId()); @@ -411,6 +414,7 @@ public class CereBuyerUserServiceImpl implements CereBuyerUserService { CereBuyerUser buyerUser=new CereBuyerUser(); buyerUser.setBuyerUserId(byPhone.getBuyerUserId()); buyerUser.setWechatOpenId(param.getWechatOpenId()); + buyerUser.setProject(ContextUtil.getProject()); buyerUser.setUpdateTime(time); //设置头像 buyerUser.setHeadImage(param.getHeadImage()); @@ -422,6 +426,7 @@ public class CereBuyerUserServiceImpl implements CereBuyerUserService { if(user!=null){ user.setPhone(phone); user.setUpdateTime(time); + user.setProject(ContextUtil.getProject()); user.setHeadImage(param.getHeadImage()); cereBuyerUserDAO.updateByPrimaryKeySelective(user); result.setBuyerUserId(user.getBuyerUserId()); @@ -433,6 +438,7 @@ public class CereBuyerUserServiceImpl implements CereBuyerUserService { buyerUser.setWechatOpenId(param.getWechatOpenId()); buyerUser.setCreateTime(time); buyerUser.setPhone(phone); + buyerUser.setProject(ContextUtil.getProject()); buyerUser.setPassword(EncryptUtil.encrypt("123456")); buyerUser.setName("MJ"+RandomStringUtil.getRandomCode(4,0)); buyerUser.setState(IntegerEnum.YES.getCode()); @@ -463,20 +469,21 @@ public class CereBuyerUserServiceImpl implements CereBuyerUserService { result.setPhone(param.getPhone()); String time =TimeUtils.yyMMddHHmmss(); //校验手机号是否绑定其他微信 - CereBuyerUser cereBuyerUser=cereBuyerUserDAO.checkPhoneWx(param.getPhone()); + CereBuyerUser cereBuyerUser=cereBuyerUserDAO.checkPhoneWx(ContextUtil.getProject(), param.getPhone()); if(cereBuyerUser!=null){ throw new CoBusinessException(CoReturnFormat.PHONE_ALREADY_WX); } //查询手机号已注册用户数据 - BuyerUser byPhone = cereBuyerUserDAO.findByPhone(param.getPhone()); + BuyerUser byPhone = cereBuyerUserDAO.findByPhone(ContextUtil.getProject(), param.getPhone()); //查询微信已注册用户数据 - CereBuyerUser user=cereBuyerUserDAO.getByOpenid(param.getWechatOpenId()); + CereBuyerUser user=cereBuyerUserDAO.getByOpenid(ContextUtil.getProject(), param.getWechatOpenId()); if(byPhone!=null){ if(user!=null){ //删除手机号注册用户 cereBuyerUserDAO.deleteByPrimaryKey(byPhone.getBuyerUserId()); //更新微信注册用户绑定手机号 user.setPhone(byPhone.getPhone()); + user.setProject(ContextUtil.getProject()); user.setUpdateTime(time); user.setHeadImage(param.getHeadImage()); cereBuyerUserDAO.updateByPrimaryKeySelective(user); @@ -490,6 +497,7 @@ public class CereBuyerUserServiceImpl implements CereBuyerUserService { //更新手机号已注册用户openid CereBuyerUser buyerUser=new CereBuyerUser(); buyerUser.setBuyerUserId(byPhone.getBuyerUserId()); + buyerUser.setProject(ContextUtil.getProject()); buyerUser.setWechatOpenId(param.getWechatOpenId()); buyerUser.setUpdateTime(time); //设置头像 @@ -502,6 +510,7 @@ public class CereBuyerUserServiceImpl implements CereBuyerUserService { if(user!=null){ user.setPhone(param.getPhone()); user.setUpdateTime(time); + user.setProject(ContextUtil.getProject()); user.setHeadImage(param.getHeadImage()); cereBuyerUserDAO.updateByPrimaryKeySelective(user); result.setBuyerUserId(user.getBuyerUserId()); @@ -512,6 +521,7 @@ public class CereBuyerUserServiceImpl implements CereBuyerUserService { CereBuyerUser buyerUser=new CereBuyerUser(); buyerUser.setWechatOpenId(param.getWechatOpenId()); buyerUser.setCreateTime(time); + buyerUser.setProject(ContextUtil.getProject()); buyerUser.setPhone(param.getPhone()); //buyerUser.setToken(RandomStringUtil.getRandomCode(32,0)); buyerUser.setPassword(EncryptUtil.encrypt("123456")); @@ -562,7 +572,7 @@ public class CereBuyerUserServiceImpl implements CereBuyerUserService { } String time = TimeUtils.yyMMddHHmmss(); - CereBuyerUser existUser = cereBuyerUserDAO.checkPhoneAli(phone,param.getBuyerUserId()); + CereBuyerUser existUser = cereBuyerUserDAO.checkPhoneAli(ContextUtil.getProject(), phone,param.getBuyerUserId()); if (existUser != null) { throw new CoBusinessException(CoReturnFormat.OTHER_ALI_USER_BIND_PHONE); } @@ -570,7 +580,7 @@ public class CereBuyerUserServiceImpl implements CereBuyerUserService { try { //查询手机号已注册用户数据 CereBuyerUser user = cereBuyerUserDAO.selectByPrimaryKey(param.getBuyerUserId()); - CereBuyerUser byPhone = cereBuyerUserDAO.selectByPhone(phone); + CereBuyerUser byPhone = cereBuyerUserDAO.selectByPhone(ContextUtil.getProject(), phone); if(byPhone!=null && !byPhone.getBuyerUserId().equals(param.getBuyerUserId())){ //删除手机号注册用户 cereBuyerUserDAO.deleteByPrimaryKey(byPhone.getBuyerUserId()); @@ -594,7 +604,7 @@ public class CereBuyerUserServiceImpl implements CereBuyerUserService { user.setPhone(phone); user.setUpdateTime(time); cereBuyerUserDAO.updateByPrimaryKeySelective(user); - BuyerUser result = cereBuyerUserDAO.findByPhone(phone); + BuyerUser result = cereBuyerUserDAO.findByPhone(ContextUtil.getProject(), phone); assembleToken(result); @@ -831,7 +841,7 @@ public class CereBuyerUserServiceImpl implements CereBuyerUserService { @Override public BuyerUser login(LoginParam param) throws CoBusinessException { - BuyerUser user = cereBuyerUserDAO.findByPhone(param.getPhone()); + BuyerUser user = cereBuyerUserDAO.findByPhone(ContextUtil.getProject(), param.getPhone()); MemberUtil.setMemberInfo(user); return user; } @@ -888,7 +898,8 @@ public class CereBuyerUserServiceImpl implements CereBuyerUserService { } @Override - public CerePlatformCanvas getCanvas(CerePlatformCanvas canvas) { + public CerePlatformCanvas getCanvas(CerePlatformCanvas canvas) throws CoBusinessException { + canvas.setProject(ContextUtil.getProject()); return cereBuyerUserDAO.getCanvas(canvas); } @@ -933,7 +944,7 @@ public class CereBuyerUserServiceImpl implements CereBuyerUserService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) public void updatePhone(UserParam param, CereBuyerUser user) throws CoBusinessException { - BuyerUser byPhone = cereBuyerUserDAO.findByPhone(param.getPhone()); + BuyerUser byPhone = cereBuyerUserDAO.findByPhone(ContextUtil.getProject(), param.getPhone()); if(byPhone!=null){ throw new CoBusinessException(CoReturnFormat.SHOP_PHONE_ALREADY); } diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/service/common/CommonService.java b/cereshop-app/src/main/java/com/shop/cereshop/app/service/common/CommonService.java index c52d15a..eaa8131 100644 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/service/common/CommonService.java +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/service/common/CommonService.java @@ -12,4 +12,6 @@ public interface CommonService { * @return */ String getShopCode(); + + String getBusinessCode(); } diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/service/common/impl/CommonServiceImpl.java b/cereshop-app/src/main/java/com/shop/cereshop/app/service/common/impl/CommonServiceImpl.java index 60f8411..ce7cd8c 100644 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/service/common/impl/CommonServiceImpl.java +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/service/common/impl/CommonServiceImpl.java @@ -18,6 +18,11 @@ public class CommonServiceImpl implements CommonService { */ @Override public String getShopCode() { + return "DP"+ RandomStringUtil.getRandomCode(8,0); + } + + @Override + public String getBusinessCode() { return "SJ"+ RandomStringUtil.getRandomCode(8,0); } } diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/service/distributor/impl/CereDistributionOrderServiceImpl.java b/cereshop-app/src/main/java/com/shop/cereshop/app/service/distributor/impl/CereDistributionOrderServiceImpl.java index 7d3af57..5b98f3c 100644 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/service/distributor/impl/CereDistributionOrderServiceImpl.java +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/service/distributor/impl/CereDistributionOrderServiceImpl.java @@ -7,8 +7,6 @@ package com.shop.cereshop.app.service.distributor.impl; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; -import com.github.pagehelper.util.StringUtil; -import com.google.gson.Gson; import com.shop.cereshop.app.alioss.service.UploadService; import com.shop.cereshop.app.dao.distributor.CereDistributionOrderDAO; import com.shop.cereshop.app.page.distributor.*; @@ -26,24 +24,13 @@ import com.shop.cereshop.commons.domain.common.PageParam; import com.shop.cereshop.commons.domain.distributor.CereDistributionOrder; import com.shop.cereshop.commons.domain.distributor.CereShopDistributor; import com.shop.cereshop.commons.exception.CoBusinessException; -import com.shop.cereshop.commons.utils.AppletTokenResult; import com.shop.cereshop.commons.utils.EmptyUtils; -import com.shop.cereshop.commons.utils.QRCodeUtil; -import com.shop.cereshop.commons.utils.RandomStringUtil; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.*; import org.springframework.stereotype.Service; -import org.springframework.web.client.RestTemplate; -import java.io.ByteArrayInputStream; -import java.io.InputStream; import java.math.BigDecimal; -import java.net.URLEncoder; import java.util.Collections; -import java.util.HashMap; import java.util.List; -import java.util.Map; -import java.util.concurrent.atomic.AtomicReference; @Service public class CereDistributionOrderServiceImpl implements CereDistributionOrderService { diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/service/index/impl/IndexServiceImpl.java b/cereshop-app/src/main/java/com/shop/cereshop/app/service/index/impl/IndexServiceImpl.java index 476041e..ff6ded3 100644 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/service/index/impl/IndexServiceImpl.java +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/service/index/impl/IndexServiceImpl.java @@ -7,10 +7,8 @@ package com.shop.cereshop.app.service.index.impl; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; -import com.shop.cereshop.commons.cache.product.ProductBo; import com.shop.cereshop.app.page.index.Index; import com.shop.cereshop.app.page.index.Product; -import com.shop.cereshop.app.page.index.ProductClassify; import com.shop.cereshop.app.page.index.RecommendShop; import com.shop.cereshop.app.param.index.IndexParam; import com.shop.cereshop.app.param.index.SearchParam; @@ -20,10 +18,12 @@ import com.shop.cereshop.app.service.index.IndexService; import com.shop.cereshop.app.service.product.CereProductClassifyService; import com.shop.cereshop.app.service.product.CereShopProductService; import com.shop.cereshop.app.service.shop.CerePlatformShopService; +import com.shop.cereshop.commons.cache.product.ProductBo; import com.shop.cereshop.commons.domain.buyer.CereBuyerSearch; import com.shop.cereshop.commons.domain.buyer.CereBuyerUser; import com.shop.cereshop.commons.domain.canvas.CerePlatformCanvas; import com.shop.cereshop.commons.domain.common.Page; +import com.shop.cereshop.commons.domain.product.CereProductClassify; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.utils.EmptyUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -63,7 +63,7 @@ public class IndexServiceImpl implements IndexService { //第一次进来 } //查询所有一级类目 - List classifies=cereProductClassifyService.findAll(); + List classifies=cereProductClassifyService.findAll(); //查询每周排名前十的好店推荐数据 List shops=cerePlatformShopservice.findRecommendShop(); if(!EmptyUtils.isEmpty(shops)){ diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/service/order/impl/CereShopOrderServiceImpl.java b/cereshop-app/src/main/java/com/shop/cereshop/app/service/order/impl/CereShopOrderServiceImpl.java index d8897dd..3576ded 100644 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/service/order/impl/CereShopOrderServiceImpl.java +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/service/order/impl/CereShopOrderServiceImpl.java @@ -1652,6 +1652,7 @@ public class CereShopOrderServiceImpl implements CereShopOrderService { List invalidShops = new ArrayList<>(); List shopSettlementList = new ArrayList<>(); + //TODO by pxh 活动需要重新处理 //查找所有的活动相关信息 List shopIdList = param.getShops().stream().map(ShopProductParam::getShopId).distinct().collect(Collectors.toList()); // 平台秒杀 diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/service/order/placeOrderTemplate/LaunchPlaceOrder.java b/cereshop-app/src/main/java/com/shop/cereshop/app/service/order/placeOrderTemplate/LaunchPlaceOrder.java index d6ef0a8..630e435 100644 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/service/order/placeOrderTemplate/LaunchPlaceOrder.java +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/service/order/placeOrderTemplate/LaunchPlaceOrder.java @@ -35,6 +35,7 @@ import com.shop.cereshop.app.service.scene.CereShopSceneMemberService; import com.shop.cereshop.app.service.seckill.CereShopSeckillService; import com.shop.cereshop.app.service.sharesetting.CerePlatformShareSettingService; import com.shop.cereshop.app.service.stock.CereStockService; +import com.shop.cereshop.app.utils.ContextUtil; import com.shop.cereshop.commons.constant.CoReturnFormat; import com.shop.cereshop.commons.constant.IntegerEnum; import com.shop.cereshop.commons.constant.ParamEnum; @@ -247,6 +248,7 @@ public class LaunchPlaceOrder extends PlaceOrderTemplate { order.setLogisticsId(shop.getDistribution().getLogisticsId()); order.setState(IntegerEnum.ORDER_STAY_PAY.getCode()); order.setOrderFormid(RandomStringUtil.getRandomCode(15, 0)); + order.setProject(ContextUtil.getProject()); //定义订单优惠券金额(平台优惠金额/店铺总数+店铺优惠金额) BigDecimal discountPrice = BigDecimal.ZERO; //计算订单优惠金额 diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/service/order/placeOrderTemplate/NormalPlaceOrder.java b/cereshop-app/src/main/java/com/shop/cereshop/app/service/order/placeOrderTemplate/NormalPlaceOrder.java index bf2a208..510ac12 100644 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/service/order/placeOrderTemplate/NormalPlaceOrder.java +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/service/order/placeOrderTemplate/NormalPlaceOrder.java @@ -39,6 +39,7 @@ import com.shop.cereshop.app.service.scene.CereShopSceneMemberService; import com.shop.cereshop.app.service.seckill.CereShopSeckillService; import com.shop.cereshop.app.service.sharesetting.CerePlatformShareSettingService; import com.shop.cereshop.app.service.stock.CereStockService; +import com.shop.cereshop.app.utils.ContextUtil; import com.shop.cereshop.commons.constant.CoReturnFormat; import com.shop.cereshop.commons.constant.IntegerEnum; import com.shop.cereshop.commons.constant.ParamEnum; @@ -550,6 +551,7 @@ public class NormalPlaceOrder extends PlaceOrderTemplate { Long discountId = shop.getSkus().stream().filter(obj -> obj.getPlatformDiscountId() != null).findAny().map(ProductSku::getPlatformDiscountId).orElse(null); order.setSeckillId(seckillId); order.setDiscountId(discountId); + order.setProject(ContextUtil.getProject()); //定义订单优惠券金额(平台优惠金额/店铺总数+店铺优惠金额) BigDecimal discountPrice = BigDecimal.ZERO; diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/service/order/placeOrderTemplate/PlaceOrderTemplate.java b/cereshop-app/src/main/java/com/shop/cereshop/app/service/order/placeOrderTemplate/PlaceOrderTemplate.java index da5ee6f..0876c7c 100644 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/service/order/placeOrderTemplate/PlaceOrderTemplate.java +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/service/order/placeOrderTemplate/PlaceOrderTemplate.java @@ -33,6 +33,7 @@ import com.shop.cereshop.app.service.scene.CereShopSceneMemberService; import com.shop.cereshop.app.service.seckill.CereShopSeckillService; import com.shop.cereshop.app.service.sharesetting.CerePlatformShareSettingService; import com.shop.cereshop.app.service.stock.CereStockService; +import com.shop.cereshop.app.utils.ContextUtil; import com.shop.cereshop.app.utils.ImageUtil; import com.shop.cereshop.commons.config.XspayConfig; import com.shop.cereshop.commons.constant.*; @@ -473,6 +474,7 @@ public abstract class PlaceOrderTemplate { //订单总价 parent.setOrderPrice(orderPrice); parent.setPrice(payPrice); + parent.setProject(ContextUtil.getProject()); parent.setParentFormid(RandomStringUtil.getRandomCode(15, 0)); cereOrderParentService.insert(parent); return parent; diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/service/product/CereProductClassifyService.java b/cereshop-app/src/main/java/com/shop/cereshop/app/service/product/CereProductClassifyService.java index 31caed9..1aef818 100644 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/service/product/CereProductClassifyService.java +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/service/product/CereProductClassifyService.java @@ -6,19 +6,18 @@ package com.shop.cereshop.app.service.product; import com.shop.cereshop.app.page.classify.Classify; -import com.shop.cereshop.app.page.index.Product; -import com.shop.cereshop.app.page.index.ProductClassify; import com.shop.cereshop.app.param.classify.ClassifyParam; import com.shop.cereshop.app.param.classify.ClassifyProductParam; import com.shop.cereshop.commons.domain.buyer.CereBuyerUser; import com.shop.cereshop.commons.domain.common.Page; +import com.shop.cereshop.commons.domain.product.CereProductClassify; import com.shop.cereshop.commons.exception.CoBusinessException; import java.util.List; public interface CereProductClassifyService { - List findAll(); + List findAll(); List getFirstClassify(ClassifyParam param) throws CoBusinessException; diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/service/product/impl/CereProductClassifyServiceImpl.java b/cereshop-app/src/main/java/com/shop/cereshop/app/service/product/impl/CereProductClassifyServiceImpl.java index be46f79..6a30c55 100644 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/service/product/impl/CereProductClassifyServiceImpl.java +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/service/product/impl/CereProductClassifyServiceImpl.java @@ -11,7 +11,6 @@ import com.shop.cereshop.app.dao.product.CereProductClassifyDAO; import com.shop.cereshop.app.dao.shop.CerePlatformShopDAO; import com.shop.cereshop.app.page.classify.Classify; import com.shop.cereshop.app.page.index.Product; -import com.shop.cereshop.app.page.index.ProductClassify; import com.shop.cereshop.app.page.index.ProductImage; import com.shop.cereshop.app.page.shop.Shop; import com.shop.cereshop.app.param.classify.ClassifyParam; @@ -19,16 +18,19 @@ import com.shop.cereshop.app.param.classify.ClassifyProductParam; import com.shop.cereshop.app.service.product.CereProductClassifyService; import com.shop.cereshop.app.service.product.CereShopProductService; import com.shop.cereshop.app.service.shop.CerePlatformShopService; +import com.shop.cereshop.app.utils.ContextUtil; import com.shop.cereshop.commons.cache.product.ProductBo; import com.shop.cereshop.commons.domain.buyer.CereBuyerUser; import com.shop.cereshop.commons.domain.common.Page; +import com.shop.cereshop.commons.domain.product.CereProductClassify; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.utils.EmptyUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import java.util.Map; + import java.util.ArrayList; import java.util.List; +import java.util.Map; @Service public class CereProductClassifyServiceImpl implements CereProductClassifyService { @@ -46,8 +48,8 @@ public class CereProductClassifyServiceImpl implements CereProductClassifyServic private CereShopProductService cereShopProductService; @Override - public List findAll() { - return cereProductClassifyDAO.findAll(); + public List findAll() { + return cereProductClassifyDAO.findAll(ContextUtil.getProject()); } @Override @@ -55,12 +57,12 @@ public class CereProductClassifyServiceImpl implements CereProductClassifyServic List classifies=null; if(EmptyUtils.isEmpty(param.getClassifyId())){ //查询所有一级类目 - classifies = cereProductClassifyDAO.getFirstClassify(null); + classifies = cereProductClassifyDAO.getFirstClassify(ContextUtil.getProject(), null); }else { //查询所有二级类目 - classifies = cereProductClassifyDAO.getFirstClassify(param.getClassifyId()); + classifies = cereProductClassifyDAO.getFirstClassify(ContextUtil.getProject(), param.getClassifyId()); //查询所有三级类目 - List childs=cereProductClassifyDAO.findThreeClassify(); + List childs=cereProductClassifyDAO.findThreeClassify(ContextUtil.getProject()); //封装三级类目到对应二级类目子级 if(!EmptyUtils.isEmpty(classifies)){ classifies.forEach(a -> { @@ -85,6 +87,7 @@ public class CereProductClassifyServiceImpl implements CereProductClassifyServic if (user != null) { param.setBuyerUserId(user.getBuyerUserId()); } + param.setProject(ContextUtil.getProject()); List list=cereProductClassifyDAO.getClaasifyProducts(param); if(!EmptyUtils.isEmpty(list)){ list.forEach(a -> { diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/service/shop/CereShopEnterpriseService.java b/cereshop-app/src/main/java/com/shop/cereshop/app/service/shop/CereShopEnterpriseService.java index 932b4af..f0e2dda 100644 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/service/shop/CereShopEnterpriseService.java +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/service/shop/CereShopEnterpriseService.java @@ -7,7 +7,7 @@ package com.shop.cereshop.app.service.shop; import com.shop.cereshop.app.param.shop.CereShopEnterpriseParam; import com.shop.cereshop.commons.domain.buyer.CereBuyerUser; -import com.shop.cereshop.commons.domain.shop.CereShopEnterprise; +import com.shop.cereshop.commons.domain.business.CereShopEnterprise; import com.shop.cereshop.commons.exception.CoBusinessException; public interface CereShopEnterpriseService { @@ -15,7 +15,7 @@ public interface CereShopEnterpriseService { void updateEnterprise(CereShopEnterprise enterprise, CereBuyerUser user) throws CoBusinessException; - CereShopEnterprise findByShopId(Long shopId); + CereShopEnterprise findByBusinessId(Long shopId); void enterpriseCheck(CereShopEnterpriseParam param, CereBuyerUser user) throws CoBusinessException; diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/service/shop/CereShopIndividualBusinessesService.java b/cereshop-app/src/main/java/com/shop/cereshop/app/service/shop/CereShopIndividualBusinessesService.java index 4db200b..4254f2d 100644 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/service/shop/CereShopIndividualBusinessesService.java +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/service/shop/CereShopIndividualBusinessesService.java @@ -7,7 +7,7 @@ package com.shop.cereshop.app.service.shop; import com.shop.cereshop.app.param.shop.CereShopIndividualBusinessesParam; import com.shop.cereshop.commons.domain.buyer.CereBuyerUser; -import com.shop.cereshop.commons.domain.shop.CereShopIndividualBusinesses; +import com.shop.cereshop.commons.domain.business.CereShopIndividualBusinesses; import com.shop.cereshop.commons.exception.CoBusinessException; public interface CereShopIndividualBusinessesService { @@ -15,7 +15,7 @@ public interface CereShopIndividualBusinessesService { void updateIndividual(CereShopIndividualBusinesses individualBusinesses, CereBuyerUser user) throws CoBusinessException; - CereShopIndividualBusinesses findByShopId(Long shopId); + CereShopIndividualBusinesses findByBusinessId(Long shopId); void individualCheck(CereShopIndividualBusinessesParam param, CereBuyerUser user) throws CoBusinessException; diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/service/shop/CereShopOtherOrganizationsService.java b/cereshop-app/src/main/java/com/shop/cereshop/app/service/shop/CereShopOtherOrganizationsService.java index 3f94fff..5e672f6 100644 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/service/shop/CereShopOtherOrganizationsService.java +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/service/shop/CereShopOtherOrganizationsService.java @@ -7,7 +7,7 @@ package com.shop.cereshop.app.service.shop; import com.shop.cereshop.app.param.shop.CereShopOtherOrganizationsParam; import com.shop.cereshop.commons.domain.buyer.CereBuyerUser; -import com.shop.cereshop.commons.domain.shop.CereShopOtherOrganizations; +import com.shop.cereshop.commons.domain.business.CereShopOtherOrganizations; import com.shop.cereshop.commons.exception.CoBusinessException; public interface CereShopOtherOrganizationsService { @@ -15,7 +15,7 @@ public interface CereShopOtherOrganizationsService { void updateOrganizations(CereShopOtherOrganizations otherOrganizations, CereBuyerUser user) throws CoBusinessException; - CereShopOtherOrganizations findByShopId(Long shopId); + CereShopOtherOrganizations findByBusinessId(Long shopId); void organizationsCheck(CereShopOtherOrganizationsParam param, CereBuyerUser user) throws CoBusinessException; diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/service/shop/CereShopPersonalService.java b/cereshop-app/src/main/java/com/shop/cereshop/app/service/shop/CereShopPersonalService.java index fe5b184..661855c 100644 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/service/shop/CereShopPersonalService.java +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/service/shop/CereShopPersonalService.java @@ -7,7 +7,7 @@ package com.shop.cereshop.app.service.shop; import com.shop.cereshop.app.param.shop.CereShopPersonalParam; import com.shop.cereshop.commons.domain.buyer.CereBuyerUser; -import com.shop.cereshop.commons.domain.shop.CereShopPersonal; +import com.shop.cereshop.commons.domain.business.CereShopPersonal; import com.shop.cereshop.commons.exception.CoBusinessException; public interface CereShopPersonalService { @@ -15,7 +15,7 @@ public interface CereShopPersonalService { void updatePersonal(CereShopPersonal personal, CereBuyerUser user) throws CoBusinessException; - CereShopPersonal findByShopId(Long shopId); + CereShopPersonal findByBusinessId(Long shopId); void personalCheck(CereShopPersonalParam param, CereBuyerUser user) throws CoBusinessException; diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/service/shop/impl/CerePlatformShopServiceImpl.java b/cereshop-app/src/main/java/com/shop/cereshop/app/service/shop/impl/CerePlatformShopServiceImpl.java index b7fa29f..966367d 100644 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/service/shop/impl/CerePlatformShopServiceImpl.java +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/service/shop/impl/CerePlatformShopServiceImpl.java @@ -247,16 +247,16 @@ public class CerePlatformShopServiceImpl implements CerePlatformShopService { //查询认证数据 if(IntegerEnum.getByName("主体类型-个人").equals(shop.getAuthenType())){ //个人认证 - shop.setPersonal(cereShopPersonalService.findByShopId(shopId)); + shop.setPersonal(cereShopPersonalService.findByBusinessId(shopId)); }else if(IntegerEnum.getByName("主体类型-个体工商户").equals(shop.getAuthenType())){ //个体工商户户认证 - shop.setIndividualBusinesses(cereShopIndividualBusinessesService.findByShopId(shopId)); + shop.setIndividualBusinesses(cereShopIndividualBusinessesService.findByBusinessId(shopId)); }else if(IntegerEnum.getByName("主体类型-企业").equals(shop.getAuthenType())){ //企业认证 - shop.setEnterprise(cereShopEnterpriseService.findByShopId(shopId)); + shop.setEnterprise(cereShopEnterpriseService.findByBusinessId(shopId)); }else if(IntegerEnum.getByName("主体类型-其他组织").equals(shop.getAuthenType())){ //其他组织认证 - shop.setOtherOrganizations(cereShopOtherOrganizationsService.findByShopId(shopId)); + shop.setOtherOrganizations(cereShopOtherOrganizationsService.findByBusinessId(shopId)); } } return shop; diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/service/shop/impl/CereShopEnterpriseServiceImpl.java b/cereshop-app/src/main/java/com/shop/cereshop/app/service/shop/impl/CereShopEnterpriseServiceImpl.java index 83cd8af..717c41a 100644 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/service/shop/impl/CereShopEnterpriseServiceImpl.java +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/service/shop/impl/CereShopEnterpriseServiceImpl.java @@ -5,21 +5,21 @@ */ package com.shop.cereshop.app.service.shop.impl; -import com.shop.cereshop.app.dao.shop.CereShopEnterpriseDAO; +import com.shop.cereshop.app.dao.business.CereShopEnterpriseDAO; import com.shop.cereshop.app.param.shop.CereShopEnterpriseParam; -import com.shop.cereshop.app.service.business.CereBusinessShopService; +import com.shop.cereshop.app.service.business.CereBusinessUserService; import com.shop.cereshop.app.service.business.CerePlatformBusinessService; +import com.shop.cereshop.app.service.business.CerePlatformBusinessUserService; import com.shop.cereshop.app.service.common.CommonService; import com.shop.cereshop.app.service.log.CerePlatformLogService; -import com.shop.cereshop.app.service.shop.CerePlatformShopService; import com.shop.cereshop.app.service.shop.CereShopEnterpriseService; import com.shop.cereshop.app.utils.TokenProvider; import com.shop.cereshop.commons.constant.IntegerEnum; -import com.shop.cereshop.commons.domain.business.CereBusinessShop; +import com.shop.cereshop.commons.domain.business.CereBusinessUser; import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.buyer.CereBuyerUser; -import com.shop.cereshop.commons.domain.shop.CerePlatformShop; -import com.shop.cereshop.commons.domain.shop.CereShopEnterprise; +import com.shop.cereshop.commons.domain.business.CereShopEnterprise; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.utils.EncryptUtil; import com.shop.cereshop.commons.utils.TimeUtils; @@ -36,16 +36,16 @@ public class CereShopEnterpriseServiceImpl implements CereShopEnterpriseService private CereShopEnterpriseDAO cereShopEnterpriseDAO; @Autowired - private CerePlatformShopService cerePlatformShopService; + private CerePlatformBusinessService cerePlatformBusinessService; @Autowired private CommonService commonService; @Autowired - private CerePlatformBusinessService cerePlatformBusinessService; + private CerePlatformBusinessUserService cerePlatformBusinessUserService; @Autowired - private CereBusinessShopService cereBusinessShopService; + private CereBusinessUserService cereBusinessUserService; @Autowired private CerePlatformLogService cerePlatformLogService; @@ -60,14 +60,14 @@ public class CereShopEnterpriseServiceImpl implements CereShopEnterpriseService enterprise.setCreateTime(time); cereShopEnterpriseDAO.insert(enterprise); //更新店铺认证状态 - CerePlatformShop cerePlatformShop=new CerePlatformShop(); - cerePlatformShop.setShopId(enterprise.getShopId()); - cerePlatformShop.setAuthenticationState(IntegerEnum.UNDER_REVIEW.getCode()); - cerePlatformShop.setAuthenType(IntegerEnum.ENTERPRICE.getCode()); - cerePlatformShop.setUpdateTime(time); - cerePlatformShopService.updateState(cerePlatformShop); + CerePlatformBusiness cerePlatformBusiness=new CerePlatformBusiness(); + cerePlatformBusiness.setBusinessId(enterprise.getBusinessId()); + cerePlatformBusiness.setAuthenticationState(IntegerEnum.UNDER_REVIEW.getCode()); + cerePlatformBusiness.setAuthenType(IntegerEnum.ENTERPRICE.getCode()); + cerePlatformBusiness.setUpdateTime(time); + cerePlatformBusinessService.update(cerePlatformBusiness); //新增日志 - cerePlatformLogService.addLog(user,"店铺管理","客户端操作","提交企业认证信息",enterprise.getShopId(),time); + cerePlatformLogService.addLog(user,"店铺管理","客户端操作","提交企业认证信息",enterprise.getBusinessId(),time); } @Override @@ -77,55 +77,64 @@ public class CereShopEnterpriseServiceImpl implements CereShopEnterpriseService enterprise.setUpdateTime(time); cereShopEnterpriseDAO.updateEnterprise(enterprise); //新增日志 - cerePlatformLogService.addLog(user,"店铺管理","客户端操作","修改企业认证信息",enterprise.getShopId(),time); + cerePlatformLogService.addLog(user,"店铺管理","客户端操作","修改企业认证信息",enterprise.getBusinessId(),time); } @Override - public CereShopEnterprise findByShopId(Long shopId) { - return cereShopEnterpriseDAO.findByShopId(shopId); + public CereShopEnterprise findByBusinessId(Long shopId) { + return cereShopEnterpriseDAO.findByBusinessId(shopId); } @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) public void enterpriseCheck(CereShopEnterpriseParam param, CereBuyerUser user) throws CoBusinessException { String time=TimeUtils.yyMMddHHmmss(); - //新增店铺数据 - CerePlatformShop cerePlatformShop=new CerePlatformShop(); - cerePlatformShop.setShopPhone(param.getShopPhone()); - cerePlatformShop.setShopCode(commonService.getShopCode()); - cerePlatformShop.setAuthenticationState(IntegerEnum.UNDER_REVIEW.getCode()); - cerePlatformShop.setAuthenType(IntegerEnum.ENTERPRICE.getCode()); - cerePlatformShop.setCheckState(IntegerEnum.UNTREATED.getCode()); - cerePlatformShop.setCreateTime(time); - cerePlatformShop.setShopName(param.getShopName()); - cerePlatformShop.setChargePersonName(param.getChargePersonName()); - cerePlatformShop.setChargePersonPhone(param.getChargePersonPhone()); - cerePlatformShop.setShopAdress(param.getShopAdress()); - cerePlatformShop.setState(IntegerEnum.YES.getCode()); - cerePlatformShop.setShopPassword(EncryptUtil.encrypt("123456")); - cerePlatformShopService.insert(cerePlatformShop); - //同步新增商家用户数据 + //新增商家数据 CerePlatformBusiness cerePlatformBusiness=new CerePlatformBusiness(); + cerePlatformBusiness.setBusinessPhone(param.getShopPhone()); + cerePlatformBusiness.setBusinessCode(commonService.getBusinessCode()); + cerePlatformBusiness.setAuthenticationState(IntegerEnum.UNDER_REVIEW.getCode()); + cerePlatformBusiness.setAuthenType(IntegerEnum.ENTERPRICE.getCode()); + cerePlatformBusiness.setCheckState(IntegerEnum.UNTREATED.getCode()); cerePlatformBusiness.setCreateTime(time); - cerePlatformBusiness.setUsername(cerePlatformShop.getShopPhone()); - cerePlatformBusiness.setPhone(cerePlatformShop.getShopPhone()); - cerePlatformBusiness.setPassword(cerePlatformShop.getShopPassword()); - cerePlatformBusiness.setName(cerePlatformShop.getChargePersonName()); + cerePlatformBusiness.setBusinessName(param.getShopName()); + cerePlatformBusiness.setChargePersonName(param.getChargePersonName()); + cerePlatformBusiness.setChargePersonPhone(param.getChargePersonPhone()); + cerePlatformBusiness.setBusinessAdress(param.getShopAdress()); +// cerePlatformBusiness.setBusinessAdressProvince(param.getShopAdressProvince()); +// cerePlatformBusiness.setBusinessAdressCity(param.getShopAdressCity()); +// cerePlatformBusiness.setBusinessAdressDetail(param.getShopAdressDetail()); +// cerePlatformBusiness.setBusinessAdress(param.getShopAdressProvince() + param.getShopAdressCity() + StringUtils.trimToEmpty(param.getShopAdressDetail())); cerePlatformBusiness.setState(IntegerEnum.YES.getCode()); + cerePlatformBusiness.setContractState(IntegerEnum.YES.getCode()); + cerePlatformBusiness.setEffectiveDate(time); + cerePlatformBusiness.setEffectiveYear(1); +// cerePlatformBusiness.setShopPassword(EncryptUtil.encrypt("123456")); cerePlatformBusinessService.insert(cerePlatformBusiness); + //同步新增商家用户数据 + CerePlatformBusinessUser cerePlatformBusinessUser =new CerePlatformBusinessUser(); + cerePlatformBusinessUser.setCreateTime(time); + cerePlatformBusinessUser.setPhone(param.getShopPhone()); + cerePlatformBusinessUser.setUsername(param.getShopPhone()); + cerePlatformBusinessUser.setPassword(EncryptUtil.encrypt("123456")); + cerePlatformBusinessUser.setName(cerePlatformBusiness.getChargePersonName()); + cerePlatformBusinessUser.setState(IntegerEnum.YES.getCode()); + cerePlatformBusinessUserService.insert(cerePlatformBusinessUser); //同步新增商家用户绑定店铺数据 - CereBusinessShop cereBusinessShop=new CereBusinessShop(); - cereBusinessShop.setBusinessUserId(cerePlatformBusiness.getBusinessUserId()); - cereBusinessShop.setShopId(cerePlatformShop.getShopId()); - cereBusinessShop.setIfBinding(IntegerEnum.YES.getCode()); - cereBusinessShopService.insert(cereBusinessShop); + CereBusinessUser cereBusinessUser =new CereBusinessUser(); + cereBusinessUser.setBusinessUserId(cerePlatformBusinessUser.getBusinessUserId()); + cereBusinessUser.setBusinessId(cerePlatformBusiness.getBusinessId()); + cereBusinessUser.setIfBinding(IntegerEnum.YES.getCode()); + cereBusinessUser.setIsMainUser(IntegerEnum.YES.getCode()); + cereBusinessUserService.insert(cereBusinessUser); //新增店铺认证个人数据 param.setCreateTime(time); - param.setShopId(cereBusinessShop.getShopId()); - cereShopEnterpriseDAO.insertParam(param); + param.setBusinessId(cereBusinessUser.getBusinessId()); + cereShopEnterpriseDAO.insertSelective(param); + if(user!=null){ //新增日志 - cerePlatformLogService.addLog(user,"入驻申请","客户端操作","提交企业入驻申请",cerePlatformShop.getShopId(),time); + cerePlatformLogService.addLog(user,"入驻申请","客户端操作","提交企业入驻申请",cerePlatformBusiness.getBusinessId(),time); } } @@ -134,16 +143,21 @@ public class CereShopEnterpriseServiceImpl implements CereShopEnterpriseService public void updateEnterpriseCheck(CereShopEnterpriseParam param, CereBuyerUser user) throws CoBusinessException { //更新店铺数据 String time=TimeUtils.yyMMddHHmmss(); - CerePlatformShop cerePlatformShop=new CerePlatformShop(); - cerePlatformShop.setShopId(param.getShopId()); - cerePlatformShop.setShopName(param.getShopName()); - cerePlatformShop.setChargePersonPhone(param.getChargePersonPhone()); - cerePlatformShop.setChargePersonName(param.getChargePersonName()); - cerePlatformShop.setShopAdress(param.getShopAdress()); - cerePlatformShop.setUpdateTime(time); - cerePlatformShopService.update(cerePlatformShop); + CerePlatformBusiness cerePlatformBusiness=new CerePlatformBusiness(); + cerePlatformBusiness.setBusinessId(param.getBusinessId()); + cerePlatformBusiness.setBusinessName(param.getShopName()); + cerePlatformBusiness.setBusinessPhone(param.getShopPhone()); + cerePlatformBusiness.setChargePersonPhone(param.getChargePersonPhone()); + cerePlatformBusiness.setChargePersonName(param.getChargePersonName()); + cerePlatformBusiness.setBusinessAdress(param.getShopAdress()); +// cerePlatformBusiness.setBusinessAdressProvince(param.getShopAdressProvince()); +// cerePlatformBusiness.setBusinessAdressCity(param.getShopAdressCity()); +// cerePlatformBusiness.setBusinessAdressDetail(param.getShopAdressDetail()); +// cerePlatformBusiness.setBusinessAdress(param.getShopAdressProvince() + param.getShopAdressCity() + StringUtils.trimToEmpty(param.getShopAdressDetail())); + cerePlatformBusiness.setUpdateTime(time); + cerePlatformBusinessService.update(cerePlatformBusiness); //查询是否存在认证数据 - CereShopEnterprise cereShopEnterprise=cereShopEnterpriseDAO.findByShopId(param.getShopId()); + CereShopEnterprise cereShopEnterprise=cereShopEnterpriseDAO.findByBusinessId(param.getBusinessId()); if(cereShopEnterprise!=null){ //更新认证数据 param.setUpdateTime(time); @@ -154,6 +168,6 @@ public class CereShopEnterpriseServiceImpl implements CereShopEnterpriseService cereShopEnterpriseDAO.insertParam(param); } //新增日志 - cerePlatformLogService.addLog(user,"入驻申请","客户端操作","修改企业入驻申请",cerePlatformShop.getShopId(),time); + cerePlatformLogService.addLog(user,"入驻申请","客户端操作","修改企业入驻申请",cerePlatformBusiness.getBusinessId(),time); } } diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/service/shop/impl/CereShopIndividualBusinessesServiceImpl.java b/cereshop-app/src/main/java/com/shop/cereshop/app/service/shop/impl/CereShopIndividualBusinessesServiceImpl.java index 8b12401..f3fae36 100644 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/service/shop/impl/CereShopIndividualBusinessesServiceImpl.java +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/service/shop/impl/CereShopIndividualBusinessesServiceImpl.java @@ -5,21 +5,21 @@ */ package com.shop.cereshop.app.service.shop.impl; -import com.shop.cereshop.app.dao.shop.CereShopIndividualBusinessesDAO; +import com.shop.cereshop.app.dao.business.CereShopIndividualBusinessesDAO; import com.shop.cereshop.app.param.shop.CereShopIndividualBusinessesParam; -import com.shop.cereshop.app.service.business.CereBusinessShopService; +import com.shop.cereshop.app.service.business.CereBusinessUserService; import com.shop.cereshop.app.service.business.CerePlatformBusinessService; +import com.shop.cereshop.app.service.business.CerePlatformBusinessUserService; import com.shop.cereshop.app.service.common.CommonService; import com.shop.cereshop.app.service.log.CerePlatformLogService; -import com.shop.cereshop.app.service.shop.CerePlatformShopService; import com.shop.cereshop.app.service.shop.CereShopIndividualBusinessesService; import com.shop.cereshop.app.utils.TokenProvider; import com.shop.cereshop.commons.constant.IntegerEnum; -import com.shop.cereshop.commons.domain.business.CereBusinessShop; +import com.shop.cereshop.commons.domain.business.CereBusinessUser; import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.buyer.CereBuyerUser; -import com.shop.cereshop.commons.domain.shop.CerePlatformShop; -import com.shop.cereshop.commons.domain.shop.CereShopIndividualBusinesses; +import com.shop.cereshop.commons.domain.business.CereShopIndividualBusinesses; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.utils.EncryptUtil; import com.shop.cereshop.commons.utils.TimeUtils; @@ -36,16 +36,16 @@ public class CereShopIndividualBusinessesServiceImpl implements CereShopIndividu private CereShopIndividualBusinessesDAO cereShopIndividualBusinessesDAO; @Autowired - private CerePlatformShopService cerePlatformShopService; + private CerePlatformBusinessService cerePlatformBusinessService; @Autowired private CommonService commonService; @Autowired - private CerePlatformBusinessService cerePlatformBusinessService; + private CerePlatformBusinessUserService cerePlatformBusinessUserService; @Autowired - private CereBusinessShopService cereBusinessShopService; + private CereBusinessUserService cereBusinessUserService; @Autowired private CerePlatformLogService cerePlatformLogService; @@ -60,14 +60,14 @@ public class CereShopIndividualBusinessesServiceImpl implements CereShopIndividu individualBusinesses.setCreateTime(time); cereShopIndividualBusinessesDAO.insert(individualBusinesses); //更新店铺认证状态 - CerePlatformShop cerePlatformShop=new CerePlatformShop(); - cerePlatformShop.setShopId(individualBusinesses.getShopId()); - cerePlatformShop.setAuthenticationState(IntegerEnum.UNDER_REVIEW.getCode()); - cerePlatformShop.setAuthenType(IntegerEnum.INDIVIDUAL.getCode()); - cerePlatformShop.setUpdateTime(time); - cerePlatformShopService.updateState(cerePlatformShop); + CerePlatformBusiness cerePlatformBusiness=new CerePlatformBusiness(); + cerePlatformBusiness.setBusinessId(individualBusinesses.getBusinessId()); + cerePlatformBusiness.setAuthenticationState(IntegerEnum.UNDER_REVIEW.getCode()); + cerePlatformBusiness.setAuthenType(IntegerEnum.INDIVIDUAL.getCode()); + cerePlatformBusiness.setUpdateTime(time); + cerePlatformBusinessService.update(cerePlatformBusiness); //新增日志 - cerePlatformLogService.addLog(user,"店铺管理","客户端操作","提交个体工商户认证信息",individualBusinesses.getShopId(),time); + cerePlatformLogService.addLog(user,"店铺管理","客户端操作","提交个体工商户认证信息",individualBusinesses.getBusinessId(),time); } @Override @@ -77,12 +77,12 @@ public class CereShopIndividualBusinessesServiceImpl implements CereShopIndividu individualBusinesses.setUpdateTime(time); cereShopIndividualBusinessesDAO.updateIndividual(individualBusinesses); //新增日志 - cerePlatformLogService.addLog(user,"店铺管理","客户端操作","修改个体工商户认证信息",individualBusinesses.getShopId(),time); + cerePlatformLogService.addLog(user,"店铺管理","客户端操作","修改个体工商户认证信息",individualBusinesses.getBusinessId(),time); } @Override - public CereShopIndividualBusinesses findByShopId(Long shopId) { - return cereShopIndividualBusinessesDAO.findByShopId(shopId); + public CereShopIndividualBusinesses findByBusinessId(Long shopId) { + return cereShopIndividualBusinessesDAO.findByBusinessId(shopId); } @Override @@ -90,42 +90,50 @@ public class CereShopIndividualBusinessesServiceImpl implements CereShopIndividu public void individualCheck(CereShopIndividualBusinessesParam param, CereBuyerUser user) throws CoBusinessException { String time=TimeUtils.yyMMddHHmmss(); //新增店铺数据 - CerePlatformShop cerePlatformShop=new CerePlatformShop(); - cerePlatformShop.setShopPhone(param.getShopPhone()); - cerePlatformShop.setShopCode(commonService.getShopCode()); - cerePlatformShop.setAuthenticationState(IntegerEnum.UNDER_REVIEW.getCode()); - cerePlatformShop.setAuthenType(IntegerEnum.INDIVIDUAL.getCode()); - cerePlatformShop.setCheckState(IntegerEnum.UNTREATED.getCode()); - cerePlatformShop.setCreateTime(time); - cerePlatformShop.setShopName(param.getShopName()); - cerePlatformShop.setChargePersonName(param.getChargePersonName()); - cerePlatformShop.setChargePersonPhone(param.getChargePersonPhone()); - cerePlatformShop.setShopAdress(param.getShopAdress()); - cerePlatformShop.setState(IntegerEnum.YES.getCode()); - cerePlatformShop.setShopPassword(EncryptUtil.encrypt("123456")); - cerePlatformShopService.insert(cerePlatformShop); - //同步新增商家用户数据 CerePlatformBusiness cerePlatformBusiness=new CerePlatformBusiness(); + cerePlatformBusiness.setBusinessPhone(param.getShopPhone()); + cerePlatformBusiness.setBusinessCode(commonService.getBusinessCode()); + cerePlatformBusiness.setAuthenticationState(IntegerEnum.UNDER_REVIEW.getCode()); + cerePlatformBusiness.setAuthenType(IntegerEnum.INDIVIDUAL.getCode()); + cerePlatformBusiness.setCheckState(IntegerEnum.UNTREATED.getCode()); cerePlatformBusiness.setCreateTime(time); - cerePlatformBusiness.setUsername(cerePlatformShop.getShopPhone()); - cerePlatformBusiness.setPhone(cerePlatformShop.getShopPhone()); - cerePlatformBusiness.setPassword(cerePlatformShop.getShopPassword()); - cerePlatformBusiness.setName(cerePlatformShop.getChargePersonName()); + cerePlatformBusiness.setBusinessName(param.getShopName()); + cerePlatformBusiness.setChargePersonName(param.getChargePersonName()); + cerePlatformBusiness.setChargePersonPhone(param.getChargePersonPhone()); + cerePlatformBusiness.setBusinessAdress(param.getShopAdress()); +// cerePlatformBusiness.setBusinessAdressProvince(param.getShopAdressProvince()); +// cerePlatformBusiness.setBusinessAdressCity(param.getShopAdressCity()); +// cerePlatformBusiness.setBusinessAdressDetail(param.getShopAdressDetail()); +// cerePlatformBusiness.setBusinessAdress(param.getShopAdressProvince() + param.getShopAdressCity() + StringUtils.trimToEmpty(param.getShopAdressDetail())); cerePlatformBusiness.setState(IntegerEnum.YES.getCode()); + cerePlatformBusiness.setContractState(IntegerEnum.YES.getCode()); + cerePlatformBusiness.setEffectiveDate(time); + cerePlatformBusiness.setEffectiveYear(1); +// cerePlatformBusiness.setShopPassword(EncryptUtil.encrypt("123456")); cerePlatformBusinessService.insert(cerePlatformBusiness); + //同步新增商家用户数据 + CerePlatformBusinessUser cerePlatformBusinessUser =new CerePlatformBusinessUser(); + cerePlatformBusinessUser.setCreateTime(time); + cerePlatformBusinessUser.setPhone(param.getShopPhone()); + cerePlatformBusinessUser.setUsername(param.getShopPhone()); + cerePlatformBusinessUser.setPassword(EncryptUtil.encrypt("123456")); + cerePlatformBusinessUser.setName(cerePlatformBusiness.getChargePersonName()); + cerePlatformBusinessUser.setState(IntegerEnum.YES.getCode()); + cerePlatformBusinessUserService.insert(cerePlatformBusinessUser); //同步新增商家用户绑定店铺数据 - CereBusinessShop cereBusinessShop=new CereBusinessShop(); - cereBusinessShop.setBusinessUserId(cerePlatformBusiness.getBusinessUserId()); - cereBusinessShop.setShopId(cerePlatformShop.getShopId()); - cereBusinessShop.setIfBinding(IntegerEnum.YES.getCode()); - cereBusinessShopService.insert(cereBusinessShop); + CereBusinessUser cereBusinessUser =new CereBusinessUser(); + cereBusinessUser.setBusinessUserId(cerePlatformBusinessUser.getBusinessUserId()); + cereBusinessUser.setBusinessId(cerePlatformBusiness.getBusinessId()); + cereBusinessUser.setIfBinding(IntegerEnum.YES.getCode()); + cereBusinessUser.setIsMainUser(IntegerEnum.YES.getCode()); + cereBusinessUserService.insert(cereBusinessUser); //新增店铺认证个人数据 param.setCreateTime(time); - param.setShopId(cereBusinessShop.getShopId()); - cereShopIndividualBusinessesDAO.insertParam(param); + param.setBusinessId(cereBusinessUser.getBusinessId()); + cereShopIndividualBusinessesDAO.insertSelective(param); if(user!=null){ //新增日志 - cerePlatformLogService.addLog(user,"入驻申请","客户端操作","提交个个体工商户入驻申请",cerePlatformShop.getShopId(),time); + cerePlatformLogService.addLog(user,"入驻申请","客户端操作","提交个个体工商户入驻申请",cerePlatformBusiness.getBusinessId(),time); } } @@ -134,16 +142,21 @@ public class CereShopIndividualBusinessesServiceImpl implements CereShopIndividu public void updateIndividualCheck(CereShopIndividualBusinessesParam param, CereBuyerUser user) throws CoBusinessException { //更新店铺数据 String time=TimeUtils.yyMMddHHmmss(); - CerePlatformShop cerePlatformShop=new CerePlatformShop(); - cerePlatformShop.setShopId(param.getShopId()); - cerePlatformShop.setShopName(param.getShopName()); - cerePlatformShop.setChargePersonPhone(param.getChargePersonPhone()); - cerePlatformShop.setChargePersonName(param.getChargePersonName()); - cerePlatformShop.setShopAdress(param.getShopAdress()); - cerePlatformShop.setUpdateTime(time); - cerePlatformShopService.update(cerePlatformShop); + CerePlatformBusiness cerePlatformBusiness=new CerePlatformBusiness(); + cerePlatformBusiness.setBusinessId(param.getBusinessId()); + cerePlatformBusiness.setBusinessName(param.getShopName()); + cerePlatformBusiness.setBusinessPhone(param.getShopPhone()); + cerePlatformBusiness.setChargePersonPhone(param.getChargePersonPhone()); + cerePlatformBusiness.setChargePersonName(param.getChargePersonName()); + cerePlatformBusiness.setBusinessAdress(param.getShopAdress()); +// cerePlatformBusiness.setBusinessAdressProvince(param.getShopAdressProvince()); +// cerePlatformBusiness.setBusinessAdressCity(param.getShopAdressCity()); +// cerePlatformBusiness.setBusinessAdressDetail(param.getShopAdressDetail()); +// cerePlatformBusiness.setBusinessAdress(param.getShopAdressProvince() + param.getShopAdressCity() + StringUtils.trimToEmpty(param.getShopAdressDetail())); + cerePlatformBusiness.setUpdateTime(time); + cerePlatformBusinessService.update(cerePlatformBusiness); //查询是否存在认证数据 - CereShopIndividualBusinesses cereShopIndividualBusinesses=cereShopIndividualBusinessesDAO.findByShopId(param.getShopId()); + CereShopIndividualBusinesses cereShopIndividualBusinesses=cereShopIndividualBusinessesDAO.findByBusinessId(param.getBusinessId()); if(cereShopIndividualBusinesses!=null){ //更新认证数据 param.setUpdateTime(time); @@ -154,6 +167,6 @@ public class CereShopIndividualBusinessesServiceImpl implements CereShopIndividu cereShopIndividualBusinessesDAO.insertParam(param); } //新增日志 - cerePlatformLogService.addLog(user,"入驻申请","客户端操作","修改个体工商户入驻申请",cerePlatformShop.getShopId(),time); + cerePlatformLogService.addLog(user,"入驻申请","客户端操作","修改个体工商户入驻申请",cerePlatformBusiness.getBusinessId(),time); } } diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/service/shop/impl/CereShopOtherOrganizationsServiceImpl.java b/cereshop-app/src/main/java/com/shop/cereshop/app/service/shop/impl/CereShopOtherOrganizationsServiceImpl.java index 631ae53..294bcab 100644 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/service/shop/impl/CereShopOtherOrganizationsServiceImpl.java +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/service/shop/impl/CereShopOtherOrganizationsServiceImpl.java @@ -5,21 +5,21 @@ */ package com.shop.cereshop.app.service.shop.impl; -import com.shop.cereshop.app.dao.shop.CereShopOtherOrganizationsDAO; +import com.shop.cereshop.app.dao.business.CereShopOtherOrganizationsDAO; import com.shop.cereshop.app.param.shop.CereShopOtherOrganizationsParam; -import com.shop.cereshop.app.service.business.CereBusinessShopService; +import com.shop.cereshop.app.service.business.CereBusinessUserService; import com.shop.cereshop.app.service.business.CerePlatformBusinessService; +import com.shop.cereshop.app.service.business.CerePlatformBusinessUserService; import com.shop.cereshop.app.service.common.CommonService; import com.shop.cereshop.app.service.log.CerePlatformLogService; -import com.shop.cereshop.app.service.shop.CerePlatformShopService; import com.shop.cereshop.app.service.shop.CereShopOtherOrganizationsService; import com.shop.cereshop.app.utils.TokenProvider; import com.shop.cereshop.commons.constant.IntegerEnum; -import com.shop.cereshop.commons.domain.business.CereBusinessShop; +import com.shop.cereshop.commons.domain.business.CereBusinessUser; import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.buyer.CereBuyerUser; -import com.shop.cereshop.commons.domain.shop.CerePlatformShop; -import com.shop.cereshop.commons.domain.shop.CereShopOtherOrganizations; +import com.shop.cereshop.commons.domain.business.CereShopOtherOrganizations; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.utils.EncryptUtil; import com.shop.cereshop.commons.utils.TimeUtils; @@ -36,16 +36,16 @@ public class CereShopOtherOrganizationsServiceImpl implements CereShopOtherOrgan private CereShopOtherOrganizationsDAO cereShopOtherOrganizationsDAO; @Autowired - private CerePlatformShopService cerePlatformShopService; + private CerePlatformBusinessService cerePlatformBusinessService; @Autowired private CommonService commonService; @Autowired - private CerePlatformBusinessService cerePlatformBusinessService; + private CerePlatformBusinessUserService cerePlatformBusinessUserService; @Autowired - private CereBusinessShopService cereBusinessShopService; + private CereBusinessUserService cereBusinessUserService; @Autowired private CerePlatformLogService cerePlatformLogService; @@ -60,14 +60,14 @@ public class CereShopOtherOrganizationsServiceImpl implements CereShopOtherOrgan otherOrganizations.setCreateTime(time); cereShopOtherOrganizationsDAO.insert(otherOrganizations); //更新店铺认证状态 - CerePlatformShop cerePlatformShop=new CerePlatformShop(); - cerePlatformShop.setShopId(otherOrganizations.getShopId()); - cerePlatformShop.setAuthenticationState(IntegerEnum.UNDER_REVIEW.getCode()); - cerePlatformShop.setAuthenType(IntegerEnum.ORGANIZATION.getCode()); - cerePlatformShop.setUpdateTime(time); - cerePlatformShopService.updateState(cerePlatformShop); + CerePlatformBusiness cerePlatformBusiness=new CerePlatformBusiness(); + cerePlatformBusiness.setBusinessId(otherOrganizations.getBusinessId()); + cerePlatformBusiness.setAuthenticationState(IntegerEnum.UNDER_REVIEW.getCode()); + cerePlatformBusiness.setAuthenType(IntegerEnum.ORGANIZATION.getCode()); + cerePlatformBusiness.setUpdateTime(time); + cerePlatformBusinessService.update(cerePlatformBusiness); //新增日志 - cerePlatformLogService.addLog(user,"店铺管理","客户端操作","提交其他组织认证信息",otherOrganizations.getShopId(),time); + cerePlatformLogService.addLog(user,"店铺管理","客户端操作","提交其他组织认证信息",otherOrganizations.getBusinessId(),time); } @Override @@ -77,12 +77,12 @@ public class CereShopOtherOrganizationsServiceImpl implements CereShopOtherOrgan otherOrganizations.setUpdateTime(time); cereShopOtherOrganizationsDAO.updateOrganizations(otherOrganizations); //新增日志 - cerePlatformLogService.addLog(user,"店铺管理","客户端操作","修改其他组织认证信息",otherOrganizations.getShopId(),time); + cerePlatformLogService.addLog(user,"店铺管理","客户端操作","修改其他组织认证信息",otherOrganizations.getBusinessId(),time); } @Override - public CereShopOtherOrganizations findByShopId(Long shopId) { - return cereShopOtherOrganizationsDAO.findByShopId(shopId); + public CereShopOtherOrganizations findByBusinessId(Long shopId) { + return cereShopOtherOrganizationsDAO.findByBusinessId(shopId); } @Override @@ -90,42 +90,49 @@ public class CereShopOtherOrganizationsServiceImpl implements CereShopOtherOrgan public void organizationsCheck(CereShopOtherOrganizationsParam param, CereBuyerUser user) throws CoBusinessException { String time=TimeUtils.yyMMddHHmmss(); //新增店铺数据 - CerePlatformShop cerePlatformShop=new CerePlatformShop(); - cerePlatformShop.setShopPhone(param.getShopPhone()); - cerePlatformShop.setShopCode(commonService.getShopCode()); - cerePlatformShop.setAuthenticationState(IntegerEnum.UNDER_REVIEW.getCode()); - cerePlatformShop.setAuthenType(IntegerEnum.ORGANIZATION.getCode()); - cerePlatformShop.setCheckState(IntegerEnum.UNTREATED.getCode()); - cerePlatformShop.setCreateTime(time); - cerePlatformShop.setShopName(param.getShopName()); - cerePlatformShop.setChargePersonName(param.getChargePersonName()); - cerePlatformShop.setChargePersonPhone(param.getChargePersonPhone()); - cerePlatformShop.setShopAdress(param.getShopAdress()); - cerePlatformShop.setState(IntegerEnum.YES.getCode()); - cerePlatformShop.setShopPassword(EncryptUtil.encrypt("123456")); - cerePlatformShopService.insert(cerePlatformShop); - //同步新增商家用户数据 CerePlatformBusiness cerePlatformBusiness=new CerePlatformBusiness(); + cerePlatformBusiness.setBusinessPhone(param.getShopPhone()); + cerePlatformBusiness.setBusinessCode(commonService.getBusinessCode()); + cerePlatformBusiness.setAuthenticationState(IntegerEnum.UNDER_REVIEW.getCode()); + cerePlatformBusiness.setAuthenType(IntegerEnum.ORGANIZATION.getCode()); + cerePlatformBusiness.setCheckState(IntegerEnum.UNTREATED.getCode()); cerePlatformBusiness.setCreateTime(time); - cerePlatformBusiness.setUsername(cerePlatformShop.getShopPhone()); - cerePlatformBusiness.setPhone(cerePlatformShop.getShopPhone()); - cerePlatformBusiness.setPassword(cerePlatformShop.getShopPassword()); - cerePlatformBusiness.setName(cerePlatformShop.getChargePersonName()); + cerePlatformBusiness.setBusinessName(param.getShopName()); + cerePlatformBusiness.setChargePersonName(param.getChargePersonName()); + cerePlatformBusiness.setChargePersonPhone(param.getChargePersonPhone()); + cerePlatformBusiness.setBusinessAdress(param.getShopAdress()); +// cerePlatformBusiness.setBusinessAdressProvince(param.getShopAdressProvince()); +// cerePlatformBusiness.setBusinessAdressCity(param.getShopAdressCity()); +// cerePlatformBusiness.setBusinessAdressDetail(param.getShopAdressDetail()); +// cerePlatformBusiness.setBusinessAdress(param.getShopAdressProvince() + param.getShopAdressCity() + StringUtils.trimToEmpty(param.getShopAdressDetail())); cerePlatformBusiness.setState(IntegerEnum.YES.getCode()); + cerePlatformBusiness.setContractState(IntegerEnum.YES.getCode()); + cerePlatformBusiness.setEffectiveDate(time); + cerePlatformBusiness.setEffectiveYear(1); +// cerePlatformBusiness.setShopPassword(EncryptUtil.encrypt("123456")); cerePlatformBusinessService.insert(cerePlatformBusiness); + //同步新增商家用户数据 + CerePlatformBusinessUser cerePlatformBusinessUser =new CerePlatformBusinessUser(); + cerePlatformBusinessUser.setCreateTime(time); + cerePlatformBusinessUser.setPhone(param.getShopPhone()); + cerePlatformBusinessUser.setUsername(param.getShopPhone()); + cerePlatformBusinessUser.setPassword(EncryptUtil.encrypt("123456")); + cerePlatformBusinessUser.setName(cerePlatformBusiness.getChargePersonName()); + cerePlatformBusinessUser.setState(IntegerEnum.YES.getCode()); + cerePlatformBusinessUserService.insert(cerePlatformBusinessUser); //同步新增商家用户绑定店铺数据 - CereBusinessShop cereBusinessShop=new CereBusinessShop(); - cereBusinessShop.setBusinessUserId(cerePlatformBusiness.getBusinessUserId()); - cereBusinessShop.setShopId(cerePlatformShop.getShopId()); - cereBusinessShop.setIfBinding(IntegerEnum.YES.getCode()); - cereBusinessShopService.insert(cereBusinessShop); + CereBusinessUser cereBusinessUser =new CereBusinessUser(); + cereBusinessUser.setBusinessUserId(cerePlatformBusinessUser.getBusinessUserId()); + cereBusinessUser.setBusinessId(cerePlatformBusiness.getBusinessId()); + cereBusinessUser.setIfBinding(IntegerEnum.YES.getCode()); + cereBusinessUserService.insert(cereBusinessUser); //新增店铺认证个人数据 param.setCreateTime(time); - param.setShopId(cereBusinessShop.getShopId()); - cereShopOtherOrganizationsDAO.insertParam(param); + param.setBusinessId(cereBusinessUser.getBusinessId()); + cereShopOtherOrganizationsDAO.insertSelective(param); if(user!=null){ //新增日志 - cerePlatformLogService.addLog(user,"入驻申请","客户端操作","提交其他组织入驻申请",cerePlatformShop.getShopId(),time); + cerePlatformLogService.addLog(user,"入驻申请","客户端操作","提交其他组织入驻申请",cerePlatformBusiness.getBusinessId(),time); } } @@ -134,16 +141,21 @@ public class CereShopOtherOrganizationsServiceImpl implements CereShopOtherOrgan public void updateOrganizationsCheck(CereShopOtherOrganizationsParam param, CereBuyerUser user) throws CoBusinessException { //更新店铺数据 String time=TimeUtils.yyMMddHHmmss(); - CerePlatformShop cerePlatformShop=new CerePlatformShop(); - cerePlatformShop.setShopId(param.getShopId()); - cerePlatformShop.setShopName(param.getShopName()); - cerePlatformShop.setChargePersonPhone(param.getChargePersonPhone()); - cerePlatformShop.setChargePersonName(param.getChargePersonName()); - cerePlatformShop.setShopAdress(param.getShopAdress()); - cerePlatformShop.setUpdateTime(time); - cerePlatformShopService.update(cerePlatformShop); + CerePlatformBusiness cerePlatformBusiness=new CerePlatformBusiness(); + cerePlatformBusiness.setBusinessId(param.getBusinessId()); + cerePlatformBusiness.setBusinessName(param.getShopName()); + cerePlatformBusiness.setBusinessPhone(param.getShopPhone()); + cerePlatformBusiness.setChargePersonPhone(param.getChargePersonPhone()); + cerePlatformBusiness.setChargePersonName(param.getChargePersonName()); + cerePlatformBusiness.setBusinessAdress(param.getShopAdress()); +// cerePlatformBusiness.setBusinessAdressProvince(param.getShopAdressProvince()); +// cerePlatformBusiness.setBusinessAdressCity(param.getShopAdressCity()); +// cerePlatformBusiness.setBusinessAdressDetail(param.getShopAdressDetail()); +// cerePlatformBusiness.setBusinessAdress(param.getShopAdressProvince() + param.getShopAdressCity() + StringUtils.trimToEmpty(param.getShopAdressDetail())); + cerePlatformBusiness.setUpdateTime(time); + cerePlatformBusinessService.update(cerePlatformBusiness); //查询是否存在认证数据 - CereShopOtherOrganizations cereShopOtherOrganizations=cereShopOtherOrganizationsDAO.findByShopId(param.getShopId()); + CereShopOtherOrganizations cereShopOtherOrganizations=cereShopOtherOrganizationsDAO.findByBusinessId(param.getBusinessId()); if(cereShopOtherOrganizations!=null){ //更新认证数据 param.setUpdateTime(time); @@ -154,6 +166,6 @@ public class CereShopOtherOrganizationsServiceImpl implements CereShopOtherOrgan cereShopOtherOrganizationsDAO.insertParam(param); } //新增日志 - cerePlatformLogService.addLog(user,"入驻申请","客户端操作","修改其他组织入驻申请",cerePlatformShop.getShopId(),time); + cerePlatformLogService.addLog(user,"入驻申请","客户端操作","修改其他组织入驻申请",cerePlatformBusiness.getBusinessId(),time); } } diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/service/shop/impl/CereShopPersonalServiceImpl.java b/cereshop-app/src/main/java/com/shop/cereshop/app/service/shop/impl/CereShopPersonalServiceImpl.java index 81c55c2..a4bd898 100644 --- a/cereshop-app/src/main/java/com/shop/cereshop/app/service/shop/impl/CereShopPersonalServiceImpl.java +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/service/shop/impl/CereShopPersonalServiceImpl.java @@ -5,20 +5,20 @@ */ package com.shop.cereshop.app.service.shop.impl; -import com.shop.cereshop.app.dao.shop.CereShopPersonalDAO; +import com.shop.cereshop.app.dao.business.CereShopPersonalDAO; import com.shop.cereshop.app.param.shop.CereShopPersonalParam; -import com.shop.cereshop.app.service.business.CereBusinessShopService; +import com.shop.cereshop.app.service.business.CereBusinessUserService; import com.shop.cereshop.app.service.business.CerePlatformBusinessService; +import com.shop.cereshop.app.service.business.CerePlatformBusinessUserService; import com.shop.cereshop.app.service.common.CommonService; import com.shop.cereshop.app.service.log.CerePlatformLogService; -import com.shop.cereshop.app.service.shop.CerePlatformShopService; import com.shop.cereshop.app.service.shop.CereShopPersonalService; import com.shop.cereshop.commons.constant.IntegerEnum; -import com.shop.cereshop.commons.domain.business.CereBusinessShop; +import com.shop.cereshop.commons.domain.business.CereBusinessUser; import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; +import com.shop.cereshop.commons.domain.business.CereShopPersonal; import com.shop.cereshop.commons.domain.buyer.CereBuyerUser; -import com.shop.cereshop.commons.domain.shop.CerePlatformShop; -import com.shop.cereshop.commons.domain.shop.CereShopPersonal; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.utils.EncryptUtil; import com.shop.cereshop.commons.utils.TimeUtils; @@ -35,16 +35,16 @@ public class CereShopPersonalServiceImpl implements CereShopPersonalService { private CereShopPersonalDAO cereShopPersonalDAO; @Autowired - private CerePlatformShopService cerePlatformShopService; + private CerePlatformBusinessService cerePlatformBusinessService; @Autowired private CommonService commonService; @Autowired - private CerePlatformBusinessService cerePlatformBusinessService; + private CerePlatformBusinessUserService cerePlatformBusinessUserService; @Autowired - private CereBusinessShopService cereBusinessShopService; + private CereBusinessUserService cereBusinessUserService; @Autowired private CerePlatformLogService cerePlatformLogService; @@ -56,14 +56,14 @@ public class CereShopPersonalServiceImpl implements CereShopPersonalService { personal.setCreateTime(time); cereShopPersonalDAO.insert(personal); //更新店铺认证状态 - CerePlatformShop cerePlatformShop=new CerePlatformShop(); - cerePlatformShop.setShopId(personal.getShopId()); - cerePlatformShop.setAuthenticationState(IntegerEnum.UNDER_REVIEW.getCode()); - cerePlatformShop.setAuthenType(IntegerEnum.PERSONAL.getCode()); - cerePlatformShop.setUpdateTime(time); - cerePlatformShopService.updateState(cerePlatformShop); + CerePlatformBusiness cerePlatformBusiness=new CerePlatformBusiness(); + cerePlatformBusiness.setBusinessId(personal.getBusinessId()); + cerePlatformBusiness.setAuthenticationState(IntegerEnum.UNDER_REVIEW.getCode()); + cerePlatformBusiness.setAuthenType(IntegerEnum.PERSONAL.getCode()); + cerePlatformBusiness.setUpdateTime(time); + cerePlatformBusinessService.update(cerePlatformBusiness); //新增日志 - cerePlatformLogService.addLog(user,"店铺管理","客户端操作","提交个人认证信息",personal.getShopId(),time); + cerePlatformLogService.addLog(user,"店铺管理","客户端操作","提交个人认证信息",personal.getBusinessId(),time); } @Override @@ -73,12 +73,12 @@ public class CereShopPersonalServiceImpl implements CereShopPersonalService { personal.setUpdateTime(time); cereShopPersonalDAO.updatePersonal(personal); //新增日志 - cerePlatformLogService.addLog(user,"店铺管理","客户端操作","修改个人认证信息",personal.getShopId(),time); + cerePlatformLogService.addLog(user,"店铺管理","客户端操作","修改个人认证信息",personal.getBusinessId(),time); } @Override - public CereShopPersonal findByShopId(Long shopId) { - return cereShopPersonalDAO.findByShopId(shopId); + public CereShopPersonal findByBusinessId(Long shopId) { + return cereShopPersonalDAO.findByBusinessId(shopId); } @Override @@ -86,42 +86,52 @@ public class CereShopPersonalServiceImpl implements CereShopPersonalService { public void personalCheck(CereShopPersonalParam param, CereBuyerUser user) throws CoBusinessException { String time=TimeUtils.yyMMddHHmmss(); //新增店铺数据 - CerePlatformShop cerePlatformShop=new CerePlatformShop(); - cerePlatformShop.setShopPhone(param.getShopPhone()); - cerePlatformShop.setShopCode(commonService.getShopCode()); - cerePlatformShop.setAuthenticationState(IntegerEnum.UNDER_REVIEW.getCode()); - cerePlatformShop.setAuthenType(IntegerEnum.PERSONAL.getCode()); - cerePlatformShop.setCheckState(IntegerEnum.UNTREATED.getCode()); - cerePlatformShop.setCreateTime(time); - cerePlatformShop.setShopName(param.getShopName()); - cerePlatformShop.setChargePersonName(param.getChargePersonName()); - cerePlatformShop.setChargePersonPhone(param.getChargePersonPhone()); - cerePlatformShop.setShopAdress(param.getShopAdress()); - cerePlatformShop.setState(IntegerEnum.YES.getCode()); - cerePlatformShop.setShopPassword(EncryptUtil.encrypt("123456")); - cerePlatformShopService.insert(cerePlatformShop); - //同步新增商家用户数据 CerePlatformBusiness cerePlatformBusiness=new CerePlatformBusiness(); + cerePlatformBusiness.setBusinessPhone(param.getShopPhone()); + cerePlatformBusiness.setBusinessCode(commonService.getBusinessCode()); + cerePlatformBusiness.setAuthenticationState(IntegerEnum.UNDER_REVIEW.getCode()); + cerePlatformBusiness.setAuthenType(IntegerEnum.PERSONAL.getCode()); + cerePlatformBusiness.setCheckState(IntegerEnum.UNTREATED.getCode()); cerePlatformBusiness.setCreateTime(time); - cerePlatformBusiness.setUsername(cerePlatformShop.getShopPhone()); - cerePlatformBusiness.setPhone(cerePlatformShop.getShopPhone()); - cerePlatformBusiness.setPassword(cerePlatformShop.getShopPassword()); - cerePlatformBusiness.setName(cerePlatformShop.getChargePersonName()); + cerePlatformBusiness.setBusinessName(param.getShopName()); + cerePlatformBusiness.setChargePersonName(param.getChargePersonName()); + cerePlatformBusiness.setChargePersonPhone(param.getChargePersonPhone()); +// cerePlatformBusiness.setBusinessAdressProvince(param.getShopAdressProvince()); +// cerePlatformBusiness.setBusinessAdressCity(param.getShopAdressCity()); +// cerePlatformBusiness.setBusinessAdressDetail(param.getShopAdressDetail()); +// cerePlatformBusiness.setBusinessAdress(param.getShopAdressProvince() + param.getShopAdressCity() + StringUtils.trimToEmpty(param.getShopAdressDetail())); + cerePlatformBusiness.setBusinessAdress(param.getShopAdress()); cerePlatformBusiness.setState(IntegerEnum.YES.getCode()); + cerePlatformBusiness.setContractState(IntegerEnum.YES.getCode()); + cerePlatformBusiness.setEffectiveDate(time); + cerePlatformBusiness.setEffectiveYear(1); +// cerePlatformBusiness.setShopPassword(EncryptUtil.encrypt("123456")); cerePlatformBusinessService.insert(cerePlatformBusiness); + //同步新增商家用户数据 + CerePlatformBusinessUser cerePlatformBusinessUser =new CerePlatformBusinessUser(); + cerePlatformBusinessUser.setCreateTime(time); + cerePlatformBusinessUser.setUsername(param.getShopPhone()); + cerePlatformBusinessUser.setPhone(param.getShopPhone()); + cerePlatformBusinessUser.setPassword(EncryptUtil.encrypt("123456")); + cerePlatformBusinessUser.setName(cerePlatformBusiness.getChargePersonName()); + cerePlatformBusinessUser.setState(IntegerEnum.YES.getCode()); + cerePlatformBusinessUserService.insert(cerePlatformBusinessUser); //同步新增商家用户绑定店铺数据 - CereBusinessShop cereBusinessShop=new CereBusinessShop(); - cereBusinessShop.setBusinessUserId(cerePlatformBusiness.getBusinessUserId()); - cereBusinessShop.setShopId(cerePlatformShop.getShopId()); - cereBusinessShop.setIfBinding(IntegerEnum.YES.getCode()); - cereBusinessShopService.insert(cereBusinessShop); + CereBusinessUser cereBusinessUser =new CereBusinessUser(); + cereBusinessUser.setBusinessUserId(cerePlatformBusinessUser.getBusinessUserId()); + cereBusinessUser.setBusinessId(cerePlatformBusiness.getBusinessId()); + cereBusinessUser.setIfBinding(IntegerEnum.YES.getCode()); + cereBusinessUser.setIsMainUser(IntegerEnum.YES.getCode()); + cereBusinessUserService.insert(cereBusinessUser); + //新增店铺认证个人数据 param.setCreateTime(time); - param.setShopId(cereBusinessShop.getShopId()); + param.setBusinessId(cereBusinessUser.getBusinessId()); cereShopPersonalDAO.insertParam(param); + if(user!=null){ //新增日志 - cerePlatformLogService.addLog(user,"入驻申请","客户端操作","提交个人入驻申请",cerePlatformShop.getShopId(),time); + cerePlatformLogService.addLog(user,"入驻申请","客户端操作","提交个人入驻申请",cerePlatformBusiness.getBusinessId(),time); } } @@ -130,16 +140,21 @@ public class CereShopPersonalServiceImpl implements CereShopPersonalService { public void updatePersonalCheck(CereShopPersonalParam param, CereBuyerUser user) throws CoBusinessException { //更新店铺数据 String time=TimeUtils.yyMMddHHmmss(); - CerePlatformShop cerePlatformShop=new CerePlatformShop(); - cerePlatformShop.setShopId(param.getShopId()); - cerePlatformShop.setShopName(param.getShopName()); - cerePlatformShop.setChargePersonPhone(param.getChargePersonPhone()); - cerePlatformShop.setChargePersonName(param.getChargePersonName()); - cerePlatformShop.setShopAdress(param.getShopAdress()); - cerePlatformShop.setUpdateTime(time); - cerePlatformShopService.update(cerePlatformShop); + CerePlatformBusiness cerePlatformBusiness=new CerePlatformBusiness(); + cerePlatformBusiness.setBusinessId(param.getBusinessId()); + cerePlatformBusiness.setBusinessName(param.getShopName()); + cerePlatformBusiness.setBusinessPhone(param.getShopPhone()); + cerePlatformBusiness.setChargePersonPhone(param.getChargePersonPhone()); + cerePlatformBusiness.setChargePersonName(param.getChargePersonName()); +// cerePlatformBusiness.setBusinessAdressProvince(param.getShopAdressProvince()); +// cerePlatformBusiness.setBusinessAdressCity(param.getShopAdressCity()); +// cerePlatformBusiness.setBusinessAdressDetail(param.getShopAdressDetail()); +// cerePlatformBusiness.setBusinessAdress(param.getShopAdressProvince() + param.getShopAdressCity() + StringUtils.trimToEmpty(param.getShopAdressDetail())); + cerePlatformBusiness.setBusinessAdress(param.getShopAdress()); + cerePlatformBusiness.setUpdateTime(time); + cerePlatformBusinessService.update(cerePlatformBusiness); //查询是否存在认证数据 - CereShopPersonal cereShopPersonal=cereShopPersonalDAO.findByShopId(param.getShopId()); + CereShopPersonal cereShopPersonal=cereShopPersonalDAO.findByBusinessId(param.getBusinessId()); if(cereShopPersonal!=null){ //更新认证数据 param.setUpdateTime(time); @@ -150,6 +165,6 @@ public class CereShopPersonalServiceImpl implements CereShopPersonalService { cereShopPersonalDAO.insertParam(param); } //新增日志 - cerePlatformLogService.addLog(user,"入驻申请","客户端操作","修改个人入驻申请",cerePlatformShop.getShopId(),time); + cerePlatformLogService.addLog(user,"入驻申请","客户端操作","修改个人入驻申请",cerePlatformBusiness.getBusinessId(),time); } } diff --git a/cereshop-app/src/main/java/com/shop/cereshop/app/utils/ContextUtil.java b/cereshop-app/src/main/java/com/shop/cereshop/app/utils/ContextUtil.java new file mode 100644 index 0000000..fb4590b --- /dev/null +++ b/cereshop-app/src/main/java/com/shop/cereshop/app/utils/ContextUtil.java @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.app.utils; + +import com.shop.cereshop.commons.constant.CoReturnFormat; +import com.shop.cereshop.commons.exception.CoBusinessException; +import com.shop.cereshop.commons.utils.ProjectUtil; +import com.shop.cereshop.commons.utils.StringUtils; +import org.springframework.stereotype.Component; + +@Component +public class ContextUtil { + static ThreadLocal projectTL = new ThreadLocal<>(); + + public static void setProject(String project){ + projectTL.set(project); + } + + public static void clearProject(){ + projectTL.set(null); + } + + public static String getProject(){ + String project = projectTL.get(); + if(StringUtils.isEmpty(project)) { + return ProjectUtil.DEFAULT_PROJECT; + }else { + return project; + } + } +} diff --git a/cereshop-app/src/main/resources/mybatis/mapper/business/CereBusinessShopDAO.xml b/cereshop-app/src/main/resources/mybatis/mapper/business/CereBusinessShopDAO.xml deleted file mode 100644 index a9784db..0000000 --- a/cereshop-app/src/main/resources/mybatis/mapper/business/CereBusinessShopDAO.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - insert into cere_business_shop - - - business_user_id, - - - shop_id, - - - if_binding, - - - - - #{businessUserId,jdbcType=BIGINT}, - - - #{shopId,jdbcType=BIGINT}, - - - #{ifBinding,jdbcType=BIT}, - - - - diff --git a/cereshop-app/src/main/resources/mybatis/mapper/business/CereBusinessUserDAO.xml b/cereshop-app/src/main/resources/mybatis/mapper/business/CereBusinessUserDAO.xml new file mode 100644 index 0000000..592085e --- /dev/null +++ b/cereshop-app/src/main/resources/mybatis/mapper/business/CereBusinessUserDAO.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + insert into cere_business_user + + + business_user_id, + + + business_id, + + + if_binding, + + + is_main_user, + + + + + #{businessUserId,jdbcType=BIGINT}, + + + #{businessId,jdbcType=BIGINT}, + + + #{ifBinding,jdbcType=BIT}, + + + #{isMainUser,jdbcType=BIT}, + + + + diff --git a/cereshop-app/src/main/resources/mybatis/mapper/business/CerePlatformBusinessDAO.xml b/cereshop-app/src/main/resources/mybatis/mapper/business/CerePlatformBusinessDAO.xml index 2988af1..7226499 100644 --- a/cereshop-app/src/main/resources/mybatis/mapper/business/CerePlatformBusinessDAO.xml +++ b/cereshop-app/src/main/resources/mybatis/mapper/business/CerePlatformBusinessDAO.xml @@ -2,147 +2,323 @@ - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - business_user_id, username, `password`, `name`, sex, email,token, `state`, create_time, - update_time + business_id, business_code, business_name, business_brief, business_phone, charge_person_name, + charge_person_phone, business_adress_province, business_adress_city, business_adress_detail, business_adress, + business_logo, effective_date, effective_year, contract_state, + authentication_state, check_state, `state`,authen_type,wx_image,ailpay_image, create_time, update_time, xs_pay_id, share_days delete from cere_platform_business - where business_user_id = #{businessUserId,jdbcType=BIGINT} + where business_id = #{businessId,jdbcType=BIGINT} - + insert into cere_platform_business - - username, + + business_code, - - `password`, + + business_name, - - `name`, + + business_brief, - - sex, + + business_phone, - - email, + + charge_person_name, - - token, + + charge_person_phone, + + + business_adress_province, + + + business_adress_city, + + + business_adress_detail, + + + business_adress, + + + business_logo, + + + effective_date, + + + effective_year, + + + contract_state, + + + authentication_state, + + + check_state, `state`, + + authen_type, + + + wx_image, + + + ailpay_image, + create_time, update_time, + + xs_pay_id, + + + share_days + - - #{username,jdbcType=VARCHAR}, + + #{businessCode,jdbcType=VARCHAR}, - - #{password,jdbcType=VARCHAR}, + + #{businessName,jdbcType=VARCHAR}, - - #{name,jdbcType=VARCHAR}, + + #{businessBrief,jdbcType=VARCHAR}, - - #{sex,jdbcType=VARCHAR}, + + #{businessPhone,jdbcType=VARCHAR}, - - #{email,jdbcType=VARCHAR}, + + #{chargePersonName,jdbcType=VARCHAR}, - - #{token,jdbcType=VARCHAR}, + + #{chargePersonPhone,jdbcType=VARCHAR}, + + + #{businessAdressProvince,jdbcType=VARCHAR}, + + + #{businessAdressCity,jdbcType=VARCHAR}, + + + #{businessAdressDetail,jdbcType=VARCHAR}, + + + #{businessAdress,jdbcType=VARCHAR}, + + + #{businessLogo,jdbcType=VARCHAR}, + + + #{effectiveDate,jdbcType=VARCHAR}, + + + #{effectiveYear,jdbcType=INTEGER}, + + + #{contractState,jdbcType=BIT}, + + + #{authenticationState,jdbcType=BIT}, + + + #{checkState,jdbcType=BIT}, #{state,jdbcType=BIT}, + + #{authenType,jdbcType=BIT}, + + + #{wxImage,jdbcType=VARCHAR}, + + + #{ailpayImage,jdbcType=VARCHAR}, + #{createTime,jdbcType=VARCHAR}, #{updateTime,jdbcType=VARCHAR}, + + #{xsPayId,jdbcType=VARCHAR}, + + + #{shareDays,jdbcType=INTEGER} + update cere_platform_business - - username = #{username,jdbcType=VARCHAR}, + + business_code = #{businessCode,jdbcType=VARCHAR}, + + + business_name = #{businessName,jdbcType=VARCHAR}, + + + business_brief = #{businessBrief,jdbcType=VARCHAR}, + + + business_phone = #{businessPhone,jdbcType=VARCHAR}, + + + charge_person_name = #{chargePersonName,jdbcType=VARCHAR}, + + + charge_person_phone = #{chargePersonPhone,jdbcType=VARCHAR}, + + + business_adress_province = #{businessAdressProvince,jdbcType=VARCHAR}, - - `password` = #{password,jdbcType=VARCHAR}, + + business_adress_city = #{businessAdressCity,jdbcType=VARCHAR}, - - `name` = #{name,jdbcType=VARCHAR}, + + business_adress_detail = #{businessAdressDetail,jdbcType=VARCHAR}, - - sex = #{sex,jdbcType=VARCHAR}, + + business_adress = #{businessAdress,jdbcType=VARCHAR}, - - email = #{email,jdbcType=VARCHAR}, + + business_logo = #{businessLogo,jdbcType=VARCHAR}, - - token = #{token,jdbcType=VARCHAR}, + + share_days = #{shareDays,jdbcType=INTEGER}, + + + effective_date = #{effectiveDate,jdbcType=VARCHAR}, + + + effective_year = #{effectiveYear,jdbcType=INTEGER}, + + + contract_state = #{contractState,jdbcType=BIT}, + + + authentication_state = #{authenticationState,jdbcType=BIT}, + + + check_state = #{checkState,jdbcType=BIT}, `state` = #{state,jdbcType=BIT}, + + authen_type = #{authenType,jdbcType=BIT}, + + + wx_image = #{wxImage,jdbcType=VARCHAR}, + + + ailpay_image = #{ailpayImage,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=VARCHAR}, update_time = #{updateTime,jdbcType=VARCHAR}, + + xs_pay_id = #{xsPayId,jdbcType=VARCHAR} + + + share_days = #{shareDays,jdbcType=INTEGER} + - where business_user_id = #{businessUserId,jdbcType=BIGINT} - - - update cere_platform_business - set username = #{username,jdbcType=VARCHAR}, - `password` = #{password,jdbcType=VARCHAR}, - `name` = #{name,jdbcType=VARCHAR}, - sex = #{sex,jdbcType=VARCHAR}, - email = #{email,jdbcType=VARCHAR}, - token = #{token,jdbcType=VARCHAR}, - `state` = #{state,jdbcType=BIT}, - create_time = #{createTime,jdbcType=VARCHAR}, - update_time = #{updateTime,jdbcType=VARCHAR} - where business_user_id = #{businessUserId,jdbcType=BIGINT} + where business_id = #{businessId,jdbcType=BIGINT} - + SELECT + business_id, + business_logo, + business_name, + business_phone, + business_adress, + charge_person_name, + charge_person_phone, + business_brief, + authen_type, + authentication_state, + xs_pay_id, + share_days + FROM cere_platform_business - select from cere_platform_business - where phone = #{phone} + where business_id in ( + + #{businessId} + + ) + + + + + + + + + + diff --git a/cereshop-app/src/main/resources/mybatis/mapper/business/CerePlatformBusinessUserDAO.xml b/cereshop-app/src/main/resources/mybatis/mapper/business/CerePlatformBusinessUserDAO.xml new file mode 100644 index 0000000..6d2cd71 --- /dev/null +++ b/cereshop-app/src/main/resources/mybatis/mapper/business/CerePlatformBusinessUserDAO.xml @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + business_user_id, username, `password`, `name`, avatar, phone, sex, email, token, `state`, create_time, + update_time + + + + delete from cere_platform_business_user + where business_user_id = #{businessUserId,jdbcType=BIGINT} + + + update cere_platform_business_user + + + username = #{username,jdbcType=VARCHAR}, + + + `password` = #{password,jdbcType=VARCHAR}, + + + `name` = #{name,jdbcType=VARCHAR}, + + + avatar = #{avatar,jdbcType=VARCHAR}, + + + phone = #{phone,jdbcType=VARCHAR}, + + + sex = #{sex,jdbcType=VARCHAR}, + + + email = #{email,jdbcType=VARCHAR}, + + + token = #{token,jdbcType=VARCHAR}, + + + `state` = #{state,jdbcType=BIT}, + + + create_time = #{createTime,jdbcType=VARCHAR}, + + + update_time = #{updateTime,jdbcType=VARCHAR}, + + + where business_user_id = #{businessUserId,jdbcType=BIGINT} + + + insert into cere_platform_business_user + + + username, + + + `password`, + + + `name`, + + + avatar, + + + phone, + + + sex, + + + email, + + + token, + + + `state`, + + + create_time, + + + update_time, + + + + + #{username,jdbcType=VARCHAR}, + + + #{password,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{avatar,jdbcType=VARCHAR}, + + + #{phone,jdbcType=VARCHAR}, + + + #{sex,jdbcType=VARCHAR}, + + + #{email,jdbcType=VARCHAR}, + + + #{token,jdbcType=VARCHAR}, + + + #{state,jdbcType=BIT}, + + + #{createTime,jdbcType=VARCHAR}, + + + #{updateTime,jdbcType=VARCHAR}, + + + + + update cere_platform_business_user + set username = #{username,jdbcType=VARCHAR}, + `password` = #{password,jdbcType=VARCHAR}, + `name` = #{name,jdbcType=VARCHAR}, + avatar = #{avatar,jdbcType=VARCHAR}, + phone = #{phone,jdbcType=VARCHAR}, + sex = #{sex,jdbcType=VARCHAR}, + email = #{email,jdbcType=VARCHAR}, + token = #{token,jdbcType=VARCHAR}, + `state` = #{state,jdbcType=BIT}, + create_time = #{createTime,jdbcType=VARCHAR}, + update_time = #{updateTime,jdbcType=VARCHAR} + where business_user_id = #{businessUserId,jdbcType=BIGINT} + + + + + + diff --git a/cereshop-app/src/main/resources/mybatis/mapper/buyer/CereBuyerUserDAO.xml b/cereshop-app/src/main/resources/mybatis/mapper/buyer/CereBuyerUserDAO.xml index bb22047..68a5135 100644 --- a/cereshop-app/src/main/resources/mybatis/mapper/buyer/CereBuyerUserDAO.xml +++ b/cereshop-app/src/main/resources/mybatis/mapper/buyer/CereBuyerUserDAO.xml @@ -25,11 +25,12 @@ + buyer_user_id, `name`, sex, birthday, real_name, id_card, wechat_open_id, wechat_union_id, wechat_name, wechat_number, ali_user_id, phone, real_name, id_card, `password`, head_image, `state`,if_black, remark, - token, member_level_id, growth, credit, create_time, update_time + token, member_level_id, growth, credit, create_time, update_time,project SELECT buyer_user_id,IF(wechat_name IS NULL,`name`,wechat_name) wechat_name,token,phone,head_image,member_level_id, - growth, credit, if_black FROM cere_buyer_user where wechat_open_id=#{openid} + growth, credit, if_black FROM cere_buyer_user where wechat_open_id=#{openid} AND project=#{project} - + SELECT buyer_user_id,IF(wechat_name IS NULL,`name`,wechat_name) wechat_name,token,state,if_black,phone,member_level_id,growth,credit FROM cere_buyer_user where project=#{project} AND phone=#{phone} @@ -351,19 +362,22 @@ where a.buyer_user_id = #{buyerUserId} - + SELECT * FROM cere_platform_canvas WHERE terminal=#{canvas.terminal} + and type = #{canvas.type} + + and project=#{canvas.project} + + + and shop_id=#{canvas.shopId} diff --git a/cereshop-app/src/main/resources/mybatis/mapper/product/CereProductClassifyDAO.xml b/cereshop-app/src/main/resources/mybatis/mapper/product/CereProductClassifyDAO.xml index b29ce78..6e34b34 100644 --- a/cereshop-app/src/main/resources/mybatis/mapper/product/CereProductClassifyDAO.xml +++ b/cereshop-app/src/main/resources/mybatis/mapper/product/CereProductClassifyDAO.xml @@ -11,6 +11,7 @@ + @@ -23,7 +24,7 @@ classify_id, classify_pid, classify_hierarchy, classify_level, classify_level_hierarchy, - classify_name, classify_image, sort, link, create_time, update_time + classify_name, classify_image, sort, link, project, create_time, update_time - SELECT classify_id,classify_name from cere_product_classify where classify_level=1 + SELECT a.shop_id,a.shop_name from cere_platform_shop a @@ -396,7 +385,7 @@ - SELECT * FROM cere_shop_enterprise where shop_id=#{shopId} + diff --git a/cereshop-app/src/main/resources/mybatis/mapper/shop/CereShopIndividualBusinessesDAO.xml b/cereshop-app/src/main/resources/mybatis/mapper/shop/CereShopIndividualBusinessesDAO.xml index f4eb6c7..f1d917d 100644 --- a/cereshop-app/src/main/resources/mybatis/mapper/shop/CereShopIndividualBusinessesDAO.xml +++ b/cereshop-app/src/main/resources/mybatis/mapper/shop/CereShopIndividualBusinessesDAO.xml @@ -1,8 +1,8 @@ - - - + + + @@ -34,7 +34,7 @@ - insert into cere_shop_individual_businesses (shop_id, subject_name, + insert into cere_shop_individual_businesses (business_id, subject_name, subject_code, subject_region, subject_adress, subject_start_time, subject_end_time, subject_license, subject_operator, subject_card_type, subject_id_card, @@ -45,7 +45,7 @@ service_phone, service_providing, shop_index_image, shop_backstage_image, remark, create_time, update_time) - values (#{shopId,jdbcType=BIGINT}, #{subjectName,jdbcType=VARCHAR}, + values (#{businessId,jdbcType=BIGINT}, #{subjectName,jdbcType=VARCHAR}, #{subjectCode,jdbcType=VARCHAR}, #{subjectRegion,jdbcType=VARCHAR}, #{subjectAdress,jdbcType=VARCHAR}, #{subjectStartTime,jdbcType=VARCHAR}, #{subjectEndTime,jdbcType=VARCHAR}, #{subjectLicense,jdbcType=VARCHAR}, #{subjectOperator,jdbcType=VARCHAR}, #{subjectCardType,jdbcType=BIGINT}, #{subjectIdCard,jdbcType=VARCHAR}, @@ -58,11 +58,11 @@ #{createTime,jdbcType=VARCHAR}, #{updateTime,jdbcType=VARCHAR}) - + insert into cere_shop_individual_businesses - - shop_id, + + business_id, subject_name, @@ -150,8 +150,8 @@ - - #{shopId,jdbcType=BIGINT}, + + #{businessId,jdbcType=BIGINT}, #{subjectName,jdbcType=VARCHAR}, @@ -240,7 +240,7 @@ - + UPDATE cere_shop_individual_businesses @@ -325,7 +325,7 @@ update_time = #{updateTime,jdbcType=VARCHAR}, - where shop_id=#{shopId} + where business_id=#{businessId} @@ -413,10 +413,10 @@ update_time = #{updateTime,jdbcType=VARCHAR}, - where shop_id=#{shopId} + where business_id=#{businessId} - + SELECT * FROM cere_shop_individual_businesses where business_id=#{businessId} diff --git a/cereshop-app/src/main/resources/mybatis/mapper/shop/CereShopOtherOrganizationsDAO.xml b/cereshop-app/src/main/resources/mybatis/mapper/shop/CereShopOtherOrganizationsDAO.xml index d9a3ead..e8cb246 100644 --- a/cereshop-app/src/main/resources/mybatis/mapper/shop/CereShopOtherOrganizationsDAO.xml +++ b/cereshop-app/src/main/resources/mybatis/mapper/shop/CereShopOtherOrganizationsDAO.xml @@ -1,8 +1,8 @@ - - - + + + @@ -33,7 +33,7 @@ - insert into cere_shop_other_organizations (shop_id, other_name, + insert into cere_shop_other_organizations (business_id, other_name, other_code, other_region, other_adress, other_start_time, other_end_time, other_license, other_operator, other_card_type, other_id_card, @@ -44,7 +44,7 @@ shop_index_image, shop_backstage_image, remark, create_time, update_time ) - values (#{shopId,jdbcType=BIGINT}, #{otherName,jdbcType=VARCHAR}, + values (#{businessId,jdbcType=BIGINT}, #{otherName,jdbcType=VARCHAR}, #{otherCode,jdbcType=VARCHAR}, #{otherRegion,jdbcType=VARCHAR}, #{otherAdress,jdbcType=VARCHAR}, #{otherStartTime,jdbcType=VARCHAR}, #{otherEndTime,jdbcType=VARCHAR}, #{otherLicense,jdbcType=VARCHAR}, #{otherOperator,jdbcType=VARCHAR}, #{otherCardType,jdbcType=BIGINT}, #{otherIdCard,jdbcType=VARCHAR}, @@ -57,11 +57,11 @@ ) - + insert into cere_shop_other_organizations - - shop_id, + + business_id, other_name, @@ -146,8 +146,8 @@ - - #{shopId,jdbcType=BIGINT}, + + #{businessId,jdbcType=BIGINT}, #{otherName,jdbcType=VARCHAR}, @@ -233,7 +233,7 @@ - + UPDATE cere_shop_other_organizations @@ -315,7 +315,7 @@ update_time = #{updateTime,jdbcType=VARCHAR}, - where shop_id=#{shopId} + where business_id=#{businessId} @@ -400,10 +400,10 @@ update_time = #{updateTime,jdbcType=VARCHAR}, - where shop_id=#{shopId} + where business_id=#{businessId} - + SELECT * FROM cere_shop_other_organizations where business_id=#{businessId} diff --git a/cereshop-app/src/main/resources/mybatis/mapper/shop/CereShopPersonalDAO.xml b/cereshop-app/src/main/resources/mybatis/mapper/shop/CereShopPersonalDAO.xml index c5ebbd1..8a5cf3a 100644 --- a/cereshop-app/src/main/resources/mybatis/mapper/shop/CereShopPersonalDAO.xml +++ b/cereshop-app/src/main/resources/mybatis/mapper/shop/CereShopPersonalDAO.xml @@ -1,8 +1,8 @@ - - - + + + @@ -27,7 +27,7 @@ - insert into cere_shop_personal (shop_id, personal_name, + insert into cere_shop_personal (business_id, personal_name, personal_card_type, personal_id_card, personal_card_start_time, personal_card_end_time, personal_card_positive, personal_card_side, personal_card_hand, administrators_phone, @@ -36,7 +36,7 @@ service_providing, shop_index_image, shop_backstage_image, remark, create_time, update_time) - values (#{shopId,jdbcType=BIGINT}, #{personalName,jdbcType=VARCHAR}, + values (#{businessId,jdbcType=BIGINT}, #{personalName,jdbcType=VARCHAR}, #{personalCardType,jdbcType=BIGINT}, #{personalIdCard,jdbcType=VARCHAR}, #{personalCardStartTime,jdbcType=VARCHAR}, #{personalCardEndTime,jdbcType=VARCHAR}, #{personalCardPositive,jdbcType=VARCHAR}, #{personalCardSide,jdbcType=VARCHAR}, #{personalCardHand,jdbcType=VARCHAR}, #{administratorsPhone,jdbcType=VARCHAR}, @@ -47,11 +47,11 @@ #{updateTime,jdbcType=VARCHAR}) - + insert into cere_shop_personal - - shop_id, + + business_id, personal_name, @@ -118,8 +118,8 @@ - - #{shopId,jdbcType=BIGINT}, + + #{businessId,jdbcType=BIGINT}, #{personalName,jdbcType=VARCHAR}, @@ -190,7 +190,7 @@ - + UPDATE cere_shop_personal @@ -254,10 +254,10 @@ update_time = #{updateTime,jdbcType=VARCHAR}, - where shop_id=#{shopId} + where business_id=#{businessId} - + SELECT * FROM cere_shop_personal where business_id=#{businessId} diff --git a/cereshop-app/src/main/resources/mybatis/mybatis-config.xml b/cereshop-app/src/main/resources/mybatis/mybatis-config.xml index 3a5325d..2af356a 100644 --- a/cereshop-app/src/main/resources/mybatis/mybatis-config.xml +++ b/cereshop-app/src/main/resources/mybatis/mybatis-config.xml @@ -29,6 +29,6 @@ - + \ No newline at end of file diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/AchievementController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/AchievementController.java index e4a6a9c..056105d 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/AchievementController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/AchievementController.java @@ -11,18 +11,14 @@ import com.shop.cereshop.business.page.distribution.Achievement; import com.shop.cereshop.business.page.distribution.AchievementDetai; import com.shop.cereshop.business.param.distributor.*; import com.shop.cereshop.business.service.distributor.CereDistributionOrderService; -import com.shop.cereshop.commons.constant.CoReturnFormat; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.result.Result; -import com.shop.cereshop.commons.utils.EncryptUtil; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; -import javax.servlet.http.HttpServletRequest; - /** * 分销员业绩管理 */ @@ -46,7 +42,7 @@ public class AchievementController { @PostMapping(value = "getAllAchievement") @ApiOperation(value = "分销员业绩管理查询") public Result> getAllAchievement(@RequestBody DistributorGetAllAchievementParam param) throws CoBusinessException{ - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); Page page=cereDistributionOrderService.getAllAchievement(param); return new Result(page); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ActivitySignController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ActivitySignController.java index f6a2874..b8c44b0 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ActivitySignController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ActivitySignController.java @@ -21,7 +21,7 @@ import com.shop.cereshop.business.utils.ContextUtil; import com.shop.cereshop.commons.constant.IntegerEnum; import com.shop.cereshop.commons.constant.StringEnum; import com.shop.cereshop.commons.domain.activity.CereActivitySign; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.shop.CereShopGroup; import com.shop.cereshop.commons.exception.CoBusinessException; @@ -75,8 +75,8 @@ public class ActivitySignController { @ApiOperation(value = "营销活动管理查询") public Result> getAll(@RequestBody ActivitiSignGetAllParam param,HttpServletRequest request) throws CoBusinessException,Exception{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); Page page=cereActivitySignService.getAll(param); return new Result(page); } @@ -92,9 +92,9 @@ public class ActivitySignController { @NoRepeatWebLog public Result save(@RequestBody ActivitySignSaveParam param, HttpServletRequest request) throws CoBusinessException,Exception{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); String ip= AppletPayUtil.getClientIp(request); - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); BondState bondState=cereActivitySignService.save(param,user,ip); return new Result(bondState,user.getUsername(),"报名", GsonUtil.objectToGson(param)); } @@ -108,7 +108,7 @@ public class ActivitySignController { @NoRepeatSubmit @ApiOperation(value = "保证金支付状态查询") public Result checkPay(@RequestBody ActivitySignSaveParam param) throws CoBusinessException,Exception{ - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); BondState code=cereActivitySignService.checkPay(param); return new Result(code); } @@ -247,7 +247,7 @@ public class ActivitySignController { @PostMapping(value = "getProducts") @ApiOperation(value = "选择商品查询") public Result> getProducts(@RequestBody ActivitySignGetProductParam param) throws CoBusinessException{ - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); Page page=cereActivitySignService.getProducts(param); return new Result(page); } @@ -272,7 +272,7 @@ public class ActivitySignController { @PostMapping(value = "getGroups") @ApiOperation(value = "选择商品分组查询") public Result> getGroups(@RequestBody ActivitySignGetGroupParam param) throws CoBusinessException{ - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); List list=cereActivitySignService.getGroups(param.getShopId()); return new Result(list); } @@ -285,7 +285,7 @@ public class ActivitySignController { @PostMapping(value = "getActivitySignDetail") @ApiOperation(value = "查询活动报名详情") public Result getActivitySignDetail(@RequestBody ActivitySignGetByIdParam param, HttpServletRequest request) throws CoBusinessException{ - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); ActivitySignDetail detail=cereActivitySignService.getActivitySignDetail(param.getActivityId(), user); return new Result(detail); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/AfterController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/AfterController.java index 66fb2d0..c6791c6 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/AfterController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/AfterController.java @@ -19,7 +19,7 @@ import com.shop.cereshop.business.service.order.CereOrderDileverService; import com.shop.cereshop.business.utils.ContextUtil; import com.shop.cereshop.commons.constant.IntegerEnum; import com.shop.cereshop.commons.constant.StringEnum; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.enums.AfterTypeEnum; import com.shop.cereshop.commons.enums.OrderStateEnum; @@ -73,7 +73,7 @@ public class AfterController { @PostMapping(value = "getAll") @ApiOperation(value = "售后管理查询") public Result> getAll(@RequestBody AfterGetAllParam param) throws CoBusinessException{ - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); Page page=cereOrderAfterService.getAll(param); return new Result(page); } @@ -101,7 +101,7 @@ public class AfterController { @NoRepeatWebLog public Result refundSuccess(@RequestBody AfterIdParam param, HttpServletRequest request) throws CoBusinessException,Exception{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereOrderAfterService.refundSuccess(param,user); return new Result(user.getUsername(),"仅退款同意退款申请", GsonUtil.objectToGson(param)); } @@ -117,7 +117,7 @@ public class AfterController { @NoRepeatWebLog public Result refundRefuse(@RequestBody AfterIdParam param, HttpServletRequest request) throws CoBusinessException,Exception{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereOrderAfterService.refundRefuse(param,user); return new Result(user.getUsername(),"仅退款拒绝退款申请", GsonUtil.objectToGson(param)); } @@ -133,7 +133,7 @@ public class AfterController { @NoRepeatWebLog public Result dilevery(@RequestBody AfterIdParam param, HttpServletRequest request) throws CoBusinessException,Exception{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereOrderDileverService.refundDilevery(param,user); return new Result(user.getUsername(),"仅退款发货", GsonUtil.objectToGson(param)); } @@ -149,7 +149,7 @@ public class AfterController { @NoRepeatWebLog public Result success(@RequestBody AfterIdParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereOrderAfterService.success(param,user); return new Result(user.getUsername(),"退货退款同意", GsonUtil.objectToGson(param)); } @@ -165,7 +165,7 @@ public class AfterController { @NoRepeatWebLog public Result refuse(@RequestBody AfterIdParam param, HttpServletRequest request) throws CoBusinessException,Exception{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereOrderAfterService.refuse(param,user); return new Result(user.getUsername(),"退货退款拒绝", GsonUtil.objectToGson(param)); } @@ -181,7 +181,7 @@ public class AfterController { @NoRepeatWebLog public Result confirmAndRefund(@RequestBody AfterIdParam param, HttpServletRequest request) throws CoBusinessException,Exception{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereOrderAfterService.confirmAndRefund(param,user); return new Result(user.getUsername(),"退货退款确认收货且退款", GsonUtil.objectToGson(param)); } @@ -197,7 +197,7 @@ public class AfterController { @NoRepeatWebLog public Result damaging(@RequestBody AfterIdParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereOrderAfterService.damaging(param,user); return new Result(user.getUsername(),"退货退款货物有损拒绝退款", GsonUtil.objectToGson(param)); } @@ -247,7 +247,7 @@ public class AfterController { @PostMapping(value = "export") @ApiOperation(value = "售后管理导出") public void export(@RequestBody AfterGetAllParam param, HttpServletRequest request, HttpServletResponse response) throws CoBusinessException{ - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); Page page=cereOrderAfterService.getAll(param); List list = page.getList().stream().map(s -> { AfterExportDTO afterExportDTO = new AfterExportDTO(); diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/BannerController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/BannerController.java index ba5bd77..d9da58a 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/BannerController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/BannerController.java @@ -13,7 +13,7 @@ import com.shop.cereshop.business.param.banner.BannerSaveParam; import com.shop.cereshop.business.param.banner.BannerUpdateParam; import com.shop.cereshop.business.service.shop.CereShopBannerService; import com.shop.cereshop.business.utils.ContextUtil; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.result.Result; import com.shop.cereshop.commons.utils.GsonUtil; @@ -51,8 +51,8 @@ public class BannerController { @NoRepeatWebLog public Result save(@RequestBody BannerSaveParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(ContextUtil.getBusinessId()); cereShopBannerService.save(param,user); return new Result(user.getUsername(),"添加banner", GsonUtil.objectToGson(param)); } @@ -67,8 +67,8 @@ public class BannerController { @ApiOperation(value = "修改banner") public Result update(@RequestBody BannerUpdateParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(ContextUtil.getBusinessId()); cereShopBannerService.update(param,user); return new Result(user.getUsername(),"修改banner", GsonUtil.objectToGson(param)); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/BusinessController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/BusinessController.java index 35995c8..a03bda8 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/BusinessController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/BusinessController.java @@ -7,25 +7,38 @@ package com.shop.cereshop.business.controller; import cn.hutool.core.util.ObjectUtil; import com.shop.cereshop.business.annotation.NoRepeatSubmit; +import com.shop.cereshop.business.annotation.NoRepeatWebLog; import com.shop.cereshop.business.message.service.miaoxin.MiaoxinMessageService; +import com.shop.cereshop.business.page.business.Business; +import com.shop.cereshop.business.page.business.PlatformBusinessUser; import com.shop.cereshop.business.page.permission.MenuButton; -import com.shop.cereshop.business.page.shop.PlatformBusiness; import com.shop.cereshop.business.param.business.BusinessForgetParam; import com.shop.cereshop.business.param.business.BusinessGetCodeParam; import com.shop.cereshop.business.param.business.BusinessLoginParam; +import com.shop.cereshop.business.param.business.BusinessUpdateParam; import com.shop.cereshop.business.param.permission.UserBuildParam; import com.shop.cereshop.business.redis.service.api.StringRedisService; import com.shop.cereshop.business.redis.service.api.UserRedisService; import com.shop.cereshop.business.service.business.CerePlatformBusinessService; +import com.shop.cereshop.business.service.business.CerePlatformBusinessUserService; import com.shop.cereshop.business.service.permission.CerePlatformPermissionService; +import com.shop.cereshop.business.service.shop.CereShopEnterpriseService; +import com.shop.cereshop.business.service.shop.CereShopIndividualBusinessesService; +import com.shop.cereshop.business.service.shop.CereShopOtherOrganizationsService; +import com.shop.cereshop.business.service.shop.CereShopPersonalService; import com.shop.cereshop.business.utils.ContextUtil; import com.shop.cereshop.commons.constant.CoReturnFormat; import com.shop.cereshop.commons.constant.IntegerEnum; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; +import com.shop.cereshop.commons.domain.business.CereShopEnterprise; +import com.shop.cereshop.commons.domain.business.CereShopIndividualBusinesses; +import com.shop.cereshop.commons.domain.business.CereShopOtherOrganizations; +import com.shop.cereshop.commons.domain.business.CereShopPersonal; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.result.Result; import com.shop.cereshop.commons.utils.EmptyUtils; import com.shop.cereshop.commons.utils.EncryptUtil; +import com.shop.cereshop.commons.utils.GsonUtil; import com.shop.cereshop.commons.utils.RandomStringUtil; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -58,7 +71,7 @@ public class BusinessController { HttpServletRequest request; @Autowired - private CerePlatformBusinessService cerePlatformBusinessService; + private CerePlatformBusinessUserService cerePlatformBusinessUserService; @Autowired private StringRedisService stringRedisService; @@ -72,6 +85,21 @@ public class BusinessController { @Autowired private UserRedisService userRedisService; + @Autowired + private CerePlatformBusinessService cerePlatformBusinessService; + + @Autowired + private CereShopPersonalService cereShopPersonalService; + + @Autowired + private CereShopIndividualBusinessesService cereShopIndividualBusinessesService; + + @Autowired + private CereShopOtherOrganizationsService cereShopOtherOrganizationsService; + + @Autowired + private CereShopEnterpriseService cereShopEnterpriseService; + /** * 商家用户登录 * @@ -80,14 +108,14 @@ public class BusinessController { */ @PostMapping(value = "login") @ApiOperation(value = "商家用户登录") - public Result login(@RequestBody BusinessLoginParam param) throws CoBusinessException, Exception { + public Result login(@RequestBody BusinessLoginParam param) throws CoBusinessException, Exception { //登录账号和密码解密 try { param = param.decrypt(); } catch (Exception e) { return new Result(CoReturnFormat.PARAM_INVALID); } - PlatformBusiness user=null; + PlatformBusinessUser user=null; if(!EmptyUtils.isEmpty(param.getCode())){ if(!param.getCode().equals("9999")){ //手机号登录,校验验证码 @@ -97,10 +125,10 @@ public class BusinessController { } } //根据手机号查询用户信息 - user = cerePlatformBusinessService.findByPhone(param.getUsername()); + user = cerePlatformBusinessUserService.findByPhone(param.getUsername()); } else { //根据账号查询token - user = cerePlatformBusinessService.findByUserName(param.getUsername()); + user = cerePlatformBusinessUserService.findByUserName(param.getUsername()); if (user != null) { //校验密码 if (!param.getPassword().equals(EncryptUtil.decrypt(user.getPassword()))) { @@ -146,8 +174,8 @@ public class BusinessController { @PostMapping(value = "build") @ApiOperation(value = "登录权限查询") public Result> build(@RequestBody UserBuildParam user) throws CoBusinessException { - CerePlatformBusiness cacheUser = (CerePlatformBusiness) request.getAttribute("user"); - user.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser cacheUser = (CerePlatformBusinessUser) request.getAttribute("user"); + user.setBusinessId(ContextUtil.getBusinessId()); user.setBusinessUserId(cacheUser.getBusinessUserId()); List list = cerePlatformPermissionService.getAllByUserId(user); return new Result(list); @@ -180,11 +208,11 @@ public class BusinessController { return new Result(CoReturnFormat.PASSWORD_NOT_AGREEN); } //校验手机号是否注册 - CerePlatformBusiness cerePlatformBusiness = cerePlatformBusinessService.findByUserName(user.getUsername()); - if (cerePlatformBusiness == null) { + CerePlatformBusinessUser cerePlatformBusinessUser = cerePlatformBusinessUserService.findByUserName(user.getUsername()); + if (cerePlatformBusinessUser == null) { return new Result(CoReturnFormat.USER_UNREGISTER); } - cerePlatformBusinessService.forgetPassword(user, cerePlatformBusiness); + cerePlatformBusinessUserService.forgetPassword(user, cerePlatformBusinessUser); return new Result(); } @@ -206,11 +234,8 @@ public class BusinessController { stringRedisService.set(user.getPhone(), code, 300000); //发送短信给用户 try { - if ("18476661786".equals(user.getPhone())) { - return new Result<>(); - } //验证账号可用 - PlatformBusiness shopUser = cerePlatformBusinessService.findByPhone(user.getPhone()); + PlatformBusinessUser shopUser = cerePlatformBusinessUserService.findByPhone(user.getPhone()); if (shopUser == null) { return new Result(CoReturnFormat.USER_UNREGISTER); } else { @@ -241,8 +266,8 @@ public class BusinessController { @ApiOperation(value = "更新密码") public Result updatePassword(@RequestBody BusinessForgetParam passwordParam, HttpServletRequest request) throws CoBusinessException { //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - cerePlatformBusinessService.updatePassword(passwordParam, user); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + cerePlatformBusinessUserService.updatePassword(passwordParam, user); return new Result(); } @@ -253,13 +278,190 @@ public class BusinessController { */ @PostMapping(value = "updateAvatar") @ApiOperation(value = "更新头像") - public Result updateAvatar(@RequestBody CerePlatformBusiness platformBusiness, HttpServletRequest request) throws CoBusinessException { + public Result updateAvatar(@RequestBody CerePlatformBusinessUser business, HttpServletRequest request) throws CoBusinessException { //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); if (user != null) { - user.setAvatar(platformBusiness.getAvatar()); - cerePlatformBusinessService.updateAvatar(user); + user.setAvatar(business.getAvatar()); + cerePlatformBusinessUserService.updateAvatar(user); } return new Result(); } + + + + + /** + * 店铺认证(个人) + * @param personal + * @return + */ + @PostMapping(value = "personal") + @NoRepeatSubmit + @ApiOperation(value = "商家认证(个人)") + @NoRepeatWebLog + public Result personal(@RequestBody CereShopPersonal personal, HttpServletRequest request) throws CoBusinessException{ + //获取当前登录账户 + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + personal.setBusinessId(ContextUtil.getBusinessId()); + cereShopPersonalService.personal(personal,user); + return new Result(user.getUsername(),"店铺认证(个人)", GsonUtil.objectToGson(personal)); + } + + /** + * 店铺认证(个体工商户) + * @param individualBusinesses + * @return + */ + @PostMapping(value = "individual") + @NoRepeatSubmit + @ApiOperation(value = "商家认证(个体工商户)") + @NoRepeatWebLog + public Result individual(@RequestBody CereShopIndividualBusinesses individualBusinesses, HttpServletRequest request) throws CoBusinessException{ + //获取当前登录账户 + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + individualBusinesses.setBusinessId(ContextUtil.getBusinessId()); + cereShopIndividualBusinessesService.individual(individualBusinesses,user); + return new Result(user.getUsername(),"店铺认证(个体工商户)", GsonUtil.objectToGson(individualBusinesses)); + } + + /** + * 店铺认证(企业) + * @param enterprise + * @return + */ + @PostMapping(value = "enterprise") + @NoRepeatSubmit + @ApiOperation(value = "商家认证(企业)") + @NoRepeatWebLog + public Result enterprise(@RequestBody CereShopEnterprise enterprise, HttpServletRequest request) throws CoBusinessException{ + //获取当前登录账户 + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + enterprise.setBusinessId(ContextUtil.getBusinessId()); + cereShopEnterpriseService.enterprise(enterprise,user); + return new Result(user.getUsername(),"店铺认证(企业)", GsonUtil.objectToGson(enterprise)); + } + + /** + * 店铺认证(其他组织) + * @param otherOrganizations + * @return + */ + @PostMapping(value = "organizations") + @NoRepeatSubmit + @ApiOperation(value = "商家认证(其他组织)") + @NoRepeatWebLog + public Result organizations(@RequestBody CereShopOtherOrganizations otherOrganizations, HttpServletRequest request) throws CoBusinessException{ + //获取当前登录账户 + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + otherOrganizations.setBusinessId(ContextUtil.getBusinessId()); + cereShopOtherOrganizationsService.organizations(otherOrganizations,user); + return new Result(user.getUsername(),"店铺认证(其他组织)", GsonUtil.objectToGson(otherOrganizations)); + } + + /** + * 修改店铺认证(个人) + * @param personal + * @return + */ + @PostMapping(value = "updatePersonal") + @NoRepeatSubmit + @ApiOperation(value = "修改商家认证(个人)") + @NoRepeatWebLog + public Result updatePersonal(@RequestBody CereShopPersonal personal, HttpServletRequest request) throws CoBusinessException{ + //获取当前登录账户 + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + personal.setBusinessId(ContextUtil.getBusinessId()); + cereShopPersonalService.updatePersonal(personal,user); + return new Result(user.getUsername(),"修改店铺认证(个人)", GsonUtil.objectToGson(personal)); + } + + /** + * 修改店铺认证(个体工商户) + * @param individualBusinesses + * @return + */ + @PostMapping(value = "updateIndividual") + @NoRepeatSubmit + @ApiOperation(value = "修改商家认证(个体工商户)") + @NoRepeatWebLog + public Result updateIndividual(@RequestBody CereShopIndividualBusinesses individualBusinesses, HttpServletRequest request) throws CoBusinessException{ + //获取当前登录账户 + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + individualBusinesses.setBusinessId(ContextUtil.getBusinessId()); + cereShopIndividualBusinessesService.updateIndividual(individualBusinesses,user); + return new Result(user.getUsername(),"修改店铺认证(个体工商户)", GsonUtil.objectToGson(individualBusinesses)); + } + + /** + * 修改店铺认证(企业) + * @param enterprise + * @return + */ + @PostMapping(value = "updateEnterprise") + @NoRepeatSubmit + @ApiOperation(value = "修改商家认证(企业)") + @NoRepeatWebLog + public Result updateEnterprise(@RequestBody CereShopEnterprise enterprise, HttpServletRequest request) throws CoBusinessException{ + //获取当前登录账户 + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + enterprise.setBusinessId(ContextUtil.getBusinessId()); + cereShopEnterpriseService.updateEnterprise(enterprise,user); + return new Result(user.getUsername(),"修改店铺认证(企业)", GsonUtil.objectToGson(enterprise)); + } + + /** + * 修改店铺认证(其他组织) + * @param otherOrganizations + * @return + */ + @PostMapping(value = "updateOrganizations") + @NoRepeatSubmit + @ApiOperation(value = "修改商家认证(其他组织)") + @NoRepeatWebLog + public Result updateOrganizations(@RequestBody CereShopOtherOrganizations otherOrganizations, HttpServletRequest request) throws CoBusinessException{ + //获取当前登录账户 + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + otherOrganizations.setBusinessId(ContextUtil.getBusinessId()); + cereShopOtherOrganizationsService.updateOrganizations(otherOrganizations,user); + return new Result(user.getUsername(),"修改店铺认证(其他组织)", GsonUtil.objectToGson(otherOrganizations)); + } + + + /** + * 新生支付信息认证 + * @return + */ + @PostMapping(value = "registerByXs") + @ApiOperation(value = "新生支付信息认证") + public Result registerByXs() throws CoBusinessException{ + Business business=cerePlatformBusinessService.registerByXs(ContextUtil.getBusinessId()); + return new Result(business); + } + + /** + * 商家信息查询 + * @return + */ + @PostMapping(value = "getById") + @ApiOperation(value = "商家信息查询") + public Result getById() throws CoBusinessException{ + return new Result(cerePlatformBusinessService.getById(ContextUtil.getBusinessId())); + } + + /** + * 修改店铺信息 + * @param param + * @return + */ + @PostMapping(value = "update") + @NoRepeatSubmit + @ApiOperation(value = "修改店铺信息") + @NoRepeatWebLog + public Result update(@RequestBody BusinessUpdateParam param, HttpServletRequest request) throws CoBusinessException{ + //获取当前登录账户 + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + cerePlatformBusinessService.update(param,user); + return new Result(user.getUsername(),"修改店铺信息", GsonUtil.objectToGson(param)); + } } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/BusinessUserController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/BusinessUserController.java index 32eceec..4cf1ebc 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/BusinessUserController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/BusinessUserController.java @@ -8,15 +8,14 @@ package com.shop.cereshop.business.controller; import com.shop.cereshop.business.annotation.NoRepeatSubmit; import com.shop.cereshop.business.annotation.NoRepeatWebLog; import com.shop.cereshop.business.message.service.miaoxin.MiaoxinMessageService; -import com.shop.cereshop.business.page.shop.PlatformBusiness; -import com.shop.cereshop.business.page.user.Business; +import com.shop.cereshop.business.page.business.PlatformBusinessUser; import com.shop.cereshop.business.param.business.BusinessLoginParam; import com.shop.cereshop.business.param.user.*; import com.shop.cereshop.business.redis.service.api.StringRedisService; -import com.shop.cereshop.business.service.business.CerePlatformBusinessService; +import com.shop.cereshop.business.service.business.CerePlatformBusinessUserService; import com.shop.cereshop.business.utils.ContextUtil; import com.shop.cereshop.commons.constant.CoReturnFormat; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.result.Result; @@ -52,7 +51,7 @@ import java.util.Map; public class BusinessUserController { @Autowired - private CerePlatformBusinessService cerePlatformBusinessService; + private CerePlatformBusinessUserService cerePlatformBusinessUserService; @Autowired private StringRedisService stringRedisService; @@ -89,9 +88,9 @@ public class BusinessUserController { @NoRepeatWebLog public Result save(@RequestBody @Validated BusinessSaveUser business, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - business.setShopId(user.getShopId()); - cerePlatformBusinessService.save(business,user); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + business.setBusinessId(user.getBusinessId()); + cerePlatformBusinessUserService.save(business,user); return new Result(user.getUsername(),"添加用户", GsonUtil.objectToGson(business)); } @@ -106,8 +105,8 @@ public class BusinessUserController { @NoRepeatWebLog public Result update(@RequestBody BusinessUpdateUser business, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - cerePlatformBusinessService.update(business,user); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + cerePlatformBusinessUserService.update(business,user); return new Result(user.getUsername(),"修改用户", GsonUtil.objectToGson(business)); } @@ -123,8 +122,8 @@ public class BusinessUserController { public Result delete(@RequestBody BusinessDeleteUser param, HttpServletRequest request) throws CoBusinessException{ ContextUtil.interceptDelete(); //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - cerePlatformBusinessService.delete(param,user); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + cerePlatformBusinessUserService.delete(param,user); return new Result(user.getUsername(),"删除用户", GsonUtil.objectToGson(param)); } @@ -135,8 +134,8 @@ public class BusinessUserController { */ @PostMapping(value = "getById") @ApiOperation(value = "修改用户查询") - public Result getById(@RequestBody BusinessDeleteUser param) throws CoBusinessException,Exception{ - Business business=cerePlatformBusinessService.getById(param.getBusinessUserId()); + public Result getById(@RequestBody BusinessDeleteUser param) throws CoBusinessException,Exception{ + PlatformBusinessUser business = cerePlatformBusinessUserService.getById(param.getBusinessUserId()); return new Result(business); } @@ -148,11 +147,11 @@ public class BusinessUserController { @PostMapping(value = "getAll") @ApiOperation(value = "用户管理查询") @NoRepeatSubmit - public Result> getAll(@RequestBody BusinessGetAllUser param,HttpServletRequest request) throws CoBusinessException{ + public Result> getAll(@RequestBody BusinessGetAllUser param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); - Page page=cerePlatformBusinessService.getAll(param); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setBusinessId(user.getBusinessId()); + Page page= cerePlatformBusinessUserService.getAll(param); return new Result(page); } @@ -169,11 +168,11 @@ public class BusinessUserController { result.setData(globalAdminPhone); return result; } - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); if (user == null) { throw new CoBusinessException(CoReturnFormat.SYS_ERROR); } - String phone = cerePlatformBusinessService.findAdminPhone(user.getShopId()); + String phone = cerePlatformBusinessUserService.findAdminPhone(user.getBusinessId()); if (phone == null) { throw new CoBusinessException(CoReturnFormat.SYS_ERROR); } @@ -191,7 +190,7 @@ public class BusinessUserController { @ApiOperation(value = "获取隐私短信验证码") public Result getPrivacyCode(@RequestBody UserGetCodeParam param, HttpServletRequest request) throws CoBusinessException, Exception { //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); if (user == null) { return new Result<>(false); } @@ -270,7 +269,7 @@ public class BusinessUserController { return new Result<>(CoReturnFormat.CODE_ERROR); } //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); if (user == null) { return new Result<>(false); } @@ -344,7 +343,7 @@ public class BusinessUserController { @PostMapping(value = "updatePhone") @ApiOperation(value = "更新管理员手机号") public Result updatePhone(@RequestBody UserUpdatePhoneParam param, HttpServletRequest request) throws CoBusinessException { - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); boolean result = true; try { param = param.decrypt(); @@ -357,7 +356,7 @@ public class BusinessUserController { if (!param.getCode().equals(code)) { return new Result<>(CoReturnFormat.CODE_ERROR); } - cerePlatformBusinessService.updatePhone(param, user); + cerePlatformBusinessUserService.updatePhone(param, user); } else { result = false; } @@ -372,7 +371,7 @@ public class BusinessUserController { @PostMapping(value = "getPrivacySwitch") @ApiOperation(value = "查询当前用户是否进行过二次认证") public Result getPrivacySwitch(HttpServletRequest request) { - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); if (user != null) { Long switchTimestamp = (Long)stringRedisService.get(PRIVACY_SHOW_SWITCH + user.getBusinessUserId()); if (switchTimestamp != null && switchTimestamp > 0) { diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/BuyerUserController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/BuyerUserController.java index 8eca3e5..57df89f 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/BuyerUserController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/BuyerUserController.java @@ -15,7 +15,7 @@ import com.shop.cereshop.business.service.buyer.CereBuyerUserService; import com.shop.cereshop.business.service.label.CereBuyerShopLabelService; import com.shop.cereshop.business.service.label.CereShopUserLabelService; import com.shop.cereshop.commons.constant.CoReturnFormat; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.label.CereShopUserLabel; import com.shop.cereshop.commons.exception.CoBusinessException; @@ -66,8 +66,8 @@ public class BuyerUserController { @ApiOperation(value = "客户列表") public Result> getAll(@RequestBody BuyerUserGetAllParam param,HttpServletRequest request) throws CoBusinessException { //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); Page page=cereBuyerUserService.getAll(param); return new Result(page); } @@ -80,8 +80,8 @@ public class BuyerUserController { @ApiOperation(value = "商家标签列表") public Result> getLabels(HttpServletRequest request) throws CoBusinessException { //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - List list=cereShopUserLabelService.getLabels(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + List list=cereShopUserLabelService.getLabels(user.getBusinessId()); return new Result(list); } @@ -96,7 +96,7 @@ public class BuyerUserController { @NoRepeatWebLog public Result saveLabel(@RequestBody BuyerUserSaveParam group, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereBuyerShopLabelService.saveLabel(group,user); return new Result(user.getUsername(),"加标签", GsonUtil.objectToGson(group)); } @@ -112,7 +112,7 @@ public class BuyerUserController { @NoRepeatWebLog public Result save(@RequestBody UserSaveParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereBuyerUserService.save(param,user); return new Result(user.getUsername(),"添加客户", GsonUtil.objectToGson(param)); } @@ -128,7 +128,7 @@ public class BuyerUserController { @NoRepeatWebLog public Result update(@RequestBody UserUpdateParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereBuyerUserService.update(param,user); return new Result(user.getUsername(),"修改客户", GsonUtil.objectToGson(param)); } @@ -141,10 +141,10 @@ public class BuyerUserController { @ApiOperation(value = "客户详情查询") public Result getById(@RequestBody BuyerUserGetByIdParam param, HttpServletRequest request) throws CoBusinessException { //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); Long shopId = null; if (user != null) { - shopId = user.getShopId(); + shopId = user.getBusinessId(); } BuyerUserDetail detail=cereBuyerUserService.getById(shopId, param.getBuyerUserId()); return new Result(detail); @@ -161,8 +161,8 @@ public class BuyerUserController { @ApiOperation(value = "客户列表导出") public void export(@RequestBody BuyerUserGetAllParam param, HttpServletRequest request, HttpServletResponse response) throws CoBusinessException { //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); param.setPage(null); param.setPageSize(null); Page page=cereBuyerUserService.getAll(param); diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/CanvasController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/CanvasController.java index 20fb075..d43cc36 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/CanvasController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/CanvasController.java @@ -18,14 +18,15 @@ import com.shop.cereshop.business.service.product.CereProductClassifyService; import com.shop.cereshop.business.service.product.CereShopProductService; import com.shop.cereshop.business.service.tool.CereShopCouponService; import com.shop.cereshop.business.utils.ContextUtil; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.canvas.CerePlatformCanvas; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.product.Classify; -import com.shop.cereshop.commons.domain.tool.CereShopPrice; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.result.Result; import com.shop.cereshop.commons.utils.GsonUtil; +import com.shop.cereshop.commons.utils.ProjectUtil; +import com.shop.cereshop.commons.utils.StringUtils; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; @@ -76,7 +77,8 @@ public class CanvasController { @GetMapping("getProducts") @ApiOperation(value = "商家编辑查询") public Result> getProducts(CanvasProductParam param) throws CoBusinessException{ - param.setShopId(ContextUtil.getShopId()); + param.setProject(ContextUtil.getProject()); + param.setBusinessId(ContextUtil.getBusinessId()); Page page=cereShopProductService.getProducts(param); return new Result(page); } @@ -101,7 +103,10 @@ public class CanvasController { @GetMapping("getShops") @ApiOperation(value = "画布选择店铺查询") public Result> getShops(CanvasProductParam param) throws CoBusinessException{ - param.setShopId(ContextUtil.getShopId()); + if(!StringUtils.equals(ContextUtil.getProject(), ProjectUtil.DEFAULT_PROJECT)){ + //如果请求的是商家的画布,则只能选择商家所属的店铺 + param.setBusinessId(ContextUtil.getBusinessId()); + } Page page=cereShopProductService.getShops(param); return new Result(page); } @@ -124,7 +129,7 @@ public class CanvasController { @GetMapping("getCoupons") @ApiOperation(value = "查询所有平台优惠券") public Result> getCoupons(CanvasCouponParam param) throws CoBusinessException { - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); Page page=cerePlatformActivityService.getCoupons(param); return new Result(page); } @@ -136,7 +141,7 @@ public class CanvasController { @GetMapping("getShopCoupons") @ApiOperation(value = "查询所有店铺优惠券") public Result> getShopCoupons(CanvasCouponParam param) throws CoBusinessException { - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); Page page=cereShopCouponService.getShopCoupons(param); return new Result(page); } @@ -150,8 +155,8 @@ public class CanvasController { @NoRepeatWebLog public Result saveCanvas(@RequestBody CerePlatformCanvas canvas, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - canvas.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + canvas.setShopId(ContextUtil.getBusinessId()); cerePlatformCanvasService.saveCanvas(canvas,user); return new Result(user.getUsername(),"保存画布", GsonUtil.objectToGson(canvas)); } @@ -163,7 +168,7 @@ public class CanvasController { @GetMapping("getCanvas") @ApiOperation(value = "读取画布数据") public Result getCanvas(CerePlatformCanvas canvas) throws CoBusinessException{ - canvas.setShopId(ContextUtil.getShopId()); + canvas.setShopId(ContextUtil.getBusinessId()); canvas=cerePlatformCanvasService.getCanvas(canvas); return new Result(canvas); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ChannelCouponController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ChannelCouponController.java index effc660..1653f80 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ChannelCouponController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ChannelCouponController.java @@ -5,14 +5,12 @@ */ package com.shop.cereshop.business.controller; -import cn.binarywang.wx.miniapp.api.WxMaService; import com.shop.cereshop.business.annotation.NoRepeatSubmit; import com.shop.cereshop.business.annotation.NoRepeatWebLog; import com.shop.cereshop.business.page.tool.*; import com.shop.cereshop.business.param.tool.*; import com.shop.cereshop.business.service.tool.CereChannelCouponService; -import com.shop.cereshop.business.service.tool.CereShopCouponService; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.tool.CereChannelCoupon; import com.shop.cereshop.commons.exception.CoBusinessException; @@ -56,8 +54,8 @@ public class ChannelCouponController { @NoRepeatWebLog public Result> getAll(@RequestBody @Validated ChannelCouponParam param, HttpServletRequest request) throws CoBusinessException { //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); Page result = cereChannelCouponService.getAll(param); return new Result(result); } @@ -73,8 +71,8 @@ public class ChannelCouponController { @NoRepeatWebLog public Result save(@RequestBody CereChannelCoupon param, HttpServletRequest request) throws CoBusinessException { //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); cereChannelCouponService.save(param); return new Result(user.getUsername(),"新增渠道优惠券", GsonUtil.objectToGson(param)); } @@ -90,8 +88,8 @@ public class ChannelCouponController { @NoRepeatWebLog public Result generateLink(@RequestBody CereChannelCoupon param, HttpServletRequest request) throws CoBusinessException { //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); String link = cereChannelCouponService.generateLink(param); Result result = new Result(); result.setData(link); diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ClassifyController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ClassifyController.java new file mode 100644 index 0000000..fbafcea --- /dev/null +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ClassifyController.java @@ -0,0 +1,111 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.business.controller; + + +import com.shop.cereshop.business.param.product.ClassifyDeleteParam; +import com.shop.cereshop.business.param.product.ClassifyGetAllParam; +import com.shop.cereshop.business.param.product.ClassifyGetByIdParam; +import com.shop.cereshop.business.param.product.ClassifyLevelParam; +import com.shop.cereshop.business.service.product.CereProductClassifyService; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; +import com.shop.cereshop.commons.domain.common.Page; +import com.shop.cereshop.commons.domain.product.CereProductClassify; +import com.shop.cereshop.commons.exception.CoBusinessException; +import com.shop.cereshop.commons.result.Result; +import com.shop.cereshop.commons.utils.GsonUtil; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.servlet.http.HttpServletRequest; + +/** + * 商品类别 + */ +@RestController +@RequestMapping("classify") +/** + * 注解方式生成日志对象,指定topic生成对象类名 + */ +@Slf4j(topic = "ClassifyController") +@Api(value = "商品类别模块", tags = "商品类别模块") +public class ClassifyController { + + @Autowired + private CereProductClassifyService cereProductClassifyService; + + /** + * 添加商品类别 + * @param param + * @return + */ + @PostMapping(value = "save") + @ApiOperation(value = "添加商品类别") + public Result save(@RequestBody @Validated ClassifyLevelParam param, HttpServletRequest request) throws CoBusinessException{ + //获取当前登录账户 + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + cereProductClassifyService.save(param,user); + return new Result(user.getUsername(),"添加商品类别", GsonUtil.objectToGson(param)); + } + + /** + * 修改商品类别 + * @param param + * @return + */ + @PostMapping(value = "update") + @ApiOperation(value = "修改商品类别") + public Result update(@RequestBody ClassifyLevelParam param, HttpServletRequest request) throws CoBusinessException{ + //获取当前登录账户 + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + cereProductClassifyService.update(param,user); + return new Result(user.getUsername(),"修改商品类别", GsonUtil.objectToGson(param)); + } + + /** + * 删除商品类别 + * @param param + * @return + */ + @PostMapping(value = "delete") + @ApiOperation(value = "删除商品类别") + public Result delete(@RequestBody ClassifyDeleteParam param, HttpServletRequest request) throws CoBusinessException{ + //获取当前登录账户 + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + cereProductClassifyService.delete(param,user); + return new Result(user.getUsername(),"删除商品类别", GsonUtil.objectToGson(param)); + } + + /** + * 商品类别编辑查询 + * @param param + * @return + */ + @PostMapping(value = "getById") + @ApiOperation(value = "商品类别编辑查询") + public Result getById(@RequestBody ClassifyGetByIdParam param) throws CoBusinessException{ + CereProductClassify classify=cereProductClassifyService.getById(param.getOneClassifyId()); + return new Result(classify); + } + + /** + * 商品类别管理查询 + * @return + */ + @PostMapping(value = "getAll") + @ApiOperation(value = "商品类别管理查询") + public Result> getAll(@RequestBody ClassifyGetAllParam param) throws CoBusinessException{ + Page page=cereProductClassifyService.getAll(param); + return new Result(page); + } +} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ComposeController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ComposeController.java index 3d84cf1..af6da78 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ComposeController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ComposeController.java @@ -7,23 +7,15 @@ package com.shop.cereshop.business.controller; import com.shop.cereshop.business.annotation.NoRepeatSubmit; import com.shop.cereshop.business.annotation.NoRepeatWebLog; -import com.shop.cereshop.business.page.compose.ComposeProduct; import com.shop.cereshop.business.page.compose.ShopCompose; import com.shop.cereshop.business.page.compose.ShopComposeDetail; import com.shop.cereshop.business.page.product.ShopProduct; -import com.shop.cereshop.business.page.scene.ShopScene; -import com.shop.cereshop.business.page.scene.ShopSceneDetail; import com.shop.cereshop.business.param.compose.*; import com.shop.cereshop.business.param.product.ProductGetAllParam; -import com.shop.cereshop.business.param.scene.SceneGetAllParam; -import com.shop.cereshop.business.param.scene.SceneGetByIdParam; -import com.shop.cereshop.business.param.scene.SceneSaveParam; import com.shop.cereshop.business.service.compose.CereShopComposeService; import com.shop.cereshop.business.utils.ContextUtil; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; -import com.shop.cereshop.commons.domain.platformtool.CerePlatformSeckill; -import com.shop.cereshop.commons.domain.tool.CereShopCompose; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.result.Result; import com.shop.cereshop.commons.utils.GsonUtil; @@ -35,7 +27,6 @@ import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletRequest; -import java.util.List; /** * 组合捆绑销售 @@ -63,8 +54,8 @@ public class ComposeController { @NoRepeatWebLog public Result insert(@RequestBody @Validated ComposeSaveParam param, HttpServletRequest request) throws CoBusinessException,Exception { //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); cereShopComposeService.save(param,user); return new Result(user.getUsername(),"添加组合捆绑", GsonUtil.objectToGson(param)); } @@ -80,8 +71,8 @@ public class ComposeController { @NoRepeatWebLog public Result update(@RequestBody @Validated ComposeUpdateParam param, HttpServletRequest request) throws CoBusinessException,Exception { //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); cereShopComposeService.update(param,user); return new Result(user.getUsername(),"编辑组合捆绑", GsonUtil.objectToGson(param)); } @@ -97,7 +88,7 @@ public class ComposeController { @NoRepeatWebLog public Result delete(@RequestBody ComposeGetByIdParam param, HttpServletRequest request) throws CoBusinessException,Exception { //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereShopComposeService.delete(param,user); return new Result(user.getUsername(),"删除组合捆绑", GsonUtil.objectToGson(param)); } @@ -113,7 +104,7 @@ public class ComposeController { @NoRepeatWebLog public Result start(@RequestBody ComposeStartParam param, HttpServletRequest request) throws CoBusinessException,Exception { //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereShopComposeService.start(param,user); return new Result(user.getUsername(),"启停用组合捆绑", GsonUtil.objectToGson(param)); } @@ -137,8 +128,8 @@ public class ComposeController { @ApiOperation(value = "组合捆绑列表查询") public Result> getAll(@RequestBody ComposeGetAllParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); Page page =cereShopComposeService.getAll(param); return new Result(page); } @@ -151,7 +142,7 @@ public class ComposeController { @PostMapping(value = "selectProduct") @ApiOperation(value = "选择商品查询") public Result> selectProduct(@RequestBody ProductGetAllParam param) throws CoBusinessException{ - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); Page page=cereShopComposeService.selectProduct(param); return new Result(page); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/CustomerServiceController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/CustomerServiceController.java index 40a06e7..618555c 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/CustomerServiceController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/CustomerServiceController.java @@ -68,7 +68,7 @@ public class CustomerServiceController { public Result> getAll(HttpServletRequest request) { try { List resultList = new ArrayList<>(); - Long shopId = ContextUtil.getShopId(); + Long shopId = ContextUtil.getBusinessId(); List serviceList = cereShopCustomerServiceDAO .selectList(Wrappers.lambdaQuery().eq(ShopCustomerService::getShopId, shopId)); if (CollectionUtils.isEmpty(serviceList)) { @@ -132,7 +132,7 @@ public class CustomerServiceController { obj.put("name", param.getName()); obj.put("media_id", param.getHeadImg()); - int count = cereShopCustomerServiceDAO.selectCount(Wrappers.lambdaQuery().eq(ShopCustomerService::getShopId, ContextUtil.getShopId())); + int count = cereShopCustomerServiceDAO.selectCount(Wrappers.lambdaQuery().eq(ShopCustomerService::getShopId, ContextUtil.getBusinessId())); //5000个客服,支持500个商家,每个商家最多10个客服 if (count >= 10) { throw new CoBusinessException(CoReturnFormat.CUSTOMER_SERVICE_LIMIT); @@ -144,7 +144,7 @@ public class CustomerServiceController { JSONObject resultObj = JSON.parseObject(addResult); Integer errCode = resultObj.getInteger("errcode"); if (errCode != null && errCode == 0) { - Long shopId = ContextUtil.getShopId(); + Long shopId = ContextUtil.getBusinessId(); String openKfId = resultObj.getString("open_kfid"); String now = TimeUtils.yyMMddHHmmss(); ShopCustomerService sc = new ShopCustomerService(); diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/DistributionLevelController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/DistributionLevelController.java index a9fa111..244d661 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/DistributionLevelController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/DistributionLevelController.java @@ -11,7 +11,7 @@ import com.shop.cereshop.business.page.distribution.DistributoLevel; import com.shop.cereshop.business.param.level.*; import com.shop.cereshop.business.service.distributor.CereShopDistributionLevelService; import com.shop.cereshop.business.utils.ContextUtil; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.distributor.CereShopDistributionLevel; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.result.Result; @@ -52,8 +52,8 @@ public class DistributionLevelController { @NoRepeatWebLog public Result save(@RequestBody @Validated LevelSaveParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(ContextUtil.getBusinessId()); cereShopDistributionLevelService.save(param,user); return new Result(user.getUsername(),"添加分销员等级", GsonUtil.objectToGson(param)); } @@ -69,8 +69,8 @@ public class DistributionLevelController { @NoRepeatWebLog public Result update(@RequestBody LevelUpdateParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(ContextUtil.getBusinessId()); cereShopDistributionLevelService.update(param,user); return new Result(user.getUsername(),"修改分销员等级", GsonUtil.objectToGson(param)); } @@ -86,7 +86,7 @@ public class DistributionLevelController { @NoRepeatWebLog public Result delete(@RequestBody LevelDeleteParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereShopDistributionLevelService.delete(param,user); return new Result(user.getUsername(),"删除分销员等级", GsonUtil.objectToGson(param)); } @@ -111,7 +111,7 @@ public class DistributionLevelController { @PostMapping(value = "getAll") @ApiOperation(value = "分销员等级管理查询") public Result> getAll(@RequestBody LevelGetAllParam param) throws CoBusinessException{ - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); List list=cereShopDistributionLevelService.getAll(param.getShopId()); return new Result(list); } @@ -127,7 +127,7 @@ public class DistributionLevelController { @NoRepeatWebLog public Result updateSelf(@RequestBody LevelStateParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereShopDistributionLevelService.updateSelf(param,user); return new Result(user.getUsername(),"开启/关闭自购分佣", GsonUtil.objectToGson(param)); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/DistributorController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/DistributorController.java index ef2d4d5..9fae36d 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/DistributorController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/DistributorController.java @@ -13,7 +13,7 @@ import com.shop.cereshop.business.param.shopDistributor.*; import com.shop.cereshop.business.service.distributor.CereShopDistributionLevelService; import com.shop.cereshop.business.service.distributor.CereShopDistributorService; import com.shop.cereshop.business.utils.ContextUtil; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.distributor.CereShopDistributionLevel; import com.shop.cereshop.commons.domain.distributor.CereShopDistributor; @@ -59,8 +59,8 @@ public class DistributorController { @NoRepeatWebLog public Result save(@RequestBody @Validated ShopDistributorSaveParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(ContextUtil.getBusinessId()); cereShopDistributorService.save(param,user); return new Result(user.getUsername(),"添加分销员", GsonUtil.objectToGson(param)); } @@ -76,8 +76,8 @@ public class DistributorController { @NoRepeatWebLog public Result update(@RequestBody ShopDistributorUpdateParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(ContextUtil.getBusinessId()); cereShopDistributorService.update(param,user); return new Result(user.getUsername(),"修改分销员", GsonUtil.objectToGson(param)); } @@ -93,7 +93,7 @@ public class DistributorController { @NoRepeatWebLog public Result delete(@RequestBody ShopDistributorDeleteParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereShopDistributorService.delete(param,user); return new Result(user.getUsername(),"清退分销员", GsonUtil.objectToGson(param)); } @@ -118,7 +118,7 @@ public class DistributorController { @PostMapping(value = "getAll") @ApiOperation(value = "分销员管理查询") public Result> getAll(@RequestBody ShopDistributorGetAllParam param) throws CoBusinessException{ - param.setShopId(String.valueOf(ContextUtil.getShopId())); + param.setShopId(String.valueOf(ContextUtil.getBusinessId())); Page page=cereShopDistributorService.getAll(param); return new Result(page); } @@ -131,7 +131,7 @@ public class DistributorController { @PostMapping(value = "getStayExamineAll") @ApiOperation(value = "待审核分销员管理查询") public Result> getStayExamineAll(@RequestBody ShopDistributorGetStayParam param) throws CoBusinessException{ - param.setShopId(String.valueOf(ContextUtil.getShopId())); + param.setShopId(String.valueOf(ContextUtil.getBusinessId())); Page page=cereShopDistributorService.getStayExamineAll(param); return new Result(page); } @@ -147,7 +147,7 @@ public class DistributorController { @NoRepeatWebLog public Result handle(@RequestBody ShopDistributorHandleParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereShopDistributorService.handle(param,user); return new Result(user.getUsername(),"分销员申请处理", GsonUtil.objectToGson(param)); } @@ -160,7 +160,7 @@ public class DistributorController { @PostMapping(value = "getAllInvitees") @ApiOperation(value = "查询所有邀请人") public Result> getAllInvitees(@RequestBody ShopParam param) throws CoBusinessException{ - param.setShopId(ContextUtil.getShopId()); + param.setBusinessId(ContextUtil.getBusinessId()); List list=cereShopDistributorService.getAllInvitees(param); return new Result(list); } @@ -173,7 +173,7 @@ public class DistributorController { @PostMapping(value = "getAllLevel") @ApiOperation(value = "查询所有分销员等级") public Result> getAllLevel(@RequestBody ShopParam param) throws CoBusinessException{ - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); List list=cereShopDistributionLevelService.getAllLevel(param.getShopId()); return new Result(list); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/DistributorOrderController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/DistributorOrderController.java index 3e2890c..1cd15a9 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/DistributorOrderController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/DistributorOrderController.java @@ -12,7 +12,7 @@ import com.shop.cereshop.business.param.distributorOrder.OrderGetAllParam; import com.shop.cereshop.business.param.distributorOrder.OrderSettlementParam; import com.shop.cereshop.business.service.distributor.CereDistributionOrderService; import com.shop.cereshop.business.utils.ContextUtil; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.result.Result; @@ -48,7 +48,7 @@ public class DistributorOrderController { @PostMapping(value = "getAll") @ApiOperation(value = "分销订单管理查询") public Result> getAll(@RequestBody OrderGetAllParam param) throws CoBusinessException{ - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); Page page=cereDistributionOrderService.getAll(param); return new Result(page); } @@ -64,7 +64,7 @@ public class DistributorOrderController { @NoRepeatWebLog public Result settlement(@RequestBody OrderSettlementParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereDistributionOrderService.settlement(param,user); return new Result(user.getUsername(),"标记结算", GsonUtil.objectToGson(param)); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/FinanceController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/FinanceController.java index 32641e2..40aa962 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/FinanceController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/FinanceController.java @@ -14,7 +14,7 @@ import com.shop.cereshop.business.service.activity.CereActivitySignService; import com.shop.cereshop.business.service.order.CereShopOrderService; import com.shop.cereshop.business.service.shop.CereShopWithdrawalService; import com.shop.cereshop.business.utils.ContextUtil; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.result.Result; @@ -57,7 +57,7 @@ public class FinanceController { @PostMapping(value = "getFinanceCount") @ApiOperation(value = "财务统计数据查询") public Result getFinanceCount(@RequestBody FinanceCountParam param) throws CoBusinessException{ - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); FinanceCount count=cereShopOrderService.getFinanceCount(param); return new Result(count); } @@ -70,7 +70,7 @@ public class FinanceController { @PostMapping(value = "getBank") @ApiOperation(value = "查询绑定银行卡") public Result getBank(@RequestBody ShopParam param) throws CoBusinessException{ - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); Bank bank=cereShopOrderService.getBank(param.getShopId()); return new Result(bank); } @@ -83,7 +83,7 @@ public class FinanceController { @PostMapping(value = "getWithdrawalDetails") @ApiOperation(value = "提现明细查询") public Result> getWithdrawalDetails(@RequestBody FinanceWithdrawalParam param) throws CoBusinessException{ - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); List list=cereShopOrderService.getWithdrawalDetails(param); return new Result(list); } @@ -96,7 +96,7 @@ public class FinanceController { @PostMapping(value = "getDetails") @ApiOperation(value = "流水明细") public Result> getDetails(@RequestBody FinanceDetailParam param) throws CoBusinessException{ - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); Page page=cereShopOrderService.getDetails(param); return new Result(page); } @@ -112,8 +112,8 @@ public class FinanceController { @NoRepeatWebLog public Result withdrawal(@RequestBody FinanceSaveWithdralwalParam withdrawal, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - withdrawal.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + withdrawal.setShopId(ContextUtil.getBusinessId()); cereShopWithdrawalService.save(withdrawal,user); return new Result(user.getUsername(),"提现申请", GsonUtil.objectToGson(withdrawal)); } @@ -125,7 +125,7 @@ public class FinanceController { @PostMapping(value = "getAllBond") @ApiOperation(value = "保证金管理查询") public Result getAllBond(@RequestBody BondParam param) throws CoBusinessException{ - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); BondCount count =cereActivitySignService.getAllBond(param); return new Result(count); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/IndexController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/IndexController.java index 7975cd2..ab4c649 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/IndexController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/IndexController.java @@ -10,7 +10,7 @@ import com.shop.cereshop.business.page.index.Index; import com.shop.cereshop.business.page.index.OrderConvertDTO; import com.shop.cereshop.business.page.index.UserVisitDTO; import com.shop.cereshop.business.param.index.IndexParam; -import com.shop.cereshop.business.service.shop.CerePlatformShopService; +import com.shop.cereshop.business.service.business.CerePlatformBusinessService; import com.shop.cereshop.business.utils.ContextUtil; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.poi.export.ExcelExportUtils; @@ -38,7 +38,7 @@ import java.util.List; public class IndexController { @Autowired - private CerePlatformShopService cerePlatformShopService; + private CerePlatformBusinessService cerePlatformBusinessService; /** * 商户端首页概况数据查询 @@ -48,8 +48,8 @@ public class IndexController { @PostMapping(value = "index") @ApiOperation(value = "商户端首页概况数据查询") public Result index(@RequestBody IndexParam param) throws CoBusinessException{ - param.setShopId(ContextUtil.getShopId()); - Index index=cerePlatformShopService.index(param); + param.setBusinessId(ContextUtil.getBusinessId()); + Index index= cerePlatformBusinessService.index(param); return new Result(index); } @@ -61,8 +61,8 @@ public class IndexController { @RequestMapping(value = "exportUserVisit", method = RequestMethod.POST) @ApiOperation(value = "商户端首页概况数据查询") public void exportUserVisit(@RequestBody IndexParam param, HttpServletRequest request, HttpServletResponse response) throws CoBusinessException{ - param.setShopId(ContextUtil.getShopId()); - List visitDTOList = cerePlatformShopService.selectUserVisitForExport(param); + param.setBusinessId(ContextUtil.getBusinessId()); + List visitDTOList = cerePlatformBusinessService.selectUserVisitForExport(param); log.info("visitDTOList {}", visitDTOList); String excelName = "用户访问统计表"; ExcelExportUtils.exportExcel(request, response, excelName, visitDTOList, UserVisitDTO.class); @@ -76,8 +76,8 @@ public class IndexController { @RequestMapping(value = "exportOrderConvert", method = RequestMethod.POST) @ApiOperation(value = "导出订单转换漏斗") public void exportOrderConvert(@RequestBody IndexParam param, HttpServletRequest request, HttpServletResponse response) throws CoBusinessException{ - param.setShopId(ContextUtil.getShopId()); - List visitDTOList = cerePlatformShopService.selectOrderConvertForExport(param); + param.setBusinessId(ContextUtil.getBusinessId()); + List visitDTOList = cerePlatformBusinessService.selectOrderConvertForExport(param); String excelName = "订单转化统计表"; ExcelExportUtils.exportExcel(request, response, excelName, visitDTOList, OrderConvertDTO.class); } @@ -90,8 +90,8 @@ public class IndexController { @RequestMapping(value = "exportHotProducts", method = RequestMethod.POST) @ApiOperation(value = "导出热卖商品") public void exportHotProducts(@RequestBody IndexParam param, HttpServletRequest request, HttpServletResponse response) throws CoBusinessException{ - param.setShopId(ContextUtil.getShopId()); - List visitDTOList = cerePlatformShopService.selectHotProductForExport(param); + param.setBusinessId(ContextUtil.getBusinessId()); + List visitDTOList = cerePlatformBusinessService.selectHotProductForExport(param); String excelName = "热卖商品统计表"; ExcelExportUtils.exportExcel(request, response, excelName, visitDTOList, HotProductDTO.class); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/InitPermissionController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/InitPermissionController.java deleted file mode 100644 index 45ec4cb..0000000 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/InitPermissionController.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (C) 2017-2021 - * All rights reserved, Designed By 深圳中科鑫智科技有限公司 - * Copyright authorization contact 18814114118 - */ -package com.shop.cereshop.business.controller; - -import com.shop.cereshop.business.service.init.InitPermissionService; -import com.shop.cereshop.commons.exception.CoBusinessException; -import com.shop.cereshop.commons.result.Result; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RestController; - -/** - * 初始化版本迭代新增菜单 - */ -@RestController -/** - * 注解方式生成日志对象,指定topic生成对象类名 - */ -@Slf4j(topic = "InitPermissionController") -public class InitPermissionController { - - @Autowired - private InitPermissionService initPermissionService; - - /** - * 初始化1.4版本新增商家端菜单 - * @return - */ - @PostMapping(value = "initPermission") - public Result getAll() throws CoBusinessException{ - initPermissionService.initPermission(); - return new Result(); - } - -} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/KcStockNoteController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/KcStockNoteController.java index 2f19747..00a354c 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/KcStockNoteController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/KcStockNoteController.java @@ -14,7 +14,7 @@ import com.shop.cereshop.business.param.stock.KcStockNoteSaveParam; import com.shop.cereshop.business.param.stock.KcStockNoteUpdateParam; import com.shop.cereshop.business.service.stock.CereKcStockNoteService; import com.shop.cereshop.business.utils.ContextUtil; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.result.Result; @@ -62,7 +62,7 @@ public class KcStockNoteController { @PostMapping(value = "getAll") @ApiOperation(value = "出入库记录管理查询") public Result> getAll(@RequestBody KcStockNoteGetAllParam param, HttpServletRequest request) throws CoBusinessException{ - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); return new Result(cereKcStockNoteService.getAll(param)); } @@ -79,8 +79,8 @@ public class KcStockNoteController { @NoRepeatWebLog public Result save(@RequestBody @Validated KcStockNoteSaveParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(ContextUtil.getBusinessId()); cereKcStockNoteService.insert(param,user); return new Result(user.getUsername(),"新增出入库记录", GsonUtil.objectToGson(param)); } @@ -96,8 +96,8 @@ public class KcStockNoteController { @NoRepeatWebLog public Result update(@RequestBody KcStockNoteUpdateParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(ContextUtil.getBusinessId()); cereKcStockNoteService.update(param,user); return new Result(user.getUsername(),"更新出入库记录", GsonUtil.objectToGson(param)); } @@ -113,7 +113,7 @@ public class KcStockNoteController { @NoRepeatWebLog public Result delete(@RequestBody KcStockNoteGetByIdParam param, HttpServletRequest request) throws CoBusinessException,Exception{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereKcStockNoteService.deleteById(param.getStockNoteId(),user); return new Result(user.getUsername(),"删除出入库记录", GsonUtil.objectToGson(param)); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/LiveController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/LiveController.java index f4bda19..9ac26d1 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/LiveController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/LiveController.java @@ -10,7 +10,7 @@ import com.shop.cereshop.business.annotation.NoRepeatWebLog; import com.shop.cereshop.business.param.live.*; import com.shop.cereshop.business.service.live.CereLiveService; import com.shop.cereshop.business.utils.ContextUtil; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.live.CereLive; import com.shop.cereshop.commons.exception.CoBusinessException; @@ -47,8 +47,8 @@ public class LiveController { @ApiOperation(value = "直播间列表查询") public Result> getAll(@RequestBody LiveGetAllParam param, HttpServletRequest request) throws CoBusinessException,Exception{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); Page page=cereLiveService.getAll(param); return new Result(page); } @@ -64,8 +64,8 @@ public class LiveController { @NoRepeatWebLog public Result save(@RequestBody @Validated CereLive param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(ContextUtil.getBusinessId()); cereLiveService.save(param,user); return new Result(user.getUsername(),"添加直播间", GsonUtil.objectToGson(param)); } @@ -81,8 +81,8 @@ public class LiveController { @NoRepeatWebLog public Result update(@RequestBody CereLive param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(ContextUtil.getBusinessId()); cereLiveService.update(param,user); return new Result(user.getUsername(),"修改直播间", GsonUtil.objectToGson(param)); } @@ -98,7 +98,7 @@ public class LiveController { @NoRepeatWebLog public Result delete(@RequestBody LiveParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereLiveService.delete(param.getId(),user); return new Result(user.getUsername(),"删除直播间", GsonUtil.objectToGson(param)); } @@ -114,8 +114,8 @@ public class LiveController { @NoRepeatWebLog public Result getById(@RequestBody LiveParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); CereLive live = cereLiveService.getById(param); return new Result(live); } @@ -131,8 +131,8 @@ public class LiveController { @NoRepeatWebLog public Result importProduct(@RequestBody LiveProductRelParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); cereLiveService.importProduct(param, user); return new Result(); } @@ -148,8 +148,8 @@ public class LiveController { @NoRepeatWebLog public Result getLiveProductRelPageByLiveId(@RequestBody LiveProductPageParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); Page page = cereLiveService.getLiveProductRelPageByLiveId(param); return new Result(page); } @@ -165,8 +165,8 @@ public class LiveController { @NoRepeatWebLog public Result reExamine(@RequestBody LiveParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); int result = cereLiveService.reExamine(param); return new Result(result); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/LiveProductController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/LiveProductController.java index 8c3f388..933af03 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/LiveProductController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/LiveProductController.java @@ -7,15 +7,12 @@ package com.shop.cereshop.business.controller; import com.shop.cereshop.business.annotation.NoRepeatSubmit; import com.shop.cereshop.business.annotation.NoRepeatWebLog; -import com.shop.cereshop.business.param.live.LiveGetAllParam; import com.shop.cereshop.business.param.live.LiveProductParam; import com.shop.cereshop.business.param.live.LiveProductGetAllParam; -import com.shop.cereshop.business.param.live.LiveProductParam; import com.shop.cereshop.business.service.live.CereLiveProductService; import com.shop.cereshop.business.utils.ContextUtil; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; -import com.shop.cereshop.commons.domain.live.CereLive; import com.shop.cereshop.commons.domain.live.CereLiveProduct; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.result.Result; @@ -51,8 +48,8 @@ public class LiveProductController { @ApiOperation(value = "直播间商品列表查询") public Result> getAll(@RequestBody LiveProductGetAllParam param, HttpServletRequest request) throws CoBusinessException,Exception{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); Page page= cereLiveProductService.getAll(param); return new Result(page); } @@ -68,8 +65,8 @@ public class LiveProductController { @NoRepeatWebLog public Result save(@RequestBody @Validated LiveProductParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(ContextUtil.getBusinessId()); cereLiveProductService.save(param,user); return new Result(user.getUsername(),"添加直播间商品", GsonUtil.objectToGson(param)); } @@ -85,8 +82,8 @@ public class LiveProductController { @NoRepeatWebLog public Result update(@RequestBody LiveProductParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(ContextUtil.getBusinessId()); cereLiveProductService.update(param,user); return new Result(user.getUsername(),"修改直播间", GsonUtil.objectToGson(param)); } @@ -102,7 +99,7 @@ public class LiveProductController { @NoRepeatWebLog public Result delete(@RequestBody LiveProductParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereLiveProductService.delete(param.getId(),user); return new Result(user.getUsername(),"删除直播间", GsonUtil.objectToGson(param)); } @@ -118,8 +115,8 @@ public class LiveProductController { @NoRepeatWebLog public Result getById(@RequestBody LiveProductParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); CereLiveProduct liveProduct = cereLiveProductService.getById(param); return new Result(liveProduct); } @@ -135,8 +132,8 @@ public class LiveProductController { @NoRepeatWebLog public Result reExamine(@RequestBody LiveProductParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); int result = cereLiveProductService.reExamine(param); return new Result(result); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/LogisticsController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/LogisticsController.java index c9622d7..2c7e006 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/LogisticsController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/LogisticsController.java @@ -14,7 +14,7 @@ import com.shop.cereshop.business.param.shop.ShopParam; import com.shop.cereshop.business.service.city.CereCityManageService; import com.shop.cereshop.business.service.logistics.CereOrderLogisticsService; import com.shop.cereshop.business.utils.ContextUtil; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.result.Result; @@ -58,8 +58,8 @@ public class LogisticsController { @NoRepeatWebLog public Result save(@RequestBody @Validated LogistSaveParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(ContextUtil.getBusinessId()); cereOrderLogisticsService.save(param,user); return new Result(user.getUsername(),"添加物流方案", GsonUtil.objectToGson(param)); } @@ -75,8 +75,8 @@ public class LogisticsController { @NoRepeatWebLog public Result update(@RequestBody LogistUpdateParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(ContextUtil.getBusinessId()); cereOrderLogisticsService.update(param,user); return new Result(user.getUsername(),"修改物流方案", GsonUtil.objectToGson(param)); } @@ -92,7 +92,7 @@ public class LogisticsController { @NoRepeatWebLog public Result delete(@RequestBody LogistDeleteParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereOrderLogisticsService.delete(param,user); return new Result(user.getUsername(),"删除物流方案", GsonUtil.objectToGson(param)); } @@ -117,7 +117,7 @@ public class LogisticsController { @PostMapping(value = "getAll") @ApiOperation(value = "物流方案管理查询") public Result> getAll(@RequestBody ShopParam param) throws CoBusinessException{ - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); Page page=cereOrderLogisticsService.getAll(param); return new Result(page); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/MarketToolController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/MarketToolController.java index d489f6b..c4a3dff 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/MarketToolController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/MarketToolController.java @@ -10,8 +10,7 @@ import com.shop.cereshop.business.param.tool.*; import com.shop.cereshop.business.service.activity.CereShopMarketToolService; import com.shop.cereshop.business.annotation.NoRepeatSubmit; import com.shop.cereshop.business.utils.ContextUtil; -import com.shop.cereshop.commons.constant.CoReturnFormat; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.result.Result; import io.swagger.annotations.Api; @@ -48,8 +47,8 @@ public class MarketToolController { @ApiOperation(value = "添加营销工具") public Result save(@RequestBody ToolSaveParam param, HttpServletRequest request) throws CoBusinessException,Exception{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(ContextUtil.getBusinessId()); cereShopMarketToolService.save(param,user); return new Result(); } @@ -64,8 +63,8 @@ public class MarketToolController { @ApiOperation(value = "修改营销工具") public Result update(@RequestBody ToolUpdateParam param, HttpServletRequest request) throws CoBusinessException,Exception{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(ContextUtil.getBusinessId()); cereShopMarketToolService.update(param,user); return new Result(); } @@ -80,7 +79,7 @@ public class MarketToolController { @ApiOperation(value = "删除营销工具") public Result delete(@RequestBody ToolDeleteParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereShopMarketToolService.delete(param,user); return new Result(); } @@ -95,7 +94,7 @@ public class MarketToolController { @ApiOperation(value = "结束营销工具") public Result end(@RequestBody ToolEndParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereShopMarketToolService.end(param,user); return new Result(); } @@ -120,7 +119,7 @@ public class MarketToolController { @PostMapping(value = "getAll") @ApiOperation(value = "营销工具管理查询") public Result> getAll(@RequestBody ToolGetAllParam param) throws CoBusinessException{ - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); List list =cereShopMarketToolService.getAll(param); return new Result(list); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/OperateController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/OperateController.java index 07ea4c0..1a016fe 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/OperateController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/OperateController.java @@ -17,7 +17,7 @@ import com.shop.cereshop.business.param.tool.*; import com.shop.cereshop.business.service.tool.CereShopCrowdService; import com.shop.cereshop.business.service.tool.CereShopOperateService; import com.shop.cereshop.business.utils.ContextUtil; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.result.Result; @@ -60,8 +60,8 @@ public class OperateController { @NoRepeatWebLog public Result saveOperate(@RequestBody ShopOperateSaveParam param, HttpServletRequest request) throws CoBusinessException,Exception{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(ContextUtil.getBusinessId()); cereShopOperateService.saveOperate(param,user); return new Result(user.getUsername(),"新增运营计划", GsonUtil.objectToGson(param)); } @@ -77,8 +77,8 @@ public class OperateController { @NoRepeatWebLog public Result update(@RequestBody ShopOperateUpdateParam param, HttpServletRequest request) throws CoBusinessException,Exception{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(ContextUtil.getBusinessId()); cereShopOperateService.update(param,user); return new Result(user.getUsername(),"修改运营计划", GsonUtil.objectToGson(param)); } @@ -94,7 +94,7 @@ public class OperateController { @NoRepeatWebLog public Result delete(@RequestBody ShopOperateGetByIdParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereShopOperateService.delete(param.getIds(),user); return new Result(user.getUsername(),"删除运营计划", GsonUtil.objectToGson(param)); } @@ -118,8 +118,8 @@ public class OperateController { @ApiOperation(value = "运营计划列表查询") public Result> getAll(@RequestBody ShopOperateGetAllParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); Page page=cereShopOperateService.getAll(param); return new Result(page); } @@ -143,7 +143,7 @@ public class OperateController { @PostMapping(value = "selectCrowd") @ApiOperation(value = "选择人群查询") public Result> selectCrowd(@RequestBody ShopCrowdGetAllParam param) throws CoBusinessException{ - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); Page page=cereShopCrowdService.selectCrowd(param); return new Result(page); } @@ -156,8 +156,8 @@ public class OperateController { @ApiOperation(value = "选择优惠券查询") public Result> selectCoupon(@RequestBody OperateCouponParam param, HttpServletRequest request) throws CoBusinessException,Exception{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); Page page =cereShopOperateService.selectCoupon(param); return new Result(page); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/OrderController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/OrderController.java index ec69a5d..b955199 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/OrderController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/OrderController.java @@ -19,7 +19,7 @@ import com.shop.cereshop.business.service.order.CereOrderDileverService; import com.shop.cereshop.business.service.order.CereShopOrderService; import com.shop.cereshop.business.utils.ContextUtil; import com.shop.cereshop.business.utils.ScrmSyncVerifyUtil; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.enums.OrderStateEnum; import com.shop.cereshop.commons.enums.PaymentModeEnum; @@ -38,7 +38,6 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import javax.naming.Context; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.util.Collections; @@ -76,7 +75,7 @@ public class OrderController { @PostMapping(value = "getAll") @ApiOperation(value = "订单管理查询") public Result> getAll(@RequestBody OrderGetAllParam param) throws CoBusinessException{ - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); Page page=cereShopOrderService.getAll(param); return new Result(page); } @@ -89,7 +88,7 @@ public class OrderController { @PostMapping(value = "getById") @ApiOperation(value = "订单详情查询") public Result getById(@RequestBody OrderGetByIdParam param) throws CoBusinessException{ - ShopOrder shopOrder=cereShopOrderService.getById(ContextUtil.getShopId(), param.getOrderId()); + ShopOrder shopOrder=cereShopOrderService.getById(ContextUtil.getBusinessId(), param.getOrderId()); return new Result(shopOrder); } @@ -104,7 +103,7 @@ public class OrderController { @NoRepeatWebLog public Result dilevery(@RequestBody OrderDileveryParam param, HttpServletRequest request) throws CoBusinessException,Exception{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereOrderDileverService.dilevery(param,user); return new Result(user.getUsername(),"发货", GsonUtil.objectToGson(param)); } @@ -116,7 +115,7 @@ public class OrderController { @PostMapping(value = "export") @ApiOperation(value = "订单管理导出") public void export(@RequestBody OrderGetAllParam param, HttpServletRequest request, HttpServletResponse response) throws CoBusinessException { - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); param.setPage(1); param.setPageSize(10000); Page page = cereShopOrderService.getAll(param); @@ -217,7 +216,7 @@ public class OrderController { @NoRepeatWebLog public Result updateOrderPrice(@RequestBody UpdateOrderPriceParam param, HttpServletRequest request) throws CoBusinessException { //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereShopOrderService.updateOrderPrice(param,user); return new Result(user.getUsername(),"订单改价", GsonUtil.objectToGson(param)); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/PermissionController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/PermissionController.java index 884356b..5d34e07 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/PermissionController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/PermissionController.java @@ -11,7 +11,7 @@ import com.shop.cereshop.business.page.permission.Permission; import com.shop.cereshop.business.param.permission.*; import com.shop.cereshop.business.service.permission.CerePlatformPermissionService; import com.shop.cereshop.business.utils.ContextUtil; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.permission.CerePlatformPermission; import com.shop.cereshop.commons.exception.CoBusinessException; @@ -55,8 +55,8 @@ public class PermissionController { @NoRepeatWebLog public Result insert(@RequestBody @Validated PermissionSaveParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setBusinessId(user.getBusinessId()); cerePlatformPermissionService.save(param,user); return new Result(user.getUsername(),"添加菜单权限", GsonUtil.objectToGson(param)); } @@ -72,7 +72,7 @@ public class PermissionController { @NoRepeatWebLog public Result update(@RequestBody PermissionUpdateParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cerePlatformPermissionService.update(param,user); return new Result(user.getUsername(),"修改菜单权限", GsonUtil.objectToGson(param)); } @@ -89,7 +89,7 @@ public class PermissionController { public Result delete(@RequestBody PermissionDeleteParam param, HttpServletRequest request) throws CoBusinessException{ ContextUtil.interceptDelete(); //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cerePlatformPermissionService.delete(param,user); return new Result(user.getUsername(),"删除菜单权限", GsonUtil.objectToGson(param)); } @@ -124,8 +124,8 @@ public class PermissionController { @ApiOperation(value = "菜单权限管理查询") public Result> getAll(@RequestBody PermissionGetAllParam param,HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setBusinessId(user.getBusinessId()); Page page =cerePlatformPermissionService.getAll(param); return new Result(page); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/PriceController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/PriceController.java index 0c16c20..cc028cf 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/PriceController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/PriceController.java @@ -7,15 +7,11 @@ package com.shop.cereshop.business.controller; import com.shop.cereshop.business.annotation.NoRepeatSubmit; import com.shop.cereshop.business.annotation.NoRepeatWebLog; -import com.shop.cereshop.business.page.compose.ShopCompose; -import com.shop.cereshop.business.page.compose.ShopComposeDetail; import com.shop.cereshop.business.page.price.ShopPrice; import com.shop.cereshop.business.page.price.ShopPriceDetail; -import com.shop.cereshop.business.param.compose.*; import com.shop.cereshop.business.param.price.*; -import com.shop.cereshop.business.service.compose.CereShopComposeService; import com.shop.cereshop.business.service.price.CereShopPriceService; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.result.Result; @@ -55,8 +51,8 @@ public class PriceController { @NoRepeatWebLog public Result insert(@RequestBody @Validated PriceSaveParam param, HttpServletRequest request) throws CoBusinessException,Exception { //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); cereShopPriceService.save(param,user); return new Result(user.getUsername(),"添加定价捆绑", GsonUtil.objectToGson(param)); } @@ -72,8 +68,8 @@ public class PriceController { @NoRepeatWebLog public Result update(@RequestBody @Validated PriceUpdateParam param, HttpServletRequest request) throws CoBusinessException,Exception { //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); cereShopPriceService.update(param,user); return new Result(user.getUsername(),"编辑定价捆绑", GsonUtil.objectToGson(param)); } @@ -89,7 +85,7 @@ public class PriceController { @NoRepeatWebLog public Result delete(@RequestBody PriceGetByIdParam param, HttpServletRequest request) throws CoBusinessException,Exception { //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereShopPriceService.delete(param,user); return new Result(user.getUsername(),"删除定价捆绑", GsonUtil.objectToGson(param)); } @@ -105,7 +101,7 @@ public class PriceController { @NoRepeatWebLog public Result start(@RequestBody PriceStartParam param, HttpServletRequest request) throws CoBusinessException,Exception { //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereShopPriceService.start(param,user); return new Result(user.getUsername(),"启停用定价捆绑", GsonUtil.objectToGson(param)); } @@ -129,8 +125,8 @@ public class PriceController { @ApiOperation(value = "定价捆绑列表查询") public Result> getAll(@RequestBody PriceGetAllParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); Page page =cereShopPriceService.getAll(param); return new Result(page); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ProductController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ProductController.java index d109f46..fc012cb 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ProductController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ProductController.java @@ -24,7 +24,7 @@ import com.shop.cereshop.business.utils.ContextUtil; import com.shop.cereshop.business.utils.ScrmSyncVerifyUtil; import com.shop.cereshop.commons.constant.CoReturnFormat; import com.shop.cereshop.commons.domain.brand.Brand; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.product.CereProductClassify; import com.shop.cereshop.commons.domain.product.Classify; @@ -107,8 +107,8 @@ public class ProductController { @NoRepeatWebLog public Result save(@RequestBody @Validated ProductSaveParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); +// param.setShopId(ContextUtil.getBusinessId()); cereShopProductService.save(param,user); return new Result(user.getUsername(),"添加商品", GsonUtil.objectToGson(param)); } @@ -124,8 +124,8 @@ public class ProductController { @NoRepeatWebLog public Result update(@RequestBody ProductUpdateParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); +// param.setShopId(ContextUtil.getBusinessId()); cereShopProductService.update(param,user); return new Result(user.getUsername(),"修改商品", GsonUtil.objectToGson(param)); } @@ -141,7 +141,7 @@ public class ProductController { @NoRepeatWebLog public Result delete(@RequestBody ProductDeleteParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereShopProductService.delete(param,user); return new Result(user.getUsername(),"删除商品", GsonUtil.objectToGson(param)); } @@ -157,7 +157,7 @@ public class ProductController { @NoRepeatWebLog public Result start(@RequestBody ProductUpDownParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereShopProductService.start(param,user); return new Result(user.getUsername(),"商品上下架", GsonUtil.objectToGson(param)); } @@ -182,7 +182,7 @@ public class ProductController { @PostMapping(value = "getAll") @ApiOperation(value = "商品管理查询") public Result> getAll(@RequestBody ProductGetAllParam param) throws CoBusinessException{ - param.setShopId(ContextUtil.getShopId()); + param.setBusinessId(ContextUtil.getBusinessId()); Page page=cereShopProductService.getAll(param); return new Result(page); } @@ -195,7 +195,7 @@ public class ProductController { @PostMapping(value = "getList") @ApiOperation(value = "商品管理查询") public Result> getList(@RequestBody ProductGetAllParam param) throws CoBusinessException{ - param.setShopId(ContextUtil.getShopId()); + param.setBusinessId(ContextUtil.getBusinessId()); return new Result(cereShopProductService.getList(param)); } /** @@ -219,7 +219,7 @@ public class ProductController { @ApiOperation(value = "商品设置会员价") public Result setProductMember(@RequestBody ProductMemberParam param,HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereShopProductService.setProductMember(param); return new Result(user.getUsername(),"设置会员价格", GsonUtil.objectToGson(param)); } @@ -232,7 +232,7 @@ public class ProductController { @ApiOperation(value = "商品清除会员价") public Result clearProductMember(@RequestBody ProductGetByIdParam param,HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereShopProductService.clearProductMember(param.getProductId()); return new Result(user.getUsername(),"清除会员价格", GsonUtil.objectToGson(param)); } @@ -254,7 +254,7 @@ public class ProductController { @PostMapping(value = "getGroupSelect") @ApiOperation(value = "选择商品分组查询") public Result> getGroupSelect(@RequestBody ProductGetGroupParam param) throws CoBusinessException{ - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); List list=cereShopGroupService.getGroupSelect(param); return new Result(list); } @@ -290,7 +290,7 @@ public class ProductController { return new Result(CoReturnFormat.NOT_FILE); } Workbook wb= WorkbookFactory.create(file.getInputStream()); - cereShopProductService.importProduct(ContextUtil.getShopId(), wb); + cereShopProductService.importProduct(ContextUtil.getBusinessId(), wb); return new Result(); } @@ -329,7 +329,7 @@ public class ProductController { @NoRepeatSubmit @ApiOperation(value = "导出商品数据") public void exportProduct(@RequestBody ProductGetAllParam param, HttpServletRequest request, HttpServletResponse response) throws CoBusinessException { - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); List productExportList = cereShopProductService.getExportList(param); //定义导出的excel名字 String excelName = "商品列表"; diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/RelationshipController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/RelationshipController.java index 8cbf9f8..fb2ab62 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/RelationshipController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/RelationshipController.java @@ -13,7 +13,7 @@ import com.shop.cereshop.business.param.shop.ShopParam; import com.shop.cereshop.business.service.distributor.CereDistributorBuyerService; import com.shop.cereshop.business.service.shop.CereShopRelationshipService; import com.shop.cereshop.business.utils.ContextUtil; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.shop.CereShopRelationship; import com.shop.cereshop.commons.exception.CoBusinessException; @@ -56,8 +56,8 @@ public class RelationshipController { @NoRepeatWebLog public Result save(@RequestBody ShipSaveParam param, HttpServletRequest request) throws CoBusinessException,Exception{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(ContextUtil.getBusinessId()); cereShopRelationshipService.save(param,user); return new Result(user.getUsername(),"添加关系设置", GsonUtil.objectToGson(param)); } @@ -73,8 +73,8 @@ public class RelationshipController { @NoRepeatWebLog public Result update(@RequestBody ShipUpdateParam param, HttpServletRequest request) throws CoBusinessException,Exception{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(ContextUtil.getBusinessId()); cereShopRelationshipService.update(param,user); return new Result(user.getUsername(),"修改关系设置", GsonUtil.objectToGson(param)); } @@ -87,7 +87,7 @@ public class RelationshipController { @PostMapping(value = "getById") @ApiOperation(value = "关系设置查询") public Result getById(@RequestBody ShopParam relationship) throws CoBusinessException{ - relationship.setShopId(ContextUtil.getShopId()); + relationship.setShopId(ContextUtil.getBusinessId()); CereShopRelationship cereShopRelationship=cereShopRelationshipService.getById(relationship.getShopId()); return new Result(cereShopRelationship); } @@ -100,7 +100,7 @@ public class RelationshipController { @PostMapping(value = "getAll") @ApiOperation(value = "关系管理查询") public Result> getAll(@RequestBody ShipGetAllParam param) throws CoBusinessException{ - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); Page page=cereShopRelationshipService.getAll(param); return new Result(page); } @@ -117,8 +117,8 @@ public class RelationshipController { @NoRepeatWebLog public Result bind(@RequestBody ShipBindParam buyer, HttpServletRequest request) throws CoBusinessException,Exception{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - buyer.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + buyer.setShopId(ContextUtil.getBusinessId()); cereDistributorBuyerService.bind(buyer,user); return new Result(user.getUsername(),"绑定关系", GsonUtil.objectToGson(buyer)); } @@ -134,8 +134,8 @@ public class RelationshipController { @NoRepeatWebLog public Result relieveBind(@RequestBody ShipRelieveParam buyer, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - buyer.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + buyer.setShopId(ContextUtil.getBusinessId()); cereDistributorBuyerService.relieveBind(buyer,user); return new Result(user.getUsername(),"解除绑定关系", GsonUtil.objectToGson(buyer)); } @@ -151,8 +151,8 @@ public class RelationshipController { @NoRepeatWebLog public Result delete(@RequestBody ShipDeleteParam buyer, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - buyer.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + buyer.setShopId(ContextUtil.getBusinessId()); cereDistributorBuyerService.delete(buyer,user); return new Result(user.getUsername(),"移除绑定关系", GsonUtil.objectToGson(buyer)); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/RenovationController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/RenovationController.java index 7619555..8f03928 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/RenovationController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/RenovationController.java @@ -11,16 +11,12 @@ import com.shop.cereshop.business.page.tool.ShopDiscountDetail; import com.shop.cereshop.business.page.tool.ShopGroupWorkUDetail; import com.shop.cereshop.business.page.tool.ShopSeckillDetail; import com.shop.cereshop.business.param.renovation.RenovationParam; -import com.shop.cereshop.business.param.shop.ShopParam; import com.shop.cereshop.business.service.platformtool.CerePlatformDiscountService; import com.shop.cereshop.business.service.platformtool.CerePlatformSeckillService; import com.shop.cereshop.business.service.tool.CereShopDiscountService; import com.shop.cereshop.business.service.tool.CereShopGroupWorkService; import com.shop.cereshop.business.service.tool.CereShopSeckillService; import com.shop.cereshop.business.utils.ContextUtil; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; -import com.shop.cereshop.commons.domain.platformtool.CerePlatformDiscount; -import com.shop.cereshop.commons.domain.platformtool.CerePlatformSeckill; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.result.Result; import io.swagger.annotations.Api; @@ -31,7 +27,6 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import javax.servlet.http.HttpServletRequest; import java.util.List; /** @@ -68,7 +63,7 @@ public class RenovationController { @GetMapping("getGroupWorks") @ApiOperation(value = "选择拼团活动查询") public Result> getGroupWorks(RenovationParam param) throws CoBusinessException{ - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); List list=cereShopGroupWorkService.getGroupWorks(param); return new Result(list); } @@ -80,7 +75,7 @@ public class RenovationController { @GetMapping("getSeckills") @ApiOperation(value = "选择秒杀活动查询") public Result> getSeckills(RenovationParam param) throws CoBusinessException{ - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); List list=cereShopSeckillService.getSeckills(param); return new Result(list); } @@ -92,7 +87,7 @@ public class RenovationController { @GetMapping("getDiscounts") @ApiOperation(value = "选择限时折扣活动查询") public Result> getDiscounts(RenovationParam param) throws CoBusinessException{ - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); List list=cereShopDiscountService.getDiscounts(param); return new Result(list); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/RoleController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/RoleController.java index 3c7df38..a2f5320 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/RoleController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/RoleController.java @@ -13,7 +13,7 @@ import com.shop.cereshop.business.param.role.*; import com.shop.cereshop.business.service.permission.CerePlatformPermissionService; import com.shop.cereshop.business.service.role.CerePlatformRoleService; import com.shop.cereshop.business.utils.ContextUtil; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.role.CerePlatformRole; import com.shop.cereshop.commons.exception.CoBusinessException; @@ -57,8 +57,8 @@ public class RoleController { @NoRepeatWebLog public Result insert(@RequestBody @Validated RoleSaveParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); cerePlatformRoleService.save(param,user); return new Result(user.getUsername(),"添加角色", GsonUtil.objectToGson(param)); } @@ -74,7 +74,7 @@ public class RoleController { @NoRepeatWebLog public Result update(@RequestBody RoleUpdateParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cerePlatformRoleService.update(param,user); return new Result(user.getUsername(),"修改角色", GsonUtil.objectToGson(param)); } @@ -91,7 +91,7 @@ public class RoleController { public Result delete(@RequestBody RoleDeleteParam param, HttpServletRequest request) throws CoBusinessException{ ContextUtil.interceptDelete(); //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cerePlatformRoleService.delete(param,user); return new Result(user.getUsername(),"删除角色", GsonUtil.objectToGson(param)); } @@ -115,8 +115,8 @@ public class RoleController { @ApiOperation(value = "角色管理查询") public Result> getAll(@RequestBody RoleGetAllParam param,HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); Page page =cerePlatformRoleService.getAll(param); return new Result(page); } @@ -131,8 +131,8 @@ public class RoleController { @NoRepeatWebLog public Result distribution(@RequestBody RoleDistributionParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setBusinessId(ContextUtil.getBusinessId()); cerePlatformRoleService.distribution(param,user); return new Result(user.getUsername(),"菜单分配", GsonUtil.objectToGson(param)); } @@ -146,8 +146,8 @@ public class RoleController { @ApiOperation(value = "菜单分配查询") public Result getRolePermission(@RequestBody RoleDistributionParam param,HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setBusinessId(user.getBusinessId()); RolePermission rolePermission=cerePlatformPermissionService.getRolePermission(param); return new Result(rolePermission); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/SceneController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/SceneController.java index 661b87a..dd87d15 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/SceneController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/SceneController.java @@ -15,7 +15,7 @@ import com.shop.cereshop.business.param.scene.SceneSaveParam; import com.shop.cereshop.business.param.scene.SceneUpdateParam; import com.shop.cereshop.business.service.scene.CereShopSceneService; import com.shop.cereshop.commons.constant.RefreshSkuRealInfoSourceEnum; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.member.CerePlatformMemberLevel; import com.shop.cereshop.commons.domain.platformtool.CerePlatformSeckill; @@ -65,8 +65,8 @@ public class SceneController { @NoRepeatWebLog public Result insert(@RequestBody @Validated SceneSaveParam param, HttpServletRequest request) throws CoBusinessException,Exception { //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); cereShopSceneService.save(param,user); return new Result(user.getUsername(),"添加场景营销", GsonUtil.objectToGson(param)); } @@ -82,8 +82,8 @@ public class SceneController { @NoRepeatWebLog public Result update(@RequestBody @Validated SceneUpdateParam param, HttpServletRequest request) throws CoBusinessException,Exception { //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); cereShopSceneService.update(param,user); return new Result(user.getUsername(),"编辑场景营销", GsonUtil.objectToGson(param)); } @@ -99,7 +99,7 @@ public class SceneController { @NoRepeatWebLog public Result delete(@RequestBody SceneGetByIdParam param, HttpServletRequest request) throws CoBusinessException,Exception { //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereShopSceneService.delete(param,user); return new Result(user.getUsername(),"删除场景营销", GsonUtil.objectToGson(param)); } @@ -115,8 +115,8 @@ public class SceneController { @NoRepeatWebLog public Result start(@RequestBody SceneGetByIdParam param, HttpServletRequest request) throws CoBusinessException,Exception { //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); boolean result = cereShopSceneService.start(param,user); if (result) { //刷新sku实时信息 @@ -136,8 +136,8 @@ public class SceneController { @NoRepeatWebLog public Result stop(@RequestBody SceneGetByIdParam param, HttpServletRequest request) throws CoBusinessException,Exception { //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); boolean result = cereShopSceneService.stop(param,user); if (result) { //刷新sku实时信息 @@ -176,8 +176,8 @@ public class SceneController { @ApiOperation(value = "场景营销列表查询") public Result> getAll(@RequestBody SceneGetAllParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); Page page =cereShopSceneService.getAll(param); return new Result(page); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopBankController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopBankController.java index 4abd70f..b739f53 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopBankController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopBankController.java @@ -17,7 +17,7 @@ import com.shop.cereshop.business.service.dict.CerePlatformDictService; import com.shop.cereshop.business.service.shop.CereShopBankService; import com.shop.cereshop.business.utils.ContextUtil; import com.shop.cereshop.commons.constant.CoReturnFormat; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.shop.CerePlatformShop; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.result.Result; @@ -71,8 +71,8 @@ public class ShopBankController { } } //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(ContextUtil.getBusinessId()); cereShopBankService.save(param,user); return new Result(user.getUsername(),"绑定账户", GsonUtil.objectToGson(param)); } @@ -96,8 +96,8 @@ public class ShopBankController { } } //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(ContextUtil.getBusinessId()); cereShopBankService.update(param,user); return new Result(user.getUsername(),"更换账户", GsonUtil.objectToGson(param)); } @@ -121,13 +121,13 @@ public class ShopBankController { } } //校验手机号是否为店铺账号 - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); CerePlatformShop shop=cereShopBankService.findByPhone(param.getShopId(),param.getPhone()); if(shop==null){ return new Result(CoReturnFormat.PHONE_NOT_BANK_SHOP); } //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereShopBankService.delete(param,user); return new Result(user.getUsername(),"解绑账户", GsonUtil.objectToGson(param)); } @@ -140,7 +140,7 @@ public class ShopBankController { @PostMapping(value = "getById") @ApiOperation(value = "收款账户信息查询") public Result getById(@RequestBody ShopParam param) throws CoBusinessException{ - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); ShopBankDetail bank = cereShopBankService.getById(param.getShopId()); return new Result(bank); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopChannelActivityController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopChannelActivityController.java index cd26072..a676d0e 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopChannelActivityController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopChannelActivityController.java @@ -7,7 +7,7 @@ import com.shop.cereshop.business.param.channel.ChannelActivityGetAllParam; import com.shop.cereshop.business.param.channel.ChannelActivityParam; import com.shop.cereshop.business.service.channel.ShopChannelActivityService; import com.shop.cereshop.business.utils.ContextUtil; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.channel.ShopChannelActivity; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.tool.CereShopCoupon; @@ -51,8 +51,8 @@ public class ShopChannelActivityController { @ApiOperation(value = "新增渠道活动") @NoRepeatWebLog public Result save(@RequestBody @Validated ChannelActivityParam param, HttpServletRequest request) throws CoBusinessException{ - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(ContextUtil.getBusinessId()); shopChannelActivityService.save(param); return new Result(user.getUsername(),"新增渠道活动", GsonUtil.objectToGson(param)); } @@ -67,8 +67,8 @@ public class ShopChannelActivityController { @ApiOperation(value = "更换账户") @NoRepeatWebLog public Result update(@RequestBody ChannelActivityParam param, HttpServletRequest request) throws CoBusinessException{ - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(ContextUtil.getBusinessId()); shopChannelActivityService.update(param); return new Result(user.getUsername(),"编辑渠道活动", GsonUtil.objectToGson(param)); } @@ -83,8 +83,8 @@ public class ShopChannelActivityController { @ApiOperation(value = "删除渠道活动") @NoRepeatWebLog public Result delete(@RequestBody ChannelActivityParam param, HttpServletRequest request) throws CoBusinessException { - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(ContextUtil.getBusinessId()); shopChannelActivityService.delete(param); return new Result(user.getUsername(),"删除渠道活动", GsonUtil.objectToGson(param)); } @@ -97,7 +97,7 @@ public class ShopChannelActivityController { @PostMapping(value = "getById") @ApiOperation(value = "收款账户信息查询") public Result getById(@RequestBody ChannelActivityParam param) throws CoBusinessException{ - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); return new Result<>(shopChannelActivityService.getByIdCheckShopId(param)); } @@ -109,7 +109,7 @@ public class ShopChannelActivityController { @PostMapping(value = "getAll") @ApiOperation(value = "分页查询渠道活动") public Result> getAll(@RequestBody ChannelActivityGetAllParam param) throws CoBusinessException { - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); return new Result<>(shopChannelActivityService.getAll(param)); } @@ -121,7 +121,7 @@ public class ShopChannelActivityController { @PostMapping(value = "selectChannelCouponByActivityId") @ApiOperation(value = "分页查询渠道活动关联优惠券") public Result> selectChannelCouponByActivityId(@RequestBody ChannelActivityCouponPageParam param) throws CoBusinessException { - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); return new Result<>(shopChannelActivityService.selectChannelCouponByActivityId(param)); } } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopController.java index a1db084..e1909a1 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopController.java @@ -8,12 +8,14 @@ package com.shop.cereshop.business.controller; import com.shop.cereshop.business.annotation.NoRepeatSubmit; import com.shop.cereshop.business.annotation.NoRepeatWebLog; import com.shop.cereshop.business.page.shop.Shop; -import com.shop.cereshop.business.param.shop.ShopParam; +import com.shop.cereshop.business.param.shop.ShopGetByIdParam; +import com.shop.cereshop.business.param.shop.ShopSaveParam; import com.shop.cereshop.business.param.shop.ShopUpdateLogoParam; -import com.shop.cereshop.business.service.shop.*; +import com.shop.cereshop.business.service.shop.CerePlatformShopService; +import com.shop.cereshop.business.service.shop.CereShopReturnService; import com.shop.cereshop.business.utils.ContextUtil; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; -import com.shop.cereshop.commons.domain.shop.*; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; +import com.shop.cereshop.commons.domain.shop.CereShopReturn; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.result.Result; import com.shop.cereshop.commons.utils.GsonUtil; @@ -21,9 +23,14 @@ import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletRequest; +import java.util.List; /** * 店铺 @@ -43,17 +50,6 @@ public class ShopController { @Autowired private CereShopReturnService cereShopReturnService; - @Autowired - private CereShopPersonalService cereShopPersonalService; - - @Autowired - private CereShopIndividualBusinessesService cereShopIndividualBusinessesService; - - @Autowired - private CereShopOtherOrganizationsService cereShopOtherOrganizationsService; - - @Autowired - private CereShopEnterpriseService cereShopEnterpriseService; /** * 店铺信息查询 @@ -62,191 +58,68 @@ public class ShopController { */ @PostMapping(value = "getById") @ApiOperation(value = "店铺信息查询") - public Result getById(@RequestBody ShopParam cerePlatformShop) throws CoBusinessException{ - cerePlatformShop.setShopId(ContextUtil.getShopId()); + public Result getById(@RequestBody ShopGetByIdParam cerePlatformShop) throws CoBusinessException{ Shop shop=cerePlatformShopService.getById(cerePlatformShop.getShopId()); return new Result(shop); } /** - * 修改店铺信息 + * 新建店铺 * @param param * @return */ - @PostMapping(value = "update") - @NoRepeatSubmit - @ApiOperation(value = "修改店铺信息") - @NoRepeatWebLog - public Result updateLogo(@RequestBody ShopUpdateLogoParam param, HttpServletRequest request) throws CoBusinessException{ - //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(ContextUtil.getShopId()); - cerePlatformShopService.update(param,user); - return new Result(user.getUsername(),"修改店铺信息", GsonUtil.objectToGson(param)); - } - - /** - * 修改退货地址信息 - * @param cereShopReturn - * @return - */ - @PostMapping(value = "updateReturn") + @PostMapping(value = "save") @NoRepeatSubmit - @ApiOperation(value = "修改退货地址信息") + @ApiOperation(value = "新建店铺") @NoRepeatWebLog - public Result updateReturn(@RequestBody CereShopReturn cereShopReturn, HttpServletRequest request) throws CoBusinessException{ + public Result save(@RequestBody @Validated ShopSaveParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - cereShopReturn.setShopId(ContextUtil.getShopId()); - cereShopReturnService.updateReturn(cereShopReturn,user); - return new Result(user.getUsername(),"修改退货地址信息", GsonUtil.objectToGson(cereShopReturn)); + param.setBusinessId(ContextUtil.getBusinessId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + cerePlatformShopService.save(param,user); + return new Result(user.getUsername(),"新建店铺", GsonUtil.objectToGson(param)); } /** - * 店铺认证(个人) - * @param personal + * 店铺管理查询 * @return */ - @PostMapping(value = "personal") - @NoRepeatSubmit - @ApiOperation(value = "店铺认证(个人)") - @NoRepeatWebLog - public Result personal(@RequestBody CereShopPersonal personal, HttpServletRequest request) throws CoBusinessException{ - //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - personal.setShopId(ContextUtil.getShopId()); - cereShopPersonalService.personal(personal,user); - return new Result(user.getUsername(),"店铺认证(个人)", GsonUtil.objectToGson(personal)); + @PostMapping(value = "getAll") + @ApiOperation(value = "店铺管理查询") + public Result> selectAll() throws CoBusinessException{ + return new Result(cerePlatformShopService.selectAll(ContextUtil.getBusinessId())); } /** - * 店铺认证(个体工商户) - * @param individualBusinesses - * @return - */ - @PostMapping(value = "individual") - @NoRepeatSubmit - @ApiOperation(value = "店铺认证(个体工商户)") - @NoRepeatWebLog - public Result individual(@RequestBody CereShopIndividualBusinesses individualBusinesses, HttpServletRequest request) throws CoBusinessException{ - //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - individualBusinesses.setShopId(ContextUtil.getShopId()); - cereShopIndividualBusinessesService.individual(individualBusinesses,user); - return new Result(user.getUsername(),"店铺认证(个体工商户)", GsonUtil.objectToGson(individualBusinesses)); - } - - /** - * 店铺认证(企业) - * @param enterprise - * @return - */ - @PostMapping(value = "enterprise") - @NoRepeatSubmit - @ApiOperation(value = "店铺认证(企业)") - @NoRepeatWebLog - public Result enterprise(@RequestBody CereShopEnterprise enterprise, HttpServletRequest request) throws CoBusinessException{ - //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - enterprise.setShopId(ContextUtil.getShopId()); - cereShopEnterpriseService.enterprise(enterprise,user); - return new Result(user.getUsername(),"店铺认证(企业)", GsonUtil.objectToGson(enterprise)); - } - - /** - * 店铺认证(其他组织) - * @param otherOrganizations - * @return - */ - @PostMapping(value = "organizations") - @NoRepeatSubmit - @ApiOperation(value = "店铺认证(其他组织)") - @NoRepeatWebLog - public Result organizations(@RequestBody CereShopOtherOrganizations otherOrganizations, HttpServletRequest request) throws CoBusinessException{ - //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - otherOrganizations.setShopId(ContextUtil.getShopId()); - cereShopOtherOrganizationsService.organizations(otherOrganizations,user); - return new Result(user.getUsername(),"店铺认证(其他组织)", GsonUtil.objectToGson(otherOrganizations)); - } - - /** - * 修改店铺认证(个人) - * @param personal - * @return - */ - @PostMapping(value = "updatePersonal") - @NoRepeatSubmit - @ApiOperation(value = "修改店铺认证(个人)") - @NoRepeatWebLog - public Result updatePersonal(@RequestBody CereShopPersonal personal, HttpServletRequest request) throws CoBusinessException{ - //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - personal.setShopId(ContextUtil.getShopId()); - cereShopPersonalService.updatePersonal(personal,user); - return new Result(user.getUsername(),"修改店铺认证(个人)", GsonUtil.objectToGson(personal)); - } - - /** - * 修改店铺认证(个体工商户) - * @param individualBusinesses - * @return - */ - @PostMapping(value = "updateIndividual") - @NoRepeatSubmit - @ApiOperation(value = "修改店铺认证(个体工商户)") - @NoRepeatWebLog - public Result updateIndividual(@RequestBody CereShopIndividualBusinesses individualBusinesses, HttpServletRequest request) throws CoBusinessException{ - //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - individualBusinesses.setShopId(ContextUtil.getShopId()); - cereShopIndividualBusinessesService.updateIndividual(individualBusinesses,user); - return new Result(user.getUsername(),"修改店铺认证(个体工商户)", GsonUtil.objectToGson(individualBusinesses)); - } - - /** - * 修改店铺认证(企业) - * @param enterprise + * 修改店铺信息 + * @param param * @return */ - @PostMapping(value = "updateEnterprise") + @PostMapping(value = "update") @NoRepeatSubmit - @ApiOperation(value = "修改店铺认证(企业)") + @ApiOperation(value = "修改店铺信息") @NoRepeatWebLog - public Result updateEnterprise(@RequestBody CereShopEnterprise enterprise, HttpServletRequest request) throws CoBusinessException{ + public Result updateLogo(@RequestBody ShopUpdateLogoParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - enterprise.setShopId(ContextUtil.getShopId()); - cereShopEnterpriseService.updateEnterprise(enterprise,user); - return new Result(user.getUsername(),"修改店铺认证(企业)", GsonUtil.objectToGson(enterprise)); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + cerePlatformShopService.update(param,user); + return new Result(user.getUsername(),"修改店铺信息", GsonUtil.objectToGson(param)); } /** - * 修改店铺认证(其他组织) - * @param otherOrganizations + * 修改退货地址信息 + * @param cereShopReturn * @return */ - @PostMapping(value = "updateOrganizations") + @PostMapping(value = "updateReturn") @NoRepeatSubmit - @ApiOperation(value = "修改店铺认证(其他组织)") + @ApiOperation(value = "修改退货地址信息") @NoRepeatWebLog - public Result updateOrganizations(@RequestBody CereShopOtherOrganizations otherOrganizations, HttpServletRequest request) throws CoBusinessException{ + public Result updateReturn(@RequestBody CereShopReturn cereShopReturn, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - otherOrganizations.setShopId(ContextUtil.getShopId()); - cereShopOtherOrganizationsService.updateOrganizations(otherOrganizations,user); - return new Result(user.getUsername(),"修改店铺认证(其他组织)", GsonUtil.objectToGson(otherOrganizations)); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + cereShopReturnService.updateReturn(cereShopReturn,user); + return new Result(user.getUsername(),"修改退货地址信息", GsonUtil.objectToGson(cereShopReturn)); } - - /** - * 新生支付信息认证 - * @return - */ - @PostMapping(value = "registerByXs") - @ApiOperation(value = "新生支付信息认证") - public Result registerByXs() throws CoBusinessException{ - Shop shop=cerePlatformShopService.registerByXs(ContextUtil.getShopId()); - return new Result(shop); - } } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopCouponController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopCouponController.java index 85fa916..a41fb4e 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopCouponController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopCouponController.java @@ -13,7 +13,7 @@ import com.shop.cereshop.business.page.tool.ShopCouponDetail; import com.shop.cereshop.business.page.tool.ToolProduct; import com.shop.cereshop.business.param.tool.*; import com.shop.cereshop.business.service.tool.CereShopCouponService; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.result.Result; @@ -53,8 +53,8 @@ public class ShopCouponController { @NoRepeatWebLog public Result insert(@RequestBody @Validated ShopCouponSaveParam param, HttpServletRequest request) throws CoBusinessException,Exception{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); cereShopCouponService.save(param,user); return new Result(user.getUsername(),"新增满减券/折扣券", GsonUtil.objectToGson(param)); } @@ -70,8 +70,8 @@ public class ShopCouponController { @NoRepeatWebLog public Result update(@RequestBody @Validated ShopCouponUpdateParam param, HttpServletRequest request) throws CoBusinessException,Exception{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); cereShopCouponService.update(param,user); return new Result(user.getUsername(),"修改满减券/折扣券", GsonUtil.objectToGson(param)); } @@ -87,7 +87,7 @@ public class ShopCouponController { @NoRepeatWebLog public Result delete(@RequestBody ShopCouponGetByIdParam param, HttpServletRequest request) throws CoBusinessException,Exception{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereShopCouponService.delete(param.getShopCouponId(),user); return new Result(user.getUsername(),"删除满减券/折扣券", GsonUtil.objectToGson(param)); } @@ -103,7 +103,7 @@ public class ShopCouponController { @NoRepeatWebLog public Result stop(@RequestBody ShopCouponGetByIdParam param, HttpServletRequest request) throws CoBusinessException,Exception{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereShopCouponService.stop(param.getShopCouponId(),user); return new Result(user.getUsername(),"停止满减券/折扣券", GsonUtil.objectToGson(param)); } @@ -127,8 +127,8 @@ public class ShopCouponController { @ApiOperation(value = "数据效果查询") public Result getData(@RequestBody ShopCouponGetByIdParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - ShopCouponData detail=cereShopCouponService.getData(param.getShopCouponId(),user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + ShopCouponData detail=cereShopCouponService.getData(param.getShopCouponId(),user.getBusinessId()); return new Result(detail); } @@ -140,8 +140,8 @@ public class ShopCouponController { @ApiOperation(value = "满减券/折扣券管理查询") public Result> getAll(@RequestBody ShopCouponGetAllParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); Page page =cereShopCouponService.getAll(param); return new Result(page); } @@ -154,8 +154,8 @@ public class ShopCouponController { @ApiOperation(value = "选择商品查询") public Result> getProducts(@RequestBody ToolProductParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); Page page=cereShopCouponService.getProducts(param); return new Result(page); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopCrossDetailController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopCrossDetailController.java index 5f3bfe0..3335641 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopCrossDetailController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopCrossDetailController.java @@ -14,7 +14,7 @@ import com.shop.cereshop.business.param.shop.ShopCrossDetailSaveParam; import com.shop.cereshop.business.param.shop.ShopCrossDetailUpdateParam; import com.shop.cereshop.business.service.shop.CereShopCrossDetailService; import com.shop.cereshop.business.utils.ContextUtil; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.result.Result; @@ -62,7 +62,7 @@ public class ShopCrossDetailController { @PostMapping(value = "getAll") @ApiOperation(value = "跨境拓展查询") public Result> getAll(@RequestBody ShopCrossDetailGetAllParam param, HttpServletRequest request) throws CoBusinessException{ - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); return new Result(cereShopCrossDetailService.getAll(param)); } @@ -79,8 +79,8 @@ public class ShopCrossDetailController { @NoRepeatWebLog public Result save(@RequestBody @Validated ShopCrossDetailSaveParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(ContextUtil.getBusinessId()); cereShopCrossDetailService.insert(param,user); return new Result(user.getUsername(),"新增跨境拓展信息", GsonUtil.objectToGson(param)); } @@ -96,8 +96,8 @@ public class ShopCrossDetailController { @NoRepeatWebLog public Result update(@RequestBody ShopCrossDetailUpdateParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(ContextUtil.getBusinessId()); cereShopCrossDetailService.update(param,user); return new Result(user.getUsername(),"更新跨境拓展信息", GsonUtil.objectToGson(param)); } @@ -113,7 +113,7 @@ public class ShopCrossDetailController { @NoRepeatWebLog public Result delete(@RequestBody ShopCrossDetailGetByIdParam param, HttpServletRequest request) throws CoBusinessException,Exception{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereShopCrossDetailService.deleteById(param.getCrossDetailId(),user); return new Result(user.getUsername(),"删除跨境拓展信息", GsonUtil.objectToGson(param)); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopCrowdController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopCrowdController.java index de66958..2e80e13 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopCrowdController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopCrowdController.java @@ -17,7 +17,7 @@ import com.shop.cereshop.business.param.tool.ShopCrowdUpdateParam; import com.shop.cereshop.business.service.tool.CereShopCrowdService; import com.shop.cereshop.business.service.tool.CereShopOperateService; import com.shop.cereshop.business.utils.ContextUtil; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.result.Result; @@ -60,7 +60,7 @@ public class ShopCrowdController { @NoRepeatWebLog public Result save(@RequestBody ShopCrowdSaveParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereShopCrowdService.save(param,user); return new Result(user.getUsername(),"新增人群", GsonUtil.objectToGson(param)); } @@ -76,7 +76,7 @@ public class ShopCrowdController { @NoRepeatWebLog public Result update(@RequestBody ShopCrowdUpdateParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereShopCrowdService.update(param,user); return new Result(user.getUsername(),"修改人群", GsonUtil.objectToGson(param)); } @@ -92,7 +92,7 @@ public class ShopCrowdController { @NoRepeatWebLog public Result delete(@RequestBody ShopCrowdGetByIdParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereShopCrowdService.delete(param,user); return new Result(user.getUsername(),"删除人群", GsonUtil.objectToGson(param)); } @@ -115,7 +115,7 @@ public class ShopCrowdController { @PostMapping(value = "getAll") @ApiOperation(value = "人群列表查询") public Result> getAll(@RequestBody ShopCrowdGetAllParam param) throws CoBusinessException{ - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); Page page=cereShopCrowdService.getAll(param); return new Result(page); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopDiscountController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopDiscountController.java index 152461c..af432be 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopDiscountController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopDiscountController.java @@ -14,7 +14,7 @@ import com.shop.cereshop.business.page.tool.ToolProduct; import com.shop.cereshop.business.param.tool.*; import com.shop.cereshop.business.service.tool.CereShopDiscountService; import com.shop.cereshop.commons.constant.CoReturnFormat; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.result.Result; @@ -58,8 +58,8 @@ public class ShopDiscountController { throw new CoBusinessException(CoReturnFormat.HAVE_ONE_TOOL_PRODUCT); } //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); cereShopDiscountService.save(param,user); return new Result(user.getUsername(),"新增限时折扣活动", GsonUtil.objectToGson(param)); } @@ -78,8 +78,8 @@ public class ShopDiscountController { throw new CoBusinessException(CoReturnFormat.HAVE_ONE_TOOL_PRODUCT); } //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); cereShopDiscountService.update(param,user); return new Result(user.getUsername(),"修改限时折扣活动", GsonUtil.objectToGson(param)); } @@ -95,7 +95,7 @@ public class ShopDiscountController { @NoRepeatWebLog public Result delete(@RequestBody ShopDiscountGetByIdParam param, HttpServletRequest request) throws CoBusinessException,Exception{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereShopDiscountService.delete(param.getShopDiscountId(),user); return new Result(user.getUsername(),"删除限时折扣活动", GsonUtil.objectToGson(param)); } @@ -111,7 +111,7 @@ public class ShopDiscountController { @NoRepeatWebLog public Result stop(@RequestBody ShopDiscountGetByIdParam param, HttpServletRequest request) throws CoBusinessException,Exception{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereShopDiscountService.stop(param.getShopDiscountId(),user); return new Result(user.getUsername(),"停止限时折扣活动", GsonUtil.objectToGson(param)); } @@ -135,8 +135,8 @@ public class ShopDiscountController { @ApiOperation(value = "数据效果查询") public Result getData(@RequestBody ShopDiscountGetByIdParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - ShopDiscountData detail=cereShopDiscountService.getData(param,user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + ShopDiscountData detail=cereShopDiscountService.getData(param,user.getBusinessId()); return new Result(detail); } @@ -148,8 +148,8 @@ public class ShopDiscountController { @ApiOperation(value = "限时折扣活动管理查询") public Result> getAll(@RequestBody ShopDiscountGetAllParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); Page page =cereShopDiscountService.getAll(param); return new Result(page); } @@ -162,8 +162,8 @@ public class ShopDiscountController { @ApiOperation(value = "选择商品查询") public Result> getProducts(@RequestBody ToolProductParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); Page page=cereShopDiscountService.getProducts(param); return new Result(page); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopExtensionController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopExtensionController.java index 970a0a8..da94d68 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopExtensionController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopExtensionController.java @@ -10,7 +10,7 @@ import com.shop.cereshop.business.annotation.NoRepeatWebLog; import com.shop.cereshop.business.param.shop.ShopParam; import com.shop.cereshop.business.service.shop.CereShopExtensionService; import com.shop.cereshop.business.utils.ContextUtil; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.shop.CereShopExtension; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.result.Result; @@ -50,8 +50,8 @@ public class ShopExtensionController { @NoRepeatWebLog public Result save(@RequestBody CereShopExtension shopExtension, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - shopExtension.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + shopExtension.setShopId(ContextUtil.getBusinessId()); cereShopExtensionService.save(shopExtension,user); return new Result(user.getUsername(),"添加或修改推广设置", GsonUtil.objectToGson(shopExtension)); } @@ -64,7 +64,7 @@ public class ShopExtensionController { @PostMapping(value = "getAll") @ApiOperation(value = "推广设置查询") public Result> getAll(@RequestBody ShopParam shopExtension) throws CoBusinessException{ - shopExtension.setShopId(ContextUtil.getShopId()); + shopExtension.setShopId(ContextUtil.getBusinessId()); List list=cereShopExtensionService.getAll(shopExtension); return new Result(list); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopGroupController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopGroupController.java index 1f0c605..57769e5 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopGroupController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopGroupController.java @@ -14,7 +14,7 @@ import com.shop.cereshop.business.page.order.Product; import com.shop.cereshop.business.param.group.*; import com.shop.cereshop.business.service.shop.CereShopGroupService; import com.shop.cereshop.business.utils.ContextUtil; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.result.Result; @@ -54,8 +54,8 @@ public class ShopGroupController { @NoRepeatWebLog public Result save(@RequestBody ShopGroupSaveParam group, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - group.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + group.setShopId(ContextUtil.getBusinessId()); cereShopGroupService.save(group,user); return new Result(user.getUsername(),"添加分组", GsonUtil.objectToGson(group)); } @@ -69,7 +69,7 @@ public class ShopGroupController { @NoRepeatSubmit @ApiOperation(value = "获取满足条件的商品id") public Result> getProductIds(@RequestBody ShopGroupSaveParam group) throws CoBusinessException{ - group.setShopId(ContextUtil.getShopId()); + group.setShopId(ContextUtil.getBusinessId()); List list=cereShopGroupService.getProductIds(group); return new Result(list); } @@ -85,8 +85,8 @@ public class ShopGroupController { @NoRepeatWebLog public Result update(@RequestBody ShopGroupUpdateParam group, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - group.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + group.setShopId(ContextUtil.getBusinessId()); cereShopGroupService.update(group,user); return new Result(user.getUsername(),"修改分组", GsonUtil.objectToGson(group)); } @@ -102,7 +102,7 @@ public class ShopGroupController { @NoRepeatWebLog public Result delete(@RequestBody GroupDeleteParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereShopGroupService.delete(param,user); return new Result(user.getUsername(),"删除分组", GsonUtil.objectToGson(param)); } @@ -127,7 +127,7 @@ public class ShopGroupController { @PostMapping(value = "getAll") @ApiOperation(value = "分组管理查询") public Result> getAll(@RequestBody GroupGetAllParam param) throws CoBusinessException{ - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); Page page=cereShopGroupService.getAll(param); return new Result(page); } @@ -140,7 +140,7 @@ public class ShopGroupController { @PostMapping(value = "getProducts") @ApiOperation(value = "手动添加商品查询") public Result> getProducts(@RequestBody GroupProductParam param) throws CoBusinessException{ - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); Page page=cereShopGroupService.getProducts(param); return new Result(page); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopGroupWorkController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopGroupWorkController.java index 7d5ed48..53a3cbc 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopGroupWorkController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopGroupWorkController.java @@ -14,9 +14,8 @@ import com.shop.cereshop.business.page.tool.ToolProduct; import com.shop.cereshop.business.param.tool.*; import com.shop.cereshop.business.service.product.CereProductSkuService; import com.shop.cereshop.business.service.tool.CereShopGroupWorkService; -import com.shop.cereshop.business.utils.ContextUtil; import com.shop.cereshop.commons.constant.CoReturnFormat; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.result.Result; @@ -63,8 +62,8 @@ public class ShopGroupWorkController { throw new CoBusinessException(CoReturnFormat.HAVE_ONE_TOOL_PRODUCT); } //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); cereShopGroupWorkService.save(param,user); return new Result(user.getUsername(),"新增拼团活动", GsonUtil.objectToGson(param)); } @@ -83,8 +82,8 @@ public class ShopGroupWorkController { throw new CoBusinessException(CoReturnFormat.HAVE_ONE_TOOL_PRODUCT); } //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); cereShopGroupWorkService.update(param,user); return new Result(user.getUsername(),"修改拼团活动", GsonUtil.objectToGson(param)); } @@ -100,7 +99,7 @@ public class ShopGroupWorkController { @NoRepeatWebLog public Result delete(@RequestBody ShopGroupWorkGetByIdParam param, HttpServletRequest request) throws CoBusinessException,Exception{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereShopGroupWorkService.delete(param.getShopGroupWorkId(),user); return new Result(user.getUsername(),"删除拼团活动", GsonUtil.objectToGson(param)); } @@ -116,7 +115,7 @@ public class ShopGroupWorkController { @NoRepeatWebLog public Result stop(@RequestBody ShopGroupWorkGetByIdParam param, HttpServletRequest request) throws CoBusinessException,Exception{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereShopGroupWorkService.stop(param.getShopGroupWorkId(),user); return new Result(user.getUsername(),"停止拼团活动", GsonUtil.objectToGson(param)); } @@ -140,8 +139,8 @@ public class ShopGroupWorkController { @ApiOperation(value = "数据效果查询") public Result getData(@RequestBody ShopGroupWorkGetByIdParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - ShopGroupWorkData detail=cereShopGroupWorkService.getData(param,user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + ShopGroupWorkData detail=cereShopGroupWorkService.getData(param,user.getBusinessId()); return new Result(detail); } @@ -153,8 +152,8 @@ public class ShopGroupWorkController { @ApiOperation(value = "拼团活动管理查询") public Result> getAll(@RequestBody ShopGroupWorkGetAllParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); Page page =cereShopGroupWorkService.getAll(param); return new Result(page); } @@ -167,8 +166,8 @@ public class ShopGroupWorkController { @ApiOperation(value = "选择商品查询") public Result> getProducts(@RequestBody ToolProductParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); Page page=cereShopGroupWorkService.getProducts(param); return new Result(page); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopLabelController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopLabelController.java index a78915d..1cb507b 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopLabelController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopLabelController.java @@ -13,7 +13,7 @@ import com.shop.cereshop.business.param.label.*; import com.shop.cereshop.business.service.label.CereLabelSourceService; import com.shop.cereshop.business.service.label.CereShopLabelService; import com.shop.cereshop.business.utils.ContextUtil; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.label.CereShopLabel; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.result.Result; @@ -56,8 +56,8 @@ public class ShopLabelController { @NoRepeatWebLog public Result save(@RequestBody LabelSaveParam label, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - label.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + label.setShopId(ContextUtil.getBusinessId()); cereShopLabelService.save(label,user); return new Result(user.getUsername(),"添加标签", GsonUtil.objectToGson(label)); } @@ -73,8 +73,8 @@ public class ShopLabelController { @NoRepeatWebLog public Result update(@RequestBody LabelUpdateParam label, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - label.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + label.setShopId(ContextUtil.getBusinessId()); cereShopLabelService.update(label,user); return new Result(user.getUsername(),"修改标签", GsonUtil.objectToGson(label)); } @@ -90,8 +90,8 @@ public class ShopLabelController { @NoRepeatWebLog public Result delete(@RequestBody LabelDeleteParam label, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - label.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + label.setShopId(ContextUtil.getBusinessId()); cereShopLabelService.delete(label,user); return new Result(user.getUsername(),"删除标签", GsonUtil.objectToGson(label)); } @@ -116,7 +116,7 @@ public class ShopLabelController { @PostMapping(value = "getAll") @ApiOperation(value = "标签管理查询") public Result> getAll(@RequestBody LabelGetAllParam param) throws CoBusinessException{ - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); List list=cereShopLabelService.getAll(param); return new Result(list); } @@ -132,7 +132,7 @@ public class ShopLabelController { @NoRepeatWebLog public Result saveSource(@RequestBody LabelSaveSourceParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereLabelSourceService.saveSource(param,user); return new Result(user.getUsername(),"上传素材", GsonUtil.objectToGson(param)); } @@ -148,7 +148,7 @@ public class ShopLabelController { @NoRepeatWebLog public Result updateSource(@RequestBody LabelSaveSourceParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereLabelSourceService.updateSource(param,user); return new Result(user.getUsername(),"更新素材绑定标签", GsonUtil.objectToGson(param)); } @@ -176,8 +176,8 @@ public class ShopLabelController { @NoRepeatWebLog public Result deleteSource(@RequestBody LabelDeleteSourceParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(ContextUtil.getBusinessId()); cereLabelSourceService.deleteSource(param,user); return new Result(user.getUsername(),"素材图片删除", GsonUtil.objectToGson(param)); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopRecruitController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopRecruitController.java index 9fff69c..5447804 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopRecruitController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopRecruitController.java @@ -11,7 +11,7 @@ import com.shop.cereshop.business.param.recruit.ShopRecruitParam; import com.shop.cereshop.business.param.shop.ShopParam; import com.shop.cereshop.business.service.shop.CereShopRecruitService; import com.shop.cereshop.business.utils.ContextUtil; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.shop.CereShopRecruit; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.result.Result; @@ -50,8 +50,8 @@ public class ShopRecruitController { @NoRepeatWebLog public Result save(@RequestBody ShopRecruitParam recruit, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - recruit.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + recruit.setShopId(ContextUtil.getBusinessId()); cereShopRecruitService.save(recruit,user); return new Result(user.getUsername(),"添加招募设置", GsonUtil.objectToGson(recruit)); } @@ -67,8 +67,8 @@ public class ShopRecruitController { @NoRepeatWebLog public Result update(@RequestBody ShopRecruitParam recruit, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - recruit.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + recruit.setShopId(ContextUtil.getBusinessId()); cereShopRecruitService.update(recruit,user); return new Result(user.getUsername(),"修改招募设置", GsonUtil.objectToGson(recruit)); } @@ -81,7 +81,7 @@ public class ShopRecruitController { @PostMapping(value = "getByShopId") @ApiOperation(value = "招募设置查询") public Result getByShopId(@RequestBody ShopParam recruit) throws CoBusinessException{ - recruit.setShopId(ContextUtil.getShopId()); + recruit.setShopId(ContextUtil.getBusinessId()); ShopRecruitParam cereShopRecruit=cereShopRecruitService.getByShopId(recruit.getShopId()); return new Result(cereShopRecruit); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopSeckillController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopSeckillController.java index f0b9147..9827871 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopSeckillController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopSeckillController.java @@ -14,7 +14,7 @@ import com.shop.cereshop.business.page.tool.ToolProduct; import com.shop.cereshop.business.param.tool.*; import com.shop.cereshop.business.service.tool.CereShopSeckillService; import com.shop.cereshop.commons.constant.CoReturnFormat; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.result.Result; @@ -58,8 +58,8 @@ public class ShopSeckillController { throw new CoBusinessException(CoReturnFormat.HAVE_ONE_TOOL_PRODUCT); } //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); cereShopSeckillService.save(param,user); return new Result(user.getUsername(),"新增秒杀活动", GsonUtil.objectToGson(param)); } @@ -78,8 +78,8 @@ public class ShopSeckillController { throw new CoBusinessException(CoReturnFormat.HAVE_ONE_TOOL_PRODUCT); } //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); cereShopSeckillService.update(param,user); return new Result(user.getUsername(),"修改秒杀活动", GsonUtil.objectToGson(param)); } @@ -95,7 +95,7 @@ public class ShopSeckillController { @NoRepeatWebLog public Result delete(@RequestBody ShopSeckillGetByIdParam param, HttpServletRequest request) throws CoBusinessException,Exception{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereShopSeckillService.delete(param.getShopSeckillId(),user); return new Result(user.getUsername(),"删除秒杀活动", GsonUtil.objectToGson(param)); } @@ -111,7 +111,7 @@ public class ShopSeckillController { @NoRepeatWebLog public Result stop(@RequestBody ShopSeckillGetByIdParam param, HttpServletRequest request) throws CoBusinessException,Exception{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereShopSeckillService.stop(param.getShopSeckillId(),user); return new Result(user.getUsername(),"停止秒杀活动", GsonUtil.objectToGson(param)); } @@ -135,8 +135,8 @@ public class ShopSeckillController { @ApiOperation(value = "数据效果查询") public Result getData(@RequestBody ShopSeckillGetByIdParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - ShopSeckillData detail=cereShopSeckillService.getData(param,user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + ShopSeckillData detail=cereShopSeckillService.getData(param,user.getBusinessId()); return new Result(detail); } @@ -148,8 +148,8 @@ public class ShopSeckillController { @ApiOperation(value = "秒杀活动管理查询") public Result> getAll(@RequestBody ShopSeckillGetAllParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); Page page =cereShopSeckillService.getAll(param); return new Result(page); } @@ -162,8 +162,8 @@ public class ShopSeckillController { @ApiOperation(value = "选择商品查询") public Result> getProducts(@RequestBody ToolProductParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(user.getBusinessId()); Page page=cereShopSeckillService.getProducts(param); return new Result(page); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopUserLabelController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopUserLabelController.java index e3c2f8b..dfbc9d9 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopUserLabelController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/ShopUserLabelController.java @@ -12,7 +12,7 @@ import com.shop.cereshop.business.param.label.LabelGetByIdParam; import com.shop.cereshop.business.param.label.UserLabelGetAllParam; import com.shop.cereshop.business.service.label.CereShopUserLabelService; import com.shop.cereshop.business.utils.ContextUtil; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.label.CereShopUserLabel; import com.shop.cereshop.commons.exception.CoBusinessException; @@ -52,8 +52,8 @@ public class ShopUserLabelController { @NoRepeatWebLog public Result save(@RequestBody CereShopUserLabel label, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - label.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + label.setShopId(ContextUtil.getBusinessId()); cereShopUserLabelService.save(label,user); return new Result(user.getUsername(),"添加标签", GsonUtil.objectToGson(label)); } @@ -69,8 +69,8 @@ public class ShopUserLabelController { @NoRepeatWebLog public Result update(@RequestBody CereShopUserLabel label, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - label.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + label.setShopId(ContextUtil.getBusinessId()); cereShopUserLabelService.update(label,user); return new Result(user.getUsername(),"修改标签", GsonUtil.objectToGson(label)); } @@ -86,7 +86,7 @@ public class ShopUserLabelController { @NoRepeatWebLog public Result delete(@RequestBody LabelGetByIdParam label, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereShopUserLabelService.delete(label.getIds(),user); return new Result(user.getUsername(),"删除标签", GsonUtil.objectToGson(label)); } @@ -111,7 +111,7 @@ public class ShopUserLabelController { @PostMapping(value = "getAll") @ApiOperation(value = "标签管理查询") public Result> getAll(@RequestBody UserLabelGetAllParam param) throws CoBusinessException{ - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); Page page=cereShopUserLabelService.getAll(param); return new Result(page); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/StorehouseController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/StorehouseController.java index 71f918f..e10f143 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/StorehouseController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/StorehouseController.java @@ -14,7 +14,7 @@ import com.shop.cereshop.business.param.storehouse.ShopStorehouseSaveParam; import com.shop.cereshop.business.param.storehouse.ShopStorehouseUpdateParam; import com.shop.cereshop.business.service.storehouse.CereShopStorehouseService; import com.shop.cereshop.business.utils.ContextUtil; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.result.Result; @@ -63,7 +63,7 @@ public class StorehouseController { @PostMapping(value = "getAll") @ApiOperation(value = "仓库管理查询") public Result> getAll(@RequestBody ShopStorehouseGetAllParam param, HttpServletRequest request) throws CoBusinessException{ - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); return new Result(cereShopStorehouseService.getAll(param)); } @@ -74,7 +74,7 @@ public class StorehouseController { @PostMapping(value = "getList") @ApiOperation(value = "仓库管理查询") public Result> getList(@RequestBody ShopStorehouseGetAllParam param, HttpServletRequest request) throws CoBusinessException{ - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); return new Result(cereShopStorehouseService.selectAllByParam(param)); } @@ -91,8 +91,8 @@ public class StorehouseController { @NoRepeatWebLog public Result save(@RequestBody @Validated ShopStorehouseSaveParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(ContextUtil.getBusinessId()); cereShopStorehouseService.insert(param,user); return new Result(user.getUsername(),"新增仓库", GsonUtil.objectToGson(param)); } @@ -108,8 +108,8 @@ public class StorehouseController { @NoRepeatWebLog public Result update(@RequestBody ShopStorehouseUpdateParam param, HttpServletRequest request) throws CoBusinessException{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(ContextUtil.getShopId()); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); + param.setShopId(ContextUtil.getBusinessId()); cereShopStorehouseService.update(param,user); return new Result(user.getUsername(),"更新仓库", GsonUtil.objectToGson(param)); } @@ -125,7 +125,7 @@ public class StorehouseController { @NoRepeatWebLog public Result delete(@RequestBody ShopStorehouseGetByIdParam param, HttpServletRequest request) throws CoBusinessException,Exception{ //获取当前登录账户 - CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); + CerePlatformBusinessUser user = (CerePlatformBusinessUser) request.getAttribute("user"); cereShopStorehouseService.deleteById(param.getStorehouseId(),user); return new Result(user.getUsername(),"删除仓库", GsonUtil.objectToGson(param)); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/UploadController.java b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/UploadController.java index f5eb0b2..e9d20f9 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/controller/UploadController.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/controller/UploadController.java @@ -166,7 +166,7 @@ public class UploadController { public Result updateImg(MultipartFile multipartFile) { //获取当前登录账户 *//*CerePlatformBusiness user = (CerePlatformBusiness) request.getAttribute("user"); - param.setShopId(user.getShopId())*//*; + param.setShopId(user.getBusinessId())*//*; //cereCustomerServiceService.save(param); try { @@ -222,7 +222,7 @@ public class UploadController { String suiteTicket = (String)stringRedisService.get(WxCpConstants.SUITE_TICKET_KEY); wxCpTpService.setSuiteTicket(suiteTicket); - CereCustomerServiceConfig config = cereCustomerServiceConfigService.getByShopId(user.getShopId()); + CereCustomerServiceConfig config = cereCustomerServiceConfigService.getByShopId(user.getBusinessId()); String authCorpId = config.getAuthCorpId(); String permanentCode = config.getPermanentCode(); diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/dao/business/CereBusinessShopDAO.java b/cereshop-business/src/main/java/com/shop/cereshop/business/dao/business/CereBusinessShopDAO.java deleted file mode 100644 index fb42219..0000000 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/dao/business/CereBusinessShopDAO.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (C) 2017-2021 - * All rights reserved, Designed By 深圳中科鑫智科技有限公司 - * Copyright authorization contact 18814114118 - */ -package com.shop.cereshop.business.dao.business; - -import com.shop.cereshop.commons.domain.business.CereBusinessShop; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; - -@Mapper -public interface CereBusinessShopDAO extends BaseMapper { - - int insertSelective(CereBusinessShop record); - - void deleteByUserId(@Param("businessUserId") Long businessUserId); - - Long findByShopId(@Param("shopId") Long shopId); -} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/dao/business/CereBusinessUserDAO.java b/cereshop-business/src/main/java/com/shop/cereshop/business/dao/business/CereBusinessUserDAO.java new file mode 100644 index 0000000..66fff7f --- /dev/null +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/dao/business/CereBusinessUserDAO.java @@ -0,0 +1,21 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.business.dao.business; + +import com.shop.cereshop.commons.domain.business.CereBusinessUser; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +@Mapper +public interface CereBusinessUserDAO extends BaseMapper { + + int insertSelective(CereBusinessUser record); + + void deleteByUserId(@Param("businessUserId") Long businessUserId); + + Long findMainUserByBusinessId(@Param("shopId") Long shopId); +} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/dao/business/CerePlatformBusinessDAO.java b/cereshop-business/src/main/java/com/shop/cereshop/business/dao/business/CerePlatformBusinessDAO.java index c140630..4679b4e 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/dao/business/CerePlatformBusinessDAO.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/dao/business/CerePlatformBusinessDAO.java @@ -5,41 +5,50 @@ */ package com.shop.cereshop.business.dao.business; -import com.shop.cereshop.business.page.shop.PlatformBusiness; -import com.shop.cereshop.business.page.user.Business; -import com.shop.cereshop.business.param.user.BusinessGetAllUser; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.shop.cereshop.business.page.business.Business; +import com.shop.cereshop.business.page.index.HotSellProduct; +import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import java.math.BigDecimal; import java.util.List; @Mapper public interface CerePlatformBusinessDAO extends BaseMapper { - int deleteByPrimaryKey(Long businessUserId); + int deleteByPrimaryKey(Long businessId); + + int insertSelective(CerePlatformBusiness record); - CerePlatformBusiness selectByPrimaryKey(Long businessUserId); + CerePlatformBusiness selectByPrimaryKey(Long businessId); int updateByPrimaryKeySelective(CerePlatformBusiness record); - PlatformBusiness findByUserName(@Param("username") String username); + Business findBusiness(@Param("businessId") Long businessId); - PlatformBusiness findByPhone(@Param("phone") String phone); + Integer getTotal(@Param("project") String project, @Param("businessId") Long businessId); - CerePlatformBusiness findByToken(@Param("token") String token); + Integer getStayOrders(@Param("project") String project, @Param("businessId") Long businessId); - void updateToken(CerePlatformBusiness cerePlatformBusiness); + Integer getStayAfters(@Param("project") String project, @Param("businessId") Long businessId); - List getAll(BusinessGetAllUser param); + BigDecimal getMoney(@Param("project") String project, @Param("businessId") Long businessId); - CerePlatformBusiness checkUserName(@Param("username") String username, @Param("businessUserId") Long businessUserId); + Integer getVisit(@Param("project") String project, + @Param("businessId") Long businessId, + @Param("startTime") String startTime, + @Param("endTime") String endTime); - Business getById(@Param("businessUserId") Long businessUserId); + List getHotProducts(@Param("project") String project, + @Param("businessId") Long businessId, @Param("condition") Integer condition); - PlatformBusiness findById(@Param("businessUserId")Long userId); + BigDecimal findVisits(@Param("project") String project, + @Param("businessId") Long businessId, + @Param("condition") Integer condition, + @Param("type") Integer type); - CerePlatformBusiness findAdminUser(Long shopId); + List selectAll(); - CerePlatformBusiness checkPhone(@Param("phone") String phone, @Param("businessUserId") Long businessUserId); + List getByIdList(@Param("businessIdList") List businessIdList); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/dao/business/CerePlatformBusinessUserDAO.java b/cereshop-business/src/main/java/com/shop/cereshop/business/dao/business/CerePlatformBusinessUserDAO.java new file mode 100644 index 0000000..46954d7 --- /dev/null +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/dao/business/CerePlatformBusinessUserDAO.java @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.business.dao.business; + +import com.shop.cereshop.business.page.business.PlatformBusinessUser; +import com.shop.cereshop.business.param.user.BusinessGetAllUser; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +@Mapper +public interface CerePlatformBusinessUserDAO extends BaseMapper { + int deleteByPrimaryKey(Long businessUserId); + + CerePlatformBusinessUser selectByPrimaryKey(Long businessUserId); + + int updateByPrimaryKeySelective(CerePlatformBusinessUser record); + + com.shop.cereshop.business.page.business.PlatformBusinessUser findByUserName(@Param("username") String username); + + com.shop.cereshop.business.page.business.PlatformBusinessUser findByPhone(@Param("phone") String phone); + + CerePlatformBusinessUser findByToken(@Param("token") String token); + + void updateToken(CerePlatformBusinessUser cerePlatformBusinessUser); + + List getAll(BusinessGetAllUser param); + + CerePlatformBusinessUser checkUserName(@Param("username") String username, @Param("businessUserId") Long businessUserId); + + PlatformBusinessUser getById(@Param("businessUserId") Long businessUserId); + + PlatformBusinessUser findById(@Param("businessUserId")Long userId); + + CerePlatformBusinessUser checkPhone(@Param("phone") String phone, @Param("businessUserId") Long businessUserId); +} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/dao/permission/CerePlatformPermissionDAO.java b/cereshop-business/src/main/java/com/shop/cereshop/business/dao/permission/CerePlatformPermissionDAO.java index abe5e07..80003d8 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/dao/permission/CerePlatformPermissionDAO.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/dao/permission/CerePlatformPermissionDAO.java @@ -5,10 +5,10 @@ */ package com.shop.cereshop.business.dao.permission; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.shop.cereshop.business.page.permission.MenuButton; import com.shop.cereshop.business.page.permission.Permission; import com.shop.cereshop.commons.domain.permission.CerePlatformPermission; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -29,18 +29,16 @@ public interface CerePlatformPermissionDAO extends BaseMapper findAllByResourceType(@Param("resourceType") String resourceType, - @Param("permissionName") String permissionName,@Param("shopId") Long shopId); + @Param("permissionName") String permissionName,@Param("businessId") Long businessId); List findAllCatalogByUserIdAndResourceType(@Param("businessUserId") Long businessUserId, - @Param("resourceType") String resourceType,@Param("shopId") Long shopId); + @Param("resourceType") String resourceType,@Param("businessId") Long businessId); - CerePlatformPermission findBySort(@Param("sort") Integer sort,@Param("id") Long id,@Param("shopId") Long shopId); + CerePlatformPermission findBySort(@Param("sort") Integer sort,@Param("id") Long id,@Param("businessId") Long businessId); Integer getMaxSort(); List findRolePermissionIds(@Param("roleId") Long roleId); - List findChilds(@Param("permissionName") String permissionName,@Param("shopId") Long shopId); - - int findMaxSort(); + List findChilds(@Param("permissionName") String permissionName,@Param("businessId") Long businessId); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/dao/product/CereProductClassifyDAO.java b/cereshop-business/src/main/java/com/shop/cereshop/business/dao/product/CereProductClassifyDAO.java index d3d9433..1ec2e3c 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/dao/product/CereProductClassifyDAO.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/dao/product/CereProductClassifyDAO.java @@ -5,6 +5,7 @@ */ package com.shop.cereshop.business.dao.product; +import com.shop.cereshop.commons.domain.product.CereShopProduct; import com.shop.cereshop.commons.domain.product.Classify; import com.shop.cereshop.commons.domain.product.CereProductClassify; import com.baomidou.mybatisplus.core.mapper.BaseMapper; @@ -25,13 +26,24 @@ public interface CereProductClassifyDAO extends BaseMapper int updateByPrimaryKey(CereProductClassify record); - List getClassifySelect(@Param("classifyPid") Long classifyPid); + List getClassifySelect(@Param("project") String project, @Param("classifyPid") Long classifyPid); - CereProductClassify findByHierarchy(@Param("hierarchy") String hierarchy); + CereProductClassify findByHierarchy(@Param("project") String project, @Param("hierarchy") String hierarchy); - List findAll(); + List findAll(@Param("project") String project); - List findChilds(); + List findChilds(@Param("project") String project); + + List selectAll(@Param("project") String project); + + List getAll(@Param("project") String project); + void updateBatchLevelHierarchy(@Param("list") List list); + + void deleteByIds(@Param("ids") List ids); + + List findByPid(@Param("classifyId") Long classifyId); + + + List checkProduct(@Param("classifyId") Long classifyId); - List selectAll(); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/dao/product/CereShopProductDAO.java b/cereshop-business/src/main/java/com/shop/cereshop/business/dao/product/CereShopProductDAO.java index 646b4ed..0a1a4fe 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/dao/product/CereShopProductDAO.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/dao/product/CereShopProductDAO.java @@ -26,10 +26,6 @@ public interface CereShopProductDAO extends BaseMapper { int updateByPrimaryKeySelective(CereShopProduct record); - int updateByPrimaryKeyWithBLOBs(CereShopProduct record); - - int updateByPrimaryKey(CereShopProduct record); - ShopProduct getById(@Param("productId") Long productId); List getAll(ProductGetAllParam param); diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/dao/role/CerePlatformRolePermissionDAO.java b/cereshop-business/src/main/java/com/shop/cereshop/business/dao/role/CerePlatformRolePermissionDAO.java index b1481b5..309171d 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/dao/role/CerePlatformRolePermissionDAO.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/dao/role/CerePlatformRolePermissionDAO.java @@ -21,7 +21,5 @@ public interface CerePlatformRolePermissionDAO extends BaseMapper list); - Long check(@Param("roleId") Long roleId); - void deleteByPermissionId(@Param("permissionId") Long permissionId); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/dao/shop/CerePlatformShopDAO.java b/cereshop-business/src/main/java/com/shop/cereshop/business/dao/shop/CerePlatformShopDAO.java index bd5cebc..9980735 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/dao/shop/CerePlatformShopDAO.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/dao/shop/CerePlatformShopDAO.java @@ -7,7 +7,7 @@ package com.shop.cereshop.business.dao.shop; import com.shop.cereshop.business.page.index.HotSellProduct; import com.shop.cereshop.business.page.shop.Shop; -import com.shop.cereshop.commons.domain.business.CereBusinessShop; +import com.shop.cereshop.commons.domain.business.CereBusinessUser; import com.shop.cereshop.commons.domain.shop.CerePlatformShop; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; @@ -26,14 +26,8 @@ public interface CerePlatformShopDAO extends BaseMapper { int updateByPrimaryKeySelective(CerePlatformShop record); - int updateByPrimaryKey(CerePlatformShop record); - - CerePlatformShop findByShopName(@Param("shopName") String shopName); - Shop findShop(@Param("shopId") Long shopId); - void updateState(CerePlatformShop cerePlatformShop); - Integer getTotal(@Param("shopId") Long shopId); Integer getStayOrders(@Param("shopId") Long shopId); @@ -47,23 +41,9 @@ public interface CerePlatformShopDAO extends BaseMapper { List getHotProducts(@Param("shopId") Long shopId,@Param("condition") Integer condition); - CerePlatformShop check(@Param("shopPhone") String shopPhone); - - CerePlatformShop findByPhone(@Param("shopPhone") String shopPhone); - - CerePlatformShop checkShopIdByName(@Param("shopName") String shopName,@Param("shopId") Long shopId); - - CerePlatformShop checkShopIdByPhone(@Param("shopPhone") String shopPhone,@Param("shopId") Long shopId); - BigDecimal findVisits(@Param("shopId") Long shopId,@Param("condition") Integer condition,@Param("type") Integer type); - Integer findPayUsers(@Param("productId") Long productId); - - List findIds(); - - Long findShopRoleId(@Param("id") Long id); - - List selectAll(); + List selectAll(@Param("businessId") Long businessId); List getByIdList(@Param("shopIdList") List shopIdList); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/dao/shop/CereShopEnterpriseDAO.java b/cereshop-business/src/main/java/com/shop/cereshop/business/dao/shop/CereShopEnterpriseDAO.java index 7bde21e..794bef0 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/dao/shop/CereShopEnterpriseDAO.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/dao/shop/CereShopEnterpriseDAO.java @@ -5,8 +5,8 @@ */ package com.shop.cereshop.business.dao.shop; -import com.shop.cereshop.business.param.shop.CereShopEnterpriseParam; -import com.shop.cereshop.commons.domain.shop.CereShopEnterprise; +import com.shop.cereshop.business.param.business.CereShopEnterpriseParam; +import com.shop.cereshop.commons.domain.business.CereShopEnterprise; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -18,7 +18,7 @@ public interface CereShopEnterpriseDAO extends BaseMapper { void updateData(CereShopEnterprise enterprise); - CereShopEnterprise findByShopId(@Param("shopId") Long shopId); + CereShopEnterprise findByBusinessId(@Param("businessId") Long businessId); void insertParam(CereShopEnterpriseParam param); diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/dao/shop/CereShopGroupDAO.java b/cereshop-business/src/main/java/com/shop/cereshop/business/dao/shop/CereShopGroupDAO.java index d05758d..3c2eccd 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/dao/shop/CereShopGroupDAO.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/dao/shop/CereShopGroupDAO.java @@ -31,7 +31,7 @@ public interface CereShopGroupDAO extends BaseMapper { int updateByPrimaryKey(CereShopGroup record); - List getGroupSelect(@Param("shopId") Long shopId); + List getGroupSelect(@Param("project") String project, @Param("shopId") Long shopId); void updateGroup(@Param("shopGroupId") Long shopGroupId); @@ -51,5 +51,5 @@ public interface CereShopGroupDAO extends BaseMapper { List findProductByIds(@Param("ids") List ids); - List selectAll(); + List selectAll(@Param("project") String project); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/dao/shop/CereShopIndividualBusinessesDAO.java b/cereshop-business/src/main/java/com/shop/cereshop/business/dao/shop/CereShopIndividualBusinessesDAO.java index 97dd5bb..b873f48 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/dao/shop/CereShopIndividualBusinessesDAO.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/dao/shop/CereShopIndividualBusinessesDAO.java @@ -5,8 +5,8 @@ */ package com.shop.cereshop.business.dao.shop; -import com.shop.cereshop.business.param.shop.CereShopIndividualBusinessesParam; -import com.shop.cereshop.commons.domain.shop.CereShopIndividualBusinesses; +import com.shop.cereshop.business.param.business.CereShopIndividualBusinessesParam; +import com.shop.cereshop.commons.domain.business.CereShopIndividualBusinesses; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -18,7 +18,7 @@ public interface CereShopIndividualBusinessesDAO extends BaseMapper { void updateData(CereShopPersonal personal); - CereShopPersonal findByShopId(@Param("shopId") Long shopId); + CereShopPersonal findByBusinessId(@Param("businessId") Long businessId); void insertParam(CereShopPersonalParam param); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/interceptor/AuthorizationInterceptor.java b/cereshop-business/src/main/java/com/shop/cereshop/business/interceptor/AuthorizationInterceptor.java index c2c46d7..3761ba5 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/interceptor/AuthorizationInterceptor.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/interceptor/AuthorizationInterceptor.java @@ -8,14 +8,14 @@ package com.shop.cereshop.business.interceptor; import cn.hutool.core.util.ObjectUtil; import com.alibaba.fastjson.JSON; import com.shop.cereshop.business.redis.service.api.UserRedisService; -import com.shop.cereshop.business.service.business.CereBusinessShopService; -import com.shop.cereshop.business.service.business.CerePlatformBusinessService; +import com.shop.cereshop.business.service.business.CereBusinessUserService; +import com.shop.cereshop.business.service.business.CerePlatformBusinessUserService; import com.shop.cereshop.business.utils.ContextUtil; import com.shop.cereshop.business.utils.EncodeUtil; import com.shop.cereshop.business.utils.TokenProvider; import com.shop.cereshop.commons.config.SecurityProperties; import com.shop.cereshop.commons.constant.CoReturnFormat; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.result.Result; import com.shop.cereshop.commons.utils.EmptyUtils; import lombok.extern.slf4j.Slf4j; @@ -39,10 +39,10 @@ public class AuthorizationInterceptor extends HandlerInterceptorAdapter { public static final String USER = "user"; @Autowired - private CerePlatformBusinessService cerePlatformBusinessService; + private CerePlatformBusinessUserService cerePlatformBusinessUserService; @Autowired - private CereBusinessShopService cereBusinessShopService; + private CereBusinessUserService cereBusinessUserService; @Autowired private TokenProvider tokenProvider; @@ -99,13 +99,13 @@ public class AuthorizationInterceptor extends HandlerInterceptorAdapter { } } - CerePlatformBusiness user=null; + CerePlatformBusinessUser user=null; //查询token信息 if(ObjectUtil.isNotEmpty(token)){ try { Long userId = userRedisService.getBuyerUserIdByToken(token); if(ObjectUtil.isNotNull(userId)){ - user = cerePlatformBusinessService.findById(userId); + user = cerePlatformBusinessUserService.findById(userId); } }catch (Exception e){ e.printStackTrace(); @@ -127,13 +127,15 @@ public class AuthorizationInterceptor extends HandlerInterceptorAdapter { } if(ObjectUtil.isNotNull(user)){ - ContextUtil.setShopId(user.getShopId()); + ContextUtil.setBusinessId(user.getBusinessId()); //token续期 userRedisService.refreshToken(token); request.setAttribute(USER, user); encodeUtil.setUserIdTL(user.getBusinessUserId()); } + String project = request.getHeader("project"); + ContextUtil.setProject(project); return true; } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/page/business/Business.java b/cereshop-business/src/main/java/com/shop/cereshop/business/page/business/Business.java new file mode 100644 index 0000000..4853d0c --- /dev/null +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/page/business/Business.java @@ -0,0 +1,122 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.business.page.business; + +import com.shop.cereshop.business.page.shop.ShopCrossDetail; +import com.shop.cereshop.commons.domain.business.CereShopEnterprise; +import com.shop.cereshop.commons.domain.business.CereShopIndividualBusinesses; +import com.shop.cereshop.commons.domain.business.CereShopOtherOrganizations; +import com.shop.cereshop.commons.domain.business.CereShopPersonal; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * 商家信息返回数据实体类 + */ +@Data +@ApiModel(value = "Business", description = "商家信息返回数据实体类") +public class Business { + + /** + * 店铺id + */ + @ApiModelProperty(value = "店铺id") + private Long businessId; + + /** + * 店铺logo + */ + @ApiModelProperty(value = "店铺logo") + private String businessLogo; + /** + * 店铺名称 + */ + @ApiModelProperty(value = "店铺名称") + private String businessName; + + /** + * 店铺地址 + */ + @ApiModelProperty(value = "店铺地址") + private String businessAdress; + + /** + * 店铺简介 + */ + @ApiModelProperty(value = "店铺简介") + private String businessBrief; + + /** + * 商家负责人手机号 + */ + @ApiModelProperty(value = "商家负责人手机号") + private String chargePersonPhone; + + /** + * 商家负责人 + */ + @ApiModelProperty(value = "商家负责人") + private String chargePersonName; + + + /** + * 新生支付方开通的商家Id + */ + @ApiModelProperty(value = "新生支付方开通的商家Id") + private String xsPayId; + + /** + * 分账账期 + */ + @ApiModelProperty(value = "分账账期") + private Integer shareDays; + + /** + * 主体类型 + */ + @ApiModelProperty(value = "主体类型") + private Integer authenType; + + /** + * 认证状态 1-立即认证 2-认证详情 3-立即签约 4-查看详情 5-查看详情 + */ + @ApiModelProperty(value = "认证状态 1-立即认证 2-认证详情 3-立即签约 4-查看详情 5-查看详情") + private Integer authenticationState; + + /** + * 个人信息 + */ + @ApiModelProperty(value = "个人信息") + private CereShopPersonal personal; + + /** + * 个体工商户信息 + */ + @ApiModelProperty(value = "个体工商户信息") + private CereShopIndividualBusinesses individualBusinesses; + + /** + * 企业信息 + */ + @ApiModelProperty(value = "企业信息") + private CereShopEnterprise enterprise; + + /** + * 其他组织信息 + */ + @ApiModelProperty(value = "其他组织信息") + private CereShopOtherOrganizations otherOrganizations; + +// /** +// * 是否是跨境商家 +// */ +// @ApiModelProperty(value = "是否是跨境商家") +// private Integer isCross; +// +// @ApiModelProperty(value = "具体跨境信息") +// private ShopCrossDetail crossDetail; +} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/page/business/PlatformBusinessUser.java b/cereshop-business/src/main/java/com/shop/cereshop/business/page/business/PlatformBusinessUser.java new file mode 100644 index 0000000..72ed259 --- /dev/null +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/page/business/PlatformBusinessUser.java @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.business.page.business; + +import com.shop.cereshop.business.page.role.PlatformUserRole; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * 商家用户返回数据实体类 + */ +@Data +@ApiModel(value = "PlatformBusiness", description = "商家用户返回数据实体类") +public class PlatformBusinessUser extends CerePlatformBusinessUser { + + /** + * 商家id + */ + @ApiModelProperty(value = "商家id") + private Long businessId; + + /** + * 店铺入住处理状态 0-未处理 1-通过 2-拒绝 + */ + @ApiModelProperty(value = "商家入住处理状态 0-未处理 1-通过 2-拒绝") + private Integer checkState; + + /** + * 角色数据 + */ + @ApiModelProperty(value = "角色数据") + private List roles; + + /** + * 角色id数组 + */ + @ApiModelProperty(value = "角色id数组") + private List ids; +} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/page/canvas/CanvasProductParam.java b/cereshop-business/src/main/java/com/shop/cereshop/business/page/canvas/CanvasProductParam.java index d28f452..bd5eb2c 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/page/canvas/CanvasProductParam.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/page/canvas/CanvasProductParam.java @@ -20,6 +20,12 @@ import java.util.List; public class CanvasProductParam extends PageParam { /** + * 所属项目 + */ + @ApiModelProperty(value = "所属项目",hidden = true) + private String project; + + /** * 搜索字段 */ @ApiModelProperty(value = "搜索字段") @@ -50,6 +56,12 @@ public class CanvasProductParam extends PageParam { private Long shopId; /** + * 商家id + */ + @ApiModelProperty(value = "商家id") + private Long businessId; + + /** * 商家优惠券id */ @ApiModelProperty(value = "商家优惠券id") diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/page/product/ShopProduct.java b/cereshop-business/src/main/java/com/shop/cereshop/business/page/product/ShopProduct.java index 399f652..e54b665 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/page/product/ShopProduct.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/page/product/ShopProduct.java @@ -34,6 +34,12 @@ public class ShopProduct { private Long shopId; /** + * 店铺名称 + */ + @ApiModelProperty(value = "店铺名称") + private String shopName; + + /** * 商品名称 */ @ApiModelProperty(value = "商品名称") @@ -58,6 +64,18 @@ public class ShopProduct { private Long classifyId; /** + * 关联商品分组id + */ + @ApiModelProperty(value = "关联商品分组id") + private Long shopGroupBusinessId; + + /** + * 关联分类id + */ + @ApiModelProperty(value = "关联分类id") + private Long classifyBusinessId; + + /** * 关联供应商id */ @ApiModelProperty(value = "关联供应商id") diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/page/shop/PlatformBusiness.java b/cereshop-business/src/main/java/com/shop/cereshop/business/page/shop/PlatformBusiness.java deleted file mode 100644 index 08c85ed..0000000 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/page/shop/PlatformBusiness.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2017-2021 - * All rights reserved, Designed By 深圳中科鑫智科技有限公司 - * Copyright authorization contact 18814114118 - */ -package com.shop.cereshop.business.page.shop; - -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * 商家用户返回数据实体类 - */ -@Data -@ApiModel(value = "PlatformBusiness", description = "商家用户返回数据实体类") -public class PlatformBusiness extends CerePlatformBusiness { - - /** - * 店铺id - */ - @ApiModelProperty(value = "店铺id") - private Long shopId; - - /** - * 店铺入住处理状态 0-未处理 1-通过 2-拒绝 - */ - @ApiModelProperty(value = "店铺入住处理状态 0-未处理 1-通过 2-拒绝") - private Integer checkState; -} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/page/shop/Shop.java b/cereshop-business/src/main/java/com/shop/cereshop/business/page/shop/Shop.java index b5851c3..944aa39 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/page/shop/Shop.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/page/shop/Shop.java @@ -5,7 +5,9 @@ */ package com.shop.cereshop.business.page.shop; -import com.shop.cereshop.commons.domain.shop.*; +import com.shop.cereshop.commons.domain.shop.CerePlatformShop; +import com.shop.cereshop.commons.domain.shop.CereShopCrossDetail; +import com.shop.cereshop.commons.domain.shop.CereShopReturn; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -15,66 +17,13 @@ import lombok.Data; */ @Data @ApiModel(value = "Shop", description = "店铺信息返回数据实体类") -public class Shop { +public class Shop extends CerePlatformShop{ /** - * 店铺id + * 商家名称 */ - @ApiModelProperty(value = "店铺id") - private Long shopId; - - /** - * 店铺logo - */ - @ApiModelProperty(value = "店铺logo") - private String shopLogo; - /** - * 店铺名称 - */ - @ApiModelProperty(value = "店铺名称") - private String shopName; - - /** - * 店铺地址 - */ - @ApiModelProperty(value = "店铺地址") - private String shopAdress; - - /** - * 店铺简介 - */ - @ApiModelProperty(value = "店铺简介") - private String shopBrief; - - /** - * 店铺手机号 - */ - @ApiModelProperty(value = "店铺手机号") - private String shopPhone; - - /** - * 新生支付方开通的商家Id - */ - @ApiModelProperty(value = "新生支付方开通的商家Id") - private String xsPayId; - - /** - * 分账账期 - */ - @ApiModelProperty(value = "分账账期") - private Integer shareDays; - - /** - * 主体类型 - */ - @ApiModelProperty(value = "主体类型") - private Integer authenType; - - /** - * 认证状态 1-立即认证 2-认证详情 3-立即签约 4-查看详情 5-查看详情 - */ - @ApiModelProperty(value = "认证状态 1-立即认证 2-认证详情 3-立即签约 4-查看详情 5-查看详情") - private Integer authenticationState; + @ApiModelProperty(value = "商家名称") + private String businessName; /** * 退货地址信息 @@ -82,27 +31,6 @@ public class Shop { @ApiModelProperty(value = "退货地址信息") private CereShopReturn shopReturn; - /** - * 个人信息 - */ - @ApiModelProperty(value = "个人信息") - private CereShopPersonal personal; - - /** - * 个体工商户信息 - */ - @ApiModelProperty(value = "个体工商户信息") - private CereShopIndividualBusinesses individualBusinesses; - - /** - * 企业信息 - */ - @ApiModelProperty(value = "企业信息") - private CereShopEnterprise enterprise; - - /** - * 其他组织信息 - */ - @ApiModelProperty(value = "其他组织信息") - private CereShopOtherOrganizations otherOrganizations; + @ApiModelProperty(value = "具体跨境信息") + private CereShopCrossDetail crossDetail; } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/page/user/Business.java b/cereshop-business/src/main/java/com/shop/cereshop/business/page/user/Business.java deleted file mode 100644 index ee28896..0000000 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/page/user/Business.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (C) 2017-2021 - * All rights reserved, Designed By 深圳中科鑫智科技有限公司 - * Copyright authorization contact 18814114118 - */ -package com.shop.cereshop.business.page.user; - -import com.shop.cereshop.business.page.role.PlatformUserRole; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.List; - -/** - * 商家用户数据 - * @author - */ -@Data -@ApiModel(value = "PlatformBusiness", description = "商家用户数据") -public class Business { - - /** - * 商家用户id - */ - @ApiModelProperty(value = "商家用户id") - private Long businessUserId; - - /** - * 商家登录账号 - */ - @ApiModelProperty(value = "商家登录账号") - private String username; - - /** - * 商家登录密码 - */ - @ApiModelProperty(value = "商家登录密码") - private String password; - - /** - * 商家昵称 - */ - @ApiModelProperty(value = "商家昵称") - private String name; - - /** - * 手机号 - */ - @ApiModelProperty(value = "手机号") - private String phone; - - /** - * 商家性别 - */ - @ApiModelProperty(value = "商家性别") - private String sex; - - /** - * 商家邮箱 - */ - @ApiModelProperty(value = "商家邮箱") - private String email; - - /** - * 是否启用 1-是 0-否 - */ - @ApiModelProperty(value = "是否启用 1-是 0-否") - private Integer state; - - /** - * 角色数据 - */ - @ApiModelProperty(value = "角色数据") - private List roles; - - /** - * 角色id数组 - */ - @ApiModelProperty(value = "角色id数组") - private List ids; -} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/param/business/BusinessUpdateParam.java b/cereshop-business/src/main/java/com/shop/cereshop/business/param/business/BusinessUpdateParam.java new file mode 100644 index 0000000..71b8c76 --- /dev/null +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/param/business/BusinessUpdateParam.java @@ -0,0 +1,84 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.business.param.business; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * 修改店铺logo请求 + */ +@Data +@ApiModel(value = "BusinessUpdateParam", description = "修改商家logo请求") +public class BusinessUpdateParam { + + /** + * 店铺id + */ + @ApiModelProperty(value = "商家id") + private Long businessId; + + /** + * 店铺logo + */ + @ApiModelProperty(value = "店铺logo") + private String businessLogo; + + /** + * 店铺名称 + */ + @ApiModelProperty(value = "店铺名称") + private String businessName; + + /** + * 简介 + */ + @ApiModelProperty(value = "简介") + private String businessBrief; + + /** + * 客服电话 + */ + @ApiModelProperty(value = "客服电话") + private String businessPhone; + + /** + * 商家负责人手机号 + */ + @ApiModelProperty(value = "商家负责人手机号") + private String chargePersonPhone; + + /** + * 商家负责人 + */ + @ApiModelProperty(value = "商家负责人") + private String chargePersonName; + + /** + * 店铺地址 + */ + @ApiModelProperty(value = "店铺地址") + private String businessAdress; + + /** + * 分账账期 + */ + @ApiModelProperty(value = "分账账期") + private Integer shareDays; + +// /** +// * 是否是跨境商家 +// */ +// @ApiModelProperty(value = "是否是跨境商家") +// private Integer isCross; + +// /** +// * 跨境设置 +// */ +// @ApiModelProperty(value = "跨境设置") +// private CereShopCrossDetail crossDetail; +} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/param/business/CereShopEnterpriseParam.java b/cereshop-business/src/main/java/com/shop/cereshop/business/param/business/CereShopEnterpriseParam.java new file mode 100644 index 0000000..7b50186 --- /dev/null +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/param/business/CereShopEnterpriseParam.java @@ -0,0 +1,77 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.business.param.business; + +import com.shop.cereshop.commons.domain.business.CereShopEnterprise; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * 入驻申请企业请求 + */ +@Data +@ApiModel(value = "CereShopEnterpriseParam", description = "入驻申请企业请求") +public class CereShopEnterpriseParam extends CereShopEnterprise { + + /** + * 手机号 + */ + @ApiModelProperty(value = "手机号") + private String shopPhone; + + /** + * 店铺名称 + */ + @ApiModelProperty(value = "店铺名称") + private String shopName; + + /** + * 店铺负责人 + */ + @ApiModelProperty(value = "店铺负责人") + private String chargePersonName; + + /** + * 负责人电话 + */ + @ApiModelProperty(value = "负责人电话") + private String chargePersonPhone; + + /** + * 店铺地址省份 + */ + @ApiModelProperty(value = "店铺地址省份") + @NotBlank(message = "店铺地址身份不能为空") + private String shopAdressProvince; + + /** + * 店铺地址城市 + */ + @ApiModelProperty(value = "店铺地址城市") + @NotBlank(message = "店铺地址城市不能为空") + private String shopAdressCity; + + /** + * 店铺地址-详细地址 + */ + @ApiModelProperty(value = "店铺地址-详细地址") + private String shopAdressDetail; + + /** + * 主体类型 + */ + @ApiModelProperty(value = "主体类型") + private Integer authenType; + + /** + * 店铺地址 + */ + @ApiModelProperty(value = "店铺地址") + private String shopAdress; +} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/param/business/CereShopIndividualBusinessesParam.java b/cereshop-business/src/main/java/com/shop/cereshop/business/param/business/CereShopIndividualBusinessesParam.java new file mode 100644 index 0000000..5426d32 --- /dev/null +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/param/business/CereShopIndividualBusinessesParam.java @@ -0,0 +1,77 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.business.param.business; + +import com.shop.cereshop.commons.domain.business.CereShopIndividualBusinesses; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * 入驻申请个体工商户请求 + */ +@Data +@ApiModel(value = "CereShopIndividualBusinessesParam", description = "入驻申请个体工商户请求") +public class CereShopIndividualBusinessesParam extends CereShopIndividualBusinesses { + + /** + * 手机号 + */ + @ApiModelProperty(value = "手机号") + private String shopPhone; + + /** + * 店铺名称 + */ + @ApiModelProperty(value = "店铺名称") + private String shopName; + + /** + * 店铺负责人 + */ + @ApiModelProperty(value = "店铺负责人") + private String chargePersonName; + + /** + * 负责人电话 + */ + @ApiModelProperty(value = "负责人电话") + private String chargePersonPhone; + + /** + * 店铺地址省份 + */ + @ApiModelProperty(value = "店铺地址省份") + @NotBlank(message = "店铺地址身份不能为空") + private String shopAdressProvince; + + /** + * 店铺地址城市 + */ + @ApiModelProperty(value = "店铺地址城市") + @NotBlank(message = "店铺地址城市不能为空") + private String shopAdressCity; + + /** + * 店铺地址-详细地址 + */ + @ApiModelProperty(value = "店铺地址-详细地址") + private String shopAdressDetail; + + /** + * 主体类型 + */ + @ApiModelProperty(value = "主体类型") + private Integer authenType; + + /** + * 店铺地址 + */ + @ApiModelProperty(value = "店铺地址") + private String shopAdress; +} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/param/business/CereShopOtherOrganizationsParam.java b/cereshop-business/src/main/java/com/shop/cereshop/business/param/business/CereShopOtherOrganizationsParam.java new file mode 100644 index 0000000..c10735d --- /dev/null +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/param/business/CereShopOtherOrganizationsParam.java @@ -0,0 +1,77 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.business.param.business; + +import com.shop.cereshop.commons.domain.business.CereShopOtherOrganizations; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * 入驻申请其他组织请求 + */ +@Data +@ApiModel(value = "CereShopOtherOrganizationsParam", description = "入驻申请其他组织请求") +public class CereShopOtherOrganizationsParam extends CereShopOtherOrganizations { + + /** + * 手机号 + */ + @ApiModelProperty(value = "手机号") + private String shopPhone; + + /** + * 店铺名称 + */ + @ApiModelProperty(value = "店铺名称") + private String shopName; + + /** + * 店铺负责人 + */ + @ApiModelProperty(value = "店铺负责人") + private String chargePersonName; + + /** + * 负责人电话 + */ + @ApiModelProperty(value = "负责人电话") + private String chargePersonPhone; + + /** + * 店铺地址省份 + */ + @ApiModelProperty(value = "店铺地址省份") + @NotBlank(message = "店铺地址身份不能为空") + private String shopAdressProvince; + + /** + * 店铺地址城市 + */ + @ApiModelProperty(value = "店铺地址城市") + @NotBlank(message = "店铺地址城市不能为空") + private String shopAdressCity; + + /** + * 店铺地址-详细地址 + */ + @ApiModelProperty(value = "店铺地址-详细地址") + private String shopAdressDetail; + + /** + * 主体类型 + */ + @ApiModelProperty(value = "主体类型") + private Integer authenType; + + /** + * 店铺地址 + */ + @ApiModelProperty(value = "店铺地址") + private String shopAdress; +} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/param/business/CereShopPersonalParam.java b/cereshop-business/src/main/java/com/shop/cereshop/business/param/business/CereShopPersonalParam.java new file mode 100644 index 0000000..0529936 --- /dev/null +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/param/business/CereShopPersonalParam.java @@ -0,0 +1,87 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.business.param.business; + +import com.shop.cereshop.commons.domain.business.CereShopPersonal; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * 入驻申请个人请求 + */ +@Data +@ApiModel(value = "CereShopPersonalParam", description = "入驻申请个人请求") +public class CereShopPersonalParam extends CereShopPersonal { + + /** + * 手机号 + */ + @ApiModelProperty(value = "手机号") + @NotBlank(message = "手机号不能为空") + private String shopPhone; + + /** + * 店铺名称 + */ + @ApiModelProperty(value = "店铺名称") + @NotBlank(message = "店铺名称不能为空") + private String shopName; + + /** + * 店铺负责人 + */ + @ApiModelProperty(value = "店铺负责人") + @NotBlank(message = "店铺负责人不能为空") + private String chargePersonName; + + /** + * 负责人电话 + */ + @ApiModelProperty(value = "负责人电话") + @NotBlank(message = "负责人电话不能为空") + private String chargePersonPhone; + + /** + * 店铺地址省份 + */ + @ApiModelProperty(value = "店铺地址省份") + @NotBlank(message = "店铺地址身份不能为空") + private String shopAdressProvince; + + /** + * 店铺地址城市 + */ + @ApiModelProperty(value = "店铺地址城市") + @NotBlank(message = "店铺地址城市不能为空") + private String shopAdressCity; + + /** + * 店铺地址-详细地址 + */ + @ApiModelProperty(value = "店铺地址-详细地址") + private String shopAdressDetail; + + /** + * 店铺地址 该字段由 省 + 市 + 详细地址 + */ + @ApiModelProperty(value = "店铺地址") + private String shopAdress; + + /** + * 主体类型 + */ + @ApiModelProperty(value = "主体类型") + private Integer authenType; + + /** + * 验证码 + */ + @ApiModelProperty(value = "验证码") + private String code; +} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/param/group/GroupGetAllParam.java b/cereshop-business/src/main/java/com/shop/cereshop/business/param/group/GroupGetAllParam.java index 7065bc6..196d7ff 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/param/group/GroupGetAllParam.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/param/group/GroupGetAllParam.java @@ -28,4 +28,10 @@ public class GroupGetAllParam extends PageParam { */ @ApiModelProperty(value = "搜索字段") private String search; + + /** + * 平台号 + */ + @ApiModelProperty(value = "平台号", hidden = true) + private String project; } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/param/index/IndexParam.java b/cereshop-business/src/main/java/com/shop/cereshop/business/param/index/IndexParam.java index 154332c..1bfe5f8 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/param/index/IndexParam.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/param/index/IndexParam.java @@ -19,8 +19,9 @@ public class IndexParam { /** * 店铺id */ - @ApiModelProperty(value = "店铺id") - private Long shopId; + @ApiModelProperty(value = "商家id") + private Long businessId; + /** * 时间条件 1-今天 2-昨天 3-最近七天 4-最近30天 diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/param/permission/PermissionGetAllParam.java b/cereshop-business/src/main/java/com/shop/cereshop/business/param/permission/PermissionGetAllParam.java index ef42f6e..0849d9d 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/param/permission/PermissionGetAllParam.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/param/permission/PermissionGetAllParam.java @@ -21,7 +21,7 @@ public class PermissionGetAllParam extends PageParam { * 店铺id */ @ApiModelProperty(value = "店铺id") - private Long shopId; + private Long businessId; /** * 名称 diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/param/permission/PermissionSaveParam.java b/cereshop-business/src/main/java/com/shop/cereshop/business/param/permission/PermissionSaveParam.java index 4276f8d..e758495 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/param/permission/PermissionSaveParam.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/param/permission/PermissionSaveParam.java @@ -22,7 +22,7 @@ public class PermissionSaveParam { * 店铺id */ @ApiModelProperty(value = "店铺id") - private Long shopId; + private Long businessId; /** * 父节点id diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/param/permission/RoleDistributionParam.java b/cereshop-business/src/main/java/com/shop/cereshop/business/param/permission/RoleDistributionParam.java index 5742154..6c7a741 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/param/permission/RoleDistributionParam.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/param/permission/RoleDistributionParam.java @@ -22,7 +22,7 @@ public class RoleDistributionParam { * 店铺id */ @ApiModelProperty(value = "店铺id") - private Long shopId; + private Long businessId; /** * 角色id diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/param/permission/UserBuildParam.java b/cereshop-business/src/main/java/com/shop/cereshop/business/param/permission/UserBuildParam.java index ba088d8..4bc0edd 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/param/permission/UserBuildParam.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/param/permission/UserBuildParam.java @@ -20,7 +20,7 @@ public class UserBuildParam { * 店铺id */ @ApiModelProperty(value = "店铺id") - private Long shopId; + private Long businessId; /** * 账户id diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/param/product/ClassifyDeleteParam.java b/cereshop-business/src/main/java/com/shop/cereshop/business/param/product/ClassifyDeleteParam.java new file mode 100644 index 0000000..9b6c26e --- /dev/null +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/param/product/ClassifyDeleteParam.java @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.business.param.product; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * 删除类别请求 + */ +@Data +@ApiModel(value = "ClassifyDeleteParam", description = "删除类别请求") +public class ClassifyDeleteParam { + + /** + * 一级类别id + */ + @ApiModelProperty(value = "一级类别id") + private Long oneClassifyId; +} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/param/product/ClassifyGetAllParam.java b/cereshop-business/src/main/java/com/shop/cereshop/business/param/product/ClassifyGetAllParam.java new file mode 100644 index 0000000..e899f59 --- /dev/null +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/param/product/ClassifyGetAllParam.java @@ -0,0 +1,18 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.business.param.product; + +import com.shop.cereshop.commons.domain.common.PageParam; +import io.swagger.annotations.ApiModel; +import lombok.Data; + +/** + * 获取类别列表请求 + */ +@Data +@ApiModel(value = "ClassifyGetAllParam", description = "获取类别列表请求") +public class ClassifyGetAllParam extends PageParam { +} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/param/product/ClassifyGetByIdParam.java b/cereshop-business/src/main/java/com/shop/cereshop/business/param/product/ClassifyGetByIdParam.java new file mode 100644 index 0000000..83ed9d8 --- /dev/null +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/param/product/ClassifyGetByIdParam.java @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.business.param.product; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * 获取类别详情请求 + */ +@Data +@ApiModel(value = "ClassifyGetByIdParam", description = "获取类别详情请求") +public class ClassifyGetByIdParam { + + /** + * 一级类别id + */ + @ApiModelProperty(value = "一级类别id") + private Long oneClassifyId; +} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/param/product/ClassifyLevelParam.java b/cereshop-business/src/main/java/com/shop/cereshop/business/param/product/ClassifyLevelParam.java new file mode 100644 index 0000000..30b0f6d --- /dev/null +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/param/product/ClassifyLevelParam.java @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.business.param.product; + +import com.shop.cereshop.commons.domain.product.CereProductClassify; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.Valid; +import java.util.List; + +/** + * 添加类别请求 + */ +@Data +@ApiModel(value = "ClassifyParam", description = "添加类别请求") +public class ClassifyLevelParam { + + /** + * 删除分类id数组 + */ + @ApiModelProperty(value = "删除分类id数组") + private List deleteIds; + + /** + * 分类层级数据 + */ + @ApiModelProperty(value = "分类层级数据") + @Valid + private List classifies; +} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/param/product/ProductGetAllParam.java b/cereshop-business/src/main/java/com/shop/cereshop/business/param/product/ProductGetAllParam.java index 61dc99e..08f63fc 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/param/product/ProductGetAllParam.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/param/product/ProductGetAllParam.java @@ -18,12 +18,25 @@ import lombok.Data; public class ProductGetAllParam extends PageParam { /** + * 所属项目 + */ + @ApiModelProperty(value = "所属项目",hidden = true) + private String project; + + /** * 搜做字段 */ - @ApiModelProperty(value = "搜做字段") + @ApiModelProperty(value = "搜索字段") private String search; /** + * 关联商家id + */ + @ApiModelProperty(value = "关联商家id") + private Long businessId; + + + /** * 关联店铺id */ @ApiModelProperty(value = "关联店铺id") diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/param/product/ProductSaveParam.java b/cereshop-business/src/main/java/com/shop/cereshop/business/param/product/ProductSaveParam.java index 44ff93a..4c7678d 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/param/product/ProductSaveParam.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/param/product/ProductSaveParam.java @@ -27,8 +27,6 @@ public class ProductSaveParam { @ApiModelProperty(value = "商品Id", hidden = true) private Long productId; - @ApiModelProperty(value = "是否是新商品", hidden = true) - private Boolean isNew; /** * 店铺id */ @@ -62,6 +60,19 @@ public class ProductSaveParam { private Long classifyId; /** + * 关联商品分组id + */ + @ApiModelProperty(value = "关联商品分组id") + private Long shopGroupBusinessId; + + /** + * 关联分类id + */ + @ApiModelProperty(value = "关联分类id") + @NotNull(message = "分类不能为空") + private Long classifyBusinessId; + + /** * 关联供应商id */ @ApiModelProperty(value = "关联供应商id") diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/param/product/ProductUpdateParam.java b/cereshop-business/src/main/java/com/shop/cereshop/business/param/product/ProductUpdateParam.java index efddcd6..8cb2c5f 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/param/product/ProductUpdateParam.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/param/product/ProductUpdateParam.java @@ -10,6 +10,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import javax.validation.constraints.NotNull; import java.util.List; /** @@ -56,6 +57,19 @@ public class ProductUpdateParam { private Long classifyId; /** + * 关联商品分组id + */ + @ApiModelProperty(value = "关联商品分组id") + private Long shopGroupBusinessId; + + /** + * 关联分类id + */ + @ApiModelProperty(value = "关联分类id") + @NotNull(message = "分类不能为空") + private Long classifyBusinessId; + + /** * 关联供应商id */ @ApiModelProperty(value = "关联供应商id") diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/param/shop/CereShopEnterpriseParam.java b/cereshop-business/src/main/java/com/shop/cereshop/business/param/shop/CereShopEnterpriseParam.java deleted file mode 100644 index 3f70ff9..0000000 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/param/shop/CereShopEnterpriseParam.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (C) 2017-2021 - * All rights reserved, Designed By 深圳中科鑫智科技有限公司 - * Copyright authorization contact 18814114118 - */ -package com.shop.cereshop.business.param.shop; - -import com.shop.cereshop.commons.domain.shop.CereShopEnterprise; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import javax.validation.constraints.NotBlank; - -/** - * 入驻申请企业请求 - */ -@Data -@ApiModel(value = "CereShopEnterpriseParam", description = "入驻申请企业请求") -public class CereShopEnterpriseParam extends CereShopEnterprise { - - /** - * 手机号 - */ - @ApiModelProperty(value = "手机号") - private String shopPhone; - - /** - * 店铺名称 - */ - @ApiModelProperty(value = "店铺名称") - private String shopName; - - /** - * 店铺负责人 - */ - @ApiModelProperty(value = "店铺负责人") - private String chargePersonName; - - /** - * 负责人电话 - */ - @ApiModelProperty(value = "负责人电话") - private String chargePersonPhone; - - /** - * 店铺地址省份 - */ - @ApiModelProperty(value = "店铺地址省份") - @NotBlank(message = "店铺地址身份不能为空") - private String shopAdressProvince; - - /** - * 店铺地址城市 - */ - @ApiModelProperty(value = "店铺地址城市") - @NotBlank(message = "店铺地址城市不能为空") - private String shopAdressCity; - - /** - * 店铺地址-详细地址 - */ - @ApiModelProperty(value = "店铺地址-详细地址") - private String shopAdressDetail; - - /** - * 主体类型 - */ - @ApiModelProperty(value = "主体类型") - private Integer authenType; - - /** - * 店铺地址 - */ - @ApiModelProperty(value = "店铺地址") - private String shopAdress; -} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/param/shop/CereShopIndividualBusinessesParam.java b/cereshop-business/src/main/java/com/shop/cereshop/business/param/shop/CereShopIndividualBusinessesParam.java deleted file mode 100644 index 48ba2cc..0000000 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/param/shop/CereShopIndividualBusinessesParam.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (C) 2017-2021 - * All rights reserved, Designed By 深圳中科鑫智科技有限公司 - * Copyright authorization contact 18814114118 - */ -package com.shop.cereshop.business.param.shop; - -import com.shop.cereshop.commons.domain.shop.CereShopIndividualBusinesses; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import javax.validation.constraints.NotBlank; - -/** - * 入驻申请个体工商户请求 - */ -@Data -@ApiModel(value = "CereShopIndividualBusinessesParam", description = "入驻申请个体工商户请求") -public class CereShopIndividualBusinessesParam extends CereShopIndividualBusinesses { - - /** - * 手机号 - */ - @ApiModelProperty(value = "手机号") - private String shopPhone; - - /** - * 店铺名称 - */ - @ApiModelProperty(value = "店铺名称") - private String shopName; - - /** - * 店铺负责人 - */ - @ApiModelProperty(value = "店铺负责人") - private String chargePersonName; - - /** - * 负责人电话 - */ - @ApiModelProperty(value = "负责人电话") - private String chargePersonPhone; - - /** - * 店铺地址省份 - */ - @ApiModelProperty(value = "店铺地址省份") - @NotBlank(message = "店铺地址身份不能为空") - private String shopAdressProvince; - - /** - * 店铺地址城市 - */ - @ApiModelProperty(value = "店铺地址城市") - @NotBlank(message = "店铺地址城市不能为空") - private String shopAdressCity; - - /** - * 店铺地址-详细地址 - */ - @ApiModelProperty(value = "店铺地址-详细地址") - private String shopAdressDetail; - - /** - * 主体类型 - */ - @ApiModelProperty(value = "主体类型") - private Integer authenType; - - /** - * 店铺地址 - */ - @ApiModelProperty(value = "店铺地址") - private String shopAdress; -} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/param/shop/CereShopOtherOrganizationsParam.java b/cereshop-business/src/main/java/com/shop/cereshop/business/param/shop/CereShopOtherOrganizationsParam.java deleted file mode 100644 index 5e9192e..0000000 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/param/shop/CereShopOtherOrganizationsParam.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (C) 2017-2021 - * All rights reserved, Designed By 深圳中科鑫智科技有限公司 - * Copyright authorization contact 18814114118 - */ -package com.shop.cereshop.business.param.shop; - -import com.shop.cereshop.commons.domain.shop.CereShopOtherOrganizations; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import javax.validation.constraints.NotBlank; - -/** - * 入驻申请其他组织请求 - */ -@Data -@ApiModel(value = "CereShopOtherOrganizationsParam", description = "入驻申请其他组织请求") -public class CereShopOtherOrganizationsParam extends CereShopOtherOrganizations { - - /** - * 手机号 - */ - @ApiModelProperty(value = "手机号") - private String shopPhone; - - /** - * 店铺名称 - */ - @ApiModelProperty(value = "店铺名称") - private String shopName; - - /** - * 店铺负责人 - */ - @ApiModelProperty(value = "店铺负责人") - private String chargePersonName; - - /** - * 负责人电话 - */ - @ApiModelProperty(value = "负责人电话") - private String chargePersonPhone; - - /** - * 店铺地址省份 - */ - @ApiModelProperty(value = "店铺地址省份") - @NotBlank(message = "店铺地址身份不能为空") - private String shopAdressProvince; - - /** - * 店铺地址城市 - */ - @ApiModelProperty(value = "店铺地址城市") - @NotBlank(message = "店铺地址城市不能为空") - private String shopAdressCity; - - /** - * 店铺地址-详细地址 - */ - @ApiModelProperty(value = "店铺地址-详细地址") - private String shopAdressDetail; - - /** - * 主体类型 - */ - @ApiModelProperty(value = "主体类型") - private Integer authenType; - - /** - * 店铺地址 - */ - @ApiModelProperty(value = "店铺地址") - private String shopAdress; -} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/param/shop/CereShopPersonalParam.java b/cereshop-business/src/main/java/com/shop/cereshop/business/param/shop/CereShopPersonalParam.java deleted file mode 100644 index 6929210..0000000 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/param/shop/CereShopPersonalParam.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (C) 2017-2021 - * All rights reserved, Designed By 深圳中科鑫智科技有限公司 - * Copyright authorization contact 18814114118 - */ -package com.shop.cereshop.business.param.shop; - -import com.shop.cereshop.commons.domain.shop.CereShopPersonal; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import javax.validation.constraints.NotBlank; - -/** - * 入驻申请个人请求 - */ -@Data -@ApiModel(value = "CereShopPersonalParam", description = "入驻申请个人请求") -public class CereShopPersonalParam extends CereShopPersonal { - - /** - * 手机号 - */ - @ApiModelProperty(value = "手机号") - @NotBlank(message = "手机号不能为空") - private String shopPhone; - - /** - * 店铺名称 - */ - @ApiModelProperty(value = "店铺名称") - @NotBlank(message = "店铺名称不能为空") - private String shopName; - - /** - * 店铺负责人 - */ - @ApiModelProperty(value = "店铺负责人") - @NotBlank(message = "店铺负责人不能为空") - private String chargePersonName; - - /** - * 负责人电话 - */ - @ApiModelProperty(value = "负责人电话") - @NotBlank(message = "负责人电话不能为空") - private String chargePersonPhone; - - /** - * 店铺地址省份 - */ - @ApiModelProperty(value = "店铺地址省份") - @NotBlank(message = "店铺地址身份不能为空") - private String shopAdressProvince; - - /** - * 店铺地址城市 - */ - @ApiModelProperty(value = "店铺地址城市") - @NotBlank(message = "店铺地址城市不能为空") - private String shopAdressCity; - - /** - * 店铺地址-详细地址 - */ - @ApiModelProperty(value = "店铺地址-详细地址") - private String shopAdressDetail; - - /** - * 店铺地址 该字段由 省 + 市 + 详细地址 - */ - @ApiModelProperty(value = "店铺地址") - private String shopAdress; - - /** - * 主体类型 - */ - @ApiModelProperty(value = "主体类型") - private Integer authenType; - - /** - * 验证码 - */ - @ApiModelProperty(value = "验证码") - private String code; -} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/param/shop/ShopGetAllParam.java b/cereshop-business/src/main/java/com/shop/cereshop/business/param/shop/ShopGetAllParam.java new file mode 100644 index 0000000..35179b8 --- /dev/null +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/param/shop/ShopGetAllParam.java @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.business.param.shop; + +import com.shop.cereshop.commons.domain.common.PageParam; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * 获取商家列表请求 + */ +@Data +@ApiModel(value = "ShopGetAllParam", description = "获取商家列表请求") +public class ShopGetAllParam{ + + /** + * 店铺名称 + */ + @ApiModelProperty(value = "店铺名称") + private String shopName; + + /** + * 店铺编码 + */ + @ApiModelProperty(value = "店铺编码") + private String shopCode; + + /** + * 店铺负责人 + */ + @ApiModelProperty(value = "店铺负责人") + private String chargePersonName; + + /** + * 合同状态 1-有效 0-无效 + */ + @ApiModelProperty(value = "合同状态 1-有效 0-无效") + private Integer contractState; + + /** + * 店铺IdList + */ + @ApiModelProperty(value = "店铺IdList") + private List shopIdList; +} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/param/shop/ShopGetByIdParam.java b/cereshop-business/src/main/java/com/shop/cereshop/business/param/shop/ShopGetByIdParam.java new file mode 100644 index 0000000..3a74df2 --- /dev/null +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/param/shop/ShopGetByIdParam.java @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.business.param.shop; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * 获取商家详情请求 + */ +@Data +@ApiModel(value = "ShopGetByIdParam", description = "获取商家详情请求") +public class ShopGetByIdParam { + + /** + * 店铺id + */ + @ApiModelProperty(value = "店铺id") + private Long shopId; +} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/param/shop/ShopParam.java b/cereshop-business/src/main/java/com/shop/cereshop/business/param/shop/ShopParam.java index efe0ef6..e37f37e 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/param/shop/ShopParam.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/param/shop/ShopParam.java @@ -24,6 +24,12 @@ public class ShopParam extends PageParam { private Long shopId; /** + * 商家id + */ + @ApiModelProperty(value = "商家id") + private Long businessId; + + /** * 分销员搜索字段(分销员查询需要) */ @ApiModelProperty(value = "分销员搜索字段") diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/param/shop/ShopSaveParam.java b/cereshop-business/src/main/java/com/shop/cereshop/business/param/shop/ShopSaveParam.java new file mode 100644 index 0000000..b27b1a5 --- /dev/null +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/param/shop/ShopSaveParam.java @@ -0,0 +1,69 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.business.param.shop; + +import com.shop.cereshop.commons.domain.shop.CereShopCrossDetail; +import com.shop.cereshop.commons.domain.shop.CereShopReturn; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; + +/** + * 添加商家请求 + */ +@Data +@ApiModel(value = "ShopSaveParam", description = "添加商家请求") +public class ShopSaveParam { + + /** + * 店铺名称 + */ + @ApiModelProperty(value = "店铺名称") + @NotBlank(message = "店铺名称不能为空") + private String shopName; + + /** + * 所属商家Id + */ + @ApiModelProperty(value = "所属商家Id", hidden = true) + private Long businessId; + + /** + * 店铺负责人 + */ + @ApiModelProperty(value = "店铺负责人") + @NotBlank(message = "店铺负责人不能为空") + private String chargePersonName; + + /** + * 负责人电话 + */ + @ApiModelProperty(value = "负责人电话") + @NotBlank(message = "负责人电话不能为空") + private String chargePersonPhone; + + /** + * 店铺地址 + */ + @ApiModelProperty(value = "店铺地址") + @NotBlank(message = "店铺地址不能为空") + private String shopAdress; + + /** + * 退货地址信息 + */ + @ApiModelProperty(value = "店铺地址") + private CereShopReturn shopReturn; + + + @ApiModelProperty(value = "具体跨境信息") + private CereShopCrossDetail crossDetail; + + +} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/param/shop/ShopUpdateLogoParam.java b/cereshop-business/src/main/java/com/shop/cereshop/business/param/shop/ShopUpdateLogoParam.java index a12419f..bc2d53c 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/param/shop/ShopUpdateLogoParam.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/param/shop/ShopUpdateLogoParam.java @@ -5,6 +5,7 @@ */ package com.shop.cereshop.business.param.shop; +import com.shop.cereshop.commons.domain.shop.CereShopCrossDetail; import com.shop.cereshop.commons.domain.shop.CereShopReturn; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -65,4 +66,8 @@ public class ShopUpdateLogoParam { @ApiModelProperty(value = "店铺地址") private CereShopReturn shopReturn; + + @ApiModelProperty(value = "具体跨境信息") + private CereShopCrossDetail crossDetail; + } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/param/shop/ShopUpdateParam.java b/cereshop-business/src/main/java/com/shop/cereshop/business/param/shop/ShopUpdateParam.java new file mode 100644 index 0000000..29ee991 --- /dev/null +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/param/shop/ShopUpdateParam.java @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.business.param.shop; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * 更新商家请求 + */ +@Data +@ApiModel(value = "ShopUpdateParam", description = "更新商家请求") +public class ShopUpdateParam { + + /** + * 店铺id + */ + @ApiModelProperty(value = "店铺id") + private Long shopId; + + + /** + * 店铺名称 + */ + @ApiModelProperty(value = "店铺名称") + @NotBlank(message = "店铺名称不能为空") + private String shopName; + + /** + * 所属商家Id + */ + @ApiModelProperty(value = "所属商家Id") + @NotBlank(message = "所属商家不能为空") + private String businessId; + + /** + * 店铺负责人 + */ + @ApiModelProperty(value = "店铺负责人") + @NotBlank(message = "店铺负责人不能为空") + private String chargePersonName; + + /** + * 负责人电话 + */ + @ApiModelProperty(value = "负责人电话") + @NotBlank(message = "负责人电话不能为空") + private String chargePersonPhone; + + /** + * 店铺地址 + */ + @ApiModelProperty(value = "店铺地址") + @NotBlank(message = "店铺地址不能为空") + private String shopAdress; + +} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/param/stock/KcStockNoteGetAllParam.java b/cereshop-business/src/main/java/com/shop/cereshop/business/param/stock/KcStockNoteGetAllParam.java index a2d9183..1c94f18 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/param/stock/KcStockNoteGetAllParam.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/param/stock/KcStockNoteGetAllParam.java @@ -20,6 +20,11 @@ import java.io.Serializable; @ApiModel(value = "KcStockNoteGetAllParam", description = "获取店铺出入库列表请求") public class KcStockNoteGetAllParam extends PageParam implements Serializable { /** + * 商家id + */ + @ApiModelProperty(value = "商家id") + private Long businessId; + /** * 店铺id */ @ApiModelProperty(value = "店铺id") diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/param/stock/KcStockNoteUpdateParam.java b/cereshop-business/src/main/java/com/shop/cereshop/business/param/stock/KcStockNoteUpdateParam.java index fc89717..a87f54e 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/param/stock/KcStockNoteUpdateParam.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/param/stock/KcStockNoteUpdateParam.java @@ -25,7 +25,7 @@ public class KcStockNoteUpdateParam implements Serializable { /** * 关联店铺id */ - @ApiModelProperty(value = "店铺id") + @ApiModelProperty(value = "商家id") private Long shopId; /** * 关联仓库id diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/param/user/BusinessGetAllUser.java b/cereshop-business/src/main/java/com/shop/cereshop/business/param/user/BusinessGetAllUser.java index e9f4430..2304ccc 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/param/user/BusinessGetAllUser.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/param/user/BusinessGetAllUser.java @@ -21,10 +21,10 @@ import java.io.Serializable; public class BusinessGetAllUser extends PageParam implements Serializable { /** - * 店铺id + * 商家id */ @ApiModelProperty(value = "搜索字段") - private Long shopId; + private Long businessId; /** * 搜索字段 diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/param/user/BusinessSaveUser.java b/cereshop-business/src/main/java/com/shop/cereshop/business/param/user/BusinessSaveUser.java index 1228220..3a57d1a 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/param/user/BusinessSaveUser.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/param/user/BusinessSaveUser.java @@ -24,8 +24,8 @@ public class BusinessSaveUser implements Serializable { /** * 店铺id */ - @ApiModelProperty(value = "店铺id") - private Long shopId; + @ApiModelProperty(value = "商家id") + private Long businessId; /** * 账号 @@ -77,6 +77,11 @@ public class BusinessSaveUser implements Serializable { @ApiModelProperty(value = "角色id数组") private List roleIds; + /** + * 是否是主账号 + */ + private Integer isMainUser; + private static final long serialVersionUID = 1L; } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/pay/xs/service/impl/XsPayServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/pay/xs/service/impl/XsPayServiceImpl.java index 014712b..f06f7c1 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/pay/xs/service/impl/XsPayServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/pay/xs/service/impl/XsPayServiceImpl.java @@ -10,17 +10,18 @@ import com.google.gson.Gson; import com.shop.cereshop.business.dao.order.CereOrderProductDAO; import com.shop.cereshop.business.dao.order.CereShopOrderDAO; import com.shop.cereshop.business.dao.shop.CereShopBankDAO; -import com.shop.cereshop.business.page.shop.Shop; +import com.shop.cereshop.business.page.business.Business; import com.shop.cereshop.business.page.shop.ShopBankDetail; import com.shop.cereshop.business.pay.xs.domain.XsCallBackRequestVo; import com.shop.cereshop.business.pay.xs.service.XsPayService; import com.shop.cereshop.business.pay.xs.utils.CommonUtils; -import com.shop.cereshop.business.service.shop.CerePlatformShopService; +import com.shop.cereshop.business.service.business.CerePlatformBusinessService; import com.shop.cereshop.commons.config.XspayConfig; import com.shop.cereshop.commons.constant.CoReturnFormat; import com.shop.cereshop.commons.constant.IntegerEnum; import com.shop.cereshop.commons.constant.WxPayEnum; import com.shop.cereshop.commons.constant.XsPayEnum; +import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; import com.shop.cereshop.commons.domain.order.CereOrderParent; import com.shop.cereshop.commons.domain.order.CereOrderProduct; import com.shop.cereshop.commons.domain.order.CereShopOrder; @@ -57,7 +58,7 @@ public class XsPayServiceImpl implements XsPayService { private CereOrderProductDAO cereOrderProductDAO; @Autowired - private CerePlatformShopService cerePlatformShopservice; + private CerePlatformBusinessService cerePlatformBusinessService; @Autowired private CereShopBankDAO cereShopBankDAO; @@ -259,7 +260,7 @@ public class XsPayServiceImpl implements XsPayService { log.info("cereOrderProductList:" + new Gson().toJson(cereOrderProductList)); List shopIdList = orderList.stream().map(CereShopOrder::getShopId).distinct().collect(Collectors.toList()); - List cerePlatformShopList = cerePlatformShopservice.getByIdList(shopIdList); + List cerePlatformBusinessList = cerePlatformBusinessService.getByIdList(shopIdList); Map contentMap = new LinkedHashMap<>(); @@ -270,7 +271,7 @@ public class XsPayServiceImpl implements XsPayService { //oldDealId 对应 101004、101005接口响应参数中dealId // contentMap.put("oldDealId", dealId); contentMap.put("oldSubOrderId", orderList.get(0).getOrderFormid()); - JSONArray jsonArray = build22SubMerchantOrderDetails(orderList, cereOrderProductList, cerePlatformShopList); + JSONArray jsonArray = build22SubMerchantOrderDetails(orderList, cereOrderProductList, cerePlatformBusinessList); if(jsonArray != null) { contentMap.put("shareRefundDetail", JSONArray.toJSONString(jsonArray)); } @@ -375,17 +376,17 @@ public class XsPayServiceImpl implements XsPayService { return contentMap; } - Shop shop = cerePlatformShopservice.getById(shopId); + Business business = cerePlatformBusinessService.getById(shopId); ShopBankDetail shopBankDetail = cereShopBankDAO.getById(shopId); if(shopBankDetail == null){ throw new CoBusinessException("10000","查找不到添加的银行卡信息", ""); } - contentMap.put("name", shop.getShopName()); - if(IntegerEnum.PERSONAL.getCode().equals(shop.getAuthenType())){ + contentMap.put("name", business.getBusinessName()); + if(IntegerEnum.PERSONAL.getCode().equals(business.getAuthenType())){ //个体 contentMap.put("type", "0"); - contentMap.put("idNo", shop.getPersonal().getPersonalIdCard()); + contentMap.put("idNo", business.getPersonal().getPersonalIdCard()); contentMap.put("currencyCode", "CNY"); contentMap.put("operationType", operationType); @@ -400,10 +401,10 @@ public class XsPayServiceImpl implements XsPayService { contentMap.put("bankAcctNo", shopBankDetail.getCardNumber()); contentMap.put("bankAddr", ""); contentMap.put("bankPeoNo", ""); - }else if(IntegerEnum.INDIVIDUAL.getCode().equals(shop.getAuthenType())){ + }else if(IntegerEnum.INDIVIDUAL.getCode().equals(business.getAuthenType())){ //个体工商户 contentMap.put("type", "1"); - contentMap.put("idNo", shop.getIndividualBusinesses().getSubjectCode()); + contentMap.put("idNo", business.getIndividualBusinesses().getSubjectCode()); contentMap.put("currencyCode", "CNY"); contentMap.put("operationType", operationType); @@ -418,10 +419,10 @@ public class XsPayServiceImpl implements XsPayService { contentMap.put("bankAcctNo", shopBankDetail.getCardNumber()); contentMap.put("bankAddr", ""); contentMap.put("bankPeoNo", ""); - }else if(IntegerEnum.ORGANIZATION.getCode().equals(shop.getAuthenType())){ + }else if(IntegerEnum.ORGANIZATION.getCode().equals(business.getAuthenType())){ //其他组织 contentMap.put("type", "1"); - contentMap.put("idNo", shop.getOtherOrganizations().getOtherCode()); + contentMap.put("idNo", business.getOtherOrganizations().getOtherCode()); contentMap.put("currencyCode", "CNY"); contentMap.put("operationType", operationType); contentMap.put("region", "0"); @@ -438,7 +439,7 @@ public class XsPayServiceImpl implements XsPayService { }else { //企业 contentMap.put("type", "1"); - contentMap.put("idNo", shop.getEnterprise().getEnterpriseCode()); + contentMap.put("idNo", business.getEnterprise().getEnterpriseCode()); contentMap.put("currencyCode", "CNY"); contentMap.put("operationType", operationType); contentMap.put("region", "0"); @@ -469,7 +470,7 @@ public class XsPayServiceImpl implements XsPayService { */ private static JSONArray build22SubMerchantOrderDetails(List orderList, List cereOrderProductList, - List cerePlatformShopList){ + List cerePlatformBusinessList){ if(cereOrderProductList.isEmpty()){ return null; } @@ -477,14 +478,14 @@ public class XsPayServiceImpl implements XsPayService { JSONArray detailArray1 = new JSONArray(); for (CereShopOrder cereShopOrder : orderList) { - CerePlatformShop cerePlatformShop = cerePlatformShopList.stream().filter(item -> - item.getShopId().equals(cereShopOrder.getShopId())).findFirst().orElse(null); + CerePlatformBusiness cerePlatformBusiness = cerePlatformBusinessList.stream().filter(item -> + item.getBusinessId().equals(cereShopOrder.getShopId())).findFirst().orElse(null); List orderProductList = cereOrderProductList.stream().filter(item -> item.getOrderId().equals(cereShopOrder.getOrderId())).collect(Collectors.toList()); for (CereOrderProduct cereOrderProduct : orderProductList) { //子订单1 明细1 JSONObject detail1 = new JSONObject(); detail1.put("shareDetailId", "" + cereOrderProduct.getOrderId() + cereOrderProduct.getOrderProductId()); - detail1.put("shareParId", cerePlatformShop.getXsPayId()); + detail1.put("shareParId", cerePlatformBusiness.getXsPayId()); //这里是否需要减去用积分抵扣金额 detail1.put("shareRefundAmount", cereOrderProduct.getActualPrice().add(cereOrderProduct.getLogisticsPrice()) diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/redis/config/RedisMessageListener.java b/cereshop-business/src/main/java/com/shop/cereshop/business/redis/config/RedisMessageListener.java index 7fc36ff..8b3f210 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/redis/config/RedisMessageListener.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/redis/config/RedisMessageListener.java @@ -7,7 +7,7 @@ package com.shop.cereshop.business.redis.config; import com.shop.cereshop.business.redis.listener.RedisListener; import com.shop.cereshop.business.service.activity.CereActivitySignService; -import com.shop.cereshop.business.service.business.CerePlatformBusinessService; +import com.shop.cereshop.business.service.business.CerePlatformBusinessUserService; import com.shop.cereshop.business.service.channel.ShopChannelActivityService; import com.shop.cereshop.business.service.compose.CereShopComposeService; import com.shop.cereshop.business.service.notice.CereNoticeService; @@ -33,7 +33,7 @@ public class RedisMessageListener { private RedisTemplate redisTemplate; @Autowired - private CerePlatformBusinessService cerePlatformBusinessService; + private CerePlatformBusinessUserService cerePlatformBusinessUserService; @Autowired private CereRedisKeyServcice cereRedisKeyServcice; @@ -94,7 +94,7 @@ public class RedisMessageListener { RedisMessageListenerContainer listenerContainer = new RedisMessageListenerContainer(); listenerContainer.setConnectionFactory(redisConnectionFactory); // 若是监听所有DB,则注释 下面代码 - RedisListener redisListener = new RedisListener(listenerContainer,redisTemplate,cerePlatformBusinessService + RedisListener redisListener = new RedisListener(listenerContainer,redisTemplate, cerePlatformBusinessUserService ,cereRedisKeyServcice,cereNoticeService,cereShopGroupWorkService ,cereShopGroupWorkDetailService,cereShopProductService ,cereShopSeckillService,cereShopSeckillDetailService, diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/redis/listener/RedisListener.java b/cereshop-business/src/main/java/com/shop/cereshop/business/redis/listener/RedisListener.java index a64d06d..31c29a1 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/redis/listener/RedisListener.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/redis/listener/RedisListener.java @@ -6,12 +6,12 @@ package com.shop.cereshop.business.redis.listener; import cn.hutool.core.date.DateUtil; +import com.shop.cereshop.business.page.business.PlatformBusinessUser; import com.shop.cereshop.business.page.operate.OperateCoupon; -import com.shop.cereshop.business.page.user.Business; import com.shop.cereshop.business.param.channel.ChannelActivityParam; import com.shop.cereshop.business.redis.service.api.UserRedisService; import com.shop.cereshop.business.service.activity.CereActivitySignService; -import com.shop.cereshop.business.service.business.CerePlatformBusinessService; +import com.shop.cereshop.business.service.business.CerePlatformBusinessUserService; import com.shop.cereshop.business.service.channel.ShopChannelActivityService; import com.shop.cereshop.business.service.compose.CereShopComposeService; import com.shop.cereshop.business.service.notice.CereNoticeService; @@ -47,7 +47,7 @@ public class RedisListener extends KeyExpirationEventMessageListener { private RedisTemplate redisTemplate; - private CerePlatformBusinessService cerePlatformBusinessService; + private CerePlatformBusinessUserService cerePlatformBusinessUserService; private CereRedisKeyServcice cereRedisKeyServcice; @@ -86,7 +86,7 @@ public class RedisListener extends KeyExpirationEventMessageListener { private ShopChannelActivityService shopChannelActivityService; public RedisListener(RedisMessageListenerContainer listenerContainer, - RedisTemplate redisTemplate, CerePlatformBusinessService cerePlatformBusinessService + RedisTemplate redisTemplate, CerePlatformBusinessUserService cerePlatformBusinessUserService , CereRedisKeyServcice cereRedisKeyServcice, CereNoticeService cereNoticeService , CereShopGroupWorkService cereShopGroupWorkService, CereShopGroupWorkDetailService cereShopGroupWorkDetailService , CereShopProductService cereShopProductService, CereShopSeckillService cereShopSeckillService @@ -98,7 +98,7 @@ public class RedisListener extends KeyExpirationEventMessageListener { ShopChannelActivityService shopChannelActivityService) { super(listenerContainer); this.redisTemplate=redisTemplate; - this.cerePlatformBusinessService=cerePlatformBusinessService; + this.cerePlatformBusinessUserService = cerePlatformBusinessUserService; this.cereRedisKeyServcice=cereRedisKeyServcice; this.cereNoticeService=cereNoticeService; this.cereShopGroupWorkService=cereShopGroupWorkService; @@ -524,7 +524,7 @@ public class RedisListener extends KeyExpirationEventMessageListener { private void changeBusinessToken(String businessUserId, String time) throws CoBusinessException,Exception{ Long userId = Long.valueOf(businessUserId); - Business business = cerePlatformBusinessService.getById(userId); - userRedisService.createToken(business.getUsername(), userId); + PlatformBusinessUser platformBusinessUser = cerePlatformBusinessUserService.getById(userId); + userRedisService.createToken(platformBusinessUser.getUsername(), userId); } } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/activity/CereActivitySignService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/activity/CereActivitySignService.java index e0a1926..4f17fc5 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/activity/CereActivitySignService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/activity/CereActivitySignService.java @@ -16,7 +16,7 @@ import com.shop.cereshop.business.param.activity.ActivitySignGetProductParam; import com.shop.cereshop.business.param.activity.ActivitySignSaveParam; import com.shop.cereshop.business.param.finance.BondParam; import com.shop.cereshop.commons.domain.activity.CereActivitySign; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.shop.CereShopGroup; import com.shop.cereshop.commons.exception.CoBusinessException; @@ -26,7 +26,7 @@ import java.util.List; public interface CereActivitySignService { Page getAll(ActivitiSignGetAllParam param) throws CoBusinessException,Exception; - BondState save(ActivitySignSaveParam param, CerePlatformBusiness user,String ip) throws CoBusinessException,Exception; + BondState save(ActivitySignSaveParam param, CerePlatformBusinessUser user, String ip) throws CoBusinessException,Exception; List getById(Long signId) throws CoBusinessException; @@ -52,7 +52,7 @@ public interface CereActivitySignService { void deleteLogBySignId(Long signId) throws CoBusinessException; - ActivitySignDetail getActivitySignDetail(Long activityId, CerePlatformBusiness user); + ActivitySignDetail getActivitySignDetail(Long activityId, CerePlatformBusinessUser user); ActivityData getDatas(ActivityGetDataParam param) throws CoBusinessException; } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/activity/CereShopMarketToolService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/activity/CereShopMarketToolService.java index 365cd28..ca320f9 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/activity/CereShopMarketToolService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/activity/CereShopMarketToolService.java @@ -7,19 +7,19 @@ package com.shop.cereshop.business.service.activity; import com.shop.cereshop.business.page.activity.MarketTool; import com.shop.cereshop.business.param.tool.*; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.exception.CoBusinessException; import java.util.List; public interface CereShopMarketToolService { - void save(ToolSaveParam param, CerePlatformBusiness user) throws CoBusinessException,Exception; + void save(ToolSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception; - void update(ToolUpdateParam param, CerePlatformBusiness user) throws CoBusinessException,Exception; + void update(ToolUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception; - void delete(ToolDeleteParam param, CerePlatformBusiness user) throws CoBusinessException; + void delete(ToolDeleteParam param, CerePlatformBusinessUser user) throws CoBusinessException; - void end(ToolEndParam param, CerePlatformBusiness user) throws CoBusinessException; + void end(ToolEndParam param, CerePlatformBusinessUser user) throws CoBusinessException; MarketTool getById(Long toolId) throws CoBusinessException; diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/activity/impl/CereActivitySignServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/activity/impl/CereActivitySignServiceImpl.java index 2255383..4227c5f 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/activity/impl/CereActivitySignServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/activity/impl/CereActivitySignServiceImpl.java @@ -40,7 +40,7 @@ import com.shop.cereshop.commons.constant.WxPayEnum; import com.shop.cereshop.commons.domain.activity.CereActivitySign; import com.shop.cereshop.commons.domain.activity.CerePlatformActivity; import com.shop.cereshop.commons.domain.activity.CereSignProduct; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.pay.CerePayLog; import com.shop.cereshop.commons.domain.platformtool.CerePlatformDiscount; @@ -201,7 +201,7 @@ public class CereActivitySignServiceImpl implements CereActivitySignService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public BondState save(ActivitySignSaveParam param, CerePlatformBusiness user,String ip) throws CoBusinessException,Exception { + public BondState save(ActivitySignSaveParam param, CerePlatformBusinessUser user, String ip) throws CoBusinessException,Exception { BondState bondState=new BondState(); List productIs=null; if(!EmptyUtils.isEmpty(param.getProducts())){ @@ -554,8 +554,8 @@ public class CereActivitySignServiceImpl implements CereActivitySignService { } @Override - public ActivitySignDetail getActivitySignDetail(Long activityId, CerePlatformBusiness user) { - CereActivitySign cereActivitySign=cereActivitySignDAO.findByShopIdAndActivityId(user.getShopId(), activityId); + public ActivitySignDetail getActivitySignDetail(Long activityId, CerePlatformBusinessUser user) { + CereActivitySign cereActivitySign=cereActivitySignDAO.findByShopIdAndActivityId(user.getBusinessId(), activityId); if (cereActivitySign != null) { List productIdList = cereSignProductDAO.selectProductListBySignId(cereActivitySign.getSignId()); ActivitySignDetail detail = new ActivitySignDetail(); diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/activity/impl/CereShopMarketToolServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/activity/impl/CereShopMarketToolServiceImpl.java index d0e059c..4905fea 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/activity/impl/CereShopMarketToolServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/activity/impl/CereShopMarketToolServiceImpl.java @@ -17,7 +17,7 @@ import com.shop.cereshop.business.service.redis.CereRedisKeyServcice; import com.shop.cereshop.commons.constant.IntegerEnum; import com.shop.cereshop.commons.constant.StringEnum; import com.shop.cereshop.commons.domain.activity.CereShopMarketTool; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.utils.EmptyUtils; import com.shop.cereshop.commons.utils.TimeUtils; @@ -52,7 +52,7 @@ public class CereShopMarketToolServiceImpl implements CereShopMarketToolService @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void save(ToolSaveParam param, CerePlatformBusiness user) throws CoBusinessException,Exception { + public void save(ToolSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception { String time= TimeUtils.yyMMddHHmmss(); //新增营销工具 CereShopMarketTool cereShopMarketTool=new CereShopMarketTool(); @@ -104,7 +104,7 @@ public class CereShopMarketToolServiceImpl implements CereShopMarketToolService @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void update(ToolUpdateParam param, CerePlatformBusiness user) throws CoBusinessException,Exception { + public void update(ToolUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception { String time= TimeUtils.yyMMddHHmmss(); //新增营销工具 CereShopMarketTool cereShopMarketTool=new CereShopMarketTool(); @@ -160,7 +160,7 @@ public class CereShopMarketToolServiceImpl implements CereShopMarketToolService @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void delete(ToolDeleteParam param, CerePlatformBusiness user) throws CoBusinessException { + public void delete(ToolDeleteParam param, CerePlatformBusinessUser user) throws CoBusinessException { //清除redis任务 stringRedisService.delete(StringEnum.SHOP_TOOL_END.getCode()+"-"+param.getToolId()); stringRedisService.delete(StringEnum.SHOP_TOOL_IN.getCode()+"-"+param.getToolId()); @@ -177,7 +177,7 @@ public class CereShopMarketToolServiceImpl implements CereShopMarketToolService @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void end(ToolEndParam param, CerePlatformBusiness user) throws CoBusinessException { + public void end(ToolEndParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time=TimeUtils.yyMMddHHmmss(); //修改营销工具状态为已结束 CereShopMarketTool cereShopMarketTool=new CereShopMarketTool(); diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/after/CereOrderAfterService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/after/CereOrderAfterService.java index 09b83a0..c3bfc13 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/after/CereOrderAfterService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/after/CereOrderAfterService.java @@ -9,7 +9,7 @@ import com.shop.cereshop.business.page.after.After; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.business.param.after.AfterGetAllParam; import com.shop.cereshop.business.param.after.AfterIdParam; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.exception.CoBusinessException; import java.util.List; @@ -19,17 +19,17 @@ public interface CereOrderAfterService { After getById(Long afterId) throws CoBusinessException; - void refundSuccess(AfterIdParam param, CerePlatformBusiness user) throws CoBusinessException,Exception; + void refundSuccess(AfterIdParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception; - void refundRefuse(AfterIdParam param, CerePlatformBusiness user) throws CoBusinessException,Exception; + void refundRefuse(AfterIdParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception; - void success(AfterIdParam param, CerePlatformBusiness user) throws CoBusinessException; + void success(AfterIdParam param, CerePlatformBusinessUser user) throws CoBusinessException; - void refuse(AfterIdParam param, CerePlatformBusiness user) throws CoBusinessException,Exception; + void refuse(AfterIdParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception; - void confirmAndRefund(AfterIdParam param, CerePlatformBusiness user) throws CoBusinessException,Exception; + void confirmAndRefund(AfterIdParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception; - void damaging(AfterIdParam param, CerePlatformBusiness user) throws CoBusinessException; + void damaging(AfterIdParam param, CerePlatformBusinessUser user) throws CoBusinessException; void handleRefundSuc(String s, String transaction_id, String orderNo, Integer paymentMode) throws CoBusinessException; diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/after/impl/CereOrderAfterServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/after/impl/CereOrderAfterServiceImpl.java index fed6906..8ad3fb5 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/after/impl/CereOrderAfterServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/after/impl/CereOrderAfterServiceImpl.java @@ -36,7 +36,7 @@ import com.shop.cereshop.commons.constant.IntegerEnum; import com.shop.cereshop.commons.constant.StringEnum; import com.shop.cereshop.commons.constant.WxPayEnum; import com.shop.cereshop.commons.domain.after.CereOrderAfter; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.order.CereOrderProduct; import com.shop.cereshop.commons.domain.order.CereOrderReconciliation; @@ -163,7 +163,7 @@ public class CereOrderAfterServiceImpl implements CereOrderAfterService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void refundSuccess(AfterIdParam param, CerePlatformBusiness user) throws CoBusinessException,Exception { + public void refundSuccess(AfterIdParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception { String time= TimeUtils.yyMMddHHmmss(); //同意退款申请,修改售后单状态为退款中 CereOrderAfter cereOrderAfter=new CereOrderAfter(); @@ -230,7 +230,7 @@ public class CereOrderAfterServiceImpl implements CereOrderAfterService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void refundRefuse(AfterIdParam param, CerePlatformBusiness user) throws CoBusinessException,Exception { + public void refundRefuse(AfterIdParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception { String time= TimeUtils.yyMMddHHmmss(); //拒绝退款申请,修改售后单状态为审核不通过 CereOrderAfter cereOrderAfter=new CereOrderAfter(); @@ -253,7 +253,7 @@ public class CereOrderAfterServiceImpl implements CereOrderAfterService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void success(AfterIdParam param, CerePlatformBusiness user) throws CoBusinessException { + public void success(AfterIdParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time= TimeUtils.yyMMddHHmmss(); //同意退货退款申请,修改售后单状态为审核通过 CereOrderAfter cereOrderAfter=new CereOrderAfter(); @@ -273,7 +273,7 @@ public class CereOrderAfterServiceImpl implements CereOrderAfterService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void refuse(AfterIdParam param, CerePlatformBusiness user) throws CoBusinessException,Exception { + public void refuse(AfterIdParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception { String time= TimeUtils.yyMMddHHmmss(); //拒绝退货退款申请,修改售后单状态为审核不通过 CereOrderAfter cereOrderAfter=new CereOrderAfter(); @@ -297,7 +297,7 @@ public class CereOrderAfterServiceImpl implements CereOrderAfterService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void confirmAndRefund(AfterIdParam param, CerePlatformBusiness user) throws CoBusinessException,Exception { + public void confirmAndRefund(AfterIdParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception { //资金将退回买家的支付账户,售后单状态变为售后成功,买家端变为已退款 String time= TimeUtils.yyMMddHHmmss(); //确认收货且退款,修改售后单状态为退款中 @@ -362,7 +362,7 @@ public class CereOrderAfterServiceImpl implements CereOrderAfterService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void damaging(AfterIdParam param, CerePlatformBusiness user) throws CoBusinessException { + public void damaging(AfterIdParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time= TimeUtils.yyMMddHHmmss(); //货物有损拒绝退款,修改售后单状态改为退货完成,拒绝退款 CereOrderAfter cereOrderAfter=new CereOrderAfter(); diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/business/CereBusinessShopService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/business/CereBusinessShopService.java deleted file mode 100644 index c973ed9..0000000 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/business/CereBusinessShopService.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (C) 2017-2021 - * All rights reserved, Designed By 深圳中科鑫智科技有限公司 - * Copyright authorization contact 18814114118 - */ -package com.shop.cereshop.business.service.business; - -import com.shop.cereshop.commons.domain.business.CereBusinessShop; -import com.shop.cereshop.commons.exception.CoBusinessException; - -public interface CereBusinessShopService { - void insert(CereBusinessShop cereBusinessShop) throws CoBusinessException; - - void deleteByUserId(Long businessUserId) throws CoBusinessException; - - Long findByShopId(Long shopId); -} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/business/CereBusinessUserService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/business/CereBusinessUserService.java new file mode 100644 index 0000000..0adbbea --- /dev/null +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/business/CereBusinessUserService.java @@ -0,0 +1,17 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.business.service.business; + +import com.shop.cereshop.commons.domain.business.CereBusinessUser; +import com.shop.cereshop.commons.exception.CoBusinessException; + +public interface CereBusinessUserService { + void insert(CereBusinessUser cereBusinessUser) throws CoBusinessException; + + void deleteByUserId(Long businessUserId) throws CoBusinessException; + + Long findMainUserByBusinessId(Long shopId); +} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/business/CerePlatformBusinessService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/business/CerePlatformBusinessService.java index 76c990a..85977ba 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/business/CerePlatformBusinessService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/business/CerePlatformBusinessService.java @@ -5,46 +5,50 @@ */ package com.shop.cereshop.business.service.business; -import com.shop.cereshop.business.page.shop.PlatformBusiness; -import com.shop.cereshop.business.page.user.Business; -import com.shop.cereshop.business.param.business.BusinessForgetParam; -import com.shop.cereshop.business.param.user.*; +import com.shop.cereshop.business.page.business.Business; +import com.shop.cereshop.business.page.index.HotProductDTO; +import com.shop.cereshop.business.page.index.Index; +import com.shop.cereshop.business.page.index.OrderConvertDTO; +import com.shop.cereshop.business.page.index.UserVisitDTO; +import com.shop.cereshop.business.param.business.BusinessUpdateParam; +import com.shop.cereshop.business.param.index.IndexParam; import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; -import com.shop.cereshop.commons.domain.common.Page; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.exception.CoBusinessException; -public interface CerePlatformBusinessService { - PlatformBusiness findByUserName(String username) ; - - PlatformBusiness findByPhone(String phone) ; - - PlatformBusiness findById(Long userId); +import java.util.List; - void forgetPassword(BusinessForgetParam user, CerePlatformBusiness cerePlatformBusiness) throws CoBusinessException; +public interface CerePlatformBusinessService { - CerePlatformBusiness findByToken(String token); + CerePlatformBusiness selectByPrimaryKey(Long businessId); - void insert(CerePlatformBusiness cerePlatformBusiness) throws CoBusinessException; + Business getById(Long businessId) throws CoBusinessException; - void updateToken(CerePlatformBusiness cerePlatformBusiness) throws CoBusinessException; + /** + * 注册新生支付商家信息 + * @param businessId + * @return + * @throws CoBusinessException + */ + Business registerByXs(Long businessId) throws CoBusinessException; - void save(BusinessSaveUser business, CerePlatformBusiness user) throws CoBusinessException; + void update(BusinessUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException; - void update(BusinessUpdateUser business, CerePlatformBusiness user) throws CoBusinessException; + void updateState(CerePlatformBusiness cerePlatformBusiness) throws CoBusinessException; - Business getById(Long businessUserId) throws CoBusinessException,Exception; + Index index(IndexParam param) throws CoBusinessException; - void delete(BusinessDeleteUser param, CerePlatformBusiness user) throws CoBusinessException; + void insert(CerePlatformBusiness cerePlatformBusiness) throws CoBusinessException; - Page getAll(BusinessGetAllUser param) throws CoBusinessException; + void update(CerePlatformBusiness cerePlatformBusiness) throws CoBusinessException; - CerePlatformBusiness checkUserName(String shopPhone, Long id); + List selectAll(); - void updatePassword(BusinessForgetParam passwordParam, CerePlatformBusiness user) throws CoBusinessException; + List selectUserVisitForExport(IndexParam param); - void updateAvatar(CerePlatformBusiness user); + List selectOrderConvertForExport(IndexParam param); - void updatePhone(UserUpdatePhoneParam param, CerePlatformBusiness user) throws CoBusinessException; + List selectHotProductForExport(IndexParam param); - String findAdminPhone(Long shopId); + List getByIdList(List businessIdList); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/business/CerePlatformBusinessUserService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/business/CerePlatformBusinessUserService.java new file mode 100644 index 0000000..8c6bc34 --- /dev/null +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/business/CerePlatformBusinessUserService.java @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.business.service.business; + +import com.shop.cereshop.business.page.business.PlatformBusinessUser; +import com.shop.cereshop.business.param.business.BusinessForgetParam; +import com.shop.cereshop.business.param.user.*; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; +import com.shop.cereshop.commons.domain.common.Page; +import com.shop.cereshop.commons.exception.CoBusinessException; + +public interface CerePlatformBusinessUserService { + com.shop.cereshop.business.page.business.PlatformBusinessUser findByUserName(String username) ; + + com.shop.cereshop.business.page.business.PlatformBusinessUser findByPhone(String phone) ; + + com.shop.cereshop.business.page.business.PlatformBusinessUser findById(Long userId); + + void forgetPassword(BusinessForgetParam user, CerePlatformBusinessUser cerePlatformBusinessUser) throws CoBusinessException; + + CerePlatformBusinessUser findByToken(String token); + + void insert(CerePlatformBusinessUser cerePlatformBusinessUser) throws CoBusinessException; + + void updateToken(CerePlatformBusinessUser cerePlatformBusinessUser) throws CoBusinessException; + + void save(BusinessSaveUser business, CerePlatformBusinessUser user) throws CoBusinessException; + + void update(BusinessUpdateUser business, CerePlatformBusinessUser user) throws CoBusinessException; + + PlatformBusinessUser getById(Long businessUserId) throws CoBusinessException,Exception; + + void delete(BusinessDeleteUser param, CerePlatformBusinessUser user) throws CoBusinessException; + + Page getAll(BusinessGetAllUser param) throws CoBusinessException; + + CerePlatformBusinessUser checkUserName(String shopPhone, Long id); + + void updatePassword(BusinessForgetParam passwordParam, CerePlatformBusinessUser user) throws CoBusinessException; + + void updateAvatar(CerePlatformBusinessUser user); + + void updatePhone(UserUpdatePhoneParam param, CerePlatformBusinessUser user) throws CoBusinessException; + + String findAdminPhone(Long shopId); +} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/business/impl/CereBusinessShopServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/business/impl/CereBusinessShopServiceImpl.java deleted file mode 100644 index 1e908ba..0000000 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/business/impl/CereBusinessShopServiceImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2017-2021 - * All rights reserved, Designed By 深圳中科鑫智科技有限公司 - * Copyright authorization contact 18814114118 - */ -package com.shop.cereshop.business.service.business.impl; - -import com.shop.cereshop.business.dao.business.CereBusinessShopDAO; -import com.shop.cereshop.business.service.business.CereBusinessShopService; -import com.shop.cereshop.commons.domain.business.CereBusinessShop; -import com.shop.cereshop.commons.exception.CoBusinessException; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -@Service -public class CereBusinessShopServiceImpl implements CereBusinessShopService { - - @Autowired - private CereBusinessShopDAO cereBusinessShopDAO; - - @Override - public void insert(CereBusinessShop cereBusinessShop) throws CoBusinessException { - cereBusinessShopDAO.insert(cereBusinessShop); - } - - @Override - public void deleteByUserId(Long businessUserId) throws CoBusinessException { - cereBusinessShopDAO.deleteByUserId(businessUserId); - } - - @Override - public Long findByShopId(Long shopId) { - return cereBusinessShopDAO.findByShopId(shopId); - } -} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/business/impl/CereBusinessUserServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/business/impl/CereBusinessUserServiceImpl.java new file mode 100644 index 0000000..2c4cee6 --- /dev/null +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/business/impl/CereBusinessUserServiceImpl.java @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.business.service.business.impl; + +import com.shop.cereshop.business.dao.business.CereBusinessUserDAO; +import com.shop.cereshop.business.service.business.CereBusinessUserService; +import com.shop.cereshop.commons.domain.business.CereBusinessUser; +import com.shop.cereshop.commons.exception.CoBusinessException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class CereBusinessUserServiceImpl implements CereBusinessUserService { + + @Autowired + private CereBusinessUserDAO cereBusinessUserDAO; + + @Override + public void insert(CereBusinessUser cereBusinessUser) throws CoBusinessException { + cereBusinessUserDAO.insert(cereBusinessUser); + } + + @Override + public void deleteByUserId(Long businessUserId) throws CoBusinessException { + cereBusinessUserDAO.deleteByUserId(businessUserId); + } + + @Override + public Long findMainUserByBusinessId(Long businessId) { + return cereBusinessUserDAO.findMainUserByBusinessId(businessId); + } +} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/business/impl/CerePlatformBusinessServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/business/impl/CerePlatformBusinessServiceImpl.java deleted file mode 100644 index ab6d7b0..0000000 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/business/impl/CerePlatformBusinessServiceImpl.java +++ /dev/null @@ -1,325 +0,0 @@ -/* - * Copyright (C) 2017-2021 - * All rights reserved, Designed By 深圳中科鑫智科技有限公司 - * Copyright authorization contact 18814114118 - */ -package com.shop.cereshop.business.service.business.impl; - -import com.github.pagehelper.PageHelper; -import com.github.pagehelper.PageInfo; -import com.shop.cereshop.business.dao.business.CerePlatformBusinessDAO; -import com.shop.cereshop.business.dao.user.CerePrivacyVerifySettingDAO; -import com.shop.cereshop.business.page.role.PlatformUserRole; -import com.shop.cereshop.business.page.shop.PlatformBusiness; -import com.shop.cereshop.business.page.user.Business; -import com.shop.cereshop.business.param.business.BusinessForgetParam; -import com.shop.cereshop.business.param.user.*; -import com.shop.cereshop.business.service.business.CereBusinessShopService; -import com.shop.cereshop.business.service.business.CereBusinessUserRoleService; -import com.shop.cereshop.business.service.business.CerePlatformBusinessService; -import com.shop.cereshop.business.service.log.CerePlatformLogService; -import com.shop.cereshop.business.service.shop.CerePlatformShopService; -import com.shop.cereshop.business.utils.EncodeUtil; -import com.shop.cereshop.business.utils.TokenProvider; -import com.shop.cereshop.commons.constant.CoReturnFormat; -import com.shop.cereshop.commons.constant.IntegerEnum; -import com.shop.cereshop.commons.domain.business.CereBusinessShop; -import com.shop.cereshop.commons.domain.business.CereBusinessUserRole; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; -import com.shop.cereshop.commons.domain.common.Page; -import com.shop.cereshop.commons.domain.shop.CerePlatformShop; -import com.shop.cereshop.commons.domain.user.CerePrivacyVerifySetting; -import com.shop.cereshop.commons.exception.CoBusinessException; -import com.shop.cereshop.commons.utils.EmptyUtils; -import com.shop.cereshop.commons.utils.EncryptUtil; -import com.shop.cereshop.commons.utils.StringUtils; -import com.shop.cereshop.commons.utils.TimeUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Isolation; -import org.springframework.transaction.annotation.Propagation; -import org.springframework.transaction.annotation.Transactional; - -import java.util.List; -import java.util.Objects; -import java.util.stream.Collectors; - -@Service -public class CerePlatformBusinessServiceImpl implements CerePlatformBusinessService { - - @Autowired - private CerePlatformBusinessDAO cerePlatformBusinessDAO; - - @Autowired - private CerePlatformLogService cerePlatformLogService; - - @Autowired - private CereBusinessUserRoleService cereBusinessUserRoleService; - - @Autowired - private CereBusinessShopService cereBusinessShopService; - - @Autowired - private CerePlatformShopService cerePlatformShopService; - - @Autowired - private TokenProvider tokenProvider; - - @Autowired - private EncodeUtil encodeUtil; - - @Autowired - private CerePrivacyVerifySettingDAO cerePrivacyVerifySettingDAO; - - @Override - public PlatformBusiness findByUserName(String username) { - return cerePlatformBusinessDAO.findByUserName(username); - } - - @Override - public PlatformBusiness findByPhone(String phone) { - return cerePlatformBusinessDAO.findByPhone(phone); - } - - @Override - public PlatformBusiness findById(Long userId) { - return cerePlatformBusinessDAO.findById(userId); - } - - @Override - @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void forgetPassword(BusinessForgetParam user, CerePlatformBusiness cerePlatformBusiness) throws CoBusinessException { - String time= TimeUtils.yyMMddHHmmss(); - cerePlatformBusiness.setUpdateTime(time); - cerePlatformBusiness.setPassword(EncryptUtil.encrypt(user.getNewPassword())); - cerePlatformBusinessDAO.updateByPrimaryKeySelective(cerePlatformBusiness); - //新增日志 - cerePlatformLogService.addLog(cerePlatformBusiness,"商家用户管理","商户端操作","忘记密码",cerePlatformBusiness.getBusinessUserId(),time); - } - - @Override - public CerePlatformBusiness findByToken(String token) { - return cerePlatformBusinessDAO.findByToken(token); - } - - @Override - public void insert(CerePlatformBusiness cerePlatformBusiness) throws CoBusinessException { - cerePlatformBusinessDAO.insert(cerePlatformBusiness); - } - - @Override - public void updateToken(CerePlatformBusiness cerePlatformBusiness) throws CoBusinessException { - cerePlatformBusinessDAO.updateToken(cerePlatformBusiness); - } - - @Override - @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void save(BusinessSaveUser business, CerePlatformBusiness user) throws CoBusinessException { - String time =TimeUtils.yyMMddHHmmss(); - //校验账号是否已存在 - CerePlatformBusiness platformBusiness=cerePlatformBusinessDAO.checkUserName(business.getUsername(),null); - if(platformBusiness!=null){ - throw new CoBusinessException(CoReturnFormat.USER_AREADY_REGISTER); - } - //校验手机号是否已存在 - CerePlatformBusiness platformBusiness2=cerePlatformBusinessDAO.checkPhone(business.getPhone(),null); - if(platformBusiness2!=null){ - throw new CoBusinessException(CoReturnFormat.USER_AREADY_REGISTER); - } - //添加用户 - CerePlatformBusiness cerePlatformBusiness=new CerePlatformBusiness(); - cerePlatformBusiness.setCreateTime(time); - cerePlatformBusiness.setPassword(EncryptUtil.encrypt(business.getPassword())); - cerePlatformBusiness.setUsername(business.getUsername()); - cerePlatformBusiness.setName(business.getName()); - cerePlatformBusiness.setState(business.getState()); - cerePlatformBusiness.setEmail(business.getEmail()); - cerePlatformBusiness.setPhone(business.getPhone()); - cerePlatformBusiness.setSex(business.getSex()); - cerePlatformBusinessDAO.insert(cerePlatformBusiness); - //新增用户关联角色数据 - for (Long roleId:business.getRoleIds()) { - CereBusinessUserRole businessUserRole=new CereBusinessUserRole(); - businessUserRole.setBusinessUserId(cerePlatformBusiness.getBusinessUserId()); - businessUserRole.setRoleId(roleId); - cereBusinessUserRoleService.insert(businessUserRole); - } - //同步员工关联店铺数据 - CereBusinessShop cereBusinessShop=new CereBusinessShop(); - cereBusinessShop.setBusinessUserId(cerePlatformBusiness.getBusinessUserId()); - cereBusinessShop.setIfBinding(IntegerEnum.YES.getCode()); - cereBusinessShop.setShopId(business.getShopId()); - cereBusinessShopService.insert(cereBusinessShop); - //新增日志 - cerePlatformLogService.addLog(user,"商家用户管理","商户端操作","添加用户",cerePlatformBusiness.getBusinessUserId(),time); - } - - @Override - @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void update(BusinessUpdateUser business, CerePlatformBusiness user) throws CoBusinessException { - String time =TimeUtils.yyMMddHHmmss(); - //校验账号是否已存在 - CerePlatformBusiness platformBusiness=cerePlatformBusinessDAO.checkUserName(business.getUsername(),business.getBusinessUserId()); - if(platformBusiness!=null){ - throw new CoBusinessException(CoReturnFormat.USER_AREADY_REGISTER); - } - //校验手机号是否已存在 - CerePlatformBusiness platformBusiness2=cerePlatformBusinessDAO.checkPhone(business.getPhone(),business.getBusinessUserId()); - if(platformBusiness2!=null){ - throw new CoBusinessException(CoReturnFormat.USER_AREADY_REGISTER); - } - //修改用户 - CerePlatformBusiness cerePlatformBusiness=new CerePlatformBusiness(); - cerePlatformBusiness.setBusinessUserId(business.getBusinessUserId()); - cerePlatformBusiness.setUpdateTime(time); - cerePlatformBusiness.setPassword(EncryptUtil.encrypt(business.getPassword())); - cerePlatformBusiness.setUsername(business.getUsername()); - cerePlatformBusiness.setName(business.getName()); - cerePlatformBusiness.setState(business.getState()); - cerePlatformBusiness.setEmail(business.getEmail()); - cerePlatformBusiness.setPhone(business.getPhone()); - cerePlatformBusiness.setSex(business.getSex()); - cerePlatformBusinessDAO.updateByPrimaryKeySelective(cerePlatformBusiness); - //查询当前店铺绑定负责人用户id - Long userid=cereBusinessShopService.findByShopId(user.getShopId()); - if(business.getBusinessUserId().equals(userid)){ - //如果修改的是店铺负责人信息,需要同步更新店铺账号 - CerePlatformShop cerePlatformShop=cerePlatformShopService.selectByPrimaryKey(user.getShopId()); - if(cerePlatformShop!=null){ - cerePlatformShop.setShopPhone(business.getUsername()); - cerePlatformShop.setShopPassword(EncryptUtil.encrypt(business.getPassword())); - cerePlatformShop.setUpdateTime(time); - cerePlatformShopService.update(cerePlatformShop); - } - } - //清空用户关联角色数据 - cereBusinessUserRoleService.deleteByUserId(cerePlatformBusiness.getBusinessUserId()); - //新增用户关联角色数据 - for (Long roleId:business.getRoleIds()) { - CereBusinessUserRole businessUserRole=new CereBusinessUserRole(); - businessUserRole.setBusinessUserId(cerePlatformBusiness.getBusinessUserId()); - businessUserRole.setRoleId(roleId); - cereBusinessUserRoleService.insert(businessUserRole); - } - //新增日志 - cerePlatformLogService.addLog(user,"商家用户管理","商户端操作","修改用户",cerePlatformBusiness.getBusinessUserId(),time); - } - - @Override - public Business getById(Long businessUserId) throws CoBusinessException,Exception { - Business business = cerePlatformBusinessDAO.getById(businessUserId); - if(business!=null){ - //解密密码 - business.setPassword(EncryptUtil.decrypt(business.getPassword())); - //查询关联角色数据 - List list= cereBusinessUserRoleService.findRolesByUserId(businessUserId); - if(!EmptyUtils.isEmpty(list)){ - List ids = list.stream() - .map(PlatformUserRole::getRoleId).collect(Collectors.toList()); - business.setIds(ids); - } - business.setRoles(list); - } - return business; - } - - @Override - @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void delete(BusinessDeleteUser param, CerePlatformBusiness user) throws CoBusinessException { - //删除用户 - cerePlatformBusinessDAO.deleteByPrimaryKey(param.getBusinessUserId()); - //删除绑定店铺数据 - cereBusinessShopService.deleteByUserId(param.getBusinessUserId()); - //新增日志 - cerePlatformLogService.addLog(user,"商家用户管理","商户端操作","修改用户", - param.getBusinessUserId(),TimeUtils.yyMMddHHmmss()); - } - - @Override - public Page getAll(BusinessGetAllUser param) throws CoBusinessException { - PageHelper.startPage(param.getPage(),param.getPageSize()); - List list=cerePlatformBusinessDAO.getAll(param); - for (CerePlatformBusiness business:list) { - business.setEmail(encodeUtil.encodeInfo(business.getEmail())); - //手机号做脱敏处理 - if(business.getPhone()!=null){ - String phone = StringUtils.showStartAndEnd(business.getPhone(), 3, 4); - business.setPhone(phone); - } - } - PageInfo pageInfo=new PageInfo<>(list); - Page page=new Page(pageInfo.getList(),pageInfo.getTotal()); - return page; - } - - @Override - public CerePlatformBusiness checkUserName(String shopPhone, Long id) { - return cerePlatformBusinessDAO.checkUserName(shopPhone,id); - } - - @Override - public void updatePassword(BusinessForgetParam passwordParam, CerePlatformBusiness user) throws CoBusinessException { - if (user != null) { - Business business = cerePlatformBusinessDAO.getById(user.getBusinessUserId()); - if (business != null) { - String oldPassword = EncryptUtil.encrypt(passwordParam.getPassword()); - if (!Objects.equals(oldPassword, business.getPassword())) { - throw new CoBusinessException(CoReturnFormat.OLD_PASSWORD_ERROR); - } - String time=TimeUtils.yyMMddHHmmss(); - user.setUpdateTime(time); - user.setPassword(EncryptUtil.encrypt(passwordParam.getNewPassword())); - cerePlatformBusinessDAO.updateByPrimaryKeySelective(user); - //新增日志 - cerePlatformLogService.addLog(user,"商家管理","商户端操作","修改密码", - user.getBusinessUserId(),time); - } - } - } - - @Override - public void updateAvatar(CerePlatformBusiness user) { - if (user != null) { - CerePlatformBusiness business = new CerePlatformBusiness(); - business.setBusinessUserId(user.getBusinessUserId()); - business.setAvatar(user.getAvatar()); - String time=TimeUtils.yyMMddHHmmss(); - business.setUpdateTime(time); - cerePlatformBusinessDAO.updateByPrimaryKeySelective(business); - //新增日志 - cerePlatformLogService.addLog(user,"商家管理","商户端操作","修改头像", - user.getBusinessUserId(),time); - } - } - - @Override - public void updatePhone(UserUpdatePhoneParam param, CerePlatformBusiness user) throws CoBusinessException { - if (user != null) { - CerePrivacyVerifySetting setting = cerePrivacyVerifySettingDAO.selectByShopId(user.getShopId()); - if (setting != null && !setting.getPhone().equals(param.getNewPhone())) { - setting.setPhone(param.getNewPhone()); - cerePrivacyVerifySettingDAO.updateById(setting); - } - String time=TimeUtils.yyMMddHHmmss(); - //新增日志 - cerePlatformLogService.addLog(user,"商家管理","商户端操作","修改二次认证手机号", - user.getBusinessUserId(),time); - } - } - - @Override - public String findAdminPhone(Long shopId) { - String phone = cerePrivacyVerifySettingDAO.findVerifyPhone(shopId); - if (phone == null) { - CerePlatformShop shop = cerePlatformShopService.selectByPrimaryKey(shopId); - if (shop != null) { - phone = shop.getChargePersonPhone(); - CerePrivacyVerifySetting setting = new CerePrivacyVerifySetting(); - setting.setPhone(phone); - setting.setProject(shopId); - cerePrivacyVerifySettingDAO.insert(setting); - } - } - return phone; - } -} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/business/impl/CerePlatformBusinessUserServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/business/impl/CerePlatformBusinessUserServiceImpl.java new file mode 100644 index 0000000..ff15006 --- /dev/null +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/business/impl/CerePlatformBusinessUserServiceImpl.java @@ -0,0 +1,325 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.business.service.business.impl; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.shop.cereshop.business.dao.business.CerePlatformBusinessUserDAO; +import com.shop.cereshop.business.dao.user.CerePrivacyVerifySettingDAO; +import com.shop.cereshop.business.page.business.PlatformBusinessUser; +import com.shop.cereshop.business.page.role.PlatformUserRole; +import com.shop.cereshop.business.param.business.BusinessForgetParam; +import com.shop.cereshop.business.param.user.*; +import com.shop.cereshop.business.service.business.CereBusinessUserService; +import com.shop.cereshop.business.service.business.CereBusinessUserRoleService; +import com.shop.cereshop.business.service.business.CerePlatformBusinessUserService; +import com.shop.cereshop.business.service.log.CerePlatformLogService; +import com.shop.cereshop.business.service.shop.CerePlatformShopService; +import com.shop.cereshop.business.utils.EncodeUtil; +import com.shop.cereshop.business.utils.TokenProvider; +import com.shop.cereshop.commons.constant.CoReturnFormat; +import com.shop.cereshop.commons.constant.IntegerEnum; +import com.shop.cereshop.commons.domain.business.CereBusinessUser; +import com.shop.cereshop.commons.domain.business.CereBusinessUserRole; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; +import com.shop.cereshop.commons.domain.common.Page; +import com.shop.cereshop.commons.domain.shop.CerePlatformShop; +import com.shop.cereshop.commons.domain.user.CerePrivacyVerifySetting; +import com.shop.cereshop.commons.exception.CoBusinessException; +import com.shop.cereshop.commons.utils.EmptyUtils; +import com.shop.cereshop.commons.utils.EncryptUtil; +import com.shop.cereshop.commons.utils.StringUtils; +import com.shop.cereshop.commons.utils.TimeUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Isolation; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + +@Service +public class CerePlatformBusinessUserServiceImpl implements CerePlatformBusinessUserService { + + @Autowired + private CerePlatformBusinessUserDAO cerePlatformBusinessUserDAO; + + @Autowired + private CerePlatformLogService cerePlatformLogService; + + @Autowired + private CereBusinessUserRoleService cereBusinessUserRoleService; + + @Autowired + private CereBusinessUserService cereBusinessUserService; + + @Autowired + private CerePlatformShopService cerePlatformShopService; + + @Autowired + private TokenProvider tokenProvider; + + @Autowired + private EncodeUtil encodeUtil; + + @Autowired + private CerePrivacyVerifySettingDAO cerePrivacyVerifySettingDAO; + + @Override + public com.shop.cereshop.business.page.business.PlatformBusinessUser findByUserName(String username) { + return cerePlatformBusinessUserDAO.findByUserName(username); + } + + @Override + public com.shop.cereshop.business.page.business.PlatformBusinessUser findByPhone(String phone) { + return cerePlatformBusinessUserDAO.findByPhone(phone); + } + + @Override + public com.shop.cereshop.business.page.business.PlatformBusinessUser findById(Long userId) { + return cerePlatformBusinessUserDAO.findById(userId); + } + + @Override + @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) + public void forgetPassword(BusinessForgetParam user, CerePlatformBusinessUser cerePlatformBusinessUser) throws CoBusinessException { + String time= TimeUtils.yyMMddHHmmss(); + cerePlatformBusinessUser.setUpdateTime(time); + cerePlatformBusinessUser.setPassword(EncryptUtil.encrypt(user.getNewPassword())); + cerePlatformBusinessUserDAO.updateByPrimaryKeySelective(cerePlatformBusinessUser); + //新增日志 + cerePlatformLogService.addLog(cerePlatformBusinessUser,"商家用户管理","商户端操作","忘记密码", cerePlatformBusinessUser.getBusinessUserId(),time); + } + + @Override + public CerePlatformBusinessUser findByToken(String token) { + return cerePlatformBusinessUserDAO.findByToken(token); + } + + @Override + public void insert(CerePlatformBusinessUser cerePlatformBusinessUser) throws CoBusinessException { + cerePlatformBusinessUserDAO.insert(cerePlatformBusinessUser); + } + + @Override + public void updateToken(CerePlatformBusinessUser cerePlatformBusinessUser) throws CoBusinessException { + cerePlatformBusinessUserDAO.updateToken(cerePlatformBusinessUser); + } + + @Override + @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) + public void save(BusinessSaveUser business, CerePlatformBusinessUser user) throws CoBusinessException { + String time =TimeUtils.yyMMddHHmmss(); + //校验账号是否已存在 + CerePlatformBusinessUser platformBusinessUser= cerePlatformBusinessUserDAO.checkUserName(business.getUsername(),null); + if(platformBusinessUser!=null){ + throw new CoBusinessException(CoReturnFormat.USER_AREADY_REGISTER); + } + //校验手机号是否已存在 + CerePlatformBusinessUser platformBusinessUser2= cerePlatformBusinessUserDAO.checkPhone(business.getPhone(),null); + if(platformBusinessUser2!=null){ + throw new CoBusinessException(CoReturnFormat.USER_AREADY_REGISTER); + } + //添加用户 + CerePlatformBusinessUser cerePlatformBusinessUser =new CerePlatformBusinessUser(); + cerePlatformBusinessUser.setCreateTime(time); + cerePlatformBusinessUser.setPassword(EncryptUtil.encrypt(business.getPassword())); + cerePlatformBusinessUser.setUsername(business.getUsername()); + cerePlatformBusinessUser.setName(business.getName()); + cerePlatformBusinessUser.setState(business.getState()); + cerePlatformBusinessUser.setEmail(business.getEmail()); + cerePlatformBusinessUser.setPhone(business.getPhone()); + cerePlatformBusinessUser.setSex(business.getSex()); + cerePlatformBusinessUserDAO.insert(cerePlatformBusinessUser); + //新增用户关联角色数据 + for (Long roleId:business.getRoleIds()) { + CereBusinessUserRole businessUserRole=new CereBusinessUserRole(); + businessUserRole.setBusinessUserId(cerePlatformBusinessUser.getBusinessUserId()); + businessUserRole.setRoleId(roleId); + cereBusinessUserRoleService.insert(businessUserRole); + } + //同步员工关联店铺数据 + CereBusinessUser cereBusinessUser =new CereBusinessUser(); + cereBusinessUser.setBusinessUserId(cerePlatformBusinessUser.getBusinessUserId()); + cereBusinessUser.setIfBinding(IntegerEnum.YES.getCode()); + cereBusinessUser.setBusinessId(business.getBusinessId()); + cereBusinessUser.setIsMainUser(business.getIsMainUser()); + cereBusinessUserService.insert(cereBusinessUser); + //新增日志 + cerePlatformLogService.addLog(user,"商家用户管理","商户端操作","添加用户", cerePlatformBusinessUser.getBusinessUserId(),time); + } + + @Override + @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) + public void update(BusinessUpdateUser business, CerePlatformBusinessUser user) throws CoBusinessException { + String time =TimeUtils.yyMMddHHmmss(); + //校验账号是否已存在 + CerePlatformBusinessUser platformBusinessUser= cerePlatformBusinessUserDAO.checkUserName(business.getUsername(),business.getBusinessUserId()); + if(platformBusinessUser!=null){ + throw new CoBusinessException(CoReturnFormat.USER_AREADY_REGISTER); + } + //校验手机号是否已存在 + CerePlatformBusinessUser platformBusinessUser2= cerePlatformBusinessUserDAO.checkPhone(business.getPhone(),business.getBusinessUserId()); + if(platformBusinessUser2!=null){ + throw new CoBusinessException(CoReturnFormat.USER_AREADY_REGISTER); + } + //修改用户 + CerePlatformBusinessUser cerePlatformBusinessUser =new CerePlatformBusinessUser(); + cerePlatformBusinessUser.setBusinessUserId(business.getBusinessUserId()); + cerePlatformBusinessUser.setUpdateTime(time); + cerePlatformBusinessUser.setPassword(EncryptUtil.encrypt(business.getPassword())); + cerePlatformBusinessUser.setUsername(business.getUsername()); + cerePlatformBusinessUser.setName(business.getName()); + cerePlatformBusinessUser.setState(business.getState()); + cerePlatformBusinessUser.setEmail(business.getEmail()); + cerePlatformBusinessUser.setPhone(business.getPhone()); + cerePlatformBusinessUser.setSex(business.getSex()); + cerePlatformBusinessUserDAO.updateByPrimaryKeySelective(cerePlatformBusinessUser); + //查询当前店铺绑定负责人用户id +// Long userid= cereBusinessUserService.findMainUserByBusinessId(user.getBusinessId()); +// if(business.getBusinessUserId().equals(userid)){ +// //如果修改的是店铺负责人信息,需要同步更新店铺账号 +// CerePlatformShop cerePlatformShop=cerePlatformShopService.selectByPrimaryKey(user.getBusinessId()); +// if(cerePlatformShop!=null){ +// cerePlatformShop.setShopPhone(business.getUsername()); +// cerePlatformShop.setShopPassword(EncryptUtil.encrypt(business.getPassword())); +// cerePlatformShop.setUpdateTime(time); +// cerePlatformShopService.update(cerePlatformShop); +// } +// } + //清空用户关联角色数据 + cereBusinessUserRoleService.deleteByUserId(cerePlatformBusinessUser.getBusinessUserId()); + //新增用户关联角色数据 + for (Long roleId:business.getRoleIds()) { + CereBusinessUserRole businessUserRole=new CereBusinessUserRole(); + businessUserRole.setBusinessUserId(cerePlatformBusinessUser.getBusinessUserId()); + businessUserRole.setRoleId(roleId); + cereBusinessUserRoleService.insert(businessUserRole); + } + //新增日志 + cerePlatformLogService.addLog(user,"商家用户管理","商户端操作","修改用户", cerePlatformBusinessUser.getBusinessUserId(),time); + } + + @Override + public PlatformBusinessUser getById(Long businessUserId) throws CoBusinessException,Exception { + PlatformBusinessUser platformBusinessUser = cerePlatformBusinessUserDAO.getById(businessUserId); + if(platformBusinessUser !=null){ + //解密密码 + platformBusinessUser.setPassword(EncryptUtil.decrypt(platformBusinessUser.getPassword())); + //查询关联角色数据 + List list= cereBusinessUserRoleService.findRolesByUserId(businessUserId); + if(!EmptyUtils.isEmpty(list)){ + List ids = list.stream() + .map(PlatformUserRole::getRoleId).collect(Collectors.toList()); + platformBusinessUser.setIds(ids); + } + platformBusinessUser.setRoles(list); + } + return platformBusinessUser; + } + + @Override + @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) + public void delete(BusinessDeleteUser param, CerePlatformBusinessUser user) throws CoBusinessException { + //删除用户 + cerePlatformBusinessUserDAO.deleteByPrimaryKey(param.getBusinessUserId()); + //删除绑定店铺数据 + cereBusinessUserService.deleteByUserId(param.getBusinessUserId()); + //新增日志 + cerePlatformLogService.addLog(user,"商家用户管理","商户端操作","修改用户", + param.getBusinessUserId(),TimeUtils.yyMMddHHmmss()); + } + + @Override + public Page getAll(BusinessGetAllUser param) throws CoBusinessException { + PageHelper.startPage(param.getPage(),param.getPageSize()); + List list= cerePlatformBusinessUserDAO.getAll(param); + for (CerePlatformBusinessUser business:list) { + business.setEmail(encodeUtil.encodeInfo(business.getEmail())); + //手机号做脱敏处理 + if(business.getPhone()!=null){ + String phone = StringUtils.showStartAndEnd(business.getPhone(), 3, 4); + business.setPhone(phone); + } + } + PageInfo pageInfo=new PageInfo<>(list); + Page page=new Page(pageInfo.getList(),pageInfo.getTotal()); + return page; + } + + @Override + public CerePlatformBusinessUser checkUserName(String shopPhone, Long id) { + return cerePlatformBusinessUserDAO.checkUserName(shopPhone,id); + } + + @Override + public void updatePassword(BusinessForgetParam passwordParam, CerePlatformBusinessUser user) throws CoBusinessException { + if (user != null) { + PlatformBusinessUser platformBusinessUser = cerePlatformBusinessUserDAO.getById(user.getBusinessUserId()); + if (platformBusinessUser != null) { + String oldPassword = EncryptUtil.encrypt(passwordParam.getPassword()); + if (!Objects.equals(oldPassword, platformBusinessUser.getPassword())) { + throw new CoBusinessException(CoReturnFormat.OLD_PASSWORD_ERROR); + } + String time=TimeUtils.yyMMddHHmmss(); + user.setUpdateTime(time); + user.setPassword(EncryptUtil.encrypt(passwordParam.getNewPassword())); + cerePlatformBusinessUserDAO.updateByPrimaryKeySelective(user); + //新增日志 + cerePlatformLogService.addLog(user,"商家管理","商户端操作","修改密码", + user.getBusinessUserId(),time); + } + } + } + + @Override + public void updateAvatar(CerePlatformBusinessUser user) { + if (user != null) { + CerePlatformBusinessUser business = new CerePlatformBusinessUser(); + business.setBusinessUserId(user.getBusinessUserId()); + business.setAvatar(user.getAvatar()); + String time=TimeUtils.yyMMddHHmmss(); + business.setUpdateTime(time); + cerePlatformBusinessUserDAO.updateByPrimaryKeySelective(business); + //新增日志 + cerePlatformLogService.addLog(user,"商家管理","商户端操作","修改头像", + user.getBusinessUserId(),time); + } + } + + @Override + public void updatePhone(UserUpdatePhoneParam param, CerePlatformBusinessUser user) throws CoBusinessException { + if (user != null) { + CerePrivacyVerifySetting setting = cerePrivacyVerifySettingDAO.selectByShopId(user.getBusinessId()); + if (setting != null && !setting.getPhone().equals(param.getNewPhone())) { + setting.setPhone(param.getNewPhone()); + cerePrivacyVerifySettingDAO.updateById(setting); + } + String time=TimeUtils.yyMMddHHmmss(); + //新增日志 + cerePlatformLogService.addLog(user,"商家管理","商户端操作","修改二次认证手机号", + user.getBusinessUserId(),time); + } + } + + @Override + public String findAdminPhone(Long shopId) { + String phone = cerePrivacyVerifySettingDAO.findVerifyPhone(shopId); + if (phone == null) { + CerePlatformShop shop = cerePlatformShopService.selectByPrimaryKey(shopId); + if (shop != null) { + phone = shop.getChargePersonPhone(); + CerePrivacyVerifySetting setting = new CerePrivacyVerifySetting(); + setting.setPhone(phone); + setting.setProject(shopId); + cerePrivacyVerifySettingDAO.insert(setting); + } + } + return phone; + } +} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/buyer/CereBuyerUserService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/buyer/CereBuyerUserService.java index 54e1c0d..36c4acf 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/buyer/CereBuyerUserService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/buyer/CereBuyerUserService.java @@ -10,7 +10,7 @@ import com.shop.cereshop.business.page.buyer.BuyerUserDetail; import com.shop.cereshop.business.param.buyer.BuyerUserGetAllParam; import com.shop.cereshop.business.param.buyer.UserSaveParam; import com.shop.cereshop.business.param.buyer.UserUpdateParam; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.buyer.CereBuyerUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.exception.CoBusinessException; @@ -20,9 +20,9 @@ import java.util.List; public interface CereBuyerUserService { Page getAll(BuyerUserGetAllParam param) throws CoBusinessException; - void save(UserSaveParam param, CerePlatformBusiness user) throws CoBusinessException; + void save(UserSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException; - void update(UserUpdateParam param, CerePlatformBusiness user) throws CoBusinessException; + void update(UserUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException; BuyerUserDetail getById(Long shopId, Long buyerUserId) throws CoBusinessException; diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/buyer/impl/CereBuyerUserServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/buyer/impl/CereBuyerUserServiceImpl.java index 740dbe6..afe2892 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/buyer/impl/CereBuyerUserServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/buyer/impl/CereBuyerUserServiceImpl.java @@ -21,7 +21,7 @@ import com.shop.cereshop.business.utils.EncodeUtil; import com.shop.cereshop.commons.constant.CoReturnFormat; import com.shop.cereshop.commons.constant.IntegerEnum; import com.shop.cereshop.commons.domain.business.CereBusinessBuyerUser; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.business.CereShopIdBuyerUserIdTimeDTO; import com.shop.cereshop.commons.domain.buyer.CereBuyerUser; import com.shop.cereshop.commons.domain.common.Page; @@ -93,7 +93,7 @@ public class CereBuyerUserServiceImpl implements CereBuyerUserService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void save(UserSaveParam param, CerePlatformBusiness user) throws CoBusinessException { + public void save(UserSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time = TimeUtils.yyMMddHHmmss(); //校验手机号是否存在 CereBuyerUser cereBuyerUser=cereBuyerUserDAO.checkPhone(param.getPhone()); @@ -118,7 +118,7 @@ public class CereBuyerUserServiceImpl implements CereBuyerUserService { //添加商家客户数据 CereBusinessBuyerUser bbu = new CereBusinessBuyerUser(); - bbu.setShopId(user.getShopId()); + bbu.setShopId(user.getBusinessId()); bbu.setBuyerUserId(buyerUserId); bbu.setCreateTime(time); cereBusinessBuyerUserDAO.insertOrUpdate(bbu); @@ -141,7 +141,7 @@ public class CereBuyerUserServiceImpl implements CereBuyerUserService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void update(UserUpdateParam param, CerePlatformBusiness user) throws CoBusinessException { + public void update(UserUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time = TimeUtils.yyMMddHHmmss(); CereBuyerUser cereBuyerUser=new CereBuyerUser(); cereBuyerUser.setBuyerUserId(param.getBuyerUserId()); diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/canvas/CerePlatformCanvasService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/canvas/CerePlatformCanvasService.java index 6f3ff47..f6585d5 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/canvas/CerePlatformCanvasService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/canvas/CerePlatformCanvasService.java @@ -5,13 +5,12 @@ */ package com.shop.cereshop.business.service.canvas; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.canvas.CerePlatformCanvas; -import com.shop.cereshop.commons.domain.user.CerePlatformUser; import com.shop.cereshop.commons.exception.CoBusinessException; public interface CerePlatformCanvasService { - void saveCanvas(CerePlatformCanvas canvas, CerePlatformBusiness user) throws CoBusinessException; + void saveCanvas(CerePlatformCanvas canvas, CerePlatformBusinessUser user) throws CoBusinessException; CerePlatformCanvas getCanvas(CerePlatformCanvas canvas) throws CoBusinessException; } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/canvas/impl/CerePlatformCanvasServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/canvas/impl/CerePlatformCanvasServiceImpl.java index 7e0421f..738b8b7 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/canvas/impl/CerePlatformCanvasServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/canvas/impl/CerePlatformCanvasServiceImpl.java @@ -9,10 +9,8 @@ import com.shop.cereshop.business.dao.canvas.CerePlatformCanvasDAO; import com.shop.cereshop.business.service.canvas.CerePlatformCanvasService; import com.shop.cereshop.business.service.log.CerePlatformLogService; import com.shop.cereshop.commons.constant.CoReturnFormat; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.canvas.CerePlatformCanvas; -import com.shop.cereshop.commons.domain.log.CerePlatformLog; -import com.shop.cereshop.commons.domain.user.CerePlatformUser; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.utils.EmptyUtils; import com.shop.cereshop.commons.utils.TimeUtils; @@ -33,7 +31,7 @@ public class CerePlatformCanvasServiceImpl implements CerePlatformCanvasService @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void saveCanvas(CerePlatformCanvas canvas, CerePlatformBusiness user) throws CoBusinessException { + public void saveCanvas(CerePlatformCanvas canvas, CerePlatformBusinessUser user) throws CoBusinessException { String describe=""; String time= TimeUtils.yyMMddHHmmss(); if(!EmptyUtils.isEmpty(canvas.getCanvasId())){ diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/common/CommonService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/common/CommonService.java index 641cc00..8f7becf 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/common/CommonService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/common/CommonService.java @@ -25,6 +25,8 @@ public interface CommonService { */ String getShopCode(); + String getBusinessCode(); + List findPlatformCoupon(); List findPlatformSeckill(); diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/common/impl/CommonServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/common/impl/CommonServiceImpl.java index c0154b0..5501972 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/common/impl/CommonServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/common/impl/CommonServiceImpl.java @@ -68,6 +68,11 @@ public class CommonServiceImpl implements CommonService { } @Override + public String getBusinessCode() { + return "BJ"+ RandomStringUtil.getRandomCode(8,0); + } + + @Override public List findPlatformCoupon() { return cerePlatformActivityService.findPlatformCoupon(); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/compose/CereShopComposeService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/compose/CereShopComposeService.java index 8ded718..a531c8c 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/compose/CereShopComposeService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/compose/CereShopComposeService.java @@ -8,19 +8,19 @@ package com.shop.cereshop.business.service.compose; import com.shop.cereshop.business.page.compose.ShopComposeDetail; import com.shop.cereshop.business.param.compose.*; import com.shop.cereshop.business.param.product.ProductGetAllParam; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.tool.CereShopCompose; import com.shop.cereshop.commons.exception.CoBusinessException; public interface CereShopComposeService { - void save(ComposeSaveParam param, CerePlatformBusiness user) throws CoBusinessException,Exception; + void save(ComposeSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception; - void update(ComposeUpdateParam param, CerePlatformBusiness user) throws CoBusinessException,Exception; + void update(ComposeUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception; - void delete(ComposeGetByIdParam param, CerePlatformBusiness user) throws CoBusinessException; + void delete(ComposeGetByIdParam param, CerePlatformBusinessUser user) throws CoBusinessException; - void start(ComposeStartParam param, CerePlatformBusiness user) throws CoBusinessException; + void start(ComposeStartParam param, CerePlatformBusinessUser user) throws CoBusinessException; ShopComposeDetail getById(Long composeId) throws CoBusinessException; diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/compose/impl/CereShopComposeServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/compose/impl/CereShopComposeServiceImpl.java index 4ca25e2..84360ec 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/compose/impl/CereShopComposeServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/compose/impl/CereShopComposeServiceImpl.java @@ -5,11 +5,9 @@ */ package com.shop.cereshop.business.service.compose.impl; -import cn.hutool.extra.emoji.EmojiUtil; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.shop.cereshop.business.dao.compose.CereShopComposeDAO; -import com.shop.cereshop.business.page.compose.ComposeProduct; import com.shop.cereshop.business.page.compose.ShopCompose; import com.shop.cereshop.business.page.compose.ShopComposeDetail; import com.shop.cereshop.business.page.product.ShopProduct; @@ -29,7 +27,7 @@ import com.shop.cereshop.business.service.tool.CereShopSeckillService; import com.shop.cereshop.commons.constant.CoReturnFormat; import com.shop.cereshop.commons.constant.IntegerEnum; import com.shop.cereshop.commons.constant.StringEnum; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.product.CereProductMember; import com.shop.cereshop.commons.domain.tool.CereComposeProduct; @@ -87,7 +85,7 @@ public class CereShopComposeServiceImpl implements CereShopComposeService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void save(ComposeSaveParam param, CerePlatformBusiness user) throws CoBusinessException, Exception { + public void save(ComposeSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException, Exception { //校验组合名称 CereShopCompose compose=cereShopComposeDAO.checkName(param.getComposeName(),null); if(compose!=null){ @@ -196,7 +194,7 @@ public class CereShopComposeServiceImpl implements CereShopComposeService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void update(ComposeUpdateParam param, CerePlatformBusiness user) throws CoBusinessException, Exception { + public void update(ComposeUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException, Exception { //校验组合名称 CereShopCompose compose=cereShopComposeDAO.checkName(param.getComposeName(),param.getComposeId()); if(compose!=null){ @@ -295,7 +293,7 @@ public class CereShopComposeServiceImpl implements CereShopComposeService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void delete(ComposeGetByIdParam param, CerePlatformBusiness user) throws CoBusinessException { + public void delete(ComposeGetByIdParam param, CerePlatformBusinessUser user) throws CoBusinessException { //清空延时任务 stringRedisService.delete(StringEnum.COMPOSE_START.getCode()+"-"+param.getComposeId()); cereRedisKeyServcice.deleteByKey(StringEnum.COMPOSE_START.getCode()+"-"+param.getComposeId()); @@ -311,7 +309,7 @@ public class CereShopComposeServiceImpl implements CereShopComposeService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void start(ComposeStartParam param, CerePlatformBusiness user) throws CoBusinessException { + public void start(ComposeStartParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time = TimeUtils.yyMMddHHmmss(); CereShopCompose cereShopCompose=new CereShopCompose(); cereShopCompose.setComposeId(param.getComposeId()); @@ -365,6 +363,10 @@ public class CereShopComposeServiceImpl implements CereShopComposeService { Map minMap=new HashMap<>(); //定义最高会员价map Map maxMap=new HashMap<>(); + + PageHelper.startPage(param.getPage(),param.getPageSize()); + List list=cereShopComposeDAO.selectProduct(param); + //查询所有商品会员价格最低值数据 List minMembers=cereProductMemberService.findAllMin(); if(!EmptyUtils.isEmpty(minMembers)){ @@ -375,8 +377,7 @@ public class CereShopComposeServiceImpl implements CereShopComposeService { if(!EmptyUtils.isEmpty(maxMembers)){ maxMap=maxMembers.stream().collect(Collectors.toMap(CereProductMember::getProductId,CereProductMember::getPrice)); } - PageHelper.startPage(param.getPage(),param.getPageSize()); - List list=cereShopComposeDAO.selectProduct(param); + if(!EmptyUtils.isEmpty(list)){ Map finalMinMap = minMap; Map finalMaxMap = maxMap; diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/distributor/CereDistributionOrderService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/distributor/CereDistributionOrderService.java index 070ace5..9e5f739 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/distributor/CereDistributionOrderService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/distributor/CereDistributionOrderService.java @@ -10,13 +10,13 @@ import com.shop.cereshop.business.page.distribution.AchievementDetai; import com.shop.cereshop.business.param.distributor.DistributorGetAllAchievementParam; import com.shop.cereshop.business.param.distributorOrder.OrderGetAllParam; import com.shop.cereshop.business.param.distributorOrder.OrderSettlementParam; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.exception.CoBusinessException; public interface CereDistributionOrderService { Page getAll(OrderGetAllParam param) throws CoBusinessException; - void settlement(OrderSettlementParam param, CerePlatformBusiness user) throws CoBusinessException; + void settlement(OrderSettlementParam param, CerePlatformBusinessUser user) throws CoBusinessException; Page getAllAchievement(DistributorGetAllAchievementParam param) throws CoBusinessException; diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/distributor/CereDistributorBuyerService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/distributor/CereDistributorBuyerService.java index 1f97808..38185dd 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/distributor/CereDistributorBuyerService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/distributor/CereDistributorBuyerService.java @@ -8,14 +8,13 @@ package com.shop.cereshop.business.service.distributor; import com.shop.cereshop.business.param.ship.ShipBindParam; import com.shop.cereshop.business.param.ship.ShipDeleteParam; import com.shop.cereshop.business.param.ship.ShipRelieveParam; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; -import com.shop.cereshop.commons.domain.distributor.CereDistributorBuyer; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.exception.CoBusinessException; public interface CereDistributorBuyerService { - void bind(ShipBindParam buyer, CerePlatformBusiness user) throws CoBusinessException,Exception; + void bind(ShipBindParam buyer, CerePlatformBusinessUser user) throws CoBusinessException,Exception; - void relieveBind(ShipRelieveParam buyer, CerePlatformBusiness user) throws CoBusinessException; + void relieveBind(ShipRelieveParam buyer, CerePlatformBusinessUser user) throws CoBusinessException; - void delete(ShipDeleteParam buyer, CerePlatformBusiness user) throws CoBusinessException; + void delete(ShipDeleteParam buyer, CerePlatformBusinessUser user) throws CoBusinessException; } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/distributor/CereShopDistributionLevelService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/distributor/CereShopDistributionLevelService.java index b547f7d..404e349 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/distributor/CereShopDistributionLevelService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/distributor/CereShopDistributionLevelService.java @@ -10,7 +10,7 @@ import com.shop.cereshop.business.param.level.LevelDeleteParam; import com.shop.cereshop.business.param.level.LevelSaveParam; import com.shop.cereshop.business.param.level.LevelStateParam; import com.shop.cereshop.business.param.level.LevelUpdateParam; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.distributor.CereShopDistributionLevel; import com.shop.cereshop.commons.exception.CoBusinessException; @@ -19,15 +19,15 @@ import java.util.List; public interface CereShopDistributionLevelService { List getAllLevel(Long shopId) throws CoBusinessException; - void save(LevelSaveParam param, CerePlatformBusiness user) throws CoBusinessException; + void save(LevelSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException; - void update(LevelUpdateParam param, CerePlatformBusiness user) throws CoBusinessException; + void update(LevelUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException; - void delete(LevelDeleteParam param, CerePlatformBusiness user) throws CoBusinessException; + void delete(LevelDeleteParam param, CerePlatformBusinessUser user) throws CoBusinessException; DistributoLevel getById(Long distributorLevelId) throws CoBusinessException; List getAll(Long shopId) throws CoBusinessException; - void updateSelf(LevelStateParam param, CerePlatformBusiness user) throws CoBusinessException; + void updateSelf(LevelStateParam param, CerePlatformBusinessUser user) throws CoBusinessException; } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/distributor/CereShopDistributorService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/distributor/CereShopDistributorService.java index 9a32035..3479469 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/distributor/CereShopDistributorService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/distributor/CereShopDistributorService.java @@ -8,7 +8,7 @@ package com.shop.cereshop.business.service.distributor; import com.shop.cereshop.business.page.distribution.ShopDistributor; import com.shop.cereshop.business.param.shop.ShopParam; import com.shop.cereshop.business.param.shopDistributor.*; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.distributor.CereShopDistributor; import com.shop.cereshop.commons.exception.CoBusinessException; @@ -16,11 +16,11 @@ import com.shop.cereshop.commons.exception.CoBusinessException; import java.util.List; public interface CereShopDistributorService { - void save(ShopDistributorSaveParam param, CerePlatformBusiness user) throws CoBusinessException; + void save(ShopDistributorSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException; - void update(ShopDistributorUpdateParam param, CerePlatformBusiness user) throws CoBusinessException; + void update(ShopDistributorUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException; - void delete(ShopDistributorDeleteParam param, CerePlatformBusiness user) throws CoBusinessException; + void delete(ShopDistributorDeleteParam param, CerePlatformBusinessUser user) throws CoBusinessException; Page getAll(ShopDistributorGetAllParam param) throws CoBusinessException; @@ -28,7 +28,7 @@ public interface CereShopDistributorService { Page getStayExamineAll(ShopDistributorGetStayParam param) throws CoBusinessException; - void handle(ShopDistributorHandleParam param, CerePlatformBusiness user) throws CoBusinessException; + void handle(ShopDistributorHandleParam param, CerePlatformBusinessUser user) throws CoBusinessException; ShopDistributor getById(Long distributorId) throws CoBusinessException; diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/distributor/impl/CereDistributionOrderServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/distributor/impl/CereDistributionOrderServiceImpl.java index 3817865..5267a3c 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/distributor/impl/CereDistributionOrderServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/distributor/impl/CereDistributionOrderServiceImpl.java @@ -18,7 +18,7 @@ import com.shop.cereshop.business.service.distributor.CereDistributionOrderServi import com.shop.cereshop.business.service.log.CerePlatformLogService; import com.shop.cereshop.business.utils.EncodeUtil; import com.shop.cereshop.commons.constant.IntegerEnum; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.distributor.CereDistributionOrder; import com.shop.cereshop.commons.exception.CoBusinessException; @@ -79,7 +79,7 @@ public class CereDistributionOrderServiceImpl implements CereDistributionOrderSe @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void settlement(OrderSettlementParam param, CerePlatformBusiness user) throws CoBusinessException { + public void settlement(OrderSettlementParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time = TimeUtils.yyMMddHHmmss(); //批量更新分销员订单结算状态 if(!EmptyUtils.isEmpty(param.getIds())){ diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/distributor/impl/CereDistributorBuyerServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/distributor/impl/CereDistributorBuyerServiceImpl.java index c6d8d4c..1bdca31 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/distributor/impl/CereDistributorBuyerServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/distributor/impl/CereDistributorBuyerServiceImpl.java @@ -17,7 +17,7 @@ import com.shop.cereshop.business.service.shop.CereShopRelationshipService; import com.shop.cereshop.commons.constant.CoReturnFormat; import com.shop.cereshop.commons.constant.IntegerEnum; import com.shop.cereshop.commons.constant.StringEnum; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.distributor.CereDistributorBuyer; import com.shop.cereshop.commons.domain.distributor.CereShopDistributor; import com.shop.cereshop.commons.domain.shop.CereShopRelationship; @@ -50,7 +50,7 @@ public class CereDistributorBuyerServiceImpl implements CereDistributorBuyerServ @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void bind(ShipBindParam param, CerePlatformBusiness user) throws CoBusinessException,Exception { + public void bind(ShipBindParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception { String time= TimeUtils.yyMMddHHmmss(); //查询店铺关系设置 CereShopRelationship relationship=cereShopRelationshipService.getById(param.getShopId()); @@ -132,7 +132,7 @@ public class CereDistributorBuyerServiceImpl implements CereDistributorBuyerServ @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void relieveBind(ShipRelieveParam param, CerePlatformBusiness user) throws CoBusinessException { + public void relieveBind(ShipRelieveParam param, CerePlatformBusinessUser user) throws CoBusinessException { CereDistributorBuyer buyer=new CereDistributorBuyer(); buyer.setBuyerUserId(param.getBuyerUserId()); buyer.setShopId(param.getShopId()); @@ -145,7 +145,7 @@ public class CereDistributorBuyerServiceImpl implements CereDistributorBuyerServ @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void delete(ShipDeleteParam param, CerePlatformBusiness user) throws CoBusinessException { + public void delete(ShipDeleteParam param, CerePlatformBusinessUser user) throws CoBusinessException { if(!EmptyUtils.isEmpty(param.getDistributorId())){ CereDistributorBuyer buyer=new CereDistributorBuyer(); buyer.setBuyerUserId(param.getBuyerUserId()); diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/distributor/impl/CereShopDistributionLevelServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/distributor/impl/CereShopDistributionLevelServiceImpl.java index 3444bf4..14d8347 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/distributor/impl/CereShopDistributionLevelServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/distributor/impl/CereShopDistributionLevelServiceImpl.java @@ -15,7 +15,7 @@ import com.shop.cereshop.business.service.distributor.CereShopDistributionLevelS import com.shop.cereshop.business.service.log.CerePlatformLogService; import com.shop.cereshop.commons.constant.CoReturnFormat; import com.shop.cereshop.commons.constant.IntegerEnum; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.distributor.CereShopDistributionLevel; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.utils.TimeUtils; @@ -44,7 +44,7 @@ public class CereShopDistributionLevelServiceImpl implements CereShopDistributio @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void save(LevelSaveParam param, CerePlatformBusiness user) throws CoBusinessException { + public void save(LevelSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException { //添加分销员等级 String time = TimeUtils.yyMMddHHmmss(); CereShopDistributionLevel level=new CereShopDistributionLevel(); @@ -71,7 +71,7 @@ public class CereShopDistributionLevelServiceImpl implements CereShopDistributio @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void update(LevelUpdateParam param, CerePlatformBusiness user) throws CoBusinessException { + public void update(LevelUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException { //修改分销员等级 String time = TimeUtils.yyMMddHHmmss(); CereShopDistributionLevel level=new CereShopDistributionLevel(); @@ -135,7 +135,7 @@ public class CereShopDistributionLevelServiceImpl implements CereShopDistributio @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void delete(LevelDeleteParam param, CerePlatformBusiness user) throws CoBusinessException { + public void delete(LevelDeleteParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time = TimeUtils.yyMMddHHmmss(); CereShopDistributionLevel level=new CereShopDistributionLevel(); level.setDistributorLevelId(param.getDistributorLevelId()); @@ -171,7 +171,7 @@ public class CereShopDistributionLevelServiceImpl implements CereShopDistributio @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void updateSelf(LevelStateParam param, CerePlatformBusiness user) throws CoBusinessException { + public void updateSelf(LevelStateParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time=TimeUtils.yyMMddHHmmss(); String describe=""; if(IntegerEnum.YES.getCode().equals(param.getIfSelf())){ @@ -179,7 +179,7 @@ public class CereShopDistributionLevelServiceImpl implements CereShopDistributio }else { describe="关闭自购分佣"; } - cereShopDistributionLevelDAO.updateIfSelf(user.getShopId(), param.getIfSelf(),time); + cereShopDistributionLevelDAO.updateIfSelf(user.getBusinessId(), param.getIfSelf(),time); //新增日志 cerePlatformLogService.addLog(user,"分销员等级管理","商户端操作",describe,null,time); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/distributor/impl/CereShopDistributorServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/distributor/impl/CereShopDistributorServiceImpl.java index 564ff69..1176e4e 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/distributor/impl/CereShopDistributorServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/distributor/impl/CereShopDistributorServiceImpl.java @@ -16,7 +16,7 @@ import com.shop.cereshop.business.service.log.CerePlatformLogService; import com.shop.cereshop.business.utils.EncodeUtil; import com.shop.cereshop.commons.constant.CoReturnFormat; import com.shop.cereshop.commons.constant.IntegerEnum; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.buyer.CereBuyerUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.distributor.CereShopDistributor; @@ -47,7 +47,7 @@ public class CereShopDistributorServiceImpl implements CereShopDistributorServic @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void save(ShopDistributorSaveParam param, CerePlatformBusiness user) throws CoBusinessException { + public void save(ShopDistributorSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time= TimeUtils.yyMMddHHmmss(); //校验分销员手机号是否已添加 CereShopDistributor cereShopDistributor=cereShopDistributorDAO.checkPhone(param.getDistributorPhone(),null,param.getShopId()); @@ -96,7 +96,7 @@ public class CereShopDistributorServiceImpl implements CereShopDistributorServic @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void update(ShopDistributorUpdateParam param, CerePlatformBusiness user) throws CoBusinessException { + public void update(ShopDistributorUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time= TimeUtils.yyMMddHHmmss(); //编辑分销员 CereShopDistributor cereShopDistributor=cereShopDistributorDAO.checkPhone(param.getDistributorPhone(), @@ -133,7 +133,7 @@ public class CereShopDistributorServiceImpl implements CereShopDistributorServic @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void delete(ShopDistributorDeleteParam param, CerePlatformBusiness user) throws CoBusinessException { + public void delete(ShopDistributorDeleteParam param, CerePlatformBusinessUser user) throws CoBusinessException { //修改分销员清退状态 String time=TimeUtils.yyMMddHHmmss(); CereShopDistributor cereShopDistributor=new CereShopDistributor(); @@ -205,7 +205,7 @@ public class CereShopDistributorServiceImpl implements CereShopDistributorServic @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void handle(ShopDistributorHandleParam param, CerePlatformBusiness user) throws CoBusinessException { + public void handle(ShopDistributorHandleParam param, CerePlatformBusinessUser user) throws CoBusinessException { //修改审核状态 String time=TimeUtils.yyMMddHHmmss(); //查询分销员数据 diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/init/InitPermissionService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/init/InitPermissionService.java deleted file mode 100644 index 5d2a463..0000000 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/init/InitPermissionService.java +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Copyright (C) 2017-2021 - * All rights reserved, Designed By 深圳中科鑫智科技有限公司 - * Copyright authorization contact 18814114118 - */ -package com.shop.cereshop.business.service.init; - -import com.shop.cereshop.commons.exception.CoBusinessException; - -public interface InitPermissionService { - void initPermission() throws CoBusinessException; -} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/init/impl/InitPermissionServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/init/impl/InitPermissionServiceImpl.java deleted file mode 100644 index 0012fab..0000000 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/init/impl/InitPermissionServiceImpl.java +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Copyright (C) 2017-2021 - * All rights reserved, Designed By 深圳中科鑫智科技有限公司 - * Copyright authorization contact 18814114118 - */ -package com.shop.cereshop.business.service.init.impl; - -import com.shop.cereshop.business.service.init.InitPermissionService; -import com.shop.cereshop.business.service.permission.CerePlatformPermissionService; -import com.shop.cereshop.business.service.role.CerePlatformRolePermissionService; -import com.shop.cereshop.business.service.shop.CerePlatformShopService; -import com.shop.cereshop.commons.domain.business.CereBusinessShop; -import com.shop.cereshop.commons.domain.permission.CerePlatformPermission; -import com.shop.cereshop.commons.domain.role.CerePlatformRolePermission; -import com.shop.cereshop.commons.exception.CoBusinessException; -import com.shop.cereshop.commons.utils.EmptyUtils; -import com.shop.cereshop.commons.utils.TimeUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Isolation; -import org.springframework.transaction.annotation.Propagation; -import org.springframework.transaction.annotation.Transactional; - -import java.util.ArrayList; -import java.util.List; - -@Service -public class InitPermissionServiceImpl implements InitPermissionService { - - @Autowired - private CerePlatformPermissionService cerePlatformPermissionService; - - @Autowired - private CerePlatformShopService cerePlatformShopService; - - @Autowired - private CerePlatformRolePermissionService cerePlatformRolePermissionService; - - @Override - @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void initPermission() throws CoBusinessException { - String time = TimeUtils.yyMMddHHmmss(); - //查询当前最大排序值 - int sort=cerePlatformPermissionService.findMaxSort(); - //查询所有店铺id数据 - List ids=cerePlatformShopService.findIds(); - if(!EmptyUtils.isEmpty(ids)){ - for (CereBusinessShop businessShop : ids) { - //根据店铺id查询店铺角色id - Long roleId=cerePlatformShopService.findShopRoleId(businessShop.getShopId()); - if(!EmptyUtils.isEmpty(roleId)){ - //校验是否已存在营销活动菜单 - Long permissionId=cerePlatformRolePermissionService.check(roleId); - if(!EmptyUtils.isLongEmpty(permissionId)){ - continue; - } - List list=new ArrayList<>(); - //封装营销活动菜单数据 - CerePlatformPermission permission1=new CerePlatformPermission(); - permission1.setPermissionPid(0l); - permission1.setPermissionName("营销活动"); - permission1.setPermission("/marketing"); - permission1.setIcon("el-icon-stopwatch"); - permission1.setResourceType("catalog"); - permission1.setProject(businessShop.getShopId()); - permission1.setSort(++sort); - permission1.setCreateTime(time); - cerePlatformPermissionService.insert(permission1); - //封装用户关联角色表数据 - CerePlatformRolePermission cereBusinessUserRole1=new CerePlatformRolePermission(); - cereBusinessUserRole1.setRoleId(roleId); - cereBusinessUserRole1.setPermissionId(permission1.getPermissionId()); - list.add(cereBusinessUserRole1); - //封装优惠券管理菜单数据 - CerePlatformPermission permission2=new CerePlatformPermission(); - permission2.setPermissionPid(permission1.getPermissionId()); - permission2.setPermissionName("优惠券管理"); - permission2.setPermission("/marketing/coupon"); - permission2.setIcon("el-icon-s-goods"); - permission2.setResourceType("menu"); - permission2.setProject(businessShop.getShopId()); - permission2.setSort(++sort); - permission2.setCreateTime(time); - cerePlatformPermissionService.insert(permission2); - //封装用户关联角色表数据 - CerePlatformRolePermission cereBusinessUserRole2=new CerePlatformRolePermission(); - cereBusinessUserRole2.setRoleId(roleId); - cereBusinessUserRole2.setPermissionId(permission2.getPermissionId()); - list.add(cereBusinessUserRole2); - //封装拼团菜单数据 - CerePlatformPermission permission3=new CerePlatformPermission(); - permission3.setPermissionPid(permission1.getPermissionId()); - permission3.setPermissionName("拼团"); - permission3.setPermission("/marketing/groupBuy"); - permission3.setIcon("el-icon-suitcase-1"); - permission3.setResourceType("menu"); - permission3.setProject(businessShop.getShopId()); - permission3.setSort(++sort); - permission3.setCreateTime(time); - cerePlatformPermissionService.insert(permission3); - //封装用户关联角色表数据 - CerePlatformRolePermission cereBusinessUserRole3=new CerePlatformRolePermission(); - cereBusinessUserRole3.setRoleId(roleId); - cereBusinessUserRole3.setPermissionId(permission3.getPermissionId()); - list.add(cereBusinessUserRole3); - //封装秒杀菜单数据 - CerePlatformPermission permission4=new CerePlatformPermission(); - permission4.setPermissionPid(permission1.getPermissionId()); - permission4.setPermissionName("秒杀"); - permission4.setPermission("/marketing/spike"); - permission4.setIcon("el-icon-alarm-clock"); - permission4.setResourceType("menu"); - permission4.setProject(businessShop.getShopId()); - permission4.setSort(++sort); - permission4.setCreateTime(time); - cerePlatformPermissionService.insert(permission4); - //封装用户关联角色表数据 - CerePlatformRolePermission cereBusinessUserRole4=new CerePlatformRolePermission(); - cereBusinessUserRole4.setRoleId(roleId); - cereBusinessUserRole4.setPermissionId(permission4.getPermissionId()); - list.add(cereBusinessUserRole4); - //封装限时折扣菜单数据 - CerePlatformPermission permission5=new CerePlatformPermission(); - permission5.setPermissionPid(permission1.getPermissionId()); - permission5.setPermissionName("限时折扣"); - permission5.setPermission("/marketing/discount"); - permission5.setIcon("el-icon-alarm-clock"); - permission5.setResourceType("menu"); - permission5.setProject(businessShop.getShopId()); - permission5.setSort(++sort); - permission5.setCreateTime(time); - cerePlatformPermissionService.insert(permission5); - //封装用户关联角色表数据 - CerePlatformRolePermission cereBusinessUserRole5=new CerePlatformRolePermission(); - cereBusinessUserRole5.setRoleId(roleId); - cereBusinessUserRole5.setPermissionId(permission5.getPermissionId()); - list.add(cereBusinessUserRole5); - //封装客户管理菜单数据 - CerePlatformPermission permission6=new CerePlatformPermission(); - permission6.setPermissionPid(0l); - permission6.setPermissionName("客户管理"); - permission6.setPermission("/customer"); - permission6.setIcon("el-icon-user"); - permission6.setResourceType("catalog"); - permission6.setProject(businessShop.getShopId()); - permission6.setSort(++sort); - permission6.setCreateTime(time); - cerePlatformPermissionService.insert(permission6); - //封装用户关联角色表数据 - CerePlatformRolePermission cereBusinessUserRole6=new CerePlatformRolePermission(); - cereBusinessUserRole6.setRoleId(roleId); - cereBusinessUserRole6.setPermissionId(permission6.getPermissionId()); - list.add(cereBusinessUserRole6); - //封装客户列表菜单数据 - CerePlatformPermission permission7=new CerePlatformPermission(); - permission7.setPermissionPid(permission6.getPermissionId()); - permission7.setPermissionName("客户列表"); - permission7.setPermission("/customer/customerList"); - permission7.setIcon("el-icon-user"); - permission7.setResourceType("menu"); - permission7.setProject(businessShop.getShopId()); - permission7.setSort(++sort); - permission7.setCreateTime(time); - cerePlatformPermissionService.insert(permission7); - //封装用户关联角色表数据 - CerePlatformRolePermission cereBusinessUserRole7=new CerePlatformRolePermission(); - cereBusinessUserRole7.setRoleId(roleId); - cereBusinessUserRole7.setPermissionId(permission7.getPermissionId()); - list.add(cereBusinessUserRole6); - //封装标签列表菜单数据 - CerePlatformPermission permission8=new CerePlatformPermission(); - permission8.setPermissionPid(permission6.getPermissionId()); - permission8.setPermissionName("标签列表"); - permission8.setPermission("/customer/tagList"); - permission8.setIcon("el-icon-collection-tag"); - permission8.setResourceType("menu"); - permission8.setProject(businessShop.getShopId()); - permission8.setSort(++sort); - permission8.setCreateTime(time); - cerePlatformPermissionService.insert(permission8); - //封装用户关联角色表数据 - CerePlatformRolePermission cereBusinessUserRole8=new CerePlatformRolePermission(); - cereBusinessUserRole8.setRoleId(roleId); - cereBusinessUserRole8.setPermissionId(permission8.getPermissionId()); - list.add(cereBusinessUserRole8); - //封装客户分群菜单数据 - CerePlatformPermission permission9=new CerePlatformPermission(); - permission9.setPermissionPid(permission6.getPermissionId()); - permission9.setPermissionName("客户分群"); - permission9.setPermission("/customer/clusteringList"); - permission9.setIcon("el-icon-connection"); - permission9.setResourceType("menu"); - permission9.setProject(businessShop.getShopId()); - permission9.setSort(++sort); - permission9.setCreateTime(time); - cerePlatformPermissionService.insert(permission9); - //封装用户关联角色表数据 - CerePlatformRolePermission cereBusinessUserRole9=new CerePlatformRolePermission(); - cereBusinessUserRole9.setRoleId(roleId); - cereBusinessUserRole9.setPermissionId(permission9.getPermissionId()); - list.add(cereBusinessUserRole9); - //封装运营计划菜单数据 - CerePlatformPermission permission10=new CerePlatformPermission(); - permission10.setPermissionPid(permission6.getPermissionId()); - permission10.setPermissionName("运营计划"); - permission10.setPermission("/customer/operate"); - permission10.setIcon("el-icon-time"); - permission10.setResourceType("menu"); - permission10.setProject(businessShop.getShopId()); - permission10.setSort(++sort); - permission10.setCreateTime(time); - cerePlatformPermissionService.insert(permission10); - //封装用户关联角色表数据 - CerePlatformRolePermission cereBusinessUserRole10=new CerePlatformRolePermission(); - cereBusinessUserRole10.setRoleId(roleId); - cereBusinessUserRole10.setPermissionId(permission10.getPermissionId()); - list.add(cereBusinessUserRole10); - //插入关联数据 - cerePlatformRolePermissionService.insertBatch(list); - } - } - } - } -} diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/label/CereBuyerShopLabelService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/label/CereBuyerShopLabelService.java index 026d341..08d675a 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/label/CereBuyerShopLabelService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/label/CereBuyerShopLabelService.java @@ -6,14 +6,14 @@ package com.shop.cereshop.business.service.label; import com.shop.cereshop.business.param.buyer.BuyerUserSaveParam; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.label.CereBuyerShopLabel; import com.shop.cereshop.commons.exception.CoBusinessException; import java.util.List; public interface CereBuyerShopLabelService { - void saveLabel(BuyerUserSaveParam group, CerePlatformBusiness user) throws CoBusinessException; + void saveLabel(BuyerUserSaveParam group, CerePlatformBusinessUser user) throws CoBusinessException; void insertBatch(List collect) throws CoBusinessException; diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/label/CereLabelSourceService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/label/CereLabelSourceService.java index ae8811a..0536ad1 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/label/CereLabelSourceService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/label/CereLabelSourceService.java @@ -9,7 +9,7 @@ import com.shop.cereshop.business.page.shop.LabelSource; import com.shop.cereshop.business.param.label.LabelDeleteSourceParam; import com.shop.cereshop.business.param.label.LabelGetSourceParam; import com.shop.cereshop.business.param.label.LabelSaveSourceParam; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.label.CereLabelSource; import com.shop.cereshop.commons.exception.CoBusinessException; @@ -22,13 +22,13 @@ public interface CereLabelSourceService { void insertBatch(List list) throws CoBusinessException; - void saveSource(LabelSaveSourceParam param, CerePlatformBusiness user) throws CoBusinessException; + void saveSource(LabelSaveSourceParam param, CerePlatformBusinessUser user) throws CoBusinessException; List getAllByLabel(LabelGetSourceParam param) throws CoBusinessException; - void deleteSource(LabelDeleteSourceParam param, CerePlatformBusiness user) throws CoBusinessException; + void deleteSource(LabelDeleteSourceParam param, CerePlatformBusinessUser user) throws CoBusinessException; List findByLabelIdAndType(Long labelId,Integer labelType); - void updateSource(LabelSaveSourceParam param, CerePlatformBusiness user) throws CoBusinessException; + void updateSource(LabelSaveSourceParam param, CerePlatformBusinessUser user) throws CoBusinessException; } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/label/CereShopLabelService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/label/CereShopLabelService.java index 7970ddc..09b6cde 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/label/CereShopLabelService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/label/CereShopLabelService.java @@ -10,18 +10,18 @@ import com.shop.cereshop.business.param.label.LabelDeleteParam; import com.shop.cereshop.business.param.label.LabelGetAllParam; import com.shop.cereshop.business.param.label.LabelSaveParam; import com.shop.cereshop.business.param.label.LabelUpdateParam; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.label.CereShopLabel; import com.shop.cereshop.commons.exception.CoBusinessException; import java.util.List; public interface CereShopLabelService { - void save(LabelSaveParam param, CerePlatformBusiness user) throws CoBusinessException; + void save(LabelSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException; - void update(LabelUpdateParam label, CerePlatformBusiness user) throws CoBusinessException; + void update(LabelUpdateParam label, CerePlatformBusinessUser user) throws CoBusinessException; - void delete(LabelDeleteParam label, CerePlatformBusiness user) throws CoBusinessException; + void delete(LabelDeleteParam label, CerePlatformBusinessUser user) throws CoBusinessException; CereShopLabel getById(Long labelId) throws CoBusinessException; diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/label/CereShopUserLabelService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/label/CereShopUserLabelService.java index e526633..de451eb 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/label/CereShopUserLabelService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/label/CereShopUserLabelService.java @@ -6,7 +6,7 @@ package com.shop.cereshop.business.service.label; import com.shop.cereshop.business.param.label.UserLabelGetAllParam; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.label.CereShopUserLabel; import com.shop.cereshop.commons.exception.CoBusinessException; @@ -14,11 +14,11 @@ import com.shop.cereshop.commons.exception.CoBusinessException; import java.util.List; public interface CereShopUserLabelService { - void save(CereShopUserLabel label, CerePlatformBusiness user) throws CoBusinessException; + void save(CereShopUserLabel label, CerePlatformBusinessUser user) throws CoBusinessException; - void update(CereShopUserLabel label, CerePlatformBusiness user) throws CoBusinessException; + void update(CereShopUserLabel label, CerePlatformBusinessUser user) throws CoBusinessException; - void delete(List ids, CerePlatformBusiness user) throws CoBusinessException; + void delete(List ids, CerePlatformBusinessUser user) throws CoBusinessException; CereShopUserLabel getById(Long labelId) throws CoBusinessException; diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/label/impl/CereBuyerShopLabelServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/label/impl/CereBuyerShopLabelServiceImpl.java index 0d0f47b..e34d642 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/label/impl/CereBuyerShopLabelServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/label/impl/CereBuyerShopLabelServiceImpl.java @@ -9,7 +9,7 @@ import com.shop.cereshop.business.dao.label.CereBuyerShopLabelDAO; import com.shop.cereshop.business.param.buyer.BuyerUserSaveParam; import com.shop.cereshop.business.service.label.CereBuyerShopLabelService; import com.shop.cereshop.business.service.log.CerePlatformLogService; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.label.CereBuyerShopLabel; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.utils.EmptyUtils; @@ -33,7 +33,7 @@ public class CereBuyerShopLabelServiceImpl implements CereBuyerShopLabelService @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void saveLabel(BuyerUserSaveParam param, CerePlatformBusiness user) throws CoBusinessException { + public void saveLabel(BuyerUserSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time = TimeUtils.yyMMddHHmmss(); //清空标签 cereBuyerShopLabelDAO.deleteByBuyerUserId(param.getBuyerUserId()); diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/label/impl/CereLabelSourceServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/label/impl/CereLabelSourceServiceImpl.java index 4df695f..4f43957 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/label/impl/CereLabelSourceServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/label/impl/CereLabelSourceServiceImpl.java @@ -14,7 +14,7 @@ import com.shop.cereshop.business.service.label.CereLabelSourceService; import com.shop.cereshop.business.service.label.CereShopLabelService; import com.shop.cereshop.business.service.log.CerePlatformLogService; import com.shop.cereshop.commons.constant.IntegerEnum; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.label.CereLabelSource; import com.shop.cereshop.commons.domain.label.CereShopLabel; import com.shop.cereshop.commons.exception.CoBusinessException; @@ -58,7 +58,7 @@ public class CereLabelSourceServiceImpl implements CereLabelSourceService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void saveSource(LabelSaveSourceParam param, CerePlatformBusiness user) throws CoBusinessException { + public void saveSource(LabelSaveSourceParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time =TimeUtils.yyMMddHHmmss(); List list=new ArrayList<>(); if(!EmptyUtils.isEmpty(param.getImages())){ @@ -86,7 +86,7 @@ public class CereLabelSourceServiceImpl implements CereLabelSourceService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void deleteSource(LabelDeleteSourceParam param, CerePlatformBusiness user) throws CoBusinessException { + public void deleteSource(LabelDeleteSourceParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time= TimeUtils.yyMMddHHmmss(); //删除素材图片 cereLabelSourceDAO.deleteByImageAndLabelId(param.getLabelId(),param.getImage()); @@ -122,7 +122,7 @@ public class CereLabelSourceServiceImpl implements CereLabelSourceService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void updateSource(LabelSaveSourceParam param, CerePlatformBusiness user) throws CoBusinessException { + public void updateSource(LabelSaveSourceParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time= TimeUtils.yyMMddHHmmss(); //根据素材地址查询之前的数据 CereLabelSource labelSource=new CereLabelSource(); diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/label/impl/CereShopLabelServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/label/impl/CereShopLabelServiceImpl.java index a39bdce..fb9b321 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/label/impl/CereShopLabelServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/label/impl/CereShopLabelServiceImpl.java @@ -15,7 +15,7 @@ import com.shop.cereshop.business.service.label.CereLabelSourceService; import com.shop.cereshop.business.service.label.CereShopLabelService; import com.shop.cereshop.business.service.log.CerePlatformLogService; import com.shop.cereshop.commons.constant.IntegerEnum; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.label.CereLabelSource; import com.shop.cereshop.commons.domain.label.CereShopLabel; import com.shop.cereshop.commons.exception.CoBusinessException; @@ -43,7 +43,7 @@ public class CereShopLabelServiceImpl implements CereShopLabelService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void save(LabelSaveParam param, CerePlatformBusiness user) throws CoBusinessException { + public void save(LabelSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time= TimeUtils.yyMMddHHmmss(); CereShopLabel cereShopLabel=new CereShopLabel(); cereShopLabel.setShopId(param.getShopId()); @@ -57,7 +57,7 @@ public class CereShopLabelServiceImpl implements CereShopLabelService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void update(LabelUpdateParam param, CerePlatformBusiness user) throws CoBusinessException { + public void update(LabelUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time= TimeUtils.yyMMddHHmmss(); CereShopLabel cereShopLabel=new CereShopLabel(); cereShopLabel.setLabelId(param.getLabelId()); @@ -71,7 +71,7 @@ public class CereShopLabelServiceImpl implements CereShopLabelService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void delete(LabelDeleteParam param, CerePlatformBusiness user) throws CoBusinessException { + public void delete(LabelDeleteParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time=TimeUtils.yyMMddHHmmss(); //删除标签 cereShopLabelDAO.deleteByPrimaryKey(param.getLabelId()); diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/label/impl/CereShopUserLabelServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/label/impl/CereShopUserLabelServiceImpl.java index a4bda7e..79d62e5 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/label/impl/CereShopUserLabelServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/label/impl/CereShopUserLabelServiceImpl.java @@ -12,7 +12,7 @@ import com.shop.cereshop.business.page.label.ShopUserLabel; import com.shop.cereshop.business.param.label.UserLabelGetAllParam; import com.shop.cereshop.business.service.label.CereShopUserLabelService; import com.shop.cereshop.business.service.log.CerePlatformLogService; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.label.CereShopUserLabel; import com.shop.cereshop.commons.exception.CoBusinessException; @@ -37,7 +37,7 @@ public class CereShopUserLabelServiceImpl implements CereShopUserLabelService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void save(CereShopUserLabel label, CerePlatformBusiness user) throws CoBusinessException { + public void save(CereShopUserLabel label, CerePlatformBusinessUser user) throws CoBusinessException { String time = TimeUtils.yyMMddHHmmss(); label.setCreateTime(time); //新增标签 @@ -48,7 +48,7 @@ public class CereShopUserLabelServiceImpl implements CereShopUserLabelService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void update(CereShopUserLabel label, CerePlatformBusiness user) throws CoBusinessException { + public void update(CereShopUserLabel label, CerePlatformBusinessUser user) throws CoBusinessException { String time = TimeUtils.yyMMddHHmmss(); label.setUpdateTime(time); //更新标签 @@ -59,7 +59,7 @@ public class CereShopUserLabelServiceImpl implements CereShopUserLabelService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void delete(List ids, CerePlatformBusiness user) throws CoBusinessException { + public void delete(List ids, CerePlatformBusinessUser user) throws CoBusinessException { String time =TimeUtils.yyMMddHHmmss(); if(!EmptyUtils.isEmpty(ids)){ for (Long labelId:ids) { diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/live/CereLiveProductService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/live/CereLiveProductService.java index 8405447..1756d20 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/live/CereLiveProductService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/live/CereLiveProductService.java @@ -5,13 +5,10 @@ */ package com.shop.cereshop.business.service.live; -import com.shop.cereshop.business.param.live.LiveGetAllParam; -import com.shop.cereshop.business.param.live.LiveParam; import com.shop.cereshop.business.param.live.LiveProductGetAllParam; import com.shop.cereshop.business.param.live.LiveProductParam; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; -import com.shop.cereshop.commons.domain.live.CereLive; import com.shop.cereshop.commons.domain.live.CereLiveProduct; import com.shop.cereshop.commons.exception.CoBusinessException; @@ -19,11 +16,11 @@ public interface CereLiveProductService { Page getAll(LiveProductGetAllParam param) throws CoBusinessException; - int save(LiveProductParam param, CerePlatformBusiness user) throws CoBusinessException; + int save(LiveProductParam param, CerePlatformBusinessUser user) throws CoBusinessException; - int update(LiveProductParam param, CerePlatformBusiness user) throws CoBusinessException; + int update(LiveProductParam param, CerePlatformBusinessUser user) throws CoBusinessException; - int delete(Long id, CerePlatformBusiness user); + int delete(Long id, CerePlatformBusinessUser user); CereLiveProduct getById(LiveProductParam param); diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/live/CereLiveService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/live/CereLiveService.java index 5e637b5..95b0433 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/live/CereLiveService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/live/CereLiveService.java @@ -6,7 +6,7 @@ package com.shop.cereshop.business.service.live; import com.shop.cereshop.business.param.live.*; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.live.CereLive; import com.shop.cereshop.commons.exception.CoBusinessException; @@ -15,15 +15,15 @@ public interface CereLiveService { Page getAll(LiveGetAllParam param) throws CoBusinessException; - int save(CereLive param, CerePlatformBusiness user) throws CoBusinessException; + int save(CereLive param, CerePlatformBusinessUser user) throws CoBusinessException; - int update(CereLive param, CerePlatformBusiness user) throws CoBusinessException; + int update(CereLive param, CerePlatformBusinessUser user) throws CoBusinessException; - int delete(Long id, CerePlatformBusiness user); + int delete(Long id, CerePlatformBusinessUser user); CereLive getById(LiveParam param); - int importProduct(LiveProductRelParam param, CerePlatformBusiness user) throws CoBusinessException; + int importProduct(LiveProductRelParam param, CerePlatformBusinessUser user) throws CoBusinessException; Page getLiveProductRelPageByLiveId(LiveProductPageParam param); diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/live/impl/CereLiveProductServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/live/impl/CereLiveProductServiceImpl.java index a5d241f..fdb00d2 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/live/impl/CereLiveProductServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/live/impl/CereLiveProductServiceImpl.java @@ -14,7 +14,7 @@ import com.shop.cereshop.business.service.live.CereLiveProductService; import com.shop.cereshop.business.service.log.CerePlatformLogService; import com.shop.cereshop.commons.constant.CoReturnFormat; import com.shop.cereshop.commons.constant.IntegerEnum; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.live.CereLiveProduct; import com.shop.cereshop.commons.domain.live.CereLiveProductExamine; @@ -85,7 +85,7 @@ public class CereLiveProductServiceImpl implements CereLiveProductService { } @Override - public int save(LiveProductParam param, CerePlatformBusiness user) throws CoBusinessException { + public int save(LiveProductParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time = TimeUtils.yyMMddHHmmss(); CereLiveProduct liveProduct = new CereLiveProduct(); BeanUtils.copyProperties(param, liveProduct); @@ -95,7 +95,7 @@ public class CereLiveProductServiceImpl implements CereLiveProductService { //校验参数 validate(liveProduct); //查询商家配置,是否需要直播间商品审核 - CerePlatformShop shop = cerePlatformShopDAO.selectById(user.getShopId()); + CerePlatformShop shop = cerePlatformShopDAO.selectById(user.getBusinessId()); if (IntegerEnum.NO.getCode().equals(shop.getAuditLiveProduct())) { liveProduct.setState(IntegerEnum.COMMON_AUDIT_SUCCESS.getCode()); if (StringUtils.isBlank(liveProduct.getProductImageMediaId())) { @@ -124,7 +124,7 @@ public class CereLiveProductServiceImpl implements CereLiveProductService { } @Override - public int update(LiveProductParam param, CerePlatformBusiness user) throws CoBusinessException { + public int update(LiveProductParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time = TimeUtils.yyMMddHHmmss(); CereLiveProduct liveProduct = new CereLiveProduct(); BeanUtils.copyProperties(param, liveProduct); @@ -139,18 +139,18 @@ public class CereLiveProductServiceImpl implements CereLiveProductService { } @Override - public int delete(Long id, CerePlatformBusiness user) { + public int delete(Long id, CerePlatformBusinessUser user) { String time = TimeUtils.yyMMddHHmmss(); //删除微信直播间的商品 - CereLiveProduct liveProduct = cereLiveProductDAO.getByIdAndShopId(id, user.getShopId()); + CereLiveProduct liveProduct = cereLiveProductDAO.getByIdAndShopId(id, user.getBusinessId()); wxLiveUtil.deleteGoods(liveProduct.getGoodsId()); - cereLiveProductDAO.deleteByIdAndShopId(id, user.getShopId()); + cereLiveProductDAO.deleteByIdAndShopId(id, user.getBusinessId()); //新增日志 cerePlatformLogService.addLog(user,"删除直播间商品","商户端操作","删除直播间商品",null,time); - return cereLiveProductDAO.deleteByIdAndShopId(id, user.getShopId()); + return cereLiveProductDAO.deleteByIdAndShopId(id, user.getBusinessId()); } @Override diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/live/impl/CereLiveServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/live/impl/CereLiveServiceImpl.java index c5d1032..0dc508d 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/live/impl/CereLiveServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/live/impl/CereLiveServiceImpl.java @@ -16,7 +16,7 @@ import com.shop.cereshop.business.service.log.CerePlatformLogService; import com.shop.cereshop.business.utils.EncodeUtil; import com.shop.cereshop.commons.constant.CoReturnFormat; import com.shop.cereshop.commons.constant.IntegerEnum; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.live.CereLive; import com.shop.cereshop.commons.domain.live.CereLiveExamine; @@ -83,14 +83,14 @@ public class CereLiveServiceImpl implements CereLiveService { } @Override - public int save(CereLive live, CerePlatformBusiness user) throws CoBusinessException { + public int save(CereLive live, CerePlatformBusinessUser user) throws CoBusinessException { String time = TimeUtils.yyMMddHHmmss(); live.setState(IntegerEnum.COMMON_WAIT_AUDIT.getCode()); live.setCreateTime(time); live.setUpdateTime(time); validate(live); //查询商家配置,是否需要直播间审核 - CerePlatformShop shop = cerePlatformShopDAO.selectById(user.getShopId()); + CerePlatformShop shop = cerePlatformShopDAO.selectById(user.getBusinessId()); if (IntegerEnum.NO.getCode().equals(shop.getAuditLiveProduct())) { live.setState(IntegerEnum.COMMON_AUDIT_SUCCESS.getCode()); Integer roomId = wxLiveUtil.createRoom(live); @@ -106,7 +106,7 @@ public class CereLiveServiceImpl implements CereLiveService { } @Override - public int update(CereLive live, CerePlatformBusiness user) throws CoBusinessException { + public int update(CereLive live, CerePlatformBusinessUser user) throws CoBusinessException { String time = TimeUtils.yyMMddHHmmss(); live.setState(IntegerEnum.COMMON_WAIT_AUDIT.getCode()); live.setUpdateTime(time); @@ -119,17 +119,17 @@ public class CereLiveServiceImpl implements CereLiveService { } @Override - public int delete(Long id, CerePlatformBusiness user) { + public int delete(Long id, CerePlatformBusinessUser user) { String time = TimeUtils.yyMMddHHmmss(); - CereLive live = cereLiveDAO.getByIdAndShopId(id, user.getShopId()); + CereLive live = cereLiveDAO.getByIdAndShopId(id, user.getBusinessId()); if (live.getRoomId() != null) { wxLiveUtil.deleteRoom(live.getRoomId()); } //新增日志 cerePlatformLogService.addLog(user,"删除直播间","商户端操作","删除直播间",null,time); - cereLiveDAO.deleteByIdAndShopId(id, user.getShopId()); - cereLiveProductRelDAO.deleteByLiveIdAndShopId(id, user.getShopId()); - return cereLiveDAO.deleteByIdAndShopId(id, user.getShopId()); + cereLiveDAO.deleteByIdAndShopId(id, user.getBusinessId()); + cereLiveProductRelDAO.deleteByLiveIdAndShopId(id, user.getBusinessId()); + return cereLiveDAO.deleteByIdAndShopId(id, user.getBusinessId()); } @Override @@ -138,10 +138,10 @@ public class CereLiveServiceImpl implements CereLiveService { } @Override - public int importProduct(LiveProductRelParam param, CerePlatformBusiness user) throws CoBusinessException { + public int importProduct(LiveProductRelParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time = TimeUtils.yyMMddHHmmss(); List goodsIdList = cereLiveProductRelDAO.selectLiveGoodsIdList(param.getLiveId()); - cereLiveProductRelDAO.deleteByLiveIdAndShopId(param.getLiveId(), user.getShopId()); + cereLiveProductRelDAO.deleteByLiveIdAndShopId(param.getLiveId(), user.getBusinessId()); int result = 0; if (!EmptyUtils.isEmpty(param.getLiveProductIdList())) { LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/log/CerePlatformLogService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/log/CerePlatformLogService.java index 2553bf2..dc633ad 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/log/CerePlatformLogService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/log/CerePlatformLogService.java @@ -5,13 +5,13 @@ */ package com.shop.cereshop.business.service.log; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.exception.CoBusinessException; public interface CerePlatformLogService { - void addLog(CerePlatformBusiness user, String module, String operation, String describe, Long id); - void addLog(CerePlatformBusiness user, String module, String operation, String describe, Long id, String time); + void addLog(CerePlatformBusinessUser user, String module, String operation, String describe, Long id); + void addLog(CerePlatformBusinessUser user, String module, String operation, String describe, Long id, String time); void deleteSignActivityByOnly(Long activityId,Long userId) throws CoBusinessException; } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/log/impl/CerePlatformLogServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/log/impl/CerePlatformLogServiceImpl.java index ea3734f..0c4c0d3 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/log/impl/CerePlatformLogServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/log/impl/CerePlatformLogServiceImpl.java @@ -7,7 +7,7 @@ package com.shop.cereshop.business.service.log.impl; import com.shop.cereshop.business.dao.log.CerePlatformLogDAO; import com.shop.cereshop.business.service.log.CerePlatformLogService; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.log.CerePlatformLog; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.utils.TimeUtils; @@ -21,12 +21,12 @@ public class CerePlatformLogServiceImpl implements CerePlatformLogService { private CerePlatformLogDAO cerePlatformLogDAO; @Override - public void addLog(CerePlatformBusiness user, String module, String operation, String describe, Long id) { + public void addLog(CerePlatformBusinessUser user, String module, String operation, String describe, Long id) { String time= TimeUtils.yyMMddHHmmss(); addLog(user, module, operation, describe, id, time); } @Override - public void addLog(CerePlatformBusiness user, String module, String operation, String describe, Long id, String time) { + public void addLog(CerePlatformBusinessUser user, String module, String operation, String describe, Long id, String time) { CerePlatformLog log=new CerePlatformLog(); log.setPlatformUserId(user.getBusinessUserId()); log.setModule(module); diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/logistics/CereOrderLogisticsService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/logistics/CereOrderLogisticsService.java index 4be47eb..ad294ff 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/logistics/CereOrderLogisticsService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/logistics/CereOrderLogisticsService.java @@ -10,16 +10,16 @@ import com.shop.cereshop.business.param.logistics.LogistDeleteParam; import com.shop.cereshop.business.param.logistics.LogistSaveParam; import com.shop.cereshop.business.param.logistics.LogistUpdateParam; import com.shop.cereshop.business.param.shop.ShopParam; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.exception.CoBusinessException; public interface CereOrderLogisticsService { - void save(LogistSaveParam param, CerePlatformBusiness user) throws CoBusinessException; + void save(LogistSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException; - void update(LogistUpdateParam param, CerePlatformBusiness user) throws CoBusinessException; + void update(LogistUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException; - void delete(LogistDeleteParam param, CerePlatformBusiness user) throws CoBusinessException; + void delete(LogistDeleteParam param, CerePlatformBusinessUser user) throws CoBusinessException; Logistics getById(Long logisticsId) throws CoBusinessException; diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/logistics/impl/CereOrderLogisticsServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/logistics/impl/CereOrderLogisticsServiceImpl.java index 892d223..0ed0b12 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/logistics/impl/CereOrderLogisticsServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/logistics/impl/CereOrderLogisticsServiceImpl.java @@ -17,7 +17,7 @@ import com.shop.cereshop.business.param.shop.ShopParam; import com.shop.cereshop.business.service.log.CerePlatformLogService; import com.shop.cereshop.business.service.logistics.CereLogisticsChargeService; import com.shop.cereshop.business.service.logistics.CereOrderLogisticsService; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.logistics.CereLogisticsCharge; import com.shop.cereshop.commons.domain.logistics.CereOrderLogistics; @@ -47,7 +47,7 @@ public class CereOrderLogisticsServiceImpl implements CereOrderLogisticsService @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void save(LogistSaveParam param, CerePlatformBusiness user) throws CoBusinessException { + public void save(LogistSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time= TimeUtils.yyMMddHHmmss(); CereOrderLogistics cereOrderLogistics=new CereOrderLogistics(); cereOrderLogistics.setLogisticsName(param.getLogisticsName()); @@ -79,7 +79,7 @@ public class CereOrderLogisticsServiceImpl implements CereOrderLogisticsService @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void update(LogistUpdateParam param, CerePlatformBusiness user) throws CoBusinessException { + public void update(LogistUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time=TimeUtils.yyMMddHHmmss(); CereOrderLogistics cereOrderLogistics=new CereOrderLogistics(); cereOrderLogistics.setLogisticsId(param.getLogisticsId()); @@ -112,7 +112,7 @@ public class CereOrderLogisticsServiceImpl implements CereOrderLogisticsService @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void delete(LogistDeleteParam param, CerePlatformBusiness user) throws CoBusinessException { + public void delete(LogistDeleteParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time =TimeUtils.yyMMddHHmmss(); cereOrderLogisticsDAO.deleteByPrimaryKey(param.getLogisticsId()); //清空计费明细 diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/order/CereOrderDileverService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/order/CereOrderDileverService.java index 93ffe68..b9662d7 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/order/CereOrderDileverService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/order/CereOrderDileverService.java @@ -7,11 +7,11 @@ package com.shop.cereshop.business.service.order; import com.shop.cereshop.business.param.after.AfterIdParam; import com.shop.cereshop.business.param.order.OrderDileveryParam; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.exception.CoBusinessException; public interface CereOrderDileverService { - void dilevery(OrderDileveryParam param, CerePlatformBusiness user) throws CoBusinessException,Exception; + void dilevery(OrderDileveryParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception; /** * 跨境发货 @@ -21,5 +21,5 @@ public interface CereOrderDileverService { */ void dileveryByCross(OrderDileveryParam param) throws CoBusinessException,Exception; - void refundDilevery(AfterIdParam param, CerePlatformBusiness user) throws CoBusinessException,Exception; + void refundDilevery(AfterIdParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception; } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/order/CereShopOrderService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/order/CereShopOrderService.java index f3d6940..7cbfe13 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/order/CereShopOrderService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/order/CereShopOrderService.java @@ -14,7 +14,7 @@ import com.shop.cereshop.business.param.finance.FinanceDetailParam; import com.shop.cereshop.business.param.finance.FinanceWithdrawalParam; import com.shop.cereshop.business.param.order.OrderGetAllParam; import com.shop.cereshop.business.param.order.UpdateOrderPriceParam; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.order.CereShopOrder; import com.shop.cereshop.commons.domain.product.CereProductSku; @@ -61,7 +61,7 @@ public interface CereShopOrderService { List syncOrderList(Long shopId, Long lastOrderId, Integer pageSize); - void updateOrderPrice(UpdateOrderPriceParam param, CerePlatformBusiness user) throws CoBusinessException; + void updateOrderPrice(UpdateOrderPriceParam param, CerePlatformBusinessUser user) throws CoBusinessException; Map selectSalesVolumeBySkuIdList(List skuIdList); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/order/impl/CereOrderDileverServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/order/impl/CereOrderDileverServiceImpl.java index 1140bf8..36c6948 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/order/impl/CereOrderDileverServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/order/impl/CereOrderDileverServiceImpl.java @@ -22,7 +22,7 @@ import com.shop.cereshop.commons.constant.IntegerEnum; import com.shop.cereshop.commons.constant.StringEnum; import com.shop.cereshop.commons.domain.after.CereAfterDilever; import com.shop.cereshop.commons.domain.after.CereOrderDilever; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.notice.CereNotice; import com.shop.cereshop.commons.domain.order.CereShopOrder; import com.shop.cereshop.commons.exception.CoBusinessException; @@ -76,7 +76,7 @@ public class CereOrderDileverServiceImpl implements CereOrderDileverService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void dilevery(OrderDileveryParam param, CerePlatformBusiness user) throws CoBusinessException,Exception { + public void dilevery(OrderDileveryParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception { String time = TimeUtils.yyMMddHHmmss(); CereOrderDilever cereOrderDilever=new CereOrderDilever(); cereOrderDilever.setOrderId(param.getOrderId()); @@ -185,7 +185,7 @@ public class CereOrderDileverServiceImpl implements CereOrderDileverService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void refundDilevery(AfterIdParam param, CerePlatformBusiness user) throws CoBusinessException,Exception { + public void refundDilevery(AfterIdParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception { String time= TimeUtils.yyMMddHHmmss(); CereAfterDilever cereAfterDilever=new CereAfterDilever(); cereAfterDilever.setCreateTime(time); diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/order/impl/CereShopOrderServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/order/impl/CereShopOrderServiceImpl.java index 3c09ff8..3605fa7 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/order/impl/CereShopOrderServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/order/impl/CereShopOrderServiceImpl.java @@ -43,7 +43,7 @@ import com.shop.cereshop.commons.constant.IntegerEnum; import com.shop.cereshop.commons.constant.StringEnum; import com.shop.cereshop.commons.constant.WxPayEnum; import com.shop.cereshop.commons.domain.activity.CereBuyerCoupon; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.buyer.CereBuyerShopCoupon; import com.shop.cereshop.commons.domain.buyer.CereBuyerUser; import com.shop.cereshop.commons.domain.common.Page; @@ -612,10 +612,10 @@ public class CereShopOrderServiceImpl implements CereShopOrderService { } @Override - public void updateOrderPrice(UpdateOrderPriceParam param, CerePlatformBusiness user) throws CoBusinessException { + public void updateOrderPrice(UpdateOrderPriceParam param, CerePlatformBusinessUser user) throws CoBusinessException { CereShopOrder shopOrder = cereShopOrderDAO.selectById(param.getOrderId()); if (shopOrder != null && IntegerEnum.ORDER_STAY_PAY.getCode().equals(shopOrder.getState()) - && shopOrder.getShopId().equals(user.getShopId())) { + && shopOrder.getShopId().equals(user.getBusinessId())) { String time = TimeUtils.yyMMddHHmmss(); CereOrderParent orderParent = cereOrderParentDAO.selectById(shopOrder.getParentId()); //改价后,新增的价格,有可能是负数 diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/permission/CerePlatformPermissionService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/permission/CerePlatformPermissionService.java index 1493a9e..f38f3f8 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/permission/CerePlatformPermissionService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/permission/CerePlatformPermissionService.java @@ -8,7 +8,7 @@ package com.shop.cereshop.business.service.permission; import com.shop.cereshop.business.page.permission.MenuButton; import com.shop.cereshop.business.page.permission.RolePermission; import com.shop.cereshop.business.param.permission.*; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.permission.CerePlatformPermission; import com.shop.cereshop.commons.exception.CoBusinessException; @@ -16,11 +16,11 @@ import com.shop.cereshop.commons.exception.CoBusinessException; import java.util.List; public interface CerePlatformPermissionService { - void save(PermissionSaveParam param, CerePlatformBusiness user) throws CoBusinessException; + void save(PermissionSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException; - void update(PermissionUpdateParam param, CerePlatformBusiness user) throws CoBusinessException; + void update(PermissionUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException; - void delete(PermissionDeleteParam param, CerePlatformBusiness user) throws CoBusinessException; + void delete(PermissionDeleteParam param, CerePlatformBusinessUser user) throws CoBusinessException; CerePlatformPermission getById(Long permissionId) throws CoBusinessException; @@ -28,13 +28,11 @@ public interface CerePlatformPermissionService { List getAllByUserId(UserBuildParam user) throws CoBusinessException; - CerePlatformPermission findBySort(Integer sort,Long id,Long shopId); + CerePlatformPermission findBySort(Integer sort,Long id,Long businessId); Integer getMaxSort() throws CoBusinessException; RolePermission getRolePermission(RoleDistributionParam param) throws CoBusinessException; - int findMaxSort(); - void insert(CerePlatformPermission permission) throws CoBusinessException; } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/permission/impl/CerePlatformPermissionServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/permission/impl/CerePlatformPermissionServiceImpl.java index bd3be28..2e3e757 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/permission/impl/CerePlatformPermissionServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/permission/impl/CerePlatformPermissionServiceImpl.java @@ -19,7 +19,7 @@ import com.shop.cereshop.business.service.role.CerePlatformRolePermissionService import com.shop.cereshop.business.utils.ContextUtil; import com.shop.cereshop.commons.constant.LongEnum; import com.shop.cereshop.commons.constant.StringEnum; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.permission.CerePlatformPermission; import com.shop.cereshop.commons.exception.CoBusinessException; @@ -51,7 +51,7 @@ public class CerePlatformPermissionServiceImpl implements CerePlatformPermission @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void save(PermissionSaveParam param, CerePlatformBusiness user) throws CoBusinessException { + public void save(PermissionSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time= TimeUtils.yyMMddHHmmss(); CerePlatformPermission permission=new CerePlatformPermission(); permission.setPermissionPid(param.getPermissionPid()); @@ -67,7 +67,7 @@ public class CerePlatformPermissionServiceImpl implements CerePlatformPermission permission.setPermissionPid(LongEnum.getByName("根节点")); } permission.setCreateTime(time); - permission.setProject(param.getShopId()); + permission.setProject(param.getBusinessId()); cerePlatformPermissionDAO.insert(permission); //新增日志 @@ -76,7 +76,7 @@ public class CerePlatformPermissionServiceImpl implements CerePlatformPermission @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void update(PermissionUpdateParam param, CerePlatformBusiness user) throws CoBusinessException { + public void update(PermissionUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time= TimeUtils.yyMMddHHmmss(); CerePlatformPermission permission=new CerePlatformPermission(); permission.setPermissionPid(param.getPermissionPid()); @@ -96,7 +96,7 @@ public class CerePlatformPermissionServiceImpl implements CerePlatformPermission @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void delete(PermissionDeleteParam param, CerePlatformBusiness user) throws CoBusinessException { + public void delete(PermissionDeleteParam param, CerePlatformBusinessUser user) throws CoBusinessException { ContextUtil.interceptDelete(); String time=TimeUtils.yyMMddHHmmss(); cerePlatformPermissionDAO.deleteByPrimaryKey(param.getPermissionId()); @@ -115,9 +115,9 @@ public class CerePlatformPermissionServiceImpl implements CerePlatformPermission public Page getAll(PermissionGetAllParam param) throws CoBusinessException { PageHelper.startPage(param.getPage(),param.getPageSize()); //查询所有根节点菜单权限 - List list=cerePlatformPermissionDAO.findAllByResourceType(StringEnum.CATALOG.getCode(),param.getPermissionName(),param.getShopId()); + List list=cerePlatformPermissionDAO.findAllByResourceType(StringEnum.CATALOG.getCode(),param.getPermissionName(),param.getBusinessId()); //查询所有子节点菜单和按钮权限 - List childs=cerePlatformPermissionDAO.findChilds(param.getPermissionName(),param.getShopId()); + List childs=cerePlatformPermissionDAO.findChilds(param.getPermissionName(),param.getBusinessId()); if(!EmptyUtils.isEmpty(list)){ Map map=new HashMap<>(); list.forEach((permission -> { @@ -133,9 +133,9 @@ public class CerePlatformPermissionServiceImpl implements CerePlatformPermission public RolePermission getRolePermission(RoleDistributionParam param) throws CoBusinessException{ RolePermission rolePermission=new RolePermission(); //查询所有根节点菜单权限 - List list=cerePlatformPermissionDAO.findAllByResourceType(StringEnum.CATALOG.getCode(),null,param.getShopId()); + List list=cerePlatformPermissionDAO.findAllByResourceType(StringEnum.CATALOG.getCode(),null,param.getBusinessId()); //查询所有子节点菜单权限 - List childs=cerePlatformPermissionDAO.findChilds(null,param.getShopId()); + List childs=cerePlatformPermissionDAO.findChilds(null,param.getBusinessId()); if(!EmptyUtils.isEmpty(list)){ Map map=new HashMap<>(); list.forEach((permission -> { @@ -149,11 +149,6 @@ public class CerePlatformPermissionServiceImpl implements CerePlatformPermission } @Override - public int findMaxSort() { - return cerePlatformPermissionDAO.findMaxSort(); - } - - @Override public void insert(CerePlatformPermission permission) throws CoBusinessException { cerePlatformPermissionDAO.insert(permission); } @@ -161,11 +156,11 @@ public class CerePlatformPermissionServiceImpl implements CerePlatformPermission @Override public List getAllByUserId(UserBuildParam user) throws CoBusinessException { //根据用户id查询所有根节点菜单权限 - List list=cerePlatformPermissionDAO.findAllCatalogByUserIdAndResourceType(user.getBusinessUserId(),StringEnum.CATALOG.getCode(),user.getShopId()); + List list=cerePlatformPermissionDAO.findAllCatalogByUserIdAndResourceType(user.getBusinessUserId(),StringEnum.CATALOG.getCode(),user.getBusinessId()); //根据用户id查询所有子节点菜单权限 - List childs=cerePlatformPermissionDAO.findAllCatalogByUserIdAndResourceType(user.getBusinessUserId(),StringEnum.MENU.getCode(),user.getShopId()); + List childs=cerePlatformPermissionDAO.findAllCatalogByUserIdAndResourceType(user.getBusinessUserId(),StringEnum.MENU.getCode(),user.getBusinessId()); //查询所有按钮权限 - List buttons=cerePlatformPermissionDAO.findAllCatalogByUserIdAndResourceType(user.getBusinessUserId(),StringEnum.BUTTON.getCode(),user.getShopId()); + List buttons=cerePlatformPermissionDAO.findAllCatalogByUserIdAndResourceType(user.getBusinessUserId(),StringEnum.BUTTON.getCode(),user.getBusinessId()); if(!EmptyUtils.isEmpty(list)){ Map map=new HashMap<>(); list.forEach((permission -> { @@ -180,8 +175,8 @@ public class CerePlatformPermissionServiceImpl implements CerePlatformPermission } @Override - public CerePlatformPermission findBySort(Integer sort, Long id,Long shopId) { - return cerePlatformPermissionDAO.findBySort(sort,id,shopId); + public CerePlatformPermission findBySort(Integer sort, Long id,Long businessId) { + return cerePlatformPermissionDAO.findBySort(sort,id,businessId); } @Override diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/price/CereShopPriceService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/price/CereShopPriceService.java index f16b1b7..b11edc4 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/price/CereShopPriceService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/price/CereShopPriceService.java @@ -8,7 +8,7 @@ package com.shop.cereshop.business.service.price; import com.shop.cereshop.business.page.price.ShopPriceDetail; import com.shop.cereshop.business.param.price.*; import com.shop.cereshop.business.param.renovation.RenovationParam; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.tool.CereShopPrice; import com.shop.cereshop.commons.exception.CoBusinessException; @@ -16,13 +16,13 @@ import com.shop.cereshop.commons.exception.CoBusinessException; import java.util.List; public interface CereShopPriceService { - void save(PriceSaveParam param, CerePlatformBusiness user) throws CoBusinessException,Exception; + void save(PriceSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception; - void update(PriceUpdateParam param, CerePlatformBusiness user) throws CoBusinessException,Exception; + void update(PriceUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception; - void delete(PriceGetByIdParam param, CerePlatformBusiness user) throws CoBusinessException; + void delete(PriceGetByIdParam param, CerePlatformBusinessUser user) throws CoBusinessException; - void start(PriceStartParam param, CerePlatformBusiness user) throws CoBusinessException; + void start(PriceStartParam param, CerePlatformBusinessUser user) throws CoBusinessException; ShopPriceDetail getById(Long priceId) throws CoBusinessException; diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/price/impl/CereShopPriceServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/price/impl/CereShopPriceServiceImpl.java index f5b4664..a362da0 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/price/impl/CereShopPriceServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/price/impl/CereShopPriceServiceImpl.java @@ -8,13 +8,8 @@ package com.shop.cereshop.business.service.price.impl; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.shop.cereshop.business.dao.price.CereShopPriceDAO; -import com.shop.cereshop.business.page.compose.ShopCompose; -import com.shop.cereshop.business.page.compose.ShopComposeDetail; import com.shop.cereshop.business.page.price.ShopPrice; import com.shop.cereshop.business.page.price.ShopPriceDetail; -import com.shop.cereshop.business.param.compose.ComposeGetAllParam; -import com.shop.cereshop.business.param.compose.ComposeGetByIdParam; -import com.shop.cereshop.business.param.compose.ComposeStartParam; import com.shop.cereshop.business.param.price.*; import com.shop.cereshop.business.param.renovation.RenovationParam; import com.shop.cereshop.business.redis.service.api.StringRedisService; @@ -26,9 +21,8 @@ import com.shop.cereshop.business.service.redis.CereRedisKeyServcice; import com.shop.cereshop.commons.constant.CoReturnFormat; import com.shop.cereshop.commons.constant.IntegerEnum; import com.shop.cereshop.commons.constant.StringEnum; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; -import com.shop.cereshop.commons.domain.tool.CerePriceProduct; import com.shop.cereshop.commons.domain.tool.CerePriceRule; import com.shop.cereshop.commons.domain.tool.CereShopCompose; import com.shop.cereshop.commons.domain.tool.CereShopPrice; @@ -67,7 +61,7 @@ public class CereShopPriceServiceImpl implements CereShopPriceService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void save(PriceSaveParam param, CerePlatformBusiness user) throws CoBusinessException, Exception { + public void save(PriceSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException, Exception { String time = TimeUtils.yyMMddHHmmss(); CereShopPrice cereShopPrice=new CereShopPrice(); cereShopPrice.setShopId(param.getShopId()); @@ -131,7 +125,7 @@ public class CereShopPriceServiceImpl implements CereShopPriceService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void update(PriceUpdateParam param, CerePlatformBusiness user) throws CoBusinessException, Exception { + public void update(PriceUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException, Exception { String time = TimeUtils.yyMMddHHmmss(); CereShopPrice cereShopPrice=new CereShopPrice(); cereShopPrice.setPriceId(param.getPriceId()); @@ -201,7 +195,7 @@ public class CereShopPriceServiceImpl implements CereShopPriceService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void delete(PriceGetByIdParam param, CerePlatformBusiness user) throws CoBusinessException { + public void delete(PriceGetByIdParam param, CerePlatformBusinessUser user) throws CoBusinessException { //清空延时任务 stringRedisService.delete(StringEnum.PRICE_START.getCode()+"-"+param.getPriceId()); cereRedisKeyServcice.deleteByKey(StringEnum.PRICE_START.getCode()+"-"+param.getPriceId()); @@ -219,7 +213,7 @@ public class CereShopPriceServiceImpl implements CereShopPriceService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void start(PriceStartParam param, CerePlatformBusiness user) throws CoBusinessException { + public void start(PriceStartParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time = TimeUtils.yyMMddHHmmss(); CereShopPrice cereShopPrice=new CereShopPrice(); cereShopPrice.setPriceId(param.getPriceId()); diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/product/CereProductClassifyService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/product/CereProductClassifyService.java index a464c59..43b85d8 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/product/CereProductClassifyService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/product/CereProductClassifyService.java @@ -5,6 +5,11 @@ */ package com.shop.cereshop.business.service.product; +import com.shop.cereshop.business.param.product.ClassifyDeleteParam; +import com.shop.cereshop.business.param.product.ClassifyGetAllParam; +import com.shop.cereshop.business.param.product.ClassifyLevelParam; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; +import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.product.Classify; import com.shop.cereshop.business.param.product.ProductGetClassifyParam; import com.shop.cereshop.commons.domain.product.CereProductClassify; @@ -13,11 +18,22 @@ import com.shop.cereshop.commons.exception.CoBusinessException; import java.util.List; public interface CereProductClassifyService { + + void save(ClassifyLevelParam param, CerePlatformBusinessUser user) throws CoBusinessException; + + void update(ClassifyLevelParam param, CerePlatformBusinessUser user) throws CoBusinessException; + + CereProductClassify getById(Long classifyId) throws CoBusinessException; + + Page getAll(ClassifyGetAllParam param) throws CoBusinessException; + + void delete(ClassifyDeleteParam param, CerePlatformBusinessUser user) throws CoBusinessException; + List getClassifySelect(ProductGetClassifyParam param) throws CoBusinessException; - CereProductClassify findByHierarchy(String hierarchy); + CereProductClassify findByHierarchy(String hierarchy) throws CoBusinessException; List getClassify() throws CoBusinessException; - List selectAll(); + List selectAll() throws CoBusinessException; } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/product/CereShopProductService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/product/CereShopProductService.java index e30d6b0..8739f31 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/product/CereShopProductService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/product/CereShopProductService.java @@ -12,7 +12,7 @@ import com.shop.cereshop.business.page.product.ProductExportDTO; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.business.page.product.ShopProduct; import com.shop.cereshop.business.param.product.*; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.product.CereShopProduct; import com.shop.cereshop.commons.exception.CoBusinessException; import org.apache.poi.ss.usermodel.Workbook; @@ -20,15 +20,15 @@ import org.apache.poi.ss.usermodel.Workbook; import java.util.List; public interface CereShopProductService { - void save(ProductSaveParam param, CerePlatformBusiness user) throws CoBusinessException; + void save(ProductSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException; - void update(ProductUpdateParam param, CerePlatformBusiness user) throws CoBusinessException; + void update(ProductUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException; - void delete(ProductDeleteParam param, CerePlatformBusiness user) throws CoBusinessException; + void delete(ProductDeleteParam param, CerePlatformBusinessUser user) throws CoBusinessException; ShopProduct getById(Long productId) throws CoBusinessException; - void start(ProductUpDownParam param, CerePlatformBusiness user) throws CoBusinessException; + void start(ProductUpDownParam param, CerePlatformBusinessUser user) throws CoBusinessException; Page getAll(ProductGetAllParam param) throws CoBusinessException; diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/product/impl/CereProductClassifyServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/product/impl/CereProductClassifyServiceImpl.java index 423515d..ce11561 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/product/impl/CereProductClassifyServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/product/impl/CereProductClassifyServiceImpl.java @@ -5,15 +5,32 @@ */ package com.shop.cereshop.business.service.product.impl; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; import com.shop.cereshop.business.dao.product.CereProductClassifyDAO; -import com.shop.cereshop.commons.domain.product.Classify; +import com.shop.cereshop.business.param.product.ClassifyDeleteParam; +import com.shop.cereshop.business.param.product.ClassifyGetAllParam; +import com.shop.cereshop.business.param.product.ClassifyLevelParam; import com.shop.cereshop.business.param.product.ProductGetClassifyParam; +import com.shop.cereshop.business.service.log.CerePlatformLogService; import com.shop.cereshop.business.service.product.CereProductClassifyService; +import com.shop.cereshop.business.utils.ContextUtil; +import com.shop.cereshop.commons.constant.CoReturnFormat; +import com.shop.cereshop.commons.constant.IntegerEnum; +import com.shop.cereshop.commons.constant.LongEnum; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; +import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.product.CereProductClassify; +import com.shop.cereshop.commons.domain.product.CereShopProduct; +import com.shop.cereshop.commons.domain.product.Classify; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.utils.EmptyUtils; +import com.shop.cereshop.commons.utils.TimeUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Isolation; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; import java.util.ArrayList; import java.util.HashMap; @@ -26,22 +43,25 @@ public class CereProductClassifyServiceImpl implements CereProductClassifyServic @Autowired private CereProductClassifyDAO cereProductClassifyDAO; + @Autowired + private CerePlatformLogService cerePlatformLogService; + @Override public List getClassifySelect(ProductGetClassifyParam param) throws CoBusinessException { - return cereProductClassifyDAO.getClassifySelect(param.getClassifyPid()); + return cereProductClassifyDAO.getClassifySelect(ContextUtil.getProject(), param.getClassifyPid()); } @Override - public CereProductClassify findByHierarchy(String hierarchy) { - return cereProductClassifyDAO.findByHierarchy(hierarchy); + public CereProductClassify findByHierarchy(String hierarchy) throws CoBusinessException { + return cereProductClassifyDAO.findByHierarchy(ContextUtil.getProject(), hierarchy); } @Override public List getClassify() throws CoBusinessException { //查询所有一级类目 - List list=cereProductClassifyDAO.findAll(); + List list=cereProductClassifyDAO.findAll(ContextUtil.getProject()); //查询所有子节点类目 - List childs=cereProductClassifyDAO.findChilds(); + List childs=cereProductClassifyDAO.findChilds(ContextUtil.getProject()); if(!EmptyUtils.isEmpty(list)){ Map map=new HashMap<>(); list.forEach((classify -> { @@ -52,8 +72,8 @@ public class CereProductClassifyServiceImpl implements CereProductClassifyServic } @Override - public List selectAll() { - return cereProductClassifyDAO.selectAll(); + public List selectAll() throws CoBusinessException { + return cereProductClassifyDAO.selectAll(ContextUtil.getProject()); } private Classify setChildsIndex(Classify parent, List all, Map map) throws ArrayIndexOutOfBoundsException{ @@ -93,4 +113,193 @@ public class CereProductClassifyServiceImpl implements CereProductClassifyServic } return parent; } + + + + + @Override + @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) + public void save(ClassifyLevelParam param, CerePlatformBusinessUser user) throws CoBusinessException { + String time= TimeUtils.yyMMddHHmmss(); + //定义批量更新层级结构字段数组 + List updates=new ArrayList<>(); + if(!EmptyUtils.isEmpty(param.getClassifies())){ + //遍历一级类别 + for (CereProductClassify classify:param.getClassifies()) { + //新增一级类别数据 + addOneClassify(classify,time,updates); + } + if(!EmptyUtils.isEmpty(updates)){ + //批量更新分类层级结构 + cereProductClassifyDAO.updateBatchLevelHierarchy(updates); + } + } + //新增日志 + cerePlatformLogService.addLog(user,"商品类别","平台端操作","添加商品类别",null,time); + } + + private void addOneClassify(CereProductClassify classify, String time,List updates) throws CoBusinessException{ + if(EmptyUtils.isEmpty(classify.getClassifyName())){ + throw new CoBusinessException(CoReturnFormat.CLASSIFY_NAME_NULL); + } + CereProductClassify cereProductClassify=new CereProductClassify(); + cereProductClassify.setClassifyId(classify.getClassifyId()); + cereProductClassify.setClassifyName(classify.getClassifyName()); + cereProductClassify.setClassifyPid(LongEnum.ROOT.getCode()); + cereProductClassify.setClassifyImage(classify.getClassifyImage()); + cereProductClassify.setClassifyLevel(IntegerEnum.CLASSIFY_LEVEL_ONE.getCode()); + cereProductClassify.setLink(classify.getLink()); + cereProductClassify.setProject(ContextUtil.getProject()); + cereProductClassify.setClassifyHierarchy("-"+classify.getClassifyName()); + if(!EmptyUtils.isLongEmpty(classify.getClassifyId())){ + //更新一级类别 + cereProductClassify.setUpdateTime(time); + cereProductClassify.setClassifyLevelHierarchy("/"+cereProductClassify.getClassifyId()); + cereProductClassifyDAO.updateByPrimaryKeySelective(cereProductClassify); + }else { + //新增一级类别 + cereProductClassify.setCreateTime(time); + cereProductClassifyDAO.insert(cereProductClassify); + cereProductClassify.setClassifyLevelHierarchy("/"+cereProductClassify.getClassifyId()); + updates.add(cereProductClassify); + } + if(!EmptyUtils.isEmpty(classify.getChilds())){ + //新增子级类别 + for (CereProductClassify productClassify:classify.getChilds()) { + addChildClaasify(cereProductClassify, + updates,time,productClassify,IntegerEnum.CLASSIFY_LEVEL_TWO.getCode()); + } + } + } + + private void addChildClaasify(CereProductClassify parent, List updates, + String time, CereProductClassify child,Integer level) throws CoBusinessException{ + if(EmptyUtils.isEmpty(child.getClassifyName())){ + throw new CoBusinessException(CoReturnFormat.CLASSIFY_NAME_NULL); + } + CereProductClassify productClassify=new CereProductClassify(); + productClassify.setClassifyId(child.getClassifyId()); + productClassify.setClassifyName(child.getClassifyName()); + productClassify.setClassifyPid(parent.getClassifyId()); + productClassify.setClassifyLevel(level); + productClassify.setLink(child.getLink()); + productClassify.setClassifyImage(child.getClassifyImage()); + productClassify.setProject(ContextUtil.getProject()); + productClassify.setClassifyHierarchy(parent.getClassifyHierarchy()+"-"+child.getClassifyName()); + if(!EmptyUtils.isLongEmpty(child.getClassifyId())){ + //更新子级类别 + productClassify.setUpdateTime(time); + productClassify.setClassifyLevelHierarchy(parent.getClassifyLevelHierarchy()+"/"+productClassify.getClassifyId()); + cereProductClassifyDAO.updateByPrimaryKeySelective(productClassify); + }else { + //新增子级类别 + productClassify.setCreateTime(time); + cereProductClassifyDAO.insert(productClassify); + productClassify.setClassifyLevelHierarchy(parent.getClassifyLevelHierarchy()+"/"+productClassify.getClassifyId()); + updates.add(productClassify); + } + if(!EmptyUtils.isEmpty(child.getChilds())){ + //新增子级类别 + for (CereProductClassify classify1:child.getChilds()) { + addChildClaasify(productClassify,updates,time,classify1,IntegerEnum.CLASSIFY_LEVEL_THREE.getCode()); + } + } + } + + @Override + @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) + public void update(ClassifyLevelParam param, CerePlatformBusinessUser user) throws CoBusinessException { + String time=TimeUtils.yyMMddHHmmss(); + //定义批量更新层级结构字段数组 + List updates=new ArrayList<>(); + if(!EmptyUtils.isEmpty(param.getClassifies())){ + for (CereProductClassify classify:param.getClassifies()) { + addOneClassify(classify,time,updates); + } + if(!EmptyUtils.isEmpty(updates)){ + //批量更新分类层级结构 + cereProductClassifyDAO.updateBatchLevelHierarchy(updates); + } + if(!EmptyUtils.isEmpty(param.getDeleteIds())){ + //删除分类 + cereProductClassifyDAO.deleteByIds(param.getDeleteIds()); + } + } + //新增日志 + cerePlatformLogService.addLog(user,"商品类别","平台端操作","修改商品类别",null,time); + } + + @Override + public CereProductClassify getById(Long classifyId) throws CoBusinessException { + //查询一级类别数据 + CereProductClassify classify=cereProductClassifyDAO.selectByPrimaryKey(classifyId); + if(classify!=null){ + //查询所有二级分类 + List classifies=cereProductClassifyDAO.findByPid(classify.getClassifyId()); + if(!EmptyUtils.isEmpty(classifies)){ + //查询所有三级分类 + classifies.forEach(a -> { + a.setChilds( cereProductClassifyDAO.findByPid(a.getClassifyId())); + }); + classify.setChilds(classifies); + } + } + return classify; + } + + @Override + public Page getAll(ClassifyGetAllParam param) throws CoBusinessException { + PageHelper.startPage(param.getPage(),param.getPageSize()); + List list=cereProductClassifyDAO.getAll(ContextUtil.getProject()); + PageInfo pageInfo=new PageInfo<>(list); + Page page=new Page(pageInfo.getList(),pageInfo.getTotal()); + return page; + } + + @Override + @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) + public void delete(ClassifyDeleteParam param, CerePlatformBusinessUser user) throws CoBusinessException { + //校验一级类别是否存在商品 + List list = cereProductClassifyDAO.checkProduct(param.getOneClassifyId()); + if(!EmptyUtils.isEmpty(list)){ + throw new CoBusinessException(CoReturnFormat.CLASSIFY_BOND_PRODUCT); + } + String time =TimeUtils.yyMMddHHmmss(); + //查询一级类别层级 + CereProductClassify classify=cereProductClassifyDAO.selectById(param.getOneClassifyId()); + if(classify!=null){ + //删除一级类别 + cereProductClassifyDAO.deleteByPrimaryKey(param.getOneClassifyId()); + String[] split = classify.getClassifyLevelHierarchy().split("/"); + if(!EmptyUtils.isEmpty(split)){ + if(split.length==3){ + //只包含二级类别 + list=cereProductClassifyDAO.checkProduct(Long.parseLong(split[split.length-1])); + if(!EmptyUtils.isEmpty(list)){ + throw new CoBusinessException(CoReturnFormat.CLASSIFY_BOND_PRODUCT); + } + //删除二级类别 + cereProductClassifyDAO.deleteByPrimaryKey(Long.parseLong(split[split.length-1])); + }else if(split.length==4){ + //包含二级、三级类别 + //校验当前二级类别是否有绑定商品数据 + list=cereProductClassifyDAO.checkProduct(Long.parseLong(split[split.length-2])); + if(!EmptyUtils.isEmpty(list)){ + throw new CoBusinessException(CoReturnFormat.CLASSIFY_BOND_PRODUCT); + } + //删除二级类别 + cereProductClassifyDAO.deleteByPrimaryKey(Long.parseLong(split[split.length-2])); + //校验当前三级类别是否有绑定商品数据 + list=cereProductClassifyDAO.checkProduct(Long.parseLong(split[split.length-1])); + if(!EmptyUtils.isEmpty(list)){ + throw new CoBusinessException(CoReturnFormat.CLASSIFY_BOND_PRODUCT); + } + //删除三级类别 + cereProductClassifyDAO.deleteByPrimaryKey(Long.parseLong(split[split.length-1])); + } + } + } + //新增日志 + cerePlatformLogService.addLog(user,"商品类别","平台端操作","删除商品类别", param.getOneClassifyId(),time); + } } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/product/impl/CereProductMemberServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/product/impl/CereProductMemberServiceImpl.java index 550c63e..57448ec 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/product/impl/CereProductMemberServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/product/impl/CereProductMemberServiceImpl.java @@ -22,11 +22,13 @@ public class CereProductMemberServiceImpl implements CereProductMemberService { @Override public List findAllMin() { + //TODO by pxh 需要修改会员机制 return cereProductMemberDAO.findAllMin(); } @Override public List findAllMax() { + //TODO by pxh 需要修改会员机制 return cereProductMemberDAO.findAllMax(); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/product/impl/CereShopProductServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/product/impl/CereShopProductServiceImpl.java index 6e37140..e2dd800 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/product/impl/CereShopProductServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/product/impl/CereShopProductServiceImpl.java @@ -35,7 +35,7 @@ import com.shop.cereshop.commons.constant.CoReturnFormat; import com.shop.cereshop.commons.constant.IntegerEnum; import com.shop.cereshop.commons.constant.RefreshSkuRealInfoSourceEnum; import com.shop.cereshop.commons.domain.brand.Brand; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.image.Image; import com.shop.cereshop.commons.domain.product.*; @@ -119,7 +119,7 @@ public class CereShopProductServiceImpl implements CereShopProductService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void save(ProductSaveParam param, CerePlatformBusiness user) throws CoBusinessException { + public void save(ProductSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time= TimeUtils.yyMMddHHmmss(); //新增商品数据 CereShopProduct cereShopProduct=new CereShopProduct(); @@ -128,6 +128,8 @@ public class CereShopProductServiceImpl implements CereShopProductService { cereShopProduct.setProductText(param.getProductText()); cereShopProduct.setClassifyId(param.getClassifyId()); cereShopProduct.setShopGroupId(param.getShopGroupId()); + cereShopProduct.setClassifyBusinessId(param.getClassifyBusinessId()); + cereShopProduct.setShopGroupBusinessId(param.getShopGroupBusinessId()); cereShopProduct.setSupplierId(param.getSupplierId()); cereShopProduct.setSupplierName(param.getSupplierName()); cereShopProduct.setIfLogistics(Integer.parseInt(param.getIfLogistics())); @@ -136,6 +138,7 @@ public class CereShopProductServiceImpl implements CereShopProductService { cereShopProduct.setIfCredit(param.getIfCredit()); cereShopProduct.setCreditLimit(param.getCreditLimit()); cereShopProduct.setBrandId(param.getBrandId()); + if(IntegerEnum.PRODUCT_EXAMINE_YES.getCode().equals(Integer.parseInt(param.getShelveState()))){ //如果是已上架,修改状态为审核中 cereShopProduct.setShelveState(IntegerEnum.PRODUCT_EXAMINE_STAY.getCode()); @@ -147,6 +150,7 @@ public class CereShopProductServiceImpl implements CereShopProductService { cereShopProduct.setUpdateTime(time); cereShopProduct.setShopId(param.getShopId()); cereShopProductDAO.insert(cereShopProduct); + if(!EmptyUtils.isEmpty(param.getImages())){ List list=new ArrayList<>(); //新增商品图片数据 @@ -196,7 +200,7 @@ public class CereShopProductServiceImpl implements CereShopProductService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void update(ProductUpdateParam param, CerePlatformBusiness user) throws CoBusinessException { + public void update(ProductUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException { CereShopProduct dbCereShopProduct = cereShopProductDAO.selectByPrimaryKey(param.getProductId()); if(dbCereShopProduct == null){ @@ -211,6 +215,8 @@ public class CereShopProductServiceImpl implements CereShopProductService { cereShopProduct.setProductText(param.getProductText()); cereShopProduct.setClassifyId(param.getClassifyId()); cereShopProduct.setShopGroupId(param.getShopGroupId()); + cereShopProduct.setClassifyBusinessId(param.getClassifyBusinessId()); + cereShopProduct.setShopGroupBusinessId(param.getShopGroupBusinessId()); cereShopProduct.setSupplierId(param.getSupplierId()); cereShopProduct.setSupplierName(param.getSupplierName()); cereShopProduct.setIfLogistics(param.getIfLogistics()); @@ -307,7 +313,7 @@ public class CereShopProductServiceImpl implements CereShopProductService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void delete(ProductDeleteParam param, CerePlatformBusiness user) throws CoBusinessException { + public void delete(ProductDeleteParam param, CerePlatformBusinessUser user) throws CoBusinessException { //校验商品是否参与正在进行的活动 Long productId=cereShopProductDAO.checkActivity(param.getProductId()); if(EmptyUtils.isLongEmpty(productId)){ @@ -383,7 +389,7 @@ public class CereShopProductServiceImpl implements CereShopProductService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void start(ProductUpDownParam param, CerePlatformBusiness user) throws CoBusinessException { + public void start(ProductUpDownParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time=TimeUtils.yyMMddHHmmss(); CereShopProduct cereShopProduct=new CereShopProduct(); cereShopProduct.setProductId(param.getProductId()); @@ -411,6 +417,10 @@ public class CereShopProductServiceImpl implements CereShopProductService { Map maxMap=new HashMap<>(); //定义模式map Map modeMap = new HashMap<>(); + + PageHelper.startPage(param.getPage(),param.getPageSize()); + List list=cereShopProductDAO.getAll(param); + //查询所有商品会员价格最低值数据 List minMembers=cereProductMemberService.findAllMin(); if(!EmptyUtils.isEmpty(minMembers)){ @@ -422,8 +432,7 @@ public class CereShopProductServiceImpl implements CereShopProductService { if(!EmptyUtils.isEmpty(maxMembers)){ maxMap=maxMembers.stream().collect(Collectors.toMap(CereProductMember::getProductId,CereProductMember::getPrice)); } - PageHelper.startPage(param.getPage(),param.getPageSize()); - List list=cereShopProductDAO.getAll(param); + if(!EmptyUtils.isEmpty(list)){ Map finalMinMap = minMap; Map finalMaxMap = maxMap; @@ -467,6 +476,9 @@ public class CereShopProductServiceImpl implements CereShopProductService { Map maxMap=new HashMap<>(); //定义模式map Map modeMap = new HashMap<>(); + + List list=cereShopProductDAO.getAll(param); + //查询所有商品会员价格最低值数据 List minMembers=cereProductMemberService.findAllMin(); if(!EmptyUtils.isEmpty(minMembers)){ @@ -478,7 +490,7 @@ public class CereShopProductServiceImpl implements CereShopProductService { if(!EmptyUtils.isEmpty(maxMembers)){ maxMap=maxMembers.stream().collect(Collectors.toMap(CereProductMember::getProductId,CereProductMember::getPrice)); } - List list=cereShopProductDAO.getAll(param); + if(!EmptyUtils.isEmpty(list)){ Map finalMinMap = minMap; Map finalMaxMap = maxMap; @@ -529,6 +541,7 @@ public class CereShopProductServiceImpl implements CereShopProductService { CereShopProduct cereShopProduct = new CereShopProduct(); cereShopProduct.setProductName(param.getProductName()); cereShopProduct.setClassifyId(param.getClassifyId()); + cereShopProduct.setClassifyBusinessId(param.getClassifyBusinessId()); cereShopProduct.setSupplierName(param.getSupplierName()); cereShopProduct.setIfLogistics(Integer.parseInt(param.getIfLogistics())); cereShopProduct.setIfOversold(Integer.parseInt(param.getIfOversold())); @@ -540,6 +553,7 @@ public class CereShopProductServiceImpl implements CereShopProductService { cereShopProduct.setShelveState(Integer.parseInt(param.getShelveState())); } cereShopProduct.setShopGroupId(param.getShopGroupId()); + cereShopProduct.setShopGroupBusinessId(param.getShopGroupBusinessId()); cereShopProduct.setCreateTime(time); cereShopProduct.setShopId(param.getShopId()); cereShopProductDAO.insert(cereShopProduct); diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/role/CerePlatformRolePermissionService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/role/CerePlatformRolePermissionService.java index 5169824..7ebddf2 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/role/CerePlatformRolePermissionService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/role/CerePlatformRolePermissionService.java @@ -17,7 +17,5 @@ public interface CerePlatformRolePermissionService { void insertBatch(List list) throws CoBusinessException; - Long check(Long roleId); - void deleteByPermissionId(Long permissionId) throws CoBusinessException; } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/role/CerePlatformRoleService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/role/CerePlatformRoleService.java index 777dac8..c2d0563 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/role/CerePlatformRoleService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/role/CerePlatformRoleService.java @@ -10,22 +10,21 @@ import com.shop.cereshop.business.param.role.RoleDeleteParam; import com.shop.cereshop.business.param.role.RoleGetAllParam; import com.shop.cereshop.business.param.role.RoleSaveParam; import com.shop.cereshop.business.param.role.RoleUpdateParam; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.role.CerePlatformRole; -import com.shop.cereshop.commons.domain.user.CerePlatformUser; import com.shop.cereshop.commons.exception.CoBusinessException; public interface CerePlatformRoleService { - void save(RoleSaveParam param, CerePlatformBusiness user) throws CoBusinessException; + void save(RoleSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException; - void update(RoleUpdateParam param, CerePlatformBusiness user) throws CoBusinessException; + void update(RoleUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException; - void delete(RoleDeleteParam param, CerePlatformBusiness user) throws CoBusinessException; + void delete(RoleDeleteParam param, CerePlatformBusinessUser user) throws CoBusinessException; CerePlatformRole getById(Long roleId) throws CoBusinessException; Page getAll(RoleGetAllParam param) throws CoBusinessException; - void distribution(RoleDistributionParam param, CerePlatformBusiness user) throws CoBusinessException; + void distribution(RoleDistributionParam param, CerePlatformBusinessUser user) throws CoBusinessException; } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/role/impl/CerePlatformRolePermissionServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/role/impl/CerePlatformRolePermissionServiceImpl.java index 44746d9..9a5c960 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/role/impl/CerePlatformRolePermissionServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/role/impl/CerePlatformRolePermissionServiceImpl.java @@ -36,11 +36,6 @@ public class CerePlatformRolePermissionServiceImpl implements CerePlatformRolePe } @Override - public Long check(Long roleId) { - return cerePlatformRolePermissionDAO.check(roleId); - } - - @Override public void deleteByPermissionId(Long permissionId) throws CoBusinessException { cerePlatformRolePermissionDAO.deleteByPermissionId(permissionId); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/role/impl/CerePlatformRoleServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/role/impl/CerePlatformRoleServiceImpl.java index 9e60577..03041f9 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/role/impl/CerePlatformRoleServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/role/impl/CerePlatformRoleServiceImpl.java @@ -16,8 +16,7 @@ import com.shop.cereshop.business.param.role.RoleUpdateParam; import com.shop.cereshop.business.service.log.CerePlatformLogService; import com.shop.cereshop.business.service.role.CerePlatformRolePermissionService; import com.shop.cereshop.business.service.role.CerePlatformRoleService; -import com.shop.cereshop.commons.constant.IntegerEnum; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.role.CerePlatformRole; import com.shop.cereshop.commons.domain.role.CerePlatformRolePermission; @@ -46,7 +45,7 @@ public class CerePlatformRoleServiceImpl implements CerePlatformRoleService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void save(RoleSaveParam param, CerePlatformBusiness user) throws CoBusinessException { + public void save(RoleSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time= TimeUtils.yyMMddHHmmss(); CerePlatformRole role=new CerePlatformRole(); role.setRoleName(param.getRoleName()); @@ -60,7 +59,7 @@ public class CerePlatformRoleServiceImpl implements CerePlatformRoleService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void update(RoleUpdateParam param, CerePlatformBusiness user) throws CoBusinessException { + public void update(RoleUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time= TimeUtils.yyMMddHHmmss(); CerePlatformRole role=new CerePlatformRole(); role.setRoleName(param.getRoleName()); @@ -74,7 +73,7 @@ public class CerePlatformRoleServiceImpl implements CerePlatformRoleService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void delete(RoleDeleteParam param, CerePlatformBusiness user) throws CoBusinessException { + public void delete(RoleDeleteParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time =TimeUtils.yyMMddHHmmss(); cerePlatformRoleDAO.deleteByPrimaryKey(param.getRoleId()); //清空关联权限数据 @@ -99,7 +98,7 @@ public class CerePlatformRoleServiceImpl implements CerePlatformRoleService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void distribution(RoleDistributionParam param, CerePlatformBusiness user) throws CoBusinessException { + public void distribution(RoleDistributionParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time =TimeUtils.yyMMddHHmmss(); //根据角色id清空权限数据 cerePlatformRolePermissionService.deleteByRoleId(param.getRoleId()); diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/scene/CereShopSceneService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/scene/CereShopSceneService.java index 92f0f2f..4907406 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/scene/CereShopSceneService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/scene/CereShopSceneService.java @@ -10,7 +10,7 @@ import com.shop.cereshop.business.param.scene.SceneGetAllParam; import com.shop.cereshop.business.param.scene.SceneGetByIdParam; import com.shop.cereshop.business.param.scene.SceneSaveParam; import com.shop.cereshop.business.param.scene.SceneUpdateParam; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.member.CerePlatformMemberLevel; import com.shop.cereshop.commons.domain.scene.CereShopScene; @@ -19,15 +19,15 @@ import com.shop.cereshop.commons.exception.CoBusinessException; import java.util.List; public interface CereShopSceneService { - void save(SceneSaveParam param, CerePlatformBusiness user) throws CoBusinessException,Exception; + void save(SceneSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception; - void update(SceneUpdateParam param, CerePlatformBusiness user) throws CoBusinessException,Exception; + void update(SceneUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception; - void delete(SceneGetByIdParam param, CerePlatformBusiness user) throws CoBusinessException; + void delete(SceneGetByIdParam param, CerePlatformBusinessUser user) throws CoBusinessException; - boolean start(SceneGetByIdParam param, CerePlatformBusiness user) throws CoBusinessException,Exception; + boolean start(SceneGetByIdParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception; - boolean stop(SceneGetByIdParam param, CerePlatformBusiness user) throws CoBusinessException; + boolean stop(SceneGetByIdParam param, CerePlatformBusinessUser user) throws CoBusinessException; ShopSceneDetail getById(Long sceneId) throws CoBusinessException; diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/scene/impl/CereShopSceneServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/scene/impl/CereShopSceneServiceImpl.java index 5f7c831..5169976 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/scene/impl/CereShopSceneServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/scene/impl/CereShopSceneServiceImpl.java @@ -26,7 +26,7 @@ import com.shop.cereshop.business.service.scene.CereShopSceneService; import com.shop.cereshop.commons.constant.CoReturnFormat; import com.shop.cereshop.commons.constant.IntegerEnum; import com.shop.cereshop.commons.constant.StringEnum; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.member.CerePlatformMemberLevel; import com.shop.cereshop.commons.domain.scene.CereShopScene; @@ -71,7 +71,7 @@ public class CereShopSceneServiceImpl implements CereShopSceneService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void save(SceneSaveParam param, CerePlatformBusiness user) throws CoBusinessException,Exception { + public void save(SceneSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception { //查询当前是否存在已启用状态的会员日营销和生日营销 CereShopScene scene=cereShopSceneDAO.checkScene(null,param.getShopId()); if(scene!=null){ @@ -189,7 +189,7 @@ public class CereShopSceneServiceImpl implements CereShopSceneService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void update(SceneUpdateParam param, CerePlatformBusiness user) throws CoBusinessException,Exception { + public void update(SceneUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception { String time = TimeUtils.yyMMddHHmmss(); CereShopScene cereShopScene=new CereShopScene(); cereShopScene.setSceneId(param.getSceneId()); @@ -311,7 +311,7 @@ public class CereShopSceneServiceImpl implements CereShopSceneService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void delete(SceneGetByIdParam param, CerePlatformBusiness user) throws CoBusinessException { + public void delete(SceneGetByIdParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time = TimeUtils.yyMMddHHmmss(); //清空延时任务 stringRedisService.delete(StringEnum.SCENE_START.getCode()+"-"+param.getSceneId()); @@ -325,7 +325,7 @@ public class CereShopSceneServiceImpl implements CereShopSceneService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public boolean start(SceneGetByIdParam param, CerePlatformBusiness user) throws CoBusinessException,Exception { + public boolean start(SceneGetByIdParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception { String time =TimeUtils.yyMMddHHmmss(); //查询当前是否存在已启用状态的会员日营销和生日营销 CereShopScene scene=cereShopSceneDAO.checkScene(param.getSceneId(),param.getShopId()); @@ -351,7 +351,7 @@ public class CereShopSceneServiceImpl implements CereShopSceneService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public boolean stop(SceneGetByIdParam param, CerePlatformBusiness user) throws CoBusinessException { + public boolean stop(SceneGetByIdParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time =TimeUtils.yyMMddHHmmss(); CereShopScene cereShopScene=new CereShopScene(); cereShopScene.setSceneId(param.getSceneId()); diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CerePlatformShopService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CerePlatformShopService.java index 5dbaef6..338c4e2 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CerePlatformShopService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CerePlatformShopService.java @@ -11,10 +11,11 @@ import com.shop.cereshop.business.page.index.OrderConvertDTO; import com.shop.cereshop.business.page.index.UserVisitDTO; import com.shop.cereshop.business.page.shop.Shop; import com.shop.cereshop.business.param.index.IndexParam; +import com.shop.cereshop.business.param.shop.ShopSaveParam; import com.shop.cereshop.business.param.shop.ShopUpdateLogoParam; -import com.shop.cereshop.commons.domain.business.CereBusinessShop; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.shop.CerePlatformShop; +import com.shop.cereshop.commons.domain.user.CerePlatformUser; import com.shop.cereshop.commons.exception.CoBusinessException; import java.util.List; @@ -23,51 +24,19 @@ public interface CerePlatformShopService { CerePlatformShop selectByPrimaryKey(Long shopId); - CerePlatformShop findByShopName(String shopName); - Shop getById(Long shopId) throws CoBusinessException; - /** - * 注册新生支付商家信息 - * @param shopId - * @return - * @throws CoBusinessException - */ - Shop registerByXs(Long shopId) throws CoBusinessException; - - void update(ShopUpdateLogoParam param, CerePlatformBusiness user) throws CoBusinessException; + void update(ShopUpdateLogoParam param, CerePlatformBusinessUser user) throws CoBusinessException; void updateState(CerePlatformShop cerePlatformShop) throws CoBusinessException; - Index index(IndexParam param) throws CoBusinessException; - - CerePlatformShop check(String shopPhone) throws CoBusinessException; - - void insert(CerePlatformShop cerePlatformShop) throws CoBusinessException; - - CerePlatformShop findByPhone(String shopPhone); + void save(ShopSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException; void update(CerePlatformShop cerePlatformShop) throws CoBusinessException; - CerePlatformShop checkShopIdByName(String shopName, Long shopId); - - CerePlatformShop checkShopIdByPhone(String shopPhone, Long shopId); - - Index indexTest(IndexParam param) throws CoBusinessException; + List selectAll(Long businessId); - Integer findPayUsers(Long productId); - - List findIds(); - - Long findShopRoleId(Long id); - - List selectAll(); - - List selectUserVisitForExport(IndexParam param); - - List selectOrderConvertForExport(IndexParam param); - - List selectHotProductForExport(IndexParam param); + CerePlatformShop findByShopName(String shopName); List getByIdList(List shopIdList); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopBankService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopBankService.java index 685c27b..b2d4f70 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopBankService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopBankService.java @@ -9,18 +9,17 @@ import com.shop.cereshop.business.page.shop.ShopBankDetail; import com.shop.cereshop.business.param.bank.BankDeleteParam; import com.shop.cereshop.business.param.bank.BankSaveParam; import com.shop.cereshop.business.param.bank.BankUpdateParam; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.shop.CerePlatformShop; -import com.shop.cereshop.commons.domain.shop.CereShopBank; import com.shop.cereshop.commons.exception.CoBusinessException; import org.apache.ibatis.annotations.Param; public interface CereShopBankService { - void save(BankSaveParam param, CerePlatformBusiness user) throws CoBusinessException; + void save(BankSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException; - void update(BankUpdateParam param, CerePlatformBusiness user) throws CoBusinessException; + void update(BankUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException; - void delete(BankDeleteParam param, CerePlatformBusiness user) throws CoBusinessException; + void delete(BankDeleteParam param, CerePlatformBusinessUser user) throws CoBusinessException; ShopBankDetail getById(@Param("shopId") Long shopId) throws CoBusinessException; diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopBannerService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopBannerService.java index 6299354..ebe2e6c 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopBannerService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopBannerService.java @@ -8,13 +8,13 @@ package com.shop.cereshop.business.service.shop; import com.shop.cereshop.business.page.shop.ShopBanner; import com.shop.cereshop.business.param.banner.BannerSaveParam; import com.shop.cereshop.business.param.banner.BannerUpdateParam; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.exception.CoBusinessException; public interface CereShopBannerService { - void save(BannerSaveParam param, CerePlatformBusiness user) throws CoBusinessException; + void save(BannerSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException; - void update(BannerUpdateParam param, CerePlatformBusiness user) throws CoBusinessException; + void update(BannerUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException; ShopBanner getById(Long bannerId) throws CoBusinessException; } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopCrossDetailService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopCrossDetailService.java index 7dafc9c..4fa69b5 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopCrossDetailService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopCrossDetailService.java @@ -9,8 +9,9 @@ import com.shop.cereshop.business.page.shop.ShopCrossDetail; import com.shop.cereshop.business.param.shop.ShopCrossDetailGetAllParam; import com.shop.cereshop.business.param.shop.ShopCrossDetailSaveParam; import com.shop.cereshop.business.param.shop.ShopCrossDetailUpdateParam; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; +import com.shop.cereshop.commons.domain.shop.CereShopCrossDetail; import com.shop.cereshop.commons.exception.CoBusinessException; public interface CereShopCrossDetailService { @@ -35,7 +36,7 @@ public interface CereShopCrossDetailService { * @return * @throws CoBusinessException */ - int update(ShopCrossDetailUpdateParam shopCrossDetailUpdateParam, CerePlatformBusiness user) throws CoBusinessException; + int update(ShopCrossDetailUpdateParam shopCrossDetailUpdateParam, CerePlatformBusinessUser user) throws CoBusinessException; /** * 插入仓库 @@ -44,7 +45,7 @@ public interface CereShopCrossDetailService { * @return * @throws CoBusinessException */ - int insert(ShopCrossDetailSaveParam shopCrossDetailSaveParam, CerePlatformBusiness user) throws CoBusinessException; + int insert(ShopCrossDetailSaveParam shopCrossDetailSaveParam, CerePlatformBusinessUser user) throws CoBusinessException; /** * 删除仓库 @@ -53,5 +54,11 @@ public interface CereShopCrossDetailService { * @return * @throws CoBusinessException */ - int deleteById(Long storehouseId, CerePlatformBusiness user) throws CoBusinessException; + int deleteById(Long storehouseId, CerePlatformBusinessUser user) throws CoBusinessException; + + CereShopCrossDetail findByShopId(Long shopId); + + void update(CereShopCrossDetail crossDetail) throws CoBusinessException; + + void insert(CereShopCrossDetail crossDetail) throws CoBusinessException; } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopEnterpriseService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopEnterpriseService.java index c3b36cc..032e359 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopEnterpriseService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopEnterpriseService.java @@ -5,19 +5,19 @@ */ package com.shop.cereshop.business.service.shop; -import com.shop.cereshop.business.param.shop.CereShopEnterpriseParam; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; -import com.shop.cereshop.commons.domain.shop.CereShopEnterprise; +import com.shop.cereshop.business.param.business.CereShopEnterpriseParam; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; +import com.shop.cereshop.commons.domain.business.CereShopEnterprise; import com.shop.cereshop.commons.exception.CoBusinessException; public interface CereShopEnterpriseService { - void enterprise(CereShopEnterprise enterprise, CerePlatformBusiness user) throws CoBusinessException; + void enterprise(CereShopEnterprise enterprise, CerePlatformBusinessUser user) throws CoBusinessException; - void updateEnterprise(CereShopEnterprise enterprise, CerePlatformBusiness user) throws CoBusinessException; + void updateEnterprise(CereShopEnterprise enterprise, CerePlatformBusinessUser user) throws CoBusinessException; - CereShopEnterprise findByShopId(Long shopId); + CereShopEnterprise findByBusinessId(Long shopId); - void enterpriseCheck(CereShopEnterpriseParam param, CerePlatformBusiness user) throws CoBusinessException; + void enterpriseCheck(CereShopEnterpriseParam param, CerePlatformBusinessUser user) throws CoBusinessException; - void updateEnterpriseCheck(CereShopEnterpriseParam param, CerePlatformBusiness user) throws CoBusinessException; + void updateEnterpriseCheck(CereShopEnterpriseParam param, CerePlatformBusinessUser user) throws CoBusinessException; } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopExtensionService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopExtensionService.java index 7b1027b..c9d94b7 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopExtensionService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopExtensionService.java @@ -6,14 +6,14 @@ package com.shop.cereshop.business.service.shop; import com.shop.cereshop.business.param.shop.ShopParam; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.shop.CereShopExtension; import com.shop.cereshop.commons.exception.CoBusinessException; import java.util.List; public interface CereShopExtensionService { - void save(CereShopExtension shopExtension, CerePlatformBusiness user) throws CoBusinessException; + void save(CereShopExtension shopExtension, CerePlatformBusinessUser user) throws CoBusinessException; List getAll(ShopParam param) throws CoBusinessException; } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopGroupService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopGroupService.java index 16598df..7d8f48c 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopGroupService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopGroupService.java @@ -9,9 +9,8 @@ import com.shop.cereshop.business.page.group.GroupDetail; import com.shop.cereshop.business.page.order.Product; import com.shop.cereshop.business.param.group.*; import com.shop.cereshop.business.param.product.ProductGetGroupParam; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; -import com.shop.cereshop.commons.domain.product.CereProductClassify; import com.shop.cereshop.commons.domain.shop.CereShopGroup; import com.shop.cereshop.commons.exception.CoBusinessException; @@ -20,11 +19,11 @@ import java.util.List; public interface CereShopGroupService { List getGroupSelect(ProductGetGroupParam param) throws CoBusinessException; - void save(ShopGroupSaveParam group, CerePlatformBusiness user) throws CoBusinessException; + void save(ShopGroupSaveParam group, CerePlatformBusinessUser user) throws CoBusinessException; - void update(ShopGroupUpdateParam group, CerePlatformBusiness user) throws CoBusinessException; + void update(ShopGroupUpdateParam group, CerePlatformBusinessUser user) throws CoBusinessException; - void delete(GroupDeleteParam param, CerePlatformBusiness user) throws CoBusinessException; + void delete(GroupDeleteParam param, CerePlatformBusinessUser user) throws CoBusinessException; GroupDetail getById(Long shopGroupId) throws CoBusinessException; diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopIndividualBusinessesService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopIndividualBusinessesService.java index 4793126..fd41b9c 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopIndividualBusinessesService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopIndividualBusinessesService.java @@ -5,19 +5,19 @@ */ package com.shop.cereshop.business.service.shop; -import com.shop.cereshop.business.param.shop.CereShopIndividualBusinessesParam; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; -import com.shop.cereshop.commons.domain.shop.CereShopIndividualBusinesses; +import com.shop.cereshop.business.param.business.CereShopIndividualBusinessesParam; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; +import com.shop.cereshop.commons.domain.business.CereShopIndividualBusinesses; import com.shop.cereshop.commons.exception.CoBusinessException; public interface CereShopIndividualBusinessesService { - void individual(CereShopIndividualBusinesses individualBusinesses, CerePlatformBusiness user) throws CoBusinessException; + void individual(CereShopIndividualBusinesses individualBusinesses, CerePlatformBusinessUser user) throws CoBusinessException; - void updateIndividual(CereShopIndividualBusinesses individualBusinesses, CerePlatformBusiness user) throws CoBusinessException; + void updateIndividual(CereShopIndividualBusinesses individualBusinesses, CerePlatformBusinessUser user) throws CoBusinessException; - CereShopIndividualBusinesses findByShopId(Long shopId); + CereShopIndividualBusinesses findByBusinessId(Long shopId); - void individualCheck(CereShopIndividualBusinessesParam param, CerePlatformBusiness user) throws CoBusinessException; + void individualCheck(CereShopIndividualBusinessesParam param, CerePlatformBusinessUser user) throws CoBusinessException; - void updateIndividualCheck(CereShopIndividualBusinessesParam param, CerePlatformBusiness user) throws CoBusinessException; + void updateIndividualCheck(CereShopIndividualBusinessesParam param, CerePlatformBusinessUser user) throws CoBusinessException; } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopOtherOrganizationsService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopOtherOrganizationsService.java index 6a0e48a..a9d388e 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopOtherOrganizationsService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopOtherOrganizationsService.java @@ -5,19 +5,19 @@ */ package com.shop.cereshop.business.service.shop; -import com.shop.cereshop.business.param.shop.CereShopOtherOrganizationsParam; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; -import com.shop.cereshop.commons.domain.shop.CereShopOtherOrganizations; +import com.shop.cereshop.business.param.business.CereShopOtherOrganizationsParam; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; +import com.shop.cereshop.commons.domain.business.CereShopOtherOrganizations; import com.shop.cereshop.commons.exception.CoBusinessException; public interface CereShopOtherOrganizationsService { - void organizations(CereShopOtherOrganizations otherOrganizations, CerePlatformBusiness user) throws CoBusinessException; + void organizations(CereShopOtherOrganizations otherOrganizations, CerePlatformBusinessUser user) throws CoBusinessException; - void updateOrganizations(CereShopOtherOrganizations otherOrganizations, CerePlatformBusiness user) throws CoBusinessException; + void updateOrganizations(CereShopOtherOrganizations otherOrganizations, CerePlatformBusinessUser user) throws CoBusinessException; - CereShopOtherOrganizations findByShopId(Long shopId); + CereShopOtherOrganizations findByBusinessId(Long shopId); - void organizationsCheck(CereShopOtherOrganizationsParam param, CerePlatformBusiness user) throws CoBusinessException; + void organizationsCheck(CereShopOtherOrganizationsParam param, CerePlatformBusinessUser user) throws CoBusinessException; - void updateOrganizationsCheck(CereShopOtherOrganizationsParam param, CerePlatformBusiness user) throws CoBusinessException; + void updateOrganizationsCheck(CereShopOtherOrganizationsParam param, CerePlatformBusinessUser user) throws CoBusinessException; } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopPersonalService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopPersonalService.java index f402f3e..089e324 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopPersonalService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopPersonalService.java @@ -5,19 +5,19 @@ */ package com.shop.cereshop.business.service.shop; -import com.shop.cereshop.business.param.shop.CereShopPersonalParam; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; -import com.shop.cereshop.commons.domain.shop.CereShopPersonal; +import com.shop.cereshop.business.param.business.CereShopPersonalParam; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; +import com.shop.cereshop.commons.domain.business.CereShopPersonal; import com.shop.cereshop.commons.exception.CoBusinessException; public interface CereShopPersonalService { - void personal(CereShopPersonal personal, CerePlatformBusiness user) throws CoBusinessException; + void personal(CereShopPersonal personal, CerePlatformBusinessUser user) throws CoBusinessException; - void updatePersonal(CereShopPersonal personal, CerePlatformBusiness user) throws CoBusinessException; + void updatePersonal(CereShopPersonal personal, CerePlatformBusinessUser user) throws CoBusinessException; - CereShopPersonal findByShopId(Long shopId); + CereShopPersonal findByBusinessId(Long shopId); - void personalCheck(CereShopPersonalParam param, CerePlatformBusiness user) throws CoBusinessException; + void personalCheck(CereShopPersonalParam param, CerePlatformBusinessUser user) throws CoBusinessException; - void updatePersonalCheck(CereShopPersonalParam param, CerePlatformBusiness user) throws CoBusinessException; + void updatePersonalCheck(CereShopPersonalParam param, CerePlatformBusinessUser user) throws CoBusinessException; } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopRecruitService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopRecruitService.java index 9109e9d..06f43de 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopRecruitService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopRecruitService.java @@ -6,13 +6,13 @@ package com.shop.cereshop.business.service.shop; import com.shop.cereshop.business.param.recruit.ShopRecruitParam; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.exception.CoBusinessException; public interface CereShopRecruitService { - void save(ShopRecruitParam recruit, CerePlatformBusiness user) throws CoBusinessException; + void save(ShopRecruitParam recruit, CerePlatformBusinessUser user) throws CoBusinessException; - void update(ShopRecruitParam recruit, CerePlatformBusiness user) throws CoBusinessException; + void update(ShopRecruitParam recruit, CerePlatformBusinessUser user) throws CoBusinessException; ShopRecruitParam getByShopId(Long shopId) throws CoBusinessException; } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopRelationshipService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopRelationshipService.java index 05baf94..073080d 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopRelationshipService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopRelationshipService.java @@ -9,15 +9,14 @@ import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.business.param.ship.ShipGetAllParam; import com.shop.cereshop.business.param.ship.ShipSaveParam; import com.shop.cereshop.business.param.ship.ShipUpdateParam; -import com.shop.cereshop.business.param.shop.CereShopRelationshipParam; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.shop.CereShopRelationship; import com.shop.cereshop.commons.exception.CoBusinessException; public interface CereShopRelationshipService { - void save(ShipSaveParam param, CerePlatformBusiness user) throws CoBusinessException,Exception; + void save(ShipSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception; - void update(ShipUpdateParam relationship, CerePlatformBusiness user) throws CoBusinessException,Exception; + void update(ShipUpdateParam relationship, CerePlatformBusinessUser user) throws CoBusinessException,Exception; Page getAll(ShipGetAllParam param) throws CoBusinessException; diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopReturnService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopReturnService.java index d0c9c0f..5e14c49 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopReturnService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopReturnService.java @@ -5,14 +5,14 @@ */ package com.shop.cereshop.business.service.shop; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.shop.CereShopReturn; import com.shop.cereshop.commons.exception.CoBusinessException; public interface CereShopReturnService { CereShopReturn findByShopId(Long shopId); - void updateReturn(CereShopReturn cereShopReturn, CerePlatformBusiness user) throws CoBusinessException; + void updateReturn(CereShopReturn cereShopReturn, CerePlatformBusinessUser user) throws CoBusinessException; void update(CereShopReturn shopReturn) throws CoBusinessException; diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopWithdrawalService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopWithdrawalService.java index b0dba4f..5a5ca8a 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopWithdrawalService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/CereShopWithdrawalService.java @@ -6,9 +6,9 @@ package com.shop.cereshop.business.service.shop; import com.shop.cereshop.business.param.finance.FinanceSaveWithdralwalParam; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.exception.CoBusinessException; public interface CereShopWithdrawalService { - void save(FinanceSaveWithdralwalParam withdrawal, CerePlatformBusiness user) throws CoBusinessException; + void save(FinanceSaveWithdralwalParam withdrawal, CerePlatformBusinessUser user) throws CoBusinessException; } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CerePlatformShopServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CerePlatformShopServiceImpl.java index e7f1a92..93e11fe 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CerePlatformShopServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CerePlatformShopServiceImpl.java @@ -5,38 +5,27 @@ */ package com.shop.cereshop.business.service.shop.impl; -import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.shop.cereshop.business.dao.buyer.CereBuyerUserDAO; -import com.shop.cereshop.business.dao.order.CereShopOrderDAO; -import com.shop.cereshop.business.dao.product.CereProductStatsByDayDAO; import com.shop.cereshop.business.dao.shop.CerePlatformShopDAO; -import com.shop.cereshop.business.dao.shop.CereShopVisitDAO; -import com.shop.cereshop.business.page.index.*; import com.shop.cereshop.business.page.shop.Shop; -import com.shop.cereshop.business.page.shop.ShopConversion; -import com.shop.cereshop.business.param.index.IndexParam; +import com.shop.cereshop.business.param.shop.ShopSaveParam; import com.shop.cereshop.business.param.shop.ShopUpdateLogoParam; -import com.shop.cereshop.business.pay.xs.service.XsPayService; -import com.shop.cereshop.business.pay.xs.service.impl.XsPayServiceImpl; +import com.shop.cereshop.business.service.common.CommonService; import com.shop.cereshop.business.service.log.CerePlatformLogService; -import com.shop.cereshop.business.service.shop.*; -import com.shop.cereshop.business.utils.EncodeUtil; +import com.shop.cereshop.business.service.shop.CerePlatformShopService; +import com.shop.cereshop.business.service.shop.CereShopCrossDetailService; +import com.shop.cereshop.business.service.shop.CereShopReturnService; +import com.shop.cereshop.commons.constant.CoReturnFormat; import com.shop.cereshop.commons.constant.IntegerEnum; -import com.shop.cereshop.commons.constant.ParamEnum; -import com.shop.cereshop.commons.domain.business.CereBusinessShop; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; -import com.shop.cereshop.commons.domain.buyer.CereBuyerUser; -import com.shop.cereshop.commons.domain.order.CereShopOrder; -import com.shop.cereshop.commons.domain.product.CereProductStatsByDay; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.shop.CerePlatformShop; +import com.shop.cereshop.commons.domain.shop.CereShopCrossDetail; import com.shop.cereshop.commons.domain.shop.CereShopReturn; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.utils.EmptyUtils; -import com.shop.cereshop.commons.utils.StringUtils; import com.shop.cereshop.commons.utils.TimeUtils; import lombok.extern.slf4j.Slf4j; -import org.apache.commons.collections4.CollectionUtils; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -44,12 +33,7 @@ import org.springframework.transaction.annotation.Isolation; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.HashMap; import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; @Slf4j @Service @@ -62,37 +46,13 @@ public class CerePlatformShopServiceImpl implements CerePlatformShopService { private CereShopReturnService cereShopReturnService; @Autowired - private CereShopPersonalService cereShopPersonalService; - - @Autowired - private CereShopIndividualBusinessesService cereShopIndividualBusinessesService; - - @Autowired - private CereShopEnterpriseService cereShopEnterpriseService; - - @Autowired - private CereShopOtherOrganizationsService cereShopOtherOrganizationsService; - - @Autowired private CerePlatformLogService cerePlatformLogService; @Autowired - private XsPayService xsPayService; - - @Autowired - private CereShopVisitDAO cereShopVisitDAO; - - @Autowired - private CereBuyerUserDAO cereBuyerUserDAO; - - @Autowired - private CereShopOrderDAO cereShopOrderDAO; - - @Autowired - private CereProductStatsByDayDAO cereProductStatsByDayDAO; + private CommonService commonService; @Autowired - private EncodeUtil encodeUtil; + private CereShopCrossDetailService cereShopCrossDetailService; @Override public CerePlatformShop selectByPrimaryKey(Long shopId) { @@ -100,11 +60,6 @@ public class CerePlatformShopServiceImpl implements CerePlatformShopService { } @Override - public CerePlatformShop findByShopName(String shopName) { - return cerePlatformShopDAO.findByShopName(shopName); - } - - @Override public Shop getById(Long shopId) throws CoBusinessException { //查询店铺信息 Shop shop=cerePlatformShopDAO.findShop(shopId); @@ -112,41 +67,14 @@ public class CerePlatformShopServiceImpl implements CerePlatformShopService { //查询店铺退货地址信息 CereShopReturn cereShopReturn=cereShopReturnService.findByShopId(shopId); shop.setShopReturn(cereShopReturn); - //查询认证数据 - if(IntegerEnum.getByName("主体类型-个人").equals(shop.getAuthenType())){ - //个人认证 - shop.setPersonal(cereShopPersonalService.findByShopId(shopId)); - }else if(IntegerEnum.getByName("主体类型-个体工商户").equals(shop.getAuthenType())){ - //个体工商户户认证 - shop.setIndividualBusinesses(cereShopIndividualBusinessesService.findByShopId(shopId)); - }else if(IntegerEnum.getByName("主体类型-企业").equals(shop.getAuthenType())){ - //企业认证 - shop.setEnterprise(cereShopEnterpriseService.findByShopId(shopId)); - }else if(IntegerEnum.getByName("主体类型-其他组织").equals(shop.getAuthenType())){ - //其他组织认证 - shop.setOtherOrganizations(cereShopOtherOrganizationsService.findByShopId(shopId)); + if(shop.getShopReturn() == null){ + shop.setShopReturn(new CereShopReturn()); } - } - return shop; - } - @Override - public Shop registerByXs(Long shopId) throws CoBusinessException { - Shop shop=cerePlatformShopDAO.findShop(shopId); - - if(StringUtils.isEmpty(shop.getXsPayId())){ - //如果不为空则是之前已经注册了,为空表示需要注册 - try { - String responeMsg = xsPayService.registerByXs(shopId, "0"); - JSONObject jsonObject = JSONObject.parseObject(responeMsg); - String shareParId = jsonObject.getJSONObject("content").getString("shareParId"); - shop.setXsPayId(shareParId); - CerePlatformShop cerePlatformShop = new CerePlatformShop(); - cerePlatformShop.setShopId(shopId); - cerePlatformShop.setXsPayId(shareParId); - cerePlatformShopDAO.updateById(cerePlatformShop); - } catch (Exception e) { - throw new RuntimeException(e); + CereShopCrossDetail crossDetail = cereShopCrossDetailService.findByShopId(shopId); + shop.setCrossDetail(crossDetail); + if(shop.getCrossDetail() == null){ + shop.setCrossDetail(new CereShopCrossDetail()); } } return shop; @@ -154,17 +82,9 @@ public class CerePlatformShopServiceImpl implements CerePlatformShopService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void update(ShopUpdateLogoParam param, CerePlatformBusiness user) throws CoBusinessException { + public void update(ShopUpdateLogoParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time= TimeUtils.yyMMddHHmmss(); - CerePlatformShop cerePlatformShop=new CerePlatformShop(); - cerePlatformShop.setShopId(param.getShopId()); - cerePlatformShop.setShopLogo(param.getShopLogo()); - cerePlatformShop.setShopName(param.getShopName()); - cerePlatformShop.setShopBrief(param.getShopBrief()); - cerePlatformShop.setShopAdress(param.getShopAdress()); - cerePlatformShop.setShopPhone(param.getShopPhone()); - cerePlatformShop.setShareDays(param.getShareDays()); - cerePlatformShop.setUpdateTime(time); + CerePlatformShop cerePlatformShop = getCerePlatformShop(param, time); cerePlatformShopDAO.updateByPrimaryKeySelective(cerePlatformShop); if(!EmptyUtils.isEmpty(param.getShopReturn())){ //查询是否有退货地址信息 @@ -180,311 +100,120 @@ public class CerePlatformShopServiceImpl implements CerePlatformShopService { cereShopReturnService.insert(param.getShopReturn()); } } - //新增日志 - cerePlatformLogService.addLog(user,"店铺管理","商户端操作","修改店铺logo",cerePlatformShop.getShopId(),time); - } - - @Override - public void updateState(CerePlatformShop cerePlatformShop) throws CoBusinessException { - cerePlatformShopDAO.updateState(cerePlatformShop); - } - - @Override - public Index index(IndexParam param) throws CoBusinessException { - Index index=new Index(); - //查询今日店铺访问人数 - index.setTotal(cerePlatformShopDAO.getTotal(param.getShopId())); - //查询今日待处理订单数 - index.setStayOrders(cerePlatformShopDAO.getStayOrders(param.getShopId())); - //查询今日待处理售后订单数 - index.setStayAfters(cerePlatformShopDAO.getStayAfters(param.getShopId())); - //查询今日成交金额 - index.setMoney(cerePlatformShopDAO.getMoney(param.getShopId())); - //根据时间条件获取对应统计时间数据 - List weeks = getVisitWeeks(param.getCondition()); - //查询月度访问人数数据 - VisitWeek visitWeek=new VisitWeek(); - List weekDayVisitCountList = new ArrayList<>(); - for (String weekDay:weeks) { - String startTime = weekDay + " 00:00:00"; - String endTime = weekDay + " 23:59:59"; - Integer visitCount = cerePlatformShopDAO.getVisit(param.getShopId(), startTime, endTime); - weekDayVisitCountList.add(visitCount); - } - //设置总访问人数 - String startTime = weeks.get(0) + " 00:00:00"; - String endTime = weeks.get(weeks.size() - 1) + " 23:59:59"; - index.setCount(cerePlatformShopDAO.getVisit(param.getShopId(), startTime, endTime)); - - visitWeek.setTotal(weekDayVisitCountList); - visitWeek.setTime(weeks); - index.setVisitWeek(visitWeek); - //查询订单转化数据 - ShopConversion shopConversion=new ShopConversion(); - //初始化文字描述 - List names=new ArrayList<>(); - List rates=new ArrayList<>(); - //查询访问人数 - BigDecimal visits = cerePlatformShopDAO.findVisits(param.getShopId(), param.getCondition(), ParamEnum.CONVERSION_VISIT.getCode()); - //查询加购人数 - BigDecimal carts = cerePlatformShopDAO.findVisits(param.getShopId(), param.getCondition(), ParamEnum.CONVERSION_CART.getCode()); - //查询结算人数 - BigDecimal checks = cerePlatformShopDAO.findVisits(param.getShopId(), param.getCondition(), ParamEnum.CONVERSION_CHECK.getCode()); - //查询调取支付人数 - BigDecimal pays = cerePlatformShopDAO.findVisits(param.getShopId(), param.getCondition(), ParamEnum.CONVERSION_PAY.getCode()); - //查询支付成功人数 - BigDecimal success = cerePlatformShopDAO.findVisits(param.getShopId(), param.getCondition(), ParamEnum.CONVERSION_PAY_SUCCESS.getCode()); - //计算转化率 - BigDecimal hundred=new BigDecimal(100); - if(!EmptyUtils.isEmptyBigdecimal(visits)){ - names.add("访问"); - rates.add(hundred); - if(!EmptyUtils.isEmptyBigdecimal(carts)){ - names.add("加购"); - rates.add(carts.divide(visits,2,BigDecimal.ROUND_HALF_UP).multiply(hundred).setScale(0,BigDecimal.ROUND_HALF_UP)); - } - if(!EmptyUtils.isEmptyBigdecimal(checks)){ - names.add("结算"); - rates.add(checks.divide(visits,2,BigDecimal.ROUND_HALF_UP).multiply(hundred).setScale(0,BigDecimal.ROUND_HALF_UP)); - } - if(!EmptyUtils.isEmptyBigdecimal(pays)){ - names.add("调取支付"); - rates.add(pays.divide(visits,2,BigDecimal.ROUND_HALF_UP).multiply(hundred).setScale(0,BigDecimal.ROUND_HALF_UP)); - } - if(!EmptyUtils.isEmptyBigdecimal(success)){ - names.add("支付成功"); - rates.add(success.divide(visits,2,BigDecimal.ROUND_HALF_UP).multiply(hundred).setScale(0,BigDecimal.ROUND_HALF_UP)); + if(!EmptyUtils.isEmpty(param.getCrossDetail())){ + //查询是否有跨境设置 + CereShopCrossDetail crossDetail = cereShopCrossDetailService.findByShopId(param.getShopId()); + if(crossDetail!=null){ + //更新退货地址 + crossDetail.setEbpname(param.getShopReturn().getReturnAdress()); + crossDetail.setEbpcode(param.getShopReturn().getReturnPerson()); + cereShopCrossDetailService.update(crossDetail); + }else { + param.getCrossDetail().setShopId(param.getShopId()); + cereShopCrossDetailService.insert(param.getCrossDetail()); } - shopConversion.setRates(rates); - } - shopConversion.setNames(names); - index.setConversion(shopConversion); - //计算总的转化数 - BigDecimal rate=carts.add(checks).add(pays).add(success); - //计算总转化率=(加购人数+结账人数+调用支付人数+支付成功人数)/访问人数 - if(!EmptyUtils.isEmptyBigdecimal(rate)&&!EmptyUtils.isEmptyBigdecimal(visits)){ - index.setRate(rate.divide(visits,2,BigDecimal.ROUND_HALF_UP).multiply(hundred).setScale(0,BigDecimal.ROUND_HALF_UP)); } - //根据时间条件查询热卖商品数据(10条) - List products=cerePlatformShopDAO.getHotProducts(param.getShopId(),param.getCondition()); - index.setHotSellProducts(products); - return index; - } - - @Override - public Index indexTest(IndexParam param) throws CoBusinessException { - Index index=new Index(); - //查询今日店铺访问人数 - index.setTotal(12); - //查询今日待处理订单数 - index.setStayOrders(123); - //查询今日待处理售后订单数 - index.setStayAfters(321); - //查询今日成交金额 - index.setMoney(new BigDecimal(54665)); - //根据时间条件获取对应统计时间数据 - List weeks = getVisitWeeks(param.getCondition()); - List total=new ArrayList<>(); - //查询月度访问人数数据 - if(!EmptyUtils.isEmpty(weeks)){ - weeks.forEach(a -> { - total.add(20); - }); - } - VisitWeek visitWeek=new VisitWeek(); - visitWeek.setTime(weeks); - visitWeek.setTotal(total); - index.setVisitWeek(visitWeek); - //查询订单转化数据 - ShopConversion shopConversion=new ShopConversion(); - List names=new ArrayList<>(); - names.add("访问"); - names.add("加购"); - names.add("结算"); - names.add("调取支付"); - names.add("支付成功"); - List rates=new ArrayList<>(); - rates.add(new BigDecimal(100)); - rates.add(new BigDecimal(5)); - rates.add(new BigDecimal(12)); - rates.add(new BigDecimal(12)); - rates.add(new BigDecimal(32)); - shopConversion.setNames(names); - shopConversion.setRates(rates); - //计算转化率 - index.setConversion(shopConversion); - //根据时间条件查询热卖商品数据(10条) - List products=new ArrayList<>(); - products.add(new HotSellProduct("牛油果",23)); - products.add(new HotSellProduct("牛肉粒",23)); - products.add(new HotSellProduct("坚果",23)); - products.add(new HotSellProduct("iphone12",23)); - products.add(new HotSellProduct("小苏打饼干",23)); - products.add(new HotSellProduct("薯片",23)); - products.add(new HotSellProduct("辣条",23)); - products.add(new HotSellProduct("肥宅水",23)); - products.add(new HotSellProduct("电饭煲",23)); - products.add(new HotSellProduct("笔记本电脑",23)); - index.setHotSellProducts(products); - index.setCount(156); - index.setRate(new BigDecimal(23)); - return index; + //新增日志 + cerePlatformLogService.addLog(user,"店铺管理","商户端操作","修改店铺logo",cerePlatformShop.getShopId(),time); } - @Override - public Integer findPayUsers(Long productId) { - return cerePlatformShopDAO.findPayUsers(productId); + private static CerePlatformShop getCerePlatformShop(ShopUpdateLogoParam param, String time) { + CerePlatformShop cerePlatformShop=new CerePlatformShop(); + cerePlatformShop.setShopId(param.getShopId()); + cerePlatformShop.setShopLogo(param.getShopLogo()); + cerePlatformShop.setShopName(param.getShopName()); + cerePlatformShop.setShopBrief(param.getShopBrief()); + cerePlatformShop.setShopAdress(param.getShopAdress()); + cerePlatformShop.setShopPhone(param.getShopPhone()); + cerePlatformShop.setShareDays(param.getShareDays()); + cerePlatformShop.setUpdateTime(time); + return cerePlatformShop; } @Override - public List findIds() { - return cerePlatformShopDAO.findIds(); + public void updateState(CerePlatformShop cerePlatformShop) throws CoBusinessException { + cerePlatformShopDAO.updateByPrimaryKeySelective(cerePlatformShop); } - @Override - public Long findShopRoleId(Long id) { - return cerePlatformShopDAO.findShopRoleId(id); - } @Override - public List selectAll() { - return cerePlatformShopDAO.selectAll(); + public List selectAll(Long businessId) { + return cerePlatformShopDAO.selectAll(businessId); } @Override - public List selectUserVisitForExport(IndexParam param) { - List days = getVisitWeeks(param.getCondition()); - List visitDTOList = new ArrayList<>(); - Map purchaseCountMap = new HashMap<>(); - for (String day:days) { - List userVisitList = cereShopVisitDAO.selectDistinctVisitUser(param.getShopId(), day + " 00:00:00", day + "23:59:59"); - log.info("userVisitList {}", userVisitList.size()); - if (CollectionUtils.isNotEmpty(userVisitList)) { - Map visitCountMap = userVisitList.stream().collect(Collectors.toMap(UserVisitDTO::getBuyerUserId, UserVisitDTO::getVisitCount)); - List userList = cereBuyerUserDAO.selectBatchIds(userVisitList - .stream().map(UserVisitDTO::getBuyerUserId).collect(Collectors.toList())); - log.info("userList {}", userList); - for (CereBuyerUser user:userList) { - UserVisitDTO visitDTO = new UserVisitDTO(); - visitDTO.setDate(day); - visitDTO.setBuyerUserId(user.getBuyerUserId()); - visitDTO.setNickName(encodeUtil.encodeInfo(user.getName())); - visitDTO.setPhone(encodeUtil.encodePhone(user.getPhone())); - visitDTO.setRegisterDate(user.getCreateTime()); - Integer purchaseCount = purchaseCountMap.get(user.getBuyerUserId()); - if (purchaseCount == null) { - purchaseCount = cereShopOrderDAO.selectCount(Wrappers.lambdaQuery() - .eq(CereShopOrder::getBuyerUserId, user.getBuyerUserId()) - .eq(CereShopOrder::getPaymentState, IntegerEnum.YES.getCode())); - purchaseCountMap.put(user.getBuyerUserId(), purchaseCount); - } - visitDTO.setRepurchase(purchaseCount > 1 ? IntegerEnum.YES.getName() : IntegerEnum.NO.getName()); - visitDTO.setTerminal(IntegerEnum.terminalMap.get(user.getTerminal()).getName()); - visitDTO.setVisitCount(visitCountMap.get(user.getBuyerUserId())); - visitDTOList.add(visitDTO); - } - } + public CerePlatformShop findByShopName(String shopName) { + List cerePlatformShopList = cerePlatformShopDAO.selectList(Wrappers.lambdaQuery().eq(CerePlatformShop::getShopName, shopName)); + if(CollectionUtils.isNotEmpty(cerePlatformShopList)){ + return cerePlatformShopList.get(0); } - return visitDTOList; + return null; } - @Override - public List selectOrderConvertForExport(IndexParam param) { - List days = getVisitWeeks(param.getCondition()); - String startTime = days.get(0) + " 00:00:00"; - String endTime = days.get(days.size() - 1) + " 23:59:59"; - List list1 = cereShopOrderDAO.selectWaitToPayStatsByDate(param.getShopId(), startTime, endTime); - List list2 = cereShopOrderDAO.selectPayStatsByDate(param.getShopId(), startTime, endTime); - List list3 = cereShopOrderDAO.selectDeliverStatsByDate(param.getShopId(), startTime, endTime); - List list4 = cereShopOrderDAO.selectAfterSaleStatsByDate(param.getShopId(), startTime, endTime); - Map map1 = list1.stream().collect(Collectors.toMap(OrderConvertDTO::getDate, OrderConvertDTO::getWaitToPayCount)); - Map map2 = list2.stream().collect(Collectors.toMap(OrderConvertDTO::getDate, OrderConvertDTO::getPayCount)); - Map map3 = list3.stream().collect(Collectors.toMap(OrderConvertDTO::getDate, OrderConvertDTO::getDeliverCount)); - Map map4 = list4.stream().collect(Collectors.toMap(OrderConvertDTO::getDate, OrderConvertDTO::getAfterSaleCount)); - List result = new ArrayList<>(); - for (String day:days) { - OrderConvertDTO dto = new OrderConvertDTO(); - dto.setDate(day); - dto.setWaitToPayCount(map1.getOrDefault(day, 0)); - dto.setPayCount(map2.getOrDefault(day, 0)); - dto.setDeliverCount(map3.getOrDefault(day, 0)); - dto.setAfterSaleCount(map4.getOrDefault(day, 0)); - result.add(dto); - } - return result; - } @Override - public List selectHotProductForExport(IndexParam param) { - List days = getVisitWeeks(param.getCondition()); - String startTime = days.get(0); - String endTime = days.get(days.size() - 1); - List result = new ArrayList<>(); - List statsList = cereProductStatsByDayDAO.selectStatsByTime(param.getShopId(), startTime, endTime); - for (CereProductStatsByDay stat:statsList) { - HotProductDTO dto = new HotProductDTO(); - BeanUtils.copyProperties(stat, dto); - dto.setDate(stat.getCreateDate()); - result.add(dto); + public void save(ShopSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException { + CerePlatformShop shop=findByShopName(param.getShopName()); + if(shop!=null){ + throw new CoBusinessException(CoReturnFormat.SHOP_NAME_ALREADY); } - return result; - } - @Override - public CerePlatformShop check(String shopPhone) throws CoBusinessException{ - return cerePlatformShopDAO.check(shopPhone); - } + List cerePlatformShopList = cerePlatformShopDAO.selectList(Wrappers.lambdaQuery().eq(CerePlatformShop::getBusinessId, user.getBusinessId())); + if(CollectionUtils.isNotEmpty(cerePlatformShopList) && cerePlatformShopList.size() >= 10){ + throw new CoBusinessException("10000","一个商家最多只能拥有10个店铺", ""); + } - @Override - public void insert(CerePlatformShop cerePlatformShop) throws CoBusinessException { + //新建商家数据 + String time= TimeUtils.yyMMddHHmmss(); + CerePlatformShop cerePlatformShop=new CerePlatformShop(); + BeanUtils.copyProperties(param, cerePlatformShop); + //生成店铺编号 + String shopCode=commonService.getShopCode(); + cerePlatformShop.setShopCode(shopCode); + cerePlatformShop.setAuthenticationState(IntegerEnum.APPROVED.getCode()); + cerePlatformShop.setCheckState(IntegerEnum.ADOPT.getCode()); + cerePlatformShop.setState(IntegerEnum.YES.getCode()); + cerePlatformShop.setCreateTime(time); + cerePlatformShop.setUpdateTime(time); cerePlatformShopDAO.insert(cerePlatformShop); - } - @Override - public CerePlatformShop findByPhone(String shopPhone) { - return cerePlatformShopDAO.findByPhone(shopPhone); - } + if(!EmptyUtils.isEmpty(param.getShopReturn())){ + //查询是否有退货地址信息 + CereShopReturn shopReturn=cereShopReturnService.findByShopId(cerePlatformShop.getShopId()); + if(shopReturn!=null){ + //更新退货地址 + shopReturn.setReturnAdress(param.getShopReturn().getReturnAdress()); + shopReturn.setReturnPerson(param.getShopReturn().getReturnPerson()); + shopReturn.setReturnPhone(param.getShopReturn().getReturnPhone()); + cereShopReturnService.update(shopReturn); + }else { + param.getShopReturn().setShopId(cerePlatformShop.getShopId()); + cereShopReturnService.insert(param.getShopReturn()); + } + } - @Override - public void update(CerePlatformShop cerePlatformShop) throws CoBusinessException { - cerePlatformShopDAO.updateByPrimaryKeySelective(cerePlatformShop); - } + if(!EmptyUtils.isEmpty(param.getCrossDetail())){ + //查询是否有跨境设置 + CereShopCrossDetail crossDetail = cereShopCrossDetailService.findByShopId(cerePlatformShop.getShopId()); + if(crossDetail!=null){ + //更新退货地址 + crossDetail.setEbpname(param.getShopReturn().getReturnAdress()); + crossDetail.setEbpcode(param.getShopReturn().getReturnPerson()); + cereShopCrossDetailService.update(crossDetail); + }else { + param.getCrossDetail().setShopId(cerePlatformShop.getShopId()); + cereShopCrossDetailService.insert(param.getCrossDetail()); + } + } - @Override - public CerePlatformShop checkShopIdByName(String shopName, Long shopId) { - return cerePlatformShopDAO.checkShopIdByName(shopName,shopId); + //新增日志 + cerePlatformLogService.addLog(user,"店铺管理","商家端操作","添加店铺", cerePlatformShop.getShopId(), time); } @Override - public CerePlatformShop checkShopIdByPhone(String shopPhone, Long shopId) { - return cerePlatformShopDAO.checkShopIdByPhone(shopPhone,shopId); - } - - private List getVisitWeeks(Integer condition) { - List weeks=new ArrayList<>(); - if(IntegerEnum.CONDITION_TODAY.getCode().equals(condition)){ - //封装今日时间 - weeks.add(TimeUtils.today()); - }else if(IntegerEnum.CONDITION_YESTERDAY.getCode().equals(condition)){ - //封装昨日时间 - weeks.add(TimeUtils.yesterday()); - }else if(IntegerEnum.CONDITION_WEEK.getCode().equals(condition)){ - //封装近7天时间 - weeks=TimeUtils.getRecentSevenDay(); - }else if(IntegerEnum.CONDITION_THIRD.getCode().equals(condition)){ - //封装过去30天 - String today = TimeUtils.today(); - try { - for (int i=29;i>0;i--) { - weeks.add(TimeUtils.getMoreDayAfter(today + " 00:00:00", -1 * i).substring(0, 10)); - } - } catch (Exception e) { - e.printStackTrace(); - } - weeks.add(today); - } - return weeks; + public void update(CerePlatformShop cerePlatformShop) throws CoBusinessException { + cerePlatformShopDAO.updateByPrimaryKeySelective(cerePlatformShop); } @Override diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopBankServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopBankServiceImpl.java index 5d894d4..85e2c3d 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopBankServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopBankServiceImpl.java @@ -14,7 +14,7 @@ import com.shop.cereshop.business.param.bank.BankUpdateParam; import com.shop.cereshop.business.pay.xs.service.XsPayService; import com.shop.cereshop.business.service.log.CerePlatformLogService; import com.shop.cereshop.business.service.shop.CereShopBankService; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.shop.CerePlatformShop; import com.shop.cereshop.commons.domain.shop.CereShopBank; import com.shop.cereshop.commons.exception.CoBusinessException; @@ -40,7 +40,7 @@ public class CereShopBankServiceImpl implements CereShopBankService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void save(BankSaveParam param, CerePlatformBusiness user) throws CoBusinessException { + public void save(BankSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time= TimeUtils.yyMMddHHmmss(); CereShopBank cereShopBank=new CereShopBank(); cereShopBank.setShopId(param.getShopId()); @@ -66,7 +66,7 @@ public class CereShopBankServiceImpl implements CereShopBankService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void update(BankUpdateParam param, CerePlatformBusiness user) throws CoBusinessException { + public void update(BankUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time= TimeUtils.yyMMddHHmmss(); CereShopBank cereShopBank=new CereShopBank(); cereShopBank.setShopId(param.getShopId()); @@ -92,7 +92,7 @@ public class CereShopBankServiceImpl implements CereShopBankService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void delete(BankDeleteParam param, CerePlatformBusiness user) throws CoBusinessException { + public void delete(BankDeleteParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time= TimeUtils.yyMMddHHmmss(); CereShopBank cereShopBank=new CereShopBank(); cereShopBank.setShopId(param.getShopId()); diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopBannerServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopBannerServiceImpl.java index 9daa244..d89927e 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopBannerServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopBannerServiceImpl.java @@ -12,7 +12,7 @@ import com.shop.cereshop.business.param.banner.BannerUpdateParam; import com.shop.cereshop.business.service.log.CerePlatformLogService; import com.shop.cereshop.business.service.shop.CereShopBannerService; import com.shop.cereshop.commons.constant.IntegerEnum; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.shop.CereShopBanner; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.utils.EmptyUtils; @@ -36,7 +36,7 @@ public class CereShopBannerServiceImpl implements CereShopBannerService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void save(BannerSaveParam param, CerePlatformBusiness user) throws CoBusinessException { + public void save(BannerSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time= TimeUtils.yyMMddHHmmss(); CereShopBanner cereShopBanner=new CereShopBanner(); cereShopBanner.setShopId(param.getShopId()); @@ -51,7 +51,7 @@ public class CereShopBannerServiceImpl implements CereShopBannerService { } @Override - public void update(BannerUpdateParam param, CerePlatformBusiness user) throws CoBusinessException { + public void update(BannerUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time= TimeUtils.yyMMddHHmmss(); CereShopBanner cereShopBanner=new CereShopBanner(); cereShopBanner.setBannerId(param.getBannerId()); diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopCrossDetailServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopCrossDetailServiceImpl.java index f739c37..d66ddc9 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopCrossDetailServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopCrossDetailServiceImpl.java @@ -6,6 +6,7 @@ package com.shop.cereshop.business.service.shop.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.shop.cereshop.business.dao.shop.CereShopCrossDetailDAO; @@ -15,7 +16,7 @@ import com.shop.cereshop.business.param.shop.ShopCrossDetailSaveParam; import com.shop.cereshop.business.param.shop.ShopCrossDetailUpdateParam; import com.shop.cereshop.business.service.log.CerePlatformLogService; import com.shop.cereshop.business.service.shop.CereShopCrossDetailService; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.shop.CereShopCrossDetail; import com.shop.cereshop.commons.exception.CoBusinessException; @@ -65,7 +66,7 @@ public class CereShopCrossDetailServiceImpl implements CereShopCrossDetailServic @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public int update(ShopCrossDetailUpdateParam shopCrossDetailUpdateParam, CerePlatformBusiness user) throws CoBusinessException { + public int update(ShopCrossDetailUpdateParam shopCrossDetailUpdateParam, CerePlatformBusinessUser user) throws CoBusinessException { CereShopCrossDetail cereShopCrossDetail = new CereShopCrossDetail(); BeanUtils.copyProperties(shopCrossDetailUpdateParam, cereShopCrossDetail); int result = cereShopCrossDetailDAO.updateById(cereShopCrossDetail); @@ -76,7 +77,7 @@ public class CereShopCrossDetailServiceImpl implements CereShopCrossDetailServic @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public int insert(ShopCrossDetailSaveParam shopCrossDetailSaveParam, CerePlatformBusiness user) throws CoBusinessException { + public int insert(ShopCrossDetailSaveParam shopCrossDetailSaveParam, CerePlatformBusinessUser user) throws CoBusinessException { CereShopCrossDetail cereShopCrossDetail = new CereShopCrossDetail(); BeanUtils.copyProperties(shopCrossDetailSaveParam, cereShopCrossDetail); int result = cereShopCrossDetailDAO.insert(cereShopCrossDetail); @@ -87,7 +88,7 @@ public class CereShopCrossDetailServiceImpl implements CereShopCrossDetailServic @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public int deleteById(Long crossDetailId, CerePlatformBusiness user) throws CoBusinessException { + public int deleteById(Long crossDetailId, CerePlatformBusinessUser user) throws CoBusinessException { CereShopCrossDetail cereShopCrossDetail=new CereShopCrossDetail(); cereShopCrossDetail.setCrossDetailId(crossDetailId); int result = cereShopCrossDetailDAO.deleteById(cereShopCrossDetail); @@ -95,4 +96,23 @@ public class CereShopCrossDetailServiceImpl implements CereShopCrossDetailServic cerePlatformLogService.addLog(user,"店铺管理","商户端操作","删除跨境信息",cereShopCrossDetail.getCrossDetailId()); return result; } + + @Override + public CereShopCrossDetail findByShopId(Long shopId){ + List crossDetailList = cereShopCrossDetailDAO.selectList(Wrappers.lambdaQuery().in(CereShopCrossDetail::getShopId, shopId)); + if(crossDetailList != null && !crossDetailList.isEmpty()){ + return crossDetailList.get(0); + } + return null; + } + + @Override + public void update(CereShopCrossDetail crossDetail) throws CoBusinessException { + cereShopCrossDetailDAO.updateById(crossDetail); + } + + @Override + public void insert(CereShopCrossDetail crossDetail) throws CoBusinessException { + cereShopCrossDetailDAO.insert(crossDetail); + } } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopEnterpriseServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopEnterpriseServiceImpl.java index 473337e..2360b9d 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopEnterpriseServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopEnterpriseServiceImpl.java @@ -6,19 +6,19 @@ package com.shop.cereshop.business.service.shop.impl; import com.shop.cereshop.business.dao.shop.CereShopEnterpriseDAO; -import com.shop.cereshop.business.param.shop.CereShopEnterpriseParam; -import com.shop.cereshop.business.service.business.CereBusinessShopService; +import com.shop.cereshop.business.param.business.CereShopEnterpriseParam; +import com.shop.cereshop.business.service.business.CereBusinessUserService; import com.shop.cereshop.business.service.business.CerePlatformBusinessService; +import com.shop.cereshop.business.service.business.CerePlatformBusinessUserService; import com.shop.cereshop.business.service.common.CommonService; import com.shop.cereshop.business.service.log.CerePlatformLogService; -import com.shop.cereshop.business.service.shop.CerePlatformShopService; import com.shop.cereshop.business.service.shop.CereShopEnterpriseService; import com.shop.cereshop.business.utils.TokenProvider; import com.shop.cereshop.commons.constant.IntegerEnum; -import com.shop.cereshop.commons.domain.business.CereBusinessShop; +import com.shop.cereshop.commons.domain.business.CereBusinessUser; import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; -import com.shop.cereshop.commons.domain.shop.CerePlatformShop; -import com.shop.cereshop.commons.domain.shop.CereShopEnterprise; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; +import com.shop.cereshop.commons.domain.business.CereShopEnterprise; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.utils.EncryptUtil; import com.shop.cereshop.commons.utils.TimeUtils; @@ -36,16 +36,16 @@ public class CereShopEnterpriseServiceImpl implements CereShopEnterpriseService private CereShopEnterpriseDAO cereShopEnterpriseDAO; @Autowired - private CerePlatformShopService cerePlatformShopService; + private CerePlatformBusinessService cerePlatformBusinessService; @Autowired private CommonService commonService; @Autowired - private CerePlatformBusinessService cerePlatformBusinessService; + private CerePlatformBusinessUserService cerePlatformBusinessUserService; @Autowired - private CereBusinessShopService cereBusinessShopService; + private CereBusinessUserService cereBusinessUserService; @Autowired private CerePlatformLogService cerePlatformLogService; @@ -55,104 +55,105 @@ public class CereShopEnterpriseServiceImpl implements CereShopEnterpriseService @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void enterprise(CereShopEnterprise enterprise, CerePlatformBusiness user) throws CoBusinessException { + public void enterprise(CereShopEnterprise enterprise, CerePlatformBusinessUser user) throws CoBusinessException { String time= TimeUtils.yyMMddHHmmss(); enterprise.setCreateTime(time); cereShopEnterpriseDAO.insert(enterprise); //更新店铺认证状态 - CerePlatformShop cerePlatformShop=new CerePlatformShop(); - cerePlatformShop.setShopId(enterprise.getShopId()); - cerePlatformShop.setAuthenticationState(IntegerEnum.UNDER_REVIEW.getCode()); - cerePlatformShop.setAuthenType(IntegerEnum.ENTERPRICE.getCode()); - cerePlatformShop.setUpdateTime(time); - cerePlatformShopService.updateState(cerePlatformShop); + CerePlatformBusiness cerePlatformBusiness=new CerePlatformBusiness(); + cerePlatformBusiness.setBusinessId(enterprise.getBusinessId()); + cerePlatformBusiness.setAuthenticationState(IntegerEnum.UNDER_REVIEW.getCode()); + cerePlatformBusiness.setAuthenType(IntegerEnum.ENTERPRICE.getCode()); + cerePlatformBusiness.setUpdateTime(time); + cerePlatformBusinessService.updateState(cerePlatformBusiness); //新增日志 - cerePlatformLogService.addLog(user,"店铺管理","商户端操作","提交企业认证信息",enterprise.getShopId(),time); + cerePlatformLogService.addLog(user,"店铺管理","商户端操作","提交企业认证信息",enterprise.getBusinessId(),time); } @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void updateEnterprise(CereShopEnterprise enterprise, CerePlatformBusiness user) throws CoBusinessException { + public void updateEnterprise(CereShopEnterprise enterprise, CerePlatformBusinessUser user) throws CoBusinessException { String time= TimeUtils.yyMMddHHmmss(); enterprise.setUpdateTime(time); cereShopEnterpriseDAO.updateData(enterprise); //新增日志 - cerePlatformLogService.addLog(user,"店铺管理","商户端操作","修改企业认证信息",enterprise.getShopId(),time); + cerePlatformLogService.addLog(user,"店铺管理","商户端操作","修改企业认证信息",enterprise.getBusinessId(),time); } @Override - public CereShopEnterprise findByShopId(Long shopId) { - return cereShopEnterpriseDAO.findByShopId(shopId); + public CereShopEnterprise findByBusinessId(Long shopId) { + return cereShopEnterpriseDAO.findByBusinessId(shopId); } @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void enterpriseCheck(CereShopEnterpriseParam param, CerePlatformBusiness user) throws CoBusinessException { + public void enterpriseCheck(CereShopEnterpriseParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time=TimeUtils.yyMMddHHmmss(); - //新增店铺数据 - CerePlatformShop cerePlatformShop=new CerePlatformShop(); - cerePlatformShop.setShopPhone(param.getShopPhone()); - cerePlatformShop.setShopCode(commonService.getShopCode()); - cerePlatformShop.setAuthenticationState(IntegerEnum.UNDER_REVIEW.getCode()); - cerePlatformShop.setAuthenType(IntegerEnum.ENTERPRICE.getCode()); - cerePlatformShop.setCheckState(IntegerEnum.UNTREATED.getCode()); - cerePlatformShop.setCreateTime(time); - cerePlatformShop.setShopName(param.getShopName()); - cerePlatformShop.setChargePersonName(param.getChargePersonName()); - cerePlatformShop.setChargePersonPhone(param.getChargePersonPhone()); - cerePlatformShop.setShopAdressProvince(param.getShopAdressProvince()); - cerePlatformShop.setShopAdressCity(param.getShopAdressCity()); - cerePlatformShop.setShopAdressDetail(param.getShopAdressDetail()); - cerePlatformShop.setShopAdress(param.getShopAdressProvince() + param.getShopAdressCity() + StringUtils.trimToEmpty(param.getShopAdressDetail())); - cerePlatformShop.setState(IntegerEnum.YES.getCode()); - cerePlatformShop.setContractState(IntegerEnum.YES.getCode()); - cerePlatformShop.setEffectiveDate(time); - cerePlatformShop.setEffectiveYear(1); - cerePlatformShop.setShopPassword(EncryptUtil.encrypt("123456")); - cerePlatformShopService.insert(cerePlatformShop); - //同步新增商家用户数据 + //新增商家数据 CerePlatformBusiness cerePlatformBusiness=new CerePlatformBusiness(); + cerePlatformBusiness.setBusinessPhone(param.getShopPhone()); + cerePlatformBusiness.setBusinessCode(commonService.getBusinessCode()); + cerePlatformBusiness.setAuthenticationState(IntegerEnum.UNDER_REVIEW.getCode()); + cerePlatformBusiness.setAuthenType(IntegerEnum.ENTERPRICE.getCode()); + cerePlatformBusiness.setCheckState(IntegerEnum.UNTREATED.getCode()); cerePlatformBusiness.setCreateTime(time); - cerePlatformBusiness.setUsername(cerePlatformShop.getShopPhone()); - cerePlatformBusiness.setPassword(cerePlatformShop.getShopPassword()); - cerePlatformBusiness.setName(cerePlatformShop.getChargePersonName()); + cerePlatformBusiness.setBusinessName(param.getShopName()); + cerePlatformBusiness.setChargePersonName(param.getChargePersonName()); + cerePlatformBusiness.setChargePersonPhone(param.getChargePersonPhone()); + cerePlatformBusiness.setBusinessAdressProvince(param.getShopAdressProvince()); + cerePlatformBusiness.setBusinessAdressCity(param.getShopAdressCity()); + cerePlatformBusiness.setBusinessAdressDetail(param.getShopAdressDetail()); + cerePlatformBusiness.setBusinessAdress(param.getShopAdressProvince() + param.getShopAdressCity() + StringUtils.trimToEmpty(param.getShopAdressDetail())); cerePlatformBusiness.setState(IntegerEnum.YES.getCode()); + cerePlatformBusiness.setContractState(IntegerEnum.YES.getCode()); + cerePlatformBusiness.setEffectiveDate(time); + cerePlatformBusiness.setEffectiveYear(1); +// cerePlatformBusiness.setShopPassword(EncryptUtil.encrypt("123456")); cerePlatformBusinessService.insert(cerePlatformBusiness); + //同步新增商家用户数据 + CerePlatformBusinessUser cerePlatformBusinessUser =new CerePlatformBusinessUser(); + cerePlatformBusinessUser.setCreateTime(time); + cerePlatformBusinessUser.setUsername(param.getChargePersonPhone()); + cerePlatformBusinessUser.setPassword(EncryptUtil.encrypt("123456")); + cerePlatformBusinessUser.setName(cerePlatformBusiness.getChargePersonName()); + cerePlatformBusinessUser.setState(IntegerEnum.YES.getCode()); + cerePlatformBusinessUserService.insert(cerePlatformBusinessUser); //同步新增商家用户绑定店铺数据 - CereBusinessShop cereBusinessShop=new CereBusinessShop(); - cereBusinessShop.setBusinessUserId(cerePlatformBusiness.getBusinessUserId()); - cereBusinessShop.setShopId(cerePlatformShop.getShopId()); - cereBusinessShop.setIfBinding(IntegerEnum.YES.getCode()); - cereBusinessShopService.insert(cereBusinessShop); + CereBusinessUser cereBusinessUser =new CereBusinessUser(); + cereBusinessUser.setBusinessUserId(cerePlatformBusinessUser.getBusinessUserId()); + cereBusinessUser.setBusinessId(cerePlatformBusiness.getBusinessId()); + cereBusinessUser.setIfBinding(IntegerEnum.YES.getCode()); + cereBusinessUser.setIsMainUser(IntegerEnum.YES.getCode()); + cereBusinessUserService.insert(cereBusinessUser); //新增店铺认证个人数据 param.setCreateTime(time); - param.setShopId(cereBusinessShop.getShopId()); + param.setBusinessId(cereBusinessUser.getBusinessId()); cereShopEnterpriseDAO.insertSelective(param); //新增日志 这里没有user,所以new一个,并且设置userId 为shopId - user = new CerePlatformBusiness(); - user.setBusinessUserId(cerePlatformShop.getShopId()); - cerePlatformLogService.addLog(user,"入驻申请","商户端操作","提交企业入驻申请",cerePlatformShop.getShopId(),time); + user = new CerePlatformBusinessUser(); + user.setBusinessUserId(cerePlatformBusiness.getBusinessId()); + cerePlatformLogService.addLog(user,"入驻申请","商户端操作","提交企业入驻申请",cerePlatformBusiness.getBusinessId(),time); } @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void updateEnterpriseCheck(CereShopEnterpriseParam param, CerePlatformBusiness user) throws CoBusinessException { + public void updateEnterpriseCheck(CereShopEnterpriseParam param, CerePlatformBusinessUser user) throws CoBusinessException { //更新店铺数据 String time=TimeUtils.yyMMddHHmmss(); - CerePlatformShop cerePlatformShop=new CerePlatformShop(); - cerePlatformShop.setShopId(param.getShopId()); - cerePlatformShop.setShopName(param.getShopName()); - cerePlatformShop.setShopPhone(param.getShopPhone()); - cerePlatformShop.setChargePersonPhone(param.getChargePersonPhone()); - cerePlatformShop.setChargePersonName(param.getChargePersonName()); - cerePlatformShop.setShopAdressProvince(param.getShopAdressProvince()); - cerePlatformShop.setShopAdressCity(param.getShopAdressCity()); - cerePlatformShop.setShopAdressDetail(param.getShopAdressDetail()); - cerePlatformShop.setShopAdress(param.getShopAdressProvince() + param.getShopAdressCity() + StringUtils.trimToEmpty(param.getShopAdressDetail())); - cerePlatformShop.setUpdateTime(time); - cerePlatformShopService.update(cerePlatformShop); + CerePlatformBusiness cerePlatformBusiness=new CerePlatformBusiness(); + cerePlatformBusiness.setBusinessId(param.getBusinessId()); + cerePlatformBusiness.setBusinessName(param.getShopName()); + cerePlatformBusiness.setBusinessPhone(param.getShopPhone()); + cerePlatformBusiness.setChargePersonPhone(param.getChargePersonPhone()); + cerePlatformBusiness.setChargePersonName(param.getChargePersonName()); + cerePlatformBusiness.setBusinessAdressProvince(param.getShopAdressProvince()); + cerePlatformBusiness.setBusinessAdressCity(param.getShopAdressCity()); + cerePlatformBusiness.setBusinessAdressDetail(param.getShopAdressDetail()); + cerePlatformBusiness.setBusinessAdress(param.getShopAdressProvince() + param.getShopAdressCity() + StringUtils.trimToEmpty(param.getShopAdressDetail())); + cerePlatformBusiness.setUpdateTime(time); + cerePlatformBusinessService.update(cerePlatformBusiness); //查询是否存在认证数据 - CereShopEnterprise cereShopEnterprise=cereShopEnterpriseDAO.findByShopId(param.getShopId()); + CereShopEnterprise cereShopEnterprise=cereShopEnterpriseDAO.findByBusinessId(param.getBusinessId()); if(cereShopEnterprise!=null){ //更新认证数据 param.setUpdateTime(time); @@ -163,8 +164,8 @@ public class CereShopEnterpriseServiceImpl implements CereShopEnterpriseService cereShopEnterpriseDAO.insertParam(param); } //新增日志 这里没有user,所以new一个,并且设置userId 为shopId - user = new CerePlatformBusiness(); - user.setBusinessUserId(cerePlatformShop.getShopId()); - cerePlatformLogService.addLog(user,"入驻申请","商户端操作","修改企业入驻申请",cerePlatformShop.getShopId(),time); + user = new CerePlatformBusinessUser(); + user.setBusinessUserId(cerePlatformBusiness.getBusinessId()); + cerePlatformLogService.addLog(user,"入驻申请","商户端操作","修改企业入驻申请",cerePlatformBusiness.getBusinessId(),time); } } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopExtensionServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopExtensionServiceImpl.java index 7b19ec4..224c6fa 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopExtensionServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopExtensionServiceImpl.java @@ -9,7 +9,7 @@ import com.shop.cereshop.business.dao.shop.CereShopExtensionDAO; import com.shop.cereshop.business.param.shop.ShopParam; import com.shop.cereshop.business.service.log.CerePlatformLogService; import com.shop.cereshop.business.service.shop.CereShopExtensionService; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.shop.CereShopExtension; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.utils.EmptyUtils; @@ -33,7 +33,7 @@ public class CereShopExtensionServiceImpl implements CereShopExtensionService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void save(CereShopExtension shopExtension, CerePlatformBusiness user) throws CoBusinessException { + public void save(CereShopExtension shopExtension, CerePlatformBusinessUser user) throws CoBusinessException { String time= TimeUtils.yyMMddHHmmss(); String describe=""; if(!EmptyUtils.isEmpty(shopExtension.getExtensionId())){ diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopGroupServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopGroupServiceImpl.java index 757169b..04746a8 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopGroupServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopGroupServiceImpl.java @@ -16,8 +16,9 @@ import com.shop.cereshop.business.param.group.*; import com.shop.cereshop.business.param.product.ProductGetGroupParam; import com.shop.cereshop.business.service.log.CerePlatformLogService; import com.shop.cereshop.business.service.shop.CereShopGroupService; +import com.shop.cereshop.business.utils.ContextUtil; import com.shop.cereshop.commons.constant.IntegerEnum; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.shop.CereShopGroup; import com.shop.cereshop.commons.exception.CoBusinessException; @@ -45,14 +46,15 @@ public class CereShopGroupServiceImpl implements CereShopGroupService { @Override public List getGroupSelect(ProductGetGroupParam param) throws CoBusinessException { - return cereShopGroupDAO.getGroupSelect(param.getShopId()); + return cereShopGroupDAO.getGroupSelect(ContextUtil.getProject(), param.getShopId()); } @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void save(ShopGroupSaveParam param, CerePlatformBusiness user) throws CoBusinessException { + public void save(ShopGroupSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time= TimeUtils.yyMMddHHmmss(); CereShopGroup group=new CereShopGroup(); + group.setProject(ContextUtil.getProject()); group.setGroupDescribe(param.getGroupDescribe()); group.setGroupName(param.getGroupName()); group.setShopId(param.getShopId()); @@ -100,7 +102,7 @@ public class CereShopGroupServiceImpl implements CereShopGroupService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void update(ShopGroupUpdateParam param, CerePlatformBusiness user) throws CoBusinessException { + public void update(ShopGroupUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time= TimeUtils.yyMMddHHmmss(); CereShopGroup group=new CereShopGroup(); group.setShopGroupId(param.getShopGroupId()); @@ -188,7 +190,7 @@ public class CereShopGroupServiceImpl implements CereShopGroupService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void delete(GroupDeleteParam group, CerePlatformBusiness user) throws CoBusinessException { + public void delete(GroupDeleteParam group, CerePlatformBusinessUser user) throws CoBusinessException { String time= TimeUtils.yyMMddHHmmss(); cereShopGroupDAO.deleteByPrimaryKey(group.getShopGroupId()); //清除该分组与商品关联 @@ -209,6 +211,7 @@ public class CereShopGroupServiceImpl implements CereShopGroupService { @Override public Page getAll(GroupGetAllParam param) throws CoBusinessException { + param.setProject(ContextUtil.getProject()); PageHelper.startPage(param.getPage(),param.getPageSize()); List list = cereShopGroupDAO.getAll(param); PageInfo pageInfo=new PageInfo<>(list); @@ -228,6 +231,6 @@ public class CereShopGroupServiceImpl implements CereShopGroupService { @Override public List selectAll() { - return cereShopGroupDAO.selectAll(); + return cereShopGroupDAO.selectAll(ContextUtil.getProject()); } } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopIndividualBusinessesServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopIndividualBusinessesServiceImpl.java index dac7b23..369cd6e 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopIndividualBusinessesServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopIndividualBusinessesServiceImpl.java @@ -6,19 +6,19 @@ package com.shop.cereshop.business.service.shop.impl; import com.shop.cereshop.business.dao.shop.CereShopIndividualBusinessesDAO; -import com.shop.cereshop.business.param.shop.CereShopIndividualBusinessesParam; -import com.shop.cereshop.business.service.business.CereBusinessShopService; +import com.shop.cereshop.business.param.business.CereShopIndividualBusinessesParam; +import com.shop.cereshop.business.service.business.CereBusinessUserService; import com.shop.cereshop.business.service.business.CerePlatformBusinessService; +import com.shop.cereshop.business.service.business.CerePlatformBusinessUserService; import com.shop.cereshop.business.service.common.CommonService; import com.shop.cereshop.business.service.log.CerePlatformLogService; -import com.shop.cereshop.business.service.shop.CerePlatformShopService; import com.shop.cereshop.business.service.shop.CereShopIndividualBusinessesService; import com.shop.cereshop.business.utils.TokenProvider; import com.shop.cereshop.commons.constant.IntegerEnum; -import com.shop.cereshop.commons.domain.business.CereBusinessShop; +import com.shop.cereshop.commons.domain.business.CereBusinessUser; import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; -import com.shop.cereshop.commons.domain.shop.CerePlatformShop; -import com.shop.cereshop.commons.domain.shop.CereShopIndividualBusinesses; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; +import com.shop.cereshop.commons.domain.business.CereShopIndividualBusinesses; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.utils.EncryptUtil; import com.shop.cereshop.commons.utils.TimeUtils; @@ -36,16 +36,16 @@ public class CereShopIndividualBusinessesServiceImpl implements CereShopIndividu private CereShopIndividualBusinessesDAO cereShopIndividualBusinessesDAO; @Autowired - private CerePlatformShopService cerePlatformShopService; + private CerePlatformBusinessService cerePlatformBusinessService; @Autowired private CommonService commonService; @Autowired - private CerePlatformBusinessService cerePlatformBusinessService; + private CerePlatformBusinessUserService cerePlatformBusinessUserService; @Autowired - private CereBusinessShopService cereBusinessShopService; + private CereBusinessUserService cereBusinessUserService; @Autowired private CerePlatformLogService cerePlatformLogService; @@ -55,104 +55,105 @@ public class CereShopIndividualBusinessesServiceImpl implements CereShopIndividu @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void individual(CereShopIndividualBusinesses individualBusinesses, CerePlatformBusiness user) throws CoBusinessException { + public void individual(CereShopIndividualBusinesses individualBusinesses, CerePlatformBusinessUser user) throws CoBusinessException { String time= TimeUtils.yyMMddHHmmss(); individualBusinesses.setCreateTime(time); cereShopIndividualBusinessesDAO.insert(individualBusinesses); //更新店铺认证状态 - CerePlatformShop cerePlatformShop=new CerePlatformShop(); - cerePlatformShop.setShopId(individualBusinesses.getShopId()); - cerePlatformShop.setAuthenticationState(IntegerEnum.UNDER_REVIEW.getCode()); - cerePlatformShop.setAuthenType(IntegerEnum.INDIVIDUAL.getCode()); - cerePlatformShop.setUpdateTime(time); - cerePlatformShopService.updateState(cerePlatformShop); + CerePlatformBusiness cerePlatformBusiness=new CerePlatformBusiness(); + cerePlatformBusiness.setBusinessId(individualBusinesses.getBusinessId()); + cerePlatformBusiness.setAuthenticationState(IntegerEnum.UNDER_REVIEW.getCode()); + cerePlatformBusiness.setAuthenType(IntegerEnum.INDIVIDUAL.getCode()); + cerePlatformBusiness.setUpdateTime(time); + cerePlatformBusinessService.updateState(cerePlatformBusiness); //新增日志 - cerePlatformLogService.addLog(user,"店铺管理","商户端操作","提交个体工商户认证信息",individualBusinesses.getShopId(),time); + cerePlatformLogService.addLog(user,"店铺管理","商户端操作","提交个体工商户认证信息",individualBusinesses.getBusinessId(),time); } @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void updateIndividual(CereShopIndividualBusinesses individualBusinesses, CerePlatformBusiness user) throws CoBusinessException { + public void updateIndividual(CereShopIndividualBusinesses individualBusinesses, CerePlatformBusinessUser user) throws CoBusinessException { String time= TimeUtils.yyMMddHHmmss(); individualBusinesses.setUpdateTime(time); cereShopIndividualBusinessesDAO.updateData(individualBusinesses); //新增日志 - cerePlatformLogService.addLog(user,"店铺管理","商户端操作","修改个体工商户认证信息",individualBusinesses.getShopId(),time); + cerePlatformLogService.addLog(user,"店铺管理","商户端操作","修改个体工商户认证信息",individualBusinesses.getBusinessId(),time); } @Override - public CereShopIndividualBusinesses findByShopId(Long shopId) { - return cereShopIndividualBusinessesDAO.findByShopId(shopId); + public CereShopIndividualBusinesses findByBusinessId(Long shopId) { + return cereShopIndividualBusinessesDAO.findByBusinessId(shopId); } @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void individualCheck(CereShopIndividualBusinessesParam param, CerePlatformBusiness user) throws CoBusinessException { + public void individualCheck(CereShopIndividualBusinessesParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time=TimeUtils.yyMMddHHmmss(); //新增店铺数据 - CerePlatformShop cerePlatformShop=new CerePlatformShop(); - cerePlatformShop.setShopPhone(param.getShopPhone()); - cerePlatformShop.setShopCode(commonService.getShopCode()); - cerePlatformShop.setAuthenticationState(IntegerEnum.UNDER_REVIEW.getCode()); - cerePlatformShop.setAuthenType(IntegerEnum.INDIVIDUAL.getCode()); - cerePlatformShop.setCheckState(IntegerEnum.UNTREATED.getCode()); - cerePlatformShop.setCreateTime(time); - cerePlatformShop.setShopName(param.getShopName()); - cerePlatformShop.setChargePersonName(param.getChargePersonName()); - cerePlatformShop.setChargePersonPhone(param.getChargePersonPhone()); - cerePlatformShop.setShopAdressProvince(param.getShopAdressProvince()); - cerePlatformShop.setShopAdressCity(param.getShopAdressCity()); - cerePlatformShop.setShopAdressDetail(param.getShopAdressDetail()); - cerePlatformShop.setShopAdress(param.getShopAdressProvince() + param.getShopAdressCity() + StringUtils.trimToEmpty(param.getShopAdressDetail())); - cerePlatformShop.setState(IntegerEnum.YES.getCode()); - cerePlatformShop.setContractState(IntegerEnum.YES.getCode()); - cerePlatformShop.setEffectiveDate(time); - cerePlatformShop.setEffectiveYear(1); - cerePlatformShop.setShopPassword(EncryptUtil.encrypt("123456")); - cerePlatformShopService.insert(cerePlatformShop); - //同步新增商家用户数据 CerePlatformBusiness cerePlatformBusiness=new CerePlatformBusiness(); + cerePlatformBusiness.setBusinessPhone(param.getShopPhone()); + cerePlatformBusiness.setBusinessCode(commonService.getBusinessCode()); + cerePlatformBusiness.setAuthenticationState(IntegerEnum.UNDER_REVIEW.getCode()); + cerePlatformBusiness.setAuthenType(IntegerEnum.INDIVIDUAL.getCode()); + cerePlatformBusiness.setCheckState(IntegerEnum.UNTREATED.getCode()); cerePlatformBusiness.setCreateTime(time); - cerePlatformBusiness.setUsername(cerePlatformShop.getShopPhone()); - cerePlatformBusiness.setPassword(cerePlatformShop.getShopPassword()); - cerePlatformBusiness.setName(cerePlatformShop.getChargePersonName()); + cerePlatformBusiness.setBusinessName(param.getShopName()); + cerePlatformBusiness.setChargePersonName(param.getChargePersonName()); + cerePlatformBusiness.setChargePersonPhone(param.getChargePersonPhone()); + cerePlatformBusiness.setBusinessAdressProvince(param.getShopAdressProvince()); + cerePlatformBusiness.setBusinessAdressCity(param.getShopAdressCity()); + cerePlatformBusiness.setBusinessAdressDetail(param.getShopAdressDetail()); + cerePlatformBusiness.setBusinessAdress(param.getShopAdressProvince() + param.getShopAdressCity() + StringUtils.trimToEmpty(param.getShopAdressDetail())); cerePlatformBusiness.setState(IntegerEnum.YES.getCode()); + cerePlatformBusiness.setContractState(IntegerEnum.YES.getCode()); + cerePlatformBusiness.setEffectiveDate(time); + cerePlatformBusiness.setEffectiveYear(1); +// cerePlatformBusiness.setShopPassword(EncryptUtil.encrypt("123456")); cerePlatformBusinessService.insert(cerePlatformBusiness); + //同步新增商家用户数据 + CerePlatformBusinessUser cerePlatformBusinessUser =new CerePlatformBusinessUser(); + cerePlatformBusinessUser.setCreateTime(time); + cerePlatformBusinessUser.setUsername(param.getShopPhone()); + cerePlatformBusinessUser.setPassword(EncryptUtil.encrypt("123456")); + cerePlatformBusinessUser.setName(cerePlatformBusiness.getChargePersonName()); + cerePlatformBusinessUser.setState(IntegerEnum.YES.getCode()); + cerePlatformBusinessUserService.insert(cerePlatformBusinessUser); //同步新增商家用户绑定店铺数据 - CereBusinessShop cereBusinessShop=new CereBusinessShop(); - cereBusinessShop.setBusinessUserId(cerePlatformBusiness.getBusinessUserId()); - cereBusinessShop.setShopId(cerePlatformShop.getShopId()); - cereBusinessShop.setIfBinding(IntegerEnum.YES.getCode()); - cereBusinessShopService.insert(cereBusinessShop); + CereBusinessUser cereBusinessUser =new CereBusinessUser(); + cereBusinessUser.setBusinessUserId(cerePlatformBusinessUser.getBusinessUserId()); + cereBusinessUser.setBusinessId(cerePlatformBusiness.getBusinessId()); + cereBusinessUser.setIfBinding(IntegerEnum.YES.getCode()); + cereBusinessUser.setIsMainUser(IntegerEnum.YES.getCode()); + cereBusinessUserService.insert(cereBusinessUser); //新增店铺认证个人数据 param.setCreateTime(time); - param.setShopId(cereBusinessShop.getShopId()); + param.setBusinessId(cereBusinessUser.getBusinessId()); cereShopIndividualBusinessesDAO.insertSelective(param); //新增日志 这里没有user,所以new一个,并且设置userId 为shopId - user = new CerePlatformBusiness(); - user.setBusinessUserId(cerePlatformShop.getShopId()); - cerePlatformLogService.addLog(user,"入驻申请","商户端操作","提交个个体工商户入驻申请",cerePlatformShop.getShopId(),time); + user = new CerePlatformBusinessUser(); + user.setBusinessUserId(cerePlatformBusiness.getBusinessId()); + cerePlatformLogService.addLog(user,"入驻申请","商户端操作","提交个个体工商户入驻申请",cerePlatformBusiness.getBusinessId(),time); } @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void updateIndividualCheck(CereShopIndividualBusinessesParam param, CerePlatformBusiness user) throws CoBusinessException { + public void updateIndividualCheck(CereShopIndividualBusinessesParam param, CerePlatformBusinessUser user) throws CoBusinessException { //更新店铺数据 String time=TimeUtils.yyMMddHHmmss(); - CerePlatformShop cerePlatformShop=new CerePlatformShop(); - cerePlatformShop.setShopId(param.getShopId()); - cerePlatformShop.setShopName(param.getShopName()); - cerePlatformShop.setShopPhone(param.getShopPhone()); - cerePlatformShop.setChargePersonPhone(param.getChargePersonPhone()); - cerePlatformShop.setChargePersonName(param.getChargePersonName()); - cerePlatformShop.setShopAdressProvince(param.getShopAdressProvince()); - cerePlatformShop.setShopAdressCity(param.getShopAdressCity()); - cerePlatformShop.setShopAdressDetail(param.getShopAdressDetail()); - cerePlatformShop.setShopAdress(param.getShopAdressProvince() + param.getShopAdressCity() + StringUtils.trimToEmpty(param.getShopAdressDetail())); - cerePlatformShop.setUpdateTime(time); - cerePlatformShopService.update(cerePlatformShop); + CerePlatformBusiness cerePlatformBusiness=new CerePlatformBusiness(); + cerePlatformBusiness.setBusinessId(param.getBusinessId()); + cerePlatformBusiness.setBusinessName(param.getShopName()); + cerePlatformBusiness.setBusinessPhone(param.getShopPhone()); + cerePlatformBusiness.setChargePersonPhone(param.getChargePersonPhone()); + cerePlatformBusiness.setChargePersonName(param.getChargePersonName()); + cerePlatformBusiness.setBusinessAdressProvince(param.getShopAdressProvince()); + cerePlatformBusiness.setBusinessAdressCity(param.getShopAdressCity()); + cerePlatformBusiness.setBusinessAdressDetail(param.getShopAdressDetail()); + cerePlatformBusiness.setBusinessAdress(param.getShopAdressProvince() + param.getShopAdressCity() + StringUtils.trimToEmpty(param.getShopAdressDetail())); + cerePlatformBusiness.setUpdateTime(time); + cerePlatformBusinessService.update(cerePlatformBusiness); //查询是否存在认证数据 - CereShopIndividualBusinesses cereShopIndividualBusinesses=cereShopIndividualBusinessesDAO.findByShopId(param.getShopId()); + CereShopIndividualBusinesses cereShopIndividualBusinesses=cereShopIndividualBusinessesDAO.findByBusinessId(param.getBusinessId()); if(cereShopIndividualBusinesses!=null){ //更新认证数据 param.setUpdateTime(time); @@ -163,8 +164,8 @@ public class CereShopIndividualBusinessesServiceImpl implements CereShopIndividu cereShopIndividualBusinessesDAO.insertParam(param); } //新增日志 这里没有user,所以new一个,并且设置userId 为shopId - user = new CerePlatformBusiness(); - user.setBusinessUserId(cerePlatformShop.getShopId()); - cerePlatformLogService.addLog(user,"入驻申请","商户端操作","修改个体工商户入驻申请",cerePlatformShop.getShopId(),time); + user = new CerePlatformBusinessUser(); + user.setBusinessUserId(cerePlatformBusiness.getBusinessId()); + cerePlatformLogService.addLog(user,"入驻申请","商户端操作","修改个体工商户入驻申请",cerePlatformBusiness.getBusinessId(),time); } } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopOtherOrganizationsServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopOtherOrganizationsServiceImpl.java index 37dad0f..8fb2c24 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopOtherOrganizationsServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopOtherOrganizationsServiceImpl.java @@ -6,19 +6,19 @@ package com.shop.cereshop.business.service.shop.impl; import com.shop.cereshop.business.dao.shop.CereShopOtherOrganizationsDAO; -import com.shop.cereshop.business.param.shop.CereShopOtherOrganizationsParam; -import com.shop.cereshop.business.service.business.CereBusinessShopService; +import com.shop.cereshop.business.param.business.CereShopOtherOrganizationsParam; +import com.shop.cereshop.business.service.business.CereBusinessUserService; import com.shop.cereshop.business.service.business.CerePlatformBusinessService; +import com.shop.cereshop.business.service.business.CerePlatformBusinessUserService; import com.shop.cereshop.business.service.common.CommonService; import com.shop.cereshop.business.service.log.CerePlatformLogService; -import com.shop.cereshop.business.service.shop.CerePlatformShopService; import com.shop.cereshop.business.service.shop.CereShopOtherOrganizationsService; import com.shop.cereshop.business.utils.TokenProvider; import com.shop.cereshop.commons.constant.IntegerEnum; -import com.shop.cereshop.commons.domain.business.CereBusinessShop; +import com.shop.cereshop.commons.domain.business.CereBusinessUser; import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; -import com.shop.cereshop.commons.domain.shop.CerePlatformShop; -import com.shop.cereshop.commons.domain.shop.CereShopOtherOrganizations; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; +import com.shop.cereshop.commons.domain.business.CereShopOtherOrganizations; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.utils.EncryptUtil; import com.shop.cereshop.commons.utils.TimeUtils; @@ -36,16 +36,16 @@ public class CereShopOtherOrganizationsServiceImpl implements CereShopOtherOrgan private CereShopOtherOrganizationsDAO cereShopOtherOrganizationsDAO; @Autowired - private CerePlatformShopService cerePlatformShopService; + private CerePlatformBusinessService cerePlatformBusinessService; @Autowired private CommonService commonService; @Autowired - private CerePlatformBusinessService cerePlatformBusinessService; + private CerePlatformBusinessUserService cerePlatformBusinessUserService; @Autowired - private CereBusinessShopService cereBusinessShopService; + private CereBusinessUserService cereBusinessUserService; @Autowired private CerePlatformLogService cerePlatformLogService; @@ -55,104 +55,104 @@ public class CereShopOtherOrganizationsServiceImpl implements CereShopOtherOrgan @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void organizations(CereShopOtherOrganizations otherOrganizations, CerePlatformBusiness user) throws CoBusinessException { + public void organizations(CereShopOtherOrganizations otherOrganizations, CerePlatformBusinessUser user) throws CoBusinessException { String time= TimeUtils.yyMMddHHmmss(); otherOrganizations.setCreateTime(time); cereShopOtherOrganizationsDAO.insert(otherOrganizations); //更新店铺认证状态 - CerePlatformShop cerePlatformShop=new CerePlatformShop(); - cerePlatformShop.setShopId(otherOrganizations.getShopId()); - cerePlatformShop.setAuthenticationState(IntegerEnum.UNDER_REVIEW.getCode()); - cerePlatformShop.setAuthenType(IntegerEnum.ORGANIZATION.getCode()); - cerePlatformShop.setUpdateTime(time); - cerePlatformShopService.updateState(cerePlatformShop); + CerePlatformBusiness cerePlatformBusiness=new CerePlatformBusiness(); + cerePlatformBusiness.setBusinessId(otherOrganizations.getBusinessId()); + cerePlatformBusiness.setAuthenticationState(IntegerEnum.UNDER_REVIEW.getCode()); + cerePlatformBusiness.setAuthenType(IntegerEnum.ORGANIZATION.getCode()); + cerePlatformBusiness.setUpdateTime(time); + cerePlatformBusinessService.updateState(cerePlatformBusiness); //新增日志 - cerePlatformLogService.addLog(user,"店铺管理","商户端操作","提交其他组织认证信息",otherOrganizations.getShopId(),time); + cerePlatformLogService.addLog(user,"店铺管理","商户端操作","提交其他组织认证信息",otherOrganizations.getBusinessId(),time); } @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void updateOrganizations(CereShopOtherOrganizations otherOrganizations, CerePlatformBusiness user) throws CoBusinessException { + public void updateOrganizations(CereShopOtherOrganizations otherOrganizations, CerePlatformBusinessUser user) throws CoBusinessException { String time= TimeUtils.yyMMddHHmmss(); otherOrganizations.setUpdateTime(time); cereShopOtherOrganizationsDAO.updateData(otherOrganizations); //新增日志 - cerePlatformLogService.addLog(user,"店铺管理","商户端操作","修改其他组织认证信息",otherOrganizations.getShopId(),time); + cerePlatformLogService.addLog(user,"店铺管理","商户端操作","修改其他组织认证信息",otherOrganizations.getBusinessId(),time); } @Override - public CereShopOtherOrganizations findByShopId(Long shopId) { - return cereShopOtherOrganizationsDAO.findByShopId(shopId); + public CereShopOtherOrganizations findByBusinessId(Long businessId) { + return cereShopOtherOrganizationsDAO.findByBusinessId(businessId); } @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void organizationsCheck(CereShopOtherOrganizationsParam param, CerePlatformBusiness user) throws CoBusinessException { + public void organizationsCheck(CereShopOtherOrganizationsParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time=TimeUtils.yyMMddHHmmss(); //新增店铺数据 - CerePlatformShop cerePlatformShop=new CerePlatformShop(); - cerePlatformShop.setShopPhone(param.getShopPhone()); - cerePlatformShop.setShopCode(commonService.getShopCode()); - cerePlatformShop.setAuthenticationState(IntegerEnum.UNDER_REVIEW.getCode()); - cerePlatformShop.setAuthenType(IntegerEnum.ORGANIZATION.getCode()); - cerePlatformShop.setCheckState(IntegerEnum.UNTREATED.getCode()); - cerePlatformShop.setCreateTime(time); - cerePlatformShop.setShopName(param.getShopName()); - cerePlatformShop.setChargePersonName(param.getChargePersonName()); - cerePlatformShop.setChargePersonPhone(param.getChargePersonPhone()); - cerePlatformShop.setShopAdressProvince(param.getShopAdressProvince()); - cerePlatformShop.setShopAdressCity(param.getShopAdressCity()); - cerePlatformShop.setShopAdressDetail(param.getShopAdressDetail()); - cerePlatformShop.setShopAdress(param.getShopAdressProvince() + param.getShopAdressCity() + StringUtils.trimToEmpty(param.getShopAdressDetail())); - cerePlatformShop.setState(IntegerEnum.YES.getCode()); - cerePlatformShop.setContractState(IntegerEnum.YES.getCode()); - cerePlatformShop.setEffectiveDate(time); - cerePlatformShop.setEffectiveYear(1); - cerePlatformShop.setShopPassword(EncryptUtil.encrypt("123456")); - cerePlatformShopService.insert(cerePlatformShop); - //同步新增商家用户数据 CerePlatformBusiness cerePlatformBusiness=new CerePlatformBusiness(); + cerePlatformBusiness.setBusinessPhone(param.getShopPhone()); + cerePlatformBusiness.setBusinessCode(commonService.getBusinessCode()); + cerePlatformBusiness.setAuthenticationState(IntegerEnum.UNDER_REVIEW.getCode()); + cerePlatformBusiness.setAuthenType(IntegerEnum.ORGANIZATION.getCode()); + cerePlatformBusiness.setCheckState(IntegerEnum.UNTREATED.getCode()); cerePlatformBusiness.setCreateTime(time); - cerePlatformBusiness.setUsername(cerePlatformShop.getShopPhone()); - cerePlatformBusiness.setPassword(cerePlatformShop.getShopPassword()); - cerePlatformBusiness.setName(cerePlatformShop.getChargePersonName()); + cerePlatformBusiness.setBusinessName(param.getShopName()); + cerePlatformBusiness.setChargePersonName(param.getChargePersonName()); + cerePlatformBusiness.setChargePersonPhone(param.getChargePersonPhone()); + cerePlatformBusiness.setBusinessAdressProvince(param.getShopAdressProvince()); + cerePlatformBusiness.setBusinessAdressCity(param.getShopAdressCity()); + cerePlatformBusiness.setBusinessAdressDetail(param.getShopAdressDetail()); + cerePlatformBusiness.setBusinessAdress(param.getShopAdressProvince() + param.getShopAdressCity() + StringUtils.trimToEmpty(param.getShopAdressDetail())); cerePlatformBusiness.setState(IntegerEnum.YES.getCode()); + cerePlatformBusiness.setContractState(IntegerEnum.YES.getCode()); + cerePlatformBusiness.setEffectiveDate(time); + cerePlatformBusiness.setEffectiveYear(1); +// cerePlatformBusiness.setShopPassword(EncryptUtil.encrypt("123456")); cerePlatformBusinessService.insert(cerePlatformBusiness); + //同步新增商家用户数据 + CerePlatformBusinessUser cerePlatformBusinessUser =new CerePlatformBusinessUser(); + cerePlatformBusinessUser.setCreateTime(time); + cerePlatformBusinessUser.setUsername(param.getShopPhone()); + cerePlatformBusinessUser.setPassword(EncryptUtil.encrypt("123456")); + cerePlatformBusinessUser.setName(cerePlatformBusiness.getChargePersonName()); + cerePlatformBusinessUser.setState(IntegerEnum.YES.getCode()); + cerePlatformBusinessUserService.insert(cerePlatformBusinessUser); //同步新增商家用户绑定店铺数据 - CereBusinessShop cereBusinessShop=new CereBusinessShop(); - cereBusinessShop.setBusinessUserId(cerePlatformBusiness.getBusinessUserId()); - cereBusinessShop.setShopId(cerePlatformShop.getShopId()); - cereBusinessShop.setIfBinding(IntegerEnum.YES.getCode()); - cereBusinessShopService.insert(cereBusinessShop); + CereBusinessUser cereBusinessUser =new CereBusinessUser(); + cereBusinessUser.setBusinessUserId(cerePlatformBusinessUser.getBusinessUserId()); + cereBusinessUser.setBusinessId(cerePlatformBusiness.getBusinessId()); + cereBusinessUser.setIfBinding(IntegerEnum.YES.getCode()); + cereBusinessUserService.insert(cereBusinessUser); //新增店铺认证个人数据 param.setCreateTime(time); - param.setShopId(cereBusinessShop.getShopId()); + param.setBusinessId(cereBusinessUser.getBusinessId()); cereShopOtherOrganizationsDAO.insertSelective(param); //新增日志 这里没有user,所以new一个,并且设置userId 为shopId - user = new CerePlatformBusiness(); - user.setBusinessUserId(cerePlatformShop.getShopId()); - cerePlatformLogService.addLog(user,"入驻申请","商户端操作","提交其他组织入驻申请",cerePlatformShop.getShopId(),time); + user = new CerePlatformBusinessUser(); + user.setBusinessUserId(cerePlatformBusiness.getBusinessId()); + cerePlatformLogService.addLog(user,"入驻申请","商户端操作","提交其他组织入驻申请",cerePlatformBusiness.getBusinessId(),time); } @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void updateOrganizationsCheck(CereShopOtherOrganizationsParam param, CerePlatformBusiness user) throws CoBusinessException { + public void updateOrganizationsCheck(CereShopOtherOrganizationsParam param, CerePlatformBusinessUser user) throws CoBusinessException { //更新店铺数据 String time=TimeUtils.yyMMddHHmmss(); - CerePlatformShop cerePlatformShop=new CerePlatformShop(); - cerePlatformShop.setShopId(param.getShopId()); - cerePlatformShop.setShopName(param.getShopName()); - cerePlatformShop.setShopPhone(param.getShopPhone()); - cerePlatformShop.setChargePersonPhone(param.getChargePersonPhone()); - cerePlatformShop.setChargePersonName(param.getChargePersonName()); - cerePlatformShop.setShopAdressProvince(param.getShopAdressProvince()); - cerePlatformShop.setShopAdressCity(param.getShopAdressCity()); - cerePlatformShop.setShopAdressDetail(param.getShopAdressDetail()); - cerePlatformShop.setShopAdress(param.getShopAdressProvince() + param.getShopAdressCity() + StringUtils.trimToEmpty(param.getShopAdressDetail())); - cerePlatformShop.setUpdateTime(time); - cerePlatformShopService.update(cerePlatformShop); + CerePlatformBusiness cerePlatformBusiness=new CerePlatformBusiness(); + cerePlatformBusiness.setBusinessId(param.getBusinessId()); + cerePlatformBusiness.setBusinessName(param.getShopName()); + cerePlatformBusiness.setBusinessPhone(param.getShopPhone()); + cerePlatformBusiness.setChargePersonPhone(param.getChargePersonPhone()); + cerePlatformBusiness.setChargePersonName(param.getChargePersonName()); + cerePlatformBusiness.setBusinessAdressProvince(param.getShopAdressProvince()); + cerePlatformBusiness.setBusinessAdressCity(param.getShopAdressCity()); + cerePlatformBusiness.setBusinessAdressDetail(param.getShopAdressDetail()); + cerePlatformBusiness.setBusinessAdress(param.getShopAdressProvince() + param.getShopAdressCity() + StringUtils.trimToEmpty(param.getShopAdressDetail())); + cerePlatformBusiness.setUpdateTime(time); + cerePlatformBusinessService.update(cerePlatformBusiness); //查询是否存在认证数据 - CereShopOtherOrganizations cereShopOtherOrganizations=cereShopOtherOrganizationsDAO.findByShopId(param.getShopId()); + CereShopOtherOrganizations cereShopOtherOrganizations=cereShopOtherOrganizationsDAO.findByBusinessId(param.getBusinessId()); if(cereShopOtherOrganizations!=null){ //更新认证数据 param.setUpdateTime(time); @@ -163,8 +163,8 @@ public class CereShopOtherOrganizationsServiceImpl implements CereShopOtherOrgan cereShopOtherOrganizationsDAO.insertParam(param); } //新增日志 这里没有user,所以new一个,并且设置userId 为shopId - user = new CerePlatformBusiness(); - user.setBusinessUserId(cerePlatformShop.getShopId()); - cerePlatformLogService.addLog(user,"入驻申请","商户端操作","修改其他组织入驻申请",cerePlatformShop.getShopId(),time); + user = new CerePlatformBusinessUser(); + user.setBusinessUserId(cerePlatformBusiness.getBusinessId()); + cerePlatformLogService.addLog(user,"入驻申请","商户端操作","修改其他组织入驻申请",cerePlatformBusiness.getBusinessId(),time); } } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopPersonalServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopPersonalServiceImpl.java index b8abc68..0e393e8 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopPersonalServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopPersonalServiceImpl.java @@ -6,19 +6,19 @@ package com.shop.cereshop.business.service.shop.impl; import com.shop.cereshop.business.dao.shop.CereShopPersonalDAO; -import com.shop.cereshop.business.param.shop.CereShopPersonalParam; -import com.shop.cereshop.business.service.business.CereBusinessShopService; +import com.shop.cereshop.business.param.business.CereShopPersonalParam; +import com.shop.cereshop.business.service.business.CereBusinessUserService; import com.shop.cereshop.business.service.business.CerePlatformBusinessService; +import com.shop.cereshop.business.service.business.CerePlatformBusinessUserService; import com.shop.cereshop.business.service.common.CommonService; import com.shop.cereshop.business.service.log.CerePlatformLogService; -import com.shop.cereshop.business.service.shop.CerePlatformShopService; import com.shop.cereshop.business.service.shop.CereShopPersonalService; import com.shop.cereshop.business.utils.TokenProvider; import com.shop.cereshop.commons.constant.IntegerEnum; -import com.shop.cereshop.commons.domain.business.CereBusinessShop; +import com.shop.cereshop.commons.domain.business.CereBusinessUser; import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; -import com.shop.cereshop.commons.domain.shop.CerePlatformShop; -import com.shop.cereshop.commons.domain.shop.CereShopPersonal; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; +import com.shop.cereshop.commons.domain.business.CereShopPersonal; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.utils.EncryptUtil; import com.shop.cereshop.commons.utils.TimeUtils; @@ -36,16 +36,16 @@ public class CereShopPersonalServiceImpl implements CereShopPersonalService { private CereShopPersonalDAO cereShopPersonalDAO; @Autowired - private CerePlatformShopService cerePlatformShopService; + private CerePlatformBusinessService cerePlatformBusinessService; @Autowired private CommonService commonService; @Autowired - private CerePlatformBusinessService cerePlatformBusinessService; + private CerePlatformBusinessUserService cerePlatformBusinessUserService; @Autowired - private CereBusinessShopService cereBusinessShopService; + private CereBusinessUserService cereBusinessUserService; @Autowired private CerePlatformLogService cerePlatformLogService; @@ -55,104 +55,105 @@ public class CereShopPersonalServiceImpl implements CereShopPersonalService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void personal(CereShopPersonal personal, CerePlatformBusiness user) throws CoBusinessException { + public void personal(CereShopPersonal personal, CerePlatformBusinessUser user) throws CoBusinessException { String time= TimeUtils.yyMMddHHmmss(); personal.setCreateTime(time); cereShopPersonalDAO.insert(personal); //更新店铺认证状态 - CerePlatformShop cerePlatformShop=new CerePlatformShop(); - cerePlatformShop.setShopId(personal.getShopId()); - cerePlatformShop.setAuthenticationState(IntegerEnum.UNDER_REVIEW.getCode()); - cerePlatformShop.setAuthenType(IntegerEnum.PERSONAL.getCode()); - cerePlatformShop.setUpdateTime(time); - cerePlatformShopService.updateState(cerePlatformShop); + CerePlatformBusiness cerePlatformBusiness=new CerePlatformBusiness(); + cerePlatformBusiness.setBusinessId(personal.getBusinessId()); + cerePlatformBusiness.setAuthenticationState(IntegerEnum.UNDER_REVIEW.getCode()); + cerePlatformBusiness.setAuthenType(IntegerEnum.PERSONAL.getCode()); + cerePlatformBusiness.setUpdateTime(time); + cerePlatformBusinessService.updateState(cerePlatformBusiness); //新增日志 - cerePlatformLogService.addLog(user,"店铺管理","商户端操作","提交个人认证信息",personal.getShopId(),time); + cerePlatformLogService.addLog(user,"店铺管理","商户端操作","提交个人认证信息",personal.getBusinessId(),time); } @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void updatePersonal(CereShopPersonal personal, CerePlatformBusiness user) throws CoBusinessException { + public void updatePersonal(CereShopPersonal personal, CerePlatformBusinessUser user) throws CoBusinessException { String time= TimeUtils.yyMMddHHmmss(); personal.setUpdateTime(time); cereShopPersonalDAO.updateData(personal); //新增日志 - cerePlatformLogService.addLog(user,"店铺管理","商户端操作","修改个人认证信息",personal.getShopId(),time); + cerePlatformLogService.addLog(user,"店铺管理","商户端操作","修改个人认证信息",personal.getBusinessId(),time); } @Override - public CereShopPersonal findByShopId(Long shopId) { - return cereShopPersonalDAO.findByShopId(shopId); + public CereShopPersonal findByBusinessId(Long shopId) { + return cereShopPersonalDAO.findByBusinessId(shopId); } @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void personalCheck(CereShopPersonalParam param, CerePlatformBusiness user) throws CoBusinessException { + public void personalCheck(CereShopPersonalParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time=TimeUtils.yyMMddHHmmss(); //新增店铺数据 - CerePlatformShop cerePlatformShop=new CerePlatformShop(); - cerePlatformShop.setShopPhone(param.getShopPhone()); - cerePlatformShop.setShopCode(commonService.getShopCode()); - cerePlatformShop.setAuthenticationState(IntegerEnum.UNDER_REVIEW.getCode()); - cerePlatformShop.setAuthenType(IntegerEnum.PERSONAL.getCode()); - cerePlatformShop.setCheckState(IntegerEnum.UNTREATED.getCode()); - cerePlatformShop.setCreateTime(time); - cerePlatformShop.setShopName(param.getShopName()); - cerePlatformShop.setChargePersonName(param.getChargePersonName()); - cerePlatformShop.setChargePersonPhone(param.getChargePersonPhone()); - cerePlatformShop.setShopAdressProvince(param.getShopAdressProvince()); - cerePlatformShop.setShopAdressCity(param.getShopAdressCity()); - cerePlatformShop.setShopAdressDetail(param.getShopAdressDetail()); - cerePlatformShop.setShopAdress(param.getShopAdressProvince() + param.getShopAdressCity() + StringUtils.trimToEmpty(param.getShopAdressDetail())); - cerePlatformShop.setState(IntegerEnum.YES.getCode()); - cerePlatformShop.setContractState(IntegerEnum.YES.getCode()); - cerePlatformShop.setEffectiveDate(time); - cerePlatformShop.setEffectiveYear(1); - cerePlatformShop.setShopPassword(EncryptUtil.encrypt("123456")); - cerePlatformShopService.insert(cerePlatformShop); - //同步新增商家用户数据 CerePlatformBusiness cerePlatformBusiness=new CerePlatformBusiness(); + cerePlatformBusiness.setBusinessPhone(param.getShopPhone()); + cerePlatformBusiness.setBusinessCode(commonService.getBusinessCode()); + cerePlatformBusiness.setAuthenticationState(IntegerEnum.UNDER_REVIEW.getCode()); + cerePlatformBusiness.setAuthenType(IntegerEnum.PERSONAL.getCode()); + cerePlatformBusiness.setCheckState(IntegerEnum.UNTREATED.getCode()); cerePlatformBusiness.setCreateTime(time); - cerePlatformBusiness.setUsername(cerePlatformShop.getShopPhone()); - cerePlatformBusiness.setPassword(cerePlatformShop.getShopPassword()); - cerePlatformBusiness.setName(cerePlatformShop.getChargePersonName()); + cerePlatformBusiness.setBusinessName(param.getShopName()); + cerePlatformBusiness.setChargePersonName(param.getChargePersonName()); + cerePlatformBusiness.setChargePersonPhone(param.getChargePersonPhone()); + cerePlatformBusiness.setBusinessAdressProvince(param.getShopAdressProvince()); + cerePlatformBusiness.setBusinessAdressCity(param.getShopAdressCity()); + cerePlatformBusiness.setBusinessAdressDetail(param.getShopAdressDetail()); + cerePlatformBusiness.setBusinessAdress(param.getShopAdressProvince() + param.getShopAdressCity() + StringUtils.trimToEmpty(param.getShopAdressDetail())); cerePlatformBusiness.setState(IntegerEnum.YES.getCode()); + cerePlatformBusiness.setContractState(IntegerEnum.YES.getCode()); + cerePlatformBusiness.setEffectiveDate(time); + cerePlatformBusiness.setEffectiveYear(1); +// cerePlatformBusiness.setShopPassword(EncryptUtil.encrypt("123456")); cerePlatformBusinessService.insert(cerePlatformBusiness); + //同步新增商家用户数据 + CerePlatformBusinessUser cerePlatformBusinessUser =new CerePlatformBusinessUser(); + cerePlatformBusinessUser.setCreateTime(time); + cerePlatformBusinessUser.setUsername(param.getShopPhone()); + cerePlatformBusinessUser.setPassword(EncryptUtil.encrypt("123456")); + cerePlatformBusinessUser.setName(cerePlatformBusiness.getChargePersonName()); + cerePlatformBusinessUser.setState(IntegerEnum.YES.getCode()); + cerePlatformBusinessUserService.insert(cerePlatformBusinessUser); //同步新增商家用户绑定店铺数据 - CereBusinessShop cereBusinessShop=new CereBusinessShop(); - cereBusinessShop.setBusinessUserId(cerePlatformBusiness.getBusinessUserId()); - cereBusinessShop.setShopId(cerePlatformShop.getShopId()); - cereBusinessShop.setIfBinding(IntegerEnum.YES.getCode()); - cereBusinessShopService.insert(cereBusinessShop); + CereBusinessUser cereBusinessUser =new CereBusinessUser(); + cereBusinessUser.setBusinessUserId(cerePlatformBusinessUser.getBusinessUserId()); + cereBusinessUser.setBusinessId(cerePlatformBusiness.getBusinessId()); + cereBusinessUser.setIfBinding(IntegerEnum.YES.getCode()); + cereBusinessUser.setIsMainUser(IntegerEnum.YES.getCode()); + cereBusinessUserService.insert(cereBusinessUser); //新增店铺认证个人数据 param.setCreateTime(time); - param.setShopId(cereBusinessShop.getShopId()); + param.setBusinessId(cereBusinessUser.getBusinessId()); cereShopPersonalDAO.insertSelective(param); //新增日志 这里没有user,所以new一个,并且设置userId 为shopId - user = new CerePlatformBusiness(); - user.setBusinessUserId(cerePlatformShop.getShopId()); - cerePlatformLogService.addLog(user,"入驻申请","商户端操作","提交个人入驻申请",cerePlatformShop.getShopId(),time); + user = new CerePlatformBusinessUser(); + user.setBusinessUserId(cerePlatformBusiness.getBusinessId()); + cerePlatformLogService.addLog(user,"入驻申请","商户端操作","提交个人入驻申请",cerePlatformBusiness.getBusinessId(),time); } @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void updatePersonalCheck(CereShopPersonalParam param, CerePlatformBusiness user) throws CoBusinessException { + public void updatePersonalCheck(CereShopPersonalParam param, CerePlatformBusinessUser user) throws CoBusinessException { //更新店铺数据 String time=TimeUtils.yyMMddHHmmss(); - CerePlatformShop cerePlatformShop=new CerePlatformShop(); - cerePlatformShop.setShopId(param.getShopId()); - cerePlatformShop.setShopName(param.getShopName()); - cerePlatformShop.setShopPhone(param.getShopPhone()); - cerePlatformShop.setChargePersonPhone(param.getChargePersonPhone()); - cerePlatformShop.setChargePersonName(param.getChargePersonName()); - cerePlatformShop.setShopAdressProvince(param.getShopAdressProvince()); - cerePlatformShop.setShopAdressCity(param.getShopAdressCity()); - cerePlatformShop.setShopAdressDetail(param.getShopAdressDetail()); - cerePlatformShop.setShopAdress(param.getShopAdressProvince() + param.getShopAdressCity() + StringUtils.trimToEmpty(param.getShopAdressDetail())); - cerePlatformShop.setUpdateTime(time); - cerePlatformShopService.update(cerePlatformShop); + CerePlatformBusiness cerePlatformBusiness=new CerePlatformBusiness(); + cerePlatformBusiness.setBusinessId(param.getBusinessId()); + cerePlatformBusiness.setBusinessName(param.getShopName()); + cerePlatformBusiness.setBusinessPhone(param.getShopPhone()); + cerePlatformBusiness.setChargePersonPhone(param.getChargePersonPhone()); + cerePlatformBusiness.setChargePersonName(param.getChargePersonName()); + cerePlatformBusiness.setBusinessAdressProvince(param.getShopAdressProvince()); + cerePlatformBusiness.setBusinessAdressCity(param.getShopAdressCity()); + cerePlatformBusiness.setBusinessAdressDetail(param.getShopAdressDetail()); + cerePlatformBusiness.setBusinessAdress(param.getShopAdressProvince() + param.getShopAdressCity() + StringUtils.trimToEmpty(param.getShopAdressDetail())); + cerePlatformBusiness.setUpdateTime(time); + cerePlatformBusinessService.update(cerePlatformBusiness); //查询是否存在认证数据 - CereShopPersonal cereShopPersonal=cereShopPersonalDAO.findByShopId(param.getShopId()); + CereShopPersonal cereShopPersonal=cereShopPersonalDAO.findByBusinessId(param.getBusinessId()); if(cereShopPersonal!=null){ //更新认证数据 param.setUpdateTime(time); @@ -163,8 +164,8 @@ public class CereShopPersonalServiceImpl implements CereShopPersonalService { cereShopPersonalDAO.insertParam(param); } //新增日志 这里没有user,所以new一个,并且设置userId 为shopId - user = new CerePlatformBusiness(); - user.setBusinessUserId(cerePlatformShop.getShopId()); - cerePlatformLogService.addLog(user,"入驻申请","商户端操作","修改个人入驻申请",cerePlatformShop.getShopId(),time); + user = new CerePlatformBusinessUser(); + user.setBusinessUserId(cerePlatformBusiness.getBusinessId()); + cerePlatformLogService.addLog(user,"入驻申请","商户端操作","修改个人入驻申请",cerePlatformBusiness.getBusinessId(),time); } } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopRecruitServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopRecruitServiceImpl.java index e45c2c2..2ce1440 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopRecruitServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopRecruitServiceImpl.java @@ -11,7 +11,7 @@ import com.shop.cereshop.business.service.distributor.CereShopDistributorService import com.shop.cereshop.business.service.log.CerePlatformLogService; import com.shop.cereshop.business.service.shop.CereShopRecruitService; import com.shop.cereshop.commons.constant.IntegerEnum; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.distributor.CereShopDistributor; import com.shop.cereshop.commons.domain.shop.CereShopRecruit; import com.shop.cereshop.commons.exception.CoBusinessException; @@ -39,7 +39,7 @@ public class CereShopRecruitServiceImpl implements CereShopRecruitService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void save(ShopRecruitParam param, CerePlatformBusiness user) throws CoBusinessException { + public void save(ShopRecruitParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time = TimeUtils.yyMMddHHmmss(); CereShopRecruit recruit=new CereShopRecruit(); recruit.setShopId(param.getShopId()); @@ -57,7 +57,7 @@ public class CereShopRecruitServiceImpl implements CereShopRecruitService { } @Override - public void update(ShopRecruitParam param, CerePlatformBusiness user) throws CoBusinessException { + public void update(ShopRecruitParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time = TimeUtils.yyMMddHHmmss(); CereShopRecruit recruit=new CereShopRecruit(); recruit.setShopId(param.getShopId()); diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopRelationshipServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopRelationshipServiceImpl.java index 9a9ae54..e9f4563 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopRelationshipServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopRelationshipServiceImpl.java @@ -18,7 +18,7 @@ import com.shop.cereshop.business.service.redis.CereRedisKeyServcice; import com.shop.cereshop.business.service.shop.CereShopRelationshipService; import com.shop.cereshop.business.utils.EncodeUtil; import com.shop.cereshop.commons.constant.CoReturnFormat; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.shop.CereShopRelationship; import com.shop.cereshop.commons.exception.CoBusinessException; @@ -52,7 +52,7 @@ public class CereShopRelationshipServiceImpl implements CereShopRelationshipServ @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void save(ShipSaveParam param, CerePlatformBusiness user) throws CoBusinessException,Exception { + public void save(ShipSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception { String time = TimeUtils.yyMMddHHmmss(); CereShopRelationship relationship=new CereShopRelationship(); relationship.setShopId(param.getShopId()); @@ -76,7 +76,7 @@ public class CereShopRelationshipServiceImpl implements CereShopRelationshipServ @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void update(ShipUpdateParam param, CerePlatformBusiness user) throws CoBusinessException,Exception { + public void update(ShipUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception { CereShopRelationship relationship=new CereShopRelationship(); relationship.setShopId(param.getShopId()); relationship.setBindValidity(param.getBindValidity()); diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopReturnServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopReturnServiceImpl.java index 8b5d7f2..03ef739 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopReturnServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopReturnServiceImpl.java @@ -8,7 +8,7 @@ package com.shop.cereshop.business.service.shop.impl; import com.shop.cereshop.business.dao.shop.CereShopReturnDAO; import com.shop.cereshop.business.service.log.CerePlatformLogService; import com.shop.cereshop.business.service.shop.CereShopReturnService; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.shop.CereShopReturn; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.utils.TimeUtils; @@ -34,7 +34,7 @@ public class CereShopReturnServiceImpl implements CereShopReturnService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void updateReturn(CereShopReturn cereShopReturn, CerePlatformBusiness user) throws CoBusinessException { + public void updateReturn(CereShopReturn cereShopReturn, CerePlatformBusinessUser user) throws CoBusinessException { String time = TimeUtils.yyMMddHHmmss(); cereShopReturnDAO.updateData(cereShopReturn); //新增日志 diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopWithdrawalServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopWithdrawalServiceImpl.java index 40328e0..a976ba2 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopWithdrawalServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/shop/impl/CereShopWithdrawalServiceImpl.java @@ -12,8 +12,7 @@ import com.shop.cereshop.business.service.order.CereShopOrderService; import com.shop.cereshop.business.service.shop.CereShopWithdrawalService; import com.shop.cereshop.commons.constant.CoReturnFormat; import com.shop.cereshop.commons.constant.IntegerEnum; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; -import com.shop.cereshop.commons.domain.order.CereShopOrder; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.shop.CereShopBank; import com.shop.cereshop.commons.domain.shop.CereShopWithdrawal; import com.shop.cereshop.commons.exception.CoBusinessException; @@ -40,7 +39,7 @@ public class CereShopWithdrawalServiceImpl implements CereShopWithdrawalService @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void save(FinanceSaveWithdralwalParam param, CerePlatformBusiness user) throws CoBusinessException { + public void save(FinanceSaveWithdralwalParam param, CerePlatformBusinessUser user) throws CoBusinessException { //查询提现中金额 BigDecimal stayMoney = cereShopOrderService.getWithdrawableStayMoney(param.getShopId()); //查询总的可提现金额 diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/stock/CereKcStockNoteService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/stock/CereKcStockNoteService.java index 520f3a2..f87c562 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/stock/CereKcStockNoteService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/stock/CereKcStockNoteService.java @@ -9,7 +9,7 @@ import com.shop.cereshop.business.page.stock.KcStockNote; import com.shop.cereshop.business.param.stock.KcStockNoteGetAllParam; import com.shop.cereshop.business.param.stock.KcStockNoteSaveParam; import com.shop.cereshop.business.param.stock.KcStockNoteUpdateParam; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.exception.CoBusinessException; @@ -39,7 +39,7 @@ public interface CereKcStockNoteService { * @return * @throws CoBusinessException */ - int update(KcStockNoteUpdateParam kcStockNoteUpdateParam, CerePlatformBusiness user) throws CoBusinessException; + int update(KcStockNoteUpdateParam kcStockNoteUpdateParam, CerePlatformBusinessUser user) throws CoBusinessException; /** * 插入出入库单 @@ -48,7 +48,7 @@ public interface CereKcStockNoteService { * @return * @throws CoBusinessException */ - int insert(KcStockNoteSaveParam kcStockNoteSaveParam, CerePlatformBusiness user) throws CoBusinessException; + int insert(KcStockNoteSaveParam kcStockNoteSaveParam, CerePlatformBusinessUser user) throws CoBusinessException; /** * 删除出入库单 @@ -57,5 +57,5 @@ public interface CereKcStockNoteService { * @return * @throws CoBusinessException */ - int deleteById(Long stockNoteId, CerePlatformBusiness user) throws CoBusinessException; + int deleteById(Long stockNoteId, CerePlatformBusinessUser user) throws CoBusinessException; } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/stock/impl/CereKcStockNoteServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/stock/impl/CereKcStockNoteServiceImpl.java index f68cde9..8c563e1 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/stock/impl/CereKcStockNoteServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/stock/impl/CereKcStockNoteServiceImpl.java @@ -20,12 +20,13 @@ import com.shop.cereshop.business.service.product.CereProductSkuService; import com.shop.cereshop.business.service.stock.CereKcStockNoteService; import com.shop.cereshop.business.utils.ContextUtil; import com.shop.cereshop.commons.cache.constants.CacheKeyConstants; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.product.CereProductSku; import com.shop.cereshop.commons.domain.stock.CereKcStockNote; import com.shop.cereshop.commons.exception.CoBusinessException; import com.shop.cereshop.commons.utils.StockBillType; +import com.shop.cereshop.commons.utils.TimeUtils; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -60,7 +61,7 @@ public class CereKcStockNoteServiceImpl implements CereKcStockNoteService { @Override public Page getAll(KcStockNoteGetAllParam param) throws CoBusinessException { - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); PageHelper.startPage(param.getPage(),param.getPageSize()); List list= cereKcStockNoteDAO.selectNoteList(param); PageInfo pageInfo=new PageInfo<>(list); @@ -69,15 +70,15 @@ public class CereKcStockNoteServiceImpl implements CereKcStockNoteService { @Override public List selectAllByParam(KcStockNoteGetAllParam param) throws CoBusinessException { - param.setShopId(ContextUtil.getShopId()); + param.setShopId(ContextUtil.getBusinessId()); List list= cereKcStockNoteDAO.selectNoteList(param); return list; } @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public int update(KcStockNoteUpdateParam kcStockNoteUpdateParam, CerePlatformBusiness user) throws CoBusinessException { - kcStockNoteUpdateParam.setShopId(ContextUtil.getShopId()); + public int update(KcStockNoteUpdateParam kcStockNoteUpdateParam, CerePlatformBusinessUser user) throws CoBusinessException { + kcStockNoteUpdateParam.setShopId(ContextUtil.getBusinessId()); kcStockNoteUpdateParam.setCreateBy(user.getBusinessUserId()); CereKcStockNote lastCereKcStockNote = cereKcStockNoteDAO.selectById(kcStockNoteUpdateParam.getStockNoteId()); @@ -95,6 +96,8 @@ public class CereKcStockNoteServiceImpl implements CereKcStockNoteService { CereKcStockNote cereKcStockNote = new CereKcStockNote(); BeanUtils.copyProperties(kcStockNoteUpdateParam, cereKcStockNote); + String time= TimeUtils.yyMMddHHmmss(); + cereKcStockNote.setUpdateTime(time); int result = cereKcStockNoteDAO.updateById(cereKcStockNote); if(cereKcStockNote.getBillTypeId() == StockBillType.CGRK.getTypeKey() || @@ -114,13 +117,14 @@ public class CereKcStockNoteServiceImpl implements CereKcStockNoteService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public int insert(KcStockNoteSaveParam kcStockNoteSaveParam, CerePlatformBusiness user) throws CoBusinessException { - - System.out.println(JSON.toJSON(kcStockNoteSaveParam)); - kcStockNoteSaveParam.setShopId(ContextUtil.getShopId()); + public int insert(KcStockNoteSaveParam kcStockNoteSaveParam, CerePlatformBusinessUser user) throws CoBusinessException { + kcStockNoteSaveParam.setShopId(ContextUtil.getBusinessId()); kcStockNoteSaveParam.setCreateBy(user.getBusinessUserId()); CereKcStockNote cereKcStockNote = new CereKcStockNote(); BeanUtils.copyProperties(kcStockNoteSaveParam, cereKcStockNote); + String time= TimeUtils.yyMMddHHmmss(); + cereKcStockNote.setCreateTime(time); + cereKcStockNote.setUpdateTime(time); int result = cereKcStockNoteDAO.insert(cereKcStockNote); //修改库存 if(cereKcStockNote.getBillTypeId() == StockBillType.CGRK.getTypeKey() || @@ -137,7 +141,7 @@ public class CereKcStockNoteServiceImpl implements CereKcStockNoteService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public int deleteById(Long stockNoteId, CerePlatformBusiness user) throws CoBusinessException { + public int deleteById(Long stockNoteId, CerePlatformBusinessUser user) throws CoBusinessException { CereKcStockNote cereKcStockNote = cereKcStockNoteDAO.selectById(stockNoteId); if(cereKcStockNote == null){ throw new CoBusinessException("500", "查找不到对应的出入库单", ""); diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/storehouse/CereShopStorehouseService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/storehouse/CereShopStorehouseService.java index 207b288..6de2866 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/storehouse/CereShopStorehouseService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/storehouse/CereShopStorehouseService.java @@ -9,9 +9,8 @@ import com.shop.cereshop.business.page.storehouse.Storehouse; import com.shop.cereshop.business.param.storehouse.ShopStorehouseGetAllParam; import com.shop.cereshop.business.param.storehouse.ShopStorehouseSaveParam; import com.shop.cereshop.business.param.storehouse.ShopStorehouseUpdateParam; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; -import com.shop.cereshop.commons.domain.shop.CereShopGroup; import com.shop.cereshop.commons.domain.storehouse.CereShopStorehouse; import com.shop.cereshop.commons.exception.CoBusinessException; @@ -41,7 +40,7 @@ public interface CereShopStorehouseService { * @return * @throws CoBusinessException */ - int update(ShopStorehouseUpdateParam shopStorehouseUpdateParam, CerePlatformBusiness user) throws CoBusinessException; + int update(ShopStorehouseUpdateParam shopStorehouseUpdateParam, CerePlatformBusinessUser user) throws CoBusinessException; /** * 插入仓库 @@ -50,7 +49,7 @@ public interface CereShopStorehouseService { * @return * @throws CoBusinessException */ - int insert(ShopStorehouseSaveParam shopStorehouseSaveParam, CerePlatformBusiness user) throws CoBusinessException; + int insert(ShopStorehouseSaveParam shopStorehouseSaveParam, CerePlatformBusinessUser user) throws CoBusinessException; /** * 删除仓库 @@ -59,7 +58,7 @@ public interface CereShopStorehouseService { * @return * @throws CoBusinessException */ - int deleteById(Long storehouseId, CerePlatformBusiness user) throws CoBusinessException; + int deleteById(Long storehouseId, CerePlatformBusinessUser user) throws CoBusinessException; List selectAll(); } diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/storehouse/impl/CereShopStorehouseServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/storehouse/impl/CereShopStorehouseServiceImpl.java index d363544..2e1bd36 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/storehouse/impl/CereShopStorehouseServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/storehouse/impl/CereShopStorehouseServiceImpl.java @@ -15,7 +15,7 @@ import com.shop.cereshop.business.param.storehouse.ShopStorehouseSaveParam; import com.shop.cereshop.business.param.storehouse.ShopStorehouseUpdateParam; import com.shop.cereshop.business.service.log.CerePlatformLogService; import com.shop.cereshop.business.service.storehouse.CereShopStorehouseService; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.storehouse.CereShopStorehouse; import com.shop.cereshop.commons.exception.CoBusinessException; @@ -80,7 +80,7 @@ public class CereShopStorehouseServiceImpl implements CereShopStorehouseService @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public int update(ShopStorehouseUpdateParam shopStorehouseUpdateParam, CerePlatformBusiness user) throws CoBusinessException { + public int update(ShopStorehouseUpdateParam shopStorehouseUpdateParam, CerePlatformBusinessUser user) throws CoBusinessException { CereShopStorehouse cereShopStorehouse = new CereShopStorehouse(); BeanUtils.copyProperties(shopStorehouseUpdateParam, cereShopStorehouse); int result = cereShopStorehouseDAO.updateById(cereShopStorehouse); @@ -91,7 +91,7 @@ public class CereShopStorehouseServiceImpl implements CereShopStorehouseService @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public int insert(ShopStorehouseSaveParam shopStorehouseSaveParam, CerePlatformBusiness user) throws CoBusinessException { + public int insert(ShopStorehouseSaveParam shopStorehouseSaveParam, CerePlatformBusinessUser user) throws CoBusinessException { CereShopStorehouse cereShopStorehouse = new CereShopStorehouse(); BeanUtils.copyProperties(shopStorehouseSaveParam, cereShopStorehouse); int result = cereShopStorehouseDAO.insert(cereShopStorehouse); @@ -102,7 +102,7 @@ public class CereShopStorehouseServiceImpl implements CereShopStorehouseService @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public int deleteById(Long storehouseId, CerePlatformBusiness user) throws CoBusinessException { + public int deleteById(Long storehouseId, CerePlatformBusinessUser user) throws CoBusinessException { CereShopStorehouse cereShopStorehouse=new CereShopStorehouse(); cereShopStorehouse.setStorehouseId(storehouseId); int result = cereShopStorehouseDAO.deleteById(cereShopStorehouse); diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/CereShopCouponService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/CereShopCouponService.java index d60c6e1..3d327fa 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/CereShopCouponService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/CereShopCouponService.java @@ -10,7 +10,7 @@ import com.shop.cereshop.business.page.tool.ShopCouponData; import com.shop.cereshop.business.page.tool.ShopCouponDetail; import com.shop.cereshop.business.param.canvas.CanvasCouponParam; import com.shop.cereshop.business.param.tool.*; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.tool.CereShopCoupon; import com.shop.cereshop.commons.exception.CoBusinessException; @@ -18,17 +18,17 @@ import com.shop.cereshop.commons.exception.CoBusinessException; import java.util.List; public interface CereShopCouponService { - void save(ShopCouponSaveParam param, CerePlatformBusiness user) throws CoBusinessException,Exception; + void save(ShopCouponSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception; - void update(ShopCouponUpdateParam param, CerePlatformBusiness user) throws CoBusinessException,Exception; + void update(ShopCouponUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception; ShopCouponDetail getById(Long shopCouponId) throws CoBusinessException; Page getAll(ShopCouponGetAllParam param) throws CoBusinessException; - void delete(Long shopCouponId, CerePlatformBusiness user) throws CoBusinessException; + void delete(Long shopCouponId, CerePlatformBusinessUser user) throws CoBusinessException; - void stop(Long shopCouponId, CerePlatformBusiness user) throws CoBusinessException; + void stop(Long shopCouponId, CerePlatformBusinessUser user) throws CoBusinessException; Page getProducts(ToolProductParam param) throws CoBusinessException; diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/CereShopCrowdService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/CereShopCrowdService.java index f80a140..b68ff66 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/CereShopCrowdService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/CereShopCrowdService.java @@ -8,7 +8,7 @@ package com.shop.cereshop.business.service.tool; import com.shop.cereshop.business.page.buyer.BuyerUser; import com.shop.cereshop.business.page.tool.ShopCrowdDetail; import com.shop.cereshop.business.param.tool.*; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.tool.CereShopCrowd; import com.shop.cereshop.commons.exception.CoBusinessException; @@ -16,11 +16,11 @@ import com.shop.cereshop.commons.exception.CoBusinessException; import java.util.List; public interface CereShopCrowdService { - void save(ShopCrowdSaveParam param, CerePlatformBusiness user) throws CoBusinessException; + void save(ShopCrowdSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException; - void update(ShopCrowdUpdateParam param, CerePlatformBusiness user) throws CoBusinessException; + void update(ShopCrowdUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException; - void delete(ShopCrowdGetByIdParam param, CerePlatformBusiness user) throws CoBusinessException; + void delete(ShopCrowdGetByIdParam param, CerePlatformBusinessUser user) throws CoBusinessException; ShopCrowdDetail getById(Long shopCrowdId) throws CoBusinessException; diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/CereShopDiscountService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/CereShopDiscountService.java index 3a9163d..5d5bd54 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/CereShopDiscountService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/CereShopDiscountService.java @@ -9,7 +9,7 @@ import com.shop.cereshop.business.page.tool.ShopDiscountData; import com.shop.cereshop.business.page.tool.ShopDiscountDetail; import com.shop.cereshop.business.param.renovation.RenovationParam; import com.shop.cereshop.business.param.tool.*; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.tool.CereShopDiscount; import com.shop.cereshop.commons.exception.CoBusinessException; @@ -17,13 +17,13 @@ import com.shop.cereshop.commons.exception.CoBusinessException; import java.util.List; public interface CereShopDiscountService { - void save(ShopDiscountSaveParam param, CerePlatformBusiness user) throws CoBusinessException,Exception; + void save(ShopDiscountSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception; - void update(ShopDiscountUpdateParam param, CerePlatformBusiness user) throws CoBusinessException,Exception; + void update(ShopDiscountUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception; - void delete(Long shopDiscountId, CerePlatformBusiness user) throws CoBusinessException; + void delete(Long shopDiscountId, CerePlatformBusinessUser user) throws CoBusinessException; - void stop(Long shopDiscountId, CerePlatformBusiness user) throws CoBusinessException; + void stop(Long shopDiscountId, CerePlatformBusinessUser user) throws CoBusinessException; ShopDiscountDetail getById(Long shopDiscountId) throws CoBusinessException; diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/CereShopGroupWorkService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/CereShopGroupWorkService.java index ae8d68a..4a1e1b1 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/CereShopGroupWorkService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/CereShopGroupWorkService.java @@ -9,7 +9,7 @@ import com.shop.cereshop.business.page.tool.ShopGroupWorkData; import com.shop.cereshop.business.page.tool.ShopGroupWorkUDetail; import com.shop.cereshop.business.param.renovation.RenovationParam; import com.shop.cereshop.business.param.tool.*; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.tool.CereShopGroupWork; import com.shop.cereshop.commons.exception.CoBusinessException; @@ -17,13 +17,13 @@ import com.shop.cereshop.commons.exception.CoBusinessException; import java.util.List; public interface CereShopGroupWorkService { - void save(ShopGroupWorkSaveParam param, CerePlatformBusiness user) throws CoBusinessException,Exception; + void save(ShopGroupWorkSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception; - void update(ShopGroupWorkUpdateParam param, CerePlatformBusiness user) throws CoBusinessException,Exception; + void update(ShopGroupWorkUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception; - void delete(Long shopGroupWorkId, CerePlatformBusiness user) throws CoBusinessException; + void delete(Long shopGroupWorkId, CerePlatformBusinessUser user) throws CoBusinessException; - void stop(Long shopGroupWorkId, CerePlatformBusiness user) throws CoBusinessException,Exception; + void stop(Long shopGroupWorkId, CerePlatformBusinessUser user) throws CoBusinessException,Exception; ShopGroupWorkUDetail getById(Long shopGroupWorkId) throws CoBusinessException; diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/CereShopOperateService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/CereShopOperateService.java index 8e227db..74731a3 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/CereShopOperateService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/CereShopOperateService.java @@ -9,7 +9,7 @@ import com.shop.cereshop.business.page.operate.OperateCoupon; import com.shop.cereshop.business.page.operate.OperateData; import com.shop.cereshop.business.page.tool.ShopOperateDetail; import com.shop.cereshop.business.param.tool.*; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.buyer.CereBuyerShopCoupon; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.notice.CereNotice; @@ -20,7 +20,7 @@ import com.shop.cereshop.commons.exception.CoBusinessException; import java.util.List; public interface CereShopOperateService { - void saveOperate(ShopOperateSaveParam param, CerePlatformBusiness user) throws CoBusinessException,Exception; + void saveOperate(ShopOperateSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception; Page selectCoupon(OperateCouponParam param) throws CoBusinessException,Exception; @@ -42,13 +42,13 @@ public interface CereShopOperateService { void insertBatchBuyerCoupon(List buyerShopCoupons) throws CoBusinessException; - void update(ShopOperateUpdateParam param, CerePlatformBusiness user) throws CoBusinessException,Exception; + void update(ShopOperateUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception; void updateState(CereShopOperate cereShopOperate) throws CoBusinessException; CereShopOperate findById(Long shopOperateId); - void delete(List ids, CerePlatformBusiness user) throws CoBusinessException; + void delete(List ids, CerePlatformBusinessUser user) throws CoBusinessException; ShopOperateDetail getById(Long shopOperateId) throws CoBusinessException; diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/CereShopSeckillService.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/CereShopSeckillService.java index 3450ad0..424590c 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/CereShopSeckillService.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/CereShopSeckillService.java @@ -9,22 +9,21 @@ import com.shop.cereshop.business.page.tool.ShopSeckillData; import com.shop.cereshop.business.page.tool.ShopSeckillDetail; import com.shop.cereshop.business.param.renovation.RenovationParam; import com.shop.cereshop.business.param.tool.*; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; -import com.shop.cereshop.commons.domain.tool.CereShopGroupWork; import com.shop.cereshop.commons.domain.tool.CereShopSeckill; import com.shop.cereshop.commons.exception.CoBusinessException; import java.util.List; public interface CereShopSeckillService { - void save(ShopSeckillSaveParam param, CerePlatformBusiness user) throws CoBusinessException,Exception; + void save(ShopSeckillSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception; - void update(ShopSeckillUpdateParam param, CerePlatformBusiness user) throws CoBusinessException,Exception; + void update(ShopSeckillUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception; - void delete(Long shopSeckillId, CerePlatformBusiness user) throws CoBusinessException; + void delete(Long shopSeckillId, CerePlatformBusinessUser user) throws CoBusinessException; - void stop(Long shopSeckillId, CerePlatformBusiness user) throws CoBusinessException; + void stop(Long shopSeckillId, CerePlatformBusinessUser user) throws CoBusinessException; ShopSeckillDetail getById(Long shopSeckillId) throws CoBusinessException; diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/impl/CereShopCouponServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/impl/CereShopCouponServiceImpl.java index 5e78cc9..f5b8b8a 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/impl/CereShopCouponServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/impl/CereShopCouponServiceImpl.java @@ -23,7 +23,7 @@ import com.shop.cereshop.business.service.tool.CereShopCouponService; import com.shop.cereshop.commons.constant.CoReturnFormat; import com.shop.cereshop.commons.constant.IntegerEnum; import com.shop.cereshop.commons.constant.StringEnum; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.tool.CereShopCoupon; import com.shop.cereshop.commons.domain.tool.CereShopCouponDetail; @@ -67,7 +67,7 @@ public class CereShopCouponServiceImpl implements CereShopCouponService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void save(ShopCouponSaveParam param, CerePlatformBusiness user) throws CoBusinessException,Exception { + public void save(ShopCouponSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception { String time = TimeUtils.yyMMddHHmmss(); List ids=null; List excludeIds = null; @@ -203,7 +203,7 @@ public class CereShopCouponServiceImpl implements CereShopCouponService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void update(ShopCouponUpdateParam param, CerePlatformBusiness user) throws CoBusinessException, Exception { + public void update(ShopCouponUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException, Exception { String time = TimeUtils.yyMMddHHmmss(); List ids=new ArrayList<>(); List excludeIds = null; @@ -371,7 +371,7 @@ public class CereShopCouponServiceImpl implements CereShopCouponService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void delete(Long shopCouponId, CerePlatformBusiness user) throws CoBusinessException { + public void delete(Long shopCouponId, CerePlatformBusinessUser user) throws CoBusinessException { String time =TimeUtils.yyMMddHHmmss(); cereShopCouponDAO.deleteByPrimaryKey(shopCouponId); //删除商品明细 @@ -382,7 +382,7 @@ public class CereShopCouponServiceImpl implements CereShopCouponService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void stop(Long shopCouponId, CerePlatformBusiness user) throws CoBusinessException { + public void stop(Long shopCouponId, CerePlatformBusinessUser user) throws CoBusinessException { String time =TimeUtils.yyMMddHHmmss(); CereShopCoupon cereShopCoupon=new CereShopCoupon(); cereShopCoupon.setShopCouponId(shopCouponId); diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/impl/CereShopCrowdServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/impl/CereShopCrowdServiceImpl.java index a9270e7..1c2de27 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/impl/CereShopCrowdServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/impl/CereShopCrowdServiceImpl.java @@ -17,7 +17,7 @@ import com.shop.cereshop.business.service.log.CerePlatformLogService; import com.shop.cereshop.business.service.tool.CereShopCrowdService; import com.shop.cereshop.commons.constant.CoReturnFormat; import com.shop.cereshop.commons.constant.IntegerEnum; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.tool.CereShopCrowd; import com.shop.cereshop.commons.exception.CoBusinessException; @@ -49,7 +49,7 @@ public class CereShopCrowdServiceImpl implements CereShopCrowdService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void save(ShopCrowdSaveParam param, CerePlatformBusiness user) throws CoBusinessException { + public void save(ShopCrowdSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time = TimeUtils.yyMMddHHmmss(); //校验名称 CereShopCrowd cereShopCrowd=cereShopCrowdDAO.checkName(param.getCrowdName(),null); @@ -58,7 +58,7 @@ public class CereShopCrowdServiceImpl implements CereShopCrowdService { } cereShopCrowd=new CereShopCrowd(); cereShopCrowd.setCreateTime(time); - cereShopCrowd.setShopId(user.getShopId()); + cereShopCrowd.setShopId(user.getBusinessId()); cereShopCrowd.setCrowdName(param.getCrowdName()); //查询满足条件的客户数量 List ids=null; @@ -66,7 +66,7 @@ public class CereShopCrowdServiceImpl implements CereShopCrowdService { for (CrowdCondition condition : param.getConditions()) { //查询满足条件的客户id数组 condition.setIds(ids); - condition.setShopId(user.getShopId()); + condition.setShopId(user.getBusinessId()); switch (condition.getType()){ case 1 : cereShopCrowd.setShopBuyYes(Integer.parseInt(condition.getNumber().stripTrailingZeros().toPlainString())); @@ -150,7 +150,7 @@ public class CereShopCrowdServiceImpl implements CereShopCrowdService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void update(ShopCrowdUpdateParam param, CerePlatformBusiness user) throws CoBusinessException { + public void update(ShopCrowdUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time = TimeUtils.yyMMddHHmmss(); //校验名称 CereShopCrowd cereShopCrowd=cereShopCrowdDAO.checkName(param.getCrowdName(),param.getShopCrowdId()); @@ -160,14 +160,14 @@ public class CereShopCrowdServiceImpl implements CereShopCrowdService { cereShopCrowd=new CereShopCrowd(); cereShopCrowd.setShopCrowdId(param.getShopCrowdId()); cereShopCrowd.setCreateTime(time); - cereShopCrowd.setShopId(user.getShopId()); + cereShopCrowd.setShopId(user.getBusinessId()); cereShopCrowd.setCrowdName(param.getCrowdName()); //查询满足条件的客户数量 List ids=null; if(!EmptyUtils.isEmpty(param.getConditions())){ for (CrowdCondition condition : param.getConditions()) { //查询满足条件的客户id数组 - condition.setShopId(user.getShopId()); + condition.setShopId(user.getBusinessId()); condition.setIds(ids); switch (condition.getType()){ case 1 : @@ -254,7 +254,7 @@ public class CereShopCrowdServiceImpl implements CereShopCrowdService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void delete(ShopCrowdGetByIdParam param, CerePlatformBusiness user) throws CoBusinessException { + public void delete(ShopCrowdGetByIdParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time =TimeUtils.yyMMddHHmmss(); cereShopCrowdDAO.deleteByIds(param.getIds()); //新增日志 diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/impl/CereShopDiscountServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/impl/CereShopDiscountServiceImpl.java index 54e55a4..d120721 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/impl/CereShopDiscountServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/impl/CereShopDiscountServiceImpl.java @@ -23,7 +23,7 @@ import com.shop.cereshop.commons.constant.CoReturnFormat; import com.shop.cereshop.commons.constant.IntegerEnum; import com.shop.cereshop.commons.constant.RefreshSkuRealInfoSourceEnum; import com.shop.cereshop.commons.constant.StringEnum; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.order.CereShopOrder; import com.shop.cereshop.commons.domain.tool.CereShopDiscount; @@ -75,7 +75,7 @@ public class CereShopDiscountServiceImpl implements CereShopDiscountService{ @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void save(ShopDiscountSaveParam param, CerePlatformBusiness user) throws CoBusinessException,Exception { + public void save(ShopDiscountSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception { if(IntegerEnum.YES.getCode().equals(param.getIfNumber())){ //如果限制数量 if(EmptyUtils.isEmpty(param.getNumber())){ @@ -182,7 +182,7 @@ public class CereShopDiscountServiceImpl implements CereShopDiscountService{ @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void update(ShopDiscountUpdateParam param, CerePlatformBusiness user) throws CoBusinessException,Exception { + public void update(ShopDiscountUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception { if(IntegerEnum.YES.getCode().equals(param.getIfNumber())){ //如果限制数量 if(EmptyUtils.isEmpty(param.getNumber())){ @@ -305,7 +305,7 @@ public class CereShopDiscountServiceImpl implements CereShopDiscountService{ @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void delete(Long shopDiscountId, CerePlatformBusiness user) throws CoBusinessException { + public void delete(Long shopDiscountId, CerePlatformBusinessUser user) throws CoBusinessException { String time =TimeUtils.yyMMddHHmmss(); CereShopDiscount discount = cereShopDiscountDAO.selectByPrimaryKey(shopDiscountId); if (discount != null) { @@ -338,7 +338,7 @@ public class CereShopDiscountServiceImpl implements CereShopDiscountService{ @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void stop(Long shopDiscountId, CerePlatformBusiness user) throws CoBusinessException { + public void stop(Long shopDiscountId, CerePlatformBusinessUser user) throws CoBusinessException { String time =TimeUtils.yyMMddHHmmss(); CereShopDiscount cereShopDiscount=new CereShopDiscount(); cereShopDiscount.setShopDiscountId(shopDiscountId); diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/impl/CereShopGroupWorkServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/impl/CereShopGroupWorkServiceImpl.java index 2545a79..cb8e00b 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/impl/CereShopGroupWorkServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/impl/CereShopGroupWorkServiceImpl.java @@ -25,7 +25,7 @@ import com.shop.cereshop.commons.constant.CoReturnFormat; import com.shop.cereshop.commons.constant.IntegerEnum; import com.shop.cereshop.commons.constant.RefreshSkuRealInfoSourceEnum; import com.shop.cereshop.commons.constant.StringEnum; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.collage.CereCollageOrder; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.tool.CereShopGroupWork; @@ -83,7 +83,7 @@ public class CereShopGroupWorkServiceImpl implements CereShopGroupWorkService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void save(ShopGroupWorkSaveParam param, CerePlatformBusiness user) throws CoBusinessException,Exception { + public void save(ShopGroupWorkSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception { String time = TimeUtils.yyMMddHHmmss(); CereShopGroupWork cereShopGroupWork=new CereShopGroupWork(); cereShopGroupWork.setCreateTime(time); @@ -182,7 +182,7 @@ public class CereShopGroupWorkServiceImpl implements CereShopGroupWorkService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void update(ShopGroupWorkUpdateParam param, CerePlatformBusiness user) throws CoBusinessException,Exception { + public void update(ShopGroupWorkUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception { String time =TimeUtils.yyMMddHHmmss(); CereShopGroupWork cereShopGroupWork=new CereShopGroupWork(); cereShopGroupWork.setShopGroupWorkId(param.getShopGroupWorkId()); @@ -297,7 +297,7 @@ public class CereShopGroupWorkServiceImpl implements CereShopGroupWorkService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void delete(Long shopGroupWorkId, CerePlatformBusiness user) throws CoBusinessException { + public void delete(Long shopGroupWorkId, CerePlatformBusinessUser user) throws CoBusinessException { String time = TimeUtils.yyMMddHHmmss(); CereShopGroupWork groupWork = cereShopGroupWorkDAO.selectByPrimaryKey(shopGroupWorkId); if (groupWork != null) { @@ -330,7 +330,7 @@ public class CereShopGroupWorkServiceImpl implements CereShopGroupWorkService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void stop(Long shopGroupWorkId, CerePlatformBusiness user) throws CoBusinessException,Exception { + public void stop(Long shopGroupWorkId, CerePlatformBusinessUser user) throws CoBusinessException,Exception { //校验活动是否进行中 CereShopGroupWork cereShopGroupWork=new CereShopGroupWork(); String time = TimeUtils.yyMMddHHmmss(); diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/impl/CereShopOperateServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/impl/CereShopOperateServiceImpl.java index acdf359..cfe940d 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/impl/CereShopOperateServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/impl/CereShopOperateServiceImpl.java @@ -22,7 +22,7 @@ import com.shop.cereshop.business.service.tool.CereShopOperateDetailService; import com.shop.cereshop.business.service.tool.CereShopOperateService; import com.shop.cereshop.commons.constant.IntegerEnum; import com.shop.cereshop.commons.constant.StringEnum; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.buyer.CereBuyerShopCoupon; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.notice.CereNotice; @@ -69,7 +69,7 @@ public class CereShopOperateServiceImpl implements CereShopOperateService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void saveOperate(ShopOperateSaveParam param, CerePlatformBusiness user) throws CoBusinessException,Exception { + public void saveOperate(ShopOperateSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception { String time = TimeUtils.yyMMddHHmmss(); CereShopOperate cereShopOperate=new CereShopOperate(); cereShopOperate.setShopCrowdId(param.getShopCrowdId()); @@ -168,7 +168,7 @@ public class CereShopOperateServiceImpl implements CereShopOperateService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void update(ShopOperateUpdateParam param, CerePlatformBusiness user) throws CoBusinessException,Exception { + public void update(ShopOperateUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception { //删除相关延时任务 stringRedisService.delete(StringEnum.OPERATE_STATE_STOP.getCode()+"-"+param.getShopOperateId()); cereRedisKeyServcice.deleteByKey(StringEnum.OPERATE_STATE_STOP.getCode()+"-"+param.getShopOperateId()); @@ -266,7 +266,7 @@ public class CereShopOperateServiceImpl implements CereShopOperateService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void delete(List ids, CerePlatformBusiness user) throws CoBusinessException { + public void delete(List ids, CerePlatformBusinessUser user) throws CoBusinessException { if(!EmptyUtils.isEmpty(ids)){ for (Long id : ids) { cereShopOperateDAO.deleteByPrimaryKey(id); diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/impl/CereShopSeckillServiceImpl.java b/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/impl/CereShopSeckillServiceImpl.java index 13668cc..691bbc6 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/impl/CereShopSeckillServiceImpl.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/service/tool/impl/CereShopSeckillServiceImpl.java @@ -23,7 +23,7 @@ import com.shop.cereshop.commons.constant.CoReturnFormat; import com.shop.cereshop.commons.constant.IntegerEnum; import com.shop.cereshop.commons.constant.RefreshSkuRealInfoSourceEnum; import com.shop.cereshop.commons.constant.StringEnum; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; +import com.shop.cereshop.commons.domain.business.CerePlatformBusinessUser; import com.shop.cereshop.commons.domain.common.Page; import com.shop.cereshop.commons.domain.order.CereShopOrder; import com.shop.cereshop.commons.domain.tool.CereShopSeckill; @@ -75,7 +75,7 @@ public class CereShopSeckillServiceImpl implements CereShopSeckillService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void save(ShopSeckillSaveParam param, CerePlatformBusiness user) throws CoBusinessException,Exception { + public void save(ShopSeckillSaveParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception { if(IntegerEnum.YES.getCode().equals(param.getIfNumber())){ //如果限制数量 if(EmptyUtils.isEmpty(param.getNumber())){ @@ -181,7 +181,7 @@ public class CereShopSeckillServiceImpl implements CereShopSeckillService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void update(ShopSeckillUpdateParam param, CerePlatformBusiness user) throws CoBusinessException,Exception { + public void update(ShopSeckillUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException,Exception { if(IntegerEnum.YES.getCode().equals(param.getIfNumber())){ //如果限制数量 if(EmptyUtils.isEmpty(param.getNumber())){ @@ -304,7 +304,7 @@ public class CereShopSeckillServiceImpl implements CereShopSeckillService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void delete(Long shopSeckillId, CerePlatformBusiness user) throws CoBusinessException { + public void delete(Long shopSeckillId, CerePlatformBusinessUser user) throws CoBusinessException { String time =TimeUtils.yyMMddHHmmss(); CereShopSeckill seckill = cereShopSeckillDAO.selectByPrimaryKey(shopSeckillId); if (seckill != null) { @@ -337,7 +337,7 @@ public class CereShopSeckillServiceImpl implements CereShopSeckillService { @Override @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) - public void stop(Long shopSeckillId, CerePlatformBusiness user) throws CoBusinessException { + public void stop(Long shopSeckillId, CerePlatformBusinessUser user) throws CoBusinessException { String time =TimeUtils.yyMMddHHmmss(); CereShopSeckill cereShopSeckill=new CereShopSeckill(); cereShopSeckill.setShopSeckillId(shopSeckillId); diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/utils/ContextUtil.java b/cereshop-business/src/main/java/com/shop/cereshop/business/utils/ContextUtil.java index 4ccd31a..c3f8495 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/utils/ContextUtil.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/utils/ContextUtil.java @@ -7,30 +7,52 @@ package com.shop.cereshop.business.utils; import com.shop.cereshop.commons.constant.CoReturnFormat; import com.shop.cereshop.commons.exception.CoBusinessException; +import com.shop.cereshop.commons.utils.ProjectUtil; +import com.shop.cereshop.commons.utils.StringUtils; import org.springframework.stereotype.Component; @Component public class ContextUtil { - static ThreadLocal shopTL = new ThreadLocal<>(); + static ThreadLocal businessTL = new ThreadLocal<>(); - public static void setShopId(Long shopId){ - shopTL.set(shopId); + public static void setBusinessId(Long businessId){ + businessTL.set(businessId); } - public static void clearShopId(){ - shopTL.set(null); + public static void clearBusinessId(){ + businessTL.set(null); } - public static Long getShopId() throws CoBusinessException { - Long shopId = shopTL.get(); + public static Long getBusinessId() throws CoBusinessException { + Long shopId = businessTL.get(); if (shopId == null) { throw new CoBusinessException(CoReturnFormat.USER_NOT_LOGIN); } - return shopTL.get(); + return shopId; } public static void interceptDelete() throws CoBusinessException { throw new CoBusinessException(CoReturnFormat.DEMON_ACCOUNT_NOT_PERMITTED); } + + + static ThreadLocal projectTL = new ThreadLocal<>(); + + public static void setProject(String project){ + projectTL.set(project); + } + + public static void clearProject(){ + projectTL.set(null); + } + + public static String getProject(){ + String project = projectTL.get(); + if(StringUtils.isEmpty(project)) { + return ProjectUtil.DEFAULT_PROJECT; + }else { + return project; + } + } } diff --git a/cereshop-business/src/main/resources/mybatis/mapper/business/CereBusinessShopDAO.xml b/cereshop-business/src/main/resources/mybatis/mapper/business/CereBusinessShopDAO.xml deleted file mode 100644 index c3c8127..0000000 --- a/cereshop-business/src/main/resources/mybatis/mapper/business/CereBusinessShopDAO.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - insert into cere_business_shop - - - business_user_id, - - - shop_id, - - - if_binding, - - - - - #{businessUserId,jdbcType=BIGINT}, - - - #{shopId,jdbcType=BIGINT}, - - - #{ifBinding,jdbcType=BIT}, - - - - - - DELETE FROM cere_business_shop where business_user_id=#{businessUserId} - - - - diff --git a/cereshop-business/src/main/resources/mybatis/mapper/business/CereBusinessUserDAO.xml b/cereshop-business/src/main/resources/mybatis/mapper/business/CereBusinessUserDAO.xml new file mode 100644 index 0000000..85e5f19 --- /dev/null +++ b/cereshop-business/src/main/resources/mybatis/mapper/business/CereBusinessUserDAO.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + insert into cere_business_user + + + business_user_id, + + + business_id, + + + if_binding, + + + is_main_user, + + + + + #{businessUserId,jdbcType=BIGINT}, + + + #{businessId,jdbcType=BIGINT}, + + + #{ifBinding,jdbcType=BIT}, + + + #{isMainUser,jdbcType=BIT}, + + + + + + DELETE FROM cere_business_user where business_user_id=#{businessUserId} + + + + diff --git a/cereshop-business/src/main/resources/mybatis/mapper/business/CerePlatformBusinessDAO.xml b/cereshop-business/src/main/resources/mybatis/mapper/business/CerePlatformBusinessDAO.xml index 9383150..be78fd9 100644 --- a/cereshop-business/src/main/resources/mybatis/mapper/business/CerePlatformBusinessDAO.xml +++ b/cereshop-business/src/main/resources/mybatis/mapper/business/CerePlatformBusinessDAO.xml @@ -2,142 +2,399 @@ - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - business_user_id, username, `password`, `name`, avatar, phone, sex, email, token, `state`, create_time, - update_time + business_id, business_code, business_name, business_brief, business_phone, charge_person_name, + charge_person_phone, business_adress_province, business_adress_city, business_adress_detail, business_adress, + business_logo, effective_date, effective_year, contract_state, + authentication_state, check_state, `state`,authen_type,wx_image,ailpay_image, create_time, update_time, + xs_pay_id, share_days + delete from cere_platform_business - where business_user_id = #{businessUserId,jdbcType=BIGINT} + where business_id = #{shopId,jdbcType=BIGINT} + + insert into cere_platform_business + + + business_code, + + + business_name, + + + business_brief, + + + business_phone, + + + charge_person_name, + + + charge_person_phone, + + + business_adress_province, + + + business_adress_city, + + + business_adress_detail, + + + business_adress, + + + business_logo, + + + effective_date, + + + effective_year, + + + contract_state, + + + authentication_state, + + + check_state, + + + `state`, + + + authen_type, + + + wx_image, + + + ailpay_image, + + + create_time, + + + update_time, + + + xs_pay_id, + + + share_days + + + + + + + + #{businessCode,jdbcType=VARCHAR}, + + + #{businessName,jdbcType=VARCHAR}, + + + #{businessBrief,jdbcType=VARCHAR}, + + + #{businessPhone,jdbcType=VARCHAR}, + + + #{chargePersonName,jdbcType=VARCHAR}, + + + #{chargePersonPhone,jdbcType=VARCHAR}, + + + #{businessAdressProvince,jdbcType=VARCHAR}, + + + #{businessAdressCity,jdbcType=VARCHAR}, + + + #{businessAdressDetail,jdbcType=VARCHAR}, + + + #{businessAdress,jdbcType=VARCHAR}, + + + #{businessLogo,jdbcType=VARCHAR}, + + + #{effectiveDate,jdbcType=VARCHAR}, + + + #{effectiveYear,jdbcType=INTEGER}, + + + #{contractState,jdbcType=BIT}, + + + #{authenticationState,jdbcType=BIT}, + + + #{checkState,jdbcType=BIT}, + + + #{state,jdbcType=BIT}, + + + #{authenType,jdbcType=BIT}, + + + #{wxImage,jdbcType=VARCHAR}, + + + #{ailpayImage,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=VARCHAR}, + + + #{updateTime,jdbcType=VARCHAR}, + + + #{xsPayId,jdbcType=VARCHAR}, + + + #{shareDays,jdbcType=INTEGER} + + + + + + update cere_platform_business - - username = #{username,jdbcType=VARCHAR}, + + business_code = #{businessCode,jdbcType=VARCHAR}, + + + business_name = #{businessName,jdbcType=VARCHAR}, + + + business_brief = #{businessBrief,jdbcType=VARCHAR}, + + + business_phone = #{businessPhone,jdbcType=VARCHAR}, + + + charge_person_name = #{chargePersonName,jdbcType=VARCHAR}, + + + charge_person_phone = #{chargePersonPhone,jdbcType=VARCHAR}, + + + business_adress_province = #{businessAdressProvince,jdbcType=VARCHAR}, + + + business_adress_city = #{businessAdressCity,jdbcType=VARCHAR}, + + + business_adress_detail = #{businessAdressDetail,jdbcType=VARCHAR}, + + + business_adress = #{businessAdress,jdbcType=VARCHAR}, - - `password` = #{password,jdbcType=VARCHAR}, + + business_logo = #{businessLogo,jdbcType=VARCHAR}, - - `name` = #{name,jdbcType=VARCHAR}, + + share_days = #{shareDays,jdbcType=INTEGER}, - - avatar = #{avatar,jdbcType=VARCHAR}, + + effective_date = #{effectiveDate,jdbcType=VARCHAR}, - - phone = #{phone,jdbcType=VARCHAR}, + + effective_year = #{effectiveYear,jdbcType=INTEGER}, - - sex = #{sex,jdbcType=VARCHAR}, + + contract_state = #{contractState,jdbcType=BIT}, - - email = #{email,jdbcType=VARCHAR}, + + authentication_state = #{authenticationState,jdbcType=BIT}, - - token = #{token,jdbcType=VARCHAR}, + + check_state = #{checkState,jdbcType=BIT}, `state` = #{state,jdbcType=BIT}, + + authen_type = #{authenType,jdbcType=BIT}, + + + wx_image = #{wxImage,jdbcType=VARCHAR}, + + + ailpay_image = #{ailpayImage,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=VARCHAR}, update_time = #{updateTime,jdbcType=VARCHAR}, + + xs_pay_id = #{xsPayId,jdbcType=VARCHAR} + + + share_days = #{shareDays,jdbcType=INTEGER} + + + + - where business_user_id = #{businessUserId,jdbcType=BIGINT} + where business_id = #{businessId,jdbcType=BIGINT} - + SELECT + business_id, + business_logo, + business_name, + business_phone, + business_adress, + charge_person_name, + charge_person_phone, + business_brief, + authen_type, + authentication_state, + xs_pay_id, + share_days + + FROM cere_platform_business where business_id = #{businessId} - + SELECT COUNT(*) from cere_shop_visit where shop_id=#{businessId} + AND project = #{project} + and DATEDIFF(LEFT(NOW(),10),LEFT(visit_time,10))=0 - + SELECT COUNT(*) from cere_shop_order + where shop_id = #{businessId} + AND project = #{project} + and order_id NOT IN (SELECT order_id FROM cere_order_after) + and state = 2 - + SELECT COUNT(*) from cere_order_after a + LEFT JOIN cere_shop_order b ON a.order_id=b.order_id + where b.shop_id=#{businessId} + AND b.project = #{project} + and DATEDIFF(LEFT(NOW(),10),LEFT(a.create_time,10))=0 - - update cere_platform_business set - token=#{token},update_time=#{updateTime} - where business_user_id=#{businessUserId} - + - + SELECT COUNT(distinct buyer_user_id) from cere_shop_visit + where shop_id=#{businessId} + AND project = #{project} + and visit_time >= #{startTime} + and visit_time <= #{endTime} - + SELECT a.product_name,SUM(a.number) from cere_order_product a + LEFT JOIN cere_shop_order b ON a.order_id=b.order_id + where b.shop_id=#{businessId} + AND b.project = #{project} and b.state=4 + + and DATEDIFF(LEFT(NOW(),10),LEFT(b.create_time,10))=0 + + + and DATEDIFF(LEFT(NOW(),10),LEFT(b.create_time,10))=1 + + + and DATE_SUB(CURDATE(),INTERVAL 7 DAY)<=b.create_time + + and DATE_SUB(CURDATE(),INTERVAL 30 DAY)<=b.create_time + + GROUP BY a.product_id - + SELECT COUNT(*) from cere_shop_conversion + where shop_id=#{businessId} + AND project = #{project} + and type=#{type} + + and DATEDIFF(LEFT(NOW(),10),LEFT(create_time,10))=0 + + + and DATEDIFF(LEFT(NOW(),10),LEFT(create_time,10))=1 + + + and DATE_SUB(CURDATE(),INTERVAL 7 DAY)<=create_time + + + and DATE_SUB(CURDATE(),INTERVAL 30 DAY)<=create_time + - + SELECT business_id,business_name FROM cere_platform_business - + select + + from cere_platform_business + where business_id in ( + + #{businessId} + + ) - diff --git a/cereshop-business/src/main/resources/mybatis/mapper/business/CerePlatformBusinessUserDAO.xml b/cereshop-business/src/main/resources/mybatis/mapper/business/CerePlatformBusinessUserDAO.xml new file mode 100644 index 0000000..3363104 --- /dev/null +++ b/cereshop-business/src/main/resources/mybatis/mapper/business/CerePlatformBusinessUserDAO.xml @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + business_user_id, username, `password`, `name`, avatar, phone, sex, email, token, `state`, create_time, + update_time + + + + delete from cere_platform_business_user + where business_user_id = #{businessUserId,jdbcType=BIGINT} + + + update cere_platform_business_user + + + username = #{username,jdbcType=VARCHAR}, + + + `password` = #{password,jdbcType=VARCHAR}, + + + `name` = #{name,jdbcType=VARCHAR}, + + + avatar = #{avatar,jdbcType=VARCHAR}, + + + phone = #{phone,jdbcType=VARCHAR}, + + + sex = #{sex,jdbcType=VARCHAR}, + + + email = #{email,jdbcType=VARCHAR}, + + + token = #{token,jdbcType=VARCHAR}, + + + `state` = #{state,jdbcType=BIT}, + + + create_time = #{createTime,jdbcType=VARCHAR}, + + + update_time = #{updateTime,jdbcType=VARCHAR}, + + + where business_user_id = #{businessUserId,jdbcType=BIGINT} + + + + SELECT a.business_user_id,a.`name`,a.avatar,a.phone,a.sex,a.email,IF(a.state=0,a.state,c.state) state,a.token,a.password,c.business_id, + c.check_state FROM cere_platform_business_user a + LEFT JOIN cere_business_user b ON a.business_user_id=b.business_user_id + LEFT JOIN cere_platform_business c ON b.business_id=c.business_id + + + + + + + + + + + update cere_platform_business_user set + token=#{token},update_time=#{updateTime} + where business_user_id=#{businessUserId} + + + + + + + + + + + diff --git a/cereshop-business/src/main/resources/mybatis/mapper/permission/CerePlatformPermissionDAO.xml b/cereshop-business/src/main/resources/mybatis/mapper/permission/CerePlatformPermissionDAO.xml index 365feba..7f97e90 100644 --- a/cereshop-business/src/main/resources/mybatis/mapper/permission/CerePlatformPermissionDAO.xml +++ b/cereshop-business/src/main/resources/mybatis/mapper/permission/CerePlatformPermissionDAO.xml @@ -163,7 +163,7 @@ SELECT permission_id,permission_pid,permission_name,permission_uri,permission,icon,`describe`,resource_type,sort FROM cere_platform_permission - where project=#{shopId} and resource_type in ('menu','button') + where project=#{businessId} and resource_type in ('menu','button') and permission_name like concat('%',#{permissionName},'%') ORDER BY sort - SELECT permission_id from cere_platform_role_permission where role_id=#{roleId} @@ -187,13 +187,13 @@ SELECT a.permission_id,a.permission_pid,a.permission_name,a.permission path,a.icon,a.resource_type FROM cere_platform_permission a LEFT JOIN cere_platform_role_permission b ON a.permission_id=b.permission_id LEFT JOIN cere_business_user_role c ON b.role_id=c.role_id - where project=#{shopId} and resource_type=#{resourceType} and c.business_user_id=#{businessUserId} + where project=#{businessId} and resource_type=#{resourceType} and c.business_user_id=#{businessUserId} GROUP BY a.permission_id ORDER BY a.sort SELECT MAX(sort)+1 from cere_platform_permission - - diff --git a/cereshop-business/src/main/resources/mybatis/mapper/product/CereProductClassifyDAO.xml b/cereshop-business/src/main/resources/mybatis/mapper/product/CereProductClassifyDAO.xml index 49dd48f..f9e8cfe 100644 --- a/cereshop-business/src/main/resources/mybatis/mapper/product/CereProductClassifyDAO.xml +++ b/cereshop-business/src/main/resources/mybatis/mapper/product/CereProductClassifyDAO.xml @@ -11,12 +11,13 @@ + classify_id, classify_pid, classify_hierarchy, classify_level, classify_level_hierarchy, - classify_name, classify_image, sort, link, create_time, update_time + classify_name, classify_image, sort, link,project, create_time, update_time - SELECT classify_id,classify_pid,classify_name from cere_product_classify where classify_pid=#{classifyPid} ORDER BY sort + SELECT classify_id,classify_pid,classify_name from cere_product_classify where classify_pid=#{classifyPid} AND project=#{project} ORDER BY sort + + + + + update cere_product_classify + + + + + when classify_id=#{i.classifyId} then #{i.classifyLevelHierarchy} + + + + + where + + classify_id=#{i.classifyId} + + + + + DELETE FROM cere_product_classify where + + #{id} + + + classify_level_hierarchy like concat('%/',#{id},'%') + + + + + + diff --git a/cereshop-business/src/main/resources/mybatis/mapper/product/CereProductMemberDAO.xml b/cereshop-business/src/main/resources/mybatis/mapper/product/CereProductMemberDAO.xml index 7db5c08..0d5abb0 100644 --- a/cereshop-business/src/main/resources/mybatis/mapper/product/CereProductMemberDAO.xml +++ b/cereshop-business/src/main/resources/mybatis/mapper/product/CereProductMemberDAO.xml @@ -56,16 +56,12 @@ diff --git a/cereshop-business/src/main/resources/mybatis/mapper/product/CereShopProductDAO.xml b/cereshop-business/src/main/resources/mybatis/mapper/product/CereShopProductDAO.xml index 954b709..a490b61 100644 --- a/cereshop-business/src/main/resources/mybatis/mapper/product/CereShopProductDAO.xml +++ b/cereshop-business/src/main/resources/mybatis/mapper/product/CereShopProductDAO.xml @@ -8,6 +8,8 @@ + + @@ -21,12 +23,11 @@ - + - product_id, shop_id, product_name, product_brief, shop_group_id, classify_id, supplier_id, + product_id, shop_id, product_name, product_brief, shop_group_id, classify_id, shop_group_business_id, classify_business_id, supplier_id, supplier_name, if_logistics, shelve_state, if_oversold, fictitious_number, create_time, update_time, product_text, reject, if_credit, credit_limit, brand_id @@ -71,6 +72,12 @@ classify_id = #{classifyId,jdbcType=BIGINT}, + + shop_group_business_id = #{shopGroupBusinessId,jdbcType=BIGINT}, + + + classify_business_id = #{classifyBusinessId,jdbcType=BIGINT}, + supplier_id = #{supplierId,jdbcType=BIGINT}, @@ -113,99 +120,104 @@ where product_id = #{productId,jdbcType=BIGINT} - - update cere_shop_product - set shop_id = #{shopId,jdbcType=BIGINT}, - product_name = #{productName,jdbcType=VARCHAR}, - product_brief = #{productBrief,jdbcType=VARCHAR}, - shop_group_id = #{shopGroupId,jdbcType=BIGINT}, - classify_id = #{classifyId,jdbcType=BIGINT}, - supplier_id = #{supplierId,jdbcType=BIGINT}, - supplier_name = #{supplierName,jdbcType=VARCHAR}, - if_logistics = #{ifLogistics,jdbcType=BIT}, - shelve_state = #{shelveState,jdbcType=BIT}, - if_oversold = #{ifOversold,jdbcType=BIT}, - fictitious_number = #{fictitiousNumber,jdbcType=INTEGER}, - reject = #{reject,jdbcType=VARCHAR}, - create_time = #{createTime,jdbcType=VARCHAR}, - update_time = #{updateTime,jdbcType=VARCHAR}, - product_text = #{productText,jdbcType=LONGVARCHAR}, - if_credit = #{ifCredit,jdbcType=BIT}, - credit_limit = #{creditLimit,jdbcType=INTEGER}, - brand_id = #{brandId,jdbcType=BIGINT} - where product_id = #{productId,jdbcType=BIGINT} - - - update cere_shop_product - set shop_id = #{shopId,jdbcType=BIGINT}, - product_name = #{productName,jdbcType=VARCHAR}, - product_brief = #{productBrief,jdbcType=VARCHAR}, - shop_group_id = #{shopGroupId,jdbcType=BIGINT}, - classify_id = #{classifyId,jdbcType=BIGINT}, - supplier_id = #{supplierId,jdbcType=BIGINT}, - supplier_name = #{supplierName,jdbcType=VARCHAR}, - if_logistics = #{ifLogistics,jdbcType=BIT}, - shelve_state = #{shelveState,jdbcType=BIT}, - if_oversold = #{ifOversold,jdbcType=BIT}, - fictitious_number = #{fictitiousNumber,jdbcType=INTEGER}, - reject = #{reject,jdbcType=VARCHAR}, - create_time = #{createTime,jdbcType=VARCHAR}, - update_time = #{updateTime,jdbcType=VARCHAR}, - if_credit = #{ifCredit,jdbcType=BIT}, - credit_limit = #{creditLimit,jdbcType=INTEGER}, - brand_id = #{brandId,jdbcType=BIGINT} - where product_id = #{productId,jdbcType=BIGINT} - + + - SELECT product_id FROM cere_shop_product where shop_id = #{shopId} @@ -231,67 +242,130 @@ - SELECT b.permission_id FROM cere_platform_role_permission a - LEFT JOIN cere_platform_permission b ON a.permission_id=b.permission_id - where a.role_id=#{roleId} and b.permission_name='营销活动' - GROUP BY b.permission_id - diff --git a/cereshop-business/src/main/resources/mybatis/mapper/shop/CerePlatformShopDAO.xml b/cereshop-business/src/main/resources/mybatis/mapper/shop/CerePlatformShopDAO.xml index 4506ef5..63db11a 100644 --- a/cereshop-business/src/main/resources/mybatis/mapper/shop/CerePlatformShopDAO.xml +++ b/cereshop-business/src/main/resources/mybatis/mapper/shop/CerePlatformShopDAO.xml @@ -28,12 +28,13 @@ + shop_id, shop_code, shop_name, shop_brief, shop_phone, shop_password, charge_person_name, charge_person_phone, shop_adress_province, shop_adress_city, shop_adress_detail, shop_adress, shop_logo, effective_date, effective_year, contract_state, - authentication_state, check_state, `state`,authen_type,wx_image,ailpay_image, create_time, update_time, xs_pay_id, share_days + authentication_state, check_state, `state`,authen_type,wx_image,ailpay_image, create_time, update_time, xs_pay_id, share_days,is_cross - SELECT shop_id FROM cere_platform_shop where shop_name=#{shopName} - + + SELECT a.shop_id, a.business_id, a.shop_code, a.shop_name, a.shop_brief, a.shop_phone, a.shop_password, a.charge_person_name, + a.charge_person_phone, a.shop_adress, a.effective_date, a.effective_year, a.contract_state, + a.authentication_state, a.check_state, a.`state`, a.authen_type, a.create_time, a.update_time, + a.audit_live, a.audit_live_product,b.business_name, a.is_cross + FROM cere_platform_shop a + INNER JOIN cere_platform_business b ON a.business_id = b.business_id + - - update cere_platform_shop - - - contract_state = #{contractState,jdbcType=BIT}, - - - authentication_state = #{authenticationState,jdbcType=BIT}, - - - check_state = #{checkState,jdbcType=BIT}, - - - `state` = #{state,jdbcType=BIT}, - - - update_time = #{updateTime,jdbcType=VARCHAR}, - - - where shop_id = #{shopId,jdbcType=BIGINT} - - - - - - - - - - - - - - + + WHERE a.business_id = #{businessId} - SELECT * FROM cere_shop_enterprise where shop_id=#{shopId} + diff --git a/cereshop-business/src/main/resources/mybatis/mapper/shop/CereShopGroupDAO.xml b/cereshop-business/src/main/resources/mybatis/mapper/shop/CereShopGroupDAO.xml index 10f7fe7..3bc4c16 100644 --- a/cereshop-business/src/main/resources/mybatis/mapper/shop/CereShopGroupDAO.xml +++ b/cereshop-business/src/main/resources/mybatis/mapper/shop/CereShopGroupDAO.xml @@ -4,6 +4,7 @@ + @@ -11,7 +12,7 @@ - shop_group_id, shop_id, group_name,group_describe, group_image, create_time, update_time + shop_group_id, shop_id, project, group_name,group_describe, group_image, create_time, update_time - SELECT shop_group_id, shop_id, group_name FROM cere_shop_group where shop_id=#{shopId} + SELECT shop_group_id, shop_id, group_name FROM cere_shop_group where shop_id=#{shopId} AND project=#{project} @@ -127,6 +138,9 @@ and a.group_name like concat('%', #{search}, '%') + + and a.project = #{project} + ORDER BY a.update_time DESC, a.create_time DESC diff --git a/cereshop-business/src/main/resources/mybatis/mapper/shop/CereShopIndividualBusinessesDAO.xml b/cereshop-business/src/main/resources/mybatis/mapper/shop/CereShopIndividualBusinessesDAO.xml index 52b9e34..efe5057 100644 --- a/cereshop-business/src/main/resources/mybatis/mapper/shop/CereShopIndividualBusinessesDAO.xml +++ b/cereshop-business/src/main/resources/mybatis/mapper/shop/CereShopIndividualBusinessesDAO.xml @@ -1,8 +1,8 @@ - - + + @@ -33,8 +33,8 @@ - - insert into cere_shop_individual_businesses (shop_id, subject_name, + + insert into cere_shop_individual_businesses (business_id, subject_name, subject_code, subject_region, subject_adress, subject_start_time, subject_end_time, subject_license, subject_operator, subject_card_type, subject_id_card, @@ -45,7 +45,7 @@ service_phone, service_providing, shop_index_image, shop_backstage_image, remark, create_time, update_time) - values (#{shopId,jdbcType=BIGINT}, #{subjectName,jdbcType=VARCHAR}, + values (#{businessId,jdbcType=BIGINT}, #{subjectName,jdbcType=VARCHAR}, #{subjectCode,jdbcType=VARCHAR}, #{subjectRegion,jdbcType=VARCHAR}, #{subjectAdress,jdbcType=VARCHAR}, #{subjectStartTime,jdbcType=VARCHAR}, #{subjectEndTime,jdbcType=VARCHAR}, #{subjectLicense,jdbcType=VARCHAR}, #{subjectOperator,jdbcType=VARCHAR}, #{subjectCardType,jdbcType=BIGINT}, #{subjectIdCard,jdbcType=VARCHAR}, @@ -58,11 +58,11 @@ #{createTime,jdbcType=VARCHAR}, #{updateTime,jdbcType=VARCHAR}) - + insert into cere_shop_individual_businesses - - shop_id, + + business_id, subject_name, @@ -150,8 +150,8 @@ - - #{shopId,jdbcType=BIGINT}, + + #{businessId,jdbcType=BIGINT}, #{subjectName,jdbcType=VARCHAR}, @@ -240,7 +240,7 @@ - + UPDATE cere_shop_individual_businesses @@ -325,10 +325,10 @@ update_time = #{updateTime,jdbcType=VARCHAR}, - where shop_id=#{shopId} + where business_id=#{businessId} - + UPDATE cere_shop_individual_businesses @@ -413,10 +413,10 @@ update_time = #{updateTime,jdbcType=VARCHAR}, - where shop_id=#{shopId} + where business_id=#{businessId} - + SELECT * FROM cere_shop_individual_businesses where business_id=#{businessId} diff --git a/cereshop-business/src/main/resources/mybatis/mapper/shop/CereShopOtherOrganizationsDAO.xml b/cereshop-business/src/main/resources/mybatis/mapper/shop/CereShopOtherOrganizationsDAO.xml index b474b12..2c2a20f 100644 --- a/cereshop-business/src/main/resources/mybatis/mapper/shop/CereShopOtherOrganizationsDAO.xml +++ b/cereshop-business/src/main/resources/mybatis/mapper/shop/CereShopOtherOrganizationsDAO.xml @@ -1,8 +1,8 @@ - - + + @@ -32,8 +32,8 @@ - - insert into cere_shop_other_organizations (shop_id, other_name, + + insert into cere_shop_other_organizations (business_id, other_name, other_code, other_region, other_adress, other_start_time, other_end_time, other_license, other_operator, other_card_type, other_id_card, @@ -44,7 +44,7 @@ shop_index_image, shop_backstage_image, remark, create_time, update_time ) - values (#{shopId,jdbcType=BIGINT}, #{otherName,jdbcType=VARCHAR}, + values (#{businessId,jdbcType=BIGINT}, #{otherName,jdbcType=VARCHAR}, #{otherCode,jdbcType=VARCHAR}, #{otherRegion,jdbcType=VARCHAR}, #{otherAdress,jdbcType=VARCHAR}, #{otherStartTime,jdbcType=VARCHAR}, #{otherEndTime,jdbcType=VARCHAR}, #{otherLicense,jdbcType=VARCHAR}, #{otherOperator,jdbcType=VARCHAR}, #{otherCardType,jdbcType=BIGINT}, #{otherIdCard,jdbcType=VARCHAR}, @@ -57,11 +57,11 @@ ) - + insert into cere_shop_other_organizations - - shop_id, + + business_id, other_name, @@ -146,8 +146,8 @@ - - #{shopId,jdbcType=BIGINT}, + + #{businessId,jdbcType=BIGINT}, #{otherName,jdbcType=VARCHAR}, @@ -233,7 +233,7 @@ - + UPDATE cere_shop_other_organizations @@ -315,10 +315,10 @@ update_time = #{updateTime,jdbcType=VARCHAR}, - where shop_id=#{shopId} + where business_id=#{businessId} - + UPDATE cere_shop_other_organizations @@ -400,10 +400,10 @@ update_time = #{updateTime,jdbcType=VARCHAR}, - where shop_id=#{shopId} + where business_id=#{businessId} - + SELECT * FROM cere_shop_other_organizations where business_id=#{businessId} diff --git a/cereshop-business/src/main/resources/mybatis/mapper/shop/CereShopPersonalDAO.xml b/cereshop-business/src/main/resources/mybatis/mapper/shop/CereShopPersonalDAO.xml index a31617f..a778aca 100644 --- a/cereshop-business/src/main/resources/mybatis/mapper/shop/CereShopPersonalDAO.xml +++ b/cereshop-business/src/main/resources/mybatis/mapper/shop/CereShopPersonalDAO.xml @@ -1,8 +1,8 @@ - - + + @@ -26,8 +26,8 @@ - - insert into cere_shop_personal (shop_id, personal_name, + + insert into cere_shop_personal (business_id, personal_name, personal_card_type, personal_id_card, personal_card_start_time, personal_card_end_time, personal_card_positive, personal_card_side, personal_card_hand, administrators_phone, @@ -36,7 +36,7 @@ service_providing, shop_index_image, shop_backstage_image, remark, create_time, update_time) - values (#{shopId,jdbcType=BIGINT}, #{personalName,jdbcType=VARCHAR}, + values (#{businessId,jdbcType=BIGINT}, #{personalName,jdbcType=VARCHAR}, #{personalCardType,jdbcType=BIGINT}, #{personalIdCard,jdbcType=VARCHAR}, #{personalCardStartTime,jdbcType=VARCHAR}, #{personalCardEndTime,jdbcType=VARCHAR}, #{personalCardPositive,jdbcType=VARCHAR}, #{personalCardSide,jdbcType=VARCHAR}, #{personalCardHand,jdbcType=VARCHAR}, #{administratorsPhone,jdbcType=VARCHAR}, @@ -47,11 +47,11 @@ #{updateTime,jdbcType=VARCHAR}) - + insert into cere_shop_personal - - shop_id, + + business_id, personal_name, @@ -118,8 +118,8 @@ - - #{shopId,jdbcType=BIGINT}, + + #{businessId,jdbcType=BIGINT}, #{personalName,jdbcType=VARCHAR}, @@ -187,7 +187,7 @@ - + UPDATE cere_shop_personal @@ -251,10 +251,10 @@ update_time = #{updateTime,jdbcType=VARCHAR}, - where shop_id=#{shopId} + where business_id=#{businessId} - + SELECT * FROM cere_shop_personal where business_id=#{businessId} diff --git a/cereshop-business/src/main/resources/mybatis/mapper/stock/CereKcStockNoteDAO.xml b/cereshop-business/src/main/resources/mybatis/mapper/stock/CereKcStockNoteDAO.xml index 5952bf5..acbfa26 100644 --- a/cereshop-business/src/main/resources/mybatis/mapper/stock/CereKcStockNoteDAO.xml +++ b/cereshop-business/src/main/resources/mybatis/mapper/stock/CereKcStockNoteDAO.xml @@ -43,9 +43,9 @@ cksn.create_by from cere_kc_stock_note cksn - inner join cere_platform_shop cps on cps.shop_id = cksn.shop_id inner join cere_shop_storehouse css on cksn.storehouse_id = css.storehouse_id inner join cere_shop_product csp on cksn.product_id = csp.product_id + inner join cere_platform_shop cps on cps.shop_id = csp.shop_id inner join cere_product_sku cps2 on cksn.sku_id = cps2.sku_id inner join cere_kc_bill_type ckbt on cksn.bill_type_id = ckbt.bill_type_id @@ -69,6 +69,9 @@ AND cksn.shop_id = #{bo.shopId} + + AND cps.business_id = #{bo.businessId} + and cps.shop_name like concat('%', #{bo.shopName}, '%') diff --git a/cereshop-business/src/test/java/com/shop/cereshop/business/ShopComposeTest.java b/cereshop-business/src/test/java/com/shop/cereshop/business/ShopComposeTest.java deleted file mode 100644 index aadc01b..0000000 --- a/cereshop-business/src/test/java/com/shop/cereshop/business/ShopComposeTest.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2017-2021 - * All rights reserved, Designed By 深圳中科鑫智科技有限公司 - * Copyright authorization contact 18814114118 - */ -package com.shop.cereshop.business; - -import com.shop.cereshop.business.param.compose.ComposeSaveParam; -import com.shop.cereshop.business.service.compose.CereShopComposeService; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; -import com.shop.cereshop.commons.domain.tool.CereComposeProduct; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.context.junit4.SpringRunner; - -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; - -/** - * 组合捆绑试用例 - */ -@RunWith(SpringRunner.class) -@SpringBootTest -public class ShopComposeTest { - - @Autowired - private CereShopComposeService cereShopComposeService; - - @Test - public void save(){ - try { - CerePlatformBusiness user=new CerePlatformBusiness(); - user.setBusinessUserId(103l); - ComposeSaveParam param=new ComposeSaveParam(); - param.setShopId(75l); - param.setComposeName("组合捆绑1号"); - param.setStartTime("2021-08-16 12:00:00"); - param.setEndTime("2021-09-16 12:00:00"); - param.setComposeType(1); - param.setPromote(new BigDecimal(153)); - List list=new ArrayList<>(); - CereComposeProduct CereComposeProduct1=new CereComposeProduct(); - CereComposeProduct1.setProductId(196l); - list.add(CereComposeProduct1); - CereComposeProduct CereComposeProduct2=new CereComposeProduct(); - CereComposeProduct2.setProductId(197l); - list.add(CereComposeProduct2); - CereComposeProduct CereComposeProduct3=new CereComposeProduct(); - CereComposeProduct3.setProductId(198l); - list.add(CereComposeProduct3); - param.setComposeProducts(list); - cereShopComposeService.save(param,user); - }catch (Exception e){ - e.printStackTrace(); - } - } -} diff --git a/cereshop-business/src/test/java/com/shop/cereshop/business/ShopPriceTest.java b/cereshop-business/src/test/java/com/shop/cereshop/business/ShopPriceTest.java deleted file mode 100644 index 743615b..0000000 --- a/cereshop-business/src/test/java/com/shop/cereshop/business/ShopPriceTest.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (C) 2017-2021 - * All rights reserved, Designed By 深圳中科鑫智科技有限公司 - * Copyright authorization contact 18814114118 - */ -package com.shop.cereshop.business; - -import com.shop.cereshop.business.param.price.PriceSaveParam; -import com.shop.cereshop.business.service.price.CereShopPriceService; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; -import com.shop.cereshop.commons.domain.tool.CerePriceProduct; -import com.shop.cereshop.commons.domain.tool.CerePriceRule; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.context.junit4.SpringRunner; - -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; - -/** - * 定价捆绑试用例 - */ -@RunWith(SpringRunner.class) -@SpringBootTest -public class ShopPriceTest { - - @Autowired - private CereShopPriceService cereShopPriceService; - - @Test - public void save(){ - try { - CerePlatformBusiness user=new CerePlatformBusiness(); - user.setBusinessUserId(103l); - PriceSaveParam param=new PriceSaveParam(); - param.setShopId(75l); - param.setComposeName("定价捆绑1号"); - param.setStartTime("2021-08-16 12:00:00"); - param.setEndTime("2021-09-16 12:00:00"); - List list=new ArrayList<>(); - CerePriceProduct priceProduct1=new CerePriceProduct(); - priceProduct1.setProductId(203l); - list.add(priceProduct1); - CerePriceProduct priceProduct2=new CerePriceProduct(); - priceProduct2.setProductId(204l); - list.add(priceProduct2); - CerePriceProduct priceProduct3=new CerePriceProduct(); - priceProduct3.setProductId(205l); - list.add(priceProduct3); - param.setPriceProducts(list); - List rules=new ArrayList<>(); - CerePriceRule cerePriceRule1=new CerePriceRule(); - cerePriceRule1.setNumber(2); - cerePriceRule1.setPrice(new BigDecimal(89)); - rules.add(cerePriceRule1); - CerePriceRule cerePriceRule2=new CerePriceRule(); - cerePriceRule2.setNumber(3); - cerePriceRule2.setPrice(new BigDecimal(156)); - rules.add(cerePriceRule2); - param.setPriceRules(rules); - cereShopPriceService.save(param,user); - }catch (Exception e){ - e.printStackTrace(); - } - } -} diff --git a/cereshop-business/src/test/java/com/shop/cereshop/business/ShopSceneTest.java b/cereshop-business/src/test/java/com/shop/cereshop/business/ShopSceneTest.java deleted file mode 100644 index 380b7e6..0000000 --- a/cereshop-business/src/test/java/com/shop/cereshop/business/ShopSceneTest.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (C) 2017-2021 - * All rights reserved, Designed By 深圳中科鑫智科技有限公司 - * Copyright authorization contact 18814114118 - */ -package com.shop.cereshop.business; - -import com.shop.cereshop.business.param.scene.SceneMemberParam; -import com.shop.cereshop.business.param.scene.SceneSaveParam; -import com.shop.cereshop.business.service.scene.CereShopSceneService; -import com.shop.cereshop.commons.domain.business.CerePlatformBusiness; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.context.junit4.SpringRunner; - -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; - -/** - * 场景营销测试用例 - */ -@RunWith(SpringRunner.class) -@SpringBootTest -public class ShopSceneTest { - - @Autowired - private CereShopSceneService cereShopSceneService; - - @Test - public void save(){ - try { - CerePlatformBusiness user=new CerePlatformBusiness(); - user.setBusinessUserId(103l); - user.setShopId(75l); - SceneSaveParam param=new SceneSaveParam(); - param.setSceneType(1); - param.setShopId(75l); - param.setSceneName("节日营销"); - param.setStartTime("2021-08-30 22:37:00"); - param.setSceneRule(2); - param.setEndTime("2021-08-30 22:38:00"); - List list=new ArrayList<>(); - SceneMemberParam sceneMemberParam1=new SceneMemberParam(); - sceneMemberParam1.setIds(null); - sceneMemberParam1.setIfFreeShipping(1); - sceneMemberParam1.setMemberLevelId(1l); - sceneMemberParam1.setDiscount(new BigDecimal(9)); - list.add(sceneMemberParam1); - SceneMemberParam sceneMemberParam2=new SceneMemberParam(); - sceneMemberParam2.setIds(null); - sceneMemberParam2.setIfFreeShipping(0); - sceneMemberParam2.setMemberLevelId(2l); - sceneMemberParam2.setDiscount(new BigDecimal(8)); - list.add(sceneMemberParam2); - param.setMemberParams(list); - cereShopSceneService.save(param,user); - }catch (Exception e){ - e.printStackTrace(); - } - } -} diff --git a/cereshop-business/src/test/java/com/shop/cereshop/business/ShopScrmTest.java b/cereshop-business/src/test/java/com/shop/cereshop/business/ShopScrmTest.java deleted file mode 100644 index 73e141d..0000000 --- a/cereshop-business/src/test/java/com/shop/cereshop/business/ShopScrmTest.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.shop.cereshop.business; - -import com.shop.cereshop.business.utils.ScrmSyncVerifyUtil; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.context.junit4.SpringRunner; - -/** - * scrm同步数据测试 - */ -@RunWith(SpringRunner.class) -@SpringBootTest -public class ShopScrmTest { - - @Autowired - private ScrmSyncVerifyUtil scrmSyncVerifyUtil; - - @Test - public void testVerify() throws Exception { - Long shopId = 0L; - String secret = "admin"; - scrmSyncVerifyUtil.verify(shopId, secret); - } - -} diff --git a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/business/CereBusinessShop.java b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/business/CereBusinessShop.java deleted file mode 100644 index 97c7edc..0000000 --- a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/business/CereBusinessShop.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2017-2021 - * All rights reserved, Designed By 深圳中科鑫智科技有限公司 - * Copyright authorization contact 18814114118 - */ -package com.shop.cereshop.commons.domain.business; - -import lombok.Data; - -import java.io.Serializable; - -/** - * cere_business_shop 商家用户绑定店铺信息实体类 - * @author - */ -@Data -public class CereBusinessShop implements Serializable { - /** - * 商家用户id - */ - private Long businessUserId; - - /** - * 店铺id - */ - private Long shopId; - - /** - * 是否绑定当前店铺 1-是 0-否 - */ - private Integer ifBinding; - - private static final long serialVersionUID = 1L; - -} diff --git a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/business/CereBusinessUser.java b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/business/CereBusinessUser.java new file mode 100644 index 0000000..bbe008a --- /dev/null +++ b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/business/CereBusinessUser.java @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.commons.domain.business; + +import lombok.Data; + +import java.io.Serializable; + +/** + * cere_business_shop 商家用户绑定店铺信息实体类 + * @author + */ +@Data +public class CereBusinessUser implements Serializable { + /** + * 商家用户id + */ + private Long businessUserId; + + /** + * 商家id + */ + private Long businessId; + + /** + * 是否绑定当前店铺 1-是 0-否 + */ + private Integer ifBinding; + + + /** + * 是否是主账号 + */ + private Integer isMainUser; + + private static final long serialVersionUID = 1L; + +} diff --git a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/business/CerePlatformBusiness.java b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/business/CerePlatformBusiness.java index 2e4f310..feb8e84 100644 --- a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/business/CerePlatformBusiness.java +++ b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/business/CerePlatformBusiness.java @@ -7,7 +7,6 @@ package com.shop.cereshop.commons.domain.business; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; -import com.fasterxml.jackson.annotation.JsonIgnore; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -15,73 +14,115 @@ import lombok.Data; import java.io.Serializable; /** - * cere_platform_business 平台商家用户实体类 + * cere_platform_shop 商家信息实体类 * @author */ @Data -@ApiModel(value = "CerePlatformBusiness", description = "平台商家用户实体类") +@ApiModel(value = "CerePlatformBusiness", description = "商家信息实体类") public class CerePlatformBusiness implements Serializable { /** - * 店铺id + * 商家id */ - private Long shopId; + @TableId(type = IdType.AUTO) + @ApiModelProperty(value = "商家id") + private Long businessId; /** - * 商家用户id + * 商家编码 */ - @ApiModelProperty(value = "商家用户id") - @TableId(type = IdType.AUTO) - private Long businessUserId; + @ApiModelProperty(value = "商家编码") + private String businessCode; /** - * 商家登录账号 + * 店铺名称 */ - @ApiModelProperty(value = "商家登录账号") - private String username; + @ApiModelProperty(value = "店铺名称") + private String businessName; /** - * 商家登录密码 + * 简介 */ - @ApiModelProperty(value = "商家登录密码") - @JsonIgnore - private String password; + @ApiModelProperty(value = "简介") + private String businessBrief; /** - * 商家昵称 + * 客服电话 */ - @ApiModelProperty(value = "商家昵称") - private String name; + @ApiModelProperty(value = "客服电话") + private String businessPhone; /** - * 商家头像 + * 店铺负责人 */ - @ApiModelProperty(value = "商家头像") - private String avatar; + @ApiModelProperty(value = "店铺负责人") + private String chargePersonName; /** - * 手机号 + * 负责人电话 */ - @ApiModelProperty(value = "手机号") - private String phone; + @ApiModelProperty(value = "负责人电话") + private String chargePersonPhone; /** - * 商家性别 + * 店铺地址省份 */ - @ApiModelProperty(value = "商家性别") - private String sex; + @ApiModelProperty(value = "店铺地址省份") + private String businessAdressProvince; /** - * 商家邮箱 + * 店铺地址城市 */ - @ApiModelProperty(value = "商家邮箱") - private String email; + @ApiModelProperty(value = "店铺地址城市") + private String businessAdressCity; /** - * 用户token + * 店铺地址-详细地址 */ - @ApiModelProperty(value = "用户token 停用") - private String token; + @ApiModelProperty(value = "店铺地址-详细地址") + private String businessAdressDetail; + + /** + * 店铺地址 + */ + @ApiModelProperty(value = "店铺地址") + private String businessAdress; + + /** + * 店铺logo + */ + @ApiModelProperty(value = "店铺logo") + private String businessLogo; + + /** + * 生效日期 + */ + @ApiModelProperty(value = "生效日期") + private String effectiveDate; + + /** + * 生效时限(年) + */ + @ApiModelProperty(value = "生效时限(年)") + private Integer effectiveYear; + + /** + * 合同状态 1-有效 0-无效 + */ + @ApiModelProperty(value = "合同状态 1-有效 0-无效") + private Integer contractState; + + /** + * 认证状态 1-未认证 2-认证中 3-已认证 + */ + @ApiModelProperty(value = "认证状态 1-未认证 2-认证中 3-已认证") + private Integer authenticationState; + + /** + * 入驻处理状态 0-未处理 1-通过 2-拒绝 + */ + @ApiModelProperty(value = "入驻处理状态 0-未处理 1-通过 2-拒绝") + private Integer checkState; /** * 是否启用 1-是 0-否 @@ -90,6 +131,24 @@ public class CerePlatformBusiness implements Serializable { private Integer state; /** + * 主体类型 + */ + @ApiModelProperty(value = "主体类型") + private Integer authenType; + + /** + * 微信收款码 + */ + @ApiModelProperty(value = "微信收款码") + private String wxImage; + + /** + * 支付宝收款码 + */ + @ApiModelProperty(value = "支付宝收款码") + private String ailpayImage; + + /** * 创建时间 */ @ApiModelProperty(value = "创建时间") @@ -101,6 +160,38 @@ public class CerePlatformBusiness implements Serializable { @ApiModelProperty(value = "更新时间") private String updateTime; + /** + * 审核直播间 + */ + @ApiModelProperty(value = "审核直播间 1-开启 0-关闭") + private Integer auditLive; + + /** + * 审核直播间商品 + */ + @ApiModelProperty(value = "审核直播间商品 1-开启 0-关闭") + private Integer auditLiveProduct; + + + /** + * 新生支付方开通的商家Id + */ + @ApiModelProperty(value = "新生支付方开通的商家Id") + private String xsPayId; + + + /** + * 是否是跨境商家 + */ + private Integer isCross; + + /** + * 分账账期 + */ + @ApiModelProperty(value = "分账账期") + private Integer shareDays; + + private static final long serialVersionUID = 1L; } diff --git a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/business/CerePlatformBusinessUser.java b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/business/CerePlatformBusinessUser.java new file mode 100644 index 0000000..15e7842 --- /dev/null +++ b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/business/CerePlatformBusinessUser.java @@ -0,0 +1,106 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.commons.domain.business; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.fasterxml.jackson.annotation.JsonIgnore; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +/** + * cere_platform_business 平台商家用户实体类 + * @author + */ +@Data +@ApiModel(value = "CerePlatformBusinessUser", description = "平台商家用户实体类") +public class CerePlatformBusinessUser implements Serializable { + + /** + * 商家id + */ + private Long businessId; + + /** + * 商家用户id + */ + @ApiModelProperty(value = "商家用户id") + @TableId(type = IdType.AUTO) + private Long businessUserId; + + /** + * 商家登录账号 + */ + @ApiModelProperty(value = "商家登录账号") + private String username; + + /** + * 商家登录密码 + */ + @ApiModelProperty(value = "商家登录密码") + @JsonIgnore + private String password; + + /** + * 商家昵称 + */ + @ApiModelProperty(value = "商家昵称") + private String name; + + /** + * 商家头像 + */ + @ApiModelProperty(value = "商家头像") + private String avatar; + + /** + * 手机号 + */ + @ApiModelProperty(value = "手机号") + private String phone; + + /** + * 商家性别 + */ + @ApiModelProperty(value = "商家性别") + private String sex; + + /** + * 商家邮箱 + */ + @ApiModelProperty(value = "商家邮箱") + private String email; + + /** + * 用户token + */ + @ApiModelProperty(value = "用户token 停用") + private String token; + + /** + * 是否启用 1-是 0-否 + */ + @ApiModelProperty(value = "是否启用 1-是 0-否") + private Integer state; + + /** + * 创建时间 + */ + @ApiModelProperty(value = "创建时间") + private String createTime; + + /** + * 更新时间 + */ + @ApiModelProperty(value = "更新时间") + private String updateTime; + + private static final long serialVersionUID = 1L; + +} diff --git a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/business/CereShopEnterprise.java b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/business/CereShopEnterprise.java new file mode 100644 index 0000000..2450128 --- /dev/null +++ b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/business/CereShopEnterprise.java @@ -0,0 +1,212 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.commons.domain.business; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +/** + * cere_shop_enterprise 商家企业认证信息实体类 + * @author + */ +@Data +@ApiModel(value = "CereShopEnterprise", description = "商家企业认证信息实体类") +public class CereShopEnterprise implements Serializable { + /** + * 关联商家id + */ + @ApiModelProperty(value = "关联商家id") + private Long businessId; + + /** + * 企业名称 + */ + @ApiModelProperty(value = "企业名称") + @NotBlank(message = "企业名称不能为空") + private String enterpriseName; + + /** + * 统一社会信用代码 + */ + @ApiModelProperty(value = "统一社会信用代码") + @NotBlank(message = "统一社会信用代码不能为空") + private String enterpriseCode; + + /** + * 地址 省-市-区 + */ + @ApiModelProperty(value = "地址 省-市-区") + @NotBlank(message = "地址不能为空") + private String enterpriseRegion; + + /** + * 详细地址 + */ + @ApiModelProperty(value = "详细地址") + private String enterpriseAdress; + + /** + * 营业期限开始时间 + */ + @ApiModelProperty(value = "营业期限开始时间") + @NotBlank(message = "营业期限开始时间不能为空") + private String enterpriseStartTime; + + /** + * 营业期限结束时间 + */ + @ApiModelProperty(value = "营业期限结束时间") + @NotBlank(message = "营业期限结束时间不能为空") + private String enterpriseEndTime; + + /** + * 营业执照图片地址(多个以逗号隔开) + */ + @ApiModelProperty(value = "营业执照图片地址(多个以逗号隔开)") + @NotBlank(message = "营业执照图片不能为空") + private String enterpriseLicense; + + /** + * 法人姓名 + */ + @ApiModelProperty(value = "法人姓名") + @NotBlank(message = "法人姓名不能为空") + private String enterpriseOperator; + + /** + * 证件类型 (取数据字典) + */ + @ApiModelProperty(value = "证件类型 (取数据字典)") + @NotNull(message = "证件类型不能为空") + private Long enterpriseCardType; + + /** + * 法人身份证号码 + */ + @ApiModelProperty(value = "法人身份证号码") + @NotBlank(message = "法人身份证号码不能为空") + private String enterpriseIdCard; + + /** + * 证件有效开始时间 + */ + @ApiModelProperty(value = "证件有效开始时间") + @NotBlank(message = "证件有效开始时间不能为空") + private String enterpriseCardStartTime; + + /** + * 证件有效结束时间 + */ + @ApiModelProperty(value = "证件有效结束时间") + @NotBlank(message = "证件有效结束时间不能为空") + private String enterpriseCardEndTime; + + /** + * 法人身份证正面照 + */ + @ApiModelProperty(value = "法人身份证正面照") + @NotBlank(message = "法人身份证正面照不能为空") + private String enterpriseCardPositive; + + /** + * 法人身份证反面照 + */ + @ApiModelProperty(value = "法人身份证反面照") + @NotBlank(message = "法人身份证反面照不能为空") + private String enterpriseCardSide; + + /** + * 管理员手机号 + */ + @ApiModelProperty(value = "管理员手机号") + private String administratorsPhone; + + /** + * 管理员邮箱 + */ + @ApiModelProperty(value = "管理员邮箱") + private String administratorsEmail; + + /** + * 开户银行(取数据字典) + */ + @ApiModelProperty(value = "开户银行(取数据字典)") + private Long accountOpenBank; + + /** + * 开户银行名称 + */ + @ApiModelProperty(value = "开户银行名称") + private String accountBankName; + + /** + * 开户银行地区 省-市 + */ + @ApiModelProperty(value = "开户银行地区 省-市") + private String accountBankRegion; + + /** + * 银行账户 + */ + @ApiModelProperty(value = "银行账户") + private String accountBankCard; + + /** + * 商户简称 + */ + @ApiModelProperty(value = "商户简称") + private String shopAbbreviation; + + /** + * 客服电话 + */ + @ApiModelProperty(value = "客服电话") + private String servicePhone; + + /** + * 提供服务(取数据字典) + */ + @ApiModelProperty(value = "提供服务(取数据字典)") + private Long serviceProviding; + + /** + * 商家首页截图 + */ + @ApiModelProperty(value = "商家首页截图") + private String shopIndexImage; + + /** + * 商家管理后台截图 + */ + @ApiModelProperty(value = "商家管理后台截图") + private String shopBackstageImage; + + /** + * 备注 + */ + @ApiModelProperty(value = "备注") + private String remark; + + /** + * 创建时间 + */ + @ApiModelProperty(value = "创建时间") + private String createTime; + + /** + * 更新时间 + */ + @ApiModelProperty(value = "更新时间") + private String updateTime; + + private static final long serialVersionUID = 1L; + +} diff --git a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/business/CereShopIndividualBusinesses.java b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/business/CereShopIndividualBusinesses.java new file mode 100644 index 0000000..99459bf --- /dev/null +++ b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/business/CereShopIndividualBusinesses.java @@ -0,0 +1,211 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.commons.domain.business; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +/** + * cere_shop_individual_businesses 商家个体工商户认证信息实体类 + * @author + */ +@Data +@ApiModel(value = "CereShopIndividualBusinesses", description = "商家个体工商户认证信息实体类") +public class CereShopIndividualBusinesses implements Serializable { + /** + * 关联商家id + */ + @ApiModelProperty(value = "关联商家id") + private Long businessId; + + /** + * 商户名称 + */ + @ApiModelProperty(value = "商户名称") + @NotBlank(message = "商户名称不能为空") + private String subjectName; + + /** + * 统一社会信用代码 + */ + @ApiModelProperty(value = "统一社会信用代码") + @NotBlank(message = "统一社会信用代码不能为空") + private String subjectCode; + + /** + * 地址 省-市-区 + */ + @ApiModelProperty(value = "地址 省-市-区") + @NotBlank(message = "地址不能为空") + private String subjectRegion; + + /** + * 详细地址 + */ + @ApiModelProperty(value = "详细地址") + private String subjectAdress; + + /** + * 营业期限开始时间 + */ + @ApiModelProperty(value = "营业期限开始时间") + @NotBlank(message = "营业期限开始时间不能为空") + private String subjectStartTime; + + /** + * 营业期限结束时间 + */ + @ApiModelProperty(value = "营业期限结束时间") + @NotBlank(message = "营业期限结束时间不能为空") + private String subjectEndTime; + + /** + * 营业执照图片地址(多个以逗号隔开) + */ + @ApiModelProperty(value = "营业执照图片地址(多个以逗号隔开)") + @NotBlank(message = "营业执照图片不能为空") + private String subjectLicense; + + /** + * 经营者姓名 + */ + @ApiModelProperty(value = "经营者姓名") + @NotBlank(message = "经营者姓名不能为空") + private String subjectOperator; + + /** + * 证件类型 (取数据字典) + */ + @ApiModelProperty(value = "证件类型 (取数据字典)") + @NotNull(message = "证件类型不能为空") + private Long subjectCardType; + + /** + * 经营者身份证号码 + */ + @ApiModelProperty(value = "经营者身份证号码") + @NotBlank(message = "经营者身份证号码不能为空") + private String subjectIdCard; + + /** + * 证件有效开始时间 + */ + @ApiModelProperty(value = "证件有效开始时间") + @NotBlank(message = "证件有效开始时间不能为空") + private String subjectCardStartTime; + + /** + * 证件有效结束时间 + */ + @ApiModelProperty(value = "证件有效结束时间") + @NotBlank(message = "证件有效结束时间不能为空") + private String subjectCardEndTime; + + /** + * 身份证正面照 + */ + @ApiModelProperty(value = "身份证正面照") + @NotBlank(message = "身份证正面照不能为空") + private String subjectCardPositive; + + /** + * 身份证反面照 + */ + @ApiModelProperty(value = "身份证反面照") + @NotBlank(message = "身份证反面照不能为空") + private String subjectCardSide; + + /** + * 管理员手机号 + */ + @ApiModelProperty(value = "管理员手机号") + private String administratorsPhone; + + /** + * 管理员邮箱 + */ + @ApiModelProperty(value = "管理员邮箱") + private String administratorsEmail; + + /** + * 账户类型 1-对公 2-对私 + */ + @ApiModelProperty(value = "账户类型 1-对公 2-对私") + private Integer accountType; + + /** + * 开户银行(取数据字典) + */ + @ApiModelProperty(value = "开户银行(取数据字典)") + private Long accountOpenBank; + + /** + * 开户银行地区 省-市 + */ + @ApiModelProperty(value = "开户银行地区 省-市") + private String accountBankRegion; + + /** + * 银行账户 + */ + @ApiModelProperty(value = "银行账户") + private String accountBankCard; + + /** + * 商户简称 + */ + @ApiModelProperty(value = "商户简称") + private String shopAbbreviation; + + /** + * 客服电话 + */ + @ApiModelProperty(value = "客服电话") + private String servicePhone; + + /** + * 提供服务(取数据字典) + */ + @ApiModelProperty(value = "提供服务(取数据字典)") + private Long serviceProviding; + + /** + * 商家首页截图 + */ + @ApiModelProperty(value = "商家首页截图") + private String shopIndexImage; + + /** + * 商家管理后台截图 + */ + @ApiModelProperty(value = "商家管理后台截图") + private String shopBackstageImage; + + /** + * 备注 + */ + @ApiModelProperty(value = "备注") + private String remark; + + /** + * 创建时间 + */ + @ApiModelProperty(value = "创建时间") + private String createTime; + + /** + * 更新时间 + */ + @ApiModelProperty(value = "更新时间") + private String updateTime; + + private static final long serialVersionUID = 1L; +} diff --git a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/business/CereShopOtherOrganizations.java b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/business/CereShopOtherOrganizations.java new file mode 100644 index 0000000..9277743 --- /dev/null +++ b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/business/CereShopOtherOrganizations.java @@ -0,0 +1,206 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.commons.domain.business; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +/** + * cere_shop_other_organizations 商家其他组织认证信息实体类 + * @author + */ +@Data +@ApiModel(value = "CereShopOtherOrganizations", description = "商家其他组织认证信息实体类") +public class CereShopOtherOrganizations implements Serializable { + /** + * 关联商家id + */ + @ApiModelProperty(value = "关联商家id") + private Long businessId; + + /** + * 组织名称 + */ + @ApiModelProperty(value = "组织名称") + @NotBlank(message = "组织名称不能为空") + private String otherName; + + /** + * 组织机构代码 + */ + @ApiModelProperty(value = "组织机构代码") + @NotBlank(message = "组织机构代码不能为空") + private String otherCode; + + /** + * 地址 省-市-区 + */ + @ApiModelProperty(value = "地址 省-市-区") + @NotBlank(message = "地址不能为空") + private String otherRegion; + + /** + * 详细地址 + */ + @ApiModelProperty(value = "详细地址") + private String otherAdress; + + /** + * 营业期限开始时间 + */ + @ApiModelProperty(value = "营业期限开始时间") + @NotBlank(message = "营业期限开始时间不能为空") + private String otherStartTime; + + /** + * 营业期限结束时间 + */ + @ApiModelProperty(value = "营业期限结束时间") + @NotBlank(message = "营业期限结束时间不能为空") + private String otherEndTime; + + /** + * 机构证件或其他证明材料图片地址(多个以逗号隔开) + */ + @ApiModelProperty(value = "机构证件或其他证明材料图片地址(多个以逗号隔开)") + @NotBlank(message = "机构证件或其他证明材料图片不能为空") + private String otherLicense; + + /** + * 负责人姓名 + */ + @ApiModelProperty(value = "负责人姓名") + @NotBlank(message = "负责人姓名不能为空") + private String otherOperator; + + /** + * 证件类型 (取数据字典) + */ + @ApiModelProperty(value = "证件类型 (取数据字典)") + @NotNull(message = "证件类型不能为空") + private Long otherCardType; + + /** + * 负责人身份证号码 + */ + @ApiModelProperty(value = "负责人身份证号码") + @NotBlank(message = "负责人身份证号码不能为空") + private String otherIdCard; + + /** + * 证件有效开始时间 + */ + @ApiModelProperty(value = "证件有效开始时间") + @NotBlank(message = "证件有效开始时间不能为空") + private String otherCardStartTime; + + /** + * 证件有效结束时间 + */ + @ApiModelProperty(value = "证件有效结束时间") + @NotBlank(message = "证件有效结束时间不能为空") + private String otherCardEndTime; + + /** + * 身份证正面照 + */ + @ApiModelProperty(value = "身份证正面照") + @NotBlank(message = "身份证正面照不能为空") + private String otherCardPositive; + + /** + * 身份证反面照 + */ + @ApiModelProperty(value = "身份证反面照") + @NotBlank(message = "身份证反面照不能为空") + private String otherCardSide; + + /** + * 管理员手机号 + */ + @ApiModelProperty(value = "管理员手机号") + private String administratorsPhone; + + /** + * 管理员邮箱 + */ + @ApiModelProperty(value = "管理员邮箱") + private String administratorsEmail; + + /** + * 开户银行(取数据字典) + */ + @ApiModelProperty(value = "开户银行(取数据字典)") + private Long accountOpenBank; + + /** + * 开户银行地区 省-市 + */ + @ApiModelProperty(value = "开户银行地区 省-市") + private String accountBankRegion; + + /** + * 银行账户 + */ + @ApiModelProperty(value = "银行账户") + private String accountBankCard; + + /** + * 商户简称 + */ + @ApiModelProperty(value = "商户简称") + private String shopAbbreviation; + + /** + * 客服电话 + */ + @ApiModelProperty(value = "客服电话") + private String servicePhone; + + /** + * 提供服务(取数据字典) + */ + @ApiModelProperty(value = "提供服务(取数据字典)") + private Long serviceProviding; + + /** + * 商家首页截图 + */ + @ApiModelProperty(value = "商家首页截图") + private String shopIndexImage; + + /** + * 商家管理后台截图 + */ + @ApiModelProperty(value = "商家管理后台截图") + private String shopBackstageImage; + + /** + * 备注 + */ + @ApiModelProperty(value = "备注") + private String remark; + + /** + * 创建时间 + */ + @ApiModelProperty(value = "创建时间") + private String createTime; + + /** + * 更新时间 + */ + @ApiModelProperty(value = "更新时间") + private String updateTime; + + private static final long serialVersionUID = 1L; + +} diff --git a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/business/CereShopPersonal.java b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/business/CereShopPersonal.java new file mode 100644 index 0000000..82b1d90 --- /dev/null +++ b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/business/CereShopPersonal.java @@ -0,0 +1,165 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.commons.domain.business; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +/** + * cere_shop_personal 商家个人认证信息实体类 + * @author + */ +@Data +@ApiModel(value = "CereShopPersonal", description = "商家个人认证信息实体类") +public class CereShopPersonal implements Serializable { + /** + * 关联商家id + */ + @ApiModelProperty(value = "商家id") + private Long businessId; + + /** + * 个人姓名 + */ + @ApiModelProperty(value = "个人姓名") + private String personalName; + + /** + * 证件类型 (取数据字典) + */ + @ApiModelProperty(value = "证件类型 (取数据字典)") + @NotNull(message = "证件类型不能为空") + private Long personalCardType; + + /** + * 法人身份证号码 + */ + @ApiModelProperty(value = "法人身份证号码") + @NotBlank(message = "法人身份证号码不能为空") + private String personalIdCard; + + /** + * 证件有效开始时间 + */ + @ApiModelProperty(value = "证件有效开始时间") + @NotBlank(message = "证件有效开始时间不能为空") + private String personalCardStartTime; + + /** + * 证件有效结束时间 + */ + @ApiModelProperty(value = "证件有效结束时间") + @NotBlank(message = "证件有效结束时间不能为空") + private String personalCardEndTime; + + /** + * 法人身份证正面照 + */ + @ApiModelProperty(value = "法人身份证正面照") + @NotBlank(message = "法人身份证正面照不能为空") + private String personalCardPositive; + + /** + * 法人身份证反面照 + */ + @ApiModelProperty(value = "法人身份证反面照") + @NotBlank(message = "法人身份证反面照不能为空") + private String personalCardSide; + + /** + * 手持证件照 + */ + @ApiModelProperty(value = "手持证件照") + @NotBlank(message = "手持证件照不能为空") + private String personalCardHand; + + /** + * 管理员手机号 + */ + @ApiModelProperty(value = "管理员手机号") + private String administratorsPhone; + + /** + * 管理员邮箱 + */ + @ApiModelProperty(value = "管理员邮箱") + private String administratorsEmail; + + /** + * 开户银行(取数据字典) + */ + @ApiModelProperty(value = "开户银行(取数据字典)") + private Long accountOpenBank; + + /** + * 开户银行地区 省-市 + */ + @ApiModelProperty(value = "开户银行地区 省-市") + private String accountBankRegion; + + /** + * 银行账户 + */ + @ApiModelProperty(value = "银行账户") + private String accountBankCard; + + /** + * 商户简称 + */ + @ApiModelProperty(value = "商户简称") + private String shopAbbreviation; + + /** + * 客服电话 + */ + @ApiModelProperty(value = "客服电话") + @NotBlank(message = "客服电话不能为空") + private String servicePhone; + + /** + * 提供服务(取数据字典) + */ + @ApiModelProperty(value = "提供服务(取数据字典)") + private Long serviceProviding; + + /** + * 商家首页截图 + */ + @ApiModelProperty(value = "商家首页截图") + private String shopIndexImage; + + /** + * 商家管理后台截图 + */ + @ApiModelProperty(value = "商家管理后台截图") + private String shopBackstageImage; + + /** + * 备注 + */ + @ApiModelProperty(value = "备注") + private String remark; + + /** + * 创建时间 + */ + @ApiModelProperty(value = "创建时间") + private String createTime; + + /** + * 更新时间 + */ + @ApiModelProperty(value = "更新时间") + private String updateTime; + + private static final long serialVersionUID = 1L; + +} diff --git a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/buyer/CereBuyerUser.java b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/buyer/CereBuyerUser.java index 059f867..118b46a 100644 --- a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/buyer/CereBuyerUser.java +++ b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/buyer/CereBuyerUser.java @@ -179,6 +179,12 @@ public class CereBuyerUser implements Serializable { */ private String updateTime; + /** + * 所属项目 + */ + @ApiModelProperty(value = "所属项目") + private String project; + private static final long serialVersionUID = 1L; } diff --git a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/canvas/CerePlatformCanvas.java b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/canvas/CerePlatformCanvas.java index 323d8fc..0444f2c 100644 --- a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/canvas/CerePlatformCanvas.java +++ b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/canvas/CerePlatformCanvas.java @@ -72,6 +72,12 @@ public class CerePlatformCanvas implements Serializable { @ApiModelProperty("更新时间") private String updateTime; + /** + * 所属项目 + */ + @ApiModelProperty("所属项目") + private String project; + private static final long serialVersionUID = 1L; } diff --git a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/order/CereOrderParent.java b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/order/CereOrderParent.java index c46545a..77987e7 100644 --- a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/order/CereOrderParent.java +++ b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/order/CereOrderParent.java @@ -45,6 +45,11 @@ public class CereOrderParent implements Serializable { private BigDecimal price; /** + * 所属终端 + */ + private String project; + + /** * 创建时间 */ private String createTime; diff --git a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/order/CereShopOrder.java b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/order/CereShopOrder.java index 80525f1..04fef6d 100644 --- a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/order/CereShopOrder.java +++ b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/order/CereShopOrder.java @@ -8,7 +8,6 @@ package com.shop.cereshop.commons.domain.order; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.shop.cereshop.commons.utils.EmptyUtils; -import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; @@ -32,6 +31,12 @@ public class CereShopOrder implements Serializable { private Long parentId; /** + * 所属终端 + */ + private String project; + + + /** * 店铺id */ private Long shopId; diff --git a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/product/CereProductClassify.java b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/product/CereProductClassify.java index 3137147..6ae3a08 100644 --- a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/product/CereProductClassify.java +++ b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/product/CereProductClassify.java @@ -6,12 +6,14 @@ package com.shop.cereshop.commons.domain.product; import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; +import java.util.List; /** * cere_product_classify 平台商品分类实体类 @@ -24,11 +26,16 @@ public class CereProductClassify implements Serializable { /** * 分类id */ - @ApiModelProperty(value = "分类id") @TableId(type = IdType.AUTO) private Long classifyId; /** + * 所属商家 + */ + @ApiModelProperty(value = "所属商家") + private String project; + + /** * 分类父id */ @ApiModelProperty(value = "分类父id") @@ -88,6 +95,13 @@ public class CereProductClassify implements Serializable { @ApiModelProperty(value = "更新时间") private String updateTime; + /** + * 子节点数据 + */ + @ApiModelProperty(value = "子节点数据") + @TableField(exist = false) + private List childs; + private static final long serialVersionUID = 1L; } diff --git a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/product/CereShopProduct.java b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/product/CereShopProduct.java index f689aa1..82efba4 100644 --- a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/product/CereShopProduct.java +++ b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/product/CereShopProduct.java @@ -45,11 +45,21 @@ public class CereShopProduct implements Serializable { private Long shopGroupId; /** - * 关联分类id + * 关联平台分类id */ private Long classifyId; /** + * 关联商品分组id + */ + private Long shopGroupBusinessId; + + /** + * 关联商家分类id + */ + private Long classifyBusinessId; + + /** * 关联供应商id */ private Long supplierId; diff --git a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/shop/CerePlatformShop.java b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/shop/CerePlatformShop.java index 97f13ce..488a1b8 100644 --- a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/shop/CerePlatformShop.java +++ b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/shop/CerePlatformShop.java @@ -18,20 +18,24 @@ import java.io.Serializable; * @author */ @Data -@ApiModel(value = "CerePlatformShop", description = "商家信息实体类") +@ApiModel(value = "CerePlatformShop", description = "店铺信息实体类") public class CerePlatformShop implements Serializable { + /** * 商家id */ @TableId(type = IdType.AUTO) - @ApiModelProperty(value = "商家id") + @ApiModelProperty(value = "店铺id") private Long shopId; + @ApiModelProperty(value = "商家id") + private Long businessId; + /** * 商家编码 */ - @ApiModelProperty(value = "商家编码") + @ApiModelProperty(value = "店铺编码") private String shopCode; /** @@ -192,6 +196,12 @@ public class CerePlatformShop implements Serializable { @ApiModelProperty(value = "分账账期") private Integer shareDays; + /** + * 是否是跨境商家 + */ + @ApiModelProperty(value = "是否是跨境商家") + private Integer isCross; + private static final long serialVersionUID = 1L; } diff --git a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/shop/CereShopConversion.java b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/shop/CereShopConversion.java index 7943d2d..c413c4a 100644 --- a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/shop/CereShopConversion.java +++ b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/shop/CereShopConversion.java @@ -15,6 +15,13 @@ import java.io.Serializable; */ @Data public class CereShopConversion implements Serializable { + + + /** + * 所属终端 + */ + private String project; + /** * 店铺id */ diff --git a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/shop/CereShopEnterprise.java b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/shop/CereShopEnterprise.java deleted file mode 100644 index fc54a1c..0000000 --- a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/shop/CereShopEnterprise.java +++ /dev/null @@ -1,212 +0,0 @@ -/* - * Copyright (C) 2017-2021 - * All rights reserved, Designed By 深圳中科鑫智科技有限公司 - * Copyright authorization contact 18814114118 - */ -package com.shop.cereshop.commons.domain.shop; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; -import java.io.Serializable; - -/** - * cere_shop_enterprise 店铺企业认证信息实体类 - * @author - */ -@Data -@ApiModel(value = "CereShopEnterprise", description = "店铺企业认证信息实体类") -public class CereShopEnterprise implements Serializable { - /** - * 关联店铺id - */ - @ApiModelProperty(value = "关联店铺id") - private Long shopId; - - /** - * 企业名称 - */ - @ApiModelProperty(value = "企业名称") - @NotBlank(message = "企业名称不能为空") - private String enterpriseName; - - /** - * 统一社会信用代码 - */ - @ApiModelProperty(value = "统一社会信用代码") - @NotBlank(message = "统一社会信用代码不能为空") - private String enterpriseCode; - - /** - * 地址 省-市-区 - */ - @ApiModelProperty(value = "地址 省-市-区") - @NotBlank(message = "地址不能为空") - private String enterpriseRegion; - - /** - * 详细地址 - */ - @ApiModelProperty(value = "详细地址") - private String enterpriseAdress; - - /** - * 营业期限开始时间 - */ - @ApiModelProperty(value = "营业期限开始时间") - @NotBlank(message = "营业期限开始时间不能为空") - private String enterpriseStartTime; - - /** - * 营业期限结束时间 - */ - @ApiModelProperty(value = "营业期限结束时间") - @NotBlank(message = "营业期限结束时间不能为空") - private String enterpriseEndTime; - - /** - * 营业执照图片地址(多个以逗号隔开) - */ - @ApiModelProperty(value = "营业执照图片地址(多个以逗号隔开)") - @NotBlank(message = "营业执照图片不能为空") - private String enterpriseLicense; - - /** - * 法人姓名 - */ - @ApiModelProperty(value = "法人姓名") - @NotBlank(message = "法人姓名不能为空") - private String enterpriseOperator; - - /** - * 证件类型 (取数据字典) - */ - @ApiModelProperty(value = "证件类型 (取数据字典)") - @NotNull(message = "证件类型不能为空") - private Long enterpriseCardType; - - /** - * 法人身份证号码 - */ - @ApiModelProperty(value = "法人身份证号码") - @NotBlank(message = "法人身份证号码不能为空") - private String enterpriseIdCard; - - /** - * 证件有效开始时间 - */ - @ApiModelProperty(value = "证件有效开始时间") - @NotBlank(message = "证件有效开始时间不能为空") - private String enterpriseCardStartTime; - - /** - * 证件有效结束时间 - */ - @ApiModelProperty(value = "证件有效结束时间") - @NotBlank(message = "证件有效结束时间不能为空") - private String enterpriseCardEndTime; - - /** - * 法人身份证正面照 - */ - @ApiModelProperty(value = "法人身份证正面照") - @NotBlank(message = "法人身份证正面照不能为空") - private String enterpriseCardPositive; - - /** - * 法人身份证反面照 - */ - @ApiModelProperty(value = "法人身份证反面照") - @NotBlank(message = "法人身份证反面照不能为空") - private String enterpriseCardSide; - - /** - * 管理员手机号 - */ - @ApiModelProperty(value = "管理员手机号") - private String administratorsPhone; - - /** - * 管理员邮箱 - */ - @ApiModelProperty(value = "管理员邮箱") - private String administratorsEmail; - - /** - * 开户银行(取数据字典) - */ - @ApiModelProperty(value = "开户银行(取数据字典)") - private Long accountOpenBank; - - /** - * 开户银行名称 - */ - @ApiModelProperty(value = "开户银行名称") - private String accountBankName; - - /** - * 开户银行地区 省-市 - */ - @ApiModelProperty(value = "开户银行地区 省-市") - private String accountBankRegion; - - /** - * 银行账户 - */ - @ApiModelProperty(value = "银行账户") - private String accountBankCard; - - /** - * 商户简称 - */ - @ApiModelProperty(value = "商户简称") - private String shopAbbreviation; - - /** - * 客服电话 - */ - @ApiModelProperty(value = "客服电话") - private String servicePhone; - - /** - * 提供服务(取数据字典) - */ - @ApiModelProperty(value = "提供服务(取数据字典)") - private Long serviceProviding; - - /** - * 店铺首页截图 - */ - @ApiModelProperty(value = "店铺首页截图") - private String shopIndexImage; - - /** - * 店铺管理后台截图 - */ - @ApiModelProperty(value = "店铺管理后台截图") - private String shopBackstageImage; - - /** - * 备注 - */ - @ApiModelProperty(value = "备注") - private String remark; - - /** - * 创建时间 - */ - @ApiModelProperty(value = "创建时间") - private String createTime; - - /** - * 更新时间 - */ - @ApiModelProperty(value = "更新时间") - private String updateTime; - - private static final long serialVersionUID = 1L; - -} diff --git a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/shop/CereShopGroup.java b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/shop/CereShopGroup.java index 2d56300..2cf3a62 100644 --- a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/shop/CereShopGroup.java +++ b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/shop/CereShopGroup.java @@ -34,6 +34,12 @@ public class CereShopGroup implements Serializable { private Long shopId; /** + * 平台号 + */ + @ApiModelProperty(value = "平台号") + private String project; + + /** * 分组名称 */ @ApiModelProperty(value = "分组名称") diff --git a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/shop/CereShopIndividualBusinesses.java b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/shop/CereShopIndividualBusinesses.java deleted file mode 100644 index 6f69d3e..0000000 --- a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/shop/CereShopIndividualBusinesses.java +++ /dev/null @@ -1,211 +0,0 @@ -/* - * Copyright (C) 2017-2021 - * All rights reserved, Designed By 深圳中科鑫智科技有限公司 - * Copyright authorization contact 18814114118 - */ -package com.shop.cereshop.commons.domain.shop; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; -import java.io.Serializable; - -/** - * cere_shop_individual_businesses 店铺个体工商户认证信息实体类 - * @author - */ -@Data -@ApiModel(value = "CereShopIndividualBusinesses", description = "店铺个体工商户认证信息实体类") -public class CereShopIndividualBusinesses implements Serializable { - /** - * 关联店铺id - */ - @ApiModelProperty(value = "关联店铺id") - private Long shopId; - - /** - * 商户名称 - */ - @ApiModelProperty(value = "商户名称") - @NotBlank(message = "商户名称不能为空") - private String subjectName; - - /** - * 统一社会信用代码 - */ - @ApiModelProperty(value = "统一社会信用代码") - @NotBlank(message = "统一社会信用代码不能为空") - private String subjectCode; - - /** - * 地址 省-市-区 - */ - @ApiModelProperty(value = "地址 省-市-区") - @NotBlank(message = "地址不能为空") - private String subjectRegion; - - /** - * 详细地址 - */ - @ApiModelProperty(value = "详细地址") - private String subjectAdress; - - /** - * 营业期限开始时间 - */ - @ApiModelProperty(value = "营业期限开始时间") - @NotBlank(message = "营业期限开始时间不能为空") - private String subjectStartTime; - - /** - * 营业期限结束时间 - */ - @ApiModelProperty(value = "营业期限结束时间") - @NotBlank(message = "营业期限结束时间不能为空") - private String subjectEndTime; - - /** - * 营业执照图片地址(多个以逗号隔开) - */ - @ApiModelProperty(value = "营业执照图片地址(多个以逗号隔开)") - @NotBlank(message = "营业执照图片不能为空") - private String subjectLicense; - - /** - * 经营者姓名 - */ - @ApiModelProperty(value = "经营者姓名") - @NotBlank(message = "经营者姓名不能为空") - private String subjectOperator; - - /** - * 证件类型 (取数据字典) - */ - @ApiModelProperty(value = "证件类型 (取数据字典)") - @NotNull(message = "证件类型不能为空") - private Long subjectCardType; - - /** - * 经营者身份证号码 - */ - @ApiModelProperty(value = "经营者身份证号码") - @NotBlank(message = "经营者身份证号码不能为空") - private String subjectIdCard; - - /** - * 证件有效开始时间 - */ - @ApiModelProperty(value = "证件有效开始时间") - @NotBlank(message = "证件有效开始时间不能为空") - private String subjectCardStartTime; - - /** - * 证件有效结束时间 - */ - @ApiModelProperty(value = "证件有效结束时间") - @NotBlank(message = "证件有效结束时间不能为空") - private String subjectCardEndTime; - - /** - * 身份证正面照 - */ - @ApiModelProperty(value = "身份证正面照") - @NotBlank(message = "身份证正面照不能为空") - private String subjectCardPositive; - - /** - * 身份证反面照 - */ - @ApiModelProperty(value = "身份证反面照") - @NotBlank(message = "身份证反面照不能为空") - private String subjectCardSide; - - /** - * 管理员手机号 - */ - @ApiModelProperty(value = "管理员手机号") - private String administratorsPhone; - - /** - * 管理员邮箱 - */ - @ApiModelProperty(value = "管理员邮箱") - private String administratorsEmail; - - /** - * 账户类型 1-对公 2-对私 - */ - @ApiModelProperty(value = "账户类型 1-对公 2-对私") - private Integer accountType; - - /** - * 开户银行(取数据字典) - */ - @ApiModelProperty(value = "开户银行(取数据字典)") - private Long accountOpenBank; - - /** - * 开户银行地区 省-市 - */ - @ApiModelProperty(value = "开户银行地区 省-市") - private String accountBankRegion; - - /** - * 银行账户 - */ - @ApiModelProperty(value = "银行账户") - private String accountBankCard; - - /** - * 商户简称 - */ - @ApiModelProperty(value = "商户简称") - private String shopAbbreviation; - - /** - * 客服电话 - */ - @ApiModelProperty(value = "客服电话") - private String servicePhone; - - /** - * 提供服务(取数据字典) - */ - @ApiModelProperty(value = "提供服务(取数据字典)") - private Long serviceProviding; - - /** - * 店铺首页截图 - */ - @ApiModelProperty(value = "店铺首页截图") - private String shopIndexImage; - - /** - * 店铺管理后台截图 - */ - @ApiModelProperty(value = "店铺管理后台截图") - private String shopBackstageImage; - - /** - * 备注 - */ - @ApiModelProperty(value = "备注") - private String remark; - - /** - * 创建时间 - */ - @ApiModelProperty(value = "创建时间") - private String createTime; - - /** - * 更新时间 - */ - @ApiModelProperty(value = "更新时间") - private String updateTime; - - private static final long serialVersionUID = 1L; -} diff --git a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/shop/CereShopOtherOrganizations.java b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/shop/CereShopOtherOrganizations.java deleted file mode 100644 index a74e05c..0000000 --- a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/shop/CereShopOtherOrganizations.java +++ /dev/null @@ -1,206 +0,0 @@ -/* - * Copyright (C) 2017-2021 - * All rights reserved, Designed By 深圳中科鑫智科技有限公司 - * Copyright authorization contact 18814114118 - */ -package com.shop.cereshop.commons.domain.shop; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; -import java.io.Serializable; - -/** - * cere_shop_other_organizations 店铺其他组织认证信息实体类 - * @author - */ -@Data -@ApiModel(value = "CereShopOtherOrganizations", description = "店铺其他组织认证信息实体类") -public class CereShopOtherOrganizations implements Serializable { - /** - * 关联店铺id - */ - @ApiModelProperty(value = "关联店铺id") - private Long shopId; - - /** - * 组织名称 - */ - @ApiModelProperty(value = "组织名称") - @NotBlank(message = "组织名称不能为空") - private String otherName; - - /** - * 组织机构代码 - */ - @ApiModelProperty(value = "组织机构代码") - @NotBlank(message = "组织机构代码不能为空") - private String otherCode; - - /** - * 地址 省-市-区 - */ - @ApiModelProperty(value = "地址 省-市-区") - @NotBlank(message = "地址不能为空") - private String otherRegion; - - /** - * 详细地址 - */ - @ApiModelProperty(value = "详细地址") - private String otherAdress; - - /** - * 营业期限开始时间 - */ - @ApiModelProperty(value = "营业期限开始时间") - @NotBlank(message = "营业期限开始时间不能为空") - private String otherStartTime; - - /** - * 营业期限结束时间 - */ - @ApiModelProperty(value = "营业期限结束时间") - @NotBlank(message = "营业期限结束时间不能为空") - private String otherEndTime; - - /** - * 机构证件或其他证明材料图片地址(多个以逗号隔开) - */ - @ApiModelProperty(value = "机构证件或其他证明材料图片地址(多个以逗号隔开)") - @NotBlank(message = "机构证件或其他证明材料图片不能为空") - private String otherLicense; - - /** - * 负责人姓名 - */ - @ApiModelProperty(value = "负责人姓名") - @NotBlank(message = "负责人姓名不能为空") - private String otherOperator; - - /** - * 证件类型 (取数据字典) - */ - @ApiModelProperty(value = "证件类型 (取数据字典)") - @NotNull(message = "证件类型不能为空") - private Long otherCardType; - - /** - * 负责人身份证号码 - */ - @ApiModelProperty(value = "负责人身份证号码") - @NotBlank(message = "负责人身份证号码不能为空") - private String otherIdCard; - - /** - * 证件有效开始时间 - */ - @ApiModelProperty(value = "证件有效开始时间") - @NotBlank(message = "证件有效开始时间不能为空") - private String otherCardStartTime; - - /** - * 证件有效结束时间 - */ - @ApiModelProperty(value = "证件有效结束时间") - @NotBlank(message = "证件有效结束时间不能为空") - private String otherCardEndTime; - - /** - * 身份证正面照 - */ - @ApiModelProperty(value = "身份证正面照") - @NotBlank(message = "身份证正面照不能为空") - private String otherCardPositive; - - /** - * 身份证反面照 - */ - @ApiModelProperty(value = "身份证反面照") - @NotBlank(message = "身份证反面照不能为空") - private String otherCardSide; - - /** - * 管理员手机号 - */ - @ApiModelProperty(value = "管理员手机号") - private String administratorsPhone; - - /** - * 管理员邮箱 - */ - @ApiModelProperty(value = "管理员邮箱") - private String administratorsEmail; - - /** - * 开户银行(取数据字典) - */ - @ApiModelProperty(value = "开户银行(取数据字典)") - private Long accountOpenBank; - - /** - * 开户银行地区 省-市 - */ - @ApiModelProperty(value = "开户银行地区 省-市") - private String accountBankRegion; - - /** - * 银行账户 - */ - @ApiModelProperty(value = "银行账户") - private String accountBankCard; - - /** - * 商户简称 - */ - @ApiModelProperty(value = "商户简称") - private String shopAbbreviation; - - /** - * 客服电话 - */ - @ApiModelProperty(value = "客服电话") - private String servicePhone; - - /** - * 提供服务(取数据字典) - */ - @ApiModelProperty(value = "提供服务(取数据字典)") - private Long serviceProviding; - - /** - * 店铺首页截图 - */ - @ApiModelProperty(value = "店铺首页截图") - private String shopIndexImage; - - /** - * 店铺管理后台截图 - */ - @ApiModelProperty(value = "店铺管理后台截图") - private String shopBackstageImage; - - /** - * 备注 - */ - @ApiModelProperty(value = "备注") - private String remark; - - /** - * 创建时间 - */ - @ApiModelProperty(value = "创建时间") - private String createTime; - - /** - * 更新时间 - */ - @ApiModelProperty(value = "更新时间") - private String updateTime; - - private static final long serialVersionUID = 1L; - -} diff --git a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/shop/CereShopPersonal.java b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/shop/CereShopPersonal.java deleted file mode 100644 index e82406a..0000000 --- a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/shop/CereShopPersonal.java +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright (C) 2017-2021 - * All rights reserved, Designed By 深圳中科鑫智科技有限公司 - * Copyright authorization contact 18814114118 - */ -package com.shop.cereshop.commons.domain.shop; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; -import java.io.Serializable; - -/** - * cere_shop_personal 店铺个人认证信息实体类 - * @author - */ -@Data -@ApiModel(value = "CereShopPersonal", description = "店铺个人认证信息实体类") -public class CereShopPersonal implements Serializable { - /** - * 关联店铺id - */ - @ApiModelProperty(value = "店铺id") - private Long shopId; - - /** - * 个人姓名 - */ - @ApiModelProperty(value = "个人姓名") - private String personalName; - - /** - * 证件类型 (取数据字典) - */ - @ApiModelProperty(value = "证件类型 (取数据字典)") - @NotNull(message = "证件类型不能为空") - private Long personalCardType; - - /** - * 法人身份证号码 - */ - @ApiModelProperty(value = "法人身份证号码") - @NotBlank(message = "法人身份证号码不能为空") - private String personalIdCard; - - /** - * 证件有效开始时间 - */ - @ApiModelProperty(value = "证件有效开始时间") - @NotBlank(message = "证件有效开始时间不能为空") - private String personalCardStartTime; - - /** - * 证件有效结束时间 - */ - @ApiModelProperty(value = "证件有效结束时间") - @NotBlank(message = "证件有效结束时间不能为空") - private String personalCardEndTime; - - /** - * 法人身份证正面照 - */ - @ApiModelProperty(value = "法人身份证正面照") - @NotBlank(message = "法人身份证正面照不能为空") - private String personalCardPositive; - - /** - * 法人身份证反面照 - */ - @ApiModelProperty(value = "法人身份证反面照") - @NotBlank(message = "法人身份证反面照不能为空") - private String personalCardSide; - - /** - * 手持证件照 - */ - @ApiModelProperty(value = "手持证件照") - @NotBlank(message = "手持证件照不能为空") - private String personalCardHand; - - /** - * 管理员手机号 - */ - @ApiModelProperty(value = "管理员手机号") - private String administratorsPhone; - - /** - * 管理员邮箱 - */ - @ApiModelProperty(value = "管理员邮箱") - private String administratorsEmail; - - /** - * 开户银行(取数据字典) - */ - @ApiModelProperty(value = "开户银行(取数据字典)") - private Long accountOpenBank; - - /** - * 开户银行地区 省-市 - */ - @ApiModelProperty(value = "开户银行地区 省-市") - private String accountBankRegion; - - /** - * 银行账户 - */ - @ApiModelProperty(value = "银行账户") - private String accountBankCard; - - /** - * 商户简称 - */ - @ApiModelProperty(value = "商户简称") - private String shopAbbreviation; - - /** - * 客服电话 - */ - @ApiModelProperty(value = "客服电话") - @NotBlank(message = "客服电话不能为空") - private String servicePhone; - - /** - * 提供服务(取数据字典) - */ - @ApiModelProperty(value = "提供服务(取数据字典)") - private Long serviceProviding; - - /** - * 店铺首页截图 - */ - @ApiModelProperty(value = "店铺首页截图") - private String shopIndexImage; - - /** - * 店铺管理后台截图 - */ - @ApiModelProperty(value = "店铺管理后台截图") - private String shopBackstageImage; - - /** - * 备注 - */ - @ApiModelProperty(value = "备注") - private String remark; - - /** - * 创建时间 - */ - @ApiModelProperty(value = "创建时间") - private String createTime; - - /** - * 更新时间 - */ - @ApiModelProperty(value = "更新时间") - private String updateTime; - - private static final long serialVersionUID = 1L; - -} diff --git a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/shop/CereShopVisit.java b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/shop/CereShopVisit.java index b5d1648..f9d027c 100644 --- a/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/shop/CereShopVisit.java +++ b/cereshop-commons/src/main/java/com/shop/cereshop/commons/domain/shop/CereShopVisit.java @@ -16,6 +16,12 @@ import java.io.Serializable; */ @Data public class CereShopVisit implements Serializable { + + /** + * 所属终端 + */ + private String project; + /** * 关联店铺id */ diff --git a/cereshop-commons/src/main/java/com/shop/cereshop/commons/utils/EmptyUtils.java b/cereshop-commons/src/main/java/com/shop/cereshop/commons/utils/EmptyUtils.java index ba66e93..696f117 100644 --- a/cereshop-commons/src/main/java/com/shop/cereshop/commons/utils/EmptyUtils.java +++ b/cereshop-commons/src/main/java/com/shop/cereshop/commons/utils/EmptyUtils.java @@ -94,7 +94,7 @@ public class EmptyUtils { * @return Integer */ public static boolean isEmpty(Collection collection) { - return null == collection || collection.size() == 0; + return null == collection || collection.isEmpty(); } public static boolean isNotEmpty(Collection collection) { diff --git a/cereshop-commons/src/main/java/com/shop/cereshop/commons/utils/ProjectUtil.java b/cereshop-commons/src/main/java/com/shop/cereshop/commons/utils/ProjectUtil.java new file mode 100644 index 0000000..7ee465c --- /dev/null +++ b/cereshop-commons/src/main/java/com/shop/cereshop/commons/utils/ProjectUtil.java @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2017-2021 + * All rights reserved, Designed By 深圳中科鑫智科技有限公司 + * Copyright authorization contact 18814114118 + */ +package com.shop.cereshop.commons.utils; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.alibaba.fastjson.TypeReference; +import com.alibaba.fastjson.parser.Feature; +import com.alipay.api.AlipayApiException; +import com.alipay.api.internal.util.AlipayEncrypt; +import com.alipay.api.internal.util.AlipaySignature; +import com.shop.cereshop.commons.config.AlipayConfig; +import com.shop.cereshop.commons.constant.IntegerEnum; + +import javax.servlet.http.HttpServletRequest; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; + +/** + * 商家端相关的方法 + */ +public class ProjectUtil { + + //默认的平台商家端 + public static final String DEFAULT_PROJECT = "0"; +}