From 1a1483a5a75fab1677b02862f57ed5870e655a20 Mon Sep 17 00:00:00 2001 From: hxrui <1490493387@qq.com> Date: Fri, 5 Feb 2021 20:14:58 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=B7=BB=E5=8A=A0=E7=BD=91=E5=85=B3?= =?UTF-8?q?=E8=B7=AF=E7=94=B1=E6=9D=83=E9=99=90=E7=BB=86=E7=B2=92=E5=BA=A6?= =?UTF-8?q?=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/youlai/mall/oms/pojo/OmsOrder.java | 4 +--- .../com/youlai/mall/oms/pojo/OmsOrderItem.java | 2 +- .../mall/oms/pojo/entity/OrderDeliveryEntity.java | 2 +- .../youlai/mall/oms/pojo/entity/OrderEntity.java | 2 +- .../mall/oms/pojo/entity/OrderGoodsEntity.java | 2 +- .../mall/oms/pojo/entity/OrderLogsEntity.java | 2 +- .../mall/oms/pojo/entity/OrderPayEntity.java | 2 +- .../mall/oms/pojo/entity/OrderSettingEntity.java | 2 +- .../com/youlai/mall/oms/pojo/vo/CouponVO.java | 2 +- .../youlai/mall/oms/pojo/vo/OrderConfirmVO.java | 2 +- .../com/youlai/mall/oms/pojo/vo/OrderItemVO.java | 2 +- .../mall/oms/pojo/vo/OrderSubmitResultVO.java | 2 +- .../youlai/mall/oms/pojo/vo/OrderSubmitVO.java | 2 +- .../java/com/youlai/mall/oms/pojo/vo/OrderVO.java | 2 +- .../youlai/mall/pms/api/ProductFeignService.java | 2 +- .../java/com/youlai/mall/pms/pojo/PmsBrand.java | 2 +- .../com/youlai/mall/pms/pojo/PmsCategory.java | 2 +- .../java/com/youlai/mall/pms/pojo/PmsSku.java | 5 +---- .../java/com/youlai/mall/pms/pojo/PmsSpu.java | 2 +- .../com/youlai/mall/pms/pojo/PmsSpuAttrValue.java | 3 +-- .../com/youlai/mall/pms/pojo/PmsSpuSpecValue.java | 2 +- .../com/youlai/mall/pms/pojo/dto/SkuInfoDTO.java | 2 +- .../mall/pms/pojo/vo/LockStockResultVO.java | 2 +- .../com/youlai/mall/pms/pojo/vo/OrderItemVO.java | 2 +- .../com/youlai/mall/pms/pojo/vo/SkuInfoVO.java | 2 +- .../com/youlai/mall/pms/pojo/vo/SkuStockVO.java | 2 +- .../youlai/mall/pms/pojo/vo/WareSkuStockVO.java | 2 +- .../search/controller/PmsSearchController.java | 2 +- .../search/service/impl/PmsSearchServiceImpl.java | 2 +- .../java/com/youlai/mall/sms/pojo/SmsAdvert.java | 2 +- .../youlai/mall/ums/api/MemberFeignService.java | 2 +- .../java/com/youlai/mall/ums/pojo/UmsAddress.java | 2 +- .../java/com/youlai/mall/ums/pojo/UmsUser.java | 2 +- .../com/youlai/admin/api/UserFeignService.java | 2 +- .../com/youlai/admin/pojo/entity/SysDept.java | 2 +- .../com/youlai/admin/pojo/entity/SysDict.java | 2 +- .../com/youlai/admin/pojo/entity/SysDictItem.java | 2 +- .../com/youlai/admin/pojo/entity/SysMenu.java | 3 +-- .../youlai/admin/pojo/entity/SysPermission.java | 5 +++-- .../com/youlai/admin/pojo/entity/SysRole.java | 3 +-- .../com/youlai/admin/pojo/entity/SysUser.java | 2 +- .../java/com/youlai/admin/pojo/vo/MenuVO.java | 2 +- .../auth/config/AuthorizationServerConfig.java | 6 +++--- .../youlai/auth/controller/AuthController.java | 8 ++++---- .../youlai/auth/controller/LogoutController.java | 4 ++-- .../main/java/com/youlai/auth/domain/User.java | 2 +- .../auth/exception/AuthExceptionHandler.java | 4 ++-- .../auth/service/UserDetailsServiceImpl.java | 6 +++--- .../common/{core => }/base/BaseController.java | 2 +- .../youlai/common/{core => }/base/BaseEntity.java | 2 +- .../com/youlai/common/{core => }/base/BaseVO.java | 2 +- .../com/youlai/common/{core => }/base/Query.java | 6 +++--- .../common/{core => }/constant/AuthConstants.java | 4 ++-- .../{core => }/constant/EsIndexContstants.java | 2 +- .../{core => }/constant/GlobalConstants.java | 2 +- .../{core => }/constant/RenrenConstant.java | 2 +- .../common/{core => }/enums/QueryModeEnum.java | 2 +- .../common/{core => }/result/IResultCode.java | 2 +- .../youlai/common/{core => }/result/Result.java | 2 +- .../common/{core => }/result/ResultCode.java | 2 +- .../youlai/common/{core => }/xss/HTMLFilter.java | 2 +- .../youlai/common/{core => }/xss/SQLFilter.java | 2 +- .../youlai/common/web/exception/BizException.java | 2 +- .../web/exception/GlobalExceptionHandler.java | 2 +- .../common/web/service/PermissionService.java | 13 ------------- .../java/com/youlai/common/web/util/WebUtils.java | 4 ++-- .../gateway/config/ResourceServerConfig.java | 15 ++------------- .../youlai/gateway/filter/AuthGlobalFilter.java | 12 ++---------- .../gateway/security/AuthorizationManager.java | 9 +++++---- .../java/com/youlai/gateway/util/WebUtils.java | 4 ++-- 70 files changed, 91 insertions(+), 129 deletions(-) rename youlai-common/common-core/src/main/java/com/youlai/common/{core => }/base/BaseController.java (51%) rename youlai-common/common-core/src/main/java/com/youlai/common/{core => }/base/BaseEntity.java (95%) rename youlai-common/common-core/src/main/java/com/youlai/common/{core => }/base/BaseVO.java (88%) rename youlai-common/common-core/src/main/java/com/youlai/common/{core => }/base/Query.java (94%) rename youlai-common/common-core/src/main/java/com/youlai/common/{core => }/constant/AuthConstants.java (94%) rename youlai-common/common-core/src/main/java/com/youlai/common/{core => }/constant/EsIndexContstants.java (64%) rename youlai-common/common-core/src/main/java/com/youlai/common/{core => }/constant/GlobalConstants.java (82%) rename youlai-common/common-core/src/main/java/com/youlai/common/{core => }/constant/RenrenConstant.java (98%) rename youlai-common/common-core/src/main/java/com/youlai/common/{core => }/enums/QueryModeEnum.java (94%) rename youlai-common/common-core/src/main/java/com/youlai/common/{core => }/result/IResultCode.java (76%) rename youlai-common/common-core/src/main/java/com/youlai/common/{core => }/result/Result.java (98%) rename youlai-common/common-core/src/main/java/com/youlai/common/{core => }/result/ResultCode.java (98%) rename youlai-common/common-core/src/main/java/com/youlai/common/{core => }/xss/HTMLFilter.java (99%) rename youlai-common/common-core/src/main/java/com/youlai/common/{core => }/xss/SQLFilter.java (96%) delete mode 100644 youlai-common/common-web/src/main/java/com/youlai/common/web/service/PermissionService.java diff --git a/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/OmsOrder.java b/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/OmsOrder.java index d8f3d709d..1709e734d 100644 --- a/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/OmsOrder.java +++ b/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/OmsOrder.java @@ -2,11 +2,9 @@ package com.youlai.mall.oms.pojo; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; -import com.youlai.common.core.base.BaseEntity; +import com.youlai.common.base.BaseEntity; import lombok.Data; -import java.util.Date; - @Data public class OmsOrder extends BaseEntity { diff --git a/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/OmsOrderItem.java b/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/OmsOrderItem.java index 9e6570ba8..bb40ed5d7 100644 --- a/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/OmsOrderItem.java +++ b/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/OmsOrderItem.java @@ -2,7 +2,7 @@ package com.youlai.mall.oms.pojo; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; -import com.youlai.common.core.base.BaseEntity; +import com.youlai.common.base.BaseEntity; import lombok.Data; diff --git a/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/entity/OrderDeliveryEntity.java b/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/entity/OrderDeliveryEntity.java index 1cb612436..24d2687c0 100644 --- a/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/entity/OrderDeliveryEntity.java +++ b/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/entity/OrderDeliveryEntity.java @@ -3,7 +3,7 @@ package com.youlai.mall.oms.pojo.entity; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; -import com.youlai.common.core.base.BaseEntity; +import com.youlai.common.base.BaseEntity; import lombok.Data; import java.util.Date; diff --git a/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/entity/OrderEntity.java b/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/entity/OrderEntity.java index 41699ee41..826916664 100644 --- a/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/entity/OrderEntity.java +++ b/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/entity/OrderEntity.java @@ -3,7 +3,7 @@ package com.youlai.mall.oms.pojo.entity; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; -import com.youlai.common.core.base.BaseEntity; +import com.youlai.common.base.BaseEntity; import lombok.Data; import java.util.Date; diff --git a/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/entity/OrderGoodsEntity.java b/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/entity/OrderGoodsEntity.java index 50514b0b8..e16c34a25 100644 --- a/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/entity/OrderGoodsEntity.java +++ b/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/entity/OrderGoodsEntity.java @@ -3,7 +3,7 @@ package com.youlai.mall.oms.pojo.entity; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; -import com.youlai.common.core.base.BaseEntity; +import com.youlai.common.base.BaseEntity; import lombok.Data; /** diff --git a/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/entity/OrderLogsEntity.java b/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/entity/OrderLogsEntity.java index f7630282a..cd57c9812 100644 --- a/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/entity/OrderLogsEntity.java +++ b/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/entity/OrderLogsEntity.java @@ -3,7 +3,7 @@ package com.youlai.mall.oms.pojo.entity; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; -import com.youlai.common.core.base.BaseEntity; +import com.youlai.common.base.BaseEntity; import lombok.Data; /** diff --git a/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/entity/OrderPayEntity.java b/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/entity/OrderPayEntity.java index c94c889fb..9722d4d1a 100644 --- a/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/entity/OrderPayEntity.java +++ b/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/entity/OrderPayEntity.java @@ -3,7 +3,7 @@ package com.youlai.mall.oms.pojo.entity; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; -import com.youlai.common.core.base.BaseEntity; +import com.youlai.common.base.BaseEntity; import lombok.Data; import java.util.Date; diff --git a/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/entity/OrderSettingEntity.java b/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/entity/OrderSettingEntity.java index 5e65b2b28..ee4759202 100644 --- a/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/entity/OrderSettingEntity.java +++ b/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/entity/OrderSettingEntity.java @@ -3,7 +3,7 @@ package com.youlai.mall.oms.pojo.entity; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; -import com.youlai.common.core.base.BaseEntity; +import com.youlai.common.base.BaseEntity; import lombok.Data; /** diff --git a/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/vo/CouponVO.java b/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/vo/CouponVO.java index f11dfe6f8..59ef8c7ba 100644 --- a/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/vo/CouponVO.java +++ b/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/vo/CouponVO.java @@ -1,6 +1,6 @@ package com.youlai.mall.oms.pojo.vo; -import com.youlai.common.core.base.BaseVO; +import com.youlai.common.base.BaseVO; import lombok.Data; /** diff --git a/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/vo/OrderConfirmVO.java b/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/vo/OrderConfirmVO.java index af404803a..614bb156b 100644 --- a/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/vo/OrderConfirmVO.java +++ b/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/vo/OrderConfirmVO.java @@ -1,6 +1,6 @@ package com.youlai.mall.oms.pojo.vo; -import com.youlai.common.core.base.BaseVO; +import com.youlai.common.base.BaseVO; import lombok.Getter; import lombok.Setter; diff --git a/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/vo/OrderItemVO.java b/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/vo/OrderItemVO.java index 2b836b265..b77cc9da7 100644 --- a/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/vo/OrderItemVO.java +++ b/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/vo/OrderItemVO.java @@ -1,6 +1,6 @@ package com.youlai.mall.oms.pojo.vo; -import com.youlai.common.core.base.BaseVO; +import com.youlai.common.base.BaseVO; import lombok.Builder; import lombok.Getter; import lombok.Setter; diff --git a/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/vo/OrderSubmitResultVO.java b/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/vo/OrderSubmitResultVO.java index c32950898..3ca4daa21 100644 --- a/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/vo/OrderSubmitResultVO.java +++ b/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/vo/OrderSubmitResultVO.java @@ -1,6 +1,6 @@ package com.youlai.mall.oms.pojo.vo; -import com.youlai.common.core.base.BaseVO; +import com.youlai.common.base.BaseVO; import lombok.Data; /** diff --git a/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/vo/OrderSubmitVO.java b/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/vo/OrderSubmitVO.java index c78f35d8c..c7a61f2fd 100644 --- a/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/vo/OrderSubmitVO.java +++ b/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/vo/OrderSubmitVO.java @@ -1,6 +1,6 @@ package com.youlai.mall.oms.pojo.vo; -import com.youlai.common.core.base.BaseVO; +import com.youlai.common.base.BaseVO; import lombok.Data; import javax.validation.constraints.NotBlank; diff --git a/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/vo/OrderVO.java b/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/vo/OrderVO.java index 8a8c1c521..2e75baf75 100644 --- a/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/vo/OrderVO.java +++ b/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/vo/OrderVO.java @@ -1,6 +1,6 @@ package com.youlai.mall.oms.pojo.vo; -import com.youlai.common.core.base.BaseVO; +import com.youlai.common.base.BaseVO; import com.youlai.mall.oms.pojo.entity.OrderDeliveryEntity; import com.youlai.mall.oms.pojo.entity.OrderEntity; import com.youlai.mall.oms.pojo.entity.OrderGoodsEntity; diff --git a/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/api/ProductFeignService.java b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/api/ProductFeignService.java index a585bf774..7b516adf8 100644 --- a/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/api/ProductFeignService.java +++ b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/api/ProductFeignService.java @@ -1,6 +1,6 @@ package com.youlai.mall.pms.api; -import com.youlai.common.core.result.Result; +import com.youlai.common.result.Result; import com.youlai.mall.pms.pojo.dto.SkuDTO; import com.youlai.mall.pms.pojo.vo.SkuInfoVO; import com.youlai.mall.pms.pojo.vo.WareSkuStockVO; diff --git a/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/PmsBrand.java b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/PmsBrand.java index dd1fbfa3d..3528d5e72 100644 --- a/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/PmsBrand.java +++ b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/PmsBrand.java @@ -2,7 +2,7 @@ package com.youlai.mall.pms.pojo; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; -import com.youlai.common.core.base.BaseEntity; +import com.youlai.common.base.BaseEntity; import lombok.Data; diff --git a/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/PmsCategory.java b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/PmsCategory.java index e9bf7dc1d..0c6e81115 100644 --- a/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/PmsCategory.java +++ b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/PmsCategory.java @@ -3,7 +3,7 @@ package com.youlai.mall.pms.pojo; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.fasterxml.jackson.annotation.JsonInclude; -import com.youlai.common.core.base.BaseEntity; +import com.youlai.common.base.BaseEntity; import lombok.Data; @Data diff --git a/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/PmsSku.java b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/PmsSku.java index d0a25cac0..e369f07a2 100644 --- a/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/PmsSku.java +++ b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/PmsSku.java @@ -1,13 +1,10 @@ package com.youlai.mall.pms.pojo; import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; -import com.youlai.common.core.base.BaseEntity; +import com.youlai.common.base.BaseEntity; import lombok.Data; -import java.util.List; - @Data public class PmsSku extends BaseEntity { diff --git a/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/PmsSpu.java b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/PmsSpu.java index 9f51583e8..c4e2a9f49 100644 --- a/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/PmsSpu.java +++ b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/PmsSpu.java @@ -3,7 +3,7 @@ package com.youlai.mall.pms.pojo; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; -import com.youlai.common.core.base.BaseEntity; +import com.youlai.common.base.BaseEntity; import lombok.Data; import lombok.experimental.Accessors; import org.springframework.data.annotation.Id; diff --git a/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/PmsSpuAttrValue.java b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/PmsSpuAttrValue.java index 77bca0692..56117761d 100644 --- a/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/PmsSpuAttrValue.java +++ b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/PmsSpuAttrValue.java @@ -1,9 +1,8 @@ package com.youlai.mall.pms.pojo; import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; -import com.youlai.common.core.base.BaseEntity; +import com.youlai.common.base.BaseEntity; import lombok.Data; /** diff --git a/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/PmsSpuSpecValue.java b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/PmsSpuSpecValue.java index 5a0e0eb7d..9fb0727d3 100644 --- a/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/PmsSpuSpecValue.java +++ b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/PmsSpuSpecValue.java @@ -2,7 +2,7 @@ package com.youlai.mall.pms.pojo; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; -import com.youlai.common.core.base.BaseEntity; +import com.youlai.common.base.BaseEntity; import lombok.Data; /** diff --git a/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/dto/SkuInfoDTO.java b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/dto/SkuInfoDTO.java index 08ee0c96c..2b3265a6d 100644 --- a/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/dto/SkuInfoDTO.java +++ b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/dto/SkuInfoDTO.java @@ -1,6 +1,6 @@ package com.youlai.mall.pms.pojo.dto; -import com.youlai.common.core.base.BaseVO; +import com.youlai.common.base.BaseVO; import lombok.Data; /** diff --git a/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/vo/LockStockResultVO.java b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/vo/LockStockResultVO.java index 5a0cded27..478bbf770 100644 --- a/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/vo/LockStockResultVO.java +++ b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/vo/LockStockResultVO.java @@ -1,6 +1,6 @@ package com.youlai.mall.pms.pojo.vo; -import com.youlai.common.core.base.BaseVO; +import com.youlai.common.base.BaseVO; import lombok.Data; /** diff --git a/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/vo/OrderItemVO.java b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/vo/OrderItemVO.java index 17fdf9a45..aef0c8073 100644 --- a/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/vo/OrderItemVO.java +++ b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/vo/OrderItemVO.java @@ -1,6 +1,6 @@ package com.youlai.mall.pms.pojo.vo; -import com.youlai.common.core.base.BaseVO; +import com.youlai.common.base.BaseVO; import lombok.Builder; import lombok.Getter; import lombok.Setter; diff --git a/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/vo/SkuInfoVO.java b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/vo/SkuInfoVO.java index b927d8c4d..118964ced 100644 --- a/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/vo/SkuInfoVO.java +++ b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/vo/SkuInfoVO.java @@ -1,6 +1,6 @@ package com.youlai.mall.pms.pojo.vo; -import com.youlai.common.core.base.BaseVO; +import com.youlai.common.base.BaseVO; import lombok.Data; /** diff --git a/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/vo/SkuStockVO.java b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/vo/SkuStockVO.java index a17981485..1bda2b10a 100644 --- a/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/vo/SkuStockVO.java +++ b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/vo/SkuStockVO.java @@ -1,6 +1,6 @@ package com.youlai.mall.pms.pojo.vo; -import com.youlai.common.core.base.BaseVO; +import com.youlai.common.base.BaseVO; import lombok.Data; /** diff --git a/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/vo/WareSkuStockVO.java b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/vo/WareSkuStockVO.java index faf611eef..2140f09f3 100644 --- a/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/vo/WareSkuStockVO.java +++ b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/vo/WareSkuStockVO.java @@ -1,6 +1,6 @@ package com.youlai.mall.pms.pojo.vo; -import com.youlai.common.core.base.BaseVO; +import com.youlai.common.base.BaseVO; import lombok.Data; import java.util.List; diff --git a/mall-pms/pms-search/src/main/java/com/youlai/mall/pms/search/controller/PmsSearchController.java b/mall-pms/pms-search/src/main/java/com/youlai/mall/pms/search/controller/PmsSearchController.java index 829a5a2c1..9442c26a1 100644 --- a/mall-pms/pms-search/src/main/java/com/youlai/mall/pms/search/controller/PmsSearchController.java +++ b/mall-pms/pms-search/src/main/java/com/youlai/mall/pms/search/controller/PmsSearchController.java @@ -1,6 +1,6 @@ package com.youlai.mall.pms.search.controller; -import com.youlai.common.core.result.Result; +import com.youlai.common.result.Result; import com.youlai.mall.pms.search.service.IPmsSearchService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; diff --git a/mall-pms/pms-search/src/main/java/com/youlai/mall/pms/search/service/impl/PmsSearchServiceImpl.java b/mall-pms/pms-search/src/main/java/com/youlai/mall/pms/search/service/impl/PmsSearchServiceImpl.java index faedb114a..9da6d8779 100644 --- a/mall-pms/pms-search/src/main/java/com/youlai/mall/pms/search/service/impl/PmsSearchServiceImpl.java +++ b/mall-pms/pms-search/src/main/java/com/youlai/mall/pms/search/service/impl/PmsSearchServiceImpl.java @@ -14,7 +14,7 @@ import org.springframework.stereotype.Service; import java.io.IOException; import java.util.List; -import static com.youlai.common.core.constant.EsIndexContstants.PMS_SPU; +import static com.youlai.common.constant.EsIndexContstants.PMS_SPU; @Service @AllArgsConstructor diff --git a/mall-sms/sms-api/src/main/java/com/youlai/mall/sms/pojo/SmsAdvert.java b/mall-sms/sms-api/src/main/java/com/youlai/mall/sms/pojo/SmsAdvert.java index 1d6b92d3d..1531c2ed0 100644 --- a/mall-sms/sms-api/src/main/java/com/youlai/mall/sms/pojo/SmsAdvert.java +++ b/mall-sms/sms-api/src/main/java/com/youlai/mall/sms/pojo/SmsAdvert.java @@ -2,7 +2,7 @@ package com.youlai.mall.sms.pojo; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; -import com.youlai.common.core.base.BaseEntity; +import com.youlai.common.base.BaseEntity; import lombok.Data; import java.util.Date; diff --git a/mall-ums/ums-api/src/main/java/com/youlai/mall/ums/api/MemberFeignService.java b/mall-ums/ums-api/src/main/java/com/youlai/mall/ums/api/MemberFeignService.java index 30368c046..ab01e252f 100644 --- a/mall-ums/ums-api/src/main/java/com/youlai/mall/ums/api/MemberFeignService.java +++ b/mall-ums/ums-api/src/main/java/com/youlai/mall/ums/api/MemberFeignService.java @@ -1,6 +1,6 @@ package com.youlai.mall.ums.api; -import com.youlai.common.core.result.Result; +import com.youlai.common.result.Result; import com.youlai.mall.ums.pojo.UmsUser; import com.youlai.mall.ums.pojo.dto.AuthMemberDTO; import com.youlai.mall.ums.pojo.dto.MemberDTO; diff --git a/mall-ums/ums-api/src/main/java/com/youlai/mall/ums/pojo/UmsAddress.java b/mall-ums/ums-api/src/main/java/com/youlai/mall/ums/pojo/UmsAddress.java index 5b076ab41..0a87f9697 100644 --- a/mall-ums/ums-api/src/main/java/com/youlai/mall/ums/pojo/UmsAddress.java +++ b/mall-ums/ums-api/src/main/java/com/youlai/mall/ums/pojo/UmsAddress.java @@ -3,7 +3,7 @@ package com.youlai.mall.ums.pojo; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; -import com.youlai.common.core.base.BaseEntity; +import com.youlai.common.base.BaseEntity; import lombok.Data; import lombok.experimental.Accessors; diff --git a/mall-ums/ums-api/src/main/java/com/youlai/mall/ums/pojo/UmsUser.java b/mall-ums/ums-api/src/main/java/com/youlai/mall/ums/pojo/UmsUser.java index 59cb0b66f..c9b2ebda9 100644 --- a/mall-ums/ums-api/src/main/java/com/youlai/mall/ums/pojo/UmsUser.java +++ b/mall-ums/ums-api/src/main/java/com/youlai/mall/ums/pojo/UmsUser.java @@ -4,7 +4,7 @@ package com.youlai.mall.ums.pojo; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; -import com.youlai.common.core.base.BaseEntity; +import com.youlai.common.base.BaseEntity; import lombok.Data; import lombok.experimental.Accessors; diff --git a/youlai-admin/admin-api/src/main/java/com/youlai/admin/api/UserFeignService.java b/youlai-admin/admin-api/src/main/java/com/youlai/admin/api/UserFeignService.java index 42bdf6b32..c21222722 100644 --- a/youlai-admin/admin-api/src/main/java/com/youlai/admin/api/UserFeignService.java +++ b/youlai-admin/admin-api/src/main/java/com/youlai/admin/api/UserFeignService.java @@ -1,7 +1,7 @@ package com.youlai.admin.api; import com.youlai.admin.pojo.dto.UserDTO; -import com.youlai.common.core.result.Result; +import com.youlai.common.result.Result; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; diff --git a/youlai-admin/admin-api/src/main/java/com/youlai/admin/pojo/entity/SysDept.java b/youlai-admin/admin-api/src/main/java/com/youlai/admin/pojo/entity/SysDept.java index 49e74856b..422ff775d 100644 --- a/youlai-admin/admin-api/src/main/java/com/youlai/admin/pojo/entity/SysDept.java +++ b/youlai-admin/admin-api/src/main/java/com/youlai/admin/pojo/entity/SysDept.java @@ -2,7 +2,7 @@ package com.youlai.admin.pojo.entity; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; -import com.youlai.common.core.base.BaseEntity; +import com.youlai.common.base.BaseEntity; import lombok.Data; @Data diff --git a/youlai-admin/admin-api/src/main/java/com/youlai/admin/pojo/entity/SysDict.java b/youlai-admin/admin-api/src/main/java/com/youlai/admin/pojo/entity/SysDict.java index 5ef571238..825ed8d1d 100644 --- a/youlai-admin/admin-api/src/main/java/com/youlai/admin/pojo/entity/SysDict.java +++ b/youlai-admin/admin-api/src/main/java/com/youlai/admin/pojo/entity/SysDict.java @@ -2,7 +2,7 @@ package com.youlai.admin.pojo.entity; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; -import com.youlai.common.core.base.BaseEntity; +import com.youlai.common.base.BaseEntity; import lombok.Data; @Data diff --git a/youlai-admin/admin-api/src/main/java/com/youlai/admin/pojo/entity/SysDictItem.java b/youlai-admin/admin-api/src/main/java/com/youlai/admin/pojo/entity/SysDictItem.java index 2dff01739..45766d975 100644 --- a/youlai-admin/admin-api/src/main/java/com/youlai/admin/pojo/entity/SysDictItem.java +++ b/youlai-admin/admin-api/src/main/java/com/youlai/admin/pojo/entity/SysDictItem.java @@ -2,7 +2,7 @@ package com.youlai.admin.pojo.entity; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; -import com.youlai.common.core.base.BaseEntity; +import com.youlai.common.base.BaseEntity; import lombok.Data; import lombok.experimental.Accessors; diff --git a/youlai-admin/admin-api/src/main/java/com/youlai/admin/pojo/entity/SysMenu.java b/youlai-admin/admin-api/src/main/java/com/youlai/admin/pojo/entity/SysMenu.java index 3a7892d8c..5d1aa42e4 100644 --- a/youlai-admin/admin-api/src/main/java/com/youlai/admin/pojo/entity/SysMenu.java +++ b/youlai-admin/admin-api/src/main/java/com/youlai/admin/pojo/entity/SysMenu.java @@ -3,9 +3,8 @@ package com.youlai.admin.pojo.entity; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.annotation.JsonInclude; -import com.youlai.common.core.base.BaseEntity; +import com.youlai.common.base.BaseEntity; import lombok.Data; import java.util.List; diff --git a/youlai-admin/admin-api/src/main/java/com/youlai/admin/pojo/entity/SysPermission.java b/youlai-admin/admin-api/src/main/java/com/youlai/admin/pojo/entity/SysPermission.java index 08220b82d..842937588 100644 --- a/youlai-admin/admin-api/src/main/java/com/youlai/admin/pojo/entity/SysPermission.java +++ b/youlai-admin/admin-api/src/main/java/com/youlai/admin/pojo/entity/SysPermission.java @@ -2,7 +2,7 @@ package com.youlai.admin.pojo.entity; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; -import com.youlai.common.core.base.BaseEntity; +import com.youlai.common.base.BaseEntity; import lombok.Data; import lombok.experimental.Accessors; @@ -16,7 +16,8 @@ public class SysPermission extends BaseEntity { private Long id; private String name; private String perm; - private Long menuId; + private Long moduleId; + private String method; private Integer type; // 拥有资源权限角色ID集合 diff --git a/youlai-admin/admin-api/src/main/java/com/youlai/admin/pojo/entity/SysRole.java b/youlai-admin/admin-api/src/main/java/com/youlai/admin/pojo/entity/SysRole.java index 32ef65b3d..ca5264172 100644 --- a/youlai-admin/admin-api/src/main/java/com/youlai/admin/pojo/entity/SysRole.java +++ b/youlai-admin/admin-api/src/main/java/com/youlai/admin/pojo/entity/SysRole.java @@ -3,8 +3,7 @@ package com.youlai.admin.pojo.entity; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.youlai.common.core.base.BaseEntity; +import com.youlai.common.base.BaseEntity; import lombok.Data; import java.util.List; diff --git a/youlai-admin/admin-api/src/main/java/com/youlai/admin/pojo/entity/SysUser.java b/youlai-admin/admin-api/src/main/java/com/youlai/admin/pojo/entity/SysUser.java index 9d05e2ef7..0b7600f60 100644 --- a/youlai-admin/admin-api/src/main/java/com/youlai/admin/pojo/entity/SysUser.java +++ b/youlai-admin/admin-api/src/main/java/com/youlai/admin/pojo/entity/SysUser.java @@ -2,7 +2,7 @@ package com.youlai.admin.pojo.entity; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; -import com.youlai.common.core.base.BaseEntity; +import com.youlai.common.base.BaseEntity; import lombok.Data; import java.util.List; diff --git a/youlai-admin/admin-api/src/main/java/com/youlai/admin/pojo/vo/MenuVO.java b/youlai-admin/admin-api/src/main/java/com/youlai/admin/pojo/vo/MenuVO.java index 00a353482..4fb18ab4b 100644 --- a/youlai-admin/admin-api/src/main/java/com/youlai/admin/pojo/vo/MenuVO.java +++ b/youlai-admin/admin-api/src/main/java/com/youlai/admin/pojo/vo/MenuVO.java @@ -1,7 +1,7 @@ package com.youlai.admin.pojo.vo; import com.fasterxml.jackson.annotation.JsonInclude; -import com.youlai.common.core.base.BaseEntity; +import com.youlai.common.base.BaseEntity; import lombok.Data; import java.util.List; diff --git a/youlai-auth/src/main/java/com/youlai/auth/config/AuthorizationServerConfig.java b/youlai-auth/src/main/java/com/youlai/auth/config/AuthorizationServerConfig.java index 6ce8cf454..4f133b88c 100644 --- a/youlai-auth/src/main/java/com/youlai/auth/config/AuthorizationServerConfig.java +++ b/youlai-auth/src/main/java/com/youlai/auth/config/AuthorizationServerConfig.java @@ -6,9 +6,9 @@ import com.youlai.auth.domain.User; import com.youlai.auth.filter.CustomClientCredentialsTokenEndpointFilter; import com.youlai.auth.service.JdbcClientDetailsServiceImpl; import com.youlai.auth.service.UserDetailsServiceImpl; -import com.youlai.common.core.constant.AuthConstants; -import com.youlai.common.core.result.Result; -import com.youlai.common.core.result.ResultCode; +import com.youlai.common.constant.AuthConstants; +import com.youlai.common.result.Result; +import com.youlai.common.result.ResultCode; import lombok.AllArgsConstructor; import lombok.SneakyThrows; import org.springframework.context.annotation.Bean; diff --git a/youlai-auth/src/main/java/com/youlai/auth/controller/AuthController.java b/youlai-auth/src/main/java/com/youlai/auth/controller/AuthController.java index 78e8c95ee..b2b796aa5 100644 --- a/youlai-auth/src/main/java/com/youlai/auth/controller/AuthController.java +++ b/youlai-auth/src/main/java/com/youlai/auth/controller/AuthController.java @@ -5,10 +5,10 @@ import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult; import cn.binarywang.wx.miniapp.bean.WxMaUserInfo; import cn.hutool.core.util.StrUtil; import com.youlai.auth.domain.Oauth2Token; -import com.youlai.common.core.constant.AuthConstants; -import com.youlai.common.core.constant.GlobalConstants; -import com.youlai.common.core.result.Result; -import com.youlai.common.core.result.ResultCode; +import com.youlai.common.constant.AuthConstants; +import com.youlai.common.constant.GlobalConstants; +import com.youlai.common.result.Result; +import com.youlai.common.result.ResultCode; import com.youlai.common.web.exception.BizException; import com.youlai.mall.ums.api.MemberFeignService; import com.youlai.mall.ums.pojo.UmsUser; diff --git a/youlai-auth/src/main/java/com/youlai/auth/controller/LogoutController.java b/youlai-auth/src/main/java/com/youlai/auth/controller/LogoutController.java index 59b682263..43fd3030a 100644 --- a/youlai-auth/src/main/java/com/youlai/auth/controller/LogoutController.java +++ b/youlai-auth/src/main/java/com/youlai/auth/controller/LogoutController.java @@ -1,8 +1,8 @@ package com.youlai.auth.controller; import cn.hutool.json.JSONObject; -import com.youlai.common.core.constant.AuthConstants; -import com.youlai.common.core.result.Result; +import com.youlai.common.constant.AuthConstants; +import com.youlai.common.result.Result; import com.youlai.common.web.util.WebUtils; import io.swagger.annotations.Api; import lombok.AllArgsConstructor; diff --git a/youlai-auth/src/main/java/com/youlai/auth/domain/User.java b/youlai-auth/src/main/java/com/youlai/auth/domain/User.java index 78a9fd64e..166ba2ecc 100644 --- a/youlai-auth/src/main/java/com/youlai/auth/domain/User.java +++ b/youlai-auth/src/main/java/com/youlai/auth/domain/User.java @@ -2,7 +2,7 @@ package com.youlai.auth.domain; import cn.hutool.core.collection.CollectionUtil; import com.youlai.admin.pojo.dto.UserDTO; -import com.youlai.common.core.constant.AuthConstants; +import com.youlai.common.constant.AuthConstants; import com.youlai.mall.ums.pojo.dto.AuthMemberDTO; import lombok.Data; import lombok.NoArgsConstructor; diff --git a/youlai-auth/src/main/java/com/youlai/auth/exception/AuthExceptionHandler.java b/youlai-auth/src/main/java/com/youlai/auth/exception/AuthExceptionHandler.java index f6955e6f0..dd10edd9d 100644 --- a/youlai-auth/src/main/java/com/youlai/auth/exception/AuthExceptionHandler.java +++ b/youlai-auth/src/main/java/com/youlai/auth/exception/AuthExceptionHandler.java @@ -1,7 +1,7 @@ package com.youlai.auth.exception; -import com.youlai.common.core.result.Result; -import com.youlai.common.core.result.ResultCode; +import com.youlai.common.result.Result; +import com.youlai.common.result.ResultCode; import lombok.extern.slf4j.Slf4j; import org.springframework.security.authentication.InternalAuthenticationServiceException; import org.springframework.security.oauth2.common.exceptions.InvalidGrantException; diff --git a/youlai-auth/src/main/java/com/youlai/auth/service/UserDetailsServiceImpl.java b/youlai-auth/src/main/java/com/youlai/auth/service/UserDetailsServiceImpl.java index 0265e4f60..2b36ab5f3 100644 --- a/youlai-auth/src/main/java/com/youlai/auth/service/UserDetailsServiceImpl.java +++ b/youlai-auth/src/main/java/com/youlai/auth/service/UserDetailsServiceImpl.java @@ -3,9 +3,9 @@ package com.youlai.auth.service; import com.youlai.admin.pojo.dto.UserDTO; import com.youlai.admin.api.UserFeignService; import com.youlai.auth.domain.User; -import com.youlai.common.core.constant.AuthConstants; -import com.youlai.common.core.result.Result; -import com.youlai.common.core.result.ResultCode; +import com.youlai.common.constant.AuthConstants; +import com.youlai.common.result.Result; +import com.youlai.common.result.ResultCode; import com.youlai.mall.ums.pojo.dto.AuthMemberDTO; import com.youlai.mall.ums.api.MemberFeignService; import lombok.AllArgsConstructor; diff --git a/youlai-common/common-core/src/main/java/com/youlai/common/core/base/BaseController.java b/youlai-common/common-core/src/main/java/com/youlai/common/base/BaseController.java similarity index 51% rename from youlai-common/common-core/src/main/java/com/youlai/common/core/base/BaseController.java rename to youlai-common/common-core/src/main/java/com/youlai/common/base/BaseController.java index bd3a99089..5724b1a5e 100644 --- a/youlai-common/common-core/src/main/java/com/youlai/common/core/base/BaseController.java +++ b/youlai-common/common-core/src/main/java/com/youlai/common/base/BaseController.java @@ -1,4 +1,4 @@ -package com.youlai.common.core.base; +package com.youlai.common.base; public class BaseController { diff --git a/youlai-common/common-core/src/main/java/com/youlai/common/core/base/BaseEntity.java b/youlai-common/common-core/src/main/java/com/youlai/common/base/BaseEntity.java similarity index 95% rename from youlai-common/common-core/src/main/java/com/youlai/common/core/base/BaseEntity.java rename to youlai-common/common-core/src/main/java/com/youlai/common/base/BaseEntity.java index 62407265c..b88dbc241 100644 --- a/youlai-common/common-core/src/main/java/com/youlai/common/core/base/BaseEntity.java +++ b/youlai-common/common-core/src/main/java/com/youlai/common/base/BaseEntity.java @@ -1,4 +1,4 @@ -package com.youlai.common.core.base; +package com.youlai.common.base; import com.baomidou.mybatisplus.annotation.FieldFill; diff --git a/youlai-common/common-core/src/main/java/com/youlai/common/core/base/BaseVO.java b/youlai-common/common-core/src/main/java/com/youlai/common/base/BaseVO.java similarity index 88% rename from youlai-common/common-core/src/main/java/com/youlai/common/core/base/BaseVO.java rename to youlai-common/common-core/src/main/java/com/youlai/common/base/BaseVO.java index 1d477daa5..bbced46c9 100644 --- a/youlai-common/common-core/src/main/java/com/youlai/common/core/base/BaseVO.java +++ b/youlai-common/common-core/src/main/java/com/youlai/common/base/BaseVO.java @@ -1,4 +1,4 @@ -package com.youlai.common.core.base; +package com.youlai.common.base; import lombok.Data; import lombok.ToString; diff --git a/youlai-common/common-core/src/main/java/com/youlai/common/core/base/Query.java b/youlai-common/common-core/src/main/java/com/youlai/common/base/Query.java similarity index 94% rename from youlai-common/common-core/src/main/java/com/youlai/common/core/base/Query.java rename to youlai-common/common-core/src/main/java/com/youlai/common/base/Query.java index 2bf11a7e3..e0256ac67 100644 --- a/youlai-common/common-core/src/main/java/com/youlai/common/core/base/Query.java +++ b/youlai-common/common-core/src/main/java/com/youlai/common/base/Query.java @@ -6,14 +6,14 @@ * 版权所有,侵权必究! */ -package com.youlai.common.core.base; +package com.youlai.common.base; import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.OrderItem; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.youlai.common.core.constant.RenrenConstant; -import com.youlai.common.core.xss.SQLFilter; +import com.youlai.common.constant.RenrenConstant; +import com.youlai.common.xss.SQLFilter; import java.util.Map; diff --git a/youlai-common/common-core/src/main/java/com/youlai/common/core/constant/AuthConstants.java b/youlai-common/common-core/src/main/java/com/youlai/common/constant/AuthConstants.java similarity index 94% rename from youlai-common/common-core/src/main/java/com/youlai/common/core/constant/AuthConstants.java rename to youlai-common/common-core/src/main/java/com/youlai/common/constant/AuthConstants.java index c24006fd0..d247bd97a 100644 --- a/youlai-common/common-core/src/main/java/com/youlai/common/core/constant/AuthConstants.java +++ b/youlai-common/common-core/src/main/java/com/youlai/common/constant/AuthConstants.java @@ -1,4 +1,4 @@ -package com.youlai.common.core.constant; +package com.youlai.common.constant; public interface AuthConstants { @@ -23,7 +23,7 @@ public interface AuthConstants { /** * Redis缓存权限规则key */ - String PERMISSION_RULES_KEY = "auth:permission:rules"; + String PERMISSION_ROLES_KEY = "auth:permission:roles"; /** * 黑名单token前缀 diff --git a/youlai-common/common-core/src/main/java/com/youlai/common/core/constant/EsIndexContstants.java b/youlai-common/common-core/src/main/java/com/youlai/common/constant/EsIndexContstants.java similarity index 64% rename from youlai-common/common-core/src/main/java/com/youlai/common/core/constant/EsIndexContstants.java rename to youlai-common/common-core/src/main/java/com/youlai/common/constant/EsIndexContstants.java index 578382a0b..8f601b1e3 100644 --- a/youlai-common/common-core/src/main/java/com/youlai/common/core/constant/EsIndexContstants.java +++ b/youlai-common/common-core/src/main/java/com/youlai/common/constant/EsIndexContstants.java @@ -1,4 +1,4 @@ -package com.youlai.common.core.constant; +package com.youlai.common.constant; public interface EsIndexContstants { diff --git a/youlai-common/common-core/src/main/java/com/youlai/common/core/constant/GlobalConstants.java b/youlai-common/common-core/src/main/java/com/youlai/common/constant/GlobalConstants.java similarity index 82% rename from youlai-common/common-core/src/main/java/com/youlai/common/core/constant/GlobalConstants.java rename to youlai-common/common-core/src/main/java/com/youlai/common/constant/GlobalConstants.java index ea07b84fd..e760715e1 100644 --- a/youlai-common/common-core/src/main/java/com/youlai/common/core/constant/GlobalConstants.java +++ b/youlai-common/common-core/src/main/java/com/youlai/common/constant/GlobalConstants.java @@ -1,4 +1,4 @@ -package com.youlai.common.core.constant; +package com.youlai.common.constant; public interface GlobalConstants { diff --git a/youlai-common/common-core/src/main/java/com/youlai/common/core/constant/RenrenConstant.java b/youlai-common/common-core/src/main/java/com/youlai/common/constant/RenrenConstant.java similarity index 98% rename from youlai-common/common-core/src/main/java/com/youlai/common/core/constant/RenrenConstant.java rename to youlai-common/common-core/src/main/java/com/youlai/common/constant/RenrenConstant.java index 792bf33ff..32097f628 100644 --- a/youlai-common/common-core/src/main/java/com/youlai/common/core/constant/RenrenConstant.java +++ b/youlai-common/common-core/src/main/java/com/youlai/common/constant/RenrenConstant.java @@ -6,7 +6,7 @@ * 版权所有,侵权必究! */ -package com.youlai.common.core.constant; +package com.youlai.common.constant; /** * 常量 diff --git a/youlai-common/common-core/src/main/java/com/youlai/common/core/enums/QueryModeEnum.java b/youlai-common/common-core/src/main/java/com/youlai/common/enums/QueryModeEnum.java similarity index 94% rename from youlai-common/common-core/src/main/java/com/youlai/common/core/enums/QueryModeEnum.java rename to youlai-common/common-core/src/main/java/com/youlai/common/enums/QueryModeEnum.java index 06814b075..788d35619 100644 --- a/youlai-common/common-core/src/main/java/com/youlai/common/core/enums/QueryModeEnum.java +++ b/youlai-common/common-core/src/main/java/com/youlai/common/enums/QueryModeEnum.java @@ -1,4 +1,4 @@ -package com.youlai.common.core.enums; +package com.youlai.common.enums; import lombok.Getter; import lombok.Setter; diff --git a/youlai-common/common-core/src/main/java/com/youlai/common/core/result/IResultCode.java b/youlai-common/common-core/src/main/java/com/youlai/common/result/IResultCode.java similarity index 76% rename from youlai-common/common-core/src/main/java/com/youlai/common/core/result/IResultCode.java rename to youlai-common/common-core/src/main/java/com/youlai/common/result/IResultCode.java index fdd6e7f7f..b0d2146ec 100644 --- a/youlai-common/common-core/src/main/java/com/youlai/common/core/result/IResultCode.java +++ b/youlai-common/common-core/src/main/java/com/youlai/common/result/IResultCode.java @@ -1,4 +1,4 @@ -package com.youlai.common.core.result; +package com.youlai.common.result; /** * @author haoxr diff --git a/youlai-common/common-core/src/main/java/com/youlai/common/core/result/Result.java b/youlai-common/common-core/src/main/java/com/youlai/common/result/Result.java similarity index 98% rename from youlai-common/common-core/src/main/java/com/youlai/common/core/result/Result.java rename to youlai-common/common-core/src/main/java/com/youlai/common/result/Result.java index 06104e4e3..3b102d9b4 100644 --- a/youlai-common/common-core/src/main/java/com/youlai/common/core/result/Result.java +++ b/youlai-common/common-core/src/main/java/com/youlai/common/result/Result.java @@ -1,4 +1,4 @@ -package com.youlai.common.core.result; +package com.youlai.common.result; import com.fasterxml.jackson.annotation.JsonInclude; import lombok.Data; diff --git a/youlai-common/common-core/src/main/java/com/youlai/common/core/result/ResultCode.java b/youlai-common/common-core/src/main/java/com/youlai/common/result/ResultCode.java similarity index 98% rename from youlai-common/common-core/src/main/java/com/youlai/common/core/result/ResultCode.java rename to youlai-common/common-core/src/main/java/com/youlai/common/result/ResultCode.java index 36a15043e..65ab0cf4d 100644 --- a/youlai-common/common-core/src/main/java/com/youlai/common/core/result/ResultCode.java +++ b/youlai-common/common-core/src/main/java/com/youlai/common/result/ResultCode.java @@ -1,4 +1,4 @@ -package com.youlai.common.core.result; +package com.youlai.common.result; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; diff --git a/youlai-common/common-core/src/main/java/com/youlai/common/core/xss/HTMLFilter.java b/youlai-common/common-core/src/main/java/com/youlai/common/xss/HTMLFilter.java similarity index 99% rename from youlai-common/common-core/src/main/java/com/youlai/common/core/xss/HTMLFilter.java rename to youlai-common/common-core/src/main/java/com/youlai/common/xss/HTMLFilter.java index be0f56577..ce41effbf 100644 --- a/youlai-common/common-core/src/main/java/com/youlai/common/core/xss/HTMLFilter.java +++ b/youlai-common/common-core/src/main/java/com/youlai/common/xss/HTMLFilter.java @@ -1,4 +1,4 @@ -package com.youlai.common.core.xss; +package com.youlai.common.xss; import java.util.*; import java.util.concurrent.ConcurrentHashMap; diff --git a/youlai-common/common-core/src/main/java/com/youlai/common/core/xss/SQLFilter.java b/youlai-common/common-core/src/main/java/com/youlai/common/xss/SQLFilter.java similarity index 96% rename from youlai-common/common-core/src/main/java/com/youlai/common/core/xss/SQLFilter.java rename to youlai-common/common-core/src/main/java/com/youlai/common/xss/SQLFilter.java index 2d134dfa0..9ac0aed64 100644 --- a/youlai-common/common-core/src/main/java/com/youlai/common/core/xss/SQLFilter.java +++ b/youlai-common/common-core/src/main/java/com/youlai/common/xss/SQLFilter.java @@ -6,7 +6,7 @@ * 版权所有,侵权必究! */ -package com.youlai.common.core.xss; +package com.youlai.common.xss; import cn.hutool.core.util.StrUtil; diff --git a/youlai-common/common-web/src/main/java/com/youlai/common/web/exception/BizException.java b/youlai-common/common-web/src/main/java/com/youlai/common/web/exception/BizException.java index c0f6d0ef3..679ee33ff 100644 --- a/youlai-common/common-web/src/main/java/com/youlai/common/web/exception/BizException.java +++ b/youlai-common/common-web/src/main/java/com/youlai/common/web/exception/BizException.java @@ -1,6 +1,6 @@ package com.youlai.common.web.exception; -import com.youlai.common.core.result.IResultCode; +import com.youlai.common.result.IResultCode; import lombok.Getter; @Getter diff --git a/youlai-common/common-web/src/main/java/com/youlai/common/web/exception/GlobalExceptionHandler.java b/youlai-common/common-web/src/main/java/com/youlai/common/web/exception/GlobalExceptionHandler.java index 7ed43e05d..93ad4624f 100644 --- a/youlai-common/common-web/src/main/java/com/youlai/common/web/exception/GlobalExceptionHandler.java +++ b/youlai-common/common-web/src/main/java/com/youlai/common/web/exception/GlobalExceptionHandler.java @@ -1,7 +1,7 @@ package com.youlai.common.web.exception; import com.fasterxml.jackson.core.JsonProcessingException; -import com.youlai.common.core.result.Result; +import com.youlai.common.result.Result; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.RestControllerAdvice; diff --git a/youlai-common/common-web/src/main/java/com/youlai/common/web/service/PermissionService.java b/youlai-common/common-web/src/main/java/com/youlai/common/web/service/PermissionService.java deleted file mode 100644 index 2040d0b1c..000000000 --- a/youlai-common/common-web/src/main/java/com/youlai/common/web/service/PermissionService.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.youlai.common.web.service; - -/** - * @Author haoxr - * @Date 2021-02-05 15:06 - * @Version 1.0.0 - */ -public class PermissionService { - - - - -} diff --git a/youlai-common/common-web/src/main/java/com/youlai/common/web/util/WebUtils.java b/youlai-common/common-web/src/main/java/com/youlai/common/web/util/WebUtils.java index 22d8372cb..45cf34642 100644 --- a/youlai-common/common-web/src/main/java/com/youlai/common/web/util/WebUtils.java +++ b/youlai-common/common-web/src/main/java/com/youlai/common/web/util/WebUtils.java @@ -2,8 +2,8 @@ package com.youlai.common.web.util; import cn.hutool.json.JSONObject; import cn.hutool.json.JSONUtil; -import com.youlai.common.core.constant.AuthConstants; -import com.youlai.common.core.result.ResultCode; +import com.youlai.common.constant.AuthConstants; +import com.youlai.common.result.ResultCode; import lombok.extern.slf4j.Slf4j; import org.springframework.http.server.reactive.ServerHttpResponse; import org.springframework.web.context.request.RequestContextHolder; diff --git a/youlai-gateway/src/main/java/com/youlai/gateway/config/ResourceServerConfig.java b/youlai-gateway/src/main/java/com/youlai/gateway/config/ResourceServerConfig.java index 5783543de..e26d44bdf 100644 --- a/youlai-gateway/src/main/java/com/youlai/gateway/config/ResourceServerConfig.java +++ b/youlai-gateway/src/main/java/com/youlai/gateway/config/ResourceServerConfig.java @@ -1,21 +1,14 @@ package com.youlai.gateway.config; import cn.hutool.core.util.ArrayUtil; -import cn.hutool.json.JSONUtil; -import com.youlai.common.core.constant.AuthConstants; -import com.youlai.common.core.result.Result; -import com.youlai.common.core.result.ResultCode; +import com.youlai.common.constant.AuthConstants; +import com.youlai.common.result.ResultCode; import com.youlai.gateway.security.AuthorizationManager; import com.youlai.gateway.util.WebUtils; import lombok.AllArgsConstructor; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.convert.converter.Converter; -import org.springframework.core.io.buffer.DataBuffer; -import org.springframework.core.io.buffer.DataBufferUtils; -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; import org.springframework.security.authentication.AbstractAuthenticationToken; import org.springframework.security.config.annotation.web.reactive.EnableWebFluxSecurity; import org.springframework.security.config.web.server.ServerHttpSecurity; @@ -28,8 +21,6 @@ import org.springframework.security.web.server.ServerAuthenticationEntryPoint; import org.springframework.security.web.server.authorization.ServerAccessDeniedHandler; import reactor.core.publisher.Mono; -import java.nio.charset.Charset; - /** * 资源服务器配置 */ @@ -85,8 +76,6 @@ public class ResourceServerConfig { }; } - - /** * @return * @link https://blog.csdn.net/qq_24230139/article/details/105091273 diff --git a/youlai-gateway/src/main/java/com/youlai/gateway/filter/AuthGlobalFilter.java b/youlai-gateway/src/main/java/com/youlai/gateway/filter/AuthGlobalFilter.java index 4215237eb..a1dc3a51c 100644 --- a/youlai-gateway/src/main/java/com/youlai/gateway/filter/AuthGlobalFilter.java +++ b/youlai-gateway/src/main/java/com/youlai/gateway/filter/AuthGlobalFilter.java @@ -4,11 +4,9 @@ import cn.hutool.core.util.StrUtil; import cn.hutool.json.JSONObject; import cn.hutool.json.JSONUtil; import com.nimbusds.jose.JWSObject; -import com.youlai.common.core.constant.AuthConstants; -import com.youlai.common.core.result.Result; -import com.youlai.common.core.result.ResultCode; +import com.youlai.common.constant.AuthConstants; +import com.youlai.common.result.ResultCode; import com.youlai.gateway.util.WebUtils; -import lombok.AllArgsConstructor; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; import org.apache.logging.log4j.util.Strings; @@ -17,20 +15,14 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.cloud.gateway.filter.GatewayFilterChain; import org.springframework.cloud.gateway.filter.GlobalFilter; import org.springframework.core.Ordered; -import org.springframework.core.io.buffer.DataBuffer; import org.springframework.data.redis.core.RedisTemplate; -import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; import org.springframework.http.server.reactive.ServerHttpRequest; import org.springframework.http.server.reactive.ServerHttpResponse; import org.springframework.stereotype.Component; import org.springframework.web.server.ServerWebExchange; import reactor.core.publisher.Mono; -import java.nio.charset.Charset; - /** * 全局过滤器 */ diff --git a/youlai-gateway/src/main/java/com/youlai/gateway/security/AuthorizationManager.java b/youlai-gateway/src/main/java/com/youlai/gateway/security/AuthorizationManager.java index 2010be9c9..63d3b6cba 100644 --- a/youlai-gateway/src/main/java/com/youlai/gateway/security/AuthorizationManager.java +++ b/youlai-gateway/src/main/java/com/youlai/gateway/security/AuthorizationManager.java @@ -2,7 +2,7 @@ package com.youlai.gateway.security; import cn.hutool.core.convert.Convert; import cn.hutool.core.util.StrUtil; -import com.youlai.common.core.constant.AuthConstants; +import com.youlai.common.constant.AuthConstants; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.data.redis.core.RedisTemplate; @@ -37,8 +37,9 @@ public class AuthorizationManager implements ReactiveAuthorizationManager check(Mono mono, AuthorizationContext authorizationContext) { ServerHttpRequest request = authorizationContext.getExchange().getRequest(); - String path = request.getURI().getPath(); - PathMatcher pathMatcher = new AntPathMatcher(); + String path = request.getMethodValue() + "_" + request.getURI().getPath(); + AntPathMatcher pathMatcher = new AntPathMatcher(); + pathMatcher.setCaseSensitive(false); // 忽略大小写 // 对应跨域的预检请求直接放行 if (request.getMethod() == HttpMethod.OPTIONS) { @@ -57,7 +58,7 @@ public class AuthorizationManager implements ReactiveAuthorizationManager permissionRoles = redisTemplate.opsForHash().entries(AuthConstants.PERMISSION_RULES_KEY); + Map permissionRoles = redisTemplate.opsForHash().entries(AuthConstants.PERMISSION_ROLES_KEY); Iterator iterator = permissionRoles.keySet().iterator(); // 请求路径匹配到的资源需要的角色权限集合authorities统计 diff --git a/youlai-gateway/src/main/java/com/youlai/gateway/util/WebUtils.java b/youlai-gateway/src/main/java/com/youlai/gateway/util/WebUtils.java index 2d6cbcb02..37ba9bff9 100644 --- a/youlai-gateway/src/main/java/com/youlai/gateway/util/WebUtils.java +++ b/youlai-gateway/src/main/java/com/youlai/gateway/util/WebUtils.java @@ -1,8 +1,8 @@ package com.youlai.gateway.util; import cn.hutool.json.JSONUtil; -import com.youlai.common.core.result.Result; -import com.youlai.common.core.result.ResultCode; +import com.youlai.common.result.Result; +import com.youlai.common.result.ResultCode; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferUtils; import org.springframework.http.HttpHeaders;