浏览代码

用户管理提交CRUD及上传头像;用户标签及用户角色

609324174@qq.com 4 年之前
父节点
当前提交
465f3c1c8a
共有 26 个文件被更改,包括 2030 次插入6 次删除
  1. 5 2
      user_center/pom.xml
  2. 162 0
      user_center/src/main/java/com/huaxu/common/FileUploadUtil.java
  3. 63 0
      user_center/src/main/java/com/huaxu/common/InvalidExtensionException.java
  4. 45 0
      user_center/src/main/java/com/huaxu/common/Md5Util.java
  5. 42 0
      user_center/src/main/java/com/huaxu/common/MimeType.java
  6. 95 0
      user_center/src/main/java/com/huaxu/common/ResourceUtil.java
  7. 48 0
      user_center/src/main/java/com/huaxu/common/RxcException.java
  8. 353 0
      user_center/src/main/java/com/huaxu/common/ToolUtil.java
  9. 1 1
      user_center/src/main/java/com/huaxu/config/ResourceServerConfig.java
  10. 132 0
      user_center/src/main/java/com/huaxu/controller/UserController.java
  11. 33 0
      user_center/src/main/java/com/huaxu/dao/UserMapper.java
  12. 33 0
      user_center/src/main/java/com/huaxu/dao/UserRoleMapper.java
  13. 34 0
      user_center/src/main/java/com/huaxu/dao/UserTagMapper.java
  14. 114 0
      user_center/src/main/java/com/huaxu/entity/UserEntity.java
  15. 55 0
      user_center/src/main/java/com/huaxu/entity/UserRoleEntity.java
  16. 60 0
      user_center/src/main/java/com/huaxu/entity/UserTagEntity.java
  17. 76 0
      user_center/src/main/java/com/huaxu/service/UserRoleService.java
  18. 198 0
      user_center/src/main/java/com/huaxu/service/UserService.java
  19. 76 0
      user_center/src/main/java/com/huaxu/service/UserTagService.java
  20. 2 1
      user_center/src/main/resources/application-dev.properties
  21. 1 1
      user_center/src/main/resources/application-sit.properties
  22. 1 1
      user_center/src/main/resources/application-uat.properties
  23. 94 0
      user_center/src/main/resources/mapper/UserMapper.xml
  24. 72 0
      user_center/src/main/resources/mapper/UserRoleMapper.xml
  25. 60 0
      user_center/src/main/resources/mapper/UserTagMapper.xml
  26. 175 0
      user_center/user_center.iml

+ 5 - 2
user_center/pom.xml

@@ -11,8 +11,11 @@
 
     <artifactId>user_center</artifactId>
    <dependencies>
-
-
+       <dependency>
+           <groupId>cn.hutool</groupId>
+           <artifactId>hutool-all</artifactId>
+           <version>5.4.5</version>
+       </dependency>
    </dependencies>
 
 </project>

+ 162 - 0
user_center/src/main/java/com/huaxu/common/FileUploadUtil.java

@@ -0,0 +1,162 @@
+package com.huaxu.common;
+
+import org.apache.commons.io.FilenameUtils;
+import org.apache.commons.lang.time.DateFormatUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Date;
+
+/**
+ * @author wyy
+ * @date 2020-10-23 09:54
+ */
+public class FileUploadUtil {
+
+    /**
+     * 默认大小 50M
+     */
+    public static final long DEFAULT_MAX_SIZE = 50 * 1024 * 1024;
+    /**
+     * 默认的文件名最大长度 100
+     */
+    public static final int DEFAULT_FILE_NAME_LENGTH = 100;
+    /**
+     * 默认上传的地址
+     */
+    private static String defaultBaseDir = "/";
+    private static int counter = 0;
+
+    /**
+     * 根据文件路径上传
+     *
+     * @param baseDir 相对应用的基目录
+     * @param file    上传的文件
+     * @return 文件名称
+     * @throws IOException
+     */
+    public static final String uploadWeb(String baseDir, MultipartFile file) throws IOException {
+        try {
+            return upload(baseDir, file, MimeType.DEFAULT_ALLOWED_EXTENSION);
+        } catch (Exception e) {
+            throw new IOException(e.getMessage(), e);
+        }
+    }
+
+    /**
+     * 获取文件名的后缀
+     *
+     * @param file 表单文件
+     * @return 后缀名
+     */
+    public static final String getExtension(MultipartFile file) {
+        String extension = FilenameUtils.getExtension(file.getOriginalFilename());
+        if (ToolUtil.isEmpty(extension)) {
+            extension = MimeType.getExtension(file.getContentType());
+        }
+        return extension;
+    }
+
+    /**
+     * 判断MIME类型是否是允许的MIME类型
+     *
+     * @param extension
+     * @param allowedExtension
+     * @return
+     */
+    public static final boolean isAllowedExtension(String extension, String[] allowedExtension) {
+        for (String str : allowedExtension) {
+            if (str.equalsIgnoreCase(extension)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * 文件大小校验
+     *
+     * @param file 上传的文件
+     * @return
+     * @throws InvalidExtensionException
+     */
+    public static final void assertAllowed(MultipartFile file, String[] allowedExtension)
+            throws InvalidExtensionException {
+        long size = file.getSize();
+        if (DEFAULT_MAX_SIZE != -1 && size > DEFAULT_MAX_SIZE) {
+            throw new RxcException("10004", "文件太大");
+        }
+
+        String fileName = file.getOriginalFilename();
+        String extension = getExtension(file);
+        if (allowedExtension != null && !isAllowedExtension(extension, allowedExtension)) {
+            if (allowedExtension == MimeType.IMAGE_EXTENSION) {
+                throw new InvalidExtensionException.InvalidImageExtensionException(allowedExtension, extension,
+                        fileName);
+            } else if (allowedExtension == MimeType.FLASH_EXTENSION) {
+                throw new InvalidExtensionException.InvalidFlashExtensionException(allowedExtension, extension,
+                        fileName);
+            } else if (allowedExtension == MimeType.MEDIA_EXTENSION) {
+                throw new InvalidExtensionException.InvalidMediaExtensionException(allowedExtension, extension,
+                        fileName);
+            } else {
+                throw new InvalidExtensionException(allowedExtension, extension, fileName);
+            }
+        }
+    }
+
+    /**
+     * 编码文件名
+     */
+    public static final String extractFilename(MultipartFile file) {
+        String fileName = file.getOriginalFilename();
+        String extension = getExtension(file);
+        fileName = DateFormatUtils.format(new Date(), "yyyy/MM/dd") + File.separator + ToolUtil.encodingFilename(fileName) + "." + extension;
+        return fileName;
+    }
+
+    private static final File getAbsoluteFile(String uploadDir, String fileName) throws IOException {
+        File desc = new File(uploadDir + File.separator + fileName);
+
+        if (!desc.getParentFile().exists()) {
+            desc.getParentFile().mkdirs();
+        }
+        if (!desc.exists()) {
+            desc.createNewFile();
+        }
+        return desc;
+    }
+
+    private static final String getPathFileName(String uploadDir, String fileName) throws IOException {
+       // int dirLastIndex = uploadDir.lastIndexOf("/") + 1;
+        //String currentDir = StringUtils.substring(uploadDir, dirLastIndex);
+        String pathFileName = uploadDir  + "/" + fileName;
+        return ToolUtil.path(pathFileName);
+    }
+
+    /**
+     * 文件上传
+     *
+     * @param baseDir 相对应用的基目录
+     * @param file    上传的文件
+     * @return 返回上传成功的文件名
+     * @throws IOException 比如读写文件出错时
+     */
+    public static final String upload(String baseDir, MultipartFile file, String[] allowedExtension) throws RxcException, IOException, InvalidExtensionException {
+        int fileNamelength = file.getOriginalFilename().length();
+        if (fileNamelength > FileUploadUtil.DEFAULT_FILE_NAME_LENGTH) {
+            throw new RxcException("10004", "文件太大");
+        }
+
+        assertAllowed(file, allowedExtension);
+
+        String fileName = extractFilename(file);
+
+        File desc = getAbsoluteFile(baseDir, fileName);
+        file.transferTo(desc);
+        String pathFileName = getPathFileName(baseDir, fileName);
+        return pathFileName;
+    }
+}

+ 63 - 0
user_center/src/main/java/com/huaxu/common/InvalidExtensionException.java

@@ -0,0 +1,63 @@
+package com.huaxu.common;
+
+
+
+import org.apache.tomcat.util.http.fileupload.FileUploadException;
+
+import java.util.Arrays;
+
+/**
+ * 文件上传 误异常类
+ * 
+ * @author WYY
+ */
+public class InvalidExtensionException extends FileUploadException {
+    private static final long serialVersionUID = 1L;
+
+    private String[] allowedExtension;
+    private String extension;
+    private String filename;
+
+    public InvalidExtensionException(String[] allowedExtension, String extension, String filename) {
+        super("filename : [" + filename + "], extension : [" + extension + "], allowed extension : [" + Arrays.toString(allowedExtension) + "]");
+        this.allowedExtension = allowedExtension;
+        this.extension = extension;
+        this.filename = filename;
+    }
+
+    public String[] getAllowedExtension() {
+        return allowedExtension;
+    }
+
+    public String getExtension() {
+        return extension;
+    }
+
+    public String getFilename() {
+        return filename;
+    }
+
+    public static class InvalidImageExtensionException extends InvalidExtensionException {
+        private static final long serialVersionUID = 1L;
+
+        public InvalidImageExtensionException(String[] allowedExtension, String extension, String filename) {
+            super(allowedExtension, extension, filename);
+        }
+    }
+
+    public static class InvalidFlashExtensionException extends InvalidExtensionException {
+        private static final long serialVersionUID = 1L;
+
+        public InvalidFlashExtensionException(String[] allowedExtension, String extension, String filename) {
+            super(allowedExtension, extension, filename);
+        }
+    }
+
+    public static class InvalidMediaExtensionException extends InvalidExtensionException {
+        private static final long serialVersionUID = 1L;
+
+        public InvalidMediaExtensionException(String[] allowedExtension, String extension, String filename) {
+            super(allowedExtension, extension, filename);
+        }
+    }
+}

+ 45 - 0
user_center/src/main/java/com/huaxu/common/Md5Util.java

@@ -0,0 +1,45 @@
+package com.huaxu.common;
+
+import java.security.MessageDigest;
+
+
+public class Md5Util {
+    private static byte[] md5(String s){
+        MessageDigest algorithm;
+        try{
+            algorithm = MessageDigest.getInstance("MD5");
+            algorithm.reset();
+            algorithm.update(s.getBytes("UTF-8"));
+            byte[] messageDigest = algorithm.digest();
+            return messageDigest;
+        }
+        catch (Exception e){
+        }
+        return null;
+    }
+
+    private static final String toHex(byte hash[]){
+        if (hash == null){
+            return null;
+        }
+        StringBuffer buf = new StringBuffer(hash.length * 2);
+        int i;
+
+        for (i = 0; i < hash.length; i++){
+            if ((hash[i] & 0xff) < 0x10){
+                buf.append("0");
+            }
+            buf.append(Long.toString(hash[i] & 0xff, 16));
+        }
+        return buf.toString();
+    }
+
+    public static String hash(String s){
+        try{
+            return new String(toHex(md5(s)).getBytes("UTF-8"), "UTF-8");
+        }
+        catch (Exception e){
+            return s;
+        }
+    }
+}

+ 42 - 0
user_center/src/main/java/com/huaxu/common/MimeType.java

@@ -0,0 +1,42 @@
+package com.huaxu.common;
+
+public class MimeType {
+    public static final String IMAGE_PNG = "image/png";
+    public static final String IMAGE_JPG = "image/jpg";
+    public static final String IMAGE_JPEG = "image/jpeg";
+    public static final String IMAGE_BMP = "image/bmp";
+    public static final String IMAGE_GIF = "image/gif";
+    public static final String[] IMAGE_EXTENSION = {"bmp", "gif", "jpg", "jpeg", "png"};
+    public static final String[] FLASH_EXTENSION = {"swf", "flv"};
+    public static final String[] MEDIA_EXTENSION = {"swf", "flv", "mp3", "wav", "wma", "wmv",
+            "mid", "avi", "mpg", "asf", "rm", "rmvb"};
+
+    public static final String[] DEFAULT_ALLOWED_EXTENSION = {
+            // 图片
+            "bmp", "gif", "jpg", "jpeg", "png",
+            // word excel powerpoint
+            "doc", "docx", "xls", "xlsx", "ppt", "pptx", "html", "htm", "txt",
+            // 压缩文件
+            "rar", "zip", "gz", "bz2",
+            //许可证书
+            "lic",
+            // pdf
+            "pdf"};
+
+    public static String getExtension(String urlPrefix) {
+        switch (urlPrefix) {
+            case IMAGE_PNG:
+                return "png";
+            case IMAGE_JPG:
+                return "jpg";
+            case IMAGE_JPEG:
+                return "jpeg";
+            case IMAGE_BMP:
+                return "bmp";
+            case IMAGE_GIF:
+                return "gif";
+            default:
+                return "";
+        }
+    }
+}

+ 95 - 0
user_center/src/main/java/com/huaxu/common/ResourceUtil.java

@@ -0,0 +1,95 @@
+package com.huaxu.common;
+
+import org.apache.commons.io.IOUtils;
+import org.springframework.core.io.DefaultResourceLoader;
+import org.springframework.core.io.Resource;
+import org.springframework.core.io.ResourceLoader;
+import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
+import org.springframework.core.io.support.ResourcePatternResolver;
+import org.springframework.util.ResourceUtils;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * <p>资源供给</p>
+ *
+ * @author: WYY
+ * @date: 2019-03-26 17:57
+ * @version: 1.0.1
+ */
+public class ResourceUtil extends ResourceUtils {
+
+    private static ResourceLoader resourceLoader;
+    private static ResourcePatternResolver resourceResolver;
+
+    static {
+        resourceLoader = new DefaultResourceLoader();
+        resourceResolver = new PathMatchingResourcePatternResolver(resourceLoader);
+    }
+
+    /**
+     * 获取资源加载器(可读取jar内的文件)
+     *
+     * @author ThinkGem
+     */
+    public static ResourceLoader getResourceLoader() {
+        return resourceLoader;
+    }
+
+    /**
+     * 获取ClassLoader
+     */
+    public static ClassLoader getClassLoader() {
+        return resourceLoader.getClassLoader();
+    }
+
+    /**
+     * 获取资源加载器(可读取jar内的文件)
+     */
+    public static Resource getResource(String location) {
+        return resourceLoader.getResource(location);
+    }
+
+    /**
+     * 获取资源文件流(用后记得关闭)
+     *
+     * @param location
+     * @throws IOException
+     * @author ThinkGem
+     */
+    public static InputStream getResourceFileStream(String location) throws IOException {
+        Resource resource = resourceLoader.getResource(location);
+        return resource.getInputStream();
+    }
+
+    /**
+     * 获取资源文件内容
+     *
+     * @param location
+     * @author ThinkGem
+     */
+    public static String getResourceFileContent(String location) {
+        try (InputStream is = getResourceFileStream(location)) {
+            return IOUtils.toString(is, "UTF-8");
+        } catch (IOException e) {
+            return "";
+        }
+    }
+
+    /**
+     * Spring 搜索资源文件
+     *
+     * @param locationPattern
+     * @author ThinkGem
+     */
+    public static Resource[] getResources(String locationPattern) {
+        try {
+            Resource[] resources = resourceResolver.getResources(locationPattern);
+            return resources;
+        } catch (IOException e) {
+            return null;
+        }
+    }
+
+}

+ 48 - 0
user_center/src/main/java/com/huaxu/common/RxcException.java

@@ -0,0 +1,48 @@
+package com.huaxu.common;
+
+import lombok.Data;
+
+/**
+ * 自定义异常处理
+ * @author wyy
+ * @date 2020-03-12 15:42
+ */
+@Data
+public class RxcException extends RuntimeException {
+
+	private static final long serialVersionUID = 1L;
+	private String msg;
+	private String code = "50000";
+	private String subCode;
+	private String subMsg;
+
+	public RxcException(String msg) {
+		super(msg);
+		this.msg = msg;
+	}
+
+	public RxcException(String code, String msg, String subCode, String subMsg) {
+		super(msg);
+		this.msg = msg;
+		this.code = code;
+		this.subCode = subCode;
+		this.subMsg = subMsg;
+	}
+
+	public RxcException(String msg, Throwable e) {
+		super(msg, e);
+		this.msg = msg;
+	}
+
+	public RxcException(String msg, String code) {
+		super(msg);
+		this.msg = msg;
+		this.code = code;
+	}
+
+	public RxcException(String msg, String code, Throwable e) {
+		super(msg, e);
+		this.msg = msg;
+		this.code = code;
+	}
+}

+ 353 - 0
user_center/src/main/java/com/huaxu/common/ToolUtil.java

@@ -0,0 +1,353 @@
+package com.huaxu.common;
+
+import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.io.FileUtil;
+import cn.hutool.core.util.NumberUtil;
+import cn.hutool.core.util.StrUtil;
+import cn.hutool.extra.spring.SpringUtil;
+import cn.hutool.system.SystemUtil;
+import cn.hutool.system.oshi.OshiUtil;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.context.MessageSource;
+import org.springframework.context.i18n.LocaleContextHolder;
+
+import java.io.*;
+import java.util.*;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * 高频使用工具类
+ * @author wyy
+ * @date 2020-03-11 15:02
+ */
+public class ToolUtil {
+
+	private static int 							counter 							= 0;
+
+	
+	/**
+     * 获取随机字符,自定义长度
+     *
+     * @author wyy
+     * 2020-03-11 15:07
+     */
+    public static String getRandomString(int length) {
+        String base = "abcdefghijklmnopqrstuvwxyz0123456789";
+        Random random = new Random();
+        StringBuffer sb = new StringBuffer();
+        for (int i = 0; i < length; i++) {
+            int number = random.nextInt(base.length());
+            sb.append(base.charAt(number));
+        }
+        return sb.toString();
+    }
+	
+	/**
+	 * 判断对象是否为空  true 不为空
+	 * @author wyy
+	 * @date 2020-03-11 15:07
+	 */
+    public static boolean isNotEmpty(Object o) {
+        return !isEmpty(o);
+    }
+
+    /**
+     * 
+     * 对象是否为空 true 为空
+     * @author wyy
+     * @date 2020-03-11 15:09
+     */
+    public static boolean isEmpty(Object o) {
+        if (o == null) {
+            return true;
+        }
+        if (o instanceof String) {
+            if ("".equals(o.toString().trim())) {
+                return true;
+            }
+        } else if (o instanceof List) {
+            if (((List<?>) o).size() == 0) {
+                return true;
+            }
+        } else if (o instanceof Map) {
+            if (((Map<?, ?>) o).size() == 0) {
+                return true;
+            }
+        } else if (o instanceof Set) {
+            if (((Set<?>) o).size() == 0) {
+                return true;
+            }
+        } else if (o instanceof Object[]) {
+            if (((Object[]) o).length == 0) {
+                return true;
+            }
+        } else if (o instanceof int[]) {
+            if (((int[]) o).length == 0) {
+                return true;
+            }
+        } else if (o instanceof long[]) {
+            if (((long[]) o).length == 0) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * 对象组中是否存在空对象
+     *
+     * @author wyy
+     * @Date 2020-03-11 15:09
+     */
+    public static boolean isOneEmpty(Object... os) {
+        for (Object o : os) {
+            if (isEmpty(o)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * 对象组中是否全是空对象
+     *
+     * @author wyy
+     * @date 2020-03-11 15:09
+     */
+    public static boolean isAllEmpty(Object... os) {
+        for (Object o : os) {
+            if (!isEmpty(o)) {
+                return false;
+            }
+        }
+        return true;
+    }
+    
+    /**
+     * 根据消息键和参数 获取消息 委托给Spring messageSource
+     * 
+     * @param code 消息键
+     * @param args 参数
+     * @return 获取国际化翻译值
+     */
+    public static String message(String code, Object... args){
+        MessageSource messageSource = SpringUtil.getBean(MessageSource.class);
+        try{
+			return messageSource.getMessage(code, args, LocaleContextHolder.getLocale());
+		}catch (Exception e){
+        	return code;
+		}
+    }
+    
+    /**
+	 * 
+	 * 字节计算转换
+	 * 
+	 * <pre>
+	 * StrUtil.convertFileSize(1024)   			= 1kB
+	 * </pre>
+	 * @author wyy
+	 * @time 2019-04-03 12:29
+	 * @param size 字节大小
+	 * @return 转换后大小字符串
+	 *
+	 */
+	public static String convertFileSize(long size) {
+		long kb = 1024;
+        long mb = kb * 1024;
+        long gb = mb * 1024;
+        if (size >= gb)
+        {
+            return StrUtil.format("{} GB", NumberUtil.round((float) size / gb,2));
+        }
+        else if (size >= mb)
+        {
+            float f = NumberUtil.round((float) size / mb,2).floatValue();
+            return StrUtil.format(f > 100 ? "{} MB" : "{} MB", f);
+        }
+        else if (size >= kb)
+        {
+            float f = NumberUtil.round((float) size / kb,2).floatValue();
+            return StrUtil.format(f > 100 ? "{}  KB" : "{}  KB", f);
+        }
+        else
+        {
+            return StrUtil.format("{} B", size);
+        }
+	}
+	
+	public static String getMessage(Exception e){
+		StringWriter sw = null;
+		PrintWriter pw = null;
+		try {
+			sw = new StringWriter();
+			pw = new PrintWriter(sw);
+			e.printStackTrace(pw);
+			pw.flush();
+			sw.flush();
+		} finally {
+			if (sw != null) {
+				try {
+					sw.close();
+				} catch (IOException e1) {
+					e1.printStackTrace();
+				}
+			}
+			if (pw != null) {
+				pw.close();
+			}
+		}
+		return sw.toString();
+	}
+
+	public static boolean isBoolIp(String ipAddress) {
+		String ip = "([1-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])(\\.(\\d|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])){3}";
+		Pattern pattern = Pattern.compile(ip);
+		Matcher matcher = pattern.matcher(ipAddress);
+		return matcher.matches();
+	}
+
+
+	public static String createFolder(String folder){
+		folder += File.separator + DateUtil.format(new Date(),"yyyy") + File.separator + DateUtil.format(new Date(),"MM") +
+				File.separator + DateUtil.format(new Date(),"dd")+ File.separator;
+		FileUtil.mkdir(folder);
+		return folder;
+	}
+
+
+	/**
+	 * 编码文件名
+	 */
+	public static String encodingFilename(String fileName) {
+		fileName = fileName.replace("_", " ");
+		fileName = Md5Util.hash(fileName + System.nanoTime() + counter++);
+		return fileName;
+	}
+
+	public static String encodingExcelFilename(String filename){
+		filename = UUID.randomUUID().toString() + "_" + filename + ".xlsx";
+		return filename;
+	}
+
+    /**
+     * 修正路径,将 \\ 或 / 等替换为 File.separator
+     * @param path 待修正的路径
+     * @return 修正后的路径
+     */
+    public static String path(String path){
+        String p = StringUtils.replace(path, "\\", "/");
+        p = StringUtils.join(StringUtils.split(p, "/"), "/");
+        if (!StringUtils.startsWithAny(p, "/") && StringUtils.startsWithAny(path, "\\", "/")){
+            p += "/";
+        }
+        if (!StringUtils.endsWithAny(p, "/") && StringUtils.endsWithAny(path, "\\", "/")){
+            p = p + "/";
+        }
+        if (path != null && path.startsWith("/")){
+            p = "/" + p; // linux下路径
+        }
+        return p;
+    }
+
+    /**
+     * 获取工程源文件所在路径
+     * @return
+     */
+    public static String getProjectPath(){
+        String projectPath = "";
+        try {
+            File file = ResourceUtil.getResource("").getFile();
+            if (file != null){
+                while(true){
+                    File f = new File(path(file.getPath() + "/src/main"));
+                    if (f.exists()){
+                        break;
+                    }
+                    f = new File(path(file.getPath() + "/target/classes"));
+                    if (f.exists()){
+                        break;
+                    }
+                    if (file.getParentFile() != null){
+                        file = file.getParentFile();
+                    }else{
+                        break;
+                    }
+                }
+                projectPath = file.toString();
+            }
+        } catch (FileNotFoundException e) {
+            // 忽略异常
+        } catch (IOException e) {
+            // 忽略异常
+        }
+        // 取不到,取当前工作路径
+        if (StringUtils.isBlank(projectPath)){
+            projectPath = System.getProperty("user.dir");
+        }
+        return projectPath;
+    }
+
+    /**
+     * 获取工程源文件所在路径
+     * @return
+     */
+    public static String getWebappPath(){
+        String webappPath = "";
+        try {
+            File file = ResourceUtil.getResource("").getFile();
+            if (file != null){
+                while(true){
+                    File f = new File(path(file.getPath() + "/WEB-INF/classes"));
+                    if (f.exists()){
+                        break;
+                    }
+                    f = new File(path(file.getPath() + "/src/main/webapp"));
+                    if (f.exists()){
+                        return f.getPath();
+                    }
+                    if (file.getParentFile() != null){
+                        file = file.getParentFile();
+                    }else{
+                        break;
+                    }
+                }
+                webappPath = file.toString();
+            }
+        } catch (FileNotFoundException e) {
+            // 忽略异常
+        } catch (IOException e) {
+            // 忽略异常
+        }
+        // 取不到,取当前工作路径
+        if (StringUtils.isBlank(webappPath)){
+            webappPath = System.getProperty("user.dir");
+        }
+        return webappPath;
+    }
+
+	/**
+	 * 数组以某种分隔符拼装
+	 * @param value Long数值
+	 * @param s 分隔符
+	 * @return 拼装之后的字符串
+	 */
+    public static String conversion(Object value, String s){
+    	String src = "";
+    	if(value instanceof  Long[]){
+    	    Long[] a = (Long[]) value;
+            for(Long l: a){
+                src += l+s;
+            }
+        }
+    	if(value instanceof List){
+            List<String> a = (List) value;
+            for(int i=0; i< a.size(); i++){
+                src += a.get(i)+s;
+            }
+        }
+		return  src.substring(0,src.length()-s.length());
+	}
+
+}

+ 1 - 1
user_center/src/main/java/com/huaxu/config/ResourceServerConfig.java

@@ -17,7 +17,7 @@ public class ResourceServerConfig extends ResourceServerConfigurerAdapter {
                 .and()
                 .authorizeRequests()
                 .antMatchers("/swagger-ui.html","/webjars/**", "/webjars/**", "/swagger-resources/**",
-                        "/v2/**","/app/**")
+                        "/v2/**","/app/**","/user/**")
                 .permitAll() //配置不需要身份认证的请求路径
                 .anyRequest().authenticated() //其他所有访问路径都需要身份认证
                 .and()

+ 132 - 0
user_center/src/main/java/com/huaxu/controller/UserController.java

@@ -0,0 +1,132 @@
+package com.huaxu.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.huaxu.common.FileUploadUtil;
+import com.huaxu.entity.App;
+import com.huaxu.entity.UserTagEntity;
+import com.huaxu.model.AjaxMessage;
+import com.huaxu.model.Pagination;
+import com.huaxu.model.ResultStatus;
+import com.huaxu.service.UserTagService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+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.ui.ModelMap;
+
+import java.io.IOException;
+import java.util.Map;
+import java.util.Date;
+import org.springframework.web.bind.annotation.*;
+import com.huaxu.entity.UserEntity;
+import com.huaxu.service.UserService;
+import org.springframework.web.multipart.MultipartFile;
+
+/**
+ * 用户页面控制器
+ * @author WYY
+ * @date 2020-10-22 17:35
+ */
+@RestController
+@RequestMapping("/user")
+@Api(tags = "用户管理")
+public class UserController {
+
+    @Autowired
+    private UserService userService;
+    @Value("${UMIS.sys_config_path}")
+    private String baseDir;
+
+    @ApiOperation(value = "分页查询用户信息")
+    @RequestMapping(value = "/selectPage", method = RequestMethod.POST)
+    public  AjaxMessage<Pagination<UserEntity>> list(@RequestParam Integer pageNum, @RequestParam Integer pageSize,@ApiParam(value = "用户信息", required = false)@RequestBody UserEntity userEntity) {
+        IPage<UserEntity> iPage = new Page<>(pageNum, pageSize);
+        iPage = userService.findPage(iPage, userEntity);
+        Pagination<UserEntity> pages = new Pagination<>(iPage);
+        return new AjaxMessage<>(ResultStatus.OK, pages);
+    }
+    /**
+     * 查询
+     */
+    @ApiOperation(value = "按ID查询用户信息")
+    @RequestMapping(value = "/findUserById", method = RequestMethod.POST)
+    public  AjaxMessage<UserEntity>  findUserById(@ApiParam(value = "用户ID", required = true) @RequestParam Long id) {
+        UserEntity userEntity = userService.findUserById(id);
+        return new AjaxMessage<>(ResultStatus.OK, userEntity);
+    }
+    /**
+     * 新增
+     */
+    @ApiOperation(value = "用户头像")
+    @RequestMapping(value = "addUserPhoto", method = RequestMethod.POST)
+    @ResponseBody
+    public  AjaxMessage<String>  addUserPhoto(@ApiParam(value = "用户头像", required = true)@RequestParam("avatarfile") MultipartFile file) {
+        String avatar = "";
+        if (!file.isEmpty()) {
+            try {
+                avatar = FileUploadUtil.uploadWeb(baseDir, file);
+            } catch (IOException e) {
+                return new AjaxMessage<>(ResultStatus.ERROR, e.getMessage());
+            }
+        }
+        return new AjaxMessage<>(ResultStatus.OK, avatar);
+    }
+    /**
+     * 新增
+     */
+    @ApiOperation(value = "新增用户信息")
+    @RequestMapping(value = "addUser", method = RequestMethod.POST)
+    @ResponseBody
+    public  AjaxMessage<Integer>  addUser( @ApiParam(value = "用户信息", required = true)@RequestBody  UserEntity user) {
+        if (user.getPhone() != null) {
+            boolean isExsit = userService.checkMobileUnique(user.getPhone());
+            if (isExsit) {
+                return new AjaxMessage<>(ResultStatus.MEMBER_TELPHONE_ALREADY_EXISTS, 0);
+            }
+        }
+        int result = userService.addUser(user) ? 1 : 0;
+        return new AjaxMessage<>(ResultStatus.OK, result);
+    }
+
+    /**
+     * 修改保存用户
+     */
+    @ApiOperation(value = "更新用户信息")
+    @RequestMapping(value = "/updateUserById", method = RequestMethod.POST)
+    @ResponseBody
+    public AjaxMessage<Integer> editUser(@ApiParam(value = "用户信息", required = true) @RequestBody  UserEntity user) {
+        if (user.getPhone() != null) {
+            boolean isExsit = userService.checkMobileUnique(user);
+            if (isExsit) {
+                return new AjaxMessage<>(ResultStatus.MEMBER_TELPHONE_ALREADY_EXISTS, 0);
+            }
+        }
+        int result = userService.updateUserById(user) ? 1 : 0;
+        return new AjaxMessage<>(ResultStatus.OK, result);
+    }
+
+    /**
+     * 删除
+     */
+    @ApiOperation(value = "按ID进行批量删除")
+    @RequestMapping(value = "/deleteUserByIds", method = RequestMethod.DELETE)
+    @ResponseBody
+    public AjaxMessage<Integer> del(@ApiParam(value = "用户ID", required = true) Long[] ids) {
+        int result = userService.delUserByIds(ids) ? 1 : 0;
+        return new AjaxMessage<>(ResultStatus.OK, result);
+    }
+    /**
+     * 删除
+     */
+    @ApiOperation(value = "按ID进行单个删除")
+    @RequestMapping(value = "/deleteUserById", method = RequestMethod.DELETE)
+    @ResponseBody
+    public AjaxMessage<Integer> del(@ApiParam(value = "用户ID", required = true)Long id) {
+        int result = userService.delUserById(id) ? 1 : 0;
+        return new AjaxMessage<>(ResultStatus.OK, result);
+    }
+}

+ 33 - 0
user_center/src/main/java/com/huaxu/dao/UserMapper.java

@@ -0,0 +1,33 @@
+package com.huaxu.dao;
+
+import com.huaxu.entity.UserEntity;
+import java.io.Serializable;
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+/**
+ *
+ * uims_userDAO接口
+ * @author: WYY
+ * @date 2020-10-22 17:35
+ */
+@Mapper
+public interface UserMapper extends BaseMapper<UserEntity> {
+
+	/**
+     * 自定义分页查询
+     * @param  page 
+     * @param  userEntity 实体类
+     */
+     Page<UserEntity> findPage(IPage<UserEntity> page, @Param("user") UserEntity userEntity);
+
+     UserEntity findUserById(Serializable id);
+
+
+     List<UserEntity> findList(UserEntity userEntity);
+
+     /**删除相关方法  使用mybatis-plus集成的 **/
+}

+ 33 - 0
user_center/src/main/java/com/huaxu/dao/UserRoleMapper.java

@@ -0,0 +1,33 @@
+package com.huaxu.dao;
+
+import com.huaxu.entity.UserRoleEntity;
+import java.io.Serializable;
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+/**
+ *
+ * uims_user_roleDAO接口
+ * @author: WYY
+ * @date 2020-10-24 18:26
+ */
+@Mapper
+public interface UserRoleMapper extends BaseMapper<UserRoleEntity> {
+
+	/**
+     * 自定义分页查询
+     * @param  page 
+     * @param  userRoleEntity 实体类
+     */
+     Page<UserRoleEntity> findPage(IPage<UserRoleEntity> page, @Param("userRole") UserRoleEntity userRoleEntity);
+
+     UserRoleEntity findUserRoleById(Serializable id);
+
+
+     List<UserRoleEntity> findList(UserRoleEntity userRoleEntity);
+
+     /**删除相关方法  使用mybatis-plus集成的 **/
+}

+ 34 - 0
user_center/src/main/java/com/huaxu/dao/UserTagMapper.java

@@ -0,0 +1,34 @@
+package com.huaxu.dao;
+
+import com.huaxu.entity.UserTagEntity;
+import java.io.Serializable;
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+/**
+ *
+ * uims_user_tagDAO接口
+ * @author: WYY
+ * @date 2020-10-23 15:43
+ */
+@Mapper
+public interface UserTagMapper extends BaseMapper<UserTagEntity> {
+
+    /**
+     * 自定义分页查询
+     *
+     * @param page
+     * @param userTagEntity 实体类
+     */
+    Page<UserTagEntity> findPage(IPage<UserTagEntity> page, @Param("userTag") UserTagEntity userTagEntity);
+
+    UserTagEntity findUserTagById(Serializable id);
+
+
+    List<UserTagEntity> findList(UserTagEntity userTagEntity);
+
+    /**删除相关方法  使用mybatis-plus集成的 **/
+}

+ 114 - 0
user_center/src/main/java/com/huaxu/entity/UserEntity.java

@@ -0,0 +1,114 @@
+package com.huaxu.entity;
+
+import com.baomidou.mybatisplus.annotation.*;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.beans.Transient;
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * uims_user
+ * @author: WYY
+ * @date 2020-10-22 17:35
+ */
+@Data
+@TableName("uims_user")
+public class UserEntity implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    @ApiModelProperty(value = "主键")
+    @TableId(type=IdType.AUTO)
+    private Long id;
+
+    /** 租户标识 */
+    @ApiModelProperty(value = "租户标识")
+    private String tenantId;
+
+    /** 用户名 */
+    @ApiModelProperty(value = "用户名")
+    private String username;
+
+    /** 手机号 */
+    @ApiModelProperty(value = "手机号")
+    private String phone;
+
+    /** 公司 */
+    @ApiModelProperty(value = "公司")
+    private Long companyOrgId;
+
+    /** 公司名称 */
+    @ApiModelProperty(value = "公司名称")
+    @TableField(exist = false)
+    private String companyOrgName;
+
+    /** 部门 */
+    @ApiModelProperty(value = "部门")
+    private Long deptOrgId;
+
+    /** 部门名称 */
+    @ApiModelProperty(value = "部门名称")
+    @TableField(exist = false)
+    private String deptOrgName;
+
+
+    /** 头像 */
+    @ApiModelProperty(value = "头像")
+    private String photo;
+
+    /** 用户类型 */
+    @ApiModelProperty(value = "用户类型(0 超管 1 普通用户)")
+    private String userType;
+
+    /** 用户标签 */
+    @ApiModelProperty(value = "用户标签")
+    @TableField(exist = false)
+    private List<Long> userTags;
+
+    /** 启用状态 */
+    @ApiModelProperty(value = "启用状态")
+    private String enableState;
+
+    /** 邮箱 */
+    @ApiModelProperty(value = "邮箱")
+    private String email;
+
+    /** 数据删除标记 */
+    @ApiModelProperty(value = "数据删除标记")
+    private Integer status;
+    /** 创建者 */
+    @ApiModelProperty(value = "创建者")
+    private String createBy;
+
+    /** 创建时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
+    @NotNull(message = "参数值不能为空")
+    @ApiModelProperty(value = "创建时间")
+    private Date dateCreate;
+    /** 更新者 */
+    @ApiModelProperty(value = "更新者")
+    private String updateBy;
+
+    /** dateUpdate */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
+    @NotNull(message = "参数值不能为空")
+    @ApiModelProperty(value = "更新时间")
+    private Date dateUpdate;
+
+    /** 备注 */
+    @ApiModelProperty(value = "备注")
+    private String remark;
+
+    /** 用户角色 */
+    @ApiModelProperty(value = "用户角色")
+    @TableField(exist = false)
+    private Long roleId;
+}

+ 55 - 0
user_center/src/main/java/com/huaxu/entity/UserRoleEntity.java

@@ -0,0 +1,55 @@
+package com.huaxu.entity;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableName;
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * uims_user_role
+ * @author: WYY
+ * @date 2020-10-24 18:26
+ */
+@Data
+@TableName("uims_user_role")
+public class UserRoleEntity implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */ 
+    @TableId(value = "id",type = IdType.AUTO)
+    private Long id;
+
+    /** 用户ID */
+    private Long userId;
+
+    /** 角色ID */
+    private Long roleId;
+
+    /** 数据删除标记 */
+    private Integer status;
+
+    /** 创建时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
+    @NotNull(message = "参数值不能为空")
+    private Date dateCreate;
+
+    /** dateUpdate */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
+    @NotNull(message = "参数值不能为空")
+    private Date dateUpdate;
+
+    @ApiModelProperty(value = "更新者")
+    private String updateBy;
+    /** 创建者 */
+    @ApiModelProperty(value = "创建者")
+    private String createBy;
+}

+ 60 - 0
user_center/src/main/java/com/huaxu/entity/UserTagEntity.java

@@ -0,0 +1,60 @@
+package com.huaxu.entity;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableName;
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * uims_user_tag
+ * @author: WYY
+ * @date 2020-10-23 15:43
+ */
+@Data
+@TableName("uims_user_tag")
+public class UserTagEntity implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */ 
+    @TableId(value = "id",type = IdType.AUTO)
+    private Long id;
+
+    /** 用户ID */
+    @ApiModelProperty(value = "用户ID")
+    private Long userId;
+
+    /** 标签ID */
+    @ApiModelProperty(value = "标签ID")
+    private Long tagId;
+
+    /** 数据删除标记 */
+    @ApiModelProperty(value = "数据删除标记")
+    private Integer status;
+
+    /** 创建时间 */
+    @ApiModelProperty(value = "创建时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
+    @NotNull(message = "参数值不能为空")
+    private Date dateCreate;
+
+    /** 修改时间 */
+    @ApiModelProperty(value = "修改时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
+    @NotNull(message = "参数值不能为空")
+    private Date dateUpdate;
+
+    @ApiModelProperty(value = "更新者")
+    private String updateBy;
+    /** 创建者 */
+    @ApiModelProperty(value = "创建者")
+    private String createBy;
+}

+ 76 - 0
user_center/src/main/java/com/huaxu/service/UserRoleService.java

@@ -0,0 +1,76 @@
+package com.huaxu.service;
+
+
+import com.huaxu.dao.UserRoleMapper;
+import com.huaxu.entity.UserRoleEntity;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import javax.annotation.Resource;
+import org.springframework.transaction.annotation.Transactional;
+import java.util.Map;
+import java.util.List;
+import java.util.Arrays;
+/**
+ *
+ * 用户角色Service接口
+ * @author: WYY
+ * @date 2020-10-24 18:26
+ */
+@Service
+public class UserRoleService extends ServiceImpl<UserRoleMapper,UserRoleEntity> {
+
+	@Resource
+	private UserRoleMapper userRoleMapper;
+
+	/**
+	 * 查列表
+	 */
+	public List<UserRoleEntity> findList(UserRoleEntity userRoleEntity) {
+		return userRoleMapper.findList(userRoleEntity);
+	}
+
+	/**
+	 * 批量删除
+	 */
+	@Transactional(rollbackFor = Exception.class)
+	public boolean delUserRoleByIds(Long[] ids) {
+		return this.removeByIds(Arrays.asList(ids));
+
+	}
+
+	/**
+	 * 单个删除
+	 */
+	public boolean delUserRoleById(Long id) {
+		return this.removeById(id);
+	}
+
+	/**
+	 * 保存
+	 */
+	public boolean addUserRole(UserRoleEntity userRole) {
+		if (this.save(userRole)) {
+			return true;
+		}
+		return false;
+	}
+
+	/**
+	 * 修改根居ID
+	 */
+	public boolean updateUserRoleById(UserRoleEntity userRole) {
+		if (this.updateById(userRole)) {
+			return true;
+		}
+		return false;
+	}
+
+	/**
+	 * 根居ID获取对象
+	 */
+	public UserRoleEntity findUserRoleById(Long id) {
+		return userRoleMapper.findUserRoleById(id);
+	}
+}

+ 198 - 0
user_center/src/main/java/com/huaxu/service/UserService.java

@@ -0,0 +1,198 @@
+package com.huaxu.service;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.huaxu.common.ToolUtil;
+import com.huaxu.dao.UserMapper;
+import com.huaxu.entity.UserEntity;
+import com.huaxu.entity.UserRoleEntity;
+import com.huaxu.entity.UserTagEntity;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import javax.annotation.Resource;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Arrays;
+/**
+ *
+ * 用户Service接口
+ * @author: WYY
+ * @date 2020-10-22 17:35
+ */
+@Service
+public class UserService extends ServiceImpl<UserMapper,UserEntity> {
+
+	@Resource
+	private UserMapper userMapper;
+	@Resource
+	private UserTagService userTagService;
+	@Resource
+	private UserRoleService userRoleService;
+
+	/**
+	 * 自定义分页查询,含关联实体对像
+	 */
+	public IPage<UserEntity> findPage(IPage<UserEntity> page, UserEntity userEntity) {
+		Page<UserEntity> userPage = userMapper.findPage(page, userEntity);
+		return userPage;
+	}
+
+	/**
+	 * 查列表
+	 */
+	public List<UserEntity> findList(UserEntity userEntity) {
+		return userMapper.findList(userEntity);
+	}
+
+	/**
+	 * 批量删除
+	 */
+	@Transactional(rollbackFor = Exception.class)
+	public boolean delUserByIds(Long[] ids) {
+		for (Long id : ids) {
+			//批量删除附件
+		}
+		return this.removeByIds(Arrays.asList(ids));
+	}
+
+	public boolean checkMobileUnique(String phone) {
+		int count = this.count(new QueryWrapper<UserEntity>().eq("phone", phone));
+		if (count > 0) {
+			return true;
+		}
+		return false;
+	}
+
+	public boolean checkMobileUnique(UserEntity user) {
+		Long userId = ToolUtil.isEmpty(user.getId()) ? -1L : user.getId();
+		UserEntity info = this.getOne(new QueryWrapper<UserEntity>().eq("phone", user.getPhone()));
+		if (ToolUtil.isNotEmpty(info) && !info.getId().equals(userId)) {
+			return true;
+		}
+		return false;
+	}
+
+	/**
+	 * 单个删除
+	 */
+	public boolean delUserById(Long id) {
+		//todo 移除附件
+		return this.removeById(id);
+	}
+
+	/**
+	 * 保存
+	 */
+	public boolean addUser(UserEntity user) {
+		if (this.save(user)) {
+			Long pkId = user.getId();
+			//添加用户标签
+			if (user.getUserTags() != null) {
+				for (Long item : user.getUserTags()) {
+					UserTagEntity userTagEntity = new UserTagEntity();
+					userTagEntity.setCreateBy(user.getCreateBy());
+					userTagEntity.setUpdateBy(user.getUpdateBy());
+					userTagEntity.setDateCreate(user.getDateCreate());
+					userTagEntity.setDateUpdate(user.getDateUpdate());
+					userTagEntity.setStatus(1);
+					userTagEntity.setTagId(Long.valueOf(item));
+					userTagEntity.setUserId(pkId);
+					userTagService.addUserTag(userTagEntity);
+				}
+			}
+			//添加角色
+			if (user.getRoleId() != null) {
+				UserRoleEntity userRoleEntity = new UserRoleEntity();
+				userRoleEntity.setCreateBy(user.getCreateBy());
+				userRoleEntity.setUpdateBy(user.getUpdateBy());
+				userRoleEntity.setDateCreate(user.getDateCreate());
+				userRoleEntity.setDateUpdate(user.getDateUpdate());
+				userRoleEntity.setStatus(1);
+				userRoleEntity.setRoleId(Long.valueOf(user.getRoleId()));
+				userRoleEntity.setUserId(pkId);
+				userRoleService.addUserRole(userRoleEntity);
+			}
+			return true;
+		}
+		return false;
+	}
+
+	/**
+	 * 修改根居ID
+	 */
+	public boolean updateUserById(UserEntity user) {
+		if (this.updateById(user)) {
+			//更新关联附件信息						
+			Long pkId = user.getId();
+			//添加用户标签
+			if (user.getUserTags() != null && user.getUserTags().size() > 0) {
+				//先删除之前的标签
+				List<UserTagEntity> userTagEntitys = new ArrayList<>();
+				UserTagEntity userTagDelete = new UserTagEntity();
+				userTagDelete.setUserId(pkId);
+				userTagEntitys = userTagService.findList(userTagDelete);
+				Long[] ids = new Long[userTagEntitys.size()];
+				for (int i = 0; i < userTagEntitys.size(); i++) {
+					ids[i] = userTagEntitys.get(i).getId();
+				}
+				userTagService.delUserTagByIds(ids);
+				//新增标签
+				for (Long item : user.getUserTags()) {
+					UserTagEntity userTagEntity = new UserTagEntity();
+					userTagEntity.setCreateBy(user.getCreateBy());
+					userTagEntity.setUpdateBy(user.getUpdateBy());
+					userTagEntity.setDateCreate(user.getDateCreate());
+					userTagEntity.setDateUpdate(user.getDateUpdate());
+					userTagEntity.setStatus(1);
+					userTagEntity.setTagId(Long.valueOf(item));
+					userTagEntity.setUserId(pkId);
+					userTagService.addUserTag(userTagEntity);
+				}
+			}
+			//修改角色
+			if (user.getRoleId() != null) {
+				List<UserRoleEntity> userRoleEntities = new ArrayList<>();
+				UserRoleEntity userRoleEntity = new UserRoleEntity();
+				userRoleEntity.setUserId(pkId);
+				userRoleEntities = userRoleService.findList(userRoleEntity);
+				if (userRoleEntities.size() > 0) {
+					Long userRoleId = userRoleEntities.get(0).getId();
+					userRoleService.delUserRoleById(userRoleId);
+				}
+				//新增角色
+				UserRoleEntity userRole = new UserRoleEntity();
+				userRole.setCreateBy(user.getCreateBy());
+				userRole.setUpdateBy(user.getUpdateBy());
+				userRole.setDateCreate(user.getDateCreate());
+				userRole.setDateUpdate(user.getDateUpdate());
+				userRole.setStatus(1);
+				userRole.setRoleId(Long.valueOf(user.getRoleId()));
+				userRole.setUserId(pkId);
+				userRoleService.addUserRole(userRole);
+			}
+			return true;
+		}
+		return false;
+	}
+
+	/**
+	 * 根居ID获取对象
+	 */
+	public UserEntity findUserById(Long id) {
+		List<UserTagEntity> userTagEntitys = new ArrayList<>();
+		UserTagEntity userTags = new UserTagEntity();
+		userTags.setUserId(id);
+		userTagEntitys = userTagService.findList(userTags);
+		List<Long> ids = new ArrayList<>();
+		for (int i = 0; i < userTagEntitys.size(); i++) {
+			ids.add(userTagEntitys.get(i).getTagId());
+		}
+		UserEntity userEntity = userMapper.findUserById(id);
+		userEntity.setUserTags(ids);
+		return userEntity;
+	}
+}

+ 76 - 0
user_center/src/main/java/com/huaxu/service/UserTagService.java

@@ -0,0 +1,76 @@
+package com.huaxu.service;
+
+
+import com.huaxu.dao.UserTagMapper;
+import com.huaxu.entity.UserTagEntity;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import javax.annotation.Resource;
+import org.springframework.transaction.annotation.Transactional;
+import java.util.Map;
+import java.util.List;
+import java.util.Arrays;
+/**
+ *
+ * 用户标签Service接口
+ * @author: WYY
+ * @date 2020-10-23 15:43
+ */
+@Service
+public class UserTagService extends ServiceImpl<UserTagMapper,UserTagEntity> {
+	@Resource
+	private UserTagMapper userTagMapper;
+
+	/**
+	 * 查列表
+	 */
+	public List<UserTagEntity> findList(UserTagEntity userTagEntity) {
+		return userTagMapper.findList(userTagEntity);
+	}
+
+	/**
+	 * 批量删除
+	 */
+	@Transactional(rollbackFor = Exception.class)
+	public boolean delUserTagByIds(Long[] ids) {
+		return this.removeByIds(Arrays.asList(ids));
+
+	}
+
+	/**
+	 * 单个删除
+	 */
+	public boolean delUserTagById(Long id) {
+		return this.removeById(id);
+
+	}
+
+	/**
+	 * 保存
+	 */
+	public boolean addUserTag(UserTagEntity userTag) {
+		if (this.save(userTag)) {
+			return true;
+		}
+		return false;
+	}
+
+	/**
+	 * 修改根居ID
+	 */
+	public boolean updateUserTagById(UserTagEntity userTag) {
+		if (this.updateById(userTag)) {
+			return true;
+		}
+		return false;
+	}
+
+	/**
+	 * 根居ID获取对象
+	 */
+	public UserTagEntity findUserTagById(Long id) {
+		return userTagMapper.findUserTagById(id);
+	}
+}

+ 2 - 1
user_center/src/main/resources/application-dev.properties

@@ -3,7 +3,7 @@ spring.application.name=smart-city-v2-user
 logging.level.root=info
 logging.path=D:/logs/smart-city-v2-user
 #\u6570\u636E\u5E93\u914D\u7F6E
-spring.datasource.url=jdbc:mysql://10.0.0.161:3306/uims?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=convertToNull
+spring.datasource.url=jdbc:mysql://114.135.61.188:33306/uims?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=convertToNull
 spring.datasource.username=root
 spring.datasource.password=100Zone@123
 spring.datasource.driver-class-name=com.mysql.jdbc.Driver
@@ -62,6 +62,7 @@ spring.kafka.consumer.properties.spring.json.trusted.packages=*
 
 #nacos
 spring.cloud.nacos.discovery.server-addr=127.0.0.1:8848
+UMIS.sys_config_path=E:/UMIS_USER_IMAGES/
 
 
 

+ 1 - 1
user_center/src/main/resources/application-sit.properties

@@ -90,5 +90,5 @@ dubbo.application.qos-accept-foreign-ip=false
 #登录授权推送模板ID
 login.auth.tips.template=7lh0fkmppfPywI4YfrnMOAKQTGXzjueU6awMRD7KRUk
 spring.cloud.stream.bindings.wechat-notify-message.destination=wechat_notify_channel_sit
-
+UMIS.sys_config_path=/UMIS_USER_IMAGES/
 

+ 1 - 1
user_center/src/main/resources/application-uat.properties

@@ -93,4 +93,4 @@ dubbo.application.qos-accept-foreign-ip=false
 #登录授权推送模板ID
 login.auth.tips.template=7lh0fkmppfPywI4YfrnMOAKQTGXzjueU6awMRD7KRUk
 spring.cloud.stream.bindings.wechat-notify-message.destination=wechat_notify_channel_uat
-
+UMIS.sys_config_path=/UMIS_USER_IMAGES/

+ 94 - 0
user_center/src/main/resources/mapper/UserMapper.xml

@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.huaxu.dao.UserMapper">
+    <resultMap type="UserEntity" id="UserResult">
+       <result property="id"    column="id"    />
+       <result property="tenantId"    column="tenant_id"    />
+       <result property="username"    column="username"    />
+       <result property="phone"    column="phone"    />
+       <result property="companyOrgId"    column="company_org_id"    />
+       <result property="deptOrgId"    column="dept_org_id"    />
+       <result property="photo"    column="photo"    />
+       <result property="userType"    column="user_type"    />
+       <result property="enableState"    column="enable_state"    />
+       <result property="remark"    column="remark"    />
+       <result property="email"    column="email"    />
+       <result property="status"    column="status"    />
+       <result property="dateCreate"    column="date_create"    />
+       <result property="createBy"    column="create_by"    />
+       <result property="dateUpdate"    column="date_update"    />
+       <result property="updateBy"    column="update_by"    />
+    </resultMap>
+    
+    <!--  实体栏位  --> 
+    <sql id="userColumns">
+         a.id as "id" ,
+         a.tenant_id as "tenantId" ,
+         a.username as "username" ,
+         a.phone as "phone" ,
+         a.company_org_id as "companyOrgId" ,
+         a.dept_org_id as "deptOrgId" ,
+         a.photo as "photo" ,
+         a.user_type as "userType" ,
+         a.enable_state as "enableState" ,
+         a.remark as "remark" ,
+         a.email as "email" ,
+         a.status as "status" ,
+         a.date_create as "dateCreate" ,
+         a.create_by as "createBy" ,
+         a.date_update as "dateUpdate" ,
+         a.update_by as "updateBy",
+         com.org_name as "companyOrgName" ,
+         dep.org_name as "deptOrgName",
+         userrole.id as roleId
+     </sql>
+    <!-- 外联表  -->
+     <sql id="sysAreaJoins">
+          left join uims_org com ON com.id = a.company_org_id
+          left join uims_org dep ON dep.id = a.dept_org_id
+          left join uims_user_role userrole ON userrole.USER_ID=a.id
+     </sql>
+
+    <!--  根据主键获取实体   -->
+     <select id="findUserById"  resultType="com.huaxu.entity.UserEntity" >
+          SELECT 
+			<include refid="userColumns"/>
+		FROM  uims_user a
+		<include refid="sysAreaJoins"/>
+		WHERE a.id = #{id}
+    </select>
+     <!--  根据获取实体List   -->
+     <select id="findList" resultType="com.huaxu.entity.UserEntity">
+		SELECT 
+			<include refid="userColumns"/>
+		FROM uims_user a
+         <include refid="sysAreaJoins"/>
+		<where>
+            <if test="tenantId != null  and tenantId != ''"> and a.tenant_id = #{tenantId} </if>
+            <if test="username != null  and username != ''">
+                     and a.username LIKE  concat('%',#{username},'%')
+			</if>
+             <if test="phone != null  and phone != ''">
+                     and a.phone like concat('%', #{phone},'%')
+             </if>
+		</where>
+	 </select>
+	  <!--  根据获取实体 page   -->
+     <select id="findPage" resultType="com.huaxu.entity.UserEntity">
+		SELECT 
+			<include refid="userColumns"/>
+		FROM uims_user a
+		<include refid="sysAreaJoins"/>
+		<where>
+            <if test="user.tenantId != null  and user.tenantId != ''"> and a.tenant_id = #{user.tenantId} </if>
+            <if test="user.username != null  and user.username != ''">
+                   and a.username LIKE  concat('%',#{user.username},'%')
+			</if>
+            <if test="user.phone != null  and user.phone != ''">
+                   and a.phone like concat('%', #{user.phone},'%')
+            </if>
+		</where>
+	 </select>
+</mapper>

+ 72 - 0
user_center/src/main/resources/mapper/UserRoleMapper.xml

@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.huaxu.dao.UserRoleMapper">
+
+
+    <resultMap type="UserRoleEntity" id="UserRoleResult">
+        <result property="id" column="id"/>
+        <result property="userId" column="user_id"/>
+        <result property="roleId" column="role_id"/>
+        <result property="status" column="status"/>
+        <result property="dateCreate" column="date_create"/>
+        <result property="createBy" column="create_by"/>
+        <result property="dateUpdate" column="date_update"/>
+        <result property="updateBy" column="update_by"/>
+    </resultMap>
+
+    <!--  实体栏位  -->
+    <sql id="userRoleColumns">
+         a.id as "id" ,
+         a.user_id as "userId" ,
+         a.role_id as "roleId" ,
+         a.status as "status" ,
+         a.date_create as "dateCreate" ,
+         a.create_by as "createBy" ,
+         a.date_update as "dateUpdate" ,
+         a.update_by as "updateBy" 
+     </sql>
+
+
+    <!--  根据主键获取实体   -->
+    <select id="findUserRoleById" resultType="com.huaxu.entity.UserRoleEntity">
+        SELECT
+        <include refid="userRoleColumns"/>
+        FROM uims_user_role a
+
+        WHERE a.id = #{id}
+    </select>
+
+    <!--  根据获取实体List   -->
+    <select id="findList" resultType="com.huaxu.entity.UserRoleEntity">
+        SELECT
+        <include refid="userRoleColumns"/>
+        FROM uims_user_role a
+
+        <where>
+            <if test="userId != null ">and a.user_id = #{userId}</if>
+            <if test="roleId != null ">and a.role_id = #{roleId}</if>
+            <if test="status != null ">and a.status = #{status}</if>
+            <if test="dateCreate != null ">and a.date_create = #{dateCreate}</if>
+            <if test="dateUpdate != null ">and a.date_update = #{dateUpdate}</if>
+
+        </where>
+    </select>
+
+    <!--  根据获取实体 page   -->
+    <select id="findPage" resultType="com.huaxu.entity.UserRoleEntity">
+        SELECT
+        <include refid="userRoleColumns"/>
+        FROM uims_user_role a
+
+        <where>
+            <if test="userRole.userId != null ">and a.user_id = #{userRole.userId}</if>
+            <if test="userRole.roleId != null ">and a.role_id = #{userRole.roleId}</if>
+            <if test="userRole.status != null ">and a.status = #{userRole.status}</if>
+            <if test="userRole.dateCreate != null ">and a.date_create = #{userRole.dateCreate}</if>
+            <if test="userRole.dateUpdate != null ">and a.date_update = #{userRole.dateUpdate}</if>
+
+        </where>
+    </select>
+</mapper>

+ 60 - 0
user_center/src/main/resources/mapper/UserTagMapper.xml

@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.huaxu.dao.UserTagMapper">
+    <resultMap type="UserTagEntity" id="UserTagResult">
+          <result property="id"    column="id"    />
+           <result property="userId"    column="user_id"    />
+           <result property="tagId"    column="tag_id"    />
+           <result property="status"    column="status"    />
+           <result property="dateCreate"    column="date_create"    />
+           <result property="createBy"    column="create_by"    />
+           <result property="dateUpdate"    column="date_update"    />
+           <result property="updateBy"    column="update_by"    />
+     </resultMap>
+    <!--  实体栏位  --> 
+    <sql id="userTagColumns">
+         a.id as "id" ,
+         a.user_id as "userId" ,
+         a.tag_id as "tagId" ,
+         a.status as "status" ,
+         a.date_create as "dateCreate" ,
+         a.create_by as "createBy" ,
+         a.date_update as "dateUpdate" ,
+         a.update_by as "updateBy" 
+     </sql>
+    <!--  根据主键获取实体   -->
+     <select id="findUserTagById"  resultType="com.huaxu.entity.UserTagEntity" >
+          SELECT 
+			<include refid="userTagColumns"/>
+		FROM  uims_user_tag a
+		WHERE a.id = #{id}
+    </select>
+     <!--  根据获取实体List   -->
+     <select id="findList" resultType="com.huaxu.entity.UserTagEntity">
+		SELECT 
+			<include refid="userTagColumns"/>
+		FROM uims_user_tag a
+		<where>
+              <if test="userId != null "> and a.user_id = #{userId} </if>
+              <if test="tagId != null "> and a.tag_id = #{tagId} </if>
+              <if test="status != null "> and a.status = #{status} </if>
+              <if test="dateCreate != null "> and a.date_create = #{dateCreate} </if>
+              <if test="dateUpdate != null "> and a.date_update = #{dateUpdate} </if>
+		</where>
+	 </select>
+	  <!--  根据获取实体 page   -->
+     <select id="findPage" resultType="com.huaxu.entity.UserTagEntity">
+		SELECT 
+			<include refid="userTagColumns"/>
+		FROM uims_user_tag a
+		<where>
+               <if test="userTag.userId != null "> and a.user_id = #{userTag.userId} </if>
+               <if test="userTag.tagId != null "> and a.tag_id = #{userTag.tagId} </if>
+               <if test="userTag.status != null "> and a.status = #{userTag.status} </if>
+               <if test="userTag.dateCreate != null "> and a.date_create = #{userTag.dateCreate} </if>
+               <if test="userTag.dateUpdate != null "> and a.date_update = #{userTag.dateUpdate} </if>
+		</where>
+	 </select>
+</mapper>

+ 175 - 0
user_center/user_center.iml

@@ -0,0 +1,175 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
+  <component name="FacetManager">
+    <facet type="Spring" name="Spring">
+      <configuration />
+    </facet>
+    <facet type="web" name="Web">
+      <configuration>
+        <webroots />
+      </configuration>
+    </facet>
+  </component>
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
+    <output url="file://$MODULE_DIR$/target/classes" />
+    <output-test url="file://$MODULE_DIR$/target/test-classes" />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
+      <excludeFolder url="file://$MODULE_DIR$/target" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="library" name="Maven: cn.hutool:hutool-all:5.4.5" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.1.6.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.1.6.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.3.2" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.23" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.1.6.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.9" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.9" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.9" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.1.6.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.21" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.21" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.21" level="project" />
+    <orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.17.Final" level="project" />
+    <orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.2.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-web:5.1.8.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.1.8.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-aop:5.1.8.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-expression:5.1.8.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.1.6.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
+    <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.11.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.11.2" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.26" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.1.6.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.1.6.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.1.6.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.4.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.3" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:1.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.11.1" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:2.23.4" level="project" />
+    <orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.9.13" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.9.13" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.6" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-library:1.3" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-core:5.1.8.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.1.8.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:5.1.8.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.6.2" level="project" />
+    <orderEntry type="library" scope="PROVIDED" name="Maven: org.projectlombok:lombok:1.18.4" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-actuator:2.1.6.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator-autoconfigure:2.1.6.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator:2.1.6.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: io.micrometer:micrometer-core:1.1.5" level="project" />
+    <orderEntry type="library" name="Maven: org.hdrhistogram:HdrHistogram:2.1.9" level="project" />
+    <orderEntry type="library" name="Maven: org.latencyutils:LatencyUtils:2.0.3" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.1.6.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.2.0" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.1.8.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-tx:5.1.8.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.7.0" level="project" />
+    <orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.13" level="project" />
+    <orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.13" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.7.0" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-core:2.7.0" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.7.0" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.7.0" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.7.0" level="project" />
+    <orderEntry type="library" name="Maven: org.reflections:reflections:0.9.11" level="project" />
+    <orderEntry type="library" name="Maven: org.javassist:javassist:3.21.0-GA" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml:classmate:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.26" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.1.0.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger-ui:2.7.0" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-discovery:2.1.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-alibaba-nacos-discovery:2.1.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-client:1.1.1" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-common:1.1.1" level="project" />
+    <orderEntry type="library" name="Maven: commons-io:commons-io:2.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.8.1" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-api:1.1.1" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.47" level="project" />
+    <orderEntry type="library" name="Maven: io.prometheus:simpleclient:0.5.0" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-commons:2.1.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-crypto:5.1.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-context:2.1.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-ribbon:2.1.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-ribbon:2.1.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-archaius:2.1.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-archaius:2.1.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.netflix.archaius:archaius-core:0.7.6" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.google.code.findbugs:jsr305:3.0.1" level="project" />
+    <orderEntry type="library" name="Maven: commons-configuration:commons-configuration:1.8" level="project" />
+    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon:2.3.0" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.ribbon:ribbon-transport:2.3.0" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-contexts:0.4.9" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-servo:0.4.9" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.hystrix:hystrix-core:1.5.18" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: javax.inject:javax.inject:1" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty:0.4.9" level="project" />
+    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-core:2.3.0" level="project" />
+    <orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
+    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-httpclient:2.3.0" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: commons-collections:commons-collections:3.2.2" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.httpcomponents:httpclient:4.5.9" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.httpcomponents:httpcore:4.4.11" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-client:1.19.1" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-core:1.19.1" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: javax.ws.rs:jsr311-api:1.1.1" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey.contribs:jersey-apache-client4:1.19.1" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.servo:servo-core:0.12.21" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-commons-util:0.3.0" level="project" />
+    <orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-loadbalancer:2.3.0" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-statistics:0.1.1" level="project" />
+    <orderEntry type="library" name="Maven: io.reactivex:rxjava:1.3.8" level="project" />
+    <orderEntry type="library" name="Maven: mysql:mysql-connector-java:5.1.47" level="project" />
+    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-boot-starter:3.2.0" level="project" />
+    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus:3.2.0" level="project" />
+    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-extension:3.2.0" level="project" />
+    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-core:3.2.0" level="project" />
+    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-annotation:3.2.0" level="project" />
+    <orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:2.1" level="project" />
+    <orderEntry type="library" name="Maven: org.mybatis:mybatis:3.5.2" level="project" />
+    <orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:2.0.2" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.1.6.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-oauth2:2.1.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-security:2.1.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter:2.1.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-rsa:1.0.7.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-security:2.1.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-security:2.1.6.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" />
+    <orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.3.1" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.security.oauth.boot:spring-security-oauth2-autoconfigure:2.1.11.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.9.0" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.9" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.9" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.1.6.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-jwt:1.0.11.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.64" level="project" />
+    <orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.64" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.security.oauth:spring-security-oauth2:2.3.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-beans:5.1.8.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context:5.1.8.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-core:5.1.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-config:5.1.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.security:spring-security-web:5.1.5.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.11" level="project" />
+    <orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-mapper-asl:1.9.13" level="project" />
+    <orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-core-asl:1.9.13" level="project" />
+    <orderEntry type="library" name="Maven: com.google.guava:guava:20.0" level="project" />
+  </component>
+</module>