From 7306feb6ef771bce42a9df846284ad6f57efb45c Mon Sep 17 00:00:00 2001 From: hewenqiang <1527468660@qq.com> Date: 星期四, 20 一月 2022 15:24:38 +0800 Subject: [PATCH] fix 修改用户信息校验方法。 1. 校验用户名称是否唯一采用baseMapper.exists()方法判断是否存在。 2. 校验手机号码和校验email是否唯一,当存在userId时,sql查询条件才加上不等于当前userId。 --- ruoyi-oss/src/main/java/com/ruoyi/oss/service/abstractd/AbstractOssStrategy.java | 60 ++++++++++++++++++++++++++++++------------------------------ 1 files changed, 30 insertions(+), 30 deletions(-) diff --git a/ruoyi-oss/src/main/java/com/ruoyi/oss/service/abstractd/AbstractOssStrategy.java b/ruoyi-oss/src/main/java/com/ruoyi/oss/service/abstractd/AbstractOssStrategy.java index 9fa52ac..6ad4f12 100644 --- a/ruoyi-oss/src/main/java/com/ruoyi/oss/service/abstractd/AbstractOssStrategy.java +++ b/ruoyi-oss/src/main/java/com/ruoyi/oss/service/abstractd/AbstractOssStrategy.java @@ -17,44 +17,44 @@ */ public abstract class AbstractOssStrategy implements IOssStrategy { - protected OssProperties properties; + protected OssProperties properties; - public abstract void init(OssProperties properties); + public abstract void init(OssProperties properties); - @Override - public abstract void createBucket(); + @Override + public abstract void createBucket(); - @Override - public abstract String getServiceType(); + @Override + public abstract String getServiceType(); - public String getPath(String prefix, String suffix) { - // 鐢熸垚uuid - String uuid = IdUtil.fastSimpleUUID(); - // 鏂囦欢璺緞 - String path = DateUtils.datePath() + "/" + uuid; - if (StringUtils.isNotBlank(prefix)) { - path = prefix + "/" + path; - } - return path + suffix; - } + public String getPath(String prefix, String suffix) { + // 鐢熸垚uuid + String uuid = IdUtil.fastSimpleUUID(); + // 鏂囦欢璺緞 + String path = DateUtils.datePath() + "/" + uuid; + if (StringUtils.isNotBlank(prefix)) { + path = prefix + "/" + path; + } + return path + suffix; + } - @Override - public abstract UploadResult upload(byte[] data, String path, String contentType); + @Override + public abstract UploadResult upload(byte[] data, String path, String contentType); - @Override - public abstract void delete(String path); + @Override + public abstract void delete(String path); - @Override - public UploadResult upload(InputStream inputStream, String path, String contentType) { - byte[] data = IoUtil.readBytes(inputStream); - return this.upload(data, path, contentType); - } + @Override + public UploadResult upload(InputStream inputStream, String path, String contentType) { + byte[] data = IoUtil.readBytes(inputStream); + return this.upload(data, path, contentType); + } - @Override - public abstract UploadResult uploadSuffix(byte[] data, String suffix, String contentType); + @Override + public abstract UploadResult uploadSuffix(byte[] data, String suffix, String contentType); - @Override - public abstract UploadResult uploadSuffix(InputStream inputStream, String suffix, String contentType); + @Override + public abstract UploadResult uploadSuffix(InputStream inputStream, String suffix, String contentType); - public abstract String getEndpointLink(); + public abstract String getEndpointLink(); } -- Gitblit v1.9.3