From 72fae524352afa9ba4ca25db5a7ef40bd2ff5184 Mon Sep 17 00:00:00 2001 From: Github_lizhw <171332584@qq.com> Date: Mon, 26 Jan 2026 22:35:15 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-saas-app/pom.xml | 23 -- ruoyi-saas-app/ruoyi-mall/pom.xml | 25 -- .../ruoyi-mall/ruoyi-mall-admin/pom.xml | 80 ----- .../com/macro/mall/MallAdminApplication.java | 19 - .../component/PathResourceRulesHolder.java | 23 -- .../com/macro/mall/config/MyBatisConfig.java | 15 - .../java/com/macro/mall/config/OssConfig.java | 24 -- .../com/macro/mall/config/RedisConfig.java | 19 - .../macro/mall/config/SaTokenConfigure.java | 22 -- .../macro/mall/config/SpringDocConfig.java | 68 ---- .../CmsPrefrenceAreaController.java | 34 -- .../mall/controller/CmsSubjectController.java | 47 --- .../mall/controller/MinioController.java | 115 ------ .../OmsCompanyAddressController.java | 35 -- .../mall/controller/OmsOrderController.java | 113 ------ .../OmsOrderReturnApplyController.java | 70 ---- .../OmsOrderReturnReasonController.java | 88 ----- .../controller/OmsOrderSettingController.java | 42 --- .../macro/mall/controller/OssController.java | 43 --- .../mall/controller/PmsBrandController.java | 131 ------- ...PmsProductAttributeCategoryController.java | 87 ----- .../PmsProductAttributeController.java | 95 ----- .../PmsProductCategoryController.java | 117 ------- .../mall/controller/PmsProductController.java | 145 -------- .../controller/PmsSkuStockController.java | 44 --- .../mall/controller/SmsCouponController.java | 79 ----- .../SmsCouponHistoryController.java | 41 --- .../SmsFlashPromotionController.java | 87 ----- ...ashPromotionProductRelationController.java | 79 ----- .../SmsFlashPromotionSessionController.java | 94 ----- .../SmsHomeAdvertiseController.java | 86 ----- .../controller/SmsHomeBrandController.java | 81 ----- .../SmsHomeNewProductController.java | 81 ----- .../SmsHomeRecommendProductController.java | 81 ----- .../SmsHomeRecommendSubjectController.java | 81 ----- .../mall/controller/UmsAdminController.java | 183 ---------- .../controller/UmsMemberLevelController.java | 36 -- .../mall/controller/UmsMenuController.java | 103 ------ .../UmsResourceCategoryController.java | 70 ---- .../controller/UmsResourceController.java | 101 ------ .../mall/controller/UmsRoleController.java | 123 ------- .../CmsPrefrenceAreaProductRelationDao.java | 17 - .../dao/CmsSubjectProductRelationDao.java | 17 - .../java/com/macro/mall/dao/OmsOrderDao.java | 30 -- .../mall/dao/OmsOrderOperateHistoryDao.java | 17 - .../mall/dao/OmsOrderReturnApplyDao.java | 24 -- .../com/macro/mall/dao/PmsMemberPriceDao.java | 17 - .../dao/PmsProductAttributeCategoryDao.java | 16 - .../mall/dao/PmsProductAttributeDao.java | 17 - .../mall/dao/PmsProductAttributeValueDao.java | 17 - ...msProductCategoryAttributeRelationDao.java | 17 - .../macro/mall/dao/PmsProductCategoryDao.java | 16 - .../com/macro/mall/dao/PmsProductDao.java | 16 - .../mall/dao/PmsProductFullReductionDao.java | 17 - .../macro/mall/dao/PmsProductLadderDao.java | 17 - .../mall/dao/PmsProductVertifyRecordDao.java | 17 - .../com/macro/mall/dao/PmsSkuStockDao.java | 22 -- .../java/com/macro/mall/dao/SmsCouponDao.java | 15 - .../SmsCouponProductCategoryRelationDao.java | 17 - .../mall/dao/SmsCouponProductRelationDao.java | 17 - .../SmsFlashPromotionProductRelationDao.java | 17 - .../mall/dao/UmsAdminRoleRelationDao.java | 34 -- .../java/com/macro/mall/dao/UmsRoleDao.java | 26 -- .../macro/mall/dto/BucketPolicyConfigDto.java | 31 -- .../com/macro/mall/dto/MinioUploadDto.java | 18 - .../com/macro/mall/dto/OmsMoneyInfoParam.java | 24 -- .../macro/mall/dto/OmsOrderDeliveryParam.java | 20 -- .../com/macro/mall/dto/OmsOrderDetail.java | 25 -- .../macro/mall/dto/OmsOrderQueryParam.java | 26 -- .../mall/dto/OmsOrderReturnApplyResult.java | 18 - .../macro/mall/dto/OmsReceiverInfoParam.java | 32 -- .../mall/dto/OmsReturnApplyQueryParam.java | 26 -- .../macro/mall/dto/OmsUpdateStatusParam.java | 32 -- .../com/macro/mall/dto/OssCallbackParam.java | 20 -- .../com/macro/mall/dto/OssCallbackResult.java | 24 -- .../com/macro/mall/dto/OssPolicyResult.java | 26 -- .../com/macro/mall/dto/PmsBrandParam.java | 39 --- .../dto/PmsProductAttributeCategoryItem.java | 21 -- .../mall/dto/PmsProductAttributeParam.java | 48 --- .../mall/dto/PmsProductCategoryParam.java | 43 --- .../PmsProductCategoryWithChildrenItem.java | 18 - .../com/macro/mall/dto/PmsProductParam.java | 31 -- .../macro/mall/dto/PmsProductQueryParam.java | 26 -- .../com/macro/mall/dto/PmsProductResult.java | 16 - .../com/macro/mall/dto/ProductAttrInfo.java | 19 - .../com/macro/mall/dto/SmsCouponParam.java | 25 -- .../mall/dto/SmsFlashPromotionProduct.java | 18 - .../dto/SmsFlashPromotionSessionDetail.java | 17 - .../macro/mall/dto/UmsAdminLoginParam.java | 22 -- .../com/macro/mall/dto/UmsAdminParam.java | 32 -- .../java/com/macro/mall/dto/UmsMenuNode.java | 19 - .../mall/dto/UpdateAdminPasswordParam.java | 25 -- .../mall/service/CmsPrefrenceAreaService.java | 16 - .../macro/mall/service/CmsSubjectService.java | 21 -- .../service/OmsCompanyAddressService.java | 16 - .../service/OmsOrderReturnApplyService.java | 34 -- .../service/OmsOrderReturnReasonService.java | 41 --- .../macro/mall/service/OmsOrderService.java | 58 ---- .../mall/service/OmsOrderSettingService.java | 19 - .../com/macro/mall/service/OssService.java | 21 -- .../macro/mall/service/PmsBrandService.java | 59 ---- .../PmsProductAttributeCategoryService.java | 42 --- .../service/PmsProductAttributeService.java | 42 --- .../service/PmsProductCategoryService.java | 58 ---- .../macro/mall/service/PmsProductService.java | 73 ---- .../mall/service/PmsSkuStockService.java | 21 -- .../mall/service/SmsCouponHistoryService.java | 19 - .../macro/mall/service/SmsCouponService.java | 42 --- ...sFlashPromotionProductRelationService.java | 50 --- .../service/SmsFlashPromotionService.java | 41 --- .../SmsFlashPromotionSessionService.java | 47 --- .../mall/service/SmsHomeAdvertiseService.java | 41 --- .../mall/service/SmsHomeBrandService.java | 38 -- .../service/SmsHomeNewProductService.java | 38 -- .../SmsHomeRecommendProductService.java | 38 -- .../SmsHomeRecommendSubjectService.java | 38 -- .../mall/service/UmsAdminCacheService.java | 27 -- .../macro/mall/service/UmsAdminService.java | 83 ----- .../mall/service/UmsMemberLevelService.java | 17 - .../macro/mall/service/UmsMenuService.java | 47 --- .../service/UmsResourceCategoryService.java | 32 -- .../mall/service/UmsResourceService.java | 47 --- .../macro/mall/service/UmsRoleService.java | 66 ---- .../impl/CmsPrefrenceAreaServiceImpl.java | 25 -- .../service/impl/CmsSubjectServiceImpl.java | 38 -- .../impl/OmsCompanyAddressServiceImpl.java | 24 -- .../impl/OmsOrderReturnApplyServiceImpl.java | 78 ----- .../impl/OmsOrderReturnReasonServiceImpl.java | 65 ---- .../service/impl/OmsOrderServiceImpl.java | 153 -------- .../impl/OmsOrderSettingServiceImpl.java | 28 -- .../mall/service/impl/OssServiceImpl.java | 102 ------ .../service/impl/PmsBrandServiceImpl.java | 110 ------ ...msProductAttributeCategoryServiceImpl.java | 61 ---- .../impl/PmsProductAttributeServiceImpl.java | 101 ------ .../impl/PmsProductCategoryServiceImpl.java | 154 --------- .../service/impl/PmsProductServiceImpl.java | 327 ------------------ .../service/impl/PmsSkuStockServiceImpl.java | 39 --- .../impl/SmsCouponHistoryServiceImpl.java | 38 -- .../service/impl/SmsCouponServiceImpl.java | 125 ------- ...shPromotionProductRelationServiceImpl.java | 63 ---- .../impl/SmsFlashPromotionServiceImpl.java | 63 ---- .../SmsFlashPromotionSessionServiceImpl.java | 79 ----- .../impl/SmsHomeAdvertiseServiceImpl.java | 93 ----- .../service/impl/SmsHomeBrandServiceImpl.java | 70 ---- .../impl/SmsHomeNewProductServiceImpl.java | 70 ---- .../SmsHomeRecommendProductServiceImpl.java | 70 ---- .../SmsHomeRecommendSubjectServiceImpl.java | 70 ---- .../impl/UmsAdminCacheServiceImpl.java | 43 --- .../service/impl/UmsAdminServiceImpl.java | 262 -------------- .../impl/UmsMemberLevelServiceImpl.java | 26 -- .../mall/service/impl/UmsMenuServiceImpl.java | 105 ------ .../impl/UmsResourceCategoryServiceImpl.java | 45 --- .../service/impl/UmsResourceServiceImpl.java | 90 ----- .../mall/service/impl/UmsRoleServiceImpl.java | 119 ------- .../macro/mall/validator/FlagValidator.java | 23 -- .../mall/validator/FlagValidatorClass.java | 32 -- .../src/main/resources/META-INF/MANIFEST.MF | 3 - .../src/main/resources/application.yml | 113 ------ .../src/main/resources/bootstrap-dev.yml | 8 - .../src/main/resources/bootstrap-prod.yml | 8 - .../src/main/resources/bootstrap.yml | 5 - .../CmsPrefrenceAreaProductRelationDao.xml | 11 - .../dao/CmsSubjectProductRelationDao.xml | 11 - .../src/main/resources/dao/OmsOrderDao.xml | 90 ----- .../dao/OmsOrderOperateHistoryDao.xml | 14 - .../resources/dao/OmsOrderReturnApplyDao.xml | 59 ---- .../main/resources/dao/PmsMemberPriceDao.xml | 14 - .../dao/PmsProductAttributeCategoryDao.xml | 19 - .../resources/dao/PmsProductAttributeDao.xml | 15 - .../dao/PmsProductAttributeValueDao.xml | 12 - ...PmsProductCategoryAttributeRelationDao.xml | 12 - .../resources/dao/PmsProductCategoryDao.xml | 18 - .../src/main/resources/dao/PmsProductDao.xml | 45 --- .../dao/PmsProductFullReductionDao.xml | 12 - .../resources/dao/PmsProductLadderDao.xml | 13 - .../dao/PmsProductVertifyRecordDao.xml | 15 - .../src/main/resources/dao/PmsSkuStockDao.xml | 31 -- .../src/main/resources/dao/SmsCouponDao.xml | 28 -- .../SmsCouponProductCategoryRelationDao.xml | 13 - .../dao/SmsCouponProductRelationDao.xml | 13 - .../SmsFlashPromotionProductRelationDao.xml | 30 -- .../resources/dao/UmsAdminRoleRelationDao.xml | 44 --- .../src/main/resources/dao/UmsRoleDao.xml | 64 ---- .../src/test/com/macro/mall/PmsDaoTests.java | 52 --- .../ruoyi-mall/ruoyi-mall-common/pom.xml | 57 --- .../common/annotation/CacheException.java | 12 - .../com/macro/mall/common/api/CommonPage.java | 85 ----- .../macro/mall/common/api/CommonResult.java | 131 ------- .../com/macro/mall/common/api/IErrorCode.java | 11 - .../com/macro/mall/common/api/ResultCode.java | 28 -- .../mall/common/config/BaseRedisConfig.java | 69 ---- .../mall/common/constant/AuthConstant.java | 64 ---- .../com/macro/mall/common/domain/WebLog.java | 68 ---- .../com/macro/mall/common/dto/UserDto.java | 23 -- .../mall/common/exception/ApiException.java | 32 -- .../macro/mall/common/exception/Asserts.java | 17 - .../exception/GlobalExceptionHandler.java | 55 --- .../macro/mall/common/log/WebLogAspect.java | 124 ------- .../mall/common/service/RedisService.java | 182 ---------- .../common/service/impl/RedisServiceImpl.java | 198 ----------- .../src/main/resources/logback-spring.xml | 204 ----------- 201 files changed, 10246 deletions(-) delete mode 100644 ruoyi-saas-app/pom.xml delete mode 100644 ruoyi-saas-app/ruoyi-mall/pom.xml delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/pom.xml delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/MallAdminApplication.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/component/PathResourceRulesHolder.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/config/MyBatisConfig.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/config/OssConfig.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/config/RedisConfig.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/config/SaTokenConfigure.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/config/SpringDocConfig.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/CmsPrefrenceAreaController.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/CmsSubjectController.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/MinioController.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/OmsCompanyAddressController.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/OmsOrderController.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/OmsOrderReturnApplyController.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/OmsOrderReturnReasonController.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/OmsOrderSettingController.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/OssController.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/PmsBrandController.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/PmsProductAttributeCategoryController.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/PmsProductAttributeController.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/PmsProductCategoryController.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/PmsProductController.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/PmsSkuStockController.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/SmsCouponController.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/SmsCouponHistoryController.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/SmsFlashPromotionController.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/SmsFlashPromotionProductRelationController.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/SmsFlashPromotionSessionController.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/SmsHomeAdvertiseController.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/SmsHomeBrandController.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/SmsHomeNewProductController.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/SmsHomeRecommendProductController.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/SmsHomeRecommendSubjectController.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/UmsAdminController.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/UmsMemberLevelController.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/UmsMenuController.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/UmsResourceCategoryController.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/UmsResourceController.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/UmsRoleController.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/CmsPrefrenceAreaProductRelationDao.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/CmsSubjectProductRelationDao.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/OmsOrderDao.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/OmsOrderOperateHistoryDao.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/OmsOrderReturnApplyDao.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/PmsMemberPriceDao.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/PmsProductAttributeCategoryDao.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/PmsProductAttributeDao.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/PmsProductAttributeValueDao.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/PmsProductCategoryAttributeRelationDao.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/PmsProductCategoryDao.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/PmsProductDao.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/PmsProductFullReductionDao.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/PmsProductLadderDao.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/PmsProductVertifyRecordDao.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/PmsSkuStockDao.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/SmsCouponDao.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/SmsCouponProductCategoryRelationDao.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/SmsCouponProductRelationDao.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/SmsFlashPromotionProductRelationDao.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/UmsAdminRoleRelationDao.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/UmsRoleDao.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/BucketPolicyConfigDto.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/MinioUploadDto.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/OmsMoneyInfoParam.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/OmsOrderDeliveryParam.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/OmsOrderDetail.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/OmsOrderQueryParam.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/OmsOrderReturnApplyResult.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/OmsReceiverInfoParam.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/OmsReturnApplyQueryParam.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/OmsUpdateStatusParam.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/OssCallbackParam.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/OssCallbackResult.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/OssPolicyResult.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/PmsBrandParam.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/PmsProductAttributeCategoryItem.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/PmsProductAttributeParam.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/PmsProductCategoryParam.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/PmsProductCategoryWithChildrenItem.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/PmsProductParam.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/PmsProductQueryParam.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/PmsProductResult.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/ProductAttrInfo.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/SmsCouponParam.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/SmsFlashPromotionProduct.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/SmsFlashPromotionSessionDetail.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/UmsAdminLoginParam.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/UmsAdminParam.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/UmsMenuNode.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/UpdateAdminPasswordParam.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/CmsPrefrenceAreaService.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/CmsSubjectService.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/OmsCompanyAddressService.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/OmsOrderReturnApplyService.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/OmsOrderReturnReasonService.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/OmsOrderService.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/OmsOrderSettingService.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/OssService.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/PmsBrandService.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/PmsProductAttributeCategoryService.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/PmsProductAttributeService.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/PmsProductCategoryService.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/PmsProductService.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/PmsSkuStockService.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/SmsCouponHistoryService.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/SmsCouponService.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/SmsFlashPromotionProductRelationService.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/SmsFlashPromotionService.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/SmsFlashPromotionSessionService.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/SmsHomeAdvertiseService.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/SmsHomeBrandService.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/SmsHomeNewProductService.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/SmsHomeRecommendProductService.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/SmsHomeRecommendSubjectService.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/UmsAdminCacheService.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/UmsAdminService.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/UmsMemberLevelService.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/UmsMenuService.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/UmsResourceCategoryService.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/UmsResourceService.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/UmsRoleService.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/CmsPrefrenceAreaServiceImpl.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/CmsSubjectServiceImpl.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/OmsCompanyAddressServiceImpl.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/OmsOrderReturnApplyServiceImpl.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/OmsOrderReturnReasonServiceImpl.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/OmsOrderServiceImpl.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/OmsOrderSettingServiceImpl.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/OssServiceImpl.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/PmsBrandServiceImpl.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/PmsProductAttributeCategoryServiceImpl.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/PmsProductAttributeServiceImpl.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/PmsProductCategoryServiceImpl.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/PmsProductServiceImpl.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/PmsSkuStockServiceImpl.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/SmsCouponHistoryServiceImpl.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/SmsCouponServiceImpl.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/SmsFlashPromotionProductRelationServiceImpl.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/SmsFlashPromotionServiceImpl.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/SmsFlashPromotionSessionServiceImpl.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/SmsHomeAdvertiseServiceImpl.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/SmsHomeBrandServiceImpl.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/SmsHomeNewProductServiceImpl.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/SmsHomeRecommendProductServiceImpl.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/SmsHomeRecommendSubjectServiceImpl.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/UmsAdminCacheServiceImpl.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/UmsAdminServiceImpl.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/UmsMemberLevelServiceImpl.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/UmsMenuServiceImpl.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/UmsResourceCategoryServiceImpl.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/UmsResourceServiceImpl.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/UmsRoleServiceImpl.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/validator/FlagValidator.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/validator/FlagValidatorClass.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/META-INF/MANIFEST.MF delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/application.yml delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/bootstrap-dev.yml delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/bootstrap-prod.yml delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/bootstrap.yml delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/CmsPrefrenceAreaProductRelationDao.xml delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/CmsSubjectProductRelationDao.xml delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/OmsOrderDao.xml delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/OmsOrderOperateHistoryDao.xml delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/OmsOrderReturnApplyDao.xml delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/PmsMemberPriceDao.xml delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/PmsProductAttributeCategoryDao.xml delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/PmsProductAttributeDao.xml delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/PmsProductAttributeValueDao.xml delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/PmsProductCategoryAttributeRelationDao.xml delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/PmsProductCategoryDao.xml delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/PmsProductDao.xml delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/PmsProductFullReductionDao.xml delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/PmsProductLadderDao.xml delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/PmsProductVertifyRecordDao.xml delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/PmsSkuStockDao.xml delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/SmsCouponDao.xml delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/SmsCouponProductCategoryRelationDao.xml delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/SmsCouponProductRelationDao.xml delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/SmsFlashPromotionProductRelationDao.xml delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/UmsAdminRoleRelationDao.xml delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/UmsRoleDao.xml delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/test/com/macro/mall/PmsDaoTests.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/pom.xml delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/annotation/CacheException.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/api/CommonPage.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/api/CommonResult.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/api/IErrorCode.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/api/ResultCode.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/config/BaseRedisConfig.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/constant/AuthConstant.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/domain/WebLog.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/dto/UserDto.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/exception/ApiException.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/exception/Asserts.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/exception/GlobalExceptionHandler.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/log/WebLogAspect.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/service/RedisService.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/service/impl/RedisServiceImpl.java delete mode 100644 ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/resources/logback-spring.xml diff --git a/ruoyi-saas-app/pom.xml b/ruoyi-saas-app/pom.xml deleted file mode 100644 index 4876f3837..000000000 --- a/ruoyi-saas-app/pom.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - ruoyi-vue-plus - org.dromara - ${revision} - - 4.0.0 - - - ruoyi-mall - - - ruoyi-saas-app - pom - - - ruoyi-saas-app 业务模块 - - - diff --git a/ruoyi-saas-app/ruoyi-mall/pom.xml b/ruoyi-saas-app/ruoyi-mall/pom.xml deleted file mode 100644 index e4f506466..000000000 --- a/ruoyi-saas-app/ruoyi-mall/pom.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - ruoyi-vue-plus - ruoyi-saas-app - ${revision} - - 4.0.0 - - - ruoyi-mall-admin - ruoyi-mall-common - ruoyi-mall-mbg - - - ruoyi-mall - pom - - - ruoyi-mall 业务模块 - - - diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/pom.xml b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/pom.xml deleted file mode 100644 index 2b3dd0a41..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/pom.xml +++ /dev/null @@ -1,80 +0,0 @@ - - 4.0.0 - - ruoyi-mall-admin - ${revision} - jar - - ruoyi-mall-admin - ruoyi-mall-admin project for mall - - - ruoyi-vue-plus - ruoyi-mall - ${revision} - - - - - com.macro.mall - mall-mbg - - - com.alibaba.cloud - spring-cloud-starter-alibaba-nacos-discovery - - - com.alibaba.cloud - spring-cloud-starter-alibaba-nacos-config - - - org.springframework.boot - spring-boot-starter-data-redis - - - com.aliyun.oss - aliyun-sdk-oss - - - io.minio - minio - - - org.springframework.cloud - spring-cloud-starter-openfeign - - - cn.dev33 - sa-token-spring-boot3-starter - - - cn.dev33 - sa-token-redis-jackson - - - org.apache.commons - commons-pool2 - - - cn.dev33 - sa-token-jwt - - - de.codecentric - spring-boot-admin-starter-client - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - io.fabric8 - docker-maven-plugin - - - - diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/MallAdminApplication.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/MallAdminApplication.java deleted file mode 100644 index 8e1e27be4..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/MallAdminApplication.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.macro.mall; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.cloud.client.discovery.EnableDiscoveryClient; -import org.springframework.cloud.openfeign.EnableFeignClients; - -/** - * 应用启动入口 - * Created by macro on 2018/4/26. - */ -@EnableFeignClients -@EnableDiscoveryClient -@SpringBootApplication -public class MallAdminApplication { - public static void main(String[] args) { - SpringApplication.run(MallAdminApplication.class, args); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/component/PathResourceRulesHolder.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/component/PathResourceRulesHolder.java deleted file mode 100644 index 3b1876c73..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/component/PathResourceRulesHolder.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.macro.mall.component; - -import com.macro.mall.service.UmsResourceService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -import jakarta.annotation.PostConstruct; - -/** - * 路径与资源访问对应关系操作组件 - * Created by macro on 2020/7/17. - */ -@Component -public class PathResourceRulesHolder { - - @Autowired - private UmsResourceService resourceService; - - @PostConstruct - public void initPathResourceMap(){ - resourceService.initPathResourceMap(); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/config/MyBatisConfig.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/config/MyBatisConfig.java deleted file mode 100644 index 11642560a..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/config/MyBatisConfig.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.macro.mall.config; - -import org.mybatis.spring.annotation.MapperScan; -import org.springframework.context.annotation.Configuration; -import org.springframework.transaction.annotation.EnableTransactionManagement; - -/** - * MyBatis相关配置 - * Created by macro on 2019/4/8. - */ -@Configuration -@EnableTransactionManagement -@MapperScan({"com.macro.mall.mapper","com.macro.mall.dao"}) -public class MyBatisConfig { -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/config/OssConfig.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/config/OssConfig.java deleted file mode 100644 index 9f7da2a36..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/config/OssConfig.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.macro.mall.config; - -import com.aliyun.oss.OSSClient; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -/** - * OSS对象存储相关配置 - * Created by macro on 2018/5/17. - */ -@Configuration -public class OssConfig { - @Value("${aliyun.oss.endpoint}") - private String ALIYUN_OSS_ENDPOINT; - @Value("${aliyun.oss.accessKeyId}") - private String ALIYUN_OSS_ACCESSKEYID; - @Value("${aliyun.oss.accessKeySecret}") - private String ALIYUN_OSS_ACCESSKEYSECRET; - @Bean - public OSSClient ossClient(){ - return new OSSClient(ALIYUN_OSS_ENDPOINT,ALIYUN_OSS_ACCESSKEYID,ALIYUN_OSS_ACCESSKEYSECRET); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/config/RedisConfig.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/config/RedisConfig.java deleted file mode 100644 index 90bba12a6..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/config/RedisConfig.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.macro.mall.config; - -import com.macro.mall.common.config.BaseRedisConfig; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.data.redis.connection.RedisConnectionFactory; -import org.springframework.data.redis.core.RedisTemplate; -import org.springframework.data.redis.repository.configuration.EnableRedisRepositories; -import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer; -import org.springframework.data.redis.serializer.StringRedisSerializer; - -/** - * Redis相关配置 - * Created by macro on 2020/6/19. - */ -@Configuration -public class RedisConfig extends BaseRedisConfig { - -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/config/SaTokenConfigure.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/config/SaTokenConfigure.java deleted file mode 100644 index 020d05991..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/config/SaTokenConfigure.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.macro.mall.config; - -import cn.dev33.satoken.jwt.StpLogicJwtForSimple; -import cn.dev33.satoken.stp.StpLogic; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -/** - * @auther macrozheng - * @description Sa-Token相关配置 - * @date 2023/11/28 - * @github https://github.com/macrozheng - */ -@Configuration -public class SaTokenConfigure { - // Sa-Token 整合 jwt (Simple 简单模式) - @Bean - public StpLogic getStpLogicJwt() { - return new StpLogicJwtForSimple(); - } -} - diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/config/SpringDocConfig.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/config/SpringDocConfig.java deleted file mode 100644 index 190aea58b..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/config/SpringDocConfig.java +++ /dev/null @@ -1,68 +0,0 @@ -package com.macro.mall.config; - -import io.swagger.v3.oas.models.Components; -import io.swagger.v3.oas.models.ExternalDocumentation; -import io.swagger.v3.oas.models.OpenAPI; -import io.swagger.v3.oas.models.info.Info; -import io.swagger.v3.oas.models.info.License; -import io.swagger.v3.oas.models.security.SecurityRequirement; -import io.swagger.v3.oas.models.security.SecurityScheme; -import org.springdoc.core.customizers.GlobalOpenApiCustomizer; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; - -/** - * SpringDoc相关配置 - * Created by macro on 2024/3/5. - */ -@Configuration -public class SpringDocConfig implements WebMvcConfigurer { - - private static final String SECURITY_SCHEME_NAME = "Authorization"; - - @Bean - public OpenAPI mallAdminOpenAPI() { - return new OpenAPI() - .info(new Info().title("mall后台系统") - .description("mall后台相关接口文档") - .version("v1.0.0") - .license(new License().name("Apache 2.0") - .url("https://github.com/macrozheng/mall-learning"))) - .externalDocs(new ExternalDocumentation() - .description("SpringBoot实战电商项目mall(60K+Star)全套文档") - .url("http://www.macrozheng.com")) - .addSecurityItem(new SecurityRequirement().addList(SECURITY_SCHEME_NAME)) - .components(new Components() - .addSecuritySchemes(SECURITY_SCHEME_NAME, - new SecurityScheme() - .name(SECURITY_SCHEME_NAME) - .type(SecurityScheme.Type.HTTP) - .scheme("bearer") - .bearerFormat("JWT"))); - } - - @Override - public void addViewControllers(ViewControllerRegistry registry) { - //配置访问`/swagger-ui/`路径时可以直接跳转到`/swagger-ui/index.html` - registry.addViewController("/swagger-ui/").setViewName("redirect:/swagger-ui/index.html"); - } - - @Bean - public GlobalOpenApiCustomizer orderGlobalOpenApiCustomizer() { - //解决Knife4j配置认证后无法自动添加认证头的问题 - return openApi -> { - //全局添加鉴权参数 - if (openApi.getPaths() != null) { - openApi.getPaths().forEach((s, pathItem) -> { - pathItem.readOperations().forEach(operation -> { - operation.addSecurityItem(new SecurityRequirement().addList(SECURITY_SCHEME_NAME)); - }); - }); - } - }; - } - -} - diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/CmsPrefrenceAreaController.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/CmsPrefrenceAreaController.java deleted file mode 100644 index 5dfb965f7..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/CmsPrefrenceAreaController.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.macro.mall.controller; - -import com.macro.mall.common.api.CommonResult; -import com.macro.mall.model.CmsPrefrenceArea; -import com.macro.mall.service.CmsPrefrenceAreaService; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.ResponseBody; - -import java.util.List; - -/** - * 商品优选管理Controller - * Created by macro on 2018/6/1. - */ -@Controller -@Tag(name = "CmsPrefrenceAreaController", description = "商品优选管理") -@RequestMapping("/prefrenceArea") -public class CmsPrefrenceAreaController { - @Autowired - private CmsPrefrenceAreaService prefrenceAreaService; - - @Operation(summary = "获取所有商品优选") - @RequestMapping(value = "/listAll", method = RequestMethod.GET) - @ResponseBody - public CommonResult> listAll() { - List prefrenceAreaList = prefrenceAreaService.listAll(); - return CommonResult.success(prefrenceAreaList); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/CmsSubjectController.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/CmsSubjectController.java deleted file mode 100644 index b037c9837..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/CmsSubjectController.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.macro.mall.controller; - -import com.macro.mall.common.api.CommonPage; -import com.macro.mall.common.api.CommonResult; -import com.macro.mall.model.CmsSubject; -import com.macro.mall.service.CmsSubjectService; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.ResponseBody; - -import java.util.List; - -/** - * 商品专题管理Controller - * Created by macro on 2018/6/1. - */ -@Controller -@Tag(name = "CmsSubjectController", description = "商品专题管理") -@RequestMapping("/subject") -public class CmsSubjectController { - @Autowired - private CmsSubjectService subjectService; - - @Operation(summary = "获取全部商品专题") - @RequestMapping(value = "/listAll", method = RequestMethod.GET) - @ResponseBody - public CommonResult> listAll() { - List subjectList = subjectService.listAll(); - return CommonResult.success(subjectList); - } - - @Operation(summary = "根据专题名称分页获取专题") - @RequestMapping(value = "/list", method = RequestMethod.GET) - @ResponseBody - public CommonResult> getList(@RequestParam(value = "keyword", required = false) String keyword, - @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, - @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize) { - List subjectList = subjectService.list(keyword, pageNum, pageSize); - return CommonResult.success(CommonPage.restPage(subjectList)); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/MinioController.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/MinioController.java deleted file mode 100644 index 3432c3c2f..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/MinioController.java +++ /dev/null @@ -1,115 +0,0 @@ -package com.macro.mall.controller; - -import cn.hutool.core.collection.CollUtil; -import cn.hutool.json.JSONUtil; -import com.macro.mall.common.api.CommonResult; -import com.macro.mall.dto.BucketPolicyConfigDto; -import com.macro.mall.dto.MinioUploadDto; -import io.minio.*; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; - -import java.text.SimpleDateFormat; -import java.util.Date; - -/** - * MinIO对象存储管理 - * Created by macro on 2019/12/25. - */ -@Tag(name = "MinioController", description = "MinIO对象存储管理") -@Controller -@RequestMapping("/minio") -public class MinioController { - - private static final Logger LOGGER = LoggerFactory.getLogger(MinioController.class); - @Value("${minio.endpoint}") - private String ENDPOINT; - @Value("${minio.bucketName}") - private String BUCKET_NAME; - @Value("${minio.accessKey}") - private String ACCESS_KEY; - @Value("${minio.secretKey}") - private String SECRET_KEY; - - @Operation(summary = "文件上传") - @RequestMapping(value = "/upload", method = RequestMethod.POST) - @ResponseBody - public CommonResult upload(@RequestPart("file") MultipartFile file) { - try { - //创建一个MinIO的Java客户端 - MinioClient minioClient =MinioClient.builder() - .endpoint(ENDPOINT) - .credentials(ACCESS_KEY,SECRET_KEY) - .build(); - boolean isExist = minioClient.bucketExists(BucketExistsArgs.builder().bucket(BUCKET_NAME).build()); - if (isExist) { - LOGGER.info("存储桶已经存在!"); - } else { - //创建存储桶并设置只读权限 - minioClient.makeBucket(MakeBucketArgs.builder().bucket(BUCKET_NAME).build()); - BucketPolicyConfigDto bucketPolicyConfigDto = createBucketPolicyConfigDto(BUCKET_NAME); - SetBucketPolicyArgs setBucketPolicyArgs = SetBucketPolicyArgs.builder() - .bucket(BUCKET_NAME) - .config(JSONUtil.toJsonStr(bucketPolicyConfigDto)) - .build(); - minioClient.setBucketPolicy(setBucketPolicyArgs); - } - String filename = file.getOriginalFilename(); - SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); - // 设置存储对象名称 - String objectName = sdf.format(new Date()) + "/" + filename; - // 使用putObject上传一个文件到存储桶中 - PutObjectArgs putObjectArgs = PutObjectArgs.builder() - .bucket(BUCKET_NAME) - .object(objectName) - .contentType(file.getContentType()) - .stream(file.getInputStream(), file.getSize(), ObjectWriteArgs.MIN_MULTIPART_SIZE).build(); - minioClient.putObject(putObjectArgs); - LOGGER.info("文件上传成功!"); - MinioUploadDto minioUploadDto = new MinioUploadDto(); - minioUploadDto.setName(filename); - minioUploadDto.setUrl(ENDPOINT + "/" + BUCKET_NAME + "/" + objectName); - return CommonResult.success(minioUploadDto); - } catch (Exception e) { - e.printStackTrace(); - LOGGER.info("上传发生错误: {}!", e.getMessage()); - } - return CommonResult.failed(); - } - - private BucketPolicyConfigDto createBucketPolicyConfigDto(String bucketName) { - BucketPolicyConfigDto.Statement statement = BucketPolicyConfigDto.Statement.builder() - .Effect("Allow") - .Principal("*") - .Action("s3:GetObject") - .Resource("arn:aws:s3:::"+bucketName+"/*.**").build(); - return BucketPolicyConfigDto.builder() - .Version("2012-10-17") - .Statement(CollUtil.toList(statement)) - .build(); - } - - @Operation(summary = "文件删除") - @RequestMapping(value = "/delete", method = RequestMethod.POST) - @ResponseBody - public CommonResult delete(@RequestParam("objectName") String objectName) { - try { - MinioClient minioClient = MinioClient.builder() - .endpoint(ENDPOINT) - .credentials(ACCESS_KEY,SECRET_KEY) - .build(); - minioClient.removeObject(RemoveObjectArgs.builder().bucket(BUCKET_NAME).object(objectName).build()); - return CommonResult.success(null); - } catch (Exception e) { - e.printStackTrace(); - } - return CommonResult.failed(); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/OmsCompanyAddressController.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/OmsCompanyAddressController.java deleted file mode 100644 index c0149b904..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/OmsCompanyAddressController.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.macro.mall.controller; - -import com.macro.mall.common.api.CommonResult; -import com.macro.mall.model.OmsCompanyAddress; -import com.macro.mall.service.OmsCompanyAddressService; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.ResponseBody; - -import java.util.List; - -/** - * 收货地址管理Controller - * Created by macro on 2018/10/18. - */ -@Controller -@Tag(name = "OmsCompanyAddressController", description = "收货地址管理") -@RequestMapping("/companyAddress") -public class OmsCompanyAddressController { - @Autowired - private OmsCompanyAddressService companyAddressService; - - @Operation(summary = "获取所有收货地址") - @RequestMapping(value = "/list", method = RequestMethod.GET) - @ResponseBody - public CommonResult> list() { - List companyAddressList = companyAddressService.list(); - return CommonResult.success(companyAddressList); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/OmsOrderController.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/OmsOrderController.java deleted file mode 100644 index b2cb42a7d..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/OmsOrderController.java +++ /dev/null @@ -1,113 +0,0 @@ -package com.macro.mall.controller; - -import com.macro.mall.common.api.CommonPage; -import com.macro.mall.common.api.CommonResult; -import com.macro.mall.dto.*; -import com.macro.mall.model.OmsOrder; -import com.macro.mall.service.OmsOrderService; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -/** - * 订单管理Controller - * Created by macro on 2018/10/11. - */ -@Controller -@Tag(name = "OmsOrderController", description = "订单管理") -@RequestMapping("/order") -public class OmsOrderController { - @Autowired - private OmsOrderService orderService; - - @Operation(summary = "查询订单") - @RequestMapping(value = "/list", method = RequestMethod.GET) - @ResponseBody - public CommonResult> list(OmsOrderQueryParam queryParam, - @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize, - @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) { - List orderList = orderService.list(queryParam, pageSize, pageNum); - return CommonResult.success(CommonPage.restPage(orderList)); - } - - @Operation(summary = "批量发货") - @RequestMapping(value = "/update/delivery", method = RequestMethod.POST) - @ResponseBody - public CommonResult delivery(@RequestBody List deliveryParamList) { - int count = orderService.delivery(deliveryParamList); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "批量关闭订单") - @RequestMapping(value = "/update/close", method = RequestMethod.POST) - @ResponseBody - public CommonResult close(@RequestParam("ids") List ids, @RequestParam String note) { - int count = orderService.close(ids, note); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "批量删除订单") - @RequestMapping(value = "/delete", method = RequestMethod.POST) - @ResponseBody - public CommonResult delete(@RequestParam("ids") List ids) { - int count = orderService.delete(ids); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "获取订单详情:订单信息、商品信息、操作记录") - @RequestMapping(value = "/{id}", method = RequestMethod.GET) - @ResponseBody - public CommonResult detail(@PathVariable Long id) { - OmsOrderDetail orderDetailResult = orderService.detail(id); - return CommonResult.success(orderDetailResult); - } - - @Operation(summary = "修改收货人信息") - @RequestMapping(value = "/update/receiverInfo", method = RequestMethod.POST) - @ResponseBody - public CommonResult updateReceiverInfo(@RequestBody OmsReceiverInfoParam receiverInfoParam) { - int count = orderService.updateReceiverInfo(receiverInfoParam); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "修改订单费用信息") - @RequestMapping(value = "/update/moneyInfo", method = RequestMethod.POST) - @ResponseBody - public CommonResult updateReceiverInfo(@RequestBody OmsMoneyInfoParam moneyInfoParam) { - int count = orderService.updateMoneyInfo(moneyInfoParam); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "备注订单") - @RequestMapping(value = "/update/note", method = RequestMethod.POST) - @ResponseBody - public CommonResult updateNote(@RequestParam("id") Long id, - @RequestParam("note") String note, - @RequestParam("status") Integer status) { - int count = orderService.updateNote(id, note, status); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/OmsOrderReturnApplyController.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/OmsOrderReturnApplyController.java deleted file mode 100644 index e2b89af40..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/OmsOrderReturnApplyController.java +++ /dev/null @@ -1,70 +0,0 @@ -package com.macro.mall.controller; - -import com.macro.mall.common.api.CommonPage; -import com.macro.mall.common.api.CommonResult; -import com.macro.mall.dto.OmsOrderReturnApplyResult; -import com.macro.mall.dto.OmsReturnApplyQueryParam; -import com.macro.mall.dto.OmsUpdateStatusParam; -import com.macro.mall.model.OmsOrderReturnApply; -import com.macro.mall.service.OmsOrderReturnApplyService; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -/** - * 订单退货申请管理 - * Created by macro on 2018/10/18. - */ -@Controller -@Tag(name = "OmsOrderReturnApplyController", description = "订单退货申请管理") -@RequestMapping("/returnApply") -public class OmsOrderReturnApplyController { - @Autowired - private OmsOrderReturnApplyService returnApplyService; - - @Operation(summary = "分页查询退货申请") - @RequestMapping(value = "/list", method = RequestMethod.GET) - @ResponseBody - public CommonResult> list(OmsReturnApplyQueryParam queryParam, - @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize, - @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) { - List returnApplyList = returnApplyService.list(queryParam, pageSize, pageNum); - return CommonResult.success(CommonPage.restPage(returnApplyList)); - } - - @Operation(summary = "批量删除申请") - @RequestMapping(value = "/delete", method = RequestMethod.POST) - @ResponseBody - public CommonResult delete(@RequestParam("ids") List ids) { - int count = returnApplyService.delete(ids); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "获取退货申请详情") - @RequestMapping(value = "/{id}", method = RequestMethod.GET) - @ResponseBody - public CommonResult getItem(@PathVariable Long id) { - OmsOrderReturnApplyResult result = returnApplyService.getItem(id); - return CommonResult.success(result); - } - - @Operation(summary = "修改申请状态") - @RequestMapping(value = "/update/status/{id}", method = RequestMethod.POST) - @ResponseBody - public CommonResult updateStatus(@PathVariable Long id, @RequestBody OmsUpdateStatusParam statusParam) { - int count = returnApplyService.updateStatus(id, statusParam); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/OmsOrderReturnReasonController.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/OmsOrderReturnReasonController.java deleted file mode 100644 index 119387f68..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/OmsOrderReturnReasonController.java +++ /dev/null @@ -1,88 +0,0 @@ -package com.macro.mall.controller; - -import com.macro.mall.common.api.CommonPage; -import com.macro.mall.common.api.CommonResult; -import com.macro.mall.model.OmsOrderReturnReason; -import com.macro.mall.service.OmsOrderReturnReasonService; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -/** - * 退货原因管理Controller - * Created by macro on 2018/10/17. - */ -@Controller -@Tag(name = "OmsOrderReturnReasonController", description = "退货原因管理") -@RequestMapping("/returnReason") -public class OmsOrderReturnReasonController { - @Autowired - private OmsOrderReturnReasonService orderReturnReasonService; - - @Operation(summary = "添加退货原因") - @RequestMapping(value = "/create", method = RequestMethod.POST) - @ResponseBody - public CommonResult create(@RequestBody OmsOrderReturnReason returnReason) { - int count = orderReturnReasonService.create(returnReason); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "修改退货原因") - @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) - @ResponseBody - public CommonResult update(@PathVariable Long id, @RequestBody OmsOrderReturnReason returnReason) { - int count = orderReturnReasonService.update(id, returnReason); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "批量删除退货原因") - @RequestMapping(value = "/delete", method = RequestMethod.POST) - @ResponseBody - public CommonResult delete(@RequestParam("ids") List ids) { - int count = orderReturnReasonService.delete(ids); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "分页查询全部退货原因") - @RequestMapping(value = "/list", method = RequestMethod.GET) - @ResponseBody - public CommonResult> list(@RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize, - @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) { - List reasonList = orderReturnReasonService.list(pageSize, pageNum); - return CommonResult.success(CommonPage.restPage(reasonList)); - } - - @Operation(summary = "获取单个退货原因详情信息") - @RequestMapping(value = "/{id}", method = RequestMethod.GET) - @ResponseBody - public CommonResult getItem(@PathVariable Long id) { - OmsOrderReturnReason reason = orderReturnReasonService.getItem(id); - return CommonResult.success(reason); - } - - @Operation(summary = "修改退货原因启用状态") - @RequestMapping(value = "/update/status", method = RequestMethod.POST) - @ResponseBody - public CommonResult updateStatus(@RequestParam(value = "status") Integer status, - @RequestParam("ids") List ids) { - int count = orderReturnReasonService.updateStatus(ids, status); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/OmsOrderSettingController.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/OmsOrderSettingController.java deleted file mode 100644 index be2de563b..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/OmsOrderSettingController.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.macro.mall.controller; - -import com.macro.mall.common.api.CommonResult; -import com.macro.mall.model.OmsOrderSetting; -import com.macro.mall.service.OmsOrderSettingService; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.*; - -/** - * 订单设置Controller - * Created by macro on 2018/10/16. - */ -@Controller -@Tag(name = "OmsOrderSettingController", description = "订单设置管理") -@RequestMapping("/orderSetting") -public class OmsOrderSettingController { - @Autowired - private OmsOrderSettingService orderSettingService; - - @Operation(summary = "获取指定订单设置") - @RequestMapping(value = "/{id}", method = RequestMethod.GET) - @ResponseBody - public CommonResult getItem(@PathVariable Long id) { - OmsOrderSetting orderSetting = orderSettingService.getItem(id); - return CommonResult.success(orderSetting); - } - - @Operation(summary = "修改指定订单设置") - @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) - @ResponseBody - public CommonResult update(@PathVariable Long id, @RequestBody OmsOrderSetting orderSetting) { - int count = orderSettingService.update(id,orderSetting); - if(count>0){ - return CommonResult.success(count); - } - return CommonResult.failed(); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/OssController.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/OssController.java deleted file mode 100644 index 90ae90064..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/OssController.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.macro.mall.controller; - - -import com.macro.mall.common.api.CommonResult; -import com.macro.mall.dto.OssCallbackResult; -import com.macro.mall.dto.OssPolicyResult; -import com.macro.mall.service.impl.OssServiceImpl; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.*; - -import jakarta.servlet.http.HttpServletRequest; - -/** - * Oss相关操作接口 - * Created by macro on 2018/4/26. - */ -@Controller -@Tag(name = "OssController", description = "Oss管理") -@RequestMapping("/aliyun/oss") -public class OssController { - @Autowired - private OssServiceImpl ossService; - - @Operation(summary = "oss上传签名生成") - @RequestMapping(value = "/policy", method = RequestMethod.GET) - @ResponseBody - public CommonResult policy() { - OssPolicyResult result = ossService.policy(); - return CommonResult.success(result); - } - - @Operation(summary = "oss上传成功回调") - @RequestMapping(value = "callback", method = RequestMethod.POST) - @ResponseBody - public CommonResult callback(HttpServletRequest request) { - OssCallbackResult ossCallbackResult = ossService.callback(request); - return CommonResult.success(ossCallbackResult); - } - -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/PmsBrandController.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/PmsBrandController.java deleted file mode 100644 index c9e60cf88..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/PmsBrandController.java +++ /dev/null @@ -1,131 +0,0 @@ -package com.macro.mall.controller; - -import com.macro.mall.common.api.CommonPage; -import com.macro.mall.common.api.CommonResult; -import com.macro.mall.dto.PmsBrandParam; -import com.macro.mall.model.PmsBrand; -import com.macro.mall.service.PmsBrandService; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -/** - * 品牌功能Controller - * Created by macro on 2018/4/26. - */ -@Controller -@Tag(name = "PmsBrandController", description = "商品品牌管理") -@RequestMapping("/brand") -public class PmsBrandController { - @Autowired - private PmsBrandService brandService; - - @Operation(summary = "获取全部品牌列表") - @RequestMapping(value = "/listAll", method = RequestMethod.GET) - @ResponseBody - public CommonResult> getList() { - return CommonResult.success(brandService.listAllBrand()); - } - - @Operation(summary = "添加品牌") - @RequestMapping(value = "/create", method = RequestMethod.POST) - @ResponseBody - public CommonResult create(@Validated @RequestBody PmsBrandParam pmsBrand) { - CommonResult commonResult; - int count = brandService.createBrand(pmsBrand); - if (count == 1) { - commonResult = CommonResult.success(count); - } else { - commonResult = CommonResult.failed(); - } - return commonResult; - } - - @Operation(summary = "更新品牌") - @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) - @ResponseBody - public CommonResult update(@PathVariable("id") Long id, - @Validated @RequestBody PmsBrandParam pmsBrandParam) { - CommonResult commonResult; - int count = brandService.updateBrand(id, pmsBrandParam); - if (count == 1) { - commonResult = CommonResult.success(count); - } else { - commonResult = CommonResult.failed(); - } - return commonResult; - } - - @Operation(summary = "删除品牌") - @RequestMapping(value = "/delete/{id}", method = RequestMethod.GET) - @ResponseBody - public CommonResult delete(@PathVariable("id") Long id) { - int count = brandService.deleteBrand(id); - if (count == 1) { - return CommonResult.success(null); - } else { - return CommonResult.failed(); - } - } - - @Operation(summary = "根据品牌名称分页获取品牌列表") - @RequestMapping(value = "/list", method = RequestMethod.GET) - @ResponseBody - public CommonResult> getList(@RequestParam(value = "keyword", required = false) String keyword, - @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, - @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize) { - List brandList = brandService.listBrand(keyword, pageNum, pageSize); - return CommonResult.success(CommonPage.restPage(brandList)); - } - - @Operation(summary = "根据编号查询品牌信息") - @RequestMapping(value = "/{id}", method = RequestMethod.GET) - @ResponseBody - public CommonResult getItem(@PathVariable("id") Long id) { - return CommonResult.success(brandService.getBrand(id)); - } - - @Operation(summary = "批量删除品牌") - @RequestMapping(value = "/delete/batch", method = RequestMethod.POST) - @ResponseBody - public CommonResult deleteBatch(@RequestParam("ids") List ids) { - int count = brandService.deleteBrand(ids); - if (count > 0) { - return CommonResult.success(count); - } else { - return CommonResult.failed(); - } - } - - @Operation(summary = "批量更新显示状态") - @RequestMapping(value = "/update/showStatus", method = RequestMethod.POST) - @ResponseBody - public CommonResult updateShowStatus(@RequestParam("ids") List ids, - @RequestParam("showStatus") Integer showStatus) { - int count = brandService.updateShowStatus(ids, showStatus); - if (count > 0) { - return CommonResult.success(count); - } else { - return CommonResult.failed(); - } - } - - @Operation(summary = "批量更新厂家制造商状态") - @RequestMapping(value = "/update/factoryStatus", method = RequestMethod.POST) - @ResponseBody - public CommonResult updateFactoryStatus(@RequestParam("ids") List ids, - @RequestParam("factoryStatus") Integer factoryStatus) { - int count = brandService.updateFactoryStatus(ids, factoryStatus); - if (count > 0) { - return CommonResult.success(count); - } else { - return CommonResult.failed(); - } - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/PmsProductAttributeCategoryController.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/PmsProductAttributeCategoryController.java deleted file mode 100644 index 72a23ba93..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/PmsProductAttributeCategoryController.java +++ /dev/null @@ -1,87 +0,0 @@ -package com.macro.mall.controller; - -import com.macro.mall.common.api.CommonPage; -import com.macro.mall.common.api.CommonResult; -import com.macro.mall.dto.PmsProductAttributeCategoryItem; -import com.macro.mall.model.PmsProductAttributeCategory; -import com.macro.mall.service.PmsProductAttributeCategoryService; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -/** - * 商品属性分类Controller - * Created by macro on 2018/4/26. - */ -@Controller -@Tag(name = "PmsProductAttributeCategoryController", description = "商品属性分类管理") -@RequestMapping("/productAttribute/category") -public class PmsProductAttributeCategoryController { - @Autowired - private PmsProductAttributeCategoryService productAttributeCategoryService; - - @Operation(summary = "添加商品属性分类") - @RequestMapping(value = "/create", method = RequestMethod.POST) - @ResponseBody - public CommonResult create(@RequestParam String name) { - int count = productAttributeCategoryService.create(name); - if (count > 0) { - return CommonResult.success(count); - } else { - return CommonResult.failed(); - } - } - - @Operation(summary = "修改商品属性分类") - @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) - @ResponseBody - public CommonResult update(@PathVariable Long id, @RequestParam String name) { - int count = productAttributeCategoryService.update(id, name); - if (count > 0) { - return CommonResult.success(count); - } else { - return CommonResult.failed(); - } - } - - @Operation(summary = "删除单个商品属性分类") - @RequestMapping(value = "/delete/{id}", method = RequestMethod.GET) - @ResponseBody - public CommonResult delete(@PathVariable Long id) { - int count = productAttributeCategoryService.delete(id); - if (count > 0) { - return CommonResult.success(count); - } else { - return CommonResult.failed(); - } - } - - @Operation(summary = "获取单个商品属性分类信息") - @RequestMapping(value = "/{id}", method = RequestMethod.GET) - @ResponseBody - public CommonResult getItem(@PathVariable Long id) { - PmsProductAttributeCategory productAttributeCategory = productAttributeCategoryService.getItem(id); - return CommonResult.success(productAttributeCategory); - } - - @Operation(summary = "分页获取所有商品属性分类") - @RequestMapping(value = "/list", method = RequestMethod.GET) - @ResponseBody - public CommonResult> getList(@RequestParam(defaultValue = "5") Integer pageSize, @RequestParam(defaultValue = "1") Integer pageNum) { - List productAttributeCategoryList = productAttributeCategoryService.getList(pageSize, pageNum); - return CommonResult.success(CommonPage.restPage(productAttributeCategoryList)); - } - - @Operation(summary = "获取所有商品属性分类及其下属性") - @RequestMapping(value = "/list/withAttr", method = RequestMethod.GET) - @ResponseBody - public CommonResult> getListWithAttr() { - List productAttributeCategoryResultList = productAttributeCategoryService.getListWithAttr(); - return CommonResult.success(productAttributeCategoryResultList); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/PmsProductAttributeController.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/PmsProductAttributeController.java deleted file mode 100644 index 8ae3a421c..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/PmsProductAttributeController.java +++ /dev/null @@ -1,95 +0,0 @@ -package com.macro.mall.controller; - -import com.macro.mall.common.api.CommonPage; -import com.macro.mall.common.api.CommonResult; -import com.macro.mall.dto.PmsProductAttributeParam; -import com.macro.mall.dto.ProductAttrInfo; -import com.macro.mall.model.PmsProductAttribute; -import com.macro.mall.service.PmsProductAttributeService; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; -import io.swagger.v3.oas.annotations.Parameters; -import io.swagger.v3.oas.annotations.enums.ParameterIn; -import io.swagger.v3.oas.annotations.media.Schema; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -/** - * 商品属性管理Controller - * Created by macro on 2018/4/26. - */ -@Controller -@Tag(name = "PmsProductAttributeController", description = "商品属性管理") -@RequestMapping("/productAttribute") -public class PmsProductAttributeController { - @Autowired - private PmsProductAttributeService productAttributeService; - - @Operation(summary = "根据分类查询属性列表或参数列表") - @Parameters({@Parameter(name = "type", description = "0表示属性,1表示参数", required = true,in = ParameterIn.QUERY, schema = @Schema(type = "integer"))}) - @RequestMapping(value = "/list/{cid}", method = RequestMethod.GET) - @ResponseBody - public CommonResult> getList(@PathVariable Long cid, - @RequestParam(value = "type") Integer type, - @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize, - @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) { - List productAttributeList = productAttributeService.getList(cid, type, pageSize, pageNum); - return CommonResult.success(CommonPage.restPage(productAttributeList)); - } - - @Operation(summary = "添加商品属性信息") - @RequestMapping(value = "/create", method = RequestMethod.POST) - @ResponseBody - public CommonResult create(@RequestBody PmsProductAttributeParam productAttributeParam) { - int count = productAttributeService.create(productAttributeParam); - if (count > 0) { - return CommonResult.success(count); - } else { - return CommonResult.failed(); - } - } - - @Operation(summary = "修改商品属性信息") - @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) - @ResponseBody - public CommonResult update(@PathVariable Long id, @RequestBody PmsProductAttributeParam productAttributeParam) { - int count = productAttributeService.update(id, productAttributeParam); - if (count > 0) { - return CommonResult.success(count); - } else { - return CommonResult.failed(); - } - } - - @Operation(summary = "查询单个商品属性") - @RequestMapping(value = "/{id}", method = RequestMethod.GET) - @ResponseBody - public CommonResult getItem(@PathVariable Long id) { - PmsProductAttribute productAttribute = productAttributeService.getItem(id); - return CommonResult.success(productAttribute); - } - - @Operation(summary = "批量删除商品属性") - @RequestMapping(value = "/delete", method = RequestMethod.POST) - @ResponseBody - public CommonResult delete(@RequestParam("ids") List ids) { - int count = productAttributeService.delete(ids); - if (count > 0) { - return CommonResult.success(count); - } else { - return CommonResult.failed(); - } - } - - @Operation(summary = "根据商品分类的id获取商品属性及属性分类") - @RequestMapping(value = "/attrInfo/{productCategoryId}", method = RequestMethod.GET) - @ResponseBody - public CommonResult> getAttrInfo(@PathVariable Long productCategoryId) { - List productAttrInfoList = productAttributeService.getProductAttrInfo(productCategoryId); - return CommonResult.success(productAttrInfoList); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/PmsProductCategoryController.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/PmsProductCategoryController.java deleted file mode 100644 index 65a091927..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/PmsProductCategoryController.java +++ /dev/null @@ -1,117 +0,0 @@ -package com.macro.mall.controller; - -import com.macro.mall.common.api.CommonPage; -import com.macro.mall.common.api.CommonResult; -import com.macro.mall.dto.PmsProductCategoryParam; -import com.macro.mall.dto.PmsProductCategoryWithChildrenItem; -import com.macro.mall.model.PmsProductCategory; -import com.macro.mall.service.PmsProductCategoryService; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -/** - * 商品分类模块Controller - * Created by macro on 2018/4/26. - */ -@Controller -@Tag(name = "PmsProductCategoryController", description = "商品分类管理") -@RequestMapping("/productCategory") -public class PmsProductCategoryController { - @Autowired - private PmsProductCategoryService productCategoryService; - - @Operation(summary = "添加产品分类") - @RequestMapping(value = "/create", method = RequestMethod.POST) - @ResponseBody - public CommonResult create(@Validated @RequestBody PmsProductCategoryParam productCategoryParam) { - int count = productCategoryService.create(productCategoryParam); - if (count > 0) { - return CommonResult.success(count); - } else { - return CommonResult.failed(); - } - } - - @Operation(summary = "修改商品分类") - @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) - @ResponseBody - public CommonResult update(@PathVariable Long id, - @Validated - @RequestBody PmsProductCategoryParam productCategoryParam) { - int count = productCategoryService.update(id, productCategoryParam); - if (count > 0) { - return CommonResult.success(count); - } else { - return CommonResult.failed(); - } - } - - @Operation(summary = "分页查询商品分类") - @RequestMapping(value = "/list/{parentId}", method = RequestMethod.GET) - @ResponseBody - public CommonResult> getList(@PathVariable Long parentId, - @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize, - @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) { - List productCategoryList = productCategoryService.getList(parentId, pageSize, pageNum); - return CommonResult.success(CommonPage.restPage(productCategoryList)); - } - - @Operation(summary = "根据id获取商品分类") - @RequestMapping(value = "/{id}", method = RequestMethod.GET) - @ResponseBody - public CommonResult getItem(@PathVariable Long id) { - PmsProductCategory productCategory = productCategoryService.getItem(id); - return CommonResult.success(productCategory); - } - - @Operation(summary = "删除商品分类") - @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST) - @ResponseBody - public CommonResult delete(@PathVariable Long id) { - int count = productCategoryService.delete(id); - if (count > 0) { - return CommonResult.success(count); - } else { - return CommonResult.failed(); - } - } - - @Operation(summary = "修改导航栏显示状态") - @RequestMapping(value = "/update/navStatus", method = RequestMethod.POST) - @ResponseBody - public CommonResult updateNavStatus(@RequestParam("ids") List ids, @RequestParam("navStatus") Integer navStatus) { - int count = productCategoryService.updateNavStatus(ids, navStatus); - if (count > 0) { - return CommonResult.success(count); - } else { - return CommonResult.failed(); - } - } - - @Operation(summary = "修改显示状态") - @RequestMapping(value = "/update/showStatus", method = RequestMethod.POST) - @ResponseBody - public CommonResult updateShowStatus(@RequestParam("ids") List ids, @RequestParam("showStatus") Integer showStatus) { - int count = productCategoryService.updateShowStatus(ids, showStatus); - if (count > 0) { - return CommonResult.success(count); - } else { - return CommonResult.failed(); - } - } - - @Operation(summary = "查询所有一级分类及子分类") - @RequestMapping(value = "/list/withChildren", method = RequestMethod.GET) - @ResponseBody - public CommonResult> listWithChildren() { - List list = productCategoryService.listWithChildren(); - return CommonResult.success(list); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/PmsProductController.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/PmsProductController.java deleted file mode 100644 index 114a26931..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/PmsProductController.java +++ /dev/null @@ -1,145 +0,0 @@ -package com.macro.mall.controller; - -import com.macro.mall.common.api.CommonPage; -import com.macro.mall.common.api.CommonResult; -import com.macro.mall.dto.PmsProductParam; -import com.macro.mall.dto.PmsProductQueryParam; -import com.macro.mall.dto.PmsProductResult; -import com.macro.mall.model.PmsProduct; -import com.macro.mall.service.PmsProductService; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -/** - * 商品管理Controller - * Created by macro on 2018/4/26. - */ -@Controller -@Tag(name = "PmsProductController", description = "商品管理") -@RequestMapping("/product") -public class PmsProductController { - @Autowired - private PmsProductService productService; - - @Operation(summary = "创建商品") - @RequestMapping(value = "/create", method = RequestMethod.POST) - @ResponseBody - public CommonResult create(@RequestBody PmsProductParam productParam) { - int count = productService.create(productParam); - if (count > 0) { - return CommonResult.success(count); - } else { - return CommonResult.failed(); - } - } - - @Operation(summary = "根据商品id获取商品编辑信息") - @RequestMapping(value = "/updateInfo/{id}", method = RequestMethod.GET) - @ResponseBody - public CommonResult getUpdateInfo(@PathVariable Long id) { - PmsProductResult productResult = productService.getUpdateInfo(id); - return CommonResult.success(productResult); - } - - @Operation(summary = "更新商品") - @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) - @ResponseBody - public CommonResult update(@PathVariable Long id, @RequestBody PmsProductParam productParam) { - int count = productService.update(id, productParam); - if (count > 0) { - return CommonResult.success(count); - } else { - return CommonResult.failed(); - } - } - - @Operation(summary = "查询商品") - @RequestMapping(value = "/list", method = RequestMethod.GET) - @ResponseBody - public CommonResult> getList(PmsProductQueryParam productQueryParam, - @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize, - @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) { - List productList = productService.list(productQueryParam, pageSize, pageNum); - return CommonResult.success(CommonPage.restPage(productList)); - } - - @Operation(summary = "根据商品名称或货号模糊查询") - @RequestMapping(value = "/simpleList", method = RequestMethod.GET) - @ResponseBody - public CommonResult> getList(String keyword) { - List productList = productService.list(keyword); - return CommonResult.success(productList); - } - - @Operation(summary = "批量修改审核状态") - @RequestMapping(value = "/update/verifyStatus", method = RequestMethod.POST) - @ResponseBody - public CommonResult updateVerifyStatus(@RequestParam("ids") List ids, - @RequestParam("verifyStatus") Integer verifyStatus, - @RequestParam("detail") String detail) { - int count = productService.updateVerifyStatus(ids, verifyStatus, detail); - if (count > 0) { - return CommonResult.success(count); - } else { - return CommonResult.failed(); - } - } - - @Operation(summary = "批量上下架") - @RequestMapping(value = "/update/publishStatus", method = RequestMethod.POST) - @ResponseBody - public CommonResult updatePublishStatus(@RequestParam("ids") List ids, - @RequestParam("publishStatus") Integer publishStatus) { - int count = productService.updatePublishStatus(ids, publishStatus); - if (count > 0) { - return CommonResult.success(count); - } else { - return CommonResult.failed(); - } - } - - @Operation(summary = "批量推荐商品") - @RequestMapping(value = "/update/recommendStatus", method = RequestMethod.POST) - @ResponseBody - public CommonResult updateRecommendStatus(@RequestParam("ids") List ids, - @RequestParam("recommendStatus") Integer recommendStatus) { - int count = productService.updateRecommendStatus(ids, recommendStatus); - if (count > 0) { - return CommonResult.success(count); - } else { - return CommonResult.failed(); - } - } - - @Operation(summary = "批量设为新品") - @RequestMapping(value = "/update/newStatus", method = RequestMethod.POST) - @ResponseBody - public CommonResult updateNewStatus(@RequestParam("ids") List ids, - @RequestParam("newStatus") Integer newStatus) { - int count = productService.updateNewStatus(ids, newStatus); - if (count > 0) { - return CommonResult.success(count); - } else { - return CommonResult.failed(); - } - } - - @Operation(summary = "批量修改删除状态") - @RequestMapping(value = "/update/deleteStatus", method = RequestMethod.POST) - @ResponseBody - public CommonResult updateDeleteStatus(@RequestParam("ids") List ids, - @RequestParam("deleteStatus") Integer deleteStatus) { - int count = productService.updateDeleteStatus(ids, deleteStatus); - if (count > 0) { - return CommonResult.success(count); - } else { - return CommonResult.failed(); - } - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/PmsSkuStockController.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/PmsSkuStockController.java deleted file mode 100644 index 44c0adf43..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/PmsSkuStockController.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.macro.mall.controller; - -import com.macro.mall.common.api.CommonResult; -import com.macro.mall.model.PmsSkuStock; -import com.macro.mall.service.PmsSkuStockService; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -/** - * sku库存Controller - * Created by macro on 2018/4/27. - */ -@Controller -@Tag(name = "PmsSkuStockController", description = "sku商品库存管理") -@RequestMapping("/sku") -public class PmsSkuStockController { - @Autowired - private PmsSkuStockService skuStockService; - - @Operation(summary = "根据商品编号及编号模糊搜索sku库存") - @RequestMapping(value = "/{pid}", method = RequestMethod.GET) - @ResponseBody - public CommonResult> getList(@PathVariable Long pid, @RequestParam(value = "keyword",required = false) String keyword) { - List skuStockList = skuStockService.getList(pid, keyword); - return CommonResult.success(skuStockList); - } - @Operation(summary = "批量更新库存信息") - @RequestMapping(value ="/update/{pid}",method = RequestMethod.POST) - @ResponseBody - public CommonResult update(@PathVariable Long pid,@RequestBody List skuStockList){ - int count = skuStockService.update(pid,skuStockList); - if(count>0){ - return CommonResult.success(count); - }else{ - return CommonResult.failed(); - } - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/SmsCouponController.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/SmsCouponController.java deleted file mode 100644 index 044a32833..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/SmsCouponController.java +++ /dev/null @@ -1,79 +0,0 @@ -package com.macro.mall.controller; - -import com.macro.mall.common.api.CommonPage; -import com.macro.mall.common.api.CommonResult; -import com.macro.mall.dto.SmsCouponParam; -import com.macro.mall.model.SmsCoupon; -import com.macro.mall.service.SmsCouponService; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -/** - * 优惠券管理Controller - * Created by macro on 2018/8/28. - */ -@Controller -@Tag(name = "SmsCouponController", description = "优惠券管理") -@RequestMapping("/coupon") -public class SmsCouponController { - @Autowired - private SmsCouponService couponService; - @Operation(summary = "添加优惠券") - @RequestMapping(value = "/create", method = RequestMethod.POST) - @ResponseBody - public CommonResult add(@RequestBody SmsCouponParam couponParam) { - int count = couponService.create(couponParam); - if(count>0){ - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "删除优惠券") - @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST) - @ResponseBody - public CommonResult delete(@PathVariable Long id) { - int count = couponService.delete(id); - if(count>0){ - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "修改优惠券") - @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) - @ResponseBody - public CommonResult update(@PathVariable Long id,@RequestBody SmsCouponParam couponParam) { - int count = couponService.update(id,couponParam); - if(count>0){ - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "根据优惠券名称和类型分页获取优惠券列表") - @RequestMapping(value = "/list", method = RequestMethod.GET) - @ResponseBody - public CommonResult> list( - @RequestParam(value = "name",required = false) String name, - @RequestParam(value = "type",required = false) Integer type, - @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize, - @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) { - List couponList = couponService.list(name,type,pageSize,pageNum); - return CommonResult.success(CommonPage.restPage(couponList)); - } - - @Operation(summary = "获取单个优惠券的详细信息") - @RequestMapping(value = "/{id}", method = RequestMethod.GET) - @ResponseBody - public CommonResult getItem(@PathVariable Long id) { - SmsCouponParam couponParam = couponService.getItem(id); - return CommonResult.success(couponParam); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/SmsCouponHistoryController.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/SmsCouponHistoryController.java deleted file mode 100644 index 324d1cbba..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/SmsCouponHistoryController.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.macro.mall.controller; - -import com.macro.mall.common.api.CommonPage; -import com.macro.mall.common.api.CommonResult; -import com.macro.mall.model.SmsCouponHistory; -import com.macro.mall.service.SmsCouponHistoryService; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.ResponseBody; - -import java.util.List; - -/** - * 优惠券领取记录管理Controller - * Created by macro on 2018/11/6. - */ -@Controller -@Tag(name = "SmsCouponHistoryController", description = "优惠券领取记录管理") -@RequestMapping("/couponHistory") -public class SmsCouponHistoryController { - @Autowired - private SmsCouponHistoryService historyService; - - @Operation(summary = "根据优惠券id,使用状态,订单编号分页获取领取记录") - @RequestMapping(value = "/list", method = RequestMethod.GET) - @ResponseBody - public CommonResult> list(@RequestParam(value = "couponId", required = false) Long couponId, - @RequestParam(value = "useStatus", required = false) Integer useStatus, - @RequestParam(value = "orderSn", required = false) String orderSn, - @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize, - @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) { - List historyList = historyService.list(couponId, useStatus, orderSn, pageSize, pageNum); - return CommonResult.success(CommonPage.restPage(historyList)); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/SmsFlashPromotionController.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/SmsFlashPromotionController.java deleted file mode 100644 index 6e0068e16..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/SmsFlashPromotionController.java +++ /dev/null @@ -1,87 +0,0 @@ -package com.macro.mall.controller; - -import com.macro.mall.common.api.CommonPage; -import com.macro.mall.common.api.CommonResult; -import com.macro.mall.model.SmsFlashPromotion; -import com.macro.mall.service.SmsFlashPromotionService; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -/** - * 限时购活动管理Controller - * Created by macro on 2018/11/16. - */ -@Controller -@Tag(name = "SmsFlashPromotionController", description = "限时购活动管理") -@RequestMapping("/flash") -public class SmsFlashPromotionController { - @Autowired - private SmsFlashPromotionService flashPromotionService; - - @Operation(summary = "添加活动") - @RequestMapping(value = "/create", method = RequestMethod.POST) - @ResponseBody - public CommonResult create(@RequestBody SmsFlashPromotion flashPromotion) { - int count = flashPromotionService.create(flashPromotion); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "编辑活动信息") - @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) - @ResponseBody - public Object update(@PathVariable Long id, @RequestBody SmsFlashPromotion flashPromotion) { - int count = flashPromotionService.update(id, flashPromotion); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "删除活动信息") - @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST) - @ResponseBody - public Object delete(@PathVariable Long id) { - int count = flashPromotionService.delete(id); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "修改上下线状态") - @RequestMapping(value = "/update/status/{id}", method = RequestMethod.POST) - @ResponseBody - public Object update(@PathVariable Long id, Integer status) { - int count = flashPromotionService.updateStatus(id, status); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "获取活动详情") - @RequestMapping(value = "/{id}", method = RequestMethod.GET) - @ResponseBody - public Object getItem(@PathVariable Long id) { - SmsFlashPromotion flashPromotion = flashPromotionService.getItem(id); - return CommonResult.success(flashPromotion); - } - - @Operation(summary = "根据活动名称分页查询") - @RequestMapping(value = "/list", method = RequestMethod.GET) - @ResponseBody - public Object getItem(@RequestParam(value = "keyword", required = false) String keyword, - @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize, - @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) { - List flashPromotionList = flashPromotionService.list(keyword, pageSize, pageNum); - return CommonResult.success(CommonPage.restPage(flashPromotionList)); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/SmsFlashPromotionProductRelationController.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/SmsFlashPromotionProductRelationController.java deleted file mode 100644 index 7f86e4159..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/SmsFlashPromotionProductRelationController.java +++ /dev/null @@ -1,79 +0,0 @@ -package com.macro.mall.controller; - -import com.macro.mall.common.api.CommonPage; -import com.macro.mall.common.api.CommonResult; -import com.macro.mall.dto.SmsFlashPromotionProduct; -import com.macro.mall.model.SmsFlashPromotionProductRelation; -import com.macro.mall.service.SmsFlashPromotionProductRelationService; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -/** - * 限时购和商品关系管理Controller - * Created by macro on 2018/11/16. - */ -@Controller -@Tag(name = "SmsFlashPromotionProductRelationController", description = "限时购和商品关系管理") -@RequestMapping("/flashProductRelation") -public class SmsFlashPromotionProductRelationController { - @Autowired - private SmsFlashPromotionProductRelationService relationService; - - @Operation(summary = "批量选择商品添加关联") - @RequestMapping(value = "/create", method = RequestMethod.POST) - @ResponseBody - public CommonResult create(@RequestBody List relationList) { - int count = relationService.create(relationList); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "修改关联相关信息") - @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) - @ResponseBody - public CommonResult update(@PathVariable Long id, @RequestBody SmsFlashPromotionProductRelation relation) { - int count = relationService.update(id, relation); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "删除关联") - @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST) - @ResponseBody - public CommonResult delete(@PathVariable Long id) { - int count = relationService.delete(id); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "获取管理商品促销信息") - @RequestMapping(value = "/{id}", method = RequestMethod.GET) - @ResponseBody - public CommonResult getItem(@PathVariable Long id) { - SmsFlashPromotionProductRelation relation = relationService.getItem(id); - return CommonResult.success(relation); - } - - @Operation(summary = "分页查询不同场次关联及商品信息") - @RequestMapping(value = "/list", method = RequestMethod.GET) - @ResponseBody - public CommonResult> list(@RequestParam(value = "flashPromotionId") Long flashPromotionId, - @RequestParam(value = "flashPromotionSessionId") Long flashPromotionSessionId, - @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize, - @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) { - List flashPromotionProductList = relationService.list(flashPromotionId, flashPromotionSessionId, pageSize, pageNum); - return CommonResult.success(CommonPage.restPage(flashPromotionProductList)); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/SmsFlashPromotionSessionController.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/SmsFlashPromotionSessionController.java deleted file mode 100644 index d6384da90..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/SmsFlashPromotionSessionController.java +++ /dev/null @@ -1,94 +0,0 @@ -package com.macro.mall.controller; - -import com.macro.mall.common.api.CommonResult; -import com.macro.mall.dto.SmsFlashPromotionSessionDetail; -import com.macro.mall.model.SmsFlashPromotionSession; -import com.macro.mall.service.SmsFlashPromotionSessionService; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -/** - * 限时购场次管理Controller - * Created by macro on 2018/11/16. - */ -@Controller -@Tag(name = "SmsFlashPromotionSessionController", description = "限时购场次管理") -@RequestMapping("/flashSession") -public class SmsFlashPromotionSessionController { - @Autowired - private SmsFlashPromotionSessionService flashPromotionSessionService; - - @Operation(summary = "添加场次") - @RequestMapping(value = "/create", method = RequestMethod.POST) - @ResponseBody - public CommonResult create(@RequestBody SmsFlashPromotionSession promotionSession) { - int count = flashPromotionSessionService.create(promotionSession); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "修改场次") - @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) - @ResponseBody - public CommonResult update(@PathVariable Long id, @RequestBody SmsFlashPromotionSession promotionSession) { - int count = flashPromotionSessionService.update(id, promotionSession); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "修改启用状态") - @RequestMapping(value = "/update/status/{id}", method = RequestMethod.POST) - @ResponseBody - public CommonResult updateStatus(@PathVariable Long id, Integer status) { - int count = flashPromotionSessionService.updateStatus(id, status); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "删除场次") - @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST) - @ResponseBody - public CommonResult delete(@PathVariable Long id) { - int count = flashPromotionSessionService.delete(id); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "获取场次详情") - @RequestMapping(value = "/{id}", method = RequestMethod.GET) - @ResponseBody - public CommonResult getItem(@PathVariable Long id) { - SmsFlashPromotionSession promotionSession = flashPromotionSessionService.getItem(id); - return CommonResult.success(promotionSession); - } - - @Operation(summary = "获取全部场次") - @RequestMapping(value = "/list", method = RequestMethod.GET) - @ResponseBody - public CommonResult> list() { - List promotionSessionList = flashPromotionSessionService.list(); - return CommonResult.success(promotionSessionList); - } - - @Operation(summary = "获取全部可选场次及其数量") - @RequestMapping(value = "/selectList", method = RequestMethod.GET) - @ResponseBody - public CommonResult> selectList(Long flashPromotionId) { - List promotionSessionList = flashPromotionSessionService.selectList(flashPromotionId); - return CommonResult.success(promotionSessionList); - } -} \ No newline at end of file diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/SmsHomeAdvertiseController.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/SmsHomeAdvertiseController.java deleted file mode 100644 index e019b634d..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/SmsHomeAdvertiseController.java +++ /dev/null @@ -1,86 +0,0 @@ -package com.macro.mall.controller; - -import com.macro.mall.common.api.CommonPage; -import com.macro.mall.common.api.CommonResult; -import com.macro.mall.model.SmsHomeAdvertise; -import com.macro.mall.service.SmsHomeAdvertiseService; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -/** - * 首页轮播广告管理Controller - * Created by macro on 2018/11/7. - */ -@Controller -@Tag(name = "SmsHomeAdvertiseController", description = "首页轮播广告管理") -@RequestMapping("/home/advertise") -public class SmsHomeAdvertiseController { - @Autowired - private SmsHomeAdvertiseService advertiseService; - - @Operation(summary = "添加广告") - @RequestMapping(value = "/create", method = RequestMethod.POST) - @ResponseBody - public CommonResult create(@RequestBody SmsHomeAdvertise advertise) { - int count = advertiseService.create(advertise); - if (count > 0) - return CommonResult.success(count); - return CommonResult.failed(); - } - - @Operation(summary = "删除广告") - @RequestMapping(value = "/delete", method = RequestMethod.POST) - @ResponseBody - public CommonResult delete(@RequestParam("ids") List ids) { - int count = advertiseService.delete(ids); - if (count > 0) - return CommonResult.success(count); - return CommonResult.failed(); - } - - @Operation(summary = "修改上下线状态") - @RequestMapping(value = "/update/status/{id}", method = RequestMethod.POST) - @ResponseBody - public CommonResult updateStatus(@PathVariable Long id, Integer status) { - int count = advertiseService.updateStatus(id, status); - if (count > 0) - return CommonResult.success(count); - return CommonResult.failed(); - } - - @Operation(summary = "获取广告详情") - @RequestMapping(value = "/{id}", method = RequestMethod.GET) - @ResponseBody - public CommonResult getItem(@PathVariable Long id) { - SmsHomeAdvertise advertise = advertiseService.getItem(id); - return CommonResult.success(advertise); - } - - @Operation(summary = "修改广告") - @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) - @ResponseBody - public CommonResult update(@PathVariable Long id, @RequestBody SmsHomeAdvertise advertise) { - int count = advertiseService.update(id, advertise); - if (count > 0) - return CommonResult.success(count); - return CommonResult.failed(); - } - - @Operation(summary = "分页查询广告") - @RequestMapping(value = "/list", method = RequestMethod.GET) - @ResponseBody - public CommonResult> list(@RequestParam(value = "name", required = false) String name, - @RequestParam(value = "type", required = false) Integer type, - @RequestParam(value = "endTime", required = false) String endTime, - @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize, - @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) { - List advertiseList = advertiseService.list(name, type, endTime, pageSize, pageNum); - return CommonResult.success(CommonPage.restPage(advertiseList)); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/SmsHomeBrandController.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/SmsHomeBrandController.java deleted file mode 100644 index 8e20caa19..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/SmsHomeBrandController.java +++ /dev/null @@ -1,81 +0,0 @@ -package com.macro.mall.controller; - -import com.macro.mall.common.api.CommonPage; -import com.macro.mall.common.api.CommonResult; -import com.macro.mall.model.SmsHomeBrand; -import com.macro.mall.service.SmsHomeBrandService; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -/** - * 首页品牌管理Controller - * Created by macro on 2018/11/6. - */ -@Controller -@Tag(name = "SmsHomeBrandController", description = "首页品牌管理") -@RequestMapping("/home/brand") -public class SmsHomeBrandController { - @Autowired - private SmsHomeBrandService homeBrandService; - - @Operation(summary = "添加首页推荐品牌") - @RequestMapping(value = "/create", method = RequestMethod.POST) - @ResponseBody - public CommonResult create(@RequestBody List homeBrandList) { - int count = homeBrandService.create(homeBrandList); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "修改品牌排序") - @RequestMapping(value = "/update/sort/{id}", method = RequestMethod.POST) - @ResponseBody - public CommonResult updateSort(@PathVariable Long id, Integer sort) { - int count = homeBrandService.updateSort(id, sort); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "批量删除推荐品牌") - @RequestMapping(value = "/delete", method = RequestMethod.POST) - @ResponseBody - public CommonResult delete(@RequestParam("ids") List ids) { - int count = homeBrandService.delete(ids); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "批量修改推荐状态") - @RequestMapping(value = "/update/recommendStatus", method = RequestMethod.POST) - @ResponseBody - public CommonResult updateRecommendStatus(@RequestParam("ids") List ids, @RequestParam Integer recommendStatus) { - int count = homeBrandService.updateRecommendStatus(ids, recommendStatus); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "分页查询推荐品牌") - @RequestMapping(value = "/list", method = RequestMethod.GET) - @ResponseBody - public CommonResult> list(@RequestParam(value = "brandName", required = false) String brandName, - @RequestParam(value = "recommendStatus", required = false) Integer recommendStatus, - @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize, - @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) { - List homeBrandList = homeBrandService.list(brandName, recommendStatus, pageSize, pageNum); - return CommonResult.success(CommonPage.restPage(homeBrandList)); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/SmsHomeNewProductController.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/SmsHomeNewProductController.java deleted file mode 100644 index 2369160b7..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/SmsHomeNewProductController.java +++ /dev/null @@ -1,81 +0,0 @@ -package com.macro.mall.controller; - -import com.macro.mall.common.api.CommonPage; -import com.macro.mall.common.api.CommonResult; -import com.macro.mall.model.SmsHomeNewProduct; -import com.macro.mall.service.SmsHomeNewProductService; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -/** - * 首页新品管理Controller - * Created by macro on 2018/11/6. - */ -@Controller -@Tag(name = "SmsHomeNewProductController", description = "首页新品管理") -@RequestMapping("/home/newProduct") -public class SmsHomeNewProductController { - @Autowired - private SmsHomeNewProductService homeNewProductService; - - @Operation(summary = "添加首页推荐品牌") - @RequestMapping(value = "/create", method = RequestMethod.POST) - @ResponseBody - public CommonResult create(@RequestBody List homeBrandList) { - int count = homeNewProductService.create(homeBrandList); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "修改推荐排序") - @RequestMapping(value = "/update/sort/{id}", method = RequestMethod.POST) - @ResponseBody - public CommonResult updateSort(@PathVariable Long id, Integer sort) { - int count = homeNewProductService.updateSort(id, sort); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "批量删除推荐") - @RequestMapping(value = "/delete", method = RequestMethod.POST) - @ResponseBody - public CommonResult delete(@RequestParam("ids") List ids) { - int count = homeNewProductService.delete(ids); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "批量修改推荐状态") - @RequestMapping(value = "/update/recommendStatus", method = RequestMethod.POST) - @ResponseBody - public CommonResult updateRecommendStatus(@RequestParam("ids") List ids, @RequestParam Integer recommendStatus) { - int count = homeNewProductService.updateRecommendStatus(ids, recommendStatus); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "分页查询推荐") - @RequestMapping(value = "/list", method = RequestMethod.GET) - @ResponseBody - public CommonResult> list(@RequestParam(value = "productName", required = false) String productName, - @RequestParam(value = "recommendStatus", required = false) Integer recommendStatus, - @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize, - @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) { - List homeBrandList = homeNewProductService.list(productName, recommendStatus, pageSize, pageNum); - return CommonResult.success(CommonPage.restPage(homeBrandList)); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/SmsHomeRecommendProductController.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/SmsHomeRecommendProductController.java deleted file mode 100644 index 112757096..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/SmsHomeRecommendProductController.java +++ /dev/null @@ -1,81 +0,0 @@ -package com.macro.mall.controller; - -import com.macro.mall.common.api.CommonPage; -import com.macro.mall.common.api.CommonResult; -import com.macro.mall.model.SmsHomeRecommendProduct; -import com.macro.mall.service.SmsHomeRecommendProductService; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -/** - * 首页人气推荐管理Controller - * Created by macro on 2018/11/6. - */ -@Controller -@Tag(name = "SmsHomeRecommendProductController", description = "首页人气推荐管理") -@RequestMapping("/home/recommendProduct") -public class SmsHomeRecommendProductController { - @Autowired - private SmsHomeRecommendProductService recommendProductService; - - @Operation(summary = "添加首页推荐") - @RequestMapping(value = "/create", method = RequestMethod.POST) - @ResponseBody - public CommonResult create(@RequestBody List homeBrandList) { - int count = recommendProductService.create(homeBrandList); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "修改推荐排序") - @RequestMapping(value = "/update/sort/{id}", method = RequestMethod.POST) - @ResponseBody - public CommonResult updateSort(@PathVariable Long id, Integer sort) { - int count = recommendProductService.updateSort(id, sort); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "批量删除推荐") - @RequestMapping(value = "/delete", method = RequestMethod.POST) - @ResponseBody - public CommonResult delete(@RequestParam("ids") List ids) { - int count = recommendProductService.delete(ids); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "批量修改推荐状态") - @RequestMapping(value = "/update/recommendStatus", method = RequestMethod.POST) - @ResponseBody - public CommonResult updateRecommendStatus(@RequestParam("ids") List ids, @RequestParam Integer recommendStatus) { - int count = recommendProductService.updateRecommendStatus(ids, recommendStatus); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "分页查询推荐") - @RequestMapping(value = "/list", method = RequestMethod.GET) - @ResponseBody - public CommonResult> list(@RequestParam(value = "productName", required = false) String productName, - @RequestParam(value = "recommendStatus", required = false) Integer recommendStatus, - @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize, - @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) { - List homeBrandList = recommendProductService.list(productName, recommendStatus, pageSize, pageNum); - return CommonResult.success(CommonPage.restPage(homeBrandList)); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/SmsHomeRecommendSubjectController.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/SmsHomeRecommendSubjectController.java deleted file mode 100644 index ca3b4898f..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/SmsHomeRecommendSubjectController.java +++ /dev/null @@ -1,81 +0,0 @@ -package com.macro.mall.controller; - -import com.macro.mall.common.api.CommonPage; -import com.macro.mall.common.api.CommonResult; -import com.macro.mall.model.SmsHomeRecommendSubject; -import com.macro.mall.service.SmsHomeRecommendSubjectService; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -/** - * 首页专题推荐管理Controller - * Created by macro on 2018/11/6. - */ -@Controller -@Tag(name = "SmsHomeRecommendSubjectController", description = "首页专题推荐管理") -@RequestMapping("/home/recommendSubject") -public class SmsHomeRecommendSubjectController { - @Autowired - private SmsHomeRecommendSubjectService recommendSubjectService; - - @Operation(summary = "添加首页推荐专题") - @RequestMapping(value = "/create", method = RequestMethod.POST) - @ResponseBody - public CommonResult create(@RequestBody List homeBrandList) { - int count = recommendSubjectService.create(homeBrandList); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "修改推荐排序") - @RequestMapping(value = "/update/sort/{id}", method = RequestMethod.POST) - @ResponseBody - public CommonResult updateSort(@PathVariable Long id, Integer sort) { - int count = recommendSubjectService.updateSort(id, sort); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "批量删除推荐") - @RequestMapping(value = "/delete", method = RequestMethod.POST) - @ResponseBody - public CommonResult delete(@RequestParam("ids") List ids) { - int count = recommendSubjectService.delete(ids); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "批量修改推荐状态") - @RequestMapping(value = "/update/recommendStatus", method = RequestMethod.POST) - @ResponseBody - public CommonResult updateRecommendStatus(@RequestParam("ids") List ids, @RequestParam Integer recommendStatus) { - int count = recommendSubjectService.updateRecommendStatus(ids, recommendStatus); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "分页查询推荐") - @RequestMapping(value = "/list", method = RequestMethod.GET) - @ResponseBody - public CommonResult> list(@RequestParam(value = "subjectName", required = false) String subjectName, - @RequestParam(value = "recommendStatus", required = false) Integer recommendStatus, - @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize, - @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) { - List homeBrandList = recommendSubjectService.list(subjectName, recommendStatus, pageSize, pageNum); - return CommonResult.success(CommonPage.restPage(homeBrandList)); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/UmsAdminController.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/UmsAdminController.java deleted file mode 100644 index 4d400d3f8..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/UmsAdminController.java +++ /dev/null @@ -1,183 +0,0 @@ -package com.macro.mall.controller; - -import cn.dev33.satoken.stp.SaTokenInfo; -import cn.hutool.core.collection.CollUtil; -import com.macro.mall.common.api.CommonPage; -import com.macro.mall.common.api.CommonResult; -import com.macro.mall.dto.UmsAdminLoginParam; -import com.macro.mall.dto.UmsAdminParam; -import com.macro.mall.dto.UpdateAdminPasswordParam; -import com.macro.mall.model.UmsAdmin; -import com.macro.mall.model.UmsRole; -import com.macro.mall.service.UmsAdminService; -import com.macro.mall.service.UmsRoleService; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Controller; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; - -/** - * 后台用户管理 - * Created by macro on 2018/4/26. - */ -@Controller -@Tag(name = "UmsAdminController", description = "后台用户管理") -@RequestMapping("/admin") -public class UmsAdminController { - @Autowired - private UmsAdminService adminService; - @Autowired - private UmsRoleService roleService; - @Value("${sa-token.token-prefix}") - private String tokenHead; - - @Operation(summary = "用户注册") - @RequestMapping(value = "/register", method = RequestMethod.POST) - @ResponseBody - public CommonResult register(@Validated @RequestBody UmsAdminParam umsAdminParam) { - UmsAdmin umsAdmin = adminService.register(umsAdminParam); - if (umsAdmin == null) { - return CommonResult.failed(); - } - return CommonResult.success(umsAdmin); - } - - @Operation(summary = "登录以后返回token") - @RequestMapping(value = "/login", method = RequestMethod.POST) - @ResponseBody - public CommonResult login(@Validated @RequestBody UmsAdminLoginParam umsAdminLoginParam) { - SaTokenInfo saTokenInfo = adminService.login(umsAdminLoginParam.getUsername(), umsAdminLoginParam.getPassword()); - if (saTokenInfo == null) { - return CommonResult.validateFailed("用户名或密码错误"); - } - Map tokenMap = new HashMap<>(); - tokenMap.put("token", saTokenInfo.getTokenValue() ); - tokenMap.put("tokenHead", tokenHead+" "); - return CommonResult.success(tokenMap); - } - - @Operation(summary = "获取当前登录用户信息") - @RequestMapping(value = "/info", method = RequestMethod.GET) - @ResponseBody - public CommonResult getAdminInfo() { - UmsAdmin umsAdmin = adminService.getCurrentAdmin(); - Map data = new HashMap<>(); - data.put("username", umsAdmin.getUsername()); - data.put("menus", roleService.getMenuList(umsAdmin.getId())); - data.put("icon", umsAdmin.getIcon()); - List roleList = adminService.getRoleList(umsAdmin.getId()); - if(CollUtil.isNotEmpty(roleList)){ - List roles = roleList.stream().map(UmsRole::getName).collect(Collectors.toList()); - data.put("roles",roles); - } - return CommonResult.success(data); - } - - @Operation(summary = "登出功能") - @RequestMapping(value = "/logout", method = RequestMethod.POST) - @ResponseBody - public CommonResult logout() { - adminService.logout(); - return CommonResult.success(null); - } - - @Operation(summary = "根据用户名或姓名分页获取用户列表") - @RequestMapping(value = "/list", method = RequestMethod.GET) - @ResponseBody - public CommonResult> list(@RequestParam(value = "keyword", required = false) String keyword, - @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize, - @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) { - List adminList = adminService.list(keyword, pageSize, pageNum); - return CommonResult.success(CommonPage.restPage(adminList)); - } - - @Operation(summary = "获取指定用户信息") - @RequestMapping(value = "/{id}", method = RequestMethod.GET) - @ResponseBody - public CommonResult getItem(@PathVariable Long id) { - UmsAdmin admin = adminService.getItem(id); - return CommonResult.success(admin); - } - - @Operation(summary = "修改指定用户信息") - @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) - @ResponseBody - public CommonResult update(@PathVariable Long id, @RequestBody UmsAdmin admin) { - int count = adminService.update(id, admin); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "修改指定用户密码") - @RequestMapping(value = "/updatePassword", method = RequestMethod.POST) - @ResponseBody - public CommonResult updatePassword(@RequestBody UpdateAdminPasswordParam updatePasswordParam) { - int status = adminService.updatePassword(updatePasswordParam); - if (status > 0) { - return CommonResult.success(status); - } else if (status == -1) { - return CommonResult.failed("提交参数不合法"); - } else if (status == -2) { - return CommonResult.failed("找不到该用户"); - } else if (status == -3) { - return CommonResult.failed("旧密码错误"); - } else { - return CommonResult.failed(); - } - } - - @Operation(summary = "删除指定用户信息") - @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST) - @ResponseBody - public CommonResult delete(@PathVariable Long id) { - int count = adminService.delete(id); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "修改帐号状态") - @RequestMapping(value = "/updateStatus/{id}", method = RequestMethod.POST) - @ResponseBody - public CommonResult updateStatus(@PathVariable Long id,@RequestParam(value = "status") Integer status) { - UmsAdmin umsAdmin = new UmsAdmin(); - umsAdmin.setStatus(status); - int count = adminService.update(id,umsAdmin); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "给用户分配角色") - @RequestMapping(value = "/role/update", method = RequestMethod.POST) - @ResponseBody - public CommonResult updateRole(@RequestParam("adminId") Long adminId, - @RequestParam("roleIds") List roleIds) { - int count = adminService.updateRole(adminId, roleIds); - if (count >= 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "获取指定用户的角色") - @RequestMapping(value = "/role/{adminId}", method = RequestMethod.GET) - @ResponseBody - public CommonResult> getRoleList(@PathVariable Long adminId) { - List roleList = adminService.getRoleList(adminId); - return CommonResult.success(roleList); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/UmsMemberLevelController.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/UmsMemberLevelController.java deleted file mode 100644 index c23a49859..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/UmsMemberLevelController.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.macro.mall.controller; - -import com.macro.mall.common.api.CommonResult; -import com.macro.mall.model.UmsMemberLevel; -import com.macro.mall.service.UmsMemberLevelService; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.ResponseBody; - -import java.util.List; - -/** - * 会员等级管理Controller - * Created by macro on 2018/4/26. - */ -@Controller -@Tag(name = "UmsMemberLevelController", description = "会员等级管理") -@RequestMapping("/memberLevel") -public class UmsMemberLevelController { - @Autowired - private UmsMemberLevelService memberLevelService; - - @RequestMapping(value = "/list", method = RequestMethod.GET) - @Operation(summary = "查询所有会员等级") - @ResponseBody - public CommonResult> list(@RequestParam("defaultStatus") Integer defaultStatus) { - List memberLevelList = memberLevelService.list(defaultStatus); - return CommonResult.success(memberLevelList); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/UmsMenuController.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/UmsMenuController.java deleted file mode 100644 index fde503973..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/UmsMenuController.java +++ /dev/null @@ -1,103 +0,0 @@ -package com.macro.mall.controller; - -import com.macro.mall.common.api.CommonPage; -import com.macro.mall.common.api.CommonResult; -import com.macro.mall.dto.UmsMenuNode; -import com.macro.mall.model.UmsMenu; -import com.macro.mall.service.UmsMenuService; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -/** - * 后台菜单管理Controller - * Created by macro on 2020/2/4. - */ -@Controller -@Tag(name = "UmsMenuController", description = "后台菜单管理") -@RequestMapping("/menu") -public class UmsMenuController { - - @Autowired - private UmsMenuService menuService; - - @Operation(summary = "添加后台菜单") - @RequestMapping(value = "/create", method = RequestMethod.POST) - @ResponseBody - public CommonResult create(@RequestBody UmsMenu umsMenu) { - int count = menuService.create(umsMenu); - if (count > 0) { - return CommonResult.success(count); - } else { - return CommonResult.failed(); - } - } - - @Operation(summary = "修改后台菜单") - @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) - @ResponseBody - public CommonResult update(@PathVariable Long id, - @RequestBody UmsMenu umsMenu) { - int count = menuService.update(id, umsMenu); - if (count > 0) { - return CommonResult.success(count); - } else { - return CommonResult.failed(); - } - } - - @Operation(summary = "根据ID获取菜单详情") - @RequestMapping(value = "/{id}", method = RequestMethod.GET) - @ResponseBody - public CommonResult getItem(@PathVariable Long id) { - UmsMenu umsMenu = menuService.getItem(id); - return CommonResult.success(umsMenu); - } - - @Operation(summary = "根据ID删除后台菜单") - @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST) - @ResponseBody - public CommonResult delete(@PathVariable Long id) { - int count = menuService.delete(id); - if (count > 0) { - return CommonResult.success(count); - } else { - return CommonResult.failed(); - } - } - - @Operation(summary = "分页查询后台菜单") - @RequestMapping(value = "/list/{parentId}", method = RequestMethod.GET) - @ResponseBody - public CommonResult> list(@PathVariable Long parentId, - @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize, - @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) { - List menuList = menuService.list(parentId, pageSize, pageNum); - return CommonResult.success(CommonPage.restPage(menuList)); - } - - @Operation(summary = "树形结构返回所有菜单列表") - @RequestMapping(value = "/treeList", method = RequestMethod.GET) - @ResponseBody - public CommonResult> treeList() { - List list = menuService.treeList(); - return CommonResult.success(list); - } - - @Operation(summary = "修改菜单显示状态") - @RequestMapping(value = "/updateHidden/{id}", method = RequestMethod.POST) - @ResponseBody - public CommonResult updateHidden(@PathVariable Long id, @RequestParam("hidden") Integer hidden) { - int count = menuService.updateHidden(id, hidden); - if (count > 0) { - return CommonResult.success(count); - } else { - return CommonResult.failed(); - } - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/UmsResourceCategoryController.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/UmsResourceCategoryController.java deleted file mode 100644 index 3c35c4d68..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/UmsResourceCategoryController.java +++ /dev/null @@ -1,70 +0,0 @@ -package com.macro.mall.controller; - -import com.macro.mall.common.api.CommonResult; -import com.macro.mall.model.UmsResourceCategory; -import com.macro.mall.service.UmsResourceCategoryService; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -/** - * 后台资源分类管理Controller - * Created by macro on 2020/2/5. - */ -@Controller -@Tag(name = "UmsResourceCategoryController", description = "后台资源分类管理") -@RequestMapping("/resourceCategory") -public class UmsResourceCategoryController { - @Autowired - private UmsResourceCategoryService resourceCategoryService; - - @Operation(summary = "查询所有后台资源分类") - @RequestMapping(value = "/listAll", method = RequestMethod.GET) - @ResponseBody - public CommonResult> listAll() { - List resourceList = resourceCategoryService.listAll(); - return CommonResult.success(resourceList); - } - - @Operation(summary = "添加后台资源分类") - @RequestMapping(value = "/create", method = RequestMethod.POST) - @ResponseBody - public CommonResult create(@RequestBody UmsResourceCategory umsResourceCategory) { - int count = resourceCategoryService.create(umsResourceCategory); - if (count > 0) { - return CommonResult.success(count); - } else { - return CommonResult.failed(); - } - } - - @Operation(summary = "修改后台资源分类") - @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) - @ResponseBody - public CommonResult update(@PathVariable Long id, - @RequestBody UmsResourceCategory umsResourceCategory) { - int count = resourceCategoryService.update(id, umsResourceCategory); - if (count > 0) { - return CommonResult.success(count); - } else { - return CommonResult.failed(); - } - } - - @Operation(summary = "根据ID删除后台资源") - @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST) - @ResponseBody - public CommonResult delete(@PathVariable Long id) { - int count = resourceCategoryService.delete(id); - if (count > 0) { - return CommonResult.success(count); - } else { - return CommonResult.failed(); - } - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/UmsResourceController.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/UmsResourceController.java deleted file mode 100644 index e0f3665f3..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/UmsResourceController.java +++ /dev/null @@ -1,101 +0,0 @@ -package com.macro.mall.controller; - -import com.macro.mall.common.api.CommonPage; -import com.macro.mall.common.api.CommonResult; -import com.macro.mall.model.UmsResource; -import com.macro.mall.service.UmsResourceService; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.*; - -import java.util.List; -import java.util.Map; - -/** - * 后台资源管理Controller - * Created by macro on 2020/2/4. - */ -@Controller -@Tag(name = "UmsResourceController", description = "后台资源管理") -@RequestMapping("/resource") -public class UmsResourceController { - - @Autowired - private UmsResourceService resourceService; - - @Operation(summary = "添加后台资源") - @RequestMapping(value = "/create", method = RequestMethod.POST) - @ResponseBody - public CommonResult create(@RequestBody UmsResource umsResource) { - int count = resourceService.create(umsResource); - if (count > 0) { - return CommonResult.success(count); - } else { - return CommonResult.failed(); - } - } - - @Operation(summary = "修改后台资源") - @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) - @ResponseBody - public CommonResult update(@PathVariable Long id, - @RequestBody UmsResource umsResource) { - int count = resourceService.update(id, umsResource); - if (count > 0) { - return CommonResult.success(count); - } else { - return CommonResult.failed(); - } - } - - @Operation(summary = "根据ID获取资源详情") - @RequestMapping(value = "/{id}", method = RequestMethod.GET) - @ResponseBody - public CommonResult getItem(@PathVariable Long id) { - UmsResource umsResource = resourceService.getItem(id); - return CommonResult.success(umsResource); - } - - @Operation(summary = "根据ID删除后台资源") - @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST) - @ResponseBody - public CommonResult delete(@PathVariable Long id) { - int count = resourceService.delete(id); - if (count > 0) { - return CommonResult.success(count); - } else { - return CommonResult.failed(); - } - } - - @Operation(summary = "分页模糊查询后台资源") - @RequestMapping(value = "/list", method = RequestMethod.GET) - @ResponseBody - public CommonResult> list(@RequestParam(required = false) Long categoryId, - @RequestParam(required = false) String nameKeyword, - @RequestParam(required = false) String urlKeyword, - @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize, - @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) { - List resourceList = resourceService.list(categoryId,nameKeyword, urlKeyword, pageSize, pageNum); - return CommonResult.success(CommonPage.restPage(resourceList)); - } - - @Operation(summary = "查询所有后台资源") - @RequestMapping(value = "/listAll", method = RequestMethod.GET) - @ResponseBody - public CommonResult> listAll() { - List resourceList = resourceService.listAll(); - return CommonResult.success(resourceList); - } - - @Operation(summary = "初始化路径和资源的关联数据") - @RequestMapping(value = "/initPathResourceMap", method = RequestMethod.GET) - @ResponseBody - public CommonResult initPathResourceMap() { - Map pathResourceMap = resourceService.initPathResourceMap(); - return CommonResult.success(pathResourceMap); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/UmsRoleController.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/UmsRoleController.java deleted file mode 100644 index f061b519d..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/controller/UmsRoleController.java +++ /dev/null @@ -1,123 +0,0 @@ -package com.macro.mall.controller; - -import com.macro.mall.common.api.CommonPage; -import com.macro.mall.common.api.CommonResult; -import com.macro.mall.model.*; -import com.macro.mall.service.UmsRoleService; - -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.tags.Tag; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -/** - * 后台用户角色管理 - * Created by macro on 2018/9/30. - */ -@Controller -@Tag(name = "UmsRoleController", description = "后台用户角色管理") -@RequestMapping("/role") -public class UmsRoleController { - @Autowired - private UmsRoleService roleService; - - @Operation(summary = "添加角色") - @RequestMapping(value = "/create", method = RequestMethod.POST) - @ResponseBody - public CommonResult create(@RequestBody UmsRole role) { - int count = roleService.create(role); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "修改角色") - @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) - @ResponseBody - public CommonResult update(@PathVariable Long id, @RequestBody UmsRole role) { - int count = roleService.update(id, role); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "批量删除角色") - @RequestMapping(value = "/delete", method = RequestMethod.POST) - @ResponseBody - public CommonResult delete(@RequestParam("ids") List ids) { - int count = roleService.delete(ids); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "获取所有角色") - @RequestMapping(value = "/listAll", method = RequestMethod.GET) - @ResponseBody - public CommonResult> listAll() { - List roleList = roleService.list(); - return CommonResult.success(roleList); - } - - @Operation(summary = "根据角色名称分页获取角色列表") - @RequestMapping(value = "/list", method = RequestMethod.GET) - @ResponseBody - public CommonResult> list(@RequestParam(value = "keyword", required = false) String keyword, - @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize, - @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) { - List roleList = roleService.list(keyword, pageSize, pageNum); - return CommonResult.success(CommonPage.restPage(roleList)); - } - - @Operation(summary = "修改角色状态") - @RequestMapping(value = "/updateStatus/{id}", method = RequestMethod.POST) - @ResponseBody - public CommonResult updateStatus(@PathVariable Long id, @RequestParam(value = "status") Integer status) { - UmsRole umsRole = new UmsRole(); - umsRole.setStatus(status); - int count = roleService.update(id, umsRole); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - - @Operation(summary = "获取角色相关菜单") - @RequestMapping(value = "/listMenu/{roleId}", method = RequestMethod.GET) - @ResponseBody - public CommonResult> listMenu(@PathVariable Long roleId) { - List roleList = roleService.listMenu(roleId); - return CommonResult.success(roleList); - } - - @Operation(summary = "获取角色相关资源") - @RequestMapping(value = "/listResource/{roleId}", method = RequestMethod.GET) - @ResponseBody - public CommonResult> listResource(@PathVariable Long roleId) { - List roleList = roleService.listResource(roleId); - return CommonResult.success(roleList); - } - - @Operation(summary = "给角色分配菜单") - @RequestMapping(value = "/allocMenu", method = RequestMethod.POST) - @ResponseBody - public CommonResult allocMenu(@RequestParam Long roleId, @RequestParam List menuIds) { - int count = roleService.allocMenu(roleId, menuIds); - return CommonResult.success(count); - } - - @Operation(summary = "给角色分配资源") - @RequestMapping(value = "/allocResource", method = RequestMethod.POST) - @ResponseBody - public CommonResult allocResource(@RequestParam Long roleId, @RequestParam List resourceIds) { - int count = roleService.allocResource(roleId, resourceIds); - return CommonResult.success(count); - } - -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/CmsPrefrenceAreaProductRelationDao.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/CmsPrefrenceAreaProductRelationDao.java deleted file mode 100644 index 9f8216fc3..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/CmsPrefrenceAreaProductRelationDao.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.macro.mall.dao; - -import com.macro.mall.model.CmsPrefrenceAreaProductRelation; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 自定义优选和商品关系操作Dao - * Created by macro on 2018/4/26. - */ -public interface CmsPrefrenceAreaProductRelationDao { - /** - * 批量创建 - */ - int insertList(@Param("list") List prefrenceAreaProductRelationList); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/CmsSubjectProductRelationDao.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/CmsSubjectProductRelationDao.java deleted file mode 100644 index 749aee6c8..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/CmsSubjectProductRelationDao.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.macro.mall.dao; - -import com.macro.mall.model.CmsSubjectProductRelation; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 自定义商品和专题关系操作Dao - * Created by macro on 2018/4/26. - */ -public interface CmsSubjectProductRelationDao { - /** - * 批量创建 - */ - int insertList(@Param("list") List subjectProductRelationList); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/OmsOrderDao.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/OmsOrderDao.java deleted file mode 100644 index 0bd91f644..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/OmsOrderDao.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.macro.mall.dao; - -import com.macro.mall.dto.OmsOrderDeliveryParam; -import com.macro.mall.dto.OmsOrderDetail; -import com.macro.mall.dto.OmsOrderQueryParam; -import com.macro.mall.model.OmsOrder; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 订单自定义查询Dao - * Created by macro on 2018/10/12. - */ -public interface OmsOrderDao { - /** - * 条件查询订单 - */ - List getList(@Param("queryParam") OmsOrderQueryParam queryParam); - - /** - * 批量发货 - */ - int delivery(@Param("list") List deliveryParamList); - - /** - * 获取订单详情 - */ - OmsOrderDetail getDetail(@Param("id") Long id); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/OmsOrderOperateHistoryDao.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/OmsOrderOperateHistoryDao.java deleted file mode 100644 index 23cfbca7b..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/OmsOrderOperateHistoryDao.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.macro.mall.dao; - -import com.macro.mall.model.OmsOrderOperateHistory; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 订单操作记录自定义Dao - * Created by macro on 2018/10/12. - */ -public interface OmsOrderOperateHistoryDao { - /** - * 批量创建 - */ - int insertList(@Param("list") List orderOperateHistoryList); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/OmsOrderReturnApplyDao.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/OmsOrderReturnApplyDao.java deleted file mode 100644 index 0c82b3b94..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/OmsOrderReturnApplyDao.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.macro.mall.dao; - -import com.macro.mall.dto.OmsOrderReturnApplyResult; -import com.macro.mall.dto.OmsReturnApplyQueryParam; -import com.macro.mall.model.OmsOrderReturnApply; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 订单退货申请自定义Dao - * Created by macro on 2018/10/18. - */ -public interface OmsOrderReturnApplyDao { - /** - * 查询申请列表 - */ - List getList(@Param("queryParam") OmsReturnApplyQueryParam queryParam); - - /** - * 获取申请详情 - */ - OmsOrderReturnApplyResult getDetail(@Param("id")Long id); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/PmsMemberPriceDao.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/PmsMemberPriceDao.java deleted file mode 100644 index 22b6cec81..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/PmsMemberPriceDao.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.macro.mall.dao; - -import com.macro.mall.model.PmsMemberPrice; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 自定义会员价格Dao - * Created by macro on 2018/4/26. - */ -public interface PmsMemberPriceDao { - /** - * 批量创建 - */ - int insertList(@Param("list") List memberPriceList); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/PmsProductAttributeCategoryDao.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/PmsProductAttributeCategoryDao.java deleted file mode 100644 index b126010d2..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/PmsProductAttributeCategoryDao.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.macro.mall.dao; - -import com.macro.mall.dto.PmsProductAttributeCategoryItem; - -import java.util.List; - -/** - * 自定义商品属性分类Dao - * Created by macro on 2018/5/24. - */ -public interface PmsProductAttributeCategoryDao { - /** - * 获取包含属性的商品属性分类 - */ - List getListWithAttr(); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/PmsProductAttributeDao.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/PmsProductAttributeDao.java deleted file mode 100644 index 080108b48..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/PmsProductAttributeDao.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.macro.mall.dao; - -import com.macro.mall.dto.ProductAttrInfo; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 自定义商品属性Dao - * Created by macro on 2018/5/23. - */ -public interface PmsProductAttributeDao { - /** - * 获取商品属性信息 - */ - List getProductAttrInfo(@Param("id") Long productCategoryId); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/PmsProductAttributeValueDao.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/PmsProductAttributeValueDao.java deleted file mode 100644 index 1d1d9ff19..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/PmsProductAttributeValueDao.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.macro.mall.dao; - -import com.macro.mall.model.PmsProductAttributeValue; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 商品参数,商品自定义规格属性Dao - * Created by macro on 2018/4/26. - */ -public interface PmsProductAttributeValueDao { - /** - * 批量创建 - */ - int insertList(@Param("list")List productAttributeValueList); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/PmsProductCategoryAttributeRelationDao.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/PmsProductCategoryAttributeRelationDao.java deleted file mode 100644 index dad6e2834..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/PmsProductCategoryAttributeRelationDao.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.macro.mall.dao; - -import com.macro.mall.model.PmsProductCategoryAttributeRelation; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 自定义商品分类和属性关系Dao - * Created by macro on 2018/5/23. - */ -public interface PmsProductCategoryAttributeRelationDao { - /** - * 批量创建 - */ - int insertList(@Param("list") List productCategoryAttributeRelationList); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/PmsProductCategoryDao.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/PmsProductCategoryDao.java deleted file mode 100644 index 9ac86daeb..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/PmsProductCategoryDao.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.macro.mall.dao; - -import com.macro.mall.dto.PmsProductCategoryWithChildrenItem; - -import java.util.List; - -/** - * 商品分类自定义Dao - * Created by macro on 2018/5/25. - */ -public interface PmsProductCategoryDao { - /** - * 获取商品分类及其子分类 - */ - List listWithChildren(); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/PmsProductDao.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/PmsProductDao.java deleted file mode 100644 index 982b482dd..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/PmsProductDao.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.macro.mall.dao; - -import com.macro.mall.dto.PmsProductResult; -import org.apache.ibatis.annotations.Param; - - -/** - * 自定义商品管理Dao - * Created by macro on 2018/4/26. - */ -public interface PmsProductDao { - /** - * 获取商品编辑信息 - */ - PmsProductResult getUpdateInfo(@Param("id") Long id); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/PmsProductFullReductionDao.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/PmsProductFullReductionDao.java deleted file mode 100644 index 871fe7640..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/PmsProductFullReductionDao.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.macro.mall.dao; - -import com.macro.mall.model.PmsProductFullReduction; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 自定义商品满减Dao - * Created by macro on 2018/4/26. - */ -public interface PmsProductFullReductionDao { - /** - * 批量创建 - */ - int insertList(@Param("list") List productFullReductionList); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/PmsProductLadderDao.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/PmsProductLadderDao.java deleted file mode 100644 index ef95cb88f..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/PmsProductLadderDao.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.macro.mall.dao; - -import com.macro.mall.model.PmsProductLadder; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 自定义会员阶梯价格Dao - * Created by macro on 2018/4/26. - */ -public interface PmsProductLadderDao { - /** - * 批量创建 - */ - int insertList(@Param("list") List productLadderList); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/PmsProductVertifyRecordDao.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/PmsProductVertifyRecordDao.java deleted file mode 100644 index 71c6ce7cd..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/PmsProductVertifyRecordDao.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.macro.mall.dao; - -import com.macro.mall.model.PmsProductVertifyRecord; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 自定义商品审核日志管理Dao - * Created by macro on 2018/4/27. - */ -public interface PmsProductVertifyRecordDao { - /** - * 批量创建 - */ - int insertList(@Param("list") List list); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/PmsSkuStockDao.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/PmsSkuStockDao.java deleted file mode 100644 index 05684742f..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/PmsSkuStockDao.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.macro.mall.dao; - -import com.macro.mall.model.PmsSkuStock; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 自定义商品SKU管理Dao - * Created by macro on 2018/4/26. - */ -public interface PmsSkuStockDao { - /** - * 批量插入操作 - */ - int insertList(@Param("list")List skuStockList); - - /** - * 批量插入或替换操作 - */ - int replaceList(@Param("list")List skuStockList); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/SmsCouponDao.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/SmsCouponDao.java deleted file mode 100644 index 603c03dbc..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/SmsCouponDao.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.macro.mall.dao; - -import com.macro.mall.dto.SmsCouponParam; -import org.apache.ibatis.annotations.Param; - -/** - * 自定义优惠券管理Dao - * Created by macro on 2018/8/29. - */ -public interface SmsCouponDao { - /** - * 获取优惠券详情包括绑定关系 - */ - SmsCouponParam getItem(@Param("id") Long id); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/SmsCouponProductCategoryRelationDao.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/SmsCouponProductCategoryRelationDao.java deleted file mode 100644 index ae5054f7b..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/SmsCouponProductCategoryRelationDao.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.macro.mall.dao; - -import com.macro.mall.model.SmsCouponProductCategoryRelation; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 自定义优惠券和商品分类关系管理Dao - * Created by macro on 2018/8/28. - */ -public interface SmsCouponProductCategoryRelationDao { - /** - * 批量创建 - */ - int insertList(@Param("list")List productCategoryRelationList); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/SmsCouponProductRelationDao.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/SmsCouponProductRelationDao.java deleted file mode 100644 index 10d7e0170..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/SmsCouponProductRelationDao.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.macro.mall.dao; - -import com.macro.mall.model.SmsCouponProductRelation; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 自定义优惠券和商品关系关系Dao - * Created by macro on 2018/8/28. - */ -public interface SmsCouponProductRelationDao { - /** - * 批量创建 - */ - int insertList(@Param("list")List productRelationList); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/SmsFlashPromotionProductRelationDao.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/SmsFlashPromotionProductRelationDao.java deleted file mode 100644 index 2e4b02da0..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/SmsFlashPromotionProductRelationDao.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.macro.mall.dao; - -import com.macro.mall.dto.SmsFlashPromotionProduct; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 自定义限时购商品关系管理Dao - * Created by macro on 2018/11/16. - */ -public interface SmsFlashPromotionProductRelationDao { - /** - * 获取限时购及相关商品信息 - */ - List getList(@Param("flashPromotionId") Long flashPromotionId, @Param("flashPromotionSessionId") Long flashPromotionSessionId); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/UmsAdminRoleRelationDao.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/UmsAdminRoleRelationDao.java deleted file mode 100644 index d96a416d6..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/UmsAdminRoleRelationDao.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.macro.mall.dao; - -import com.macro.mall.model.UmsAdminRoleRelation; -import com.macro.mall.model.UmsResource; -import com.macro.mall.model.UmsRole; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 自定义后台用户与角色管理Dao - * Created by macro on 2018/10/8. - */ -public interface UmsAdminRoleRelationDao { - /** - * 批量插入用户角色关系 - */ - int insertList(@Param("list") List adminRoleRelationList); - - /** - * 获取用于所有角色 - */ - List getRoleList(@Param("adminId") Long adminId); - - /** - * 获取用户所有可访问资源 - */ - List getResourceList(@Param("adminId") Long adminId); - - /** - * 获取资源相关用户ID列表 - */ - List getAdminIdList(@Param("resourceId") Long resourceId); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/UmsRoleDao.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/UmsRoleDao.java deleted file mode 100644 index 04873d87d..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dao/UmsRoleDao.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.macro.mall.dao; - -import com.macro.mall.model.UmsMenu; -import com.macro.mall.model.UmsResource; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * 自定义后台角色管理Dao - * Created by macro on 2020/2/2. - */ -public interface UmsRoleDao { - /** - * 根据后台用户ID获取菜单 - */ - List getMenuList(@Param("adminId") Long adminId); - /** - * 根据角色ID获取菜单 - */ - List getMenuListByRoleId(@Param("roleId") Long roleId); - /** - * 根据角色ID获取资源 - */ - List getResourceListByRoleId(@Param("roleId") Long roleId); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/BucketPolicyConfigDto.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/BucketPolicyConfigDto.java deleted file mode 100644 index c37f8986d..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/BucketPolicyConfigDto.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.macro.mall.dto; - -import lombok.Builder; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.util.List; - -/** - * Minio Bucket访问策略配置 - * Created by macro on 2020/8/11. - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Builder -public class BucketPolicyConfigDto { - - private String Version; - private List Statement; - - @Data - @EqualsAndHashCode(callSuper = false) - @Builder - public static class Statement { - private String Effect; - private String Principal; - private String Action; - private String Resource; - - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/MinioUploadDto.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/MinioUploadDto.java deleted file mode 100644 index 5df39799d..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/MinioUploadDto.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.macro.mall.dto; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 文件上传返回结果 - * Created by macro on 2019/12/25. - */ -@Data -@EqualsAndHashCode(callSuper = false) -public class MinioUploadDto { - @Schema(title = "文件访问URL") - private String url; - @Schema(title = "文件名称") - private String name; -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/OmsMoneyInfoParam.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/OmsMoneyInfoParam.java deleted file mode 100644 index c48e3d338..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/OmsMoneyInfoParam.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.macro.mall.dto; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; -import lombok.Setter; - -import java.math.BigDecimal; - -/** - * 修改订单费用信息参数 - * Created by macro on 2018/10/29. - */ -@Getter -@Setter -public class OmsMoneyInfoParam { - @Schema(title = "订单ID") - private Long orderId; - @Schema(title = "运费金额") - private BigDecimal freightAmount; - @Schema(title = "管理员后台调整订单使用的折扣金额") - private BigDecimal discountAmount; - @Schema(title = "订单状态:0->待付款;1->待发货;2->已发货;3->已完成;4->已关闭;5->无效订单") - private Integer status; -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/OmsOrderDeliveryParam.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/OmsOrderDeliveryParam.java deleted file mode 100644 index 9929bbf99..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/OmsOrderDeliveryParam.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.macro.mall.dto; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; -import lombok.Setter; - -/** - * 订单发货参数 - * Created by macro on 2018/10/12. - */ -@Getter -@Setter -public class OmsOrderDeliveryParam { - @Schema(title = "订单id") - private Long orderId; - @Schema(title = "物流公司") - private String deliveryCompany; - @Schema(title = "物流单号") - private String deliverySn; -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/OmsOrderDetail.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/OmsOrderDetail.java deleted file mode 100644 index 323d79ce6..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/OmsOrderDetail.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.macro.mall.dto; - -import com.macro.mall.model.OmsOrder; -import com.macro.mall.model.OmsOrderItem; -import com.macro.mall.model.OmsOrderOperateHistory; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; -import lombok.Setter; - -import java.util.List; - -/** - * 订单详情信息 - * Created by macro on 2018/10/11. - */ -public class OmsOrderDetail extends OmsOrder { - @Getter - @Setter - @Schema(title = "订单商品列表") - private List orderItemList; - @Getter - @Setter - @Schema(title = "订单操作记录列表") - private List historyList; -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/OmsOrderQueryParam.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/OmsOrderQueryParam.java deleted file mode 100644 index ef9ec60ad..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/OmsOrderQueryParam.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.macro.mall.dto; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; -import lombok.Setter; - -/** - * 订单查询参数 - * Created by macro on 2018/10/11. - */ -@Getter -@Setter -public class OmsOrderQueryParam { - @Schema(title = "订单编号") - private String orderSn; - @Schema(title = "收货人姓名/号码") - private String receiverKeyword; - @Schema(title = "订单状态:0->待付款;1->待发货;2->已发货;3->已完成;4->已关闭;5->无效订单") - private Integer status; - @Schema(title = "订单类型:0->正常订单;1->秒杀订单") - private Integer orderType; - @Schema(title = "订单来源:0->PC订单;1->app订单") - private Integer sourceType; - @Schema(title = "订单提交时间") - private String createTime; -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/OmsOrderReturnApplyResult.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/OmsOrderReturnApplyResult.java deleted file mode 100644 index 47012a622..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/OmsOrderReturnApplyResult.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.macro.mall.dto; - -import com.macro.mall.model.OmsCompanyAddress; -import com.macro.mall.model.OmsOrderReturnApply; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; -import lombok.Setter; - -/** - * 申请信息封装 - * Created by macro on 2018/10/18. - */ -public class OmsOrderReturnApplyResult extends OmsOrderReturnApply { - @Getter - @Setter - @Schema(title = "公司收货地址") - private OmsCompanyAddress companyAddress; -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/OmsReceiverInfoParam.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/OmsReceiverInfoParam.java deleted file mode 100644 index a69c4386f..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/OmsReceiverInfoParam.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.macro.mall.dto; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; -import lombok.Setter; - -/** - * 订单修改收货人信息参数 - * Created by macro on 2018/10/29. - */ -@Getter -@Setter -public class OmsReceiverInfoParam { - @Schema(title = "订单ID") - private Long orderId; - @Schema(title = "收货人姓名") - private String receiverName; - @Schema(title = "收货人电话") - private String receiverPhone; - @Schema(title = "收货人邮编") - private String receiverPostCode; - @Schema(title = "详细地址") - private String receiverDetailAddress; - @Schema(title = "省份/直辖市") - private String receiverProvince; - @Schema(title = "城市") - private String receiverCity; - @Schema(title = "区") - private String receiverRegion; - @Schema(title = "订单状态:0->待付款;1->待发货;2->已发货;3->已完成;4->已关闭;5->无效订单") - private Integer status; -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/OmsReturnApplyQueryParam.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/OmsReturnApplyQueryParam.java deleted file mode 100644 index b77f02326..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/OmsReturnApplyQueryParam.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.macro.mall.dto; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; -import lombok.Setter; - -/** - * 订单退货申请查询参数 - * Created by macro on 2018/10/18. - */ -@Getter -@Setter -public class OmsReturnApplyQueryParam { - @Schema(title = "服务单号") - private Long id; - @Schema(title = "收货人姓名/号码") - private String receiverKeyword; - @Schema(title = "申请状态:0->待处理;1->退货中;2->已完成;3->已拒绝") - private Integer status; - @Schema(title = "申请时间") - private String createTime; - @Schema(title = "处理人员") - private String handleMan; - @Schema(title = "处理时间") - private String handleTime; -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/OmsUpdateStatusParam.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/OmsUpdateStatusParam.java deleted file mode 100644 index f12c70d01..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/OmsUpdateStatusParam.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.macro.mall.dto; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; -import lombok.Setter; - -import java.math.BigDecimal; - -/** - * 确认收货提交参数 - * Created by macro on 2018/10/18. - */ -@Getter -@Setter -public class OmsUpdateStatusParam { - @Schema(title = "服务单号") - private Long id; - @Schema(title = "收货地址关联id") - private Long companyAddressId; - @Schema(title = "确认退款金额") - private BigDecimal returnAmount; - @Schema(title = "处理备注") - private String handleNote; - @Schema(title = "处理人") - private String handleMan; - @Schema(title = "收货备注") - private String receiveNote; - @Schema(title = "收货人") - private String receiveMan; - @Schema(title = "申请状态:1->退货中;2->已完成;3->已拒绝") - private Integer status; -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/OssCallbackParam.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/OssCallbackParam.java deleted file mode 100644 index d376a25da..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/OssCallbackParam.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.macro.mall.dto; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * oss上传成功后的回调参数 - * Created by macro on 2018/5/17. - */ -@Data -@EqualsAndHashCode(callSuper = false) -public class OssCallbackParam { - @Schema(title = "请求的回调地址") - private String callbackUrl; - @Schema(title = "回调是传入request中的参数") - private String callbackBody; - @Schema(title = "回调时传入参数的格式,比如表单提交形式") - private String callbackBodyType; -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/OssCallbackResult.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/OssCallbackResult.java deleted file mode 100644 index 992ad684f..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/OssCallbackResult.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.macro.mall.dto; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * oss上传文件的回调结果 - * Created by macro on 2018/5/17. - */ -@Data -@EqualsAndHashCode(callSuper = false) -public class OssCallbackResult { - @Schema(title = "文件名称") - private String filename; - @Schema(title = "文件大小") - private String size; - @Schema(title = "文件的mimeType") - private String mimeType; - @Schema(title = "图片文件的宽") - private String width; - @Schema(title = "图片文件的高") - private String height; -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/OssPolicyResult.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/OssPolicyResult.java deleted file mode 100644 index 407a90d81..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/OssPolicyResult.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.macro.mall.dto; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 获取OSS上传文件授权返回结果 - * Created by macro on 2018/5/17. - */ -@Data -@EqualsAndHashCode(callSuper = false) -public class OssPolicyResult { - @Schema(title = "访问身份验证中用到用户标识") - private String accessKeyId; - @Schema(title = "用户表单上传的策略,经过base64编码过的字符串") - private String policy; - @Schema(title = "对policy签名后的字符串") - private String signature; - @Schema(title = "上传文件夹路径前缀") - private String dir; - @Schema(title = "oss对外服务的访问域名") - private String host; - @Schema(title = "上传成功后的回调设置") - private String callback; -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/PmsBrandParam.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/PmsBrandParam.java deleted file mode 100644 index 92237db6d..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/PmsBrandParam.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.macro.mall.dto; - -import com.macro.mall.validator.FlagValidator; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import jakarta.validation.constraints.Min; -import jakarta.validation.constraints.NotEmpty; - -/** - * 品牌传递参数 - * Created by macro on 2018/4/26. - */ -@Data -@EqualsAndHashCode(callSuper = false) -public class PmsBrandParam { - @NotEmpty - @Schema(title = "品牌名称",required = true) - private String name; - @Schema(title = "品牌首字母") - private String firstLetter; - @Min(value = 0) - @Schema(title = "排序字段") - private Integer sort; - @FlagValidator(value = {"0","1"}, message = "厂家状态不正确") - @Schema(title = "是否为厂家制造商") - private Integer factoryStatus; - @FlagValidator(value = {"0","1"}, message = "显示状态不正确") - @Schema(title = "是否进行显示") - private Integer showStatus; - @NotEmpty - @Schema(title = "品牌logo",required = true) - private String logo; - @Schema(title = "品牌大图") - private String bigPic; - @Schema(title = "品牌故事") - private String brandStory; -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/PmsProductAttributeCategoryItem.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/PmsProductAttributeCategoryItem.java deleted file mode 100644 index b33ba0316..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/PmsProductAttributeCategoryItem.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.macro.mall.dto; - -import com.macro.mall.model.PmsProductAttribute; -import com.macro.mall.model.PmsProductAttributeCategory; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.Getter; -import lombok.Setter; - -import java.util.List; - -/** - * 包含有分类下属性的dto - * Created by macro on 2018/5/24. - */ -public class PmsProductAttributeCategoryItem extends PmsProductAttributeCategory { - @Getter - @Setter - @Schema(title = "商品属性列表") - private List productAttributeList; -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/PmsProductAttributeParam.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/PmsProductAttributeParam.java deleted file mode 100644 index 71e4df8cb..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/PmsProductAttributeParam.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.macro.mall.dto; - -import com.macro.mall.validator.FlagValidator; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import jakarta.validation.constraints.NotEmpty; - -/** - * 商品属性参数 - * Created by macro on 2018/4/26. - */ -@Data -@EqualsAndHashCode(callSuper = false) -public class PmsProductAttributeParam { - @NotEmpty - @Schema(title = "属性分类ID") - private Long productAttributeCategoryId; - @NotEmpty - @Schema(title = "属性名称") - private String name; - @FlagValidator({"0","1","2"}) - @Schema(title = "属性选择类型:0->唯一;1->单选;2->多选") - private Integer selectType; - @FlagValidator({"0","1"}) - @Schema(title = "属性录入方式:0->手工录入;1->从列表中选取") - private Integer inputType; - @Schema(title = "可选值列表,以逗号隔开") - private String inputList; - - private Integer sort; - @FlagValidator({"0","1"}) - @Schema(title = "分类筛选样式:0->普通;1->颜色") - private Integer filterType; - @FlagValidator({"0","1","2"}) - @Schema(title = "检索类型;0->不需要进行检索;1->关键字检索;2->范围检索") - private Integer searchType; - @FlagValidator({"0","1"}) - @Schema(title = "相同属性产品是否关联;0->不关联;1->关联") - private Integer relatedStatus; - @FlagValidator({"0","1"}) - @Schema(title = "是否支持手动新增;0->不支持;1->支持") - private Integer handAddStatus; - @FlagValidator({"0","1"}) - @Schema(title = "属性的类型;0->规格;1->参数") - private Integer type; -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/PmsProductCategoryParam.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/PmsProductCategoryParam.java deleted file mode 100644 index 59ea12b27..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/PmsProductCategoryParam.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.macro.mall.dto; - -import com.macro.mall.validator.FlagValidator; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import jakarta.validation.constraints.Min; -import jakarta.validation.constraints.NotEmpty; -import java.util.List; - -/** - * 添加更新产品分类的参数 - * Created by macro on 2018/4/26. - */ -@Data -@EqualsAndHashCode(callSuper = false) -public class PmsProductCategoryParam { - @Schema(title = "父分类的编号") - private Long parentId; - @NotEmpty - @Schema(title = "商品分类名称",required = true) - private String name; - @Schema(title = "分类单位") - private String productUnit; - @FlagValidator(value = {"0","1"},message = "状态只能为0或1") - @Schema(title = "是否在导航栏显示") - private Integer navStatus; - @FlagValidator(value = {"0","1"},message = "状态只能为0或1") - @Schema(title = "是否进行显示") - private Integer showStatus; - @Min(value = 0) - @Schema(title = "排序") - private Integer sort; - @Schema(title = "图标") - private String icon; - @Schema(title = "关键字") - private String keywords; - @Schema(title = "描述") - private String description; - @Schema(title = "产品相关筛选属性集合") - private List productAttributeIdList; -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/PmsProductCategoryWithChildrenItem.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/PmsProductCategoryWithChildrenItem.java deleted file mode 100644 index aa9414e4c..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/PmsProductCategoryWithChildrenItem.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.macro.mall.dto; - -import com.macro.mall.model.PmsProductCategory; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; -import lombok.Setter; - -import java.util.List; - -/** - * Created by macro on 2018/5/25. - */ -public class PmsProductCategoryWithChildrenItem extends PmsProductCategory { - @Getter - @Setter - @Schema(title = "子级分类") - private List children; -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/PmsProductParam.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/PmsProductParam.java deleted file mode 100644 index 4fd40d7a5..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/PmsProductParam.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.macro.mall.dto; - -import com.macro.mall.model.*; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import java.util.List; - -/** - * 创建和修改商品时使用的参数 - * Created by macro on 2018/4/26. - */ -@Data -@EqualsAndHashCode(callSuper = false) -public class PmsProductParam extends PmsProduct{ - @Schema(title = "商品阶梯价格设置") - private List productLadderList; - @Schema(title = "商品满减价格设置") - private List productFullReductionList; - @Schema(title = "商品会员价格设置") - private List memberPriceList; - @Schema(title = "商品的sku库存信息") - private List skuStockList; - @Schema(title = "商品参数及自定义规格属性") - private List productAttributeValueList; - @Schema(title = "专题和商品关系") - private List subjectProductRelationList; - @Schema(title = "优选专区和商品的关系") - private List prefrenceAreaProductRelationList; -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/PmsProductQueryParam.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/PmsProductQueryParam.java deleted file mode 100644 index 9a641290f..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/PmsProductQueryParam.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.macro.mall.dto; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 产品查询参数 - * Created by macro on 2018/4/27. - */ -@Data -@EqualsAndHashCode(callSuper = false) -public class PmsProductQueryParam { - @Schema(title = "上架状态") - private Integer publishStatus; - @Schema(title = "审核状态") - private Integer verifyStatus; - @Schema(title = "商品名称模糊关键字") - private String keyword; - @Schema(title = "商品货号") - private String productSn; - @Schema(title = "商品分类编号") - private Long productCategoryId; - @Schema(title = "商品品牌编号") - private Long brandId; -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/PmsProductResult.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/PmsProductResult.java deleted file mode 100644 index f60c601a8..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/PmsProductResult.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.macro.mall.dto; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; -import lombok.Setter; - -/** - * 查询单个产品进行修改时返回的结果 - * Created by macro on 2018/4/26. - */ -public class PmsProductResult extends PmsProductParam { - @Getter - @Setter - @Schema(title = "商品所选分类的父id") - private Long cateParentId; -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/ProductAttrInfo.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/ProductAttrInfo.java deleted file mode 100644 index 7546326c7..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/ProductAttrInfo.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.macro.mall.dto; - - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * 商品分类对应属性信息 - * Created by macro on 2018/5/23. - */ -@Data -@EqualsAndHashCode(callSuper = false) -public class ProductAttrInfo { - @Schema(title = "商品属性ID") - private Long attributeId; - @Schema(title = "商品属性分类ID") - private Long attributeCategoryId; -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/SmsCouponParam.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/SmsCouponParam.java deleted file mode 100644 index 12530e0ff..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/SmsCouponParam.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.macro.mall.dto; - -import com.macro.mall.model.SmsCoupon; -import com.macro.mall.model.SmsCouponProductCategoryRelation; -import com.macro.mall.model.SmsCouponProductRelation; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; -import lombok.Setter; - -import java.util.List; - -/** - * 优惠券信息封装,包括绑定商品和绑定分类 - * Created by macro on 2018/8/28. - */ -public class SmsCouponParam extends SmsCoupon { - @Getter - @Setter - @Schema(title = "优惠券绑定的商品") - private List productRelationList; - @Getter - @Setter - @Schema(title = "优惠券绑定的商品分类") - private List productCategoryRelationList; -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/SmsFlashPromotionProduct.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/SmsFlashPromotionProduct.java deleted file mode 100644 index 117df3b91..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/SmsFlashPromotionProduct.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.macro.mall.dto; - -import com.macro.mall.model.PmsProduct; -import com.macro.mall.model.SmsFlashPromotionProductRelation; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; -import lombok.Setter; - -/** - * 限时购及商品信息封装 - * Created by macro on 2018/11/16. - */ -public class SmsFlashPromotionProduct extends SmsFlashPromotionProductRelation{ - @Getter - @Setter - @Schema(title = "关联商品") - private PmsProduct product; -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/SmsFlashPromotionSessionDetail.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/SmsFlashPromotionSessionDetail.java deleted file mode 100644 index 906628be7..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/SmsFlashPromotionSessionDetail.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.macro.mall.dto; - -import com.macro.mall.model.SmsFlashPromotionSession; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; -import lombok.Setter; - -/** - * 包含商品数量的场次信息 - * Created by macro on 2018/11/19. - */ -public class SmsFlashPromotionSessionDetail extends SmsFlashPromotionSession { - @Setter - @Getter - @Schema(title = "商品数量") - private Long productCount; -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/UmsAdminLoginParam.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/UmsAdminLoginParam.java deleted file mode 100644 index af680f4c7..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/UmsAdminLoginParam.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.macro.mall.dto; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.EqualsAndHashCode; - -import jakarta.validation.constraints.NotEmpty; - -/** - * 用户登录参数 - * Created by macro on 2018/4/26. - */ -@Data -@EqualsAndHashCode(callSuper = false) -public class UmsAdminLoginParam { - @NotEmpty - @Schema(title = "用户名", required = true) - private String username; - @NotEmpty - @Schema(title = "密码", required = true) - private String password; -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/UmsAdminParam.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/UmsAdminParam.java deleted file mode 100644 index 94e93e4b3..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/UmsAdminParam.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.macro.mall.dto; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; -import lombok.Setter; - -import jakarta.validation.constraints.Email; -import jakarta.validation.constraints.NotEmpty; - -/** - * 用户登录参数 - * Created by macro on 2018/4/26. - */ -@Getter -@Setter -public class UmsAdminParam { - @Schema(title = "用户名", required = true) - @NotEmpty - private String username; - @Schema(title = "密码", required = true) - @NotEmpty - private String password; - @Schema(title = "用户头像") - private String icon; - @Schema(title = "邮箱") - @Email - private String email; - @Schema(title = "用户昵称") - private String nickName; - @Schema(title = "备注") - private String note; -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/UmsMenuNode.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/UmsMenuNode.java deleted file mode 100644 index 4c8d5b370..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/UmsMenuNode.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.macro.mall.dto; - -import com.macro.mall.model.UmsMenu; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; -import lombok.Setter; - -import java.util.List; - -/** - * 后台菜单节点封装 - * Created by macro on 2020/2/4. - */ -@Getter -@Setter -public class UmsMenuNode extends UmsMenu { - @Schema(title = "子级菜单") - private List children; -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/UpdateAdminPasswordParam.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/UpdateAdminPasswordParam.java deleted file mode 100644 index ae96275a1..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/dto/UpdateAdminPasswordParam.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.macro.mall.dto; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Getter; -import lombok.Setter; - -import jakarta.validation.constraints.NotEmpty; - -/** - * 修改用户名密码参数 - * Created by macro on 2019/10/9. - */ -@Getter -@Setter -public class UpdateAdminPasswordParam { - @NotEmpty - @Schema(title = "用户名", required = true) - private String username; - @NotEmpty - @Schema(title = "旧密码", required = true) - private String oldPassword; - @NotEmpty - @Schema(title = "新密码", required = true) - private String newPassword; -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/CmsPrefrenceAreaService.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/CmsPrefrenceAreaService.java deleted file mode 100644 index 9a6d2181d..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/CmsPrefrenceAreaService.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.macro.mall.service; - -import com.macro.mall.model.CmsPrefrenceArea; - -import java.util.List; - -/** - * 商品优选管理Service - * Created by macro on 2018/6/1. - */ -public interface CmsPrefrenceAreaService { - /** - * 获取所有优选专区 - */ - List listAll(); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/CmsSubjectService.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/CmsSubjectService.java deleted file mode 100644 index b7657d9cd..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/CmsSubjectService.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.macro.mall.service; - -import com.macro.mall.model.CmsSubject; - -import java.util.List; - -/** - * 商品专题管理Service - * Created by macro on 2018/6/1. - */ -public interface CmsSubjectService { - /** - * 查询所有专题 - */ - List listAll(); - - /** - * 分页查询专题 - */ - List list(String keyword, Integer pageNum, Integer pageSize); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/OmsCompanyAddressService.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/OmsCompanyAddressService.java deleted file mode 100644 index d8f9ac6b1..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/OmsCompanyAddressService.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.macro.mall.service; - -import com.macro.mall.model.OmsCompanyAddress; - -import java.util.List; - -/** - * 收货地址管Service - * Created by macro on 2018/10/18. - */ -public interface OmsCompanyAddressService { - /** - * 获取全部收货地址 - */ - List list(); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/OmsOrderReturnApplyService.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/OmsOrderReturnApplyService.java deleted file mode 100644 index 597744e5f..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/OmsOrderReturnApplyService.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.macro.mall.service; - -import com.macro.mall.dto.OmsOrderReturnApplyResult; -import com.macro.mall.dto.OmsReturnApplyQueryParam; -import com.macro.mall.dto.OmsUpdateStatusParam; -import com.macro.mall.model.OmsOrderReturnApply; - -import java.util.List; - -/** - * 退货申请管理Service - * Created by macro on 2018/10/18. - */ -public interface OmsOrderReturnApplyService { - /** - * 分页查询申请 - */ - List list(OmsReturnApplyQueryParam queryParam, Integer pageSize, Integer pageNum); - - /** - * 批量删除申请 - */ - int delete(List ids); - - /** - * 修改申请状态 - */ - int updateStatus(Long id, OmsUpdateStatusParam statusParam); - - /** - * 获取指定申请详情 - */ - OmsOrderReturnApplyResult getItem(Long id); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/OmsOrderReturnReasonService.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/OmsOrderReturnReasonService.java deleted file mode 100644 index f46844ced..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/OmsOrderReturnReasonService.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.macro.mall.service; - -import com.macro.mall.model.OmsOrderReturnReason; - -import java.util.List; - -/** - * 订单原因管理Service - * Created by macro on 2018/10/17. - */ -public interface OmsOrderReturnReasonService { - /** - * 添加订单原因 - */ - int create(OmsOrderReturnReason returnReason); - - /** - * 修改退货原因 - */ - int update(Long id, OmsOrderReturnReason returnReason); - - /** - * 批量删除退货原因 - */ - int delete(List ids); - - /** - * 分页获取退货原因 - */ - List list(Integer pageSize, Integer pageNum); - - /** - * 批量修改退货原因状态 - */ - int updateStatus(List ids, Integer status); - - /** - * 获取单个退货原因详情信息 - */ - OmsOrderReturnReason getItem(Long id); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/OmsOrderService.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/OmsOrderService.java deleted file mode 100644 index 86abe7140..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/OmsOrderService.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.macro.mall.service; - -import com.macro.mall.dto.*; -import com.macro.mall.model.OmsOrder; -import org.springframework.transaction.annotation.Transactional; - -import java.util.List; - -/** - * 订单管理Service - * Created by macro on 2018/10/11. - */ -public interface OmsOrderService { - /** - * 订单查询 - */ - List list(OmsOrderQueryParam queryParam, Integer pageSize, Integer pageNum); - - /** - * 批量发货 - */ - @Transactional - int delivery(List deliveryParamList); - - /** - * 批量关闭订单 - */ - @Transactional - int close(List ids, String note); - - /** - * 批量删除订单 - */ - int delete(List ids); - - /** - * 获取指定订单详情 - */ - OmsOrderDetail detail(Long id); - - /** - * 修改订单收货人信息 - */ - @Transactional - int updateReceiverInfo(OmsReceiverInfoParam receiverInfoParam); - - /** - * 修改订单费用信息 - */ - @Transactional - int updateMoneyInfo(OmsMoneyInfoParam moneyInfoParam); - - /** - * 修改订单备注 - */ - @Transactional - int updateNote(Long id, String note, Integer status); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/OmsOrderSettingService.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/OmsOrderSettingService.java deleted file mode 100644 index 374a976d4..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/OmsOrderSettingService.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.macro.mall.service; - -import com.macro.mall.model.OmsOrderSetting; - -/** - * 订单设置Service - * Created by macro on 2018/10/16. - */ -public interface OmsOrderSettingService { - /** - * 获取指定订单设置 - */ - OmsOrderSetting getItem(Long id); - - /** - * 修改指定订单设置 - */ - int update(Long id, OmsOrderSetting orderSetting); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/OssService.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/OssService.java deleted file mode 100644 index 36ebf4df3..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/OssService.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.macro.mall.service; - -import com.macro.mall.dto.OssCallbackResult; -import com.macro.mall.dto.OssPolicyResult; - -import jakarta.servlet.http.HttpServletRequest; - -/** - * oss上传管理Service - * Created by macro on 2018/5/17. - */ -public interface OssService { - /** - * oss上传策略生成 - */ - OssPolicyResult policy(); - /** - * oss上传成功回调 - */ - OssCallbackResult callback(HttpServletRequest request); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/PmsBrandService.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/PmsBrandService.java deleted file mode 100644 index 8b1e11b81..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/PmsBrandService.java +++ /dev/null @@ -1,59 +0,0 @@ -package com.macro.mall.service; - -import com.macro.mall.dto.PmsBrandParam; -import com.macro.mall.model.PmsBrand; -import org.springframework.transaction.annotation.Transactional; - -import java.util.List; - -/** - * 商品品牌Service - * Created by macro on 2018/4/26. - */ -public interface PmsBrandService { - /** - * 获取所有品牌 - */ - List listAllBrand(); - - /** - * 创建品牌 - */ - int createBrand(PmsBrandParam pmsBrandParam); - - /** - * 修改品牌 - */ - @Transactional - int updateBrand(Long id, PmsBrandParam pmsBrandParam); - - /** - * 删除品牌 - */ - int deleteBrand(Long id); - - /** - * 批量删除品牌 - */ - int deleteBrand(List ids); - - /** - * 分页查询品牌 - */ - List listBrand(String keyword, int pageNum, int pageSize); - - /** - * 获取品牌 - */ - PmsBrand getBrand(Long id); - - /** - * 修改显示状态 - */ - int updateShowStatus(List ids, Integer showStatus); - - /** - * 修改厂家制造商状态 - */ - int updateFactoryStatus(List ids, Integer factoryStatus); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/PmsProductAttributeCategoryService.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/PmsProductAttributeCategoryService.java deleted file mode 100644 index 7a3c82834..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/PmsProductAttributeCategoryService.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.macro.mall.service; - -import com.macro.mall.dto.PmsProductAttributeCategoryItem; -import com.macro.mall.model.PmsProductAttributeCategory; - -import java.util.List; - -/** - * 商品属性分类Service - * Created by macro on 2018/4/26. - */ -public interface PmsProductAttributeCategoryService { - /** - * 创建属性分类 - */ - int create(String name); - - /** - * 修改属性分类 - */ - int update(Long id, String name); - - /** - * 删除属性分类 - */ - int delete(Long id); - - /** - * 获取属性分类详情 - */ - PmsProductAttributeCategory getItem(Long id); - - /** - * 分页查询属性分类 - */ - List getList(Integer pageSize, Integer pageNum); - - /** - * 获取包含属性的属性分类 - */ - List getListWithAttr(); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/PmsProductAttributeService.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/PmsProductAttributeService.java deleted file mode 100644 index 2f1b6b850..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/PmsProductAttributeService.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.macro.mall.service; - -import com.macro.mall.dto.PmsProductAttributeParam; -import com.macro.mall.dto.ProductAttrInfo; -import com.macro.mall.model.PmsProductAttribute; -import org.springframework.transaction.annotation.Transactional; - -import java.util.List; - -/** - * 商品属性Service - * Created by macro on 2018/4/26. - */ -public interface PmsProductAttributeService { - /** - * 根据分类分页获取商品属性 - * @param cid 分类id - * @param type 0->属性;2->参数 - */ - List getList(Long cid, Integer type, Integer pageSize, Integer pageNum); - - /** - * 添加商品属性 - */ - @Transactional - int create(PmsProductAttributeParam pmsProductAttributeParam); - - /** - * 修改商品属性 - */ - int update(Long id, PmsProductAttributeParam productAttributeParam); - - /** - * 获取单个商品属性信息 - */ - PmsProductAttribute getItem(Long id); - - @Transactional - int delete(List ids); - - List getProductAttrInfo(Long productCategoryId); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/PmsProductCategoryService.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/PmsProductCategoryService.java deleted file mode 100644 index ed422b2eb..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/PmsProductCategoryService.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.macro.mall.service; - -import com.macro.mall.dto.PmsProductCategoryParam; -import com.macro.mall.dto.PmsProductCategoryWithChildrenItem; -import com.macro.mall.model.PmsProductCategory; -import org.springframework.transaction.annotation.Isolation; -import org.springframework.transaction.annotation.Propagation; -import org.springframework.transaction.annotation.Transactional; - -import java.util.List; - -/** - * 商品分类Service - * Created by macro on 2018/4/26. - */ -public interface PmsProductCategoryService { - /** - * 创建商品分类 - */ - @Transactional - int create(PmsProductCategoryParam pmsProductCategoryParam); - - /** - * 修改商品分类 - */ - @Transactional - int update(Long id, PmsProductCategoryParam pmsProductCategoryParam); - - /** - * 分页获取商品分类 - */ - List getList(Long parentId, Integer pageSize, Integer pageNum); - - /** - * 删除商品分类 - */ - int delete(Long id); - - /** - * 根据ID获取商品分类 - */ - PmsProductCategory getItem(Long id); - - /** - * 批量修改导航状态 - */ - int updateNavStatus(List ids, Integer navStatus); - - /** - * 批量修改显示状态 - */ - int updateShowStatus(List ids, Integer showStatus); - - /** - * 以层级形式获取商品分类 - */ - List listWithChildren(); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/PmsProductService.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/PmsProductService.java deleted file mode 100644 index ceeae5c49..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/PmsProductService.java +++ /dev/null @@ -1,73 +0,0 @@ -package com.macro.mall.service; - -import com.macro.mall.dto.PmsProductParam; -import com.macro.mall.dto.PmsProductQueryParam; -import com.macro.mall.dto.PmsProductResult; -import com.macro.mall.model.PmsProduct; -import org.springframework.transaction.annotation.Isolation; -import org.springframework.transaction.annotation.Propagation; -import org.springframework.transaction.annotation.Transactional; - -import java.util.List; - -/** - * 商品管理Service - * Created by macro on 2018/4/26. - */ -public interface PmsProductService { - /** - * 创建商品 - */ - @Transactional(isolation = Isolation.DEFAULT,propagation = Propagation.REQUIRED) - int create(PmsProductParam productParam); - - /** - * 根据商品编号获取更新信息 - */ - PmsProductResult getUpdateInfo(Long id); - - /** - * 更新商品 - */ - @Transactional - int update(Long id, PmsProductParam productParam); - - /** - * 分页查询商品 - */ - List list(PmsProductQueryParam productQueryParam, Integer pageSize, Integer pageNum); - - /** - * 批量修改审核状态 - * @param ids 产品id - * @param verifyStatus 审核状态 - * @param detail 审核详情 - */ - @Transactional - int updateVerifyStatus(List ids, Integer verifyStatus, String detail); - - /** - * 批量修改商品上架状态 - */ - int updatePublishStatus(List ids, Integer publishStatus); - - /** - * 批量修改商品推荐状态 - */ - int updateRecommendStatus(List ids, Integer recommendStatus); - - /** - * 批量修改新品状态 - */ - int updateNewStatus(List ids, Integer newStatus); - - /** - * 批量删除商品 - */ - int updateDeleteStatus(List ids, Integer deleteStatus); - - /** - * 根据商品名称或者货号模糊查询 - */ - List list(String keyword); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/PmsSkuStockService.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/PmsSkuStockService.java deleted file mode 100644 index e3c485efd..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/PmsSkuStockService.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.macro.mall.service; - -import com.macro.mall.model.PmsSkuStock; - -import java.util.List; - -/** - * sku商品库存管理Service - * Created by macro on 2018/4/27. - */ -public interface PmsSkuStockService { - /** - * 根据产品id和skuCode模糊搜索 - */ - List getList(Long pid, String keyword); - - /** - * 批量更新商品库存信息 - */ - int update(Long pid, List skuStockList); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/SmsCouponHistoryService.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/SmsCouponHistoryService.java deleted file mode 100644 index 27c8cea0f..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/SmsCouponHistoryService.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.macro.mall.service; - -import com.macro.mall.model.SmsCouponHistory; - -import java.util.List; - -/** - * 优惠券领取记录管理Service - * Created by macro on 2018/11/6. - */ -public interface SmsCouponHistoryService { - /** - * 分页查询优惠券领取记录 - * @param couponId 优惠券id - * @param useStatus 使用状态 - * @param orderSn 使用订单号码 - */ - List list(Long couponId, Integer useStatus, String orderSn, Integer pageSize, Integer pageNum); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/SmsCouponService.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/SmsCouponService.java deleted file mode 100644 index ba9f49333..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/SmsCouponService.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.macro.mall.service; - -import com.macro.mall.dto.SmsCouponParam; -import com.macro.mall.model.SmsCoupon; -import org.springframework.transaction.annotation.Transactional; - -import java.util.List; - -/** - * 优惠券管理Service - * Created by macro on 2018/8/28. - */ -public interface SmsCouponService { - /** - * 添加优惠券 - */ - @Transactional - int create(SmsCouponParam couponParam); - - /** - * 根据优惠券id删除优惠券 - */ - @Transactional - int delete(Long id); - - /** - * 根据优惠券id更新优惠券信息 - */ - @Transactional - int update(Long id, SmsCouponParam couponParam); - - /** - * 分页获取优惠券列表 - */ - List list(String name, Integer type, Integer pageSize, Integer pageNum); - - /** - * 获取优惠券详情 - * @param id 优惠券表id - */ - SmsCouponParam getItem(Long id); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/SmsFlashPromotionProductRelationService.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/SmsFlashPromotionProductRelationService.java deleted file mode 100644 index 758fecb91..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/SmsFlashPromotionProductRelationService.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.macro.mall.service; - -import com.macro.mall.dto.SmsFlashPromotionProduct; -import com.macro.mall.model.SmsFlashPromotionProductRelation; -import org.springframework.transaction.annotation.Transactional; - -import java.util.List; - -/** - * 限时购商品关联管理Service - * Created by macro on 2018/11/16. - */ -public interface SmsFlashPromotionProductRelationService { - /** - * 批量添加关联 - */ - @Transactional - int create(List relationList); - - /** - * 修改关联相关信息 - */ - int update(Long id, SmsFlashPromotionProductRelation relation); - - /** - * 删除关联 - */ - int delete(Long id); - - /** - * 获取关联详情 - */ - SmsFlashPromotionProductRelation getItem(Long id); - - /** - * 分页查询相关商品及促销信息 - * - * @param flashPromotionId 限时购id - * @param flashPromotionSessionId 限时购场次id - */ - List list(Long flashPromotionId, Long flashPromotionSessionId, Integer pageSize, Integer pageNum); - - /** - * 根据活动和场次id获取商品关系数量 - * @param flashPromotionId - * @param flashPromotionSessionId - * @return - */ - long getCount(Long flashPromotionId,Long flashPromotionSessionId); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/SmsFlashPromotionService.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/SmsFlashPromotionService.java deleted file mode 100644 index eb8ced210..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/SmsFlashPromotionService.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.macro.mall.service; - -import com.macro.mall.model.SmsFlashPromotion; - -import java.util.List; - -/** - * 限时购活动管理Service - * Created by macro on 2018/11/16. - */ -public interface SmsFlashPromotionService { - /** - * 添加活动 - */ - int create(SmsFlashPromotion flashPromotion); - - /** - * 修改指定活动 - */ - int update(Long id, SmsFlashPromotion flashPromotion); - - /** - * 删除单个活动 - */ - int delete(Long id); - - /** - * 修改上下线状态 - */ - int updateStatus(Long id, Integer status); - - /** - * 获取详细信息 - */ - SmsFlashPromotion getItem(Long id); - - /** - * 分页查询活动 - */ - List list(String keyword, Integer pageSize, Integer pageNum); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/SmsFlashPromotionSessionService.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/SmsFlashPromotionSessionService.java deleted file mode 100644 index d54178b3b..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/SmsFlashPromotionSessionService.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.macro.mall.service; - -import com.macro.mall.dto.SmsFlashPromotionSessionDetail; -import com.macro.mall.model.SmsFlashPromotionSession; - -import java.util.List; - -/** - * 限时购场次管理Service - * Created by macro on 2018/11/16. - */ -public interface SmsFlashPromotionSessionService { - /** - * 添加场次 - */ - int create(SmsFlashPromotionSession promotionSession); - - /** - * 修改场次 - */ - int update(Long id, SmsFlashPromotionSession promotionSession); - - /** - * 修改场次启用状态 - */ - int updateStatus(Long id, Integer status); - - /** - * 删除场次 - */ - int delete(Long id); - - /** - * 获取详情 - */ - SmsFlashPromotionSession getItem(Long id); - - /** - * 根据启用状态获取场次列表 - */ - List list(); - - /** - * 获取全部可选场次及其数量 - */ - List selectList(Long flashPromotionId); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/SmsHomeAdvertiseService.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/SmsHomeAdvertiseService.java deleted file mode 100644 index c83313a57..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/SmsHomeAdvertiseService.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.macro.mall.service; - -import com.macro.mall.model.SmsHomeAdvertise; - -import java.util.List; - -/** - * 首页广告管理Service - * Created by macro on 2018/11/7. - */ -public interface SmsHomeAdvertiseService { - /** - * 添加广告 - */ - int create(SmsHomeAdvertise advertise); - - /** - * 批量删除广告 - */ - int delete(List ids); - - /** - * 修改上、下线状态 - */ - int updateStatus(Long id, Integer status); - - /** - * 获取广告详情 - */ - SmsHomeAdvertise getItem(Long id); - - /** - * 更新广告 - */ - int update(Long id, SmsHomeAdvertise advertise); - - /** - * 分页查询广告 - */ - List list(String name, Integer type, String endTime, Integer pageSize, Integer pageNum); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/SmsHomeBrandService.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/SmsHomeBrandService.java deleted file mode 100644 index 7394ec363..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/SmsHomeBrandService.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.macro.mall.service; - -import com.macro.mall.model.SmsHomeBrand; -import org.springframework.transaction.annotation.Transactional; - -import java.util.List; - -/** - * 首页品牌管理Service - * Created by macro on 2018/11/6. - */ -public interface SmsHomeBrandService { - /** - * 添加首页品牌推荐 - */ - @Transactional - int create(List homeBrandList); - - /** - * 修改品牌推荐排序 - */ - int updateSort(Long id, Integer sort); - - /** - * 批量删除品牌推荐 - */ - int delete(List ids); - - /** - * 更新推荐状态 - */ - int updateRecommendStatus(List ids, Integer recommendStatus); - - /** - * 分页查询品牌推荐 - */ - List list(String brandName, Integer recommendStatus, Integer pageSize, Integer pageNum); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/SmsHomeNewProductService.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/SmsHomeNewProductService.java deleted file mode 100644 index e64731021..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/SmsHomeNewProductService.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.macro.mall.service; - -import com.macro.mall.model.SmsHomeNewProduct; -import org.springframework.transaction.annotation.Transactional; - -import java.util.List; - -/** - * 首页新品管理Service - * Created by macro on 2018/11/6. - */ -public interface SmsHomeNewProductService { - /** - * 添加首页推荐 - */ - @Transactional - int create(List homeNewProductList); - - /** - * 修改推荐排序 - */ - int updateSort(Long id, Integer sort); - - /** - * 批量删除推荐 - */ - int delete(List ids); - - /** - * 更新推荐状态 - */ - int updateRecommendStatus(List ids, Integer recommendStatus); - - /** - * 分页查询推荐 - */ - List list(String productName, Integer recommendStatus, Integer pageSize, Integer pageNum); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/SmsHomeRecommendProductService.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/SmsHomeRecommendProductService.java deleted file mode 100644 index ec5651372..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/SmsHomeRecommendProductService.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.macro.mall.service; - -import com.macro.mall.model.SmsHomeRecommendProduct; -import org.springframework.transaction.annotation.Transactional; - -import java.util.List; - -/** - * 首页人气推荐管理Service - * Created by macro on 2018/11/7. - */ -public interface SmsHomeRecommendProductService { - /** - * 添加首页推荐 - */ - @Transactional - int create(List homeRecommendProductList); - - /** - * 修改推荐排序 - */ - int updateSort(Long id, Integer sort); - - /** - * 批量删除推荐 - */ - int delete(List ids); - - /** - * 更新推荐状态 - */ - int updateRecommendStatus(List ids, Integer recommendStatus); - - /** - * 分页查询推荐 - */ - List list(String productName, Integer recommendStatus, Integer pageSize, Integer pageNum); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/SmsHomeRecommendSubjectService.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/SmsHomeRecommendSubjectService.java deleted file mode 100644 index 2df5ae8e9..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/SmsHomeRecommendSubjectService.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.macro.mall.service; - -import com.macro.mall.model.SmsHomeRecommendSubject; -import org.springframework.transaction.annotation.Transactional; - -import java.util.List; - -/** - * 首页专题推荐管理Service - * Created by macro on 2018/11/7. - */ -public interface SmsHomeRecommendSubjectService { - /** - * 添加首页推荐 - */ - @Transactional - int create(List recommendSubjectList); - - /** - * 修改推荐排序 - */ - int updateSort(Long id, Integer sort); - - /** - * 批量删除推荐 - */ - int delete(List ids); - - /** - * 更新推荐状态 - */ - int updateRecommendStatus(List ids, Integer recommendStatus); - - /** - * 分页查询推荐 - */ - List list(String subjectName, Integer recommendStatus, Integer pageSize, Integer pageNum); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/UmsAdminCacheService.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/UmsAdminCacheService.java deleted file mode 100644 index 030fd8c2b..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/UmsAdminCacheService.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.macro.mall.service; - -import com.macro.mall.model.UmsAdmin; -import com.macro.mall.model.UmsResource; - -import java.util.List; - -/** - * 后台用户缓存操作类 - * Created by macro on 2020/3/13. - */ -public interface UmsAdminCacheService { - /** - * 删除后台用户缓存 - */ - void delAdmin(Long adminId); - - /** - * 获取缓存后台用户信息 - */ - UmsAdmin getAdmin(Long adminId); - - /** - * 设置缓存后台用户信息 - */ - void setAdmin(UmsAdmin admin); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/UmsAdminService.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/UmsAdminService.java deleted file mode 100644 index 79d6b2f9b..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/UmsAdminService.java +++ /dev/null @@ -1,83 +0,0 @@ -package com.macro.mall.service; - -import cn.dev33.satoken.stp.SaTokenInfo; -import com.macro.mall.dto.UmsAdminParam; -import com.macro.mall.dto.UpdateAdminPasswordParam; -import com.macro.mall.model.*; -import org.springframework.transaction.annotation.Transactional; - -import java.util.List; - -/** - * 后台管理员Service - * Created by macro on 2018/4/26. - */ -public interface UmsAdminService { - /** - * 根据用户名获取后台管理员 - */ - UmsAdmin getAdminByUsername(String username); - - /** - * 注册功能 - */ - UmsAdmin register(UmsAdminParam umsAdminParam); - - /** - * 登录功能 - * @param username 用户名 - * @param password 密码 - */ - SaTokenInfo login(String username, String password); - - /** - * 根据用户id获取用户 - */ - UmsAdmin getItem(Long id); - - /** - * 根据用户名或昵称分页查询用户 - */ - List list(String keyword, Integer pageSize, Integer pageNum); - - /** - * 修改指定用户信息 - */ - int update(Long id, UmsAdmin admin); - - /** - * 删除指定用户 - */ - int delete(Long id); - - /** - * 修改用户角色关系 - */ - @Transactional - int updateRole(Long adminId, List roleIds); - - /** - * 获取用户对于角色 - */ - List getRoleList(Long adminId); - - /** - * 获取指定用户的可访问资源 - */ - List getResourceList(Long adminId); - - /** - * 修改密码 - */ - int updatePassword(UpdateAdminPasswordParam updatePasswordParam); - - /** - * 获取当前登录后台用户 - */ - UmsAdmin getCurrentAdmin(); - - /** - * 登出操作 - */ - void logout(); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/UmsMemberLevelService.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/UmsMemberLevelService.java deleted file mode 100644 index b0bc8c941..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/UmsMemberLevelService.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.macro.mall.service; - -import com.macro.mall.model.UmsMemberLevel; - -import java.util.List; - -/** - * 会员等级管理Service - * Created by macro on 2018/4/26. - */ -public interface UmsMemberLevelService { - /** - * 获取所有会员登录 - * @param defaultStatus 是否为默认会员 - */ - List list(Integer defaultStatus); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/UmsMenuService.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/UmsMenuService.java deleted file mode 100644 index 2863d9d56..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/UmsMenuService.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.macro.mall.service; - -import com.macro.mall.dto.UmsMenuNode; -import com.macro.mall.model.UmsMenu; - -import java.util.List; - -/** - * 后台菜单管理Service - * Created by macro on 2020/2/2. - */ -public interface UmsMenuService { - /** - * 创建后台菜单 - */ - int create(UmsMenu umsMenu); - - /** - * 修改后台菜单 - */ - int update(Long id, UmsMenu umsMenu); - - /** - * 根据ID获取菜单详情 - */ - UmsMenu getItem(Long id); - - /** - * 根据ID删除菜单 - */ - int delete(Long id); - - /** - * 分页查询后台菜单 - */ - List list(Long parentId, Integer pageSize, Integer pageNum); - - /** - * 树形结构返回所有菜单列表 - */ - List treeList(); - - /** - * 修改菜单显示状态 - */ - int updateHidden(Long id, Integer hidden); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/UmsResourceCategoryService.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/UmsResourceCategoryService.java deleted file mode 100644 index 1ee56a279..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/UmsResourceCategoryService.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.macro.mall.service; - -import com.macro.mall.model.UmsResourceCategory; - -import java.util.List; - -/** - * 后台资源分类管理Service - * Created by macro on 2020/2/5. - */ -public interface UmsResourceCategoryService { - - /** - * 获取所有资源分类 - */ - List listAll(); - - /** - * 创建资源分类 - */ - int create(UmsResourceCategory umsResourceCategory); - - /** - * 修改资源分类 - */ - int update(Long id, UmsResourceCategory umsResourceCategory); - - /** - * 删除资源分类 - */ - int delete(Long id); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/UmsResourceService.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/UmsResourceService.java deleted file mode 100644 index ed2e2f519..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/UmsResourceService.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.macro.mall.service; - -import com.macro.mall.model.UmsResource; - -import java.util.List; -import java.util.Map; - -/** - * 后台资源管理Service - * Created by macro on 2020/2/2. - */ -public interface UmsResourceService { - /** - * 添加资源 - */ - int create(UmsResource umsResource); - - /** - * 修改资源 - */ - int update(Long id, UmsResource umsResource); - - /** - * 获取资源详情 - */ - UmsResource getItem(Long id); - - /** - * 删除资源 - */ - int delete(Long id); - - /** - * 分页查询资源 - */ - List list(Long categoryId, String nameKeyword, String urlKeyword, Integer pageSize, Integer pageNum); - - /** - * 查询全部资源 - */ - List listAll(); - - /** - * 初始化路径与资源访问规则 - */ - Map initPathResourceMap(); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/UmsRoleService.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/UmsRoleService.java deleted file mode 100644 index c54cefbb4..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/UmsRoleService.java +++ /dev/null @@ -1,66 +0,0 @@ -package com.macro.mall.service; - -import com.macro.mall.model.UmsMenu; -import com.macro.mall.model.UmsResource; -import com.macro.mall.model.UmsRole; -import org.springframework.transaction.annotation.Transactional; - -import java.util.List; - -/** - * 后台角色管理Service - * Created by macro on 2018/9/30. - */ -public interface UmsRoleService { - /** - * 添加角色 - */ - int create(UmsRole role); - - /** - * 修改角色信息 - */ - int update(Long id, UmsRole role); - - /** - * 批量删除角色 - */ - int delete(List ids); - - /** - * 获取所有角色列表 - */ - List list(); - - /** - * 分页获取角色列表 - */ - List list(String keyword, Integer pageSize, Integer pageNum); - - /** - * 根据管理员ID获取对应菜单 - */ - List getMenuList(Long adminId); - - /** - * 获取角色相关菜单 - */ - List listMenu(Long roleId); - - /** - * 获取角色相关资源 - */ - List listResource(Long roleId); - - /** - * 给角色分配菜单 - */ - @Transactional - int allocMenu(Long roleId, List menuIds); - - /** - * 给角色分配资源 - */ - @Transactional - int allocResource(Long roleId, List resourceIds); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/CmsPrefrenceAreaServiceImpl.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/CmsPrefrenceAreaServiceImpl.java deleted file mode 100644 index 8e95af17e..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/CmsPrefrenceAreaServiceImpl.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.macro.mall.service.impl; - -import com.macro.mall.mapper.CmsPrefrenceAreaMapper; -import com.macro.mall.model.CmsPrefrenceArea; -import com.macro.mall.model.CmsPrefrenceAreaExample; -import com.macro.mall.service.CmsPrefrenceAreaService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.List; - -/** - * 商品优选管理Service实现类 - * Created by macro on 2018/6/1. - */ -@Service -public class CmsPrefrenceAreaServiceImpl implements CmsPrefrenceAreaService { - @Autowired - private CmsPrefrenceAreaMapper prefrenceAreaMapper; - - @Override - public List listAll() { - return prefrenceAreaMapper.selectByExample(new CmsPrefrenceAreaExample()); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/CmsSubjectServiceImpl.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/CmsSubjectServiceImpl.java deleted file mode 100644 index 2c3b51a28..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/CmsSubjectServiceImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.macro.mall.service.impl; - -import com.github.pagehelper.PageHelper; -import com.macro.mall.mapper.CmsSubjectMapper; -import com.macro.mall.model.CmsSubject; -import com.macro.mall.model.CmsSubjectExample; -import com.macro.mall.service.CmsSubjectService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.util.StringUtils; - -import java.util.List; - -/** - * 商品专题管理Service实现类 - * Created by macro on 2018/6/1. - */ -@Service -public class CmsSubjectServiceImpl implements CmsSubjectService { - @Autowired - private CmsSubjectMapper subjectMapper; - - @Override - public List listAll() { - return subjectMapper.selectByExample(new CmsSubjectExample()); - } - - @Override - public List list(String keyword, Integer pageNum, Integer pageSize) { - PageHelper.startPage(pageNum, pageSize); - CmsSubjectExample example = new CmsSubjectExample(); - CmsSubjectExample.Criteria criteria = example.createCriteria(); - if (!StringUtils.isEmpty(keyword)) { - criteria.andTitleLike("%" + keyword + "%"); - } - return subjectMapper.selectByExample(example); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/OmsCompanyAddressServiceImpl.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/OmsCompanyAddressServiceImpl.java deleted file mode 100644 index fc2d2feb6..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/OmsCompanyAddressServiceImpl.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.macro.mall.service.impl; - -import com.macro.mall.mapper.OmsCompanyAddressMapper; -import com.macro.mall.model.OmsCompanyAddress; -import com.macro.mall.model.OmsCompanyAddressExample; -import com.macro.mall.service.OmsCompanyAddressService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.List; - -/** - * 收货地址管理Service实现类 - * Created by macro on 2018/10/18. - */ -@Service -public class OmsCompanyAddressServiceImpl implements OmsCompanyAddressService { - @Autowired - private OmsCompanyAddressMapper companyAddressMapper; - @Override - public List list() { - return companyAddressMapper.selectByExample(new OmsCompanyAddressExample()); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/OmsOrderReturnApplyServiceImpl.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/OmsOrderReturnApplyServiceImpl.java deleted file mode 100644 index d736f267a..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/OmsOrderReturnApplyServiceImpl.java +++ /dev/null @@ -1,78 +0,0 @@ -package com.macro.mall.service.impl; - -import com.github.pagehelper.PageHelper; -import com.macro.mall.dao.OmsOrderReturnApplyDao; -import com.macro.mall.dto.OmsOrderReturnApplyResult; -import com.macro.mall.dto.OmsReturnApplyQueryParam; -import com.macro.mall.dto.OmsUpdateStatusParam; -import com.macro.mall.mapper.OmsOrderReturnApplyMapper; -import com.macro.mall.model.OmsOrderReturnApply; -import com.macro.mall.model.OmsOrderReturnApplyExample; -import com.macro.mall.service.OmsOrderReturnApplyService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.Date; -import java.util.List; - -/** - * 订单退货管理Service - * Created by macro on 2018/10/18. - */ -@Service -public class OmsOrderReturnApplyServiceImpl implements OmsOrderReturnApplyService { - @Autowired - private OmsOrderReturnApplyDao returnApplyDao; - @Autowired - private OmsOrderReturnApplyMapper returnApplyMapper; - @Override - public List list(OmsReturnApplyQueryParam queryParam, Integer pageSize, Integer pageNum) { - PageHelper.startPage(pageNum,pageSize); - return returnApplyDao.getList(queryParam); - } - - @Override - public int delete(List ids) { - OmsOrderReturnApplyExample example = new OmsOrderReturnApplyExample(); - example.createCriteria().andIdIn(ids).andStatusEqualTo(3); - return returnApplyMapper.deleteByExample(example); - } - - @Override - public int updateStatus(Long id, OmsUpdateStatusParam statusParam) { - Integer status = statusParam.getStatus(); - OmsOrderReturnApply returnApply = new OmsOrderReturnApply(); - if(status.equals(1)){ - //确认退货 - returnApply.setId(id); - returnApply.setStatus(1); - returnApply.setReturnAmount(statusParam.getReturnAmount()); - returnApply.setCompanyAddressId(statusParam.getCompanyAddressId()); - returnApply.setHandleTime(new Date()); - returnApply.setHandleMan(statusParam.getHandleMan()); - returnApply.setHandleNote(statusParam.getHandleNote()); - }else if(status.equals(2)){ - //完成退货 - returnApply.setId(id); - returnApply.setStatus(2); - returnApply.setReceiveTime(new Date()); - returnApply.setReceiveMan(statusParam.getReceiveMan()); - returnApply.setReceiveNote(statusParam.getReceiveNote()); - }else if(status.equals(3)){ - //拒绝退货 - returnApply.setId(id); - returnApply.setStatus(3); - returnApply.setHandleTime(new Date()); - returnApply.setHandleMan(statusParam.getHandleMan()); - returnApply.setHandleNote(statusParam.getHandleNote()); - }else{ - return 0; - } - return returnApplyMapper.updateByPrimaryKeySelective(returnApply); - } - - @Override - public OmsOrderReturnApplyResult getItem(Long id) { - return returnApplyDao.getDetail(id); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/OmsOrderReturnReasonServiceImpl.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/OmsOrderReturnReasonServiceImpl.java deleted file mode 100644 index 69718d7e9..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/OmsOrderReturnReasonServiceImpl.java +++ /dev/null @@ -1,65 +0,0 @@ -package com.macro.mall.service.impl; - -import com.github.pagehelper.PageHelper; -import com.macro.mall.mapper.OmsOrderReturnReasonMapper; -import com.macro.mall.model.OmsOrderReturnReason; -import com.macro.mall.model.OmsOrderReturnReasonExample; -import com.macro.mall.service.OmsOrderReturnReasonService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.Date; -import java.util.List; - -/** - * 订单原因管理Service实现类 - * Created by macro on 2018/10/17. - */ -@Service -public class OmsOrderReturnReasonServiceImpl implements OmsOrderReturnReasonService { - @Autowired - private OmsOrderReturnReasonMapper returnReasonMapper; - @Override - public int create(OmsOrderReturnReason returnReason) { - returnReason.setCreateTime(new Date()); - return returnReasonMapper.insert(returnReason); - } - - @Override - public int update(Long id, OmsOrderReturnReason returnReason) { - returnReason.setId(id); - return returnReasonMapper.updateByPrimaryKey(returnReason); - } - - @Override - public int delete(List ids) { - OmsOrderReturnReasonExample example = new OmsOrderReturnReasonExample(); - example.createCriteria().andIdIn(ids); - return returnReasonMapper.deleteByExample(example); - } - - @Override - public List list(Integer pageSize, Integer pageNum) { - PageHelper.startPage(pageNum,pageSize); - OmsOrderReturnReasonExample example = new OmsOrderReturnReasonExample(); - example.setOrderByClause("sort desc"); - return returnReasonMapper.selectByExample(example); - } - - @Override - public int updateStatus(List ids, Integer status) { - if(!status.equals(0)&&!status.equals(1)){ - return 0; - } - OmsOrderReturnReason record = new OmsOrderReturnReason(); - record.setStatus(status); - OmsOrderReturnReasonExample example = new OmsOrderReturnReasonExample(); - example.createCriteria().andIdIn(ids); - return returnReasonMapper.updateByExampleSelective(record,example); - } - - @Override - public OmsOrderReturnReason getItem(Long id) { - return returnReasonMapper.selectByPrimaryKey(id); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/OmsOrderServiceImpl.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/OmsOrderServiceImpl.java deleted file mode 100644 index d552526a4..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/OmsOrderServiceImpl.java +++ /dev/null @@ -1,153 +0,0 @@ -package com.macro.mall.service.impl; - -import com.github.pagehelper.PageHelper; -import com.macro.mall.dao.OmsOrderDao; -import com.macro.mall.dao.OmsOrderOperateHistoryDao; -import com.macro.mall.dto.*; -import com.macro.mall.mapper.OmsOrderMapper; -import com.macro.mall.mapper.OmsOrderOperateHistoryMapper; -import com.macro.mall.model.OmsOrder; -import com.macro.mall.model.OmsOrderExample; -import com.macro.mall.model.OmsOrderOperateHistory; -import com.macro.mall.service.OmsOrderService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.Date; -import java.util.List; -import java.util.stream.Collectors; - -/** - * 订单管理Service实现类 - * Created by macro on 2018/10/11. - */ -@Service -public class OmsOrderServiceImpl implements OmsOrderService { - @Autowired - private OmsOrderMapper orderMapper; - @Autowired - private OmsOrderDao orderDao; - @Autowired - private OmsOrderOperateHistoryDao orderOperateHistoryDao; - @Autowired - private OmsOrderOperateHistoryMapper orderOperateHistoryMapper; - - @Override - public List list(OmsOrderQueryParam queryParam, Integer pageSize, Integer pageNum) { - PageHelper.startPage(pageNum, pageSize); - return orderDao.getList(queryParam); - } - - @Override - public int delivery(List deliveryParamList) { - //批量发货 - int count = orderDao.delivery(deliveryParamList); - //添加操作记录 - List operateHistoryList = deliveryParamList.stream() - .map(omsOrderDeliveryParam -> { - OmsOrderOperateHistory history = new OmsOrderOperateHistory(); - history.setOrderId(omsOrderDeliveryParam.getOrderId()); - history.setCreateTime(new Date()); - history.setOperateMan("后台管理员"); - history.setOrderStatus(2); - history.setNote("完成发货"); - return history; - }).collect(Collectors.toList()); - orderOperateHistoryDao.insertList(operateHistoryList); - return count; - } - - @Override - public int close(List ids, String note) { - OmsOrder record = new OmsOrder(); - record.setStatus(4); - OmsOrderExample example = new OmsOrderExample(); - example.createCriteria().andDeleteStatusEqualTo(0).andIdIn(ids); - int count = orderMapper.updateByExampleSelective(record, example); - List historyList = ids.stream().map(orderId -> { - OmsOrderOperateHistory history = new OmsOrderOperateHistory(); - history.setOrderId(orderId); - history.setCreateTime(new Date()); - history.setOperateMan("后台管理员"); - history.setOrderStatus(4); - history.setNote("订单关闭:"+note); - return history; - }).collect(Collectors.toList()); - orderOperateHistoryDao.insertList(historyList); - return count; - } - - @Override - public int delete(List ids) { - OmsOrder record = new OmsOrder(); - record.setDeleteStatus(1); - OmsOrderExample example = new OmsOrderExample(); - example.createCriteria().andDeleteStatusEqualTo(0).andIdIn(ids); - return orderMapper.updateByExampleSelective(record, example); - } - - @Override - public OmsOrderDetail detail(Long id) { - return orderDao.getDetail(id); - } - - @Override - public int updateReceiverInfo(OmsReceiverInfoParam receiverInfoParam) { - OmsOrder order = new OmsOrder(); - order.setId(receiverInfoParam.getOrderId()); - order.setReceiverName(receiverInfoParam.getReceiverName()); - order.setReceiverPhone(receiverInfoParam.getReceiverPhone()); - order.setReceiverPostCode(receiverInfoParam.getReceiverPostCode()); - order.setReceiverDetailAddress(receiverInfoParam.getReceiverDetailAddress()); - order.setReceiverProvince(receiverInfoParam.getReceiverProvince()); - order.setReceiverCity(receiverInfoParam.getReceiverCity()); - order.setReceiverRegion(receiverInfoParam.getReceiverRegion()); - order.setModifyTime(new Date()); - int count = orderMapper.updateByPrimaryKeySelective(order); - //插入操作记录 - OmsOrderOperateHistory history = new OmsOrderOperateHistory(); - history.setOrderId(receiverInfoParam.getOrderId()); - history.setCreateTime(new Date()); - history.setOperateMan("后台管理员"); - history.setOrderStatus(receiverInfoParam.getStatus()); - history.setNote("修改收货人信息"); - orderOperateHistoryMapper.insert(history); - return count; - } - - @Override - public int updateMoneyInfo(OmsMoneyInfoParam moneyInfoParam) { - OmsOrder order = new OmsOrder(); - order.setId(moneyInfoParam.getOrderId()); - order.setFreightAmount(moneyInfoParam.getFreightAmount()); - order.setDiscountAmount(moneyInfoParam.getDiscountAmount()); - order.setModifyTime(new Date()); - int count = orderMapper.updateByPrimaryKeySelective(order); - //插入操作记录 - OmsOrderOperateHistory history = new OmsOrderOperateHistory(); - history.setOrderId(moneyInfoParam.getOrderId()); - history.setCreateTime(new Date()); - history.setOperateMan("后台管理员"); - history.setOrderStatus(moneyInfoParam.getStatus()); - history.setNote("修改费用信息"); - orderOperateHistoryMapper.insert(history); - return count; - } - - @Override - public int updateNote(Long id, String note, Integer status) { - OmsOrder order = new OmsOrder(); - order.setId(id); - order.setNote(note); - order.setModifyTime(new Date()); - int count = orderMapper.updateByPrimaryKeySelective(order); - OmsOrderOperateHistory history = new OmsOrderOperateHistory(); - history.setOrderId(id); - history.setCreateTime(new Date()); - history.setOperateMan("后台管理员"); - history.setOrderStatus(status); - history.setNote("修改备注信息:"+note); - orderOperateHistoryMapper.insert(history); - return count; - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/OmsOrderSettingServiceImpl.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/OmsOrderSettingServiceImpl.java deleted file mode 100644 index ecead7b32..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/OmsOrderSettingServiceImpl.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.macro.mall.service.impl; - -import com.macro.mall.mapper.OmsOrderSettingMapper; -import com.macro.mall.model.OmsOrderSetting; -import com.macro.mall.service.OmsOrderSettingService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -/** - * 订单设置管理Service实现类 - * Created by macro on 2018/10/16. - */ -@Service -public class OmsOrderSettingServiceImpl implements OmsOrderSettingService { - @Autowired - private OmsOrderSettingMapper orderSettingMapper; - - @Override - public OmsOrderSetting getItem(Long id) { - return orderSettingMapper.selectByPrimaryKey(id); - } - - @Override - public int update(Long id, OmsOrderSetting orderSetting) { - orderSetting.setId(id); - return orderSettingMapper.updateByPrimaryKey(orderSetting); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/OssServiceImpl.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/OssServiceImpl.java deleted file mode 100644 index 8d9ee7c32..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/OssServiceImpl.java +++ /dev/null @@ -1,102 +0,0 @@ -package com.macro.mall.service.impl; - -import cn.hutool.json.JSONUtil; -import com.aliyun.oss.OSSClient; -import com.aliyun.oss.common.utils.BinaryUtil; -import com.aliyun.oss.model.MatchMode; -import com.aliyun.oss.model.PolicyConditions; -import com.macro.mall.dto.OssCallbackParam; -import com.macro.mall.dto.OssCallbackResult; -import com.macro.mall.dto.OssPolicyResult; -import com.macro.mall.service.OssService; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Service; - -import jakarta.servlet.http.HttpServletRequest; -import java.text.SimpleDateFormat; -import java.util.Date; - -/** - * oss上传管理Service实现类 - * Created by macro on 2018/5/17. - */ -@Service -public class OssServiceImpl implements OssService { - - private static final Logger LOGGER = LoggerFactory.getLogger(OssServiceImpl.class); - @Value("${aliyun.oss.policy.expire}") - private int ALIYUN_OSS_EXPIRE; - @Value("${aliyun.oss.maxSize}") - private int ALIYUN_OSS_MAX_SIZE; - @Value("${aliyun.oss.callback}") - private String ALIYUN_OSS_CALLBACK; - @Value("${aliyun.oss.bucketName}") - private String ALIYUN_OSS_BUCKET_NAME; - @Value("${aliyun.oss.endpoint}") - private String ALIYUN_OSS_ENDPOINT; - @Value("${aliyun.oss.dir.prefix}") - private String ALIYUN_OSS_DIR_PREFIX; - - @Autowired - private OSSClient ossClient; - - /** - * 签名生成 - */ - @Override - public OssPolicyResult policy() { - OssPolicyResult result = new OssPolicyResult(); - // 存储目录 - SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); - String dir = ALIYUN_OSS_DIR_PREFIX+sdf.format(new Date()); - // 签名有效期 - long expireEndTime = System.currentTimeMillis() + ALIYUN_OSS_EXPIRE * 1000; - Date expiration = new Date(expireEndTime); - // 文件大小 - long maxSize = ALIYUN_OSS_MAX_SIZE * 1024 * 1024; - // 回调 - OssCallbackParam callback = new OssCallbackParam(); - callback.setCallbackUrl(ALIYUN_OSS_CALLBACK); - callback.setCallbackBody("filename=${object}&size=${size}&mimeType=${mimeType}&height=${imageInfo.height}&width=${imageInfo.width}"); - callback.setCallbackBodyType("application/x-www-form-urlencoded"); - // 提交节点 - String action = "http://" + ALIYUN_OSS_BUCKET_NAME + "." + ALIYUN_OSS_ENDPOINT; - try { - PolicyConditions policyConds = new PolicyConditions(); - policyConds.addConditionItem(PolicyConditions.COND_CONTENT_LENGTH_RANGE, 0, maxSize); - policyConds.addConditionItem(MatchMode.StartWith, PolicyConditions.COND_KEY, dir); - String postPolicy = ossClient.generatePostPolicy(expiration, policyConds); - byte[] binaryData = postPolicy.getBytes("utf-8"); - String policy = BinaryUtil.toBase64String(binaryData); - String signature = ossClient.calculatePostSignature(postPolicy); - String callbackData = BinaryUtil.toBase64String(JSONUtil.parse(callback).toString().getBytes("utf-8")); - // 返回结果 - result.setAccessKeyId(ossClient.getCredentialsProvider().getCredentials().getAccessKeyId()); - result.setPolicy(policy); - result.setSignature(signature); - result.setDir(dir); - result.setCallback(callbackData); - result.setHost(action); - } catch (Exception e) { - LOGGER.error("签名生成失败", e); - } - return result; - } - - @Override - public OssCallbackResult callback(HttpServletRequest request) { - OssCallbackResult result= new OssCallbackResult(); - String filename = request.getParameter("filename"); - filename = "http://".concat(ALIYUN_OSS_BUCKET_NAME).concat(".").concat(ALIYUN_OSS_ENDPOINT).concat("/").concat(filename); - result.setFilename(filename); - result.setSize(request.getParameter("size")); - result.setMimeType(request.getParameter("mimeType")); - result.setWidth(request.getParameter("width")); - result.setHeight(request.getParameter("height")); - return result; - } - -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/PmsBrandServiceImpl.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/PmsBrandServiceImpl.java deleted file mode 100644 index 4245a4542..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/PmsBrandServiceImpl.java +++ /dev/null @@ -1,110 +0,0 @@ -package com.macro.mall.service.impl; - -import com.github.pagehelper.PageHelper; -import com.macro.mall.dto.PmsBrandParam; -import com.macro.mall.mapper.PmsBrandMapper; -import com.macro.mall.mapper.PmsProductMapper; -import com.macro.mall.model.PmsBrand; -import com.macro.mall.model.PmsBrandExample; -import com.macro.mall.model.PmsProduct; -import com.macro.mall.model.PmsProductExample; -import com.macro.mall.service.PmsBrandService; -import org.springframework.beans.BeanUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.util.StringUtils; - -import java.util.List; - -/** - * 商品品牌Service实现类 - * Created by macro on 2018/4/26. - */ -@Service -public class PmsBrandServiceImpl implements PmsBrandService { - @Autowired - private PmsBrandMapper brandMapper; - @Autowired - private PmsProductMapper productMapper; - - @Override - public List listAllBrand() { - return brandMapper.selectByExample(new PmsBrandExample()); - } - - @Override - public int createBrand(PmsBrandParam pmsBrandParam) { - PmsBrand pmsBrand = new PmsBrand(); - BeanUtils.copyProperties(pmsBrandParam, pmsBrand); - //如果创建时首字母为空,取名称的第一个为首字母 - if (StringUtils.isEmpty(pmsBrand.getFirstLetter())) { - pmsBrand.setFirstLetter(pmsBrand.getName().substring(0, 1)); - } - return brandMapper.insertSelective(pmsBrand); - } - - @Override - public int updateBrand(Long id, PmsBrandParam pmsBrandParam) { - PmsBrand pmsBrand = new PmsBrand(); - BeanUtils.copyProperties(pmsBrandParam, pmsBrand); - pmsBrand.setId(id); - //如果创建时首字母为空,取名称的第一个为首字母 - if (StringUtils.isEmpty(pmsBrand.getFirstLetter())) { - pmsBrand.setFirstLetter(pmsBrand.getName().substring(0, 1)); - } - //更新品牌时要更新商品中的品牌名称 - PmsProduct product = new PmsProduct(); - product.setBrandName(pmsBrand.getName()); - PmsProductExample example = new PmsProductExample(); - example.createCriteria().andBrandIdEqualTo(id); - productMapper.updateByExampleSelective(product,example); - return brandMapper.updateByPrimaryKeySelective(pmsBrand); - } - - @Override - public int deleteBrand(Long id) { - return brandMapper.deleteByPrimaryKey(id); - } - - @Override - public int deleteBrand(List ids) { - PmsBrandExample pmsBrandExample = new PmsBrandExample(); - pmsBrandExample.createCriteria().andIdIn(ids); - return brandMapper.deleteByExample(pmsBrandExample); - } - - @Override - public List listBrand(String keyword, int pageNum, int pageSize) { - PageHelper.startPage(pageNum, pageSize); - PmsBrandExample pmsBrandExample = new PmsBrandExample(); - pmsBrandExample.setOrderByClause("sort desc"); - PmsBrandExample.Criteria criteria = pmsBrandExample.createCriteria(); - if (!StringUtils.isEmpty(keyword)) { - criteria.andNameLike("%" + keyword + "%"); - } - return brandMapper.selectByExample(pmsBrandExample); - } - - @Override - public PmsBrand getBrand(Long id) { - return brandMapper.selectByPrimaryKey(id); - } - - @Override - public int updateShowStatus(List ids, Integer showStatus) { - PmsBrand pmsBrand = new PmsBrand(); - pmsBrand.setShowStatus(showStatus); - PmsBrandExample pmsBrandExample = new PmsBrandExample(); - pmsBrandExample.createCriteria().andIdIn(ids); - return brandMapper.updateByExampleSelective(pmsBrand, pmsBrandExample); - } - - @Override - public int updateFactoryStatus(List ids, Integer factoryStatus) { - PmsBrand pmsBrand = new PmsBrand(); - pmsBrand.setFactoryStatus(factoryStatus); - PmsBrandExample pmsBrandExample = new PmsBrandExample(); - pmsBrandExample.createCriteria().andIdIn(ids); - return brandMapper.updateByExampleSelective(pmsBrand, pmsBrandExample); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/PmsProductAttributeCategoryServiceImpl.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/PmsProductAttributeCategoryServiceImpl.java deleted file mode 100644 index c8b3bacb5..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/PmsProductAttributeCategoryServiceImpl.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.macro.mall.service.impl; - -import com.github.pagehelper.PageHelper; -import com.macro.mall.dao.PmsProductAttributeCategoryDao; -import com.macro.mall.dto.PmsProductAttributeCategoryItem; -import com.macro.mall.mapper.PmsProductAttributeCategoryMapper; -import com.macro.mall.model.PmsProductAttributeCategory; -import com.macro.mall.model.PmsProductAttributeCategoryExample; -import com.macro.mall.service.PmsProductAttributeCategoryService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.List; - -/** - * PmsProductAttributeCategoryService实现类 - * Created by macro on 2018/4/26. - */ -@Service -public class PmsProductAttributeCategoryServiceImpl implements PmsProductAttributeCategoryService { - @Autowired - private PmsProductAttributeCategoryMapper productAttributeCategoryMapper; - @Autowired - private PmsProductAttributeCategoryDao productAttributeCategoryDao; - - @Override - public int create(String name) { - PmsProductAttributeCategory productAttributeCategory = new PmsProductAttributeCategory(); - productAttributeCategory.setName(name); - return productAttributeCategoryMapper.insertSelective(productAttributeCategory); - } - - @Override - public int update(Long id, String name) { - PmsProductAttributeCategory productAttributeCategory = new PmsProductAttributeCategory(); - productAttributeCategory.setName(name); - productAttributeCategory.setId(id); - return productAttributeCategoryMapper.updateByPrimaryKeySelective(productAttributeCategory); - } - - @Override - public int delete(Long id) { - return productAttributeCategoryMapper.deleteByPrimaryKey(id); - } - - @Override - public PmsProductAttributeCategory getItem(Long id) { - return productAttributeCategoryMapper.selectByPrimaryKey(id); - } - - @Override - public List getList(Integer pageSize, Integer pageNum) { - PageHelper.startPage(pageNum,pageSize); - return productAttributeCategoryMapper.selectByExample(new PmsProductAttributeCategoryExample()); - } - - @Override - public List getListWithAttr() { - return productAttributeCategoryDao.getListWithAttr(); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/PmsProductAttributeServiceImpl.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/PmsProductAttributeServiceImpl.java deleted file mode 100644 index 7024a66cb..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/PmsProductAttributeServiceImpl.java +++ /dev/null @@ -1,101 +0,0 @@ -package com.macro.mall.service.impl; - -import com.github.pagehelper.PageHelper; -import com.macro.mall.dao.PmsProductAttributeDao; -import com.macro.mall.dto.PmsProductAttributeParam; -import com.macro.mall.dto.ProductAttrInfo; -import com.macro.mall.mapper.PmsProductAttributeCategoryMapper; -import com.macro.mall.mapper.PmsProductAttributeMapper; -import com.macro.mall.model.PmsProductAttribute; -import com.macro.mall.model.PmsProductAttributeCategory; -import com.macro.mall.model.PmsProductAttributeExample; -import com.macro.mall.service.PmsProductAttributeService; -import org.springframework.beans.BeanUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.List; - -/** - * 商品属性Service实现类 - * Created by macro on 2018/4/26. - */ -@Service -public class PmsProductAttributeServiceImpl implements PmsProductAttributeService { - @Autowired - private PmsProductAttributeMapper productAttributeMapper; - @Autowired - private PmsProductAttributeCategoryMapper productAttributeCategoryMapper; - @Autowired - private PmsProductAttributeDao productAttributeDao; - - @Override - public List getList(Long cid, Integer type, Integer pageSize, Integer pageNum) { - PageHelper.startPage(pageNum, pageSize); - PmsProductAttributeExample example = new PmsProductAttributeExample(); - example.setOrderByClause("sort desc"); - example.createCriteria().andProductAttributeCategoryIdEqualTo(cid).andTypeEqualTo(type); - return productAttributeMapper.selectByExample(example); - } - - @Override - public int create(PmsProductAttributeParam pmsProductAttributeParam) { - PmsProductAttribute pmsProductAttribute = new PmsProductAttribute(); - BeanUtils.copyProperties(pmsProductAttributeParam, pmsProductAttribute); - int count = productAttributeMapper.insertSelective(pmsProductAttribute); - //新增商品属性以后需要更新商品属性分类数量 - PmsProductAttributeCategory pmsProductAttributeCategory = productAttributeCategoryMapper.selectByPrimaryKey(pmsProductAttribute.getProductAttributeCategoryId()); - if(pmsProductAttribute.getType()==0){ - pmsProductAttributeCategory.setAttributeCount(pmsProductAttributeCategory.getAttributeCount()+1); - }else if(pmsProductAttribute.getType()==1){ - pmsProductAttributeCategory.setParamCount(pmsProductAttributeCategory.getParamCount()+1); - } - productAttributeCategoryMapper.updateByPrimaryKey(pmsProductAttributeCategory); - return count; - } - - @Override - public int update(Long id, PmsProductAttributeParam productAttributeParam) { - PmsProductAttribute pmsProductAttribute = new PmsProductAttribute(); - pmsProductAttribute.setId(id); - BeanUtils.copyProperties(productAttributeParam, pmsProductAttribute); - return productAttributeMapper.updateByPrimaryKeySelective(pmsProductAttribute); - } - - @Override - public PmsProductAttribute getItem(Long id) { - return productAttributeMapper.selectByPrimaryKey(id); - } - - @Override - public int delete(List ids) { - //获取分类 - PmsProductAttribute pmsProductAttribute = productAttributeMapper.selectByPrimaryKey(ids.get(0)); - Integer type = pmsProductAttribute.getType(); - PmsProductAttributeCategory pmsProductAttributeCategory = productAttributeCategoryMapper.selectByPrimaryKey(pmsProductAttribute.getProductAttributeCategoryId()); - PmsProductAttributeExample example = new PmsProductAttributeExample(); - example.createCriteria().andIdIn(ids); - int count = productAttributeMapper.deleteByExample(example); - //删除完成后修改数量 - if(type==0){ - if(pmsProductAttributeCategory.getAttributeCount()>=count){ - pmsProductAttributeCategory.setAttributeCount(pmsProductAttributeCategory.getAttributeCount()-count); - }else{ - pmsProductAttributeCategory.setAttributeCount(0); - } - }else if(type==1){ - if(pmsProductAttributeCategory.getParamCount()>=count){ - pmsProductAttributeCategory.setParamCount(pmsProductAttributeCategory.getParamCount()-count); - }else{ - pmsProductAttributeCategory.setParamCount(0); - } - } - productAttributeCategoryMapper.updateByPrimaryKey(pmsProductAttributeCategory); - return count; - } - - @Override - public List getProductAttrInfo(Long productCategoryId) { - return productAttributeDao.getProductAttrInfo(productCategoryId); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/PmsProductCategoryServiceImpl.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/PmsProductCategoryServiceImpl.java deleted file mode 100644 index ed2d34f98..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/PmsProductCategoryServiceImpl.java +++ /dev/null @@ -1,154 +0,0 @@ -package com.macro.mall.service.impl; - -import com.github.pagehelper.PageHelper; -import com.macro.mall.dao.PmsProductCategoryAttributeRelationDao; -import com.macro.mall.dao.PmsProductCategoryDao; -import com.macro.mall.dto.PmsProductCategoryParam; -import com.macro.mall.dto.PmsProductCategoryWithChildrenItem; -import com.macro.mall.mapper.PmsProductCategoryAttributeRelationMapper; -import com.macro.mall.mapper.PmsProductCategoryMapper; -import com.macro.mall.mapper.PmsProductMapper; -import com.macro.mall.model.*; -import com.macro.mall.service.PmsProductCategoryService; -import org.apache.commons.collections.CollectionUtils; -import org.springframework.beans.BeanUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.ArrayList; -import java.util.List; - -/** - * PmsProductCategoryService实现类 - * Created by macro on 2018/4/26. - */ -@Service -public class PmsProductCategoryServiceImpl implements PmsProductCategoryService { - @Autowired - private PmsProductCategoryMapper productCategoryMapper; - @Autowired - private PmsProductMapper productMapper; - @Autowired - private PmsProductCategoryAttributeRelationDao productCategoryAttributeRelationDao; - @Autowired - private PmsProductCategoryAttributeRelationMapper productCategoryAttributeRelationMapper; - @Autowired - private PmsProductCategoryDao productCategoryDao; - @Override - public int create(PmsProductCategoryParam pmsProductCategoryParam) { - PmsProductCategory productCategory = new PmsProductCategory(); - productCategory.setProductCount(0); - BeanUtils.copyProperties(pmsProductCategoryParam, productCategory); - //没有父分类时为一级分类 - setCategoryLevel(productCategory); - int count = productCategoryMapper.insertSelective(productCategory); - //创建筛选属性关联 - List productAttributeIdList = pmsProductCategoryParam.getProductAttributeIdList(); - if(!CollectionUtils.isEmpty(productAttributeIdList)){ - insertRelationList(productCategory.getId(), productAttributeIdList); - } - return count; - } - - /** - * 批量插入商品分类与筛选属性关系表 - * @param productCategoryId 商品分类id - * @param productAttributeIdList 相关商品筛选属性id集合 - */ - private void insertRelationList(Long productCategoryId, List productAttributeIdList) { - List relationList = new ArrayList<>(); - for (Long productAttrId : productAttributeIdList) { - PmsProductCategoryAttributeRelation relation = new PmsProductCategoryAttributeRelation(); - relation.setProductAttributeId(productAttrId); - relation.setProductCategoryId(productCategoryId); - relationList.add(relation); - } - productCategoryAttributeRelationDao.insertList(relationList); - } - - @Override - public int update(Long id, PmsProductCategoryParam pmsProductCategoryParam) { - PmsProductCategory productCategory = new PmsProductCategory(); - productCategory.setId(id); - BeanUtils.copyProperties(pmsProductCategoryParam, productCategory); - setCategoryLevel(productCategory); - //更新商品分类时要更新商品中的名称 - PmsProduct product = new PmsProduct(); - product.setProductCategoryName(productCategory.getName()); - PmsProductExample example = new PmsProductExample(); - example.createCriteria().andProductCategoryIdEqualTo(id); - productMapper.updateByExampleSelective(product,example); - //同时更新筛选属性的信息 - if(!CollectionUtils.isEmpty(pmsProductCategoryParam.getProductAttributeIdList())){ - PmsProductCategoryAttributeRelationExample relationExample = new PmsProductCategoryAttributeRelationExample(); - relationExample.createCriteria().andProductCategoryIdEqualTo(id); - productCategoryAttributeRelationMapper.deleteByExample(relationExample); - insertRelationList(id,pmsProductCategoryParam.getProductAttributeIdList()); - }else{ - PmsProductCategoryAttributeRelationExample relationExample = new PmsProductCategoryAttributeRelationExample(); - relationExample.createCriteria().andProductCategoryIdEqualTo(id); - productCategoryAttributeRelationMapper.deleteByExample(relationExample); - } - return productCategoryMapper.updateByPrimaryKeySelective(productCategory); - } - - @Override - public List getList(Long parentId, Integer pageSize, Integer pageNum) { - PageHelper.startPage(pageNum, pageSize); - PmsProductCategoryExample example = new PmsProductCategoryExample(); - example.setOrderByClause("sort desc"); - example.createCriteria().andParentIdEqualTo(parentId); - return productCategoryMapper.selectByExample(example); - } - - @Override - public int delete(Long id) { - return productCategoryMapper.deleteByPrimaryKey(id); - } - - @Override - public PmsProductCategory getItem(Long id) { - return productCategoryMapper.selectByPrimaryKey(id); - } - - @Override - public int updateNavStatus(List ids, Integer navStatus) { - PmsProductCategory productCategory = new PmsProductCategory(); - productCategory.setNavStatus(navStatus); - PmsProductCategoryExample example = new PmsProductCategoryExample(); - example.createCriteria().andIdIn(ids); - return productCategoryMapper.updateByExampleSelective(productCategory, example); - } - - @Override - public int updateShowStatus(List ids, Integer showStatus) { - PmsProductCategory productCategory = new PmsProductCategory(); - productCategory.setShowStatus(showStatus); - PmsProductCategoryExample example = new PmsProductCategoryExample(); - example.createCriteria().andIdIn(ids); - return productCategoryMapper.updateByExampleSelective(productCategory, example); - } - - @Override - public List listWithChildren() { - return productCategoryDao.listWithChildren(); - } - - /** - * 根据分类的parentId设置分类的level - */ - private void setCategoryLevel(PmsProductCategory productCategory) { - //没有父分类时为一级分类 - if (productCategory.getParentId() == 0) { - productCategory.setLevel(0); - } else { - //有父分类时选择根据父分类level设置 - PmsProductCategory parentCategory = productCategoryMapper.selectByPrimaryKey(productCategory.getParentId()); - if (parentCategory != null) { - productCategory.setLevel(parentCategory.getLevel() + 1); - } else { - productCategory.setLevel(0); - } - } - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/PmsProductServiceImpl.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/PmsProductServiceImpl.java deleted file mode 100644 index 8c327a428..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/PmsProductServiceImpl.java +++ /dev/null @@ -1,327 +0,0 @@ -package com.macro.mall.service.impl; - -import cn.hutool.core.collection.CollUtil; -import com.github.pagehelper.PageHelper; -import com.macro.mall.dao.*; -import com.macro.mall.dto.PmsProductParam; -import com.macro.mall.dto.PmsProductQueryParam; -import com.macro.mall.dto.PmsProductResult; -import com.macro.mall.mapper.*; -import com.macro.mall.model.*; -import com.macro.mall.service.PmsProductService; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.util.CollectionUtils; -import org.springframework.util.StringUtils; - -import java.lang.reflect.Method; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.stream.Collectors; - -/** - * 商品管理Service实现类 - * Created by macro on 2018/4/26. - */ -@Service -public class PmsProductServiceImpl implements PmsProductService { - private static final Logger LOGGER = LoggerFactory.getLogger(PmsProductServiceImpl.class); - @Autowired - private PmsProductMapper productMapper; - @Autowired - private PmsMemberPriceDao memberPriceDao; - @Autowired - private PmsMemberPriceMapper memberPriceMapper; - @Autowired - private PmsProductLadderDao productLadderDao; - @Autowired - private PmsProductLadderMapper productLadderMapper; - @Autowired - private PmsProductFullReductionDao productFullReductionDao; - @Autowired - private PmsProductFullReductionMapper productFullReductionMapper; - @Autowired - private PmsSkuStockDao skuStockDao; - @Autowired - private PmsSkuStockMapper skuStockMapper; - @Autowired - private PmsProductAttributeValueDao productAttributeValueDao; - @Autowired - private PmsProductAttributeValueMapper productAttributeValueMapper; - @Autowired - private CmsSubjectProductRelationDao subjectProductRelationDao; - @Autowired - private CmsSubjectProductRelationMapper subjectProductRelationMapper; - @Autowired - private CmsPrefrenceAreaProductRelationDao prefrenceAreaProductRelationDao; - @Autowired - private CmsPrefrenceAreaProductRelationMapper prefrenceAreaProductRelationMapper; - @Autowired - private PmsProductDao productDao; - @Autowired - private PmsProductVertifyRecordDao productVertifyRecordDao; - - @Override - public int create(PmsProductParam productParam) { - int count; - //创建商品 - PmsProduct product = productParam; - product.setId(null); - productMapper.insertSelective(product); - //根据促销类型设置价格:会员价格、阶梯价格、满减价格 - Long productId = product.getId(); - //会员价格 - relateAndInsertList(memberPriceDao, productParam.getMemberPriceList(), productId); - //阶梯价格 - relateAndInsertList(productLadderDao, productParam.getProductLadderList(), productId); - //满减价格 - relateAndInsertList(productFullReductionDao, productParam.getProductFullReductionList(), productId); - //处理sku的编码 - handleSkuStockCode(productParam.getSkuStockList(),productId); - //添加sku库存信息 - relateAndInsertList(skuStockDao, productParam.getSkuStockList(), productId); - //添加商品参数,添加自定义商品规格 - relateAndInsertList(productAttributeValueDao, productParam.getProductAttributeValueList(), productId); - //关联专题 - relateAndInsertList(subjectProductRelationDao, productParam.getSubjectProductRelationList(), productId); - //关联优选 - relateAndInsertList(prefrenceAreaProductRelationDao, productParam.getPrefrenceAreaProductRelationList(), productId); - count = 1; - return count; - } - - private void handleSkuStockCode(List skuStockList, Long productId) { - if(CollectionUtils.isEmpty(skuStockList))return; - for(int i=0;i currSkuList = productParam.getSkuStockList(); - //当前没有sku直接删除 - if(CollUtil.isEmpty(currSkuList)){ - PmsSkuStockExample skuStockExample = new PmsSkuStockExample(); - skuStockExample.createCriteria().andProductIdEqualTo(id); - skuStockMapper.deleteByExample(skuStockExample); - return; - } - //获取初始sku信息 - PmsSkuStockExample skuStockExample = new PmsSkuStockExample(); - skuStockExample.createCriteria().andProductIdEqualTo(id); - List oriStuList = skuStockMapper.selectByExample(skuStockExample); - //获取新增sku信息 - List insertSkuList = currSkuList.stream().filter(item->item.getId()==null).collect(Collectors.toList()); - //获取需要更新的sku信息 - List updateSkuList = currSkuList.stream().filter(item->item.getId()!=null).collect(Collectors.toList()); - List updateSkuIds = updateSkuList.stream().map(PmsSkuStock::getId).collect(Collectors.toList()); - //获取需要删除的sku信息 - List removeSkuList = oriStuList.stream().filter(item-> !updateSkuIds.contains(item.getId())).collect(Collectors.toList()); - handleSkuStockCode(insertSkuList,id); - handleSkuStockCode(updateSkuList,id); - //新增sku - if(CollUtil.isNotEmpty(insertSkuList)){ - relateAndInsertList(skuStockDao, insertSkuList, id); - } - //删除sku - if(CollUtil.isNotEmpty(removeSkuList)){ - List removeSkuIds = removeSkuList.stream().map(PmsSkuStock::getId).collect(Collectors.toList()); - PmsSkuStockExample removeExample = new PmsSkuStockExample(); - removeExample.createCriteria().andIdIn(removeSkuIds); - skuStockMapper.deleteByExample(removeExample); - } - //修改sku - if(CollUtil.isNotEmpty(updateSkuList)){ - for (PmsSkuStock pmsSkuStock : updateSkuList) { - skuStockMapper.updateByPrimaryKeySelective(pmsSkuStock); - } - } - - } - - @Override - public List list(PmsProductQueryParam productQueryParam, Integer pageSize, Integer pageNum) { - PageHelper.startPage(pageNum, pageSize); - PmsProductExample productExample = new PmsProductExample(); - PmsProductExample.Criteria criteria = productExample.createCriteria(); - criteria.andDeleteStatusEqualTo(0); - if (productQueryParam.getPublishStatus() != null) { - criteria.andPublishStatusEqualTo(productQueryParam.getPublishStatus()); - } - if (productQueryParam.getVerifyStatus() != null) { - criteria.andVerifyStatusEqualTo(productQueryParam.getVerifyStatus()); - } - if (!StringUtils.isEmpty(productQueryParam.getKeyword())) { - criteria.andNameLike("%" + productQueryParam.getKeyword() + "%"); - } - if (!StringUtils.isEmpty(productQueryParam.getProductSn())) { - criteria.andProductSnEqualTo(productQueryParam.getProductSn()); - } - if (productQueryParam.getBrandId() != null) { - criteria.andBrandIdEqualTo(productQueryParam.getBrandId()); - } - if (productQueryParam.getProductCategoryId() != null) { - criteria.andProductCategoryIdEqualTo(productQueryParam.getProductCategoryId()); - } - return productMapper.selectByExample(productExample); - } - - @Override - public int updateVerifyStatus(List ids, Integer verifyStatus, String detail) { - PmsProduct product = new PmsProduct(); - product.setVerifyStatus(verifyStatus); - PmsProductExample example = new PmsProductExample(); - example.createCriteria().andIdIn(ids); - List list = new ArrayList<>(); - int count = productMapper.updateByExampleSelective(product, example); - //修改完审核状态后插入审核记录 - for (Long id : ids) { - PmsProductVertifyRecord record = new PmsProductVertifyRecord(); - record.setProductId(id); - record.setCreateTime(new Date()); - record.setDetail(detail); - record.setStatus(verifyStatus); - record.setVertifyMan("test"); - list.add(record); - } - productVertifyRecordDao.insertList(list); - return count; - } - - @Override - public int updatePublishStatus(List ids, Integer publishStatus) { - PmsProduct record = new PmsProduct(); - record.setPublishStatus(publishStatus); - PmsProductExample example = new PmsProductExample(); - example.createCriteria().andIdIn(ids); - return productMapper.updateByExampleSelective(record, example); - } - - @Override - public int updateRecommendStatus(List ids, Integer recommendStatus) { - PmsProduct record = new PmsProduct(); - record.setRecommandStatus(recommendStatus); - PmsProductExample example = new PmsProductExample(); - example.createCriteria().andIdIn(ids); - return productMapper.updateByExampleSelective(record, example); - } - - @Override - public int updateNewStatus(List ids, Integer newStatus) { - PmsProduct record = new PmsProduct(); - record.setNewStatus(newStatus); - PmsProductExample example = new PmsProductExample(); - example.createCriteria().andIdIn(ids); - return productMapper.updateByExampleSelective(record, example); - } - - @Override - public int updateDeleteStatus(List ids, Integer deleteStatus) { - PmsProduct record = new PmsProduct(); - record.setDeleteStatus(deleteStatus); - PmsProductExample example = new PmsProductExample(); - example.createCriteria().andIdIn(ids); - return productMapper.updateByExampleSelective(record, example); - } - - @Override - public List list(String keyword) { - PmsProductExample productExample = new PmsProductExample(); - PmsProductExample.Criteria criteria = productExample.createCriteria(); - criteria.andDeleteStatusEqualTo(0); - if(!StringUtils.isEmpty(keyword)){ - criteria.andNameLike("%" + keyword + "%"); - productExample.or().andDeleteStatusEqualTo(0).andProductSnLike("%" + keyword + "%"); - } - return productMapper.selectByExample(productExample); - } - - /** - * 建立和插入关系表操作 - * - * @param dao 可以操作的dao - * @param dataList 要插入的数据 - * @param productId 建立关系的id - */ - private void relateAndInsertList(Object dao, List dataList, Long productId) { - try { - if (CollectionUtils.isEmpty(dataList)) return; - for (Object item : dataList) { - Method setId = item.getClass().getMethod("setId", Long.class); - setId.invoke(item, (Long) null); - Method setProductId = item.getClass().getMethod("setProductId", Long.class); - setProductId.invoke(item, productId); - } - Method insertList = dao.getClass().getMethod("insertList", List.class); - insertList.invoke(dao, dataList); - } catch (Exception e) { - LOGGER.warn("创建产品出错:{}", e.getMessage()); - throw new RuntimeException(e.getMessage()); - } - } - -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/PmsSkuStockServiceImpl.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/PmsSkuStockServiceImpl.java deleted file mode 100644 index 457d06584..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/PmsSkuStockServiceImpl.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.macro.mall.service.impl; - -import com.macro.mall.dao.PmsSkuStockDao; -import com.macro.mall.mapper.PmsSkuStockMapper; -import com.macro.mall.model.PmsSkuStock; -import com.macro.mall.model.PmsSkuStockExample; -import com.macro.mall.service.PmsSkuStockService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.util.StringUtils; - -import java.util.List; - -/** - * 商品sku库存管理Service实现类 - * Created by macro on 2018/4/27. - */ -@Service -public class PmsSkuStockServiceImpl implements PmsSkuStockService { - @Autowired - private PmsSkuStockMapper skuStockMapper; - @Autowired - private PmsSkuStockDao skuStockDao; - - @Override - public List getList(Long pid, String keyword) { - PmsSkuStockExample example = new PmsSkuStockExample(); - PmsSkuStockExample.Criteria criteria = example.createCriteria().andProductIdEqualTo(pid); - if (!StringUtils.isEmpty(keyword)) { - criteria.andSkuCodeLike("%" + keyword + "%"); - } - return skuStockMapper.selectByExample(example); - } - - @Override - public int update(Long pid, List skuStockList) { - return skuStockDao.replaceList(skuStockList); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/SmsCouponHistoryServiceImpl.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/SmsCouponHistoryServiceImpl.java deleted file mode 100644 index 5969f57cf..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/SmsCouponHistoryServiceImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.macro.mall.service.impl; - -import com.github.pagehelper.PageHelper; -import com.macro.mall.mapper.SmsCouponHistoryMapper; -import com.macro.mall.model.SmsCouponHistory; -import com.macro.mall.model.SmsCouponHistoryExample; -import com.macro.mall.service.SmsCouponHistoryService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.util.StringUtils; - -import java.util.List; - -/** - * 优惠券领取记录管理Service实现类 - * Created by macro on 2018/11/6. - */ -@Service -public class SmsCouponHistoryServiceImpl implements SmsCouponHistoryService { - @Autowired - private SmsCouponHistoryMapper historyMapper; - @Override - public List list(Long couponId, Integer useStatus, String orderSn, Integer pageSize, Integer pageNum) { - PageHelper.startPage(pageNum,pageSize); - SmsCouponHistoryExample example = new SmsCouponHistoryExample(); - SmsCouponHistoryExample.Criteria criteria = example.createCriteria(); - if(couponId!=null){ - criteria.andCouponIdEqualTo(couponId); - } - if(useStatus!=null){ - criteria.andUseStatusEqualTo(useStatus); - } - if(!StringUtils.isEmpty(orderSn)){ - criteria.andOrderSnEqualTo(orderSn); - } - return historyMapper.selectByExample(example); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/SmsCouponServiceImpl.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/SmsCouponServiceImpl.java deleted file mode 100644 index fe779e3cb..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/SmsCouponServiceImpl.java +++ /dev/null @@ -1,125 +0,0 @@ -package com.macro.mall.service.impl; - -import com.github.pagehelper.PageHelper; -import com.macro.mall.dao.SmsCouponDao; -import com.macro.mall.dao.SmsCouponProductCategoryRelationDao; -import com.macro.mall.dao.SmsCouponProductRelationDao; -import com.macro.mall.dto.SmsCouponParam; -import com.macro.mall.mapper.SmsCouponMapper; -import com.macro.mall.mapper.SmsCouponProductCategoryRelationMapper; -import com.macro.mall.mapper.SmsCouponProductRelationMapper; -import com.macro.mall.model.*; -import com.macro.mall.service.SmsCouponService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.util.StringUtils; - -import java.util.List; - -/** - * 优惠券管理Service实现类 - * Created by macro on 2018/8/28. - */ -@Service -public class SmsCouponServiceImpl implements SmsCouponService { - @Autowired - private SmsCouponMapper couponMapper; - @Autowired - private SmsCouponProductRelationMapper productRelationMapper; - @Autowired - private SmsCouponProductCategoryRelationMapper productCategoryRelationMapper; - @Autowired - private SmsCouponProductRelationDao productRelationDao; - @Autowired - private SmsCouponProductCategoryRelationDao productCategoryRelationDao; - @Autowired - private SmsCouponDao couponDao; - @Override - public int create(SmsCouponParam couponParam) { - couponParam.setCount(couponParam.getPublishCount()); - couponParam.setUseCount(0); - couponParam.setReceiveCount(0); - //插入优惠券表 - int count = couponMapper.insert(couponParam); - //插入优惠券和商品关系表 - if(couponParam.getUseType().equals(2)){ - for(SmsCouponProductRelation productRelation:couponParam.getProductRelationList()){ - productRelation.setCouponId(couponParam.getId()); - } - productRelationDao.insertList(couponParam.getProductRelationList()); - } - //插入优惠券和商品分类关系表 - if(couponParam.getUseType().equals(1)){ - for (SmsCouponProductCategoryRelation couponProductCategoryRelation : couponParam.getProductCategoryRelationList()) { - couponProductCategoryRelation.setCouponId(couponParam.getId()); - } - productCategoryRelationDao.insertList(couponParam.getProductCategoryRelationList()); - } - return count; - } - - @Override - public int delete(Long id) { - //删除优惠券 - int count = couponMapper.deleteByPrimaryKey(id); - //删除商品关联 - deleteProductRelation(id); - //删除商品分类关联 - deleteProductCategoryRelation(id); - return count; - } - - private void deleteProductCategoryRelation(Long id) { - SmsCouponProductCategoryRelationExample productCategoryRelationExample = new SmsCouponProductCategoryRelationExample(); - productCategoryRelationExample.createCriteria().andCouponIdEqualTo(id); - productCategoryRelationMapper.deleteByExample(productCategoryRelationExample); - } - - private void deleteProductRelation(Long id) { - SmsCouponProductRelationExample productRelationExample = new SmsCouponProductRelationExample(); - productRelationExample.createCriteria().andCouponIdEqualTo(id); - productRelationMapper.deleteByExample(productRelationExample); - } - - @Override - public int update(Long id, SmsCouponParam couponParam) { - couponParam.setId(id); - int count =couponMapper.updateByPrimaryKey(couponParam); - //删除后插入优惠券和商品关系表 - if(couponParam.getUseType().equals(2)){ - for(SmsCouponProductRelation productRelation:couponParam.getProductRelationList()){ - productRelation.setCouponId(couponParam.getId()); - } - deleteProductRelation(id); - productRelationDao.insertList(couponParam.getProductRelationList()); - } - //删除后插入优惠券和商品分类关系表 - if(couponParam.getUseType().equals(1)){ - for (SmsCouponProductCategoryRelation couponProductCategoryRelation : couponParam.getProductCategoryRelationList()) { - couponProductCategoryRelation.setCouponId(couponParam.getId()); - } - deleteProductCategoryRelation(id); - productCategoryRelationDao.insertList(couponParam.getProductCategoryRelationList()); - } - return count; - } - - @Override - public List list(String name, Integer type, Integer pageSize, Integer pageNum) { - SmsCouponExample example = new SmsCouponExample(); - SmsCouponExample.Criteria criteria = example.createCriteria(); - if(!StringUtils.isEmpty(name)){ - criteria.andNameLike("%"+name+"%"); - } - if(type!=null){ - criteria.andTypeEqualTo(type); - } - PageHelper.startPage(pageNum,pageSize); - return couponMapper.selectByExample(example); - } - - @Override - public SmsCouponParam getItem(Long id) { - return couponDao.getItem(id); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/SmsFlashPromotionProductRelationServiceImpl.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/SmsFlashPromotionProductRelationServiceImpl.java deleted file mode 100644 index 12e425189..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/SmsFlashPromotionProductRelationServiceImpl.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.macro.mall.service.impl; - -import com.github.pagehelper.PageHelper; -import com.macro.mall.dao.SmsFlashPromotionProductRelationDao; -import com.macro.mall.dto.SmsFlashPromotionProduct; -import com.macro.mall.mapper.SmsFlashPromotionProductRelationMapper; -import com.macro.mall.model.SmsFlashPromotionProductRelation; -import com.macro.mall.model.SmsFlashPromotionProductRelationExample; -import com.macro.mall.service.SmsFlashPromotionProductRelationService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.List; - -/** - * 限时购商品关联管理Service实现类 - * Created by macro on 2018/11/16. - */ -@Service -public class SmsFlashPromotionProductRelationServiceImpl implements SmsFlashPromotionProductRelationService { - @Autowired - private SmsFlashPromotionProductRelationMapper relationMapper; - @Autowired - private SmsFlashPromotionProductRelationDao relationDao; - @Override - public int create(List relationList) { - for (SmsFlashPromotionProductRelation relation : relationList) { - relationMapper.insert(relation); - } - return relationList.size(); - } - - @Override - public int update(Long id, SmsFlashPromotionProductRelation relation) { - relation.setId(id); - return relationMapper.updateByPrimaryKey(relation); - } - - @Override - public int delete(Long id) { - return relationMapper.deleteByPrimaryKey(id); - } - - @Override - public SmsFlashPromotionProductRelation getItem(Long id) { - return relationMapper.selectByPrimaryKey(id); - } - - @Override - public List list(Long flashPromotionId, Long flashPromotionSessionId, Integer pageSize, Integer pageNum) { - PageHelper.startPage(pageNum,pageSize); - return relationDao.getList(flashPromotionId,flashPromotionSessionId); - } - - @Override - public long getCount(Long flashPromotionId, Long flashPromotionSessionId) { - SmsFlashPromotionProductRelationExample example = new SmsFlashPromotionProductRelationExample(); - example.createCriteria() - .andFlashPromotionIdEqualTo(flashPromotionId) - .andFlashPromotionSessionIdEqualTo(flashPromotionSessionId); - return relationMapper.countByExample(example); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/SmsFlashPromotionServiceImpl.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/SmsFlashPromotionServiceImpl.java deleted file mode 100644 index d8f09caac..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/SmsFlashPromotionServiceImpl.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.macro.mall.service.impl; - -import com.github.pagehelper.PageHelper; -import com.macro.mall.mapper.SmsFlashPromotionMapper; -import com.macro.mall.model.SmsFlashPromotion; -import com.macro.mall.model.SmsFlashPromotionExample; -import com.macro.mall.service.SmsFlashPromotionService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.util.StringUtils; - -import java.util.Date; -import java.util.List; - -/** - * 限时购活动管理Service实现类 - * Created by macro on 2018/11/16. - */ -@Service -public class SmsFlashPromotionServiceImpl implements SmsFlashPromotionService { - @Autowired - private SmsFlashPromotionMapper flashPromotionMapper; - - @Override - public int create(SmsFlashPromotion flashPromotion) { - flashPromotion.setCreateTime(new Date()); - return flashPromotionMapper.insert(flashPromotion); - } - - @Override - public int update(Long id, SmsFlashPromotion flashPromotion) { - flashPromotion.setId(id); - return flashPromotionMapper.updateByPrimaryKey(flashPromotion); - } - - @Override - public int delete(Long id) { - return flashPromotionMapper.deleteByPrimaryKey(id); - } - - @Override - public int updateStatus(Long id, Integer status) { - SmsFlashPromotion flashPromotion = new SmsFlashPromotion(); - flashPromotion.setId(id); - flashPromotion.setStatus(status); - return flashPromotionMapper.updateByPrimaryKeySelective(flashPromotion); - } - - @Override - public SmsFlashPromotion getItem(Long id) { - return flashPromotionMapper.selectByPrimaryKey(id); - } - - @Override - public List list(String keyword, Integer pageSize, Integer pageNum) { - PageHelper.startPage(pageNum, pageSize); - SmsFlashPromotionExample example = new SmsFlashPromotionExample(); - if (!StringUtils.isEmpty(keyword)) { - example.createCriteria().andTitleLike("%" + keyword + "%"); - } - return flashPromotionMapper.selectByExample(example); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/SmsFlashPromotionSessionServiceImpl.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/SmsFlashPromotionSessionServiceImpl.java deleted file mode 100644 index c83067604..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/SmsFlashPromotionSessionServiceImpl.java +++ /dev/null @@ -1,79 +0,0 @@ -package com.macro.mall.service.impl; - -import com.macro.mall.dto.SmsFlashPromotionSessionDetail; -import com.macro.mall.mapper.SmsFlashPromotionSessionMapper; -import com.macro.mall.model.SmsFlashPromotionSession; -import com.macro.mall.model.SmsFlashPromotionSessionExample; -import com.macro.mall.service.SmsFlashPromotionProductRelationService; -import com.macro.mall.service.SmsFlashPromotionSessionService; -import org.springframework.beans.BeanUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -/** - * 限时购场次管理Service实现类 - * Created by macro on 2018/11/16. - */ -@Service -public class SmsFlashPromotionSessionServiceImpl implements SmsFlashPromotionSessionService { - @Autowired - private SmsFlashPromotionSessionMapper promotionSessionMapper; - @Autowired - private SmsFlashPromotionProductRelationService relationService; - - @Override - public int create(SmsFlashPromotionSession promotionSession) { - promotionSession.setCreateTime(new Date()); - return promotionSessionMapper.insert(promotionSession); - } - - @Override - public int update(Long id, SmsFlashPromotionSession promotionSession) { - promotionSession.setId(id); - return promotionSessionMapper.updateByPrimaryKey(promotionSession); - } - - @Override - public int updateStatus(Long id, Integer status) { - SmsFlashPromotionSession promotionSession = new SmsFlashPromotionSession(); - promotionSession.setId(id); - promotionSession.setStatus(status); - return promotionSessionMapper.updateByPrimaryKeySelective(promotionSession); - } - - @Override - public int delete(Long id) { - return promotionSessionMapper.deleteByPrimaryKey(id); - } - - @Override - public SmsFlashPromotionSession getItem(Long id) { - return promotionSessionMapper.selectByPrimaryKey(id); - } - - @Override - public List list() { - SmsFlashPromotionSessionExample example = new SmsFlashPromotionSessionExample(); - return promotionSessionMapper.selectByExample(example); - } - - @Override - public List selectList(Long flashPromotionId) { - List result = new ArrayList<>(); - SmsFlashPromotionSessionExample example = new SmsFlashPromotionSessionExample(); - example.createCriteria().andStatusEqualTo(1); - List list = promotionSessionMapper.selectByExample(example); - for (SmsFlashPromotionSession promotionSession : list) { - SmsFlashPromotionSessionDetail detail = new SmsFlashPromotionSessionDetail(); - BeanUtils.copyProperties(promotionSession, detail); - long count = relationService.getCount(flashPromotionId, promotionSession.getId()); - detail.setProductCount(count); - result.add(detail); - } - return result; - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/SmsHomeAdvertiseServiceImpl.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/SmsHomeAdvertiseServiceImpl.java deleted file mode 100644 index a8c1dd10f..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/SmsHomeAdvertiseServiceImpl.java +++ /dev/null @@ -1,93 +0,0 @@ -package com.macro.mall.service.impl; - -import com.github.pagehelper.PageHelper; -import com.macro.mall.mapper.SmsHomeAdvertiseMapper; -import com.macro.mall.model.SmsHomeAdvertise; -import com.macro.mall.model.SmsHomeAdvertiseExample; -import com.macro.mall.service.SmsHomeAdvertiseService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.util.StringUtils; - -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.List; - -/** - * 首页广告管理Service实现类 - * Created by macro on 2018/11/7. - */ -@Service -public class SmsHomeAdvertiseServiceImpl implements SmsHomeAdvertiseService { - @Autowired - private SmsHomeAdvertiseMapper advertiseMapper; - - @Override - public int create(SmsHomeAdvertise advertise) { - advertise.setClickCount(0); - advertise.setOrderCount(0); - return advertiseMapper.insert(advertise); - } - - @Override - public int delete(List ids) { - SmsHomeAdvertiseExample example = new SmsHomeAdvertiseExample(); - example.createCriteria().andIdIn(ids); - return advertiseMapper.deleteByExample(example); - } - - @Override - public int updateStatus(Long id, Integer status) { - SmsHomeAdvertise record = new SmsHomeAdvertise(); - record.setId(id); - record.setStatus(status); - return advertiseMapper.updateByPrimaryKeySelective(record); - } - - @Override - public SmsHomeAdvertise getItem(Long id) { - return advertiseMapper.selectByPrimaryKey(id); - } - - @Override - public int update(Long id, SmsHomeAdvertise advertise) { - advertise.setId(id); - return advertiseMapper.updateByPrimaryKeySelective(advertise); - } - - @Override - public List list(String name, Integer type, String endTime, Integer pageSize, Integer pageNum) { - PageHelper.startPage(pageNum, pageSize); - SmsHomeAdvertiseExample example = new SmsHomeAdvertiseExample(); - SmsHomeAdvertiseExample.Criteria criteria = example.createCriteria(); - if (!StringUtils.isEmpty(name)) { - criteria.andNameLike("%" + name + "%"); - } - if (type != null) { - criteria.andTypeEqualTo(type); - } - if (!StringUtils.isEmpty(endTime)) { - String startStr = endTime + " 00:00:00"; - String endStr = endTime + " 23:59:59"; - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - Date start = null; - try { - start = sdf.parse(startStr); - } catch (ParseException e) { - e.printStackTrace(); - } - Date end = null; - try { - end = sdf.parse(endStr); - } catch (ParseException e) { - e.printStackTrace(); - } - if (start != null && end != null) { - criteria.andEndTimeBetween(start, end); - } - } - example.setOrderByClause("sort desc"); - return advertiseMapper.selectByExample(example); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/SmsHomeBrandServiceImpl.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/SmsHomeBrandServiceImpl.java deleted file mode 100644 index b7afa122b..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/SmsHomeBrandServiceImpl.java +++ /dev/null @@ -1,70 +0,0 @@ -package com.macro.mall.service.impl; - -import com.github.pagehelper.PageHelper; -import com.macro.mall.mapper.SmsHomeBrandMapper; -import com.macro.mall.model.SmsHomeBrand; -import com.macro.mall.model.SmsHomeBrandExample; -import com.macro.mall.service.SmsHomeBrandService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.util.StringUtils; - -import java.util.List; - -/** - * 首页品牌管理Service实现类 - * Created by macro on 2018/11/6. - */ -@Service -public class SmsHomeBrandServiceImpl implements SmsHomeBrandService { - @Autowired - private SmsHomeBrandMapper homeBrandMapper; - @Override - public int create(List homeBrandList) { - for (SmsHomeBrand smsHomeBrand : homeBrandList) { - smsHomeBrand.setRecommendStatus(1); - smsHomeBrand.setSort(0); - homeBrandMapper.insert(smsHomeBrand); - } - return homeBrandList.size(); - } - - @Override - public int updateSort(Long id, Integer sort) { - SmsHomeBrand homeBrand = new SmsHomeBrand(); - homeBrand.setId(id); - homeBrand.setSort(sort); - return homeBrandMapper.updateByPrimaryKeySelective(homeBrand); - } - - @Override - public int delete(List ids) { - SmsHomeBrandExample example = new SmsHomeBrandExample(); - example.createCriteria().andIdIn(ids); - return homeBrandMapper.deleteByExample(example); - } - - @Override - public int updateRecommendStatus(List ids, Integer recommendStatus) { - SmsHomeBrandExample example = new SmsHomeBrandExample(); - example.createCriteria().andIdIn(ids); - SmsHomeBrand record = new SmsHomeBrand(); - record.setRecommendStatus(recommendStatus); - return homeBrandMapper.updateByExampleSelective(record,example); - } - - @Override - public List list(String brandName, Integer recommendStatus, Integer pageSize, Integer pageNum) { - PageHelper.startPage(pageNum,pageSize); - SmsHomeBrandExample example = new SmsHomeBrandExample(); - SmsHomeBrandExample.Criteria criteria = example.createCriteria(); - if(!StringUtils.isEmpty(brandName)){ - criteria.andBrandNameLike("%"+brandName+"%"); - } - if(recommendStatus!=null){ - criteria.andRecommendStatusEqualTo(recommendStatus); - } - example.setOrderByClause("sort desc"); - return homeBrandMapper.selectByExample(example); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/SmsHomeNewProductServiceImpl.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/SmsHomeNewProductServiceImpl.java deleted file mode 100644 index 69e552c30..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/SmsHomeNewProductServiceImpl.java +++ /dev/null @@ -1,70 +0,0 @@ -package com.macro.mall.service.impl; - -import com.github.pagehelper.PageHelper; -import com.macro.mall.mapper.SmsHomeNewProductMapper; -import com.macro.mall.model.SmsHomeNewProduct; -import com.macro.mall.model.SmsHomeNewProductExample; -import com.macro.mall.service.SmsHomeNewProductService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.util.StringUtils; - -import java.util.List; - -/** - * 首页新品推荐管理Service实现类 - * Created by macro on 2018/11/6. - */ -@Service -public class SmsHomeNewProductServiceImpl implements SmsHomeNewProductService { - @Autowired - private SmsHomeNewProductMapper homeNewProductMapper; - @Override - public int create(List homeNewProductList) { - for (SmsHomeNewProduct SmsHomeNewProduct : homeNewProductList) { - SmsHomeNewProduct.setRecommendStatus(1); - SmsHomeNewProduct.setSort(0); - homeNewProductMapper.insert(SmsHomeNewProduct); - } - return homeNewProductList.size(); - } - - @Override - public int updateSort(Long id, Integer sort) { - SmsHomeNewProduct homeNewProduct = new SmsHomeNewProduct(); - homeNewProduct.setId(id); - homeNewProduct.setSort(sort); - return homeNewProductMapper.updateByPrimaryKeySelective(homeNewProduct); - } - - @Override - public int delete(List ids) { - SmsHomeNewProductExample example = new SmsHomeNewProductExample(); - example.createCriteria().andIdIn(ids); - return homeNewProductMapper.deleteByExample(example); - } - - @Override - public int updateRecommendStatus(List ids, Integer recommendStatus) { - SmsHomeNewProductExample example = new SmsHomeNewProductExample(); - example.createCriteria().andIdIn(ids); - SmsHomeNewProduct record = new SmsHomeNewProduct(); - record.setRecommendStatus(recommendStatus); - return homeNewProductMapper.updateByExampleSelective(record,example); - } - - @Override - public List list(String productName, Integer recommendStatus, Integer pageSize, Integer pageNum) { - PageHelper.startPage(pageNum,pageSize); - SmsHomeNewProductExample example = new SmsHomeNewProductExample(); - SmsHomeNewProductExample.Criteria criteria = example.createCriteria(); - if(!StringUtils.isEmpty(productName)){ - criteria.andProductNameLike("%"+productName+"%"); - } - if(recommendStatus!=null){ - criteria.andRecommendStatusEqualTo(recommendStatus); - } - example.setOrderByClause("sort desc"); - return homeNewProductMapper.selectByExample(example); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/SmsHomeRecommendProductServiceImpl.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/SmsHomeRecommendProductServiceImpl.java deleted file mode 100644 index 0fb061984..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/SmsHomeRecommendProductServiceImpl.java +++ /dev/null @@ -1,70 +0,0 @@ -package com.macro.mall.service.impl; - -import com.github.pagehelper.PageHelper; -import com.macro.mall.mapper.SmsHomeRecommendProductMapper; -import com.macro.mall.model.SmsHomeRecommendProduct; -import com.macro.mall.model.SmsHomeRecommendProductExample; -import com.macro.mall.service.SmsHomeRecommendProductService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.util.StringUtils; - -import java.util.List; - -/** - * 首页人气推荐管理Service实现类 - * Created by macro on 2018/11/7. - */ -@Service -public class SmsHomeRecommendProductServiceImpl implements SmsHomeRecommendProductService { - @Autowired - private SmsHomeRecommendProductMapper recommendProductMapper; - @Override - public int create(List homeRecommendProductList) { - for (SmsHomeRecommendProduct recommendProduct : homeRecommendProductList) { - recommendProduct.setRecommendStatus(1); - recommendProduct.setSort(0); - recommendProductMapper.insert(recommendProduct); - } - return homeRecommendProductList.size(); - } - - @Override - public int updateSort(Long id, Integer sort) { - SmsHomeRecommendProduct recommendProduct = new SmsHomeRecommendProduct(); - recommendProduct.setId(id); - recommendProduct.setSort(sort); - return recommendProductMapper.updateByPrimaryKeySelective(recommendProduct); - } - - @Override - public int delete(List ids) { - SmsHomeRecommendProductExample example = new SmsHomeRecommendProductExample(); - example.createCriteria().andIdIn(ids); - return recommendProductMapper.deleteByExample(example); - } - - @Override - public int updateRecommendStatus(List ids, Integer recommendStatus) { - SmsHomeRecommendProductExample example = new SmsHomeRecommendProductExample(); - example.createCriteria().andIdIn(ids); - SmsHomeRecommendProduct record = new SmsHomeRecommendProduct(); - record.setRecommendStatus(recommendStatus); - return recommendProductMapper.updateByExampleSelective(record,example); - } - - @Override - public List list(String productName, Integer recommendStatus, Integer pageSize, Integer pageNum) { - PageHelper.startPage(pageNum,pageSize); - SmsHomeRecommendProductExample example = new SmsHomeRecommendProductExample(); - SmsHomeRecommendProductExample.Criteria criteria = example.createCriteria(); - if(!StringUtils.isEmpty(productName)){ - criteria.andProductNameLike("%"+productName+"%"); - } - if(recommendStatus!=null){ - criteria.andRecommendStatusEqualTo(recommendStatus); - } - example.setOrderByClause("sort desc"); - return recommendProductMapper.selectByExample(example); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/SmsHomeRecommendSubjectServiceImpl.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/SmsHomeRecommendSubjectServiceImpl.java deleted file mode 100644 index 00cfda94b..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/SmsHomeRecommendSubjectServiceImpl.java +++ /dev/null @@ -1,70 +0,0 @@ -package com.macro.mall.service.impl; - -import com.github.pagehelper.PageHelper; -import com.macro.mall.mapper.SmsHomeRecommendSubjectMapper; -import com.macro.mall.model.SmsHomeRecommendSubject; -import com.macro.mall.model.SmsHomeRecommendSubjectExample; -import com.macro.mall.service.SmsHomeRecommendSubjectService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.util.StringUtils; - -import java.util.List; - -/** - * 首页专题推荐管理Service实现类 - * Created by macro on 2018/11/7. - */ -@Service -public class SmsHomeRecommendSubjectServiceImpl implements SmsHomeRecommendSubjectService { - @Autowired - private SmsHomeRecommendSubjectMapper recommendProductMapper; - @Override - public int create(List recommendSubjectList) { - for (SmsHomeRecommendSubject recommendProduct : recommendSubjectList) { - recommendProduct.setRecommendStatus(1); - recommendProduct.setSort(0); - recommendProductMapper.insert(recommendProduct); - } - return recommendSubjectList.size(); - } - - @Override - public int updateSort(Long id, Integer sort) { - SmsHomeRecommendSubject recommendProduct = new SmsHomeRecommendSubject(); - recommendProduct.setId(id); - recommendProduct.setSort(sort); - return recommendProductMapper.updateByPrimaryKeySelective(recommendProduct); - } - - @Override - public int delete(List ids) { - SmsHomeRecommendSubjectExample example = new SmsHomeRecommendSubjectExample(); - example.createCriteria().andIdIn(ids); - return recommendProductMapper.deleteByExample(example); - } - - @Override - public int updateRecommendStatus(List ids, Integer recommendStatus) { - SmsHomeRecommendSubjectExample example = new SmsHomeRecommendSubjectExample(); - example.createCriteria().andIdIn(ids); - SmsHomeRecommendSubject record = new SmsHomeRecommendSubject(); - record.setRecommendStatus(recommendStatus); - return recommendProductMapper.updateByExampleSelective(record,example); - } - - @Override - public List list(String subjectName, Integer recommendStatus, Integer pageSize, Integer pageNum) { - PageHelper.startPage(pageNum,pageSize); - SmsHomeRecommendSubjectExample example = new SmsHomeRecommendSubjectExample(); - SmsHomeRecommendSubjectExample.Criteria criteria = example.createCriteria(); - if(!StringUtils.isEmpty(subjectName)){ - criteria.andSubjectNameLike("%"+subjectName+"%"); - } - if(recommendStatus!=null){ - criteria.andRecommendStatusEqualTo(recommendStatus); - } - example.setOrderByClause("sort desc"); - return recommendProductMapper.selectByExample(example); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/UmsAdminCacheServiceImpl.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/UmsAdminCacheServiceImpl.java deleted file mode 100644 index 8843b532c..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/UmsAdminCacheServiceImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.macro.mall.service.impl; - -import com.macro.mall.common.service.RedisService; -import com.macro.mall.model.UmsAdmin; -import com.macro.mall.service.UmsAdminCacheService; -import com.macro.mall.service.UmsAdminService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Service; - -/** - * UmsAdminCacheService实现类 - * Created by macro on 2020/3/13. - */ -@Service -public class UmsAdminCacheServiceImpl implements UmsAdminCacheService { - @Autowired - private RedisService redisService; - @Value("${redis.database}") - private String REDIS_DATABASE; - @Value("${redis.expire.common}") - private Long REDIS_EXPIRE; - @Value("${redis.key.admin}") - private String REDIS_KEY_ADMIN; - - @Override - public void delAdmin(Long adminId) { - String key = REDIS_DATABASE + ":" + REDIS_KEY_ADMIN + ":" + adminId; - redisService.del(key); - } - - @Override - public UmsAdmin getAdmin(Long adminId) { - String key = REDIS_DATABASE + ":" + REDIS_KEY_ADMIN + ":" + adminId; - return (UmsAdmin) redisService.get(key); - } - - @Override - public void setAdmin(UmsAdmin admin) { - String key = REDIS_DATABASE + ":" + REDIS_KEY_ADMIN + ":" + admin.getId(); - redisService.set(key, admin, REDIS_EXPIRE); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/UmsAdminServiceImpl.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/UmsAdminServiceImpl.java deleted file mode 100644 index 4657af675..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/UmsAdminServiceImpl.java +++ /dev/null @@ -1,262 +0,0 @@ -package com.macro.mall.service.impl; - -import cn.dev33.satoken.stp.SaTokenInfo; -import cn.dev33.satoken.stp.StpUtil; -import cn.hutool.core.collection.CollUtil; -import cn.hutool.core.util.StrUtil; -import cn.hutool.crypto.digest.BCrypt; -import cn.hutool.extra.spring.SpringUtil; -import cn.hutool.json.JSONUtil; -import com.github.pagehelper.PageHelper; -import com.macro.mall.common.api.CommonResult; -import com.macro.mall.common.api.ResultCode; -import com.macro.mall.common.constant.AuthConstant; -import com.macro.mall.common.dto.UserDto; -import com.macro.mall.common.exception.Asserts; -import com.macro.mall.dao.UmsAdminRoleRelationDao; -import com.macro.mall.dto.UmsAdminParam; -import com.macro.mall.dto.UpdateAdminPasswordParam; -import com.macro.mall.mapper.UmsAdminLoginLogMapper; -import com.macro.mall.mapper.UmsAdminMapper; -import com.macro.mall.mapper.UmsAdminRoleRelationMapper; -import com.macro.mall.model.*; -import com.macro.mall.service.UmsAdminCacheService; -import com.macro.mall.service.UmsAdminService; -import jakarta.servlet.http.HttpServletRequest; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.BeanUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.util.CollectionUtils; -import org.springframework.util.StringUtils; -import org.springframework.web.context.request.RequestContextHolder; -import org.springframework.web.context.request.ServletRequestAttributes; - -import java.util.*; -import java.util.stream.Collectors; - -/** - * UmsAdminService实现类 - * Created by macro on 2018/4/26. - */ -@Service -public class UmsAdminServiceImpl implements UmsAdminService { - private static final Logger LOGGER = LoggerFactory.getLogger(UmsAdminServiceImpl.class); - @Autowired - private UmsAdminMapper adminMapper; - @Autowired - private UmsAdminRoleRelationMapper adminRoleRelationMapper; - @Autowired - private UmsAdminRoleRelationDao adminRoleRelationDao; - @Autowired - private UmsAdminLoginLogMapper loginLogMapper; - @Autowired - private UmsAdminCacheService adminCacheService; - - @Override - public UmsAdmin getAdminByUsername(String username) { - UmsAdminExample example = new UmsAdminExample(); - example.createCriteria().andUsernameEqualTo(username); - List adminList = adminMapper.selectByExample(example); - if (adminList != null && adminList.size() > 0) { - return adminList.get(0); - } - return null; - } - - @Override - public UmsAdmin register(UmsAdminParam umsAdminParam) { - UmsAdmin umsAdmin = new UmsAdmin(); - BeanUtils.copyProperties(umsAdminParam, umsAdmin); - umsAdmin.setCreateTime(new Date()); - umsAdmin.setStatus(1); - //查询是否有相同用户名的用户 - UmsAdminExample example = new UmsAdminExample(); - example.createCriteria().andUsernameEqualTo(umsAdmin.getUsername()); - List umsAdminList = adminMapper.selectByExample(example); - if (umsAdminList.size() > 0) { - return null; - } - //将密码进行加密操作 - String encodePassword = BCrypt.hashpw(umsAdmin.getPassword()); - umsAdmin.setPassword(encodePassword); - adminMapper.insert(umsAdmin); - return umsAdmin; - } - - @Override - public SaTokenInfo login(String username, String password) { - if(StrUtil.isEmpty(username)||StrUtil.isEmpty(password)){ - Asserts.fail("用户名或密码不能为空!"); - } - UmsAdmin admin = getAdminByUsername(username); - if(admin==null){ - Asserts.fail("找不到该用户!"); - } - if (!BCrypt.checkpw(password, admin.getPassword())) { - Asserts.fail("密码不正确!"); - } - if(admin.getStatus()!=1){ - Asserts.fail("该账号已被禁用!"); - } - // 登录校验成功后,一行代码实现登录 - StpUtil.login(admin.getId()); - UserDto userDto = new UserDto(); - userDto.setId(admin.getId()); - userDto.setUsername(admin.getUsername()); - userDto.setClientId(AuthConstant.ADMIN_CLIENT_ID); - List resourceList = getResourceList(admin.getId()); - List permissionList = resourceList.stream().map(item -> item.getId() + ":" + item.getName()).toList(); - userDto.setPermissionList(permissionList); - // 将用户信息存储到Session中 - StpUtil.getSession().set(AuthConstant.STP_ADMIN_INFO,userDto); - // 获取当前登录用户Token信息 - SaTokenInfo saTokenInfo = StpUtil.getTokenInfo(); -// updateLoginTimeByUsername(username); - insertLoginLog(admin); - return saTokenInfo; - } - - /** - * 添加登录记录 - */ - private void insertLoginLog(UmsAdmin admin) { - if(admin==null) return; - UmsAdminLoginLog loginLog = new UmsAdminLoginLog(); - loginLog.setAdminId(admin.getId()); - loginLog.setCreateTime(new Date()); - ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); - HttpServletRequest request = attributes.getRequest(); - loginLog.setIp(request.getRemoteAddr()); - loginLogMapper.insert(loginLog); - } - - /** - * 根据用户名修改登录时间 - */ - private void updateLoginTimeByUsername(String username) { - UmsAdmin record = new UmsAdmin(); - record.setLoginTime(new Date()); - UmsAdminExample example = new UmsAdminExample(); - example.createCriteria().andUsernameEqualTo(username); - adminMapper.updateByExampleSelective(record, example); - } - - @Override - public UmsAdmin getItem(Long id) { - return adminMapper.selectByPrimaryKey(id); - } - - @Override - public List list(String keyword, Integer pageSize, Integer pageNum) { - PageHelper.startPage(pageNum, pageSize); - UmsAdminExample example = new UmsAdminExample(); - UmsAdminExample.Criteria criteria = example.createCriteria(); - if (!StringUtils.isEmpty(keyword)) { - criteria.andUsernameLike("%" + keyword + "%"); - example.or(example.createCriteria().andNickNameLike("%" + keyword + "%")); - } - return adminMapper.selectByExample(example); - } - - @Override - public int update(Long id, UmsAdmin admin) { - admin.setId(id); - UmsAdmin rawAdmin = adminMapper.selectByPrimaryKey(id); - if(rawAdmin.getPassword().equals(admin.getPassword())){ - //与原加密密码相同的不需要修改 - admin.setPassword(null); - }else{ - //与原加密密码不同的需要加密修改 - if(StrUtil.isEmpty(admin.getPassword())){ - admin.setPassword(null); - }else{ - admin.setPassword(BCrypt.hashpw(admin.getPassword())); - } - } - int count = adminMapper.updateByPrimaryKeySelective(admin); - adminCacheService.delAdmin(id); - return count; - } - - @Override - public int delete(Long id) { - int count = adminMapper.deleteByPrimaryKey(id); - adminCacheService.delAdmin(id); - return count; - } - - @Override - public int updateRole(Long adminId, List roleIds) { - int count = roleIds == null ? 0 : roleIds.size(); - //先删除原来的关系 - UmsAdminRoleRelationExample adminRoleRelationExample = new UmsAdminRoleRelationExample(); - adminRoleRelationExample.createCriteria().andAdminIdEqualTo(adminId); - adminRoleRelationMapper.deleteByExample(adminRoleRelationExample); - //建立新关系 - if (!CollectionUtils.isEmpty(roleIds)) { - List list = new ArrayList<>(); - for (Long roleId : roleIds) { - UmsAdminRoleRelation roleRelation = new UmsAdminRoleRelation(); - roleRelation.setAdminId(adminId); - roleRelation.setRoleId(roleId); - list.add(roleRelation); - } - adminRoleRelationDao.insertList(list); - } - return count; - } - - @Override - public List getRoleList(Long adminId) { - return adminRoleRelationDao.getRoleList(adminId); - } - - @Override - public List getResourceList(Long adminId) { - return adminRoleRelationDao.getResourceList(adminId); - } - - @Override - public int updatePassword(UpdateAdminPasswordParam param) { - if(StrUtil.isEmpty(param.getUsername()) - ||StrUtil.isEmpty(param.getOldPassword()) - ||StrUtil.isEmpty(param.getNewPassword())){ - return -1; - } - UmsAdminExample example = new UmsAdminExample(); - example.createCriteria().andUsernameEqualTo(param.getUsername()); - List adminList = adminMapper.selectByExample(example); - if(CollUtil.isEmpty(adminList)){ - return -2; - } - UmsAdmin umsAdmin = adminList.get(0); - if(!BCrypt.checkpw(param.getOldPassword(),umsAdmin.getPassword())){ - return -3; - } - umsAdmin.setPassword(BCrypt.hashpw(param.getNewPassword())); - adminMapper.updateByPrimaryKey(umsAdmin); - adminCacheService.delAdmin(umsAdmin.getId()); - return 1; - } - - @Override - public UmsAdmin getCurrentAdmin() { - UserDto userDto = (UserDto) StpUtil.getSession().get(AuthConstant.STP_ADMIN_INFO); - UmsAdmin admin = adminCacheService.getAdmin(userDto.getId()); - if (admin == null) { - admin = adminMapper.selectByPrimaryKey(userDto.getId()); - adminCacheService.setAdmin(admin); - } - return admin; - } - @Override - public void logout() { - //先清空缓存 - UserDto userDto = (UserDto) StpUtil.getSession().get(AuthConstant.STP_ADMIN_INFO); - adminCacheService.delAdmin(userDto.getId()); - //再调用sa-token的登出方法 - StpUtil.logout(); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/UmsMemberLevelServiceImpl.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/UmsMemberLevelServiceImpl.java deleted file mode 100644 index 4daf0911c..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/UmsMemberLevelServiceImpl.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.macro.mall.service.impl; - -import com.macro.mall.mapper.UmsMemberLevelMapper; -import com.macro.mall.model.UmsMemberLevel; -import com.macro.mall.model.UmsMemberLevelExample; -import com.macro.mall.service.UmsMemberLevelService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.List; - -/** - * 会员等级管理Service实现类 - * Created by macro on 2018/4/26. - */ -@Service -public class UmsMemberLevelServiceImpl implements UmsMemberLevelService{ - @Autowired - private UmsMemberLevelMapper memberLevelMapper; - @Override - public List list(Integer defaultStatus) { - UmsMemberLevelExample example = new UmsMemberLevelExample(); - example.createCriteria().andDefaultStatusEqualTo(defaultStatus); - return memberLevelMapper.selectByExample(example); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/UmsMenuServiceImpl.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/UmsMenuServiceImpl.java deleted file mode 100644 index ad27616aa..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/UmsMenuServiceImpl.java +++ /dev/null @@ -1,105 +0,0 @@ -package com.macro.mall.service.impl; - -import com.github.pagehelper.PageHelper; -import com.macro.mall.dto.UmsMenuNode; -import com.macro.mall.mapper.UmsMenuMapper; -import com.macro.mall.model.*; -import com.macro.mall.service.UmsMenuService; -import org.springframework.beans.BeanUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.Date; -import java.util.List; -import java.util.stream.Collectors; - -/** - * 后台菜单管理Service实现类 - * Created by macro on 2020/2/2. - */ -@Service -public class UmsMenuServiceImpl implements UmsMenuService { - @Autowired - private UmsMenuMapper menuMapper; - - @Override - public int create(UmsMenu umsMenu) { - umsMenu.setCreateTime(new Date()); - updateLevel(umsMenu); - return menuMapper.insert(umsMenu); - } - - /** - * 修改菜单层级 - */ - private void updateLevel(UmsMenu umsMenu) { - if (umsMenu.getParentId() == 0) { - //没有父菜单时为一级菜单 - umsMenu.setLevel(0); - } else { - //有父菜单时选择根据父菜单level设置 - UmsMenu parentMenu = menuMapper.selectByPrimaryKey(umsMenu.getParentId()); - if (parentMenu != null) { - umsMenu.setLevel(parentMenu.getLevel() + 1); - } else { - umsMenu.setLevel(0); - } - } - } - - @Override - public int update(Long id, UmsMenu umsMenu) { - umsMenu.setId(id); - updateLevel(umsMenu); - return menuMapper.updateByPrimaryKeySelective(umsMenu); - } - - @Override - public UmsMenu getItem(Long id) { - return menuMapper.selectByPrimaryKey(id); - } - - @Override - public int delete(Long id) { - return menuMapper.deleteByPrimaryKey(id); - } - - @Override - public List list(Long parentId, Integer pageSize, Integer pageNum) { - PageHelper.startPage(pageNum, pageSize); - UmsMenuExample example = new UmsMenuExample(); - example.setOrderByClause("sort desc"); - example.createCriteria().andParentIdEqualTo(parentId); - return menuMapper.selectByExample(example); - } - - @Override - public List treeList() { - List menuList = menuMapper.selectByExample(new UmsMenuExample()); - List result = menuList.stream() - .filter(menu -> menu.getParentId().equals(0L)) - .map(menu -> covertMenuNode(menu, menuList)).collect(Collectors.toList()); - return result; - } - - @Override - public int updateHidden(Long id, Integer hidden) { - UmsMenu umsMenu = new UmsMenu(); - umsMenu.setId(id); - umsMenu.setHidden(hidden); - return menuMapper.updateByPrimaryKeySelective(umsMenu); - } - - /** - * 将UmsMenu转化为UmsMenuNode并设置children属性 - */ - private UmsMenuNode covertMenuNode(UmsMenu menu, List menuList) { - UmsMenuNode node = new UmsMenuNode(); - BeanUtils.copyProperties(menu, node); - List children = menuList.stream() - .filter(subMenu -> subMenu.getParentId().equals(menu.getId())) - .map(subMenu -> covertMenuNode(subMenu, menuList)).collect(Collectors.toList()); - node.setChildren(children); - return node; - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/UmsResourceCategoryServiceImpl.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/UmsResourceCategoryServiceImpl.java deleted file mode 100644 index c6e59382e..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/UmsResourceCategoryServiceImpl.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.macro.mall.service.impl; - -import com.macro.mall.mapper.UmsResourceCategoryMapper; -import com.macro.mall.model.UmsResourceCategory; -import com.macro.mall.model.UmsResourceCategoryExample; -import com.macro.mall.service.UmsResourceCategoryService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.Date; -import java.util.List; - -/** - * 后台资源分类管理Service实现类 - * Created by macro on 2020/2/5. - */ -@Service -public class UmsResourceCategoryServiceImpl implements UmsResourceCategoryService { - @Autowired - private UmsResourceCategoryMapper resourceCategoryMapper; - - @Override - public List listAll() { - UmsResourceCategoryExample example = new UmsResourceCategoryExample(); - example.setOrderByClause("sort desc"); - return resourceCategoryMapper.selectByExample(example); - } - - @Override - public int create(UmsResourceCategory umsResourceCategory) { - umsResourceCategory.setCreateTime(new Date()); - return resourceCategoryMapper.insert(umsResourceCategory); - } - - @Override - public int update(Long id, UmsResourceCategory umsResourceCategory) { - umsResourceCategory.setId(id); - return resourceCategoryMapper.updateByPrimaryKeySelective(umsResourceCategory); - } - - @Override - public int delete(Long id) { - return resourceCategoryMapper.deleteByPrimaryKey(id); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/UmsResourceServiceImpl.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/UmsResourceServiceImpl.java deleted file mode 100644 index 3ee85bd2c..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/UmsResourceServiceImpl.java +++ /dev/null @@ -1,90 +0,0 @@ -package com.macro.mall.service.impl; - -import cn.hutool.core.util.StrUtil; -import com.github.pagehelper.PageHelper; -import com.macro.mall.common.constant.AuthConstant; -import com.macro.mall.common.service.RedisService; -import com.macro.mall.mapper.UmsResourceMapper; -import com.macro.mall.model.*; -import com.macro.mall.service.UmsResourceService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Service; - -import java.util.*; - -/** - * 后台资源管理Service实现类 - * Created by macro on 2020/2/2. - */ -@Service -public class UmsResourceServiceImpl implements UmsResourceService { - @Autowired - private UmsResourceMapper resourceMapper; - @Autowired - private RedisService redisService; - @Value("${spring.application.name}") - private String applicationName; - @Override - public int create(UmsResource umsResource) { - umsResource.setCreateTime(new Date()); - int count = resourceMapper.insert(umsResource); - initPathResourceMap(); - return count; - } - - @Override - public int update(Long id, UmsResource umsResource) { - umsResource.setId(id); - int count = resourceMapper.updateByPrimaryKeySelective(umsResource); - initPathResourceMap(); - return count; - } - - @Override - public UmsResource getItem(Long id) { - return resourceMapper.selectByPrimaryKey(id); - } - - @Override - public int delete(Long id) { - int count = resourceMapper.deleteByPrimaryKey(id); - initPathResourceMap(); - return count; - } - - @Override - public List list(Long categoryId, String nameKeyword, String urlKeyword, Integer pageSize, Integer pageNum) { - PageHelper.startPage(pageNum,pageSize); - UmsResourceExample example = new UmsResourceExample(); - UmsResourceExample.Criteria criteria = example.createCriteria(); - if(categoryId!=null){ - criteria.andCategoryIdEqualTo(categoryId); - } - if(StrUtil.isNotEmpty(nameKeyword)){ - criteria.andNameLike('%'+nameKeyword+'%'); - } - if(StrUtil.isNotEmpty(urlKeyword)){ - criteria.andUrlLike('%'+urlKeyword+'%'); - } - return resourceMapper.selectByExample(example); - } - - @Override - public List listAll() { - return resourceMapper.selectByExample(new UmsResourceExample()); - } - - @Override - public Map initPathResourceMap() { - Map pathResourceMap = new TreeMap<>(); - List resourceList = resourceMapper.selectByExample(new UmsResourceExample()); - for (UmsResource resource : resourceList) { - pathResourceMap.put("/"+applicationName+resource.getUrl(),resource.getId()+":"+resource.getName()); - } - redisService.del(AuthConstant.PATH_RESOURCE_MAP); - redisService.hSetAll(AuthConstant.PATH_RESOURCE_MAP, pathResourceMap); - return pathResourceMap; - - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/UmsRoleServiceImpl.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/UmsRoleServiceImpl.java deleted file mode 100644 index 401941ffb..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/service/impl/UmsRoleServiceImpl.java +++ /dev/null @@ -1,119 +0,0 @@ -package com.macro.mall.service.impl; - -import com.github.pagehelper.PageHelper; -import com.macro.mall.dao.UmsRoleDao; -import com.macro.mall.mapper.UmsRoleMapper; -import com.macro.mall.mapper.UmsRoleMenuRelationMapper; -import com.macro.mall.mapper.UmsRoleResourceRelationMapper; -import com.macro.mall.model.*; -import com.macro.mall.service.UmsResourceService; -import com.macro.mall.service.UmsRoleService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.util.StringUtils; - -import java.util.Date; -import java.util.List; - -/** - * 后台角色管理Service实现类 - * Created by macro on 2018/9/30. - */ -@Service -public class UmsRoleServiceImpl implements UmsRoleService { - @Autowired - private UmsRoleMapper roleMapper; - @Autowired - private UmsRoleMenuRelationMapper roleMenuRelationMapper; - @Autowired - private UmsRoleResourceRelationMapper roleResourceRelationMapper; - @Autowired - private UmsRoleDao roleDao; - @Autowired - private UmsResourceService resourceService; - @Override - public int create(UmsRole role) { - role.setCreateTime(new Date()); - role.setAdminCount(0); - role.setSort(0); - return roleMapper.insert(role); - } - - @Override - public int update(Long id, UmsRole role) { - role.setId(id); - return roleMapper.updateByPrimaryKeySelective(role); - } - - @Override - public int delete(List ids) { - UmsRoleExample example = new UmsRoleExample(); - example.createCriteria().andIdIn(ids); - int count = roleMapper.deleteByExample(example); - resourceService.initPathResourceMap(); - return count; - } - - @Override - public List list() { - return roleMapper.selectByExample(new UmsRoleExample()); - } - - @Override - public List list(String keyword, Integer pageSize, Integer pageNum) { - PageHelper.startPage(pageNum, pageSize); - UmsRoleExample example = new UmsRoleExample(); - if (!StringUtils.isEmpty(keyword)) { - example.createCriteria().andNameLike("%" + keyword + "%"); - } - return roleMapper.selectByExample(example); - } - - @Override - public List getMenuList(Long adminId) { - return roleDao.getMenuList(adminId); - } - - @Override - public List listMenu(Long roleId) { - return roleDao.getMenuListByRoleId(roleId); - } - - @Override - public List listResource(Long roleId) { - return roleDao.getResourceListByRoleId(roleId); - } - - @Override - public int allocMenu(Long roleId, List menuIds) { - //先删除原有关系 - UmsRoleMenuRelationExample example=new UmsRoleMenuRelationExample(); - example.createCriteria().andRoleIdEqualTo(roleId); - roleMenuRelationMapper.deleteByExample(example); - //批量插入新关系 - for (Long menuId : menuIds) { - UmsRoleMenuRelation relation = new UmsRoleMenuRelation(); - relation.setRoleId(roleId); - relation.setMenuId(menuId); - roleMenuRelationMapper.insert(relation); - } - return menuIds.size(); - } - - @Override - public int allocResource(Long roleId, List resourceIds) { - //先删除原有关系 - UmsRoleResourceRelationExample example=new UmsRoleResourceRelationExample(); - example.createCriteria().andRoleIdEqualTo(roleId); - roleResourceRelationMapper.deleteByExample(example); - //批量插入新关系 - for (Long resourceId : resourceIds) { - UmsRoleResourceRelation relation = new UmsRoleResourceRelation(); - relation.setRoleId(roleId); - relation.setResourceId(resourceId); - roleResourceRelationMapper.insert(relation); - } - resourceService.initPathResourceMap(); - return resourceIds.size(); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/validator/FlagValidator.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/validator/FlagValidator.java deleted file mode 100644 index 6d63ea5af..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/validator/FlagValidator.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.macro.mall.validator; - -import jakarta.validation.Constraint; -import jakarta.validation.Payload; -import java.lang.annotation.*; - -/** - * 用户验证状态是否在指定范围内的注解 - * Created by macro on 2018/4/26. - */ -@Documented -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.FIELD,ElementType.PARAMETER}) -@Constraint(validatedBy = FlagValidatorClass.class) -public @interface FlagValidator { - String[] value() default {}; - - String message() default "flag is not found"; - - Class[] groups() default {}; - - Class[] payload() default {}; -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/validator/FlagValidatorClass.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/validator/FlagValidatorClass.java deleted file mode 100644 index b8aa6f80d..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/java/com/macro/mall/validator/FlagValidatorClass.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.macro.mall.validator; - -import jakarta.validation.ConstraintValidator; -import jakarta.validation.ConstraintValidatorContext; - -/** - * 状态标记校验器 - * Created by macro on 2018/4/26. - */ -public class FlagValidatorClass implements ConstraintValidator { - private String[] values; - @Override - public void initialize(FlagValidator flagValidator) { - this.values = flagValidator.value(); - } - - @Override - public boolean isValid(Integer value, ConstraintValidatorContext constraintValidatorContext) { - boolean isValid = false; - if(value==null){ - //当状态为空时使用默认值 - return true; - } - for(int i=0;i - - - - insert into cms_prefrence_area_product_relation (prefrence_area_id, product_id) values - - (#{item.prefrenceAreaId,jdbcType=BIGINT}, - #{item.productId,jdbcType=BIGINT}) - - - \ No newline at end of file diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/CmsSubjectProductRelationDao.xml b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/CmsSubjectProductRelationDao.xml deleted file mode 100644 index 653c7679c..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/CmsSubjectProductRelationDao.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - insert into cms_subject_product_relation (subject_id, product_id) values - - (#{item.subjectId,jdbcType=BIGINT}, - #{item.productId,jdbcType=BIGINT}) - - - \ No newline at end of file diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/OmsOrderDao.xml b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/OmsOrderDao.xml deleted file mode 100644 index 89f4d2a3c..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/OmsOrderDao.xml +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - - - UPDATE oms_order - SET - delivery_sn = CASE id - - WHEN #{item.orderId} THEN #{item.deliverySn} - - END, - delivery_company = CASE id - - WHEN #{item.orderId} THEN #{item.deliveryCompany} - - END, - delivery_time = CASE id - - WHEN #{item.orderId} THEN now() - - END, - `status` = CASE id - - WHEN #{item.orderId} THEN 2 - - END - WHERE - id IN - - #{item.orderId} - - AND `status` = 1 - - - \ No newline at end of file diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/OmsOrderOperateHistoryDao.xml b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/OmsOrderOperateHistoryDao.xml deleted file mode 100644 index ce9880af3..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/OmsOrderOperateHistoryDao.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - INSERT INTO oms_order_operate_history (order_id, operate_man, create_time, order_status, note) VALUES - - (#{item.orderId}, - #{item.operateMan}, - #{item.createTime,jdbcType=TIMESTAMP}, - #{item.orderStatus}, - #{item.note}) - - - \ No newline at end of file diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/OmsOrderReturnApplyDao.xml b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/OmsOrderReturnApplyDao.xml deleted file mode 100644 index 971e7413e..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/OmsOrderReturnApplyDao.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/PmsMemberPriceDao.xml b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/PmsMemberPriceDao.xml deleted file mode 100644 index d33425fb9..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/PmsMemberPriceDao.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - INSERT INTO pms_member_price (product_id, member_level_id, member_price,member_level_name) VALUES - - (#{item.productId,jdbcType=BIGINT}, - #{item.memberLevelId,jdbcType=BIGINT}, - #{item.memberPrice,jdbcType=DECIMAL}, - #{item.memberLevelName,jdbcType=VARCHAR}) - - - \ No newline at end of file diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/PmsProductAttributeCategoryDao.xml b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/PmsProductAttributeCategoryDao.xml deleted file mode 100644 index 3239a50fe..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/PmsProductAttributeCategoryDao.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/PmsProductAttributeDao.xml b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/PmsProductAttributeDao.xml deleted file mode 100644 index 3a4d71311..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/PmsProductAttributeDao.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - \ No newline at end of file diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/PmsProductAttributeValueDao.xml b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/PmsProductAttributeValueDao.xml deleted file mode 100644 index 75236d449..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/PmsProductAttributeValueDao.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - insert into pms_product_attribute_value (product_id,product_attribute_id,value) values - - (#{item.productId,jdbcType=BIGINT}, - #{item.productAttributeId,jdbcType=BIGINT}, - #{item.value,jdbcType=VARCHAR}) - - - \ No newline at end of file diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/PmsProductCategoryAttributeRelationDao.xml b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/PmsProductCategoryAttributeRelationDao.xml deleted file mode 100644 index e35716351..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/PmsProductCategoryAttributeRelationDao.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - INSERT INTO pms_product_category_attribute_relation (product_category_id, product_attribute_id) VALUES - - (#{item.productCategoryId,jdbcType=BIGINT}, - #{item.productAttributeId,jdbcType=BIGINT}) - - - \ No newline at end of file diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/PmsProductCategoryDao.xml b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/PmsProductCategoryDao.xml deleted file mode 100644 index 33be6e1c9..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/PmsProductCategoryDao.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/PmsProductDao.xml b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/PmsProductDao.xml deleted file mode 100644 index 9872b31df..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/PmsProductDao.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/PmsProductFullReductionDao.xml b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/PmsProductFullReductionDao.xml deleted file mode 100644 index 38fea50fe..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/PmsProductFullReductionDao.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - INSERT INTO pms_product_full_reduction (product_id, full_price, reduce_price) VALUES - - (#{item.productId,jdbcType=BIGINT}, - #{item.fullPrice,jdbcType=DECIMAL}, - #{item.reducePrice,jdbcType=DECIMAL}) - - - \ No newline at end of file diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/PmsProductLadderDao.xml b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/PmsProductLadderDao.xml deleted file mode 100644 index 7be6e284f..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/PmsProductLadderDao.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - INSERT INTO pms_product_ladder (product_id, count, discount, price) VALUES - - (#{item.productId,jdbcType=BIGINT}, - #{item.count,jdbcType=INTEGER}, - #{item.discount,jdbcType=DECIMAL}, - #{item.price,jdbcType=DECIMAL}) - - - \ No newline at end of file diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/PmsProductVertifyRecordDao.xml b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/PmsProductVertifyRecordDao.xml deleted file mode 100644 index 70359054a..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/PmsProductVertifyRecordDao.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - insert into pms_product_vertify_record (product_id, create_time, vertify_man,status, detail) values - - (#{item.productId,jdbcType=BIGINT}, - #{item.createTime,jdbcType=TIMESTAMP}, - #{item.vertifyMan,jdbcType=VARCHAR}, - #{item.status,jdbcType=INTEGER}, - #{item.detail,jdbcType=VARCHAR}) - - - \ No newline at end of file diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/PmsSkuStockDao.xml b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/PmsSkuStockDao.xml deleted file mode 100644 index af39fd379..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/PmsSkuStockDao.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - INSERT INTO pms_sku_stock (product_id, sku_code, price, stock, low_stock, pic, sale, sp_data) VALUES - - (#{item.productId,jdbcType=BIGINT}, - #{item.skuCode,jdbcType=VARCHAR}, - #{item.price,jdbcType=DECIMAL}, - #{item.stock,jdbcType=INTEGER}, - #{item.lowStock,jdbcType=INTEGER}, - #{item.pic,jdbcType=VARCHAR}, - #{item.sale,jdbcType=INTEGER}, - #{item.spData,jdbcType=VARCHAR}) - - - - REPLACE INTO pms_sku_stock (id,product_id, sku_code, price, stock, low_stock,pic, sale, sp_data) VALUES - - (#{item.id,jdbcType=BIGINT}, - #{item.productId,jdbcType=BIGINT}, - #{item.skuCode,jdbcType=VARCHAR}, - #{item.price,jdbcType=DECIMAL}, - #{item.stock,jdbcType=INTEGER}, - #{item.lowStock,jdbcType=INTEGER}, - #{item.pic,jdbcType=VARCHAR}, - #{item.sale,jdbcType=INTEGER}, - #{item.spData,jdbcType=VARCHAR}) - - - \ No newline at end of file diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/SmsCouponDao.xml b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/SmsCouponDao.xml deleted file mode 100644 index e3da46064..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/SmsCouponDao.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/SmsCouponProductCategoryRelationDao.xml b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/SmsCouponProductCategoryRelationDao.xml deleted file mode 100644 index a138a2451..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/SmsCouponProductCategoryRelationDao.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - INSERT INTO sms_coupon_product_category_relation (product_category_id,product_category_name,parent_category_name,coupon_id) VALUES - - (#{item.productCategoryId,jdbcType=BIGINT}, - #{item.productCategoryName,jdbcType=VARCHAR}, - #{item.parentCategoryName,jdbcType=VARCHAR}, - #{item.couponId,jdbcType=BIGINT}) - - - \ No newline at end of file diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/SmsCouponProductRelationDao.xml b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/SmsCouponProductRelationDao.xml deleted file mode 100644 index 74bff5d88..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/SmsCouponProductRelationDao.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - INSERT INTO sms_coupon_product_relation (product_id,product_name,product_sn,coupon_id) VALUES - - (#{item.productId,jdbcType=BIGINT}, - #{item.productName,jdbcType=VARCHAR}, - #{item.productSn,jdbcType=VARCHAR}, - #{item.couponId,jdbcType=INTEGER}) - - - \ No newline at end of file diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/SmsFlashPromotionProductRelationDao.xml b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/SmsFlashPromotionProductRelationDao.xml deleted file mode 100644 index f00afc2a5..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/SmsFlashPromotionProductRelationDao.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/UmsAdminRoleRelationDao.xml b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/UmsAdminRoleRelationDao.xml deleted file mode 100644 index d43ecb849..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/UmsAdminRoleRelationDao.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - INSERT INTO ums_admin_role_relation (admin_id, role_id) VALUES - - (#{item.adminId,jdbcType=BIGINT}, - #{item.roleId,jdbcType=BIGINT}) - - - - - - \ No newline at end of file diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/UmsRoleDao.xml b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/UmsRoleDao.xml deleted file mode 100644 index 508988973..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/main/resources/dao/UmsRoleDao.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/test/com/macro/mall/PmsDaoTests.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/test/com/macro/mall/PmsDaoTests.java deleted file mode 100644 index 169e6e572..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-admin/src/test/com/macro/mall/PmsDaoTests.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.macro.mall; - - -import cn.hutool.json.JSONUtil; -import com.macro.mall.dao.PmsMemberPriceDao; -import com.macro.mall.dao.PmsProductDao; -import com.macro.mall.dto.PmsProductResult; -import com.macro.mall.model.PmsMemberPrice; -import org.junit.jupiter.api.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.annotation.Rollback; -import org.springframework.transaction.annotation.Transactional; - -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; - -import static org.junit.jupiter.api.Assertions.assertEquals; - -@SpringBootTest -public class PmsDaoTests { - @Autowired - private PmsMemberPriceDao memberPriceDao; - @Autowired - private PmsProductDao productDao; - private static final Logger LOGGER = LoggerFactory.getLogger(PmsDaoTests.class); - @Test - @Transactional - @Rollback - public void testInsertBatch(){ - List list = new ArrayList<>(); - for(int i=0;i<5;i++){ - PmsMemberPrice memberPrice = new PmsMemberPrice(); - memberPrice.setProductId(1L); - memberPrice.setMemberLevelId((long) (i+1)); - memberPrice.setMemberPrice(new BigDecimal("22")); - list.add(memberPrice); - } - int count = memberPriceDao.insertList(list); - assertEquals(5,count); - } - - @Test - public void testGetProductUpdateInfo(){ - PmsProductResult productResult = productDao.getUpdateInfo(7L); - String json = JSONUtil.parse(productResult).toString(); - LOGGER.info(json); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/pom.xml b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/pom.xml deleted file mode 100644 index 38376105d..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/pom.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - 4.0.0 - ruoyi-mall-common - 1.0-SNAPSHOT - jar - - ruoyi-mall-common - - - ruoyi-vue-plus - mall-swarm - 1.0-SNAPSHOT - - - - - com.github.pagehelper - pagehelper - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-data-redis - - - org.springframework.data - spring-data-commons - - - com.github.xiaoymin - knife4j-openapi3-jakarta-spring-boot-starter - - - net.logstash.logback - logstash-logback-encoder - - - org.springframework.boot - spring-boot-starter-validation - - - org.springframework.cloud - spring-cloud-starter-bootstrap - - - org.springframework.cloud - spring-cloud-starter-loadbalancer - - - - diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/annotation/CacheException.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/annotation/CacheException.java deleted file mode 100644 index fc37d5caf..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/annotation/CacheException.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.macro.mall.common.annotation; - -import java.lang.annotation.*; - -/** - * 自定义注解,有该注解的缓存方法会抛出异常 - */ -@Documented -@Target(ElementType.METHOD) -@Retention(RetentionPolicy.RUNTIME) -public @interface CacheException { -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/api/CommonPage.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/api/CommonPage.java deleted file mode 100644 index dfbac0402..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/api/CommonPage.java +++ /dev/null @@ -1,85 +0,0 @@ -package com.macro.mall.common.api; - -import com.github.pagehelper.PageInfo; -import org.springframework.data.domain.Page; - -import java.util.List; - -/** - * 分页数据封装类 - * Created by macro on 2019/4/19. - */ -public class CommonPage { - private Integer pageNum; - private Integer pageSize; - private Integer totalPage; - private Long total; - private List list; - - /** - * 将PageHelper分页后的list转为分页信息 - */ - public static CommonPage restPage(List list) { - CommonPage result = new CommonPage(); - PageInfo pageInfo = new PageInfo(list); - result.setTotalPage(pageInfo.getPages()); - result.setPageNum(pageInfo.getPageNum()); - result.setPageSize(pageInfo.getPageSize()); - result.setTotal(pageInfo.getTotal()); - result.setList(pageInfo.getList()); - return result; - } - - /** - * 将SpringData分页后的list转为分页信息 - */ - public static CommonPage restPage(Page pageInfo) { - CommonPage result = new CommonPage(); - result.setTotalPage(pageInfo.getTotalPages()); - result.setPageNum(pageInfo.getNumber()); - result.setPageSize(pageInfo.getSize()); - result.setTotal(pageInfo.getTotalElements()); - result.setList(pageInfo.getContent()); - return result; - } - - public Integer getPageNum() { - return pageNum; - } - - public void setPageNum(Integer pageNum) { - this.pageNum = pageNum; - } - - public Integer getPageSize() { - return pageSize; - } - - public void setPageSize(Integer pageSize) { - this.pageSize = pageSize; - } - - public Integer getTotalPage() { - return totalPage; - } - - public void setTotalPage(Integer totalPage) { - this.totalPage = totalPage; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public Long getTotal() { - return total; - } - - public void setTotal(Long total) { - this.total = total; - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/api/CommonResult.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/api/CommonResult.java deleted file mode 100644 index a9952cd86..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/api/CommonResult.java +++ /dev/null @@ -1,131 +0,0 @@ -package com.macro.mall.common.api; - -import cn.hutool.json.JSONUtil; - -/** - * 通用返回对象 - * Created by macro on 2019/4/19. - */ -public class CommonResult { - private long code; - private String message; - private T data; - - protected CommonResult() { - } - - protected CommonResult(long code, String message, T data) { - this.code = code; - this.message = message; - this.data = data; - } - - /** - * 成功返回结果 - * - * @param data 获取的数据 - */ - public static CommonResult success(T data) { - return new CommonResult(ResultCode.SUCCESS.getCode(), ResultCode.SUCCESS.getMessage(), data); - } - - /** - * 成功返回结果 - * - * @param data 获取的数据 - * @param message 提示信息 - */ - public static CommonResult success(T data, String message) { - return new CommonResult(ResultCode.SUCCESS.getCode(), message, data); - } - - /** - * 失败返回结果 - * @param errorCode 错误码 - */ - public static CommonResult failed(IErrorCode errorCode) { - return new CommonResult(errorCode.getCode(), errorCode.getMessage(), null); - } - - /** - * 失败返回结果 - * @param errorCode 错误码 - * @param message 错误信息 - */ - public static CommonResult failed(IErrorCode errorCode,String message) { - return new CommonResult(errorCode.getCode(), message, null); - } - - /** - * 失败返回结果 - * @param message 提示信息 - */ - public static CommonResult failed(String message) { - return new CommonResult(ResultCode.FAILED.getCode(), message, null); - } - - /** - * 失败返回结果 - */ - public static CommonResult failed() { - return failed(ResultCode.FAILED); - } - - /** - * 参数验证失败返回结果 - */ - public static CommonResult validateFailed() { - return failed(ResultCode.VALIDATE_FAILED); - } - - /** - * 参数验证失败返回结果 - * @param message 提示信息 - */ - public static CommonResult validateFailed(String message) { - return new CommonResult(ResultCode.VALIDATE_FAILED.getCode(), message, null); - } - - /** - * 未登录返回结果 - */ - public static CommonResult unauthorized(T data) { - return new CommonResult(ResultCode.UNAUTHORIZED.getCode(), ResultCode.UNAUTHORIZED.getMessage(), data); - } - - /** - * 未授权返回结果 - */ - public static CommonResult forbidden(T data) { - return new CommonResult(ResultCode.FORBIDDEN.getCode(), ResultCode.FORBIDDEN.getMessage(), data); - } - - public long getCode() { - return code; - } - - public void setCode(long code) { - this.code = code; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public T getData() { - return data; - } - - public void setData(T data) { - this.data = data; - } - - @Override - public String toString() { - return JSONUtil.toJsonStr(this); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/api/IErrorCode.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/api/IErrorCode.java deleted file mode 100644 index 6a3cad91c..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/api/IErrorCode.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.macro.mall.common.api; - -/** - * 封装API的错误码 - * Created by macro on 2019/4/19. - */ -public interface IErrorCode { - long getCode(); - - String getMessage(); -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/api/ResultCode.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/api/ResultCode.java deleted file mode 100644 index acde04bc0..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/api/ResultCode.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.macro.mall.common.api; - -/** - * 枚举了一些常用API操作码 - * Created by macro on 2019/4/19. - */ -public enum ResultCode implements IErrorCode { - SUCCESS(200, "操作成功"), - FAILED(500, "操作失败"), - VALIDATE_FAILED(404, "参数检验失败"), - UNAUTHORIZED(401, "暂未登录或token已经过期"), - FORBIDDEN(403, "没有相关权限"); - private long code; - private String message; - - private ResultCode(long code, String message) { - this.code = code; - this.message = message; - } - - public long getCode() { - return code; - } - - public String getMessage() { - return message; - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/config/BaseRedisConfig.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/config/BaseRedisConfig.java deleted file mode 100644 index 27a137ddf..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/config/BaseRedisConfig.java +++ /dev/null @@ -1,69 +0,0 @@ -package com.macro.mall.common.config; - -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.PropertyAccessor; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.jsontype.impl.LaissezFaireSubTypeValidator; -import com.macro.mall.common.service.RedisService; -import com.macro.mall.common.service.impl.RedisServiceImpl; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.data.redis.cache.RedisCacheConfiguration; -import org.springframework.data.redis.cache.RedisCacheManager; -import org.springframework.data.redis.cache.RedisCacheWriter; -import org.springframework.data.redis.connection.RedisConnectionFactory; -import org.springframework.data.redis.core.RedisTemplate; -import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer; -import org.springframework.data.redis.serializer.RedisSerializationContext; -import org.springframework.data.redis.serializer.RedisSerializer; -import org.springframework.data.redis.serializer.StringRedisSerializer; - -import java.time.Duration; - -/** - * Redis基础配置 - * Created by macro on 2020/6/19. - */ -public class BaseRedisConfig { - - @Bean - public RedisTemplate redisTemplate(RedisConnectionFactory redisConnectionFactory) { - RedisSerializer serializer = redisSerializer(); - RedisTemplate redisTemplate = new RedisTemplate<>(); - redisTemplate.setConnectionFactory(redisConnectionFactory); - redisTemplate.setKeySerializer(new StringRedisSerializer()); - redisTemplate.setValueSerializer(serializer); - redisTemplate.setHashKeySerializer(new StringRedisSerializer()); - redisTemplate.setHashValueSerializer(serializer); - redisTemplate.afterPropertiesSet(); - return redisTemplate; - } - - @Bean - public RedisSerializer redisSerializer() { - //创建JSON序列化器 - Jackson2JsonRedisSerializer serializer = new Jackson2JsonRedisSerializer<>(Object.class); - ObjectMapper objectMapper = new ObjectMapper(); - objectMapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY); - //必须设置,否则无法将JSON转化为对象,会转化成Map类型 - objectMapper.activateDefaultTyping(LaissezFaireSubTypeValidator.instance,ObjectMapper.DefaultTyping.NON_FINAL); - serializer.setObjectMapper(objectMapper); - return serializer; - } - - @Bean - public RedisCacheManager redisCacheManager(RedisConnectionFactory redisConnectionFactory) { - RedisCacheWriter redisCacheWriter = RedisCacheWriter.nonLockingRedisCacheWriter(redisConnectionFactory); - //设置Redis缓存有效期为1天 - RedisCacheConfiguration redisCacheConfiguration = RedisCacheConfiguration.defaultCacheConfig() - .serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(redisSerializer())).entryTtl(Duration.ofDays(1)); - return new RedisCacheManager(redisCacheWriter, redisCacheConfiguration); - } - - - @Bean - public RedisService redisService(){ - return new RedisServiceImpl(); - } - -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/constant/AuthConstant.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/constant/AuthConstant.java deleted file mode 100644 index 4c9892cfd..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/constant/AuthConstant.java +++ /dev/null @@ -1,64 +0,0 @@ -package com.macro.mall.common.constant; - -/** - * 权限相关常量定义 - * Created by macro on 2020/6/19. - */ -public interface AuthConstant { - - /** - * JWT存储权限前缀 - */ - String AUTHORITY_PREFIX = "ROLE_"; - - /** - * JWT存储权限属性 - */ - String AUTHORITY_CLAIM_NAME = "authorities"; - - /** - * 后台管理client_id - */ - String ADMIN_CLIENT_ID = "admin-app"; - - /** - * 前台商城client_id - */ - String PORTAL_CLIENT_ID = "portal-app"; - - /** - * 后台管理接口路径匹配 - */ - String ADMIN_URL_PATTERN = "/mall-admin/**"; - - /** - * Redis缓存权限规则(路径->资源) - */ - String PATH_RESOURCE_MAP = "auth:pathResourceMap"; - - /** - * 认证信息Http请求头 - */ - String JWT_TOKEN_HEADER = "Authorization"; - - /** - * JWT令牌前缀 - */ - String JWT_TOKEN_PREFIX = "Bearer "; - - /** - * 用户信息Http请求头 - */ - String USER_TOKEN_HEADER = "user"; - - /** - * sa-token session中存储的会员信息 - */ - String STP_MEMBER_INFO = "memberInfo"; - - /** - * sa-token session中存储的后台管理员信息 - */ - String STP_ADMIN_INFO = "adminInfo"; - -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/domain/WebLog.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/domain/WebLog.java deleted file mode 100644 index e4faf97d2..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/domain/WebLog.java +++ /dev/null @@ -1,68 +0,0 @@ -package com.macro.mall.common.domain; - -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - * Controller层的日志封装类 - * Created by macro on 2018/4/26. - */ -@Data -@EqualsAndHashCode(callSuper = false) -public class WebLog { - /** - * 操作描述 - */ - private String description; - - /** - * 操作用户 - */ - private String username; - - /** - * 操作时间 - */ - private Long startTime; - - /** - * 消耗时间 - */ - private Integer spendTime; - - /** - * 根路径 - */ - private String basePath; - - /** - * URI - */ - private String uri; - - /** - * URL - */ - private String url; - - /** - * 请求类型 - */ - private String method; - - /** - * IP地址 - */ - private String ip; - - /** - * 请求参数 - */ - private Object parameter; - - /** - * 返回结果 - */ - private Object result; - -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/dto/UserDto.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/dto/UserDto.java deleted file mode 100644 index 85bafbd91..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/dto/UserDto.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.macro.mall.common.dto; - -import lombok.*; - -import java.util.List; - -/** - * @auther macrozheng - * @description 权限框架中使用的用户信息封装类 - * @date 2024/1/30 - * @github https://github.com/macrozheng - */ -@Data -@EqualsAndHashCode(callSuper = false) -@NoArgsConstructor -@AllArgsConstructor -@Builder -public class UserDto { - private Long id; - private String username; - private String clientId; - private List permissionList; -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/exception/ApiException.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/exception/ApiException.java deleted file mode 100644 index b1099ab4f..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/exception/ApiException.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.macro.mall.common.exception; - -import com.macro.mall.common.api.IErrorCode; - -/** - * 自定义API异常 - * Created by macro on 2020/2/27. - */ -public class ApiException extends RuntimeException { - private IErrorCode errorCode; - - public ApiException(IErrorCode errorCode) { - super(errorCode.getMessage()); - this.errorCode = errorCode; - } - - public ApiException(String message) { - super(message); - } - - public ApiException(Throwable cause) { - super(cause); - } - - public ApiException(String message, Throwable cause) { - super(message, cause); - } - - public IErrorCode getErrorCode() { - return errorCode; - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/exception/Asserts.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/exception/Asserts.java deleted file mode 100644 index 96756b72f..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/exception/Asserts.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.macro.mall.common.exception; - -import com.macro.mall.common.api.IErrorCode; - -/** - * 断言处理类,用于抛出各种API异常 - * Created by macro on 2020/2/27. - */ -public class Asserts { - public static void fail(String message) { - throw new ApiException(message); - } - - public static void fail(IErrorCode errorCode) { - throw new ApiException(errorCode); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/exception/GlobalExceptionHandler.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/exception/GlobalExceptionHandler.java deleted file mode 100644 index e95fd8a58..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/exception/GlobalExceptionHandler.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.macro.mall.common.exception; - -import com.macro.mall.common.api.CommonResult; -import org.springframework.validation.BindException; -import org.springframework.validation.BindingResult; -import org.springframework.validation.FieldError; -import org.springframework.web.bind.MethodArgumentNotValidException; -import org.springframework.web.bind.annotation.ControllerAdvice; -import org.springframework.web.bind.annotation.ExceptionHandler; -import org.springframework.web.bind.annotation.ResponseBody; - -/** - * 全局异常处理 - * Created by macro on 2020/2/27. - */ -@ControllerAdvice -public class GlobalExceptionHandler { - - @ResponseBody - @ExceptionHandler(value = ApiException.class) - public CommonResult handle(ApiException e) { - if (e.getErrorCode() != null) { - return CommonResult.failed(e.getErrorCode()); - } - return CommonResult.failed(e.getMessage()); - } - - @ResponseBody - @ExceptionHandler(value = MethodArgumentNotValidException.class) - public CommonResult handleValidException(MethodArgumentNotValidException e) { - BindingResult bindingResult = e.getBindingResult(); - String message = null; - if (bindingResult.hasErrors()) { - FieldError fieldError = bindingResult.getFieldError(); - if (fieldError != null) { - message = fieldError.getField()+fieldError.getDefaultMessage(); - } - } - return CommonResult.validateFailed(message); - } - - @ResponseBody - @ExceptionHandler(value = BindException.class) - public CommonResult handleValidException(BindException e) { - BindingResult bindingResult = e.getBindingResult(); - String message = null; - if (bindingResult.hasErrors()) { - FieldError fieldError = bindingResult.getFieldError(); - if (fieldError != null) { - message = fieldError.getField()+fieldError.getDefaultMessage(); - } - } - return CommonResult.validateFailed(message); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/log/WebLogAspect.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/log/WebLogAspect.java deleted file mode 100644 index a198e2ef0..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/log/WebLogAspect.java +++ /dev/null @@ -1,124 +0,0 @@ -package com.macro.mall.common.log; - -import cn.hutool.core.util.StrUtil; -import cn.hutool.core.util.URLUtil; -import cn.hutool.json.JSONUtil; -import com.macro.mall.common.domain.WebLog; -import io.swagger.v3.oas.annotations.Operation; -import net.logstash.logback.marker.Markers; -import org.aspectj.lang.JoinPoint; -import org.aspectj.lang.ProceedingJoinPoint; -import org.aspectj.lang.Signature; -import org.aspectj.lang.annotation.*; -import org.aspectj.lang.reflect.MethodSignature; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.core.annotation.Order; -import org.springframework.stereotype.Component; -import org.springframework.util.StringUtils; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.context.request.RequestContextHolder; -import org.springframework.web.context.request.ServletRequestAttributes; - -import jakarta.servlet.http.HttpServletRequest; -import java.lang.reflect.Method; -import java.lang.reflect.Parameter; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * 统一日志处理切面 - * Created by macro on 2018/4/26. - */ -@Aspect -@Component -@Order(1) -public class WebLogAspect { - private static final Logger LOGGER = LoggerFactory.getLogger(WebLogAspect.class); - - @Pointcut("execution(public * com.macro.mall.controller.*.*(..))||execution(public * com.macro.mall.*.controller.*.*(..))") - public void webLog() { - } - - @Before("webLog()") - public void doBefore(JoinPoint joinPoint) throws Throwable { - } - - @AfterReturning(value = "webLog()", returning = "ret") - public void doAfterReturning(Object ret) throws Throwable { - } - - @Around("webLog()") - public Object doAround(ProceedingJoinPoint joinPoint) throws Throwable { - long startTime = System.currentTimeMillis(); - //获取当前请求对象 - ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); - HttpServletRequest request = attributes.getRequest(); - //记录请求信息(通过Logstash传入Elasticsearch) - WebLog webLog = new WebLog(); - Object result = joinPoint.proceed(); - Signature signature = joinPoint.getSignature(); - MethodSignature methodSignature = (MethodSignature) signature; - Method method = methodSignature.getMethod(); - if (method.isAnnotationPresent(Operation.class)) { - Operation log = method.getAnnotation(Operation.class); - webLog.setDescription(log.summary()); - } - long endTime = System.currentTimeMillis(); - String urlStr = request.getRequestURL().toString(); - webLog.setBasePath(StrUtil.removeSuffix(urlStr, URLUtil.url(urlStr).getPath())); - webLog.setIp(request.getRemoteUser()); - webLog.setMethod(request.getMethod()); - webLog.setParameter(getParameter(method, joinPoint.getArgs())); - webLog.setResult(result); - webLog.setSpendTime((int) (endTime - startTime)); - webLog.setStartTime(startTime); - webLog.setUri(request.getRequestURI()); - webLog.setUrl(request.getRequestURL().toString()); - Map logMap = new HashMap<>(); - logMap.put("url",webLog.getUrl()); - logMap.put("method",webLog.getMethod()); - logMap.put("parameter",webLog.getParameter()); - logMap.put("spendTime",webLog.getSpendTime()); - logMap.put("description",webLog.getDescription()); -// LOGGER.info("{}", JSONUtil.parse(webLog)); - LOGGER.info(Markers.appendEntries(logMap), JSONUtil.parse(webLog).toString()); - return result; - } - - /** - * 根据方法和传入的参数获取请求参数 - */ - private Object getParameter(Method method, Object[] args) { - List argList = new ArrayList<>(); - Parameter[] parameters = method.getParameters(); - for (int i = 0; i < parameters.length; i++) { - //将RequestBody注解修饰的参数作为请求参数 - RequestBody requestBody = parameters[i].getAnnotation(RequestBody.class); - if (requestBody != null) { - argList.add(args[i]); - } - //将RequestParam注解修饰的参数作为请求参数 - RequestParam requestParam = parameters[i].getAnnotation(RequestParam.class); - if (requestParam != null) { - Map map = new HashMap<>(); - String key = parameters[i].getName(); - if (!StringUtils.isEmpty(requestParam.value())) { - key = requestParam.value(); - } - map.put(key, args[i]); - argList.add(map); - } - } - if (argList.size() == 0) { - return null; - } else if (argList.size() == 1) { - return argList.get(0); - } else { - return argList; - } - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/service/RedisService.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/service/RedisService.java deleted file mode 100644 index 9f2de5efd..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/service/RedisService.java +++ /dev/null @@ -1,182 +0,0 @@ -package com.macro.mall.common.service; - -import java.util.List; -import java.util.Map; -import java.util.Set; - -/** - * redis操作Service - * Created by macro on 2020/3/3. - */ -public interface RedisService { - - /** - * 保存属性 - */ - void set(String key, Object value, long time); - - /** - * 保存属性 - */ - void set(String key, Object value); - - /** - * 获取属性 - */ - Object get(String key); - - /** - * 删除属性 - */ - Boolean del(String key); - - /** - * 批量删除属性 - */ - Long del(List keys); - - /** - * 设置过期时间 - */ - Boolean expire(String key, long time); - - /** - * 获取过期时间 - */ - Long getExpire(String key); - - /** - * 判断是否有该属性 - */ - Boolean hasKey(String key); - - /** - * 按delta递增 - */ - Long incr(String key, long delta); - - /** - * 按delta递减 - */ - Long decr(String key, long delta); - - /** - * 获取Hash结构中的属性 - */ - Object hGet(String key, String hashKey); - - /** - * 向Hash结构中放入一个属性 - */ - Boolean hSet(String key, String hashKey, Object value, long time); - - /** - * 向Hash结构中放入一个属性 - */ - void hSet(String key, String hashKey, Object value); - - /** - * 直接获取整个Hash结构 - */ - Map hGetAll(String key); - - /** - * 直接设置整个Hash结构 - */ - Boolean hSetAll(String key, Map map, long time); - - /** - * 直接设置整个Hash结构 - */ - void hSetAll(String key, Map map); - - /** - * 删除Hash结构中的属性 - */ - void hDel(String key, Object... hashKey); - - /** - * 判断Hash结构中是否有该属性 - */ - Boolean hHasKey(String key, String hashKey); - - /** - * Hash结构中属性递增 - */ - Long hIncr(String key, String hashKey, Long delta); - - /** - * Hash结构中属性递减 - */ - Long hDecr(String key, String hashKey, Long delta); - - /** - * 获取Set结构 - */ - Set sMembers(String key); - - /** - * 向Set结构中添加属性 - */ - Long sAdd(String key, Object... values); - - /** - * 向Set结构中添加属性 - */ - Long sAdd(String key, long time, Object... values); - - /** - * 是否为Set中的属性 - */ - Boolean sIsMember(String key, Object value); - - /** - * 获取Set结构的长度 - */ - Long sSize(String key); - - /** - * 删除Set结构中的属性 - */ - Long sRemove(String key, Object... values); - - /** - * 获取List结构中的属性 - */ - List lRange(String key, long start, long end); - - /** - * 获取List结构的长度 - */ - Long lSize(String key); - - /** - * 根据索引获取List中的属性 - */ - Object lIndex(String key, long index); - - /** - * 向List结构中添加属性 - */ - Long lPush(String key, Object value); - - /** - * 向List结构中添加属性 - */ - Long lPush(String key, Object value, long time); - - /** - * 向List结构中批量添加属性 - */ - Long lPushAll(String key, Object... values); - - /** - * 向List结构中批量添加属性 - */ - Long lPushAll(String key, Long time, Object... values); - - /** - * 从List结构中移除属性 - */ - Long lRemove(String key, long count, Object value); -} \ No newline at end of file diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/service/impl/RedisServiceImpl.java b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/service/impl/RedisServiceImpl.java deleted file mode 100644 index 8720014cf..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/java/com/macro/mall/common/service/impl/RedisServiceImpl.java +++ /dev/null @@ -1,198 +0,0 @@ -package com.macro.mall.common.service.impl; - -import com.macro.mall.common.service.RedisService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.data.redis.core.RedisTemplate; -import org.springframework.stereotype.Service; - -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.concurrent.TimeUnit; - -/** - * redis操作实现类 - * Created by macro on 2020/3/3. - */ -public class RedisServiceImpl implements RedisService { - @Autowired - private RedisTemplate redisTemplate; - - @Override - public void set(String key, Object value, long time) { - redisTemplate.opsForValue().set(key, value, time, TimeUnit.SECONDS); - } - - @Override - public void set(String key, Object value) { - redisTemplate.opsForValue().set(key, value); - } - - @Override - public Object get(String key) { - return redisTemplate.opsForValue().get(key); - } - - @Override - public Boolean del(String key) { - return redisTemplate.delete(key); - } - - @Override - public Long del(List keys) { - return redisTemplate.delete(keys); - } - - @Override - public Boolean expire(String key, long time) { - return redisTemplate.expire(key, time, TimeUnit.SECONDS); - } - - @Override - public Long getExpire(String key) { - return redisTemplate.getExpire(key, TimeUnit.SECONDS); - } - - @Override - public Boolean hasKey(String key) { - return redisTemplate.hasKey(key); - } - - @Override - public Long incr(String key, long delta) { - return redisTemplate.opsForValue().increment(key, delta); - } - - @Override - public Long decr(String key, long delta) { - return redisTemplate.opsForValue().increment(key, -delta); - } - - @Override - public Object hGet(String key, String hashKey) { - return redisTemplate.opsForHash().get(key, hashKey); - } - - @Override - public Boolean hSet(String key, String hashKey, Object value, long time) { - redisTemplate.opsForHash().put(key, hashKey, value); - return expire(key, time); - } - - @Override - public void hSet(String key, String hashKey, Object value) { - redisTemplate.opsForHash().put(key, hashKey, value); - } - - @Override - public Map hGetAll(String key) { - return redisTemplate.opsForHash().entries(key); - } - - @Override - public Boolean hSetAll(String key, Map map, long time) { - redisTemplate.opsForHash().putAll(key, map); - return expire(key, time); - } - - @Override - public void hSetAll(String key, Map map) { - redisTemplate.opsForHash().putAll(key, map); - } - - @Override - public void hDel(String key, Object... hashKey) { - redisTemplate.opsForHash().delete(key, hashKey); - } - - @Override - public Boolean hHasKey(String key, String hashKey) { - return redisTemplate.opsForHash().hasKey(key, hashKey); - } - - @Override - public Long hIncr(String key, String hashKey, Long delta) { - return redisTemplate.opsForHash().increment(key, hashKey, delta); - } - - @Override - public Long hDecr(String key, String hashKey, Long delta) { - return redisTemplate.opsForHash().increment(key, hashKey, -delta); - } - - @Override - public Set sMembers(String key) { - return redisTemplate.opsForSet().members(key); - } - - @Override - public Long sAdd(String key, Object... values) { - return redisTemplate.opsForSet().add(key, values); - } - - @Override - public Long sAdd(String key, long time, Object... values) { - Long count = redisTemplate.opsForSet().add(key, values); - expire(key, time); - return count; - } - - @Override - public Boolean sIsMember(String key, Object value) { - return redisTemplate.opsForSet().isMember(key, value); - } - - @Override - public Long sSize(String key) { - return redisTemplate.opsForSet().size(key); - } - - @Override - public Long sRemove(String key, Object... values) { - return redisTemplate.opsForSet().remove(key, values); - } - - @Override - public List lRange(String key, long start, long end) { - return redisTemplate.opsForList().range(key, start, end); - } - - @Override - public Long lSize(String key) { - return redisTemplate.opsForList().size(key); - } - - @Override - public Object lIndex(String key, long index) { - return redisTemplate.opsForList().index(key, index); - } - - @Override - public Long lPush(String key, Object value) { - return redisTemplate.opsForList().rightPush(key, value); - } - - @Override - public Long lPush(String key, Object value, long time) { - Long index = redisTemplate.opsForList().rightPush(key, value); - expire(key, time); - return index; - } - - @Override - public Long lPushAll(String key, Object... values) { - return redisTemplate.opsForList().rightPushAll(key, values); - } - - @Override - public Long lPushAll(String key, Long time, Object... values) { - Long count = redisTemplate.opsForList().rightPushAll(key, values); - expire(key, time); - return count; - } - - @Override - public Long lRemove(String key, long count, Object value) { - return redisTemplate.opsForList().remove(key, count, value); - } -} diff --git a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/resources/logback-spring.xml b/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/resources/logback-spring.xml deleted file mode 100644 index 08aaa422a..000000000 --- a/ruoyi-saas-app/ruoyi-mall/ruoyi-mall-common/src/main/resources/logback-spring.xml +++ /dev/null @@ -1,204 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - DEBUG - - - - ${FILE_LOG_PATTERN} - UTF-8 - - - - ${LOG_FILE_PATH}/debug/${APP_NAME}-%d{yyyy-MM-dd}-%i.log - - ${LOG_FILE_MAX_SIZE:-10MB} - - ${LOG_FILE_MAX_HISTORY:-30} - - - - - - - - ERROR - ACCEPT - DENY - - - - ${FILE_LOG_PATTERN} - UTF-8 - - - - ${LOG_FILE_PATH}/error/${APP_NAME}-%d{yyyy-MM-dd}-%i.log - - ${LOG_FILE_MAX_SIZE:-10MB} - - ${LOG_FILE_MAX_HISTORY:-30} - - - - - - - DEBUG - - ${LOG_STASH_HOST}:4560 - ${ENABLE_INNER_LOG} - - - - Asia/Shanghai - - - - - { - "project": "mall-swarm", - "level": "%level", - "service": "${APP_NAME:-}", - "pid": "${PID:-}", - "thread": "%thread", - "class": "%logger", - "message": "%message", - "stack_trace": "%exception{20}" - } - - - - - - - - - - ERROR - ACCEPT - DENY - - ${LOG_STASH_HOST}:4561 - ${ENABLE_INNER_LOG} - - - - Asia/Shanghai - - - - - { - "project": "mall-swarm", - "level": "%level", - "service": "${APP_NAME:-}", - "pid": "${PID:-}", - "thread": "%thread", - "class": "%logger", - "message": "%message", - "stack_trace": "%exception{20}" - } - - - - - - - - - ${LOG_STASH_HOST}:4562 - ${ENABLE_INNER_LOG} - - - - Asia/Shanghai - - - - - { - "project": "mall-swarm", - "level": "%level", - "service": "${APP_NAME:-}", - "pid": "${PID:-}", - "thread": "%thread", - "class": "%logger", - "message": "%message", - "stack_trace": "%exception{20}" - } - - - - - - - - - ${LOG_STASH_HOST}:4563 - ${ENABLE_INNER_LOG} - - - - Asia/Shanghai - - - - - { - "project": "mall-swarm", - "level": "%level", - "service": "${APP_NAME:-}", - "class": "%logger", - "message": "%message" - } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -