diff --git a/mall-pms/pms-boot/pom.xml b/mall-pms/pms-boot/pom.xml
index 427673595..081dfd597 100644
--- a/mall-pms/pms-boot/pom.xml
+++ b/mall-pms/pms-boot/pom.xml
@@ -102,7 +102,7 @@
com.youlai
- common-elasticsearch
+ common-es
diff --git a/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/admin/BrandController.java b/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/admin/BrandController.java
index 5e7a585fd..6c5724675 100644
--- a/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/admin/BrandController.java
+++ b/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/admin/BrandController.java
@@ -47,7 +47,7 @@ public class BrandController {
Page result = iPmsBrandService.page(new Page<>(page, limit), queryWrapper);
return Result.success(result.getRecords(), result.getTotal());
case LIST:
- queryWrapper.eq(PmsBrand::getStatus, GlobalConstants.STATUS_NORMAL_VALUE)
+ queryWrapper.eq(PmsBrand::getStatus, GlobalConstants.STATUS_YES)
.select(PmsBrand::getId, PmsBrand::getName);
List list = iPmsBrandService.list(queryWrapper);
return Result.success(list);
diff --git a/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/app/CategoryController.java b/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/app/CategoryController.java
index 55c226878..68c2bb3f0 100644
--- a/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/app/CategoryController.java
+++ b/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/app/CategoryController.java
@@ -34,7 +34,7 @@ public class CategoryController {
public Result list(Long parentId) {
PmsCategory category = new PmsCategory();
category.setParentId(parentId);
- category.setStatus(GlobalConstants.STATUS_NORMAL_VALUE);
+ category.setStatus(GlobalConstants.STATUS_YES);
List list = iPmsCategoryService.listForTree(category);
return Result.success(list);
}
diff --git a/pom.xml b/pom.xml
index 16bdedc3c..1961cb2ba 100644
--- a/pom.xml
+++ b/pom.xml
@@ -217,7 +217,7 @@
com.youlai
- common-elasticsearch
+ common-es
${youlai.version}
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 78c932ca9..2a6c7e3c3 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
@@ -13,11 +13,14 @@ import java.util.List;
@Data
public class SysRole extends BaseEntity {
- @TableId(type= IdType.AUTO)
+ @TableId(type = IdType.AUTO)
private Long id;
private String name;
+ @ApiModelProperty("角色编码")
+ private String code;
+
private Integer sort;
private Integer status;
diff --git a/youlai-admin/admin-boot/pom.xml b/youlai-admin/admin-boot/pom.xml
index 73bbd2fad..9757ee0b3 100644
--- a/youlai-admin/admin-boot/pom.xml
+++ b/youlai-admin/admin-boot/pom.xml
@@ -94,7 +94,7 @@
com.youlai
- common-elasticsearch
+ common-es
diff --git a/youlai-admin/admin-boot/src/main/java/com/youlai/admin/common/enums/PermTypeEnum.java b/youlai-admin/admin-boot/src/main/java/com/youlai/admin/common/enums/PermTypeEnum.java
index 6491f93f0..0a3f4f91a 100644
--- a/youlai-admin/admin-boot/src/main/java/com/youlai/admin/common/enums/PermTypeEnum.java
+++ b/youlai-admin/admin-boot/src/main/java/com/youlai/admin/common/enums/PermTypeEnum.java
@@ -13,7 +13,7 @@ import lombok.Setter;
public enum PermTypeEnum {
- ROUTE(1, "路由权限"),
+ ROUTE(1, "接口权限"),
BUTTON(2, "按钮权限");
@Getter
@@ -23,4 +23,4 @@ public enum PermTypeEnum {
PermTypeEnum(Integer value, String desc) {
this.value = value;
}
-}
\ No newline at end of file
+}
diff --git a/youlai-admin/admin-boot/src/main/java/com/youlai/admin/controller/RoleController.java b/youlai-admin/admin-boot/src/main/java/com/youlai/admin/controller/RoleController.java
index 4fc10fee4..083cad937 100644
--- a/youlai-admin/admin-boot/src/main/java/com/youlai/admin/controller/RoleController.java
+++ b/youlai-admin/admin-boot/src/main/java/com/youlai/admin/controller/RoleController.java
@@ -67,7 +67,7 @@ public class RoleController {
return Result.success(result.getRecords(), result.getTotal());
case LIST:
List list = iSysRoleService.list(new LambdaQueryWrapper()
- .eq(SysRole::getStatus, GlobalConstants.STATUS_NORMAL_VALUE));
+ .eq(SysRole::getStatus, GlobalConstants.STATUS_YES));
return Result.success(list);
default:
return Result.failed(ResultCode.QUERY_MODE_IS_NULL);
diff --git a/youlai-admin/admin-boot/src/main/java/com/youlai/admin/controller/UserController.java b/youlai-admin/admin-boot/src/main/java/com/youlai/admin/controller/UserController.java
index 703fd4d59..989012b76 100644
--- a/youlai-admin/admin-boot/src/main/java/com/youlai/admin/controller/UserController.java
+++ b/youlai-admin/admin-boot/src/main/java/com/youlai/admin/controller/UserController.java
@@ -13,7 +13,6 @@ import com.youlai.admin.pojo.entity.SysUserRole;
import com.youlai.admin.pojo.dto.UserDTO;
import com.youlai.admin.pojo.vo.UserVO;
import com.youlai.admin.service.*;
-import com.youlai.common.base.BaseController;
import com.youlai.common.result.Result;
import com.youlai.common.result.ResultCode;
import com.youlai.common.web.util.RequestUtils;
@@ -35,7 +34,7 @@ import java.util.stream.Collectors;
@RequestMapping("/api.admin/v1/users")
@Slf4j
@AllArgsConstructor
-public class UserController extends BaseController {
+public class UserController {
private final ISysUserService iSysUserService;
private final ISysUserRoleService iSysUserRoleService;
diff --git a/youlai-admin/admin-boot/src/main/java/com/youlai/admin/service/impl/SysMenuServiceImpl.java b/youlai-admin/admin-boot/src/main/java/com/youlai/admin/service/impl/SysMenuServiceImpl.java
index 4af893ed0..424d41698 100644
--- a/youlai-admin/admin-boot/src/main/java/com/youlai/admin/service/impl/SysMenuServiceImpl.java
+++ b/youlai-admin/admin-boot/src/main/java/com/youlai/admin/service/impl/SysMenuServiceImpl.java
@@ -68,7 +68,7 @@ public class SysMenuServiceImpl extends ServiceImpl impl
menu.getRoles()
));
// 菜单显示隐藏
- routerVO.setHidden(!GlobalConstants.VISIBLE_SHOW_VALUE.equals(menu.getVisible()) ? true : false);
+ routerVO.setHidden(!GlobalConstants.STATUS_YES.equals(menu.getVisible()) );
List children = recursionForRoutes(menu.getId(), menuList);
routerVO.setChildren(children);
if(CollectionUtil.isNotEmpty(children)){
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 58db4a394..bdbc30c43 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
@@ -3,8 +3,8 @@ package com.youlai.auth.config;
import cn.hutool.http.HttpStatus;
import cn.hutool.json.JSONUtil;
import com.youlai.auth.domain.User;
-import com.youlai.auth.service.JdbcClientDetailsServiceImpl;
-import com.youlai.auth.service.UserDetailsServiceImpl;
+import com.youlai.auth.service.impl.JdbcClientDetailsServiceImpl;
+import com.youlai.auth.service.impl.UserDetailsServiceImpl;
import com.youlai.common.constant.AuthConstants;
import com.youlai.common.result.Result;
import com.youlai.common.result.ResultCode;
@@ -135,9 +135,8 @@ public class AuthorizationServerConfig extends AuthorizationServerConfigurerAdap
return (accessToken, authentication) -> {
Map map = new HashMap<>(8);
User user = (User) authentication.getUserAuthentication().getPrincipal();
- map.put(AuthConstants.USER_ID_KEY, user.getId());
- map.put(AuthConstants.CLIENT_ID_KEY, user.getClientId());
- map.put(AuthConstants.USER_NAME_KEY, user.getUsername());
+ map.put("userId", user.getId());
+ map.put("username", user.getUsername());
((DefaultOAuth2AccessToken) accessToken).setAdditionalInformation(map);
return accessToken;
};
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 092945408..88bd5165b 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
@@ -1,27 +1,14 @@
package com.youlai.auth.controller;
-import cn.binarywang.wx.miniapp.api.WxMaService;
-import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult;
-import cn.binarywang.wx.miniapp.bean.WxMaUserInfo;
-import cn.hutool.core.util.StrUtil;
+import com.youlai.auth.service.IAuthService;
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.common.web.util.RequestUtils;
-import com.youlai.mall.ums.api.MemberFeignClient;
-import com.youlai.mall.ums.pojo.domain.UmsMember;
-import com.youlai.mall.ums.pojo.dto.AuthMemberDTO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
-import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
-import org.apache.logging.log4j.util.Strings;
-import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.oauth2.common.OAuth2AccessToken;
import org.springframework.security.oauth2.provider.endpoint.TokenEndpoint;
import org.springframework.web.HttpRequestMethodNotSupportedException;
@@ -42,6 +29,8 @@ import java.util.Map;
public class AuthController {
private TokenEndpoint tokenEndpoint;
+ private IAuthService weAppAuthServiceImpl;
+
@ApiOperation(value = "OAuth2认证", notes = "login")
@ApiImplicitParams({
@@ -51,11 +40,6 @@ public class AuthController {
@ApiImplicitParam(name = "refresh_token", value = "刷新token"),
@ApiImplicitParam(name = "username", defaultValue = "admin", value = "登录用户名"),
@ApiImplicitParam(name = "password", defaultValue = "123456", value = "登录密码"),
-
- // 微信小程序认证参数(无小程序可忽略)
- @ApiImplicitParam(name = "code", value = "小程序授权code"),
- @ApiImplicitParam(name = "encryptedData", value = "包括敏感数据在内的完整用户信息的加密数据"),
- @ApiImplicitParam(name = "iv", value = "加密算法的初始向量"),
})
@PostMapping("/token")
public OAuth2AccessToken postAccessToken(
@@ -74,7 +58,7 @@ public class AuthController {
String clientId = RequestUtils.getAuthClientId();
switch (clientId) {
case AuthConstants.WEAPP_CLIENT_ID: // 微信认证
- oAuth2AccessToken = this.handleForWxAuth(principal, parameters);
+ oAuth2AccessToken = weAppAuthServiceImpl.login(principal, parameters);
break;
default:
oAuth2AccessToken = tokenEndpoint.postAccessToken(principal, parameters).getBody();
@@ -84,57 +68,4 @@ public class AuthController {
}
- private WxMaService wxService;
- private MemberFeignClient memberFeignClient;
- private PasswordEncoder passwordEncoder;
-
- @SneakyThrows
- public OAuth2AccessToken handleForWxAuth(Principal principal, Map parameters) throws HttpRequestMethodNotSupportedException {
-
- String code = parameters.get("code");
-
- if (StrUtil.isBlank(code)) {
- throw new BizException("code不能为空");
- }
-
- WxMaJscode2SessionResult session = null;
- // 根据授权code获取微信用户信息
- session = wxService.getUserService().getSessionInfo(code);
- String openid = session.getOpenid();
- String sessionKey = session.getSessionKey();
-
- Result result = memberFeignClient.getUserByOpenid(openid);
-
- if (ResultCode.USER_NOT_EXIST.getCode().equals(result.getCode())) { // 微信授权登录 会员信息不存在时 注册会员
- String encryptedData = parameters.get("encryptedData");
- String iv = parameters.get("iv");
-
- WxMaUserInfo userInfo = wxService.getUserService().getUserInfo(sessionKey, encryptedData, iv);
- if (userInfo == null) {
- throw new BizException("获取用户信息失败");
- }
- UmsMember user = new UmsMember()
- .setNickname(userInfo.getNickName())
- .setAvatar(userInfo.getAvatarUrl())
- .setGender(Integer.valueOf(userInfo.getGender()))
- .setOpenid(openid)
- .setUsername(openid)
- .setPassword(passwordEncoder.encode(openid).replace(AuthConstants.BCRYPT, Strings.EMPTY)) // 加密密码移除前缀加密方式 {bcrypt}
- .setStatus(GlobalConstants.STATUS_NORMAL_VALUE);
-
- Result res = memberFeignClient.add(user);
- if (!ResultCode.SUCCESS.getCode().equals(res.getCode())) {
- throw new BizException("注册会员失败");
- }
- }
-
- // oauth2认证参数对应授权登录时注册会员的username、password信息,模拟通过oauth2的密码模式认证生成JWT
- parameters.put("username", openid);
- parameters.put("password", openid);
-
- OAuth2AccessToken oAuth2AccessToken = tokenEndpoint.postAccessToken(principal, parameters).getBody();
- return oAuth2AccessToken;
- }
-
-
}
diff --git a/youlai-auth/src/main/java/com/youlai/auth/service/IAuthService.java b/youlai-auth/src/main/java/com/youlai/auth/service/IAuthService.java
new file mode 100644
index 000000000..61daed8cd
--- /dev/null
+++ b/youlai-auth/src/main/java/com/youlai/auth/service/IAuthService.java
@@ -0,0 +1,17 @@
+package com.youlai.auth.service;
+
+import me.chanjar.weixin.common.error.WxErrorException;
+import org.springframework.security.oauth2.common.OAuth2AccessToken;
+
+import java.security.Principal;
+import java.util.Map;
+
+/**
+ * @author haoxr
+ * @description TODO
+ * @createTime 2021/5/20 23:35
+ */
+public interface IAuthService {
+
+ OAuth2AccessToken login(Principal principal, Map parameters) ;
+}
diff --git a/youlai-auth/src/main/java/com/youlai/auth/service/JdbcClientDetailsServiceImpl.java b/youlai-auth/src/main/java/com/youlai/auth/service/impl/JdbcClientDetailsServiceImpl.java
similarity index 93%
rename from youlai-auth/src/main/java/com/youlai/auth/service/JdbcClientDetailsServiceImpl.java
rename to youlai-auth/src/main/java/com/youlai/auth/service/impl/JdbcClientDetailsServiceImpl.java
index 6d9af1faf..9fa4e7a0c 100644
--- a/youlai-auth/src/main/java/com/youlai/auth/service/JdbcClientDetailsServiceImpl.java
+++ b/youlai-auth/src/main/java/com/youlai/auth/service/impl/JdbcClientDetailsServiceImpl.java
@@ -1,4 +1,4 @@
-package com.youlai.auth.service;
+package com.youlai.auth.service.impl;
import lombok.SneakyThrows;
import org.springframework.security.oauth2.provider.ClientDetails;
diff --git a/youlai-auth/src/main/java/com/youlai/auth/service/UserDetailsServiceImpl.java b/youlai-auth/src/main/java/com/youlai/auth/service/impl/UserDetailsServiceImpl.java
similarity index 98%
rename from youlai-auth/src/main/java/com/youlai/auth/service/UserDetailsServiceImpl.java
rename to youlai-auth/src/main/java/com/youlai/auth/service/impl/UserDetailsServiceImpl.java
index 9300f5edf..069d69994 100644
--- a/youlai-auth/src/main/java/com/youlai/auth/service/UserDetailsServiceImpl.java
+++ b/youlai-auth/src/main/java/com/youlai/auth/service/impl/UserDetailsServiceImpl.java
@@ -1,4 +1,4 @@
-package com.youlai.auth.service;
+package com.youlai.auth.service.impl;
import com.youlai.admin.api.UserFeignClient;
import com.youlai.admin.pojo.dto.UserDTO;
diff --git a/youlai-auth/src/main/java/com/youlai/auth/service/impl/WeAppAuthServiceImpl.java b/youlai-auth/src/main/java/com/youlai/auth/service/impl/WeAppAuthServiceImpl.java
new file mode 100644
index 000000000..301948fba
--- /dev/null
+++ b/youlai-auth/src/main/java/com/youlai/auth/service/impl/WeAppAuthServiceImpl.java
@@ -0,0 +1,97 @@
+package com.youlai.auth.service.impl;
+
+import cn.binarywang.wx.miniapp.api.WxMaService;
+import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult;
+import cn.binarywang.wx.miniapp.bean.WxMaUserInfo;
+import cn.hutool.core.util.StrUtil;
+import com.youlai.auth.service.IAuthService;
+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.MemberFeignClient;
+import com.youlai.mall.ums.pojo.domain.UmsMember;
+import com.youlai.mall.ums.pojo.dto.AuthMemberDTO;
+import lombok.AllArgsConstructor;
+import lombok.SneakyThrows;
+import me.chanjar.weixin.common.error.WxErrorException;
+import org.apache.logging.log4j.util.Strings;
+import org.springframework.security.crypto.password.PasswordEncoder;
+import org.springframework.security.oauth2.common.OAuth2AccessToken;
+import org.springframework.security.oauth2.provider.endpoint.TokenEndpoint;
+import org.springframework.stereotype.Service;
+
+import java.security.Principal;
+import java.util.Map;
+
+/**
+ * @author haoxr
+ * @description 微信小程序认证接口
+ * @createTime 2021/5/20 23:37
+ */
+@Service
+@AllArgsConstructor
+public class WeAppAuthServiceImpl implements IAuthService {
+ private WxMaService wxService;
+ private MemberFeignClient memberFeignClient;
+ private PasswordEncoder passwordEncoder;
+ private TokenEndpoint tokenEndpoint;
+
+
+ /**
+ * @param principal
+ * @param parameters code=小程序授权code
+ * encryptedData=包括敏感数据在内的完整用户信息的加密数据
+ * iv=加密算法的初始向量
+ * @return
+ */
+ @Override
+ @SneakyThrows
+ public OAuth2AccessToken login(Principal principal, Map parameters) {
+
+ String code = parameters.get("code");
+
+ if (StrUtil.isBlank(code)) {
+ throw new BizException("code不能为空");
+ }
+
+ WxMaJscode2SessionResult session = null;
+ // 根据授权code获取微信用户信息
+ session = wxService.getUserService().getSessionInfo(code);
+ String openid = session.getOpenid();
+ String sessionKey = session.getSessionKey();
+
+ Result result = memberFeignClient.getUserByOpenid(openid);
+
+ if (ResultCode.USER_NOT_EXIST.getCode().equals(result.getCode())) { // 微信授权登录 会员信息不存在时 注册会员
+ String encryptedData = parameters.get("encryptedData");
+ String iv = parameters.get("iv");
+
+ WxMaUserInfo userInfo = wxService.getUserService().getUserInfo(sessionKey, encryptedData, iv);
+ if (userInfo == null) {
+ throw new BizException("获取用户信息失败");
+ }
+ UmsMember user = new UmsMember()
+ .setNickname(userInfo.getNickName())
+ .setAvatar(userInfo.getAvatarUrl())
+ .setGender(Integer.valueOf(userInfo.getGender()))
+ .setOpenid(openid)
+ .setUsername(openid)
+ .setPassword(passwordEncoder.encode(openid).replace(AuthConstants.BCRYPT, Strings.EMPTY)) // 加密密码移除前缀加密方式 {bcrypt}
+ .setStatus(GlobalConstants.STATUS_YES);
+
+ Result res = memberFeignClient.add(user);
+ if (!ResultCode.SUCCESS.getCode().equals(res.getCode())) {
+ throw new BizException("注册会员失败");
+ }
+ }
+
+ // oauth2认证参数对应授权登录时注册会员的username、password信息,模拟通过oauth2的密码模式认证生成JWT
+ parameters.put("username", openid);
+ parameters.put("password", openid);
+
+ OAuth2AccessToken oAuth2AccessToken = tokenEndpoint.postAccessToken(principal, parameters).getBody();
+ return oAuth2AccessToken;
+ }
+}
diff --git a/youlai-common/common-core/src/main/java/com/youlai/common/base/BaseController.java b/youlai-common/common-core/src/main/java/com/youlai/common/base/BaseController.java
deleted file mode 100644
index 5724b1a5e..000000000
--- a/youlai-common/common-core/src/main/java/com/youlai/common/base/BaseController.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package com.youlai.common.base;
-
-public class BaseController {
-
-
-
-}
diff --git a/youlai-common/common-core/src/main/java/com/youlai/common/constant/GlobalConstants.java b/youlai-common/common-core/src/main/java/com/youlai/common/constant/GlobalConstants.java
index e760715e1..3776efaf5 100644
--- a/youlai-common/common-core/src/main/java/com/youlai/common/constant/GlobalConstants.java
+++ b/youlai-common/common-core/src/main/java/com/youlai/common/constant/GlobalConstants.java
@@ -2,9 +2,8 @@ package com.youlai.common.constant;
public interface GlobalConstants {
- Integer STATUS_NORMAL_VALUE = 1;
-
- Integer VISIBLE_SHOW_VALUE = 1;
+ Integer STATUS_YES = 1;
+ Integer STATUS_NO= 0;
String DEFAULT_USER_PASSWORD = "123456";
diff --git a/youlai-common/common-elasticsearch/README.md b/youlai-common/common-es/README.md
similarity index 100%
rename from youlai-common/common-elasticsearch/README.md
rename to youlai-common/common-es/README.md
diff --git a/youlai-common/common-elasticsearch/pom.xml b/youlai-common/common-es/pom.xml
similarity index 97%
rename from youlai-common/common-elasticsearch/pom.xml
rename to youlai-common/common-es/pom.xml
index 3f2023e1e..8e6bd7d15 100644
--- a/youlai-common/common-elasticsearch/pom.xml
+++ b/youlai-common/common-es/pom.xml
@@ -9,7 +9,7 @@
4.0.0
- common-elasticsearch
+ common-es
diff --git a/youlai-common/common-elasticsearch/src/main/java/com/youlai/common/elasticsearch/config/RestHighLevelClientConfig.java b/youlai-common/common-es/src/main/java/com/youlai/common/elasticsearch/config/RestHighLevelClientConfig.java
similarity index 100%
rename from youlai-common/common-elasticsearch/src/main/java/com/youlai/common/elasticsearch/config/RestHighLevelClientConfig.java
rename to youlai-common/common-es/src/main/java/com/youlai/common/elasticsearch/config/RestHighLevelClientConfig.java
diff --git a/youlai-common/common-elasticsearch/src/main/java/com/youlai/common/elasticsearch/constant/ESConstants.java b/youlai-common/common-es/src/main/java/com/youlai/common/elasticsearch/constant/ESConstants.java
similarity index 100%
rename from youlai-common/common-elasticsearch/src/main/java/com/youlai/common/elasticsearch/constant/ESConstants.java
rename to youlai-common/common-es/src/main/java/com/youlai/common/elasticsearch/constant/ESConstants.java
diff --git a/youlai-common/common-elasticsearch/src/main/java/com/youlai/common/elasticsearch/service/ElasticSearchService.java b/youlai-common/common-es/src/main/java/com/youlai/common/elasticsearch/service/ElasticSearchService.java
similarity index 100%
rename from youlai-common/common-elasticsearch/src/main/java/com/youlai/common/elasticsearch/service/ElasticSearchService.java
rename to youlai-common/common-es/src/main/java/com/youlai/common/elasticsearch/service/ElasticSearchService.java
diff --git a/youlai-common/common-elasticsearch/src/main/resources/META-INF/spring.factories b/youlai-common/common-es/src/main/resources/META-INF/spring.factories
similarity index 100%
rename from youlai-common/common-elasticsearch/src/main/resources/META-INF/spring.factories
rename to youlai-common/common-es/src/main/resources/META-INF/spring.factories
diff --git a/youlai-common/common-web/src/main/resources/logback-spring.xml b/youlai-common/common-web/src/main/resources/logback-spring.xml
index df1e36730..9f9a2dd04 100644
--- a/youlai-common/common-web/src/main/resources/logback-spring.xml
+++ b/youlai-common/common-web/src/main/resources/logback-spring.xml
@@ -20,45 +20,6 @@
-
-
-
- g.youlai.tech:5044
-
-
-
- Asia/Shanghai
-
-
-
-
- {
- "project": "${APP_NAME}",
- "date": "%X{date}",
- "action":"login",
- "pid": "${PID:-}",
- "thread": "%thread",
- "message": "%message",
- "elapsedTime": "%X{elapsedTime}",
- "username":"%X{username}",
- "clientIP": "%X{clientIP}",
- "region":"%X{region}",
- "token":"%X{token}",
- "loginTime": "%date{\"yyyy-MM-dd HH:mm:ss\"}",
- "description":"%X{description}"
- }
-
-
-
-
- 5 minutes
-
-
-
-
-
-
-
diff --git a/youlai-common/pom.xml b/youlai-common/pom.xml
index cb0684334..42b2b6f20 100644
--- a/youlai-common/pom.xml
+++ b/youlai-common/pom.xml
@@ -19,6 +19,6 @@
common-web
common-mybatis
common-rabbitmq
- common-elasticsearch
+ common-es