添加文件存储记录和序列号生成规则的操作画面

pull/362/head
AlanScipio 2 years ago
parent eae6443f11
commit e4a49e6b1c

@ -7,7 +7,7 @@ import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.system.api.domain.SysFile;
import com.ruoyi.system.api.domain.SysFileInfo;
import com.ruoyi.system.api.factory.RemoteFileFallbackFactory;
/**
@ -16,8 +16,7 @@ import com.ruoyi.system.api.factory.RemoteFileFallbackFactory;
* @author ruoyi
*/
@FeignClient(contextId = "remoteFileService", value = ServiceNameConstants.FILE_SERVICE, fallbackFactory = RemoteFileFallbackFactory.class)
public interface RemoteFileService
{
public interface RemoteFileService {
/**
*
*
@ -25,5 +24,5 @@ public interface RemoteFileService
* @return
*/
@PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
public R<SysFile> upload(@RequestPart(value = "file") MultipartFile file);
R<SysFileInfo> upload(@RequestPart(value = "file") MultipartFile file);
}

@ -1,50 +0,0 @@
package com.ruoyi.system.api.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
*
*
* @author ruoyi
*/
public class SysFile
{
/**
*
*/
private String name;
/**
*
*/
private String url;
public String getName()
{
return name;
}
public void setName(String name)
{
this.name = name;
}
public String getUrl()
{
return url;
}
public void setUrl(String url)
{
this.url = url;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("name", getName())
.append("url", getUrl())
.toString();
}
}

@ -0,0 +1,34 @@
package com.ruoyi.system.api.domain;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
/**
*
*
* @author ruoyi
*/
@Data
public class SysFileInfo implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* ID
*/
private String fileId;
/**
*
*/
private String name;
/**
*
*/
private String url;
}

@ -7,7 +7,7 @@ import org.springframework.stereotype.Component;
import org.springframework.web.multipart.MultipartFile;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.system.api.RemoteFileService;
import com.ruoyi.system.api.domain.SysFile;
import com.ruoyi.system.api.domain.SysFileInfo;
/**
*
@ -26,7 +26,7 @@ public class RemoteFileFallbackFactory implements FallbackFactory<RemoteFileServ
return new RemoteFileService()
{
@Override
public R<SysFile> upload(MultipartFile file)
public R<SysFileInfo> upload(MultipartFile file)
{
return R.fail("上传文件失败:" + throwable.getMessage());
}

@ -5,8 +5,7 @@ package com.ruoyi.common.core.constant;
*
* @author ruoyi
*/
public class CacheConstants
{
public class CacheConstants {
/**
* 720
*/

@ -1,48 +1,44 @@
package com.ruoyi.common.redis.configure;
import java.nio.charset.Charset;
import org.springframework.data.redis.serializer.RedisSerializer;
import org.springframework.data.redis.serializer.SerializationException;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONReader;
import com.alibaba.fastjson2.JSONWriter;
import com.alibaba.fastjson2.filter.Filter;
import com.ruoyi.common.core.constant.Constants;
import org.springframework.data.redis.serializer.RedisSerializer;
import org.springframework.data.redis.serializer.SerializationException;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
/**
* Redis使FastJson
*
* @author ruoyi
*/
public class FastJson2JsonRedisSerializer<T> implements RedisSerializer<T>
{
public static final Charset DEFAULT_CHARSET = Charset.forName("UTF-8");
public class FastJson2JsonRedisSerializer<T> implements RedisSerializer<T> {
public static final Charset DEFAULT_CHARSET = StandardCharsets.UTF_8;
static final Filter AUTO_TYPE_FILTER = JSONReader.autoTypeFilter(Constants.JSON_WHITELIST_STR);
private Class<T> clazz;
private final Class<T> clazz;
public FastJson2JsonRedisSerializer(Class<T> clazz)
{
public FastJson2JsonRedisSerializer(Class<T> clazz) {
super();
this.clazz = clazz;
}
@Override
public byte[] serialize(T t) throws SerializationException
{
if (t == null)
{
public byte[] serialize(T t) throws SerializationException {
if (t == null) {
return new byte[0];
}
return JSON.toJSONString(t, JSONWriter.Feature.WriteClassName).getBytes(DEFAULT_CHARSET);
}
@Override
public T deserialize(byte[] bytes) throws SerializationException
{
if (bytes == null || bytes.length <= 0)
{
public T deserialize(byte[] bytes) throws SerializationException {
if (bytes == null || bytes.length <= 0) {
return null;
}
String str = new String(bytes, DEFAULT_CHARSET);

@ -18,12 +18,10 @@ import org.springframework.data.redis.serializer.StringRedisSerializer;
@Configuration
@EnableCaching
@AutoConfigureBefore(RedisAutoConfiguration.class)
public class RedisConfig implements CachingConfigurer
{
public class RedisConfig implements CachingConfigurer {
@Bean
@SuppressWarnings(value = { "unchecked", "rawtypes" })
public RedisTemplate<Object, Object> redisTemplate(RedisConnectionFactory connectionFactory)
{
@SuppressWarnings(value = {"unchecked", "rawtypes"})
public RedisTemplate<Object, Object> redisTemplate(RedisConnectionFactory connectionFactory) {
RedisTemplate<Object, Object> template = new RedisTemplate<>();
template.setConnectionFactory(connectionFactory);

@ -1,11 +1,5 @@
package com.ruoyi.common.redis.service;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.BoundSetOperations;
import org.springframework.data.redis.core.HashOperations;
@ -13,15 +7,17 @@ import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.ValueOperations;
import org.springframework.stereotype.Component;
import java.util.*;
import java.util.concurrent.TimeUnit;
/**
* spring redis
*
* @author ruoyi
**/
@SuppressWarnings(value = { "unchecked", "rawtypes" })
@SuppressWarnings(value = {"unchecked", "rawtypes"})
@Component
public class RedisService
{
public class RedisService {
@Autowired
public RedisTemplate redisTemplate;
@ -31,8 +27,7 @@ public class RedisService
* @param key
* @param value
*/
public <T> void setCacheObject(final String key, final T value)
{
public <T> void setCacheObject(final String key, final T value) {
redisTemplate.opsForValue().set(key, value);
}
@ -44,8 +39,7 @@ public class RedisService
* @param timeout
* @param timeUnit
*/
public <T> void setCacheObject(final String key, final T value, final Long timeout, final TimeUnit timeUnit)
{
public <T> void setCacheObject(final String key, final T value, final Long timeout, final TimeUnit timeUnit) {
redisTemplate.opsForValue().set(key, value, timeout, timeUnit);
}
@ -56,8 +50,7 @@ public class RedisService
* @param timeout
* @return true=false=
*/
public boolean expire(final String key, final long timeout)
{
public boolean expire(final String key, final long timeout) {
return expire(key, timeout, TimeUnit.SECONDS);
}
@ -69,8 +62,7 @@ public class RedisService
* @param unit
* @return true=false=
*/
public boolean expire(final String key, final long timeout, final TimeUnit unit)
{
public boolean expire(final String key, final long timeout, final TimeUnit unit) {
return redisTemplate.expire(key, timeout, unit);
}
@ -80,8 +72,7 @@ public class RedisService
* @param key Redis
* @return
*/
public long getExpire(final String key)
{
public long getExpire(final String key) {
return redisTemplate.getExpire(key);
}
@ -91,8 +82,7 @@ public class RedisService
* @param key
* @return true false
*/
public Boolean hasKey(String key)
{
public Boolean hasKey(String key) {
return redisTemplate.hasKey(key);
}
@ -102,19 +92,15 @@ public class RedisService
* @param key
* @return
*/
public <T> T getCacheObject(final String key)
{
public <T> T getCacheObject(final String key) {
ValueOperations<String, T> operation = redisTemplate.opsForValue();
return operation.get(key);
}
/**
*
*
* @param key
*/
public boolean deleteObject(final String key)
{
public boolean deleteObject(final String key) {
return redisTemplate.delete(key);
}
@ -122,10 +108,8 @@ public class RedisService
*
*
* @param collection
* @return
*/
public boolean deleteObject(final Collection collection)
{
public boolean deleteObject(final Collection collection) {
return redisTemplate.delete(collection) > 0;
}
@ -136,8 +120,7 @@ public class RedisService
* @param dataList List
* @return
*/
public <T> long setCacheList(final String key, final List<T> dataList)
{
public <T> long setCacheList(final String key, final List<T> dataList) {
Long count = redisTemplate.opsForList().rightPushAll(key, dataList);
return count == null ? 0 : count;
}
@ -148,8 +131,7 @@ public class RedisService
* @param key
* @return
*/
public <T> List<T> getCacheList(final String key)
{
public <T> List<T> getCacheList(final String key) {
return redisTemplate.opsForList().range(key, 0, -1);
}
@ -160,36 +142,25 @@ public class RedisService
* @param dataSet
* @return
*/
public <T> BoundSetOperations<String, T> setCacheSet(final String key, final Set<T> dataSet)
{
public <T> BoundSetOperations<String, T> setCacheSet(final String key, final Set<T> dataSet) {
BoundSetOperations<String, T> setOperation = redisTemplate.boundSetOps(key);
Iterator<T> it = dataSet.iterator();
while (it.hasNext())
{
setOperation.add(it.next());
for (T t : dataSet) {
setOperation.add(t);
}
return setOperation;
}
/**
* set
*
* @param key
* @return
*/
public <T> Set<T> getCacheSet(final String key)
{
public <T> Set<T> getCacheSet(final String key) {
return redisTemplate.opsForSet().members(key);
}
/**
* Map
*
* @param key
* @param dataMap
*/
public <T> void setCacheMap(final String key, final Map<String, T> dataMap)
{
public <T> void setCacheMap(final String key, final Map<String, T> dataMap) {
if (dataMap != null) {
redisTemplate.opsForHash().putAll(key, dataMap);
}
@ -197,12 +168,8 @@ public class RedisService
/**
* Map
*
* @param key
* @return
*/
public <T> Map<String, T> getCacheMap(final String key)
{
public <T> Map<String, T> getCacheMap(final String key) {
return redisTemplate.opsForHash().entries(key);
}
@ -213,8 +180,7 @@ public class RedisService
* @param hKey Hash
* @param value
*/
public <T> void setCacheMapValue(final String key, final String hKey, final T value)
{
public <T> void setCacheMapValue(final String key, final String hKey, final T value) {
redisTemplate.opsForHash().put(key, hKey, value);
}
@ -225,8 +191,7 @@ public class RedisService
* @param hKey Hash
* @return Hash
*/
public <T> T getCacheMapValue(final String key, final String hKey)
{
public <T> T getCacheMapValue(final String key, final String hKey) {
HashOperations<String, String, T> opsForHash = redisTemplate.opsForHash();
return opsForHash.get(key, hKey);
}
@ -238,8 +203,7 @@ public class RedisService
* @param hKeys Hash
* @return Hash
*/
public <T> List<T> getMultiCacheMapValue(final String key, final Collection<Object> hKeys)
{
public <T> List<T> getMultiCacheMapValue(final String key, final Collection<Object> hKeys) {
return redisTemplate.opsForHash().multiGet(key, hKeys);
}
@ -250,8 +214,7 @@ public class RedisService
* @param hKey Hash
* @return
*/
public boolean deleteCacheMapValue(final String key, final String hKey)
{
public boolean deleteCacheMapValue(final String key, final String hKey) {
return redisTemplate.opsForHash().delete(key, hKey) > 0;
}
@ -261,8 +224,7 @@ public class RedisService
* @param pattern
* @return
*/
public Collection<String> keys(final String pattern)
{
public Collection<String> keys(final String pattern) {
return redisTemplate.keys(pattern);
}
}

@ -1,5 +1,6 @@
package com.ruoyi.common.services.domain;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import java.io.Serial;
@ -25,46 +26,55 @@ public class SysSeqRule extends BaseEntity implements Serializable {
/**
*
*/
@Excel(name = "序列号识别码")
private String seqDistCd;
/**
*
*/
@Excel(name = "规则名称")
private String ruleName;
/**
*
*/
@Excel(name = "前缀")
private String prefix;
/**
* 1
*/
@Excel(name = "分隔符1")
private String separator1;
/**
*
*/
@Excel(name = "日期格式")
private String dateFormat;
/**
* 0
*/
@Excel(name = "最小位数")
private Integer minDigits;
/**
* 2
*/
@Excel(name = "分隔符2")
private String separator2;
/**
* ()
*/
@Excel(name = "生成器名")
private String generatorName;
/**
*
*/
@Excel(name = "是否启用")
private Integer enableFlag;
/**
@ -95,6 +105,10 @@ public class SysSeqRule extends BaseEntity implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
public boolean isEnabled() {
return enableFlag != null && enableFlag == 1;
}
public Long getRuleId() {
return ruleId;
}

@ -1,4 +1,4 @@
package com.ruoyi.common.services.constants;
package com.ruoyi.file.constants;
import com.ruoyi.common.core.constant.IEnum;
import lombok.Getter;

@ -0,0 +1,58 @@
package com.ruoyi.file.controller;
import com.ruoyi.common.core.utils.poi.ExcelUtil;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.core.web.page.TableDataInfo;
import com.ruoyi.common.security.annotation.RequiresPermissions;
import com.ruoyi.file.domain.SysFile;
import com.ruoyi.file.service.ISysFileCRUDService;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* Controller
*
* @author ryas
* created on 2024-02-19
*/
@RestController
@RequestMapping("/FileRecord")
public class SysFileCRUDController extends BaseController {
@Autowired
private ISysFileCRUDService crudService;
/**
*
*/
@RequiresPermissions("file:FileRecord:list")
@GetMapping("/list")
public TableDataInfo list(SysFile sysFile) {
startPage();
List<SysFile> list = crudService.selectSysFileList(sysFile);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("file:FileRecord:export")
@PostMapping("/export")
public void export(HttpServletResponse response, SysFile sysFile) {
List<SysFile> list = crudService.selectSysFileList(sysFile);
ExcelUtil<SysFile> util = new ExcelUtil<>(SysFile.class);
util.exportExcel(response, list, "文件存储记录数据");
}
/**
*
*/
@RequiresPermissions("file:FileRecord:query")
@GetMapping(value = "/{fileId}")
public AjaxResult getInfo(@PathVariable("fileId") String fileId) {
return success(crudService.selectSysFileByFileId(fileId));
}
}

@ -1,5 +1,6 @@
package com.ruoyi.file.controller;
import com.ruoyi.file.domain.FileSaveResult;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -9,7 +10,7 @@ import org.springframework.web.multipart.MultipartFile;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.utils.file.FileUtils;
import com.ruoyi.file.service.ISysFileService;
import com.ruoyi.system.api.domain.SysFile;
import com.ruoyi.system.api.domain.SysFileInfo;
/**
*
@ -28,14 +29,17 @@ public class SysFileController {
*
*/
@PostMapping("upload")
public R<SysFile> upload(MultipartFile file) {
public R<SysFileInfo> upload(MultipartFile file) {
try {
// 上传并返回访问地址
String url = sysFileService.uploadFile(file);
SysFile sysFile = new SysFile();
sysFile.setName(FileUtils.getName(url));
sysFile.setUrl(url);
return R.ok(sysFile);
FileSaveResult saveResult = sysFileService.uploadFile(file);
String requestUrl = saveResult.getRequestUrl();
// 构建返回结果
SysFileInfo responseInfo = new SysFileInfo();
responseInfo.setFileId(saveResult.getFileId());
responseInfo.setName(FileUtils.getName(requestUrl));
responseInfo.setUrl(requestUrl);
return R.ok(responseInfo);
} catch (Exception e) {
log.error("上传文件失败", e);
return R.fail(e.getMessage());

@ -0,0 +1,43 @@
package com.ruoyi.file.domain;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.web.multipart.MultipartFile;
import java.io.Serial;
import java.io.Serializable;
/**
* @author Alan Scipio
* created on 2024/2/19
*/
@NoArgsConstructor
@AllArgsConstructor
@Data
public class FileSaveForm implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 访
*/
public String domain;
/**
*
*/
private String localBaseDir;
/**
*
*/
public String localFilePrefix;
/**
*
*/
private MultipartFile file;
}

@ -1,23 +0,0 @@
package com.ruoyi.file.domain;
import com.ruoyi.file.utils.FileUploadResult;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
/**
* @author Alan Scipio
* created on 2024/2/19
*/
@Data
public class FileSaveRecord implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
private String requestUrl;
private FileUploadResult uploadResult;
}

@ -0,0 +1,51 @@
package com.ruoyi.file.domain;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
/**
* @author Alan Scipio
* created on 2024/2/19
*/
@Data
public class FileSaveResult implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
private boolean success;
private String message;
/**
*
*/
private String requestUrl;
/**
*
*/
private FileUploadResult uploadResult;
public String getFileId() {
return uploadResult == null ? "" : uploadResult.getFileId();
}
public static FileSaveResult success(String requestUrl, FileUploadResult uploadResult) {
FileSaveResult result = new FileSaveResult();
result.setSuccess(true);
result.setRequestUrl(requestUrl);
result.setUploadResult(uploadResult);
return result;
}
public static FileSaveResult fail(String message) {
FileSaveResult result = new FileSaveResult();
result.setSuccess(false);
result.setMessage(message);
return result;
}
}

@ -1,4 +1,4 @@
package com.ruoyi.file.utils;
package com.ruoyi.file.domain;
import lombok.Data;
@ -15,18 +15,39 @@ public class FileUploadResult implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* ID
*/
private String fileId;
/**
*
*/
private String savedFileName;
/**
* /2024/02/19/xxx.png
*/
private String savedPathFileName;
/**
*
*/
private String originalFilename;
/**
*
*/
private String extension;
/**
*
*/
private Long fileSize;
/**
*
*/
private String savedPath;
}

@ -1,5 +1,6 @@
package com.ruoyi.common.services.domain;
package com.ruoyi.file.domain;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import java.io.Serial;
@ -20,41 +21,49 @@ public class SysFile extends BaseEntity implements Serializable {
/**
* ID
*/
@Excel(name = "文件ID")
private String fileId;
/**
*
*/
@Excel(name = "保存文件名")
private String savedName;
/**
*
*/
@Excel(name = "原始文件名")
private String originalName;
/**
*
*/
@Excel(name = "文件路径")
private String filePath;
/**
*
*/
@Excel(name = "文件后缀")
private String extension;
/**
*
*/
@Excel(name = "存储方式")
private String storageType;
/**
* URL
*/
@Excel(name = "获取文件的URL")
private String requestUrl;
/**
* (Byte)
*/
@Excel(name = "文件大小(Byte)")
private Long fileSize;
@Serial

@ -1,4 +1,4 @@
package com.ruoyi.common.services.mapper;
package com.ruoyi.file.mapper;
import org.mybatis.dynamic.sql.AliasableSqlTable;
import org.mybatis.dynamic.sql.SqlColumn;

@ -1,7 +1,7 @@
package com.ruoyi.common.services.mapper;
package com.ruoyi.file.mapper;
import com.ruoyi.common.security.utils.SecurityUtilsExt;
import com.ruoyi.common.services.domain.SysFile;
import com.ruoyi.file.domain.SysFile;
import org.apache.ibatis.annotations.*;
import org.apache.ibatis.type.JdbcType;
import org.mybatis.dynamic.sql.BasicColumn;
@ -19,7 +19,7 @@ import java.util.Collection;
import java.util.List;
import java.util.Optional;
import static com.ruoyi.common.services.mapper.SysFileDynamicSqlSupport.*;
import static com.ruoyi.file.mapper.SysFileDynamicSqlSupport.*;
import static org.mybatis.dynamic.sql.SqlBuilder.isEqualTo;
@Mapper

@ -1,15 +1,10 @@
package com.ruoyi.file.service;
import java.io.InputStream;
import com.alibaba.nacos.common.utils.IoUtils;
import org.springframework.beans.factory.annotation.Autowired;
import com.github.tobato.fastdfs.service.FastFileStorageClient;
import com.ruoyi.file.domain.FileSaveResult;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import com.github.tobato.fastdfs.domain.fdfs.StorePath;
import com.github.tobato.fastdfs.service.FastFileStorageClient;
import com.ruoyi.common.core.utils.file.FileTypeUtils;
/**
* FastDFS
@ -34,13 +29,12 @@ public class FastDfsSysFileServiceImpl implements ISysFileService {
* @return 访
*/
@Override
public String uploadFile(MultipartFile file) throws Exception {
public FileSaveResult uploadFile(MultipartFile file) throws Exception {
// InputStream inputStream = file.getInputStream();
// StorePath storePath = storageClient.uploadFile(inputStream, file.getSize(),
// FileTypeUtils.getExtension(file), null);
// IoUtils.closeQuietly(inputStream);
// return domain + "/" + storePath.getFullPath();
return "notImplementedYet";
return FileSaveResult.fail("Not implemented yet!");
}
}

@ -0,0 +1,61 @@
package com.ruoyi.file.service;
import com.ruoyi.file.domain.SysFile;
import java.util.List;
/**
* Service
*
* @author ryas
* created on 2024-02-19
*/
public interface ISysFileCRUDService {
/**
*
*
* @param fileId
* @return
*/
SysFile selectSysFileByFileId(String fileId);
/**
*
*
* @param sysFile
* @return
*/
List<SysFile> selectSysFileList(SysFile sysFile);
/**
*
*
* @param sysFile
* @return
*/
int insertSysFile(SysFile sysFile);
/**
*
*
* @param sysFile
* @return
*/
int updateSysFile(SysFile sysFile);
/**
*
*
* @param fileIds
* @return
*/
int deleteSysFileByFileIds(String[] fileIds);
/**
*
*
* @param fileId
* @return
*/
int deleteSysFileByFileId(String fileId);
}

@ -1,5 +1,6 @@
package com.ruoyi.file.service;
import com.ruoyi.file.domain.FileSaveResult;
import org.springframework.web.multipart.MultipartFile;
/**
@ -12,8 +13,8 @@ public interface ISysFileService {
*
*
* @param file
* @return 访
* @return
*/
String uploadFile(MultipartFile file) throws Exception;
FileSaveResult uploadFile(MultipartFile file) throws Exception;
}

@ -1,9 +1,10 @@
package com.ruoyi.file.service;
import com.ruoyi.common.services.constants.FileStorageType;
import com.ruoyi.common.services.domain.SysFile;
import com.ruoyi.common.services.mapper.SysFileMapper;
import com.ruoyi.file.utils.FileUploadResult;
import com.ruoyi.file.constants.FileStorageType;
import com.ruoyi.file.domain.FileSaveResult;
import com.ruoyi.file.domain.FileUploadResult;
import com.ruoyi.file.domain.SysFile;
import com.ruoyi.file.mapper.SysFileMapper;
import com.ruoyi.file.utils.FileUploadUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
@ -49,18 +50,19 @@ public class LocalSysFileServiceImpl implements ISysFileService {
*/
@Transactional
@Override
public String uploadFile(MultipartFile file) throws Exception {
public FileSaveResult uploadFile(MultipartFile file) throws Exception {
// 保存文件到本地
FileUploadResult uploadResult = FileUploadUtils.upload(localFilePath, file);
String savedPathFileName = uploadResult.getSavedPathFileName();
String url = domain + localFilePrefix + savedPathFileName;
String requestUrl = domain + localFilePrefix + savedPathFileName;
// 保存文件记录
saveFileRecord(url, uploadResult);
SysFile record = getSysFile(uploadResult, requestUrl);
sysFileMapper.insertSelective(record);
// 返回访问地址
return url;
return FileSaveResult.success(requestUrl, uploadResult);
}
private void saveFileRecord(String requestUrl, FileUploadResult uploadResult) {
private SysFile getSysFile(FileUploadResult uploadResult, String requestUrl) {
SysFile record = new SysFile();
record.setFileId(uploadResult.getFileId()); // 文件ID
record.setSavedName(uploadResult.getSavedFileName()); // 保存的文件名
@ -70,6 +72,6 @@ public class LocalSysFileServiceImpl implements ISysFileService {
record.setStorageType(FileStorageType.LOCAL.name()); // 存储类型:本地文件存储
record.setRequestUrl(requestUrl); // 获取文件的URL
record.setFileSize(uploadResult.getFileSize()); // 文件大小(Byte)
sysFileMapper.insertSelective(record);
return record;
}
}

@ -1,8 +1,9 @@
package com.ruoyi.file.service;
import com.alibaba.nacos.common.utils.IoUtils;
import com.ruoyi.file.config.MinioConfig;
import com.ruoyi.file.domain.FileSaveResult;
import com.ruoyi.file.utils.FileUploadUtils;
import com.ruoyi.file.config.MinioConfig;
import io.minio.MinioClient;
import io.minio.PutObjectArgs;
import org.springframework.beans.factory.annotation.Autowired;
@ -12,7 +13,7 @@ import org.springframework.web.multipart.MultipartFile;
import java.io.InputStream;
/**
* TODO
* TODO
* Minio
*
* @author ruoyi
@ -32,7 +33,7 @@ public class MinioSysFileServiceImpl implements ISysFileService {
* @return 访
*/
@Override
public String uploadFile(MultipartFile file) throws Exception {
public FileSaveResult uploadFile(MultipartFile file) throws Exception {
String fileName = FileUploadUtils.extractFilename(file, null);
InputStream inputStream = file.getInputStream();
PutObjectArgs args = PutObjectArgs.builder()
@ -43,6 +44,7 @@ public class MinioSysFileServiceImpl implements ISysFileService {
.build();
client.putObject(args);
IoUtils.closeQuietly(inputStream);
return minioConfig.getUrl() + "/" + minioConfig.getBucketName() + "/" + fileName;
String requestUrl = minioConfig.getUrl() + "/" + minioConfig.getBucketName() + "/" + fileName;
return FileSaveResult.success(requestUrl, null);
}
}

@ -0,0 +1,116 @@
package com.ruoyi.file.service;
import com.ruoyi.common.core.utils.StringUtils;
import com.ruoyi.file.domain.SysFile;
import com.ruoyi.file.mapper.SysFileDynamicSqlSupport;
import com.ruoyi.file.mapper.SysFileMapper;
import org.mybatis.dynamic.sql.SqlBuilder;
import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider;
import org.mybatis.dynamic.sql.render.RenderingStrategies;
import org.mybatis.dynamic.sql.select.SelectDSLCompleter;
import org.mybatis.dynamic.sql.select.render.SelectStatementProvider;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Optional;
/**
* Service
*
* @author ryas
* created on 2024-02-19
*/
@Service
public class SysFileCRUDServiceImpl implements ISysFileCRUDService {
@Autowired
private SysFileMapper sysFileMapper;
/**
*
*
* @param fileId
* @return
*/
@Override
public SysFile selectSysFileByFileId(String fileId) {
Optional<SysFile> result = sysFileMapper.selectOne(dsl -> dsl.where(SysFileDynamicSqlSupport.fileId, SqlBuilder.isEqualTo(fileId)));
return result.orElse(null);
}
/**
*
*
* @param sysFile
* @return
*/
@Override
public List<SysFile> selectSysFileList(SysFile sysFile) {
if (StringUtils.isNotBlank(sysFile.getSavedName()) || StringUtils.isNotBlank(sysFile.getFileId())) {
//条件查询
SelectStatementProvider provider = SqlBuilder.select(SysFileMapper.selectList)
.from(SysFileDynamicSqlSupport.sysFile)
.where(SysFileDynamicSqlSupport.fileId, SqlBuilder.isEqualToWhenPresent(sysFile.getFileId()))
.and(SysFileDynamicSqlSupport.savedName, SqlBuilder.isLikeWhenPresent(sysFile.getSavedName() == null ? null : "%" + sysFile.getSavedName() + "%"))
.build()
.render(RenderingStrategies.MYBATIS3);
return sysFileMapper.selectMany(provider);
} else {
//全部查询
return sysFileMapper.select(SelectDSLCompleter.allRows());
}
}
/**
*
*
* @param sysFile
* @return
*/
@Transactional
@Override
public int insertSysFile(SysFile sysFile) {
return sysFileMapper.insertSelective(sysFile);
}
/**
*
*
* @param sysFile
* @return
*/
@Transactional
@Override
public int updateSysFile(SysFile sysFile) {
return sysFileMapper.updateByPrimaryKeySelective(sysFile);
}
/**
*
*
* @param fileIds
* @return
*/
@Transactional
@Override
public int deleteSysFileByFileIds(String[] fileIds) {
DeleteStatementProvider provider = SqlBuilder.deleteFrom(SysFileDynamicSqlSupport.sysFile)
.where(SysFileDynamicSqlSupport.fileId, SqlBuilder.isIn(fileIds))
.build()
.render(RenderingStrategies.MYBATIS3);
return sysFileMapper.delete(provider);
}
/**
*
*
* @param fileId
* @return
*/
@Transactional
@Override
public int deleteSysFileByFileId(String fileId) {
return sysFileMapper.deleteByPrimaryKey(fileId);
}
}

@ -9,6 +9,7 @@ import com.ruoyi.common.core.utils.StringUtils;
import com.ruoyi.common.core.utils.file.FileTypeUtils;
import com.ruoyi.common.core.utils.file.MimeTypeUtils;
import com.ruoyi.common.core.utils.uuid.Seq;
import com.ruoyi.file.domain.FileUploadResult;
import org.springframework.web.multipart.MultipartFile;
import java.io.File;

@ -1,15 +1,5 @@
package com.ruoyi.system.controller;
import java.util.Arrays;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.utils.StringUtils;
import com.ruoyi.common.core.utils.file.FileTypeUtils;
@ -21,10 +11,15 @@ import com.ruoyi.common.log.enums.BusinessType;
import com.ruoyi.common.security.service.TokenService;
import com.ruoyi.common.security.utils.SecurityUtils;
import com.ruoyi.system.api.RemoteFileService;
import com.ruoyi.system.api.domain.SysFile;
import com.ruoyi.system.api.domain.SysFileInfo;
import com.ruoyi.system.api.domain.SysUser;
import com.ruoyi.system.api.model.LoginUser;
import com.ruoyi.system.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.util.Arrays;
/**
*
@ -33,8 +28,7 @@ import com.ruoyi.system.service.ISysUserService;
*/
@RestController
@RequestMapping("/user/profile")
public class SysProfileController extends BaseController
{
public class SysProfileController extends BaseController {
@Autowired
private ISysUserService userService;
@ -48,8 +42,7 @@ public class SysProfileController extends BaseController
*
*/
@GetMapping
public AjaxResult profile()
{
public AjaxResult profile() {
String username = SecurityUtils.getUsername();
SysUser user = userService.selectUserByUserName(username);
AjaxResult ajax = AjaxResult.success(user);
@ -63,24 +56,20 @@ public class SysProfileController extends BaseController
*/
@Log(title = "个人信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult updateProfile(@RequestBody SysUser user)
{
public AjaxResult updateProfile(@RequestBody SysUser user) {
LoginUser loginUser = SecurityUtils.getLoginUser();
SysUser currentUser = loginUser.getSysUser();
currentUser.setNickName(user.getNickName());
currentUser.setEmail(user.getEmail());
currentUser.setPhonenumber(user.getPhonenumber());
currentUser.setSex(user.getSex());
if (StringUtils.isNotEmpty(user.getPhonenumber()) && !userService.checkPhoneUnique(currentUser))
{
if (StringUtils.isNotEmpty(user.getPhonenumber()) && !userService.checkPhoneUnique(currentUser)) {
return error("修改用户'" + loginUser.getUsername() + "'失败,手机号码已存在");
}
if (StringUtils.isNotEmpty(user.getEmail()) && !userService.checkEmailUnique(currentUser))
{
if (StringUtils.isNotEmpty(user.getEmail()) && !userService.checkEmailUnique(currentUser)) {
return error("修改用户'" + loginUser.getUsername() + "'失败,邮箱账号已存在");
}
if (userService.updateUserProfile(currentUser) > 0)
{
if (userService.updateUserProfile(currentUser) > 0) {
// 更新缓存用户信息
tokenService.setLoginUser(loginUser);
return success();
@ -93,22 +82,18 @@ public class SysProfileController extends BaseController
*/
@Log(title = "个人信息", businessType = BusinessType.UPDATE)
@PutMapping("/updatePwd")
public AjaxResult updatePwd(String oldPassword, String newPassword)
{
public AjaxResult updatePwd(String oldPassword, String newPassword) {
String username = SecurityUtils.getUsername();
SysUser user = userService.selectUserByUserName(username);
String password = user.getPassword();
if (!SecurityUtils.matchesPassword(oldPassword, password))
{
if (!SecurityUtils.matchesPassword(oldPassword, password)) {
return error("修改密码失败,旧密码错误");
}
if (SecurityUtils.matchesPassword(newPassword, password))
{
if (SecurityUtils.matchesPassword(newPassword, password)) {
return error("新密码不能与旧密码相同");
}
newPassword = SecurityUtils.encryptPassword(newPassword);
if (userService.resetUserPwd(username, newPassword) > 0)
{
if (userService.resetUserPwd(username, newPassword) > 0) {
// 更新缓存用户密码
LoginUser loginUser = SecurityUtils.getLoginUser();
loginUser.getSysUser().setPassword(newPassword);
@ -123,24 +108,19 @@ public class SysProfileController extends BaseController
*/
@Log(title = "用户头像", businessType = BusinessType.UPDATE)
@PostMapping("/avatar")
public AjaxResult avatar(@RequestParam("avatarfile") MultipartFile file)
{
if (!file.isEmpty())
{
public AjaxResult avatar(@RequestParam("avatarfile") MultipartFile file) {
if (!file.isEmpty()) {
LoginUser loginUser = SecurityUtils.getLoginUser();
String extension = FileTypeUtils.getExtension(file);
if (!StringUtils.equalsAnyIgnoreCase(extension, MimeTypeUtils.IMAGE_EXTENSION))
{
if (!StringUtils.equalsAnyIgnoreCase(extension, MimeTypeUtils.IMAGE_EXTENSION)) {
return error("文件格式不正确,请上传" + Arrays.toString(MimeTypeUtils.IMAGE_EXTENSION) + "格式");
}
R<SysFile> fileResult = remoteFileService.upload(file);
if (StringUtils.isNull(fileResult) || StringUtils.isNull(fileResult.getData()))
{
R<SysFileInfo> fileResult = remoteFileService.upload(file);
if (StringUtils.isNull(fileResult) || StringUtils.isNull(fileResult.getData())) {
return error("文件服务异常,请联系管理员");
}
String url = fileResult.getData().getUrl();
if (userService.updateUserAvatar(loginUser.getUsername(), url))
{
if (userService.updateUserAvatar(loginUser.getUsername(), url)) {
AjaxResult ajax = AjaxResult.success();
ajax.put("imgUrl", url);
// 更新缓存用户头像

@ -0,0 +1,101 @@
package com.ruoyi.system.controller;
import com.ruoyi.common.core.utils.poi.ExcelUtil;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.core.web.page.TableDataInfo;
import com.ruoyi.common.log.annotation.Log;
import com.ruoyi.common.log.enums.BusinessType;
import com.ruoyi.common.security.annotation.RequiresPermissions;
import com.ruoyi.common.services.domain.SysSeqRule;
import com.ruoyi.system.service.ISysSeqRuleService;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* Controller
*
* @author ryas
* created on 2024-02-20
*/
@RestController
@RequestMapping("/SeqRule")
public class SysSeqRuleController extends BaseController {
@Autowired
private ISysSeqRuleService sysSeqRuleService;
/**
*
*/
@RequiresPermissions("system:SeqRule:list")
@GetMapping("/list")
public TableDataInfo list(SysSeqRule sysSeqRule) {
startPage();
List<SysSeqRule> list = sysSeqRuleService.selectSysSeqRuleList(sysSeqRule);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("system:SeqRule:export")
@Log(title = "序列号生成规则", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SysSeqRule sysSeqRule) {
List<SysSeqRule> list = sysSeqRuleService.selectSysSeqRuleList(sysSeqRule);
ExcelUtil<SysSeqRule> util = new ExcelUtil<>(SysSeqRule.class);
util.exportExcel(response, list, "序列号生成规则数据");
}
/**
*
*/
@RequiresPermissions("system:SeqRule:query")
@GetMapping(value = "/{ruleId}")
public AjaxResult getInfo(@PathVariable("ruleId") Long ruleId) {
return success(sysSeqRuleService.selectSysSeqRuleByRuleId(ruleId));
}
/**
*
*/
@RequiresPermissions("system:SeqRule:add")
@Log(title = "序列号生成规则", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SysSeqRule sysSeqRule) {
return toAjax(sysSeqRuleService.insertSysSeqRule(sysSeqRule));
}
/**
*
*/
@RequiresPermissions("system:SeqRule:edit")
@Log(title = "序列号生成规则", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SysSeqRule sysSeqRule) {
return toAjax(sysSeqRuleService.updateSysSeqRule(sysSeqRule));
}
/**
*
*/
@RequiresPermissions("system:SeqRule:remove")
@Log(title = "序列号生成规则", businessType = BusinessType.DELETE)
@DeleteMapping("/{ruleIds}")
public AjaxResult remove(@PathVariable Long[] ruleIds) {
return toAjax(sysSeqRuleService.deleteSysSeqRuleByRuleIds(ruleIds));
}
/**
*
*/
@RequiresPermissions("system:SeqRule:edit")
@Log(title = "序列号生成规则启用状态修改", businessType = BusinessType.UPDATE)
@PutMapping("/changeRuleEnableFlag")
public AjaxResult changeRuleEnableFlag(@RequestBody SysSeqRule sysSeqRule) {
return toAjax(sysSeqRuleService.updateEnableFlag(sysSeqRule));
}
}

@ -1,22 +1,22 @@
package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.SysConfig;
import java.util.List;
/**
*
*
* @author ruoyi
*/
public interface SysConfigMapper
{
public interface SysConfigMapper {
/**
*
*
* @param config
* @return
*/
public SysConfig selectConfig(SysConfig config);
SysConfig selectConfig(SysConfig config);
/**
* ID
@ -24,7 +24,7 @@ public interface SysConfigMapper
* @param configId ID
* @return
*/
public SysConfig selectConfigById(Long configId);
SysConfig selectConfigById(Long configId);
/**
*
@ -32,7 +32,7 @@ public interface SysConfigMapper
* @param config
* @return
*/
public List<SysConfig> selectConfigList(SysConfig config);
List<SysConfig> selectConfigList(SysConfig config);
/**
*
@ -40,7 +40,7 @@ public interface SysConfigMapper
* @param configKey
* @return
*/
public SysConfig checkConfigKeyUnique(String configKey);
SysConfig checkConfigKeyUnique(String configKey);
/**
*
@ -48,7 +48,7 @@ public interface SysConfigMapper
* @param config
* @return
*/
public int insertConfig(SysConfig config);
int insertConfig(SysConfig config);
/**
*
@ -56,7 +56,7 @@ public interface SysConfigMapper
* @param config
* @return
*/
public int updateConfig(SysConfig config);
int updateConfig(SysConfig config);
/**
*
@ -64,7 +64,7 @@ public interface SysConfigMapper
* @param configId ID
* @return
*/
public int deleteConfigById(Long configId);
int deleteConfigById(Long configId);
/**
*
@ -72,5 +72,5 @@ public interface SysConfigMapper
* @param configIds ID
* @return
*/
public int deleteConfigByIds(Long[] configIds);
int deleteConfigByIds(Long[] configIds);
}

@ -1,22 +1,22 @@
package com.ruoyi.system.service;
import java.util.List;
import com.ruoyi.system.domain.SysConfig;
import java.util.List;
/**
*
*
* @author ruoyi
*/
public interface ISysConfigService
{
public interface ISysConfigService {
/**
*
*
* @param configId ID
* @return
*/
public SysConfig selectConfigById(Long configId);
SysConfig selectConfigById(Long configId);
/**
*
@ -24,7 +24,7 @@ public interface ISysConfigService
* @param configKey
* @return
*/
public String selectConfigByKey(String configKey);
String selectConfigByKey(String configKey);
/**
*
@ -32,7 +32,7 @@ public interface ISysConfigService
* @param config
* @return
*/
public List<SysConfig> selectConfigList(SysConfig config);
List<SysConfig> selectConfigList(SysConfig config);
/**
*
@ -40,7 +40,7 @@ public interface ISysConfigService
* @param config
* @return
*/
public int insertConfig(SysConfig config);
int insertConfig(SysConfig config);
/**
*
@ -48,29 +48,29 @@ public interface ISysConfigService
* @param config
* @return
*/
public int updateConfig(SysConfig config);
int updateConfig(SysConfig config);
/**
*
*
* @param configIds ID
*/
public void deleteConfigByIds(Long[] configIds);
void deleteConfigByIds(Long[] configIds);
/**
*
*/
public void loadingConfigCache();
void loadingConfigCache();
/**
*
*/
public void clearConfigCache();
void clearConfigCache();
/**
*
*/
public void resetConfigCache();
void resetConfigCache();
/**
*
@ -78,5 +78,5 @@ public interface ISysConfigService
* @param config
* @return
*/
public boolean checkConfigKeyUnique(SysConfig config);
boolean checkConfigKeyUnique(SysConfig config);
}

@ -0,0 +1,69 @@
package com.ruoyi.system.service;
import com.ruoyi.common.services.domain.SysSeqRule;
import java.util.List;
/**
* Service
*
* @author ryas
* created on 2024-02-20
*/
public interface ISysSeqRuleService {
/**
*
*
* @param ruleId
* @return
*/
SysSeqRule selectSysSeqRuleByRuleId(Long ruleId);
/**
*
*
* @param sysSeqRule
* @return
*/
List<SysSeqRule> selectSysSeqRuleList(SysSeqRule sysSeqRule);
/**
*
*
* @param sysSeqRule
* @return
*/
int insertSysSeqRule(SysSeqRule sysSeqRule);
/**
*
*
* @param sysSeqRule
* @return
*/
int updateSysSeqRule(SysSeqRule sysSeqRule);
/**
*
*
* @param ruleIds
* @return
*/
int deleteSysSeqRuleByRuleIds(Long[] ruleIds);
/**
*
*
* @param ruleId
* @return
*/
int deleteSysSeqRuleByRuleId(Long ruleId);
/**
*
*
* @param rule
* @return
*/
int updateEnableFlag(SysSeqRule rule);
}

@ -10,7 +10,7 @@ import com.ruoyi.system.domain.SysConfig;
import com.ruoyi.system.mapper.SysConfigMapper;
import com.ruoyi.system.service.ISysConfigService;
import jakarta.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import java.util.Collection;
@ -23,10 +23,10 @@ import java.util.List;
*/
@Service
public class SysConfigServiceImpl implements ISysConfigService {
@Autowired
@Resource
private SysConfigMapper configMapper;
@Autowired
@Resource
private RedisService redisService;
/**

@ -0,0 +1,132 @@
package com.ruoyi.system.service.impl;
import com.ruoyi.common.core.utils.StringUtils;
import com.ruoyi.common.services.domain.SysSeqRule;
import com.ruoyi.common.services.mapper.SysSeqRuleDynamicSqlSupport;
import com.ruoyi.common.services.mapper.SysSeqRuleMapper;
import com.ruoyi.system.service.ISysSeqRuleService;
import org.mybatis.dynamic.sql.SqlBuilder;
import org.mybatis.dynamic.sql.delete.render.DeleteStatementProvider;
import org.mybatis.dynamic.sql.render.RenderingStrategies;
import org.mybatis.dynamic.sql.select.SelectDSLCompleter;
import org.mybatis.dynamic.sql.select.render.SelectStatementProvider;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Optional;
/**
* Service
*
* @author ryas
* created on 2024-02-20
*/
@Service
public class SysSeqRuleServiceImpl implements ISysSeqRuleService {
@Autowired
private SysSeqRuleMapper sysSeqRuleMapper;
/**
*
*
* @param ruleId
* @return
*/
@Override
public SysSeqRule selectSysSeqRuleByRuleId(Long ruleId) {
Optional<SysSeqRule> result = sysSeqRuleMapper.selectOne(dsl -> dsl.where(SysSeqRuleDynamicSqlSupport.ruleId, SqlBuilder.isEqualTo(ruleId)));
return result.orElse(null);
}
/**
*
*
* @param sysSeqRule
* @return
*/
@Override
public List<SysSeqRule> selectSysSeqRuleList(SysSeqRule sysSeqRule) {
if (StringUtils.isNotBlank(sysSeqRule.getRuleName()) || StringUtils.isNotBlank(sysSeqRule.getSeqDistCd())) {
//条件查询
SelectStatementProvider provider = SqlBuilder.select(SysSeqRuleMapper.selectList)
.from(SysSeqRuleDynamicSqlSupport.sysSeqRule)
.where(SysSeqRuleDynamicSqlSupport.seqDistCd, SqlBuilder.isEqualToWhenPresent(sysSeqRule.getSeqDistCd()))
.and(SysSeqRuleDynamicSqlSupport.ruleName, SqlBuilder.isLikeWhenPresent(sysSeqRule.getRuleName() == null ? null : "%" + sysSeqRule.getRuleName() + "%"))
.build()
.render(RenderingStrategies.MYBATIS3);
return sysSeqRuleMapper.selectMany(provider);
} else {
//全部查询
return sysSeqRuleMapper.select(SelectDSLCompleter.allRows());
}
}
/**
*
*
* @param sysSeqRule
* @return
*/
@Transactional
@Override
public int insertSysSeqRule(SysSeqRule sysSeqRule) {
return sysSeqRuleMapper.insertSelective(sysSeqRule);
}
/**
*
*
* @param sysSeqRule
* @return
*/
@Transactional
@Override
public int updateSysSeqRule(SysSeqRule sysSeqRule) {
return sysSeqRuleMapper.updateByPrimaryKeySelective(sysSeqRule);
}
/**
*
*
* @param ruleIds
* @return
*/
@Transactional
@Override
public int deleteSysSeqRuleByRuleIds(Long[] ruleIds) {
DeleteStatementProvider provider = SqlBuilder.deleteFrom(SysSeqRuleDynamicSqlSupport.sysSeqRule)
.where(SysSeqRuleDynamicSqlSupport.ruleId, SqlBuilder.isIn(ruleIds))
.build()
.render(RenderingStrategies.MYBATIS3);
return sysSeqRuleMapper.delete(provider);
}
/**
*
*
* @param ruleId
* @return
*/
@Transactional
@Override
public int deleteSysSeqRuleByRuleId(Long ruleId) {
return sysSeqRuleMapper.deleteByPrimaryKey(ruleId);
}
/**
*
*
* @param rule
* @return
*/
@Transactional
@Override
public int updateEnableFlag(SysSeqRule rule) {
SysSeqRule updateRule = new SysSeqRule();
updateRule.setRuleId(rule.getRuleId());
updateRule.setEnableFlag(rule.getEnableFlag());
return sysSeqRuleMapper.updateByPrimaryKeySelective(updateRule);
}
}

@ -0,0 +1,18 @@
import request from '@/utils/request'
// 查询文件存储记录列表
export function listFileRecord(query) {
return request({
url: '/file/FileRecord/list',
method: 'get',
params: query
})
}
// 查询文件存储记录详细
export function getFileRecord(fileId) {
return request({
url: '/file/FileRecord/' + fileId,
method: 'get'
})
}

@ -0,0 +1,57 @@
import request from '@/utils/request'
// 查询序列号生成规则列表
export function listSeqRule(query) {
return request({
url: '/system/SeqRule/list',
method: 'get',
params: query
})
}
// 查询序列号生成规则详细
export function getSeqRule(ruleId) {
return request({
url: '/system/SeqRule/' + ruleId,
method: 'get'
})
}
// 新增序列号生成规则
export function addSeqRule(data) {
return request({
url: '/system/SeqRule',
method: 'post',
data: data
})
}
// 修改序列号生成规则
export function updateSeqRule(data) {
return request({
url: '/system/SeqRule',
method: 'put',
data: data
})
}
// 删除序列号生成规则
export function delSeqRule(ruleId) {
return request({
url: '/system/SeqRule/' + ruleId,
method: 'delete'
})
}
// 规则启用状态修改
export function changeRuleEnableFlag(ruleId, enableFlag) {
const data = {
ruleId,
enableFlag,
}
return request({
url: '/system/SeqRule/changeRuleEnableFlag',
method: 'put',
data: data
})
}

@ -0,0 +1,160 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="文件ID" prop="fileId">
<el-input
v-model="queryParams.fileId"
placeholder="请输入文件ID"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="原始文件名" prop="originalName">
<el-input
v-model="queryParams.originalName"
placeholder="请输入原始文件名称"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery"></el-button>
<el-button icon="Refresh" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="Download"
@click="handleExport"
v-hasPermi="['file:FileRecord:export']"
>导出</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="FileRecordList" @selection-change="handleSelectionChange" show-overflow-tooltip="true">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="文件ID" align="center" prop="fileId" />
<el-table-column label="保存文件名" align="center" prop="savedName" />
<el-table-column label="原始文件名" align="center" prop="originalName" />
<el-table-column label="文件路径" align="center" prop="filePath" />
<el-table-column label="文件后缀" align="center" prop="extension" />
<el-table-column label="存储方式" align="center" prop="storageType" />
<el-table-column label="获取文件的URL" align="center" prop="requestUrl" />
<el-table-column label="文件大小(Byte)" align="center" prop="fileSize" />
<el-table-column label="创建者" align="center" prop="createBy" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template #default="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="更新者" align="center" prop="updateBy" />
<el-table-column label="更新时间" align="center" prop="updateTime" width="180">
<template #default="scope">
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script setup name="FileRecord">
import { listFileRecord, getFileRecord } from "@/api/file/FileRecord";
const { proxy } = getCurrentInstance();
const FileRecordList = ref([]);
const open = ref(false);
const loading = ref(false);
const showSearch = ref(true);
const ids = ref([]);
const single = ref(true);
const multiple = ref(true);
const total = ref(0);
const title = ref("");
const data = reactive({
form: {},
queryParams: {
pageNum: 1,
pageSize: 10,
fileId: null,
savedName: null,
originalName: null,
},
rules: {
}
});
const { queryParams, form, rules } = toRefs(data);
/** 查询文件存储记录列表 */
function getList() {
loading.value = true;
listFileRecord(queryParams.value).then(response => {
FileRecordList.value = response.rows;
total.value = response.total;
loading.value = false;
});
}
//
function cancel() {
open.value = false;
reset();
}
//
function reset() {
form.value = {
fileId: null,
savedName: null,
originalName: null,
filePath: null,
extension: null,
storageType: null,
requestUrl: null,
fileSize: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
remark: null
};
proxy.resetForm("FileRecordRef");
}
/** 搜索按钮操作 */
function handleQuery() {
queryParams.value.pageNum = 1;
getList();
}
/** 重置按钮操作 */
function resetQuery() {
proxy.resetForm("queryRef");
handleQuery();
}
//
function handleSelectionChange(selection) {
ids.value = selection.map(item => item.fileId);
single.value = selection.length != 1;
multiple.value = !selection.length;
}
//
//getList();
</script>

@ -0,0 +1,337 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="序列号识别码" prop="seqDistCd">
<el-input
v-model="queryParams.seqDistCd"
placeholder="请输入序列号识别码"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="规则名称" prop="ruleName">
<el-input
v-model="queryParams.ruleName"
placeholder="请输入规则名称"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery"></el-button>
<el-button icon="Refresh" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="Plus"
@click="handleAdd"
v-hasPermi="['system:SeqRule:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="Edit"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:SeqRule:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="Delete"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:SeqRule:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="Download"
@click="handleExport"
v-hasPermi="['system:SeqRule:export']"
>导出</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="SeqRuleList" @selection-change="handleSelectionChange" show-overflow-tooltip="true">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="规则ID" align="center" prop="ruleId" />
<el-table-column label="序列号识别码" align="center" prop="seqDistCd" />
<el-table-column label="规则名称" align="center" prop="ruleName" />
<el-table-column label="前缀" align="center" prop="prefix" />
<el-table-column label="分隔符1" align="center" prop="separator1" />
<el-table-column label="日期格式" align="center" prop="dateFormat" />
<el-table-column label="最小位数" align="center" prop="minDigits" />
<el-table-column label="分隔符2" align="center" prop="separator2" />
<el-table-column label="生成器名" align="center" prop="generatorName" />
<el-table-column label="状态" align="center" width="100">
<template #default="scope">
<el-switch
v-model="scope.row.enableFlag"
:active-value="1"
:inactive-value="0"
@change="handleStatusChange(scope.row)"
></el-switch>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:SeqRule:edit']"></el-button>
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:SeqRule:remove']"></el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改序列号生成规则对话框 -->
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
<el-form ref="SeqRuleRef" :model="form" :rules="rules" label-width="110px">
<el-form-item label="序列号识别码" prop="seqDistCd">
<el-input v-model="form.seqDistCd" placeholder="请输入序列号识别码" />
</el-form-item>
<el-form-item label="规则名称" prop="ruleName">
<el-input v-model="form.ruleName" placeholder="请输入规则名称" />
</el-form-item>
<el-form-item label="前缀" prop="prefix">
<el-input v-model="form.prefix" placeholder="请输入前缀" />
</el-form-item>
<el-form-item label="分隔符1" prop="separator1">
<el-input v-model="form.separator1" placeholder="请输入分隔符1" />
</el-form-item>
<el-form-item label="日期格式" prop="dateFormat">
<el-input v-model="form.dateFormat" placeholder="请输入日期格式" />
</el-form-item>
<el-form-item label="最小位数" prop="minDigits">
<el-input-number v-model="form.minDigits" placeholder="请输入最小位数" />
</el-form-item>
<el-form-item label="分隔符2" prop="separator2">
<el-input v-model="form.separator2" placeholder="请输入分隔符2" />
</el-form-item>
<el-form-item label="生成器名" prop="generatorName">
<el-input v-model="form.generatorName" placeholder="请输入生成器名" />
</el-form-item>
<el-form-item label="状态" prop="enableFlag">
<el-radio-group v-model="form.enableFlag">
<el-radio
v-for="dict in sys_normal_disable"
:key="dict.value"
:label="dict.value"
>{{ dict.label }}</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script setup name="SeqRule">
import { listSeqRule, getSeqRule, delSeqRule, addSeqRule, updateSeqRule, changeRuleEnableFlag } from "@/api/system/SeqRule";
const { proxy } = getCurrentInstance();
const { sys_normal_disable } = proxy.useDict("sys_normal_disable");
const SeqRuleList = ref([]);
const open = ref(false);
const loading = ref(false);
const showSearch = ref(true);
const ids = ref([]);
const single = ref(true);
const multiple = ref(true);
const total = ref(0);
const title = ref("");
const onSelecting = ref(false)
const data = reactive({
form: {},
queryParams: {
pageNum: 1,
pageSize: 10,
seqDistCd: null,
ruleName: null,
},
rules: {
seqDistCd: [
{ required: true, message: "序列号识别码不能为空", trigger: "blur" }
],
ruleName: [
{ required: true, message: "规则名称不能为空", trigger: "blur" }
],
prefix: [
{ required: true, message: "前缀不能为空", trigger: "blur" }
],
minDigits: [
{ required: true, message: "序列号数字部分的最小位数不足补0不能为空", trigger: "blur" }
],
enableFlag: [
{ required: true, message: "是否启用不能为空", trigger: "blur" }
],
}
});
const { queryParams, form, rules } = toRefs(data);
/** 查询序列号生成规则列表 */
function getList() {
loading.value = true;
onSelecting.value = true;
listSeqRule(queryParams.value).then(response => {
SeqRuleList.value = response.rows;
total.value = response.total;
}).finally(() => {
loading.value = false;
onSelecting.value = false;
});
}
//
function cancel() {
open.value = false;
reset();
}
//
function reset() {
form.value = {
ruleId: null,
seqDistCd: null,
ruleName: null,
prefix: null,
separator1: null,
dateFormat: null,
minDigits: null,
separator2: null,
generatorName: null,
enableFlag: null,
remark1: null,
remark2: null,
remark3: null,
remark4: null,
remark5: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
remark: null
};
proxy.resetForm("SeqRuleRef");
}
/** 搜索按钮操作 */
function handleQuery() {
queryParams.value.pageNum = 1;
getList();
}
/** 重置按钮操作 */
function resetQuery() {
proxy.resetForm("queryRef");
handleQuery();
}
//
function handleSelectionChange(selection) {
ids.value = selection.map(item => item.ruleId);
single.value = selection.length != 1;
multiple.value = !selection.length;
}
/** 新增按钮操作 */
function handleAdd() {
reset();
open.value = true;
title.value = "添加序列号生成规则";
}
/** 修改按钮操作 */
function handleUpdate(row) {
reset();
const _ruleId = row.ruleId || ids.value
getSeqRule(_ruleId).then(response => {
form.value = response.data;
open.value = true;
title.value = "修改序列号生成规则";
});
}
/** 提交按钮 */
function submitForm() {
proxy.$refs["SeqRuleRef"].validate(valid => {
if (valid) {
if (form.value.ruleId != null) {
updateSeqRule(form.value).then(response => {
proxy.$modal.msgSuccess("修改成功");
open.value = false;
getList();
});
} else {
addSeqRule(form.value).then(response => {
proxy.$modal.msgSuccess("新增成功");
open.value = false;
getList();
});
}
}
});
}
/** 删除按钮操作 */
function handleDelete(row) {
const _ruleIds = row.ruleId || ids.value;
proxy.$modal.confirm('是否确认删除序列号生成规则编号为"' + _ruleIds + '"的数据项?').then(function() {
return delSeqRule(_ruleIds);
}).then(() => {
getList();
proxy.$modal.msgSuccess("删除成功");
}).catch(() => {});
}
/** 导出按钮操作 */
function handleExport() {
proxy.download('system/SeqRule/export', {
...queryParams.value
}, `SeqRule_${new Date().getTime()}.xlsx`)
}
/** 启用状态修改 */
function handleStatusChange(row) {
if (onSelecting.value) {
return
}
let text = row.enableFlag === "0" ? "启用" : "停用";
proxy.$modal.confirm('确认要' + text + '规则吗?').then(() => {
return changeRuleEnableFlag(row.ruleId, row.enableFlag);
}).then(() => {
proxy.$modal.msgSuccess(text + "成功");
}).catch(() => {
row.enableFlag = row.enableFlag === "0" ? "1" : "0";
});
}
//
//getList();
</script>

@ -11,7 +11,7 @@
Target Server Version : 80200 (8.2.0)
File Encoding : 65001
Date: 19/02/2024 15:55:14
Date: 20/02/2024 11:16:45
*/
SET NAMES utf8mb4;
@ -151,7 +151,7 @@ CREATE TABLE `gen_table` (
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`table_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 13 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '代码生成业务表' ROW_FORMAT = DYNAMIC;
) ENGINE = InnoDB AUTO_INCREMENT = 15 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '代码生成业务表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of gen_table
@ -159,6 +159,8 @@ CREATE TABLE `gen_table` (
INSERT INTO `gen_table` VALUES (9, 'WMS_M_UNIT_INFO', '单位基础信息表', NULL, NULL, 'UnitInfo', 'crud', 'element-plus', 'mybatis-dynamic', 'com.ruoyi.wms', 'wms', 'UnitInfo', '单位信息管理', 'ryas', '0', '/', '{\"parentMenuId\":\"2000\"}', 'admin', '2024-02-18 07:22:15', '', '2024-02-18 08:07:26', NULL);
INSERT INTO `gen_table` VALUES (10, 'WMS_M_GOODS_TYPE_INFO', '物品类型表', NULL, NULL, 'GoodsType', 'crud', 'element-plus', 'mybatis-dynamic', 'com.ruoyi.wms', 'wms', 'GoodsType', '物品类型管理', 'ryas', '0', '/', '{\"parentMenuId\":\"2000\"}', 'admin', '2024-02-18 07:27:46', '', '2024-02-18 08:17:23', NULL);
INSERT INTO `gen_table` VALUES (12, 'WMS_M_WAREHOUSE_INFO', '仓库基础信息表', NULL, NULL, 'WarehouseInfo', 'crud', 'element-plus', 'mybatis-dynamic', 'com.ruoyi.wms', 'wms', 'WarehouseInfo', '仓库基础信息', 'ryas', '0', '/', '{\"parentMenuId\":2000}', 'admin', '2024-02-18 08:02:20', '', '2024-02-18 08:07:04', NULL);
INSERT INTO `gen_table` VALUES (13, 'sys_file', '文件存储记录表', NULL, NULL, 'SysFile', 'crud', 'element-plus', 'mybatis-dynamic', 'com.ruoyi.file', 'file', 'FileRecord', '文件存储记录', 'ryas', '0', '/', '{\"parentMenuId\":\"1\"}', 'admin', '2024-02-19 10:01:22', '', '2024-02-19 10:08:14', NULL);
INSERT INTO `gen_table` VALUES (14, 'sys_seq_rule', '序列号生成规则表', NULL, NULL, 'SysSeqRule', 'crud', 'element-plus', 'mybatis-dynamic', 'com.ruoyi.system', 'system', 'SeqRule', '序列号生成规则', 'ryas', '0', '/', '{\"parentMenuId\":1}', 'admin', '2024-02-19 10:01:22', '', '2024-02-20 02:07:26', NULL);
-- ----------------------------
-- Table structure for gen_table_column
@ -188,7 +190,7 @@ CREATE TABLE `gen_table_column` (
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '' COMMENT '更新者',
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`column_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 226 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '代码生成业务表字段' ROW_FORMAT = DYNAMIC;
) ENGINE = InnoDB AUTO_INCREMENT = 259 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '代码生成业务表字段' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of gen_table_column
@ -251,28 +253,39 @@ INSERT INTO `gen_table_column` VALUES (222, 12, 'create_time', '创建时间', '
INSERT INTO `gen_table_column` VALUES (223, 12, 'update_by', '更新者', 'varchar(64)', 'String', 'updateBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 26, 'admin', '2024-02-18 08:02:21', '', '2024-02-18 08:07:05');
INSERT INTO `gen_table_column` VALUES (224, 12, 'update_time', '更新时间', 'datetime', 'Date', 'updateTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 27, 'admin', '2024-02-18 08:02:21', '', '2024-02-18 08:07:05');
INSERT INTO `gen_table_column` VALUES (225, 12, 'remark', '备注', 'varchar(500)', 'String', 'remark', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'textarea', '', 28, 'admin', '2024-02-18 08:02:21', '', '2024-02-18 08:07:05');
-- ----------------------------
-- Table structure for sys_common
-- ----------------------------
DROP TABLE IF EXISTS `sys_common`;
CREATE TABLE `sys_common` (
`config_id` int NOT NULL AUTO_INCREMENT COMMENT '参数主键',
`config_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '' COMMENT '参数名称',
`config_key` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '' COMMENT '参数键名',
`config_value` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '' COMMENT '参数键值',
`config_type` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT 'N' COMMENT '系统内置Y是 N否',
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '' COMMENT '创建者',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '' COMMENT '更新者',
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`config_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 100 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '参数配置表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sys_common
-- ----------------------------
INSERT INTO `gen_table_column` VALUES (226, 13, 'file_id', '文件ID', 'varchar(50)', 'String', 'fileId', '1', '0', NULL, '0', NULL, '1', '1', 'EQ', 'input', '', 1, 'admin', '2024-02-19 10:01:22', '', '2024-02-19 10:08:14');
INSERT INTO `gen_table_column` VALUES (227, 13, 'saved_name', '保存的文件名称', 'varchar(255)', 'String', 'savedName', '0', '0', '0', '0', '0', '1', '1', 'LIKE', 'input', '', 2, 'admin', '2024-02-19 10:01:22', '', '2024-02-19 10:08:14');
INSERT INTO `gen_table_column` VALUES (228, 13, 'original_name', '原始文件名称', 'varchar(255)', 'String', 'originalName', '0', '0', '0', '0', '0', '1', '1', 'LIKE', 'input', '', 3, 'admin', '2024-02-19 10:01:22', '', '2024-02-19 10:08:14');
INSERT INTO `gen_table_column` VALUES (229, 13, 'file_path', '文件路径', 'varchar(500)', 'String', 'filePath', '0', '0', '0', '0', '0', '1', '0', 'EQ', 'textarea', '', 4, 'admin', '2024-02-19 10:01:22', '', '2024-02-19 10:08:14');
INSERT INTO `gen_table_column` VALUES (230, 13, 'extension', '文件后缀', 'varchar(50)', 'String', 'extension', '0', '0', '0', '0', '0', '1', '0', 'EQ', 'input', '', 5, 'admin', '2024-02-19 10:01:22', '', '2024-02-19 10:08:15');
INSERT INTO `gen_table_column` VALUES (231, 13, 'storage_type', '存储方式', 'varchar(50)', 'String', 'storageType', '0', '0', '0', '0', '0', '1', '0', 'EQ', 'select', '', 6, 'admin', '2024-02-19 10:01:22', '', '2024-02-19 10:08:15');
INSERT INTO `gen_table_column` VALUES (232, 13, 'request_url', '获取文件的URL', 'varchar(255)', 'String', 'requestUrl', '0', '0', '0', '0', '0', '1', '0', 'EQ', 'input', '', 7, 'admin', '2024-02-19 10:01:22', '', '2024-02-19 10:08:15');
INSERT INTO `gen_table_column` VALUES (233, 13, 'file_size', '文件大小(Byte)', 'bigint', 'Long', 'fileSize', '0', '0', '0', '0', '0', '1', '0', 'EQ', 'input', '', 8, 'admin', '2024-02-19 10:01:22', '', '2024-02-19 10:08:15');
INSERT INTO `gen_table_column` VALUES (234, 13, 'create_by', '创建者', 'varchar(64)', 'String', 'createBy', '0', '0', NULL, NULL, NULL, '1', NULL, 'EQ', 'input', '', 9, 'admin', '2024-02-19 10:01:22', '', '2024-02-19 10:08:15');
INSERT INTO `gen_table_column` VALUES (235, 13, 'create_time', '创建时间', 'datetime', 'Date', 'createTime', '0', '0', NULL, NULL, NULL, '1', NULL, 'EQ', 'datetime', '', 10, 'admin', '2024-02-19 10:01:22', '', '2024-02-19 10:08:15');
INSERT INTO `gen_table_column` VALUES (236, 13, 'update_by', '更新者', 'varchar(64)', 'String', 'updateBy', '0', '0', NULL, NULL, NULL, '1', NULL, 'EQ', 'input', '', 11, 'admin', '2024-02-19 10:01:22', '', '2024-02-19 10:08:15');
INSERT INTO `gen_table_column` VALUES (237, 13, 'update_time', '更新时间', 'datetime', 'Date', 'updateTime', '0', '0', NULL, NULL, NULL, '1', NULL, 'EQ', 'datetime', '', 12, 'admin', '2024-02-19 10:01:22', '', '2024-02-19 10:08:15');
INSERT INTO `gen_table_column` VALUES (238, 13, 'remark', '备注', 'varchar(500)', 'String', 'remark', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'textarea', '', 13, 'admin', '2024-02-19 10:01:22', '', '2024-02-19 10:08:15');
INSERT INTO `gen_table_column` VALUES (239, 14, 'rule_id', '规则ID', 'bigint', 'Long', 'ruleId', '1', '0', NULL, '0', NULL, NULL, NULL, 'EQ', 'input', '', 1, 'admin', '2024-02-19 10:01:22', '', '2024-02-20 02:07:26');
INSERT INTO `gen_table_column` VALUES (240, 14, 'seq_dist_cd', '序列号识别码', 'varchar(30)', 'String', 'seqDistCd', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 2, 'admin', '2024-02-19 10:01:22', '', '2024-02-20 02:07:26');
INSERT INTO `gen_table_column` VALUES (241, 14, 'rule_name', '规则名称', 'varchar(50)', 'String', 'ruleName', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 3, 'admin', '2024-02-19 10:01:22', '', '2024-02-20 02:07:26');
INSERT INTO `gen_table_column` VALUES (242, 14, 'prefix', '前缀', 'varchar(50)', 'String', 'prefix', '0', '0', '1', '1', '1', '1', '0', 'EQ', 'input', '', 4, 'admin', '2024-02-19 10:01:22', '', '2024-02-20 02:07:26');
INSERT INTO `gen_table_column` VALUES (243, 14, 'separator1', '分隔符1', 'varchar(50)', 'String', 'separator1', '0', '0', NULL, '1', '1', '1', '0', 'EQ', 'input', '', 5, 'admin', '2024-02-19 10:01:22', '', '2024-02-20 02:07:26');
INSERT INTO `gen_table_column` VALUES (244, 14, 'date_format', '日期格式', 'varchar(30)', 'String', 'dateFormat', '0', '0', NULL, '1', '1', '1', '0', 'EQ', 'input', '', 6, 'admin', '2024-02-19 10:01:22', '', '2024-02-20 02:07:26');
INSERT INTO `gen_table_column` VALUES (245, 14, 'min_digits', '序列号数字部分的最小位数不足补0', 'int', 'Long', 'minDigits', '0', '0', '1', '1', '1', '1', '0', 'EQ', 'input', '', 7, 'admin', '2024-02-19 10:01:22', '', '2024-02-20 02:07:26');
INSERT INTO `gen_table_column` VALUES (246, 14, 'separator2', '分隔符2', 'varchar(50)', 'String', 'separator2', '0', '0', NULL, '1', '1', '1', '0', 'EQ', 'input', '', 8, 'admin', '2024-02-19 10:01:22', '', '2024-02-20 02:07:26');
INSERT INTO `gen_table_column` VALUES (247, 14, 'generator_name', '生成器名称(或类全名),自定义的生成器可忽略前面的规则自行生成', 'varchar(255)', 'String', 'generatorName', '0', '0', NULL, '1', '1', '1', '0', 'LIKE', 'input', '', 9, 'admin', '2024-02-19 10:01:22', '', '2024-02-20 02:07:26');
INSERT INTO `gen_table_column` VALUES (248, 14, 'enable_flag', '是否启用', 'int', 'Long', 'enableFlag', '0', '0', '1', '1', '1', '1', '0', 'EQ', 'input', '', 10, 'admin', '2024-02-19 10:01:22', '', '2024-02-20 02:07:26');
INSERT INTO `gen_table_column` VALUES (249, 14, 'remark_1', '备注1', 'varchar(100)', 'String', 'remark1', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 11, 'admin', '2024-02-19 10:01:22', '', '2024-02-20 02:07:26');
INSERT INTO `gen_table_column` VALUES (250, 14, 'remark_2', '备注2', 'varchar(100)', 'String', 'remark2', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 12, 'admin', '2024-02-19 10:01:22', '', '2024-02-20 02:07:26');
INSERT INTO `gen_table_column` VALUES (251, 14, 'remark_3', '备注3', 'varchar(100)', 'String', 'remark3', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 13, 'admin', '2024-02-19 10:01:22', '', '2024-02-20 02:07:26');
INSERT INTO `gen_table_column` VALUES (252, 14, 'remark_4', '备注4', 'varchar(100)', 'String', 'remark4', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 14, 'admin', '2024-02-19 10:01:22', '', '2024-02-20 02:07:26');
INSERT INTO `gen_table_column` VALUES (253, 14, 'remark_5', '备注5', 'varchar(100)', 'String', 'remark5', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 15, 'admin', '2024-02-19 10:01:23', '', '2024-02-20 02:07:26');
INSERT INTO `gen_table_column` VALUES (254, 14, 'create_by', '创建者', 'varchar(64)', 'String', 'createBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 16, 'admin', '2024-02-19 10:01:23', '', '2024-02-20 02:07:27');
INSERT INTO `gen_table_column` VALUES (255, 14, 'create_time', '创建时间', 'datetime', 'Date', 'createTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 17, 'admin', '2024-02-19 10:01:23', '', '2024-02-20 02:07:27');
INSERT INTO `gen_table_column` VALUES (256, 14, 'update_by', '更新者', 'varchar(64)', 'String', 'updateBy', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 18, 'admin', '2024-02-19 10:01:23', '', '2024-02-20 02:07:27');
INSERT INTO `gen_table_column` VALUES (257, 14, 'update_time', '更新时间', 'datetime', 'Date', 'updateTime', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'datetime', '', 19, 'admin', '2024-02-19 10:01:23', '', '2024-02-20 02:07:27');
INSERT INTO `gen_table_column` VALUES (258, 14, 'remark', '备注', 'varchar(500)', 'String', 'remark', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'textarea', '', 20, 'admin', '2024-02-19 10:01:23', '', '2024-02-20 02:07:27');
-- ----------------------------
-- Table structure for sys_config
@ -448,7 +461,7 @@ CREATE TABLE `sys_file` (
-- ----------------------------
-- Records of sys_file
-- ----------------------------
INSERT INTO `sys_file` VALUES ('20240219155008A001', '20240219155008A001.png', 'AGVCar02.png', 'D:\\temp\\ruoyi\\uploadPath\\2024\\02\\19\\20240219155008A001.png', 'png', 'LOCAL', 'http://127.0.0.1:9300/statics/2024/02/19/20240219155008A001.png', 330857, '1', '2024-02-19 15:50:17', '1', '2024-02-19 15:50:17', '示例数据');
INSERT INTO `sys_file` VALUES ('20240219155008A001', '20240219155008A001.png', 'AGVCar02.png', 'D:\\temp\\RYAS\\uploadPath\\2024\\02\\19\\20240219155008A001.png', 'png', 'LOCAL', 'http://127.0.0.1:9300/statics/2024/02/19/20240219155008A001.png', 330857, '1', '2024-02-19 15:50:17', '1', '2024-02-19 15:50:17', '示例数据');
-- ----------------------------
-- Table structure for sys_job
@ -512,7 +525,7 @@ CREATE TABLE `sys_logininfor` (
PRIMARY KEY (`info_id`) USING BTREE,
INDEX `idx_sys_logininfor_s`(`status` ASC) USING BTREE,
INDEX `idx_sys_logininfor_lt`(`access_time` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 139 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '系统访问记录' ROW_FORMAT = Dynamic;
) ENGINE = InnoDB AUTO_INCREMENT = 148 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '系统访问记录' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sys_logininfor
@ -543,7 +556,7 @@ CREATE TABLE `sys_menu` (
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '' COMMENT '备注',
PRIMARY KEY (`menu_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2025 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '菜单权限表' ROW_FORMAT = Dynamic;
) ENGINE = InnoDB AUTO_INCREMENT = 2034 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '菜单权限表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sys_menu
@ -650,6 +663,15 @@ INSERT INTO `sys_menu` VALUES (2021, '仓库基础信息新增', 2019, 2, '#', '
INSERT INTO `sys_menu` VALUES (2022, '仓库基础信息修改', 2019, 3, '#', '', NULL, 1, 0, 'F', '0', '0', 'wms:WarehouseInfo:edit', '#', 'admin', '2024-02-18 08:34:10', '', NULL, '');
INSERT INTO `sys_menu` VALUES (2023, '仓库基础信息删除', 2019, 4, '#', '', NULL, 1, 0, 'F', '0', '0', 'wms:WarehouseInfo:remove', '#', 'admin', '2024-02-18 08:34:10', '', NULL, '');
INSERT INTO `sys_menu` VALUES (2024, '仓库基础信息导出', 2019, 5, '#', '', NULL, 1, 0, 'F', '0', '0', 'wms:WarehouseInfo:export', '#', 'admin', '2024-02-18 08:34:10', '', NULL, '');
INSERT INTO `sys_menu` VALUES (2025, '文件存储记录', 1, 10, 'FileRecord', 'file/FileRecord/index', NULL, 1, 0, 'C', '0', '0', 'file:FileRecord:list', 'documentation', 'admin', '2024-02-19 10:19:23', '1', '2024-02-19 10:25:26', '文件存储记录菜单');
INSERT INTO `sys_menu` VALUES (2026, '文件存储记录查询', 2025, 1, '#', '', NULL, 1, 0, 'F', '0', '0', 'file:FileRecord:query', '#', 'admin', '2024-02-19 10:19:23', '', NULL, '');
INSERT INTO `sys_menu` VALUES (2027, '文件存储记录导出', 2025, 5, '#', '', NULL, 1, 0, 'F', '0', '0', 'file:FileRecord:export', '#', 'admin', '2024-02-19 10:19:23', '', NULL, '');
INSERT INTO `sys_menu` VALUES (2028, '序列号生成规则', 1, 11, 'SeqRule', 'system/SeqRule/index', NULL, 1, 0, 'C', '0', '0', 'system:SeqRule:list', 'number', 'admin', '2024-02-20 02:05:15', '1', '2024-02-20 02:08:58', '序列号生成规则菜单');
INSERT INTO `sys_menu` VALUES (2029, '序列号生成规则查询', 2028, 1, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:SeqRule:query', '#', 'admin', '2024-02-20 02:05:15', '', NULL, '');
INSERT INTO `sys_menu` VALUES (2030, '序列号生成规则新增', 2028, 2, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:SeqRule:add', '#', 'admin', '2024-02-20 02:05:15', '', NULL, '');
INSERT INTO `sys_menu` VALUES (2031, '序列号生成规则修改', 2028, 3, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:SeqRule:edit', '#', 'admin', '2024-02-20 02:05:15', '', NULL, '');
INSERT INTO `sys_menu` VALUES (2032, '序列号生成规则删除', 2028, 4, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:SeqRule:remove', '#', 'admin', '2024-02-20 02:05:15', '', NULL, '');
INSERT INTO `sys_menu` VALUES (2033, '序列号生成规则导出', 2028, 5, '#', '', NULL, 1, 0, 'F', '0', '0', 'system:SeqRule:export', '#', 'admin', '2024-02-20 02:05:15', '', NULL, '');
-- ----------------------------
-- Table structure for sys_notice
@ -701,7 +723,7 @@ CREATE TABLE `sys_oper_log` (
INDEX `idx_sys_oper_log_bt`(`business_type` ASC) USING BTREE,
INDEX `idx_sys_oper_log_s`(`status` ASC) USING BTREE,
INDEX `idx_sys_oper_log_ot`(`oper_time` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 215 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '操作日志记录' ROW_FORMAT = Dynamic;
) ENGINE = InnoDB AUTO_INCREMENT = 229 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '操作日志记录' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sys_oper_log
@ -880,7 +902,7 @@ INSERT INTO `sys_role_menu` VALUES (2, 1060);
-- ----------------------------
DROP TABLE IF EXISTS `sys_seq_result`;
CREATE TABLE `sys_seq_result` (
`seq_id` bigint(20) UNSIGNED ZEROFILL NOT NULL DEFAULT 100 COMMENT '序列号ID',
`seq_id` bigint(20) UNSIGNED ZEROFILL NOT NULL COMMENT '序列号ID',
`seq_dist_cd` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '序列号识别码',
`prefix` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '前缀',
`separator1` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '分隔符1',
@ -912,7 +934,7 @@ INSERT INTO `sys_seq_result` VALUES (00000006458414990338, 'WHS', 'WH', NULL, NU
-- ----------------------------
DROP TABLE IF EXISTS `sys_seq_rule`;
CREATE TABLE `sys_seq_rule` (
`rule_id` bigint NOT NULL DEFAULT 100 COMMENT '规则ID',
`rule_id` bigint NOT NULL COMMENT '规则ID',
`seq_dist_cd` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '序列号识别码',
`rule_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '规则名称',
`prefix` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '前缀',
@ -938,7 +960,7 @@ CREATE TABLE `sys_seq_rule` (
-- ----------------------------
-- Records of sys_seq_rule
-- ----------------------------
INSERT INTO `sys_seq_rule` VALUES (1, 'UNIT', '单位代码生成规则', 'UNIT', NULL, NULL, 5, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, '1', '2024-02-19 11:38:35', '1', '2024-02-19 11:38:37', NULL);
INSERT INTO `sys_seq_rule` VALUES (1, 'UNIT', '单位代码生成规则', 'UNIT', NULL, NULL, 5, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, '1', '2024-02-19 11:38:35', '1', '2024-02-20 10:48:55', NULL);
INSERT INTO `sys_seq_rule` VALUES (2, 'GT', '物品类型代码生成规则', 'GT', NULL, NULL, 5, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, '1', '2024-02-19 13:33:21', '1', '2024-02-19 13:33:24', NULL);
INSERT INTO `sys_seq_rule` VALUES (3, 'WHS', '仓库代码生成规则', 'WH', NULL, NULL, 3, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, '1', '2024-02-19 13:34:28', '1', '2024-02-19 13:34:30', NULL);

@ -4,14 +4,14 @@
Source Server : MySQL (CIT1)
Source Server Type : MySQL
Source Server Version : 80200 (8.2.0)
Source Host :
Source Host : localhost:3306
Source Schema : ry-config
Target Server Type : MySQL
Target Server Version : 80200 (8.2.0)
File Encoding : 65001
Date: 19/02/2024 15:56:16
Date: 19/02/2024 17:44:24
*/
SET NAMES utf8mb4;
@ -41,7 +41,7 @@ CREATE TABLE `config_info` (
`encrypted_data_key` text CHARACTER SET utf8mb3 COLLATE utf8mb3_bin NULL COMMENT '秘钥',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `uk_configinfo_datagrouptenant`(`data_id` ASC, `group_id` ASC, `tenant_id` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 57 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_bin COMMENT = 'config_info' ROW_FORMAT = Dynamic;
) ENGINE = InnoDB AUTO_INCREMENT = 59 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_bin COMMENT = 'config_info' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of config_info
@ -53,10 +53,10 @@ INSERT INTO `config_info` VALUES (4, 'ruoyi-monitor-dev.yml', 'DEFAULT_GROUP', '
INSERT INTO `config_info` VALUES (5, 'ruoyi-system-dev.yml', 'DEFAULT_GROUP', '# spring配置\nspring:\n redis:\n host: localhost\n port: 6379\n password:\n datasource:\n druid:\n stat-view-servlet:\n enabled: true\n loginUsername: admin\n loginPassword: 123456\n dynamic:\n druid:\n initial-size: 5\n min-idle: 5\n maxActive: 20\n maxWait: 60000\n connectTimeout: 30000\n socketTimeout: 60000\n timeBetweenEvictionRunsMillis: 60000\n minEvictableIdleTimeMillis: 300000\n validationQuery: SELECT 1 FROM DUAL\n testWhileIdle: true\n testOnBorrow: false\n testOnReturn: false\n poolPreparedStatements: true\n maxPoolPreparedStatementPerConnectionSize: 20\n filters: stat,slf4j\n connectionProperties: druid.stat.mergeSql\\=true;druid.stat.slowSqlMillis\\=5000\n datasource:\n # 主库数据源\n master:\n driver-class-name: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\n username: root\n password: password\n # 从库数据源\n # slave:\n # username: \n # password: \n # url: \n # driver-class-name: \n\n# mybatis配置\nmybatis:\n # 搜索指定包别名\n typeAliasesPackage: com.ruoyi.system\n # 配置MyBatis日志输出\n configuration:\n log-impl: org.apache.ibatis.logging.stdout.StdOutImpl\n\n# swagger配置\nswagger:\n title: 系统模块接口文档\n license: Powered By ruoyi\n licenseUrl: https://ruoyi.vip\n', 'c16551d84032495e08b4d0a23648258b', '2020-11-20 00:00:00', '2024-02-01 07:46:29', NULL, '0:0:0:0:0:0:0:1', '', '', '系统模块', 'null', 'null', 'yaml', '', '');
INSERT INTO `config_info` VALUES (6, 'ruoyi-gen-dev.yml', 'DEFAULT_GROUP', '# spring配置\nspring:\n redis:\n host: localhost\n port: 6379\n password:\n datasource:\n driver-class-name: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\n username: root\n password: password\n\n# mybatis配置\nmybatis:\n # 搜索指定包别名\n typeAliasesPackage: com.ruoyi.gen.domain\n # 配置mapper的扫描找到所有的mapper.xml映射文件\n mapperLocations: classpath:mapper/**/*.xml\n\n# swagger配置\nswagger:\n title: 代码生成接口文档\n license: Powered By ruoyi\n licenseUrl: https://ruoyi.vip\n\n# 代码生成\ngen:\n # 作者\n author: ryas\n # 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool\n packageName: com.ruoyi.system\n # 自动去除表前缀默认是false\n autoRemovePre: false\n # 表前缀(生成类名不会包含表前缀,多个用逗号分隔)\n tablePrefix: sys_\n', '6a608ec04c64588783a08316dbe2ac3e', '2020-11-20 00:00:00', '2024-02-05 08:56:27', 'alan', '101.229.149.67', '', '', '代码生成', 'null', 'null', 'yaml', '', '');
INSERT INTO `config_info` VALUES (7, 'ruoyi-job-dev.yml', 'DEFAULT_GROUP', '# spring配置\nspring:\n redis:\n host: localhost\n port: 6379\n password: \n datasource:\n driver-class-name: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\n username: root\n password: password\n\n# mybatis配置\nmybatis:\n # 搜索指定包别名\n typeAliasesPackage: com.ruoyi.job.domain\n # 配置mapper的扫描找到所有的mapper.xml映射文件\n #mapperLocations: classpath:mapper/**/*.xml\n\n# swagger配置\nswagger:\n title: 定时任务接口文档\n license: Powered By ruoyi\n licenseUrl: https://ruoyi.vip\n', '79c2abe7b92b996eae686e4e158efa89', '2020-11-20 00:00:00', '2024-01-31 09:04:48', NULL, '0:0:0:0:0:0:0:1', '', '', '定时任务', 'null', 'null', 'yaml', '', '');
INSERT INTO `config_info` VALUES (8, 'ruoyi-file-dev.yml', 'DEFAULT_GROUP', '# 本地文件上传 \nfile:\n domain: http://127.0.0.1:9300\n path: D:/temp/ruoyi/uploadPath\n prefix: /statics\n\n# FastDFS配置\nfdfs:\n domain: http://8.129.231.12\n soTimeout: 3000\n connectTimeout: 2000\n trackerList: 8.129.231.12:22122\n\n# Minio配置\nminio:\n url: http://8.129.231.12:9000\n accessKey: minioadmin\n secretKey: minioadmin\n bucketName: test\n\n# spring配置\nspring:\n datasource:\n druid:\n dynamic:\n druid:\n initial-size: 5\n min-idle: 5\n maxActive: 20\n maxWait: 60000\n connectTimeout: 30000\n socketTimeout: 60000\n timeBetweenEvictionRunsMillis: 60000\n minEvictableIdleTimeMillis: 300000\n validationQuery: SELECT 1 FROM DUAL\n testWhileIdle: true\n testOnBorrow: false\n testOnReturn: false\n poolPreparedStatements: true\n maxPoolPreparedStatementPerConnectionSize: 20\n connectionProperties: druid.stat.mergeSql\\=true;druid.stat.slowSqlMillis\\=5000\n datasource:\n # 主库数据源\n master:\n driver-class-name: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\n username: root\n password: password\n # 从库数据源\n # slave:\n # username: \n # password: \n # url: \n # driver-class-name: \n\n# mybatis配置\nmybatis:\n # 搜索指定包别名\n typeAliasesPackage: com.ruoyi.file\n # 配置MyBatis日志输出\n configuration:\n log-impl: org.apache.ibatis.logging.stdout.StdOutImpl\n', '558d0a9349f5560d8f0bffc3c0c36eab', '2020-11-20 00:00:00', '2024-02-19 07:22:11', 'alan', '101.229.149.67', '', '', '文件服务', 'null', 'null', 'yaml', '', '');
INSERT INTO `config_info` VALUES (8, 'ruoyi-file-dev.yml', 'DEFAULT_GROUP', '# 本地文件上传 \nfile:\n domain: http://127.0.0.1:9300\n path: D:/temp/RYAS/uploadPath\n prefix: /statics\n\n# FastDFS配置\nfdfs:\n domain: http://8.129.231.12\n soTimeout: 3000\n connectTimeout: 2000\n trackerList: 8.129.231.12:22122\n\n# Minio配置\nminio:\n url: http://8.129.231.12:9000\n accessKey: minioadmin\n secretKey: minioadmin\n bucketName: test\n\n# spring配置\nspring:\n datasource:\n druid:\n dynamic:\n druid:\n initial-size: 5\n min-idle: 5\n maxActive: 20\n maxWait: 60000\n connectTimeout: 30000\n socketTimeout: 60000\n timeBetweenEvictionRunsMillis: 60000\n minEvictableIdleTimeMillis: 300000\n validationQuery: SELECT 1 FROM DUAL\n testWhileIdle: true\n testOnBorrow: false\n testOnReturn: false\n poolPreparedStatements: true\n maxPoolPreparedStatementPerConnectionSize: 20\n connectionProperties: druid.stat.mergeSql\\=true;druid.stat.slowSqlMillis\\=5000\n datasource:\n # 主库数据源\n master:\n driver-class-name: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\n username: root\n password: password\n # 从库数据源\n # slave:\n # username: \n # password: \n # url: \n # driver-class-name: \n\n# mybatis配置\nmybatis:\n # 搜索指定包别名\n typeAliasesPackage: com.ruoyi.file\n # 配置MyBatis日志输出\n configuration:\n log-impl: org.apache.ibatis.logging.stdout.StdOutImpl\n', '87c71469b7544b782ff9c8dfb2c1f5e5', '2020-11-20 00:00:00', '2024-02-19 09:43:17', 'alan', '223.166.15.195', '', '', '文件服务', 'null', 'null', 'yaml', '', '');
INSERT INTO `config_info` VALUES (9, 'sentinel-ruoyi-gateway', 'DEFAULT_GROUP', '[\r\n {\r\n \"resource\": \"ruoyi-auth\",\r\n \"count\": 500,\r\n \"grade\": 1,\r\n \"limitApp\": \"default\",\r\n \"strategy\": 0,\r\n \"controlBehavior\": 0\r\n },\r\n {\r\n \"resource\": \"ruoyi-system\",\r\n \"count\": 1000,\r\n \"grade\": 1,\r\n \"limitApp\": \"default\",\r\n \"strategy\": 0,\r\n \"controlBehavior\": 0\r\n },\r\n {\r\n \"resource\": \"ruoyi-gen\",\r\n \"count\": 200,\r\n \"grade\": 1,\r\n \"limitApp\": \"default\",\r\n \"strategy\": 0,\r\n \"controlBehavior\": 0\r\n },\r\n {\r\n \"resource\": \"ruoyi-job\",\r\n \"count\": 300,\r\n \"grade\": 1,\r\n \"limitApp\": \"default\",\r\n \"strategy\": 0,\r\n \"controlBehavior\": 0\r\n }\r\n]', '9f3a3069261598f74220bc47958ec252', '2020-11-20 00:00:00', '2020-11-20 00:00:00', NULL, '0:0:0:0:0:0:0:1', '', '', '限流策略', 'null', 'null', 'json', NULL, '');
INSERT INTO `config_info` VALUES (35, 'ruoyi-gateway-dev.yml', 'GROUP_ALL_IN_1', 'spring:\n redis:\n host: localhost\n port: 6379\n password:\n cloud:\n gateway:\n discovery:\n locator:\n lowerCaseServiceId: true\n enabled: true\n routes:\n # 认证中心\n - id: ruoyi-auth\n uri: lb://ruoyi-system\n predicates:\n - Path=/auth/**\n filters:\n # 验证码处理\n - CacheRequestFilter\n - ValidateCodeFilter\n - StripPrefix=1\n # 代码生成\n - id: ruoyi-gen\n uri: lb://ruoyi-gen\n predicates:\n - Path=/code/**\n filters:\n - StripPrefix=1\n # 定时任务\n - id: ruoyi-job\n uri: lb://ruoyi-system\n predicates:\n - Path=/schedule/**\n filters:\n - StripPrefix=1\n # 系统模块\n - id: ruoyi-system\n uri: lb://ruoyi-system\n predicates:\n - Path=/system/**\n filters:\n - StripPrefix=1\n # 文件服务\n - id: ruoyi-file\n uri: lb://ruoyi-system\n predicates:\n - Path=/file/**\n filters:\n - StripPrefix=1\n # WMS服务\n - id: ruoyi-wms\n uri: lb://ruoyi-wms\n predicates:\n - Path=/wms/**\n filters:\n - StripPrefix=1\n\n# 安全配置\nsecurity:\n # 验证码\n captcha:\n enabled: true\n type: math\n # 防止XSS攻击\n xss:\n enabled: true\n excludeUrls:\n - /system/notice\n # 不校验白名单\n ignore:\n whites:\n - /auth/logout\n - /auth/login\n - /auth/register\n - /*/v2/api-docs\n - /csrf\n - /auth/specialAuth/login\n - /system/test/**\n - /wms/test/**\n', 'cc74a6d0d4b40c085da48f56fbd01e5b', '2024-01-31 09:34:00', '2024-02-01 08:25:17', NULL, '0:0:0:0:0:0:0:1', '', '', '', '', '', 'yaml', '', '');
INSERT INTO `config_info` VALUES (36, 'ruoyi-system-dev.yml', 'GROUP_ALL_IN_1', '# spring配置\nspring:\n redis:\n host: localhost\n port: 6379\n password:\n datasource:\n druid:\n stat-view-servlet:\n enabled: true\n loginUsername: admin\n loginPassword: 123456\n dynamic:\n druid:\n initial-size: 5\n min-idle: 5\n maxActive: 20\n maxWait: 60000\n connectTimeout: 30000\n socketTimeout: 60000\n timeBetweenEvictionRunsMillis: 60000\n minEvictableIdleTimeMillis: 300000\n validationQuery: SELECT 1 FROM DUAL\n testWhileIdle: true\n testOnBorrow: false\n testOnReturn: false\n poolPreparedStatements: true\n maxPoolPreparedStatementPerConnectionSize: 20\n filters: stat,slf4j\n connectionProperties: druid.stat.mergeSql\\=true;druid.stat.slowSqlMillis\\=5000\n datasource:\n # 主库数据源\n master:\n driver-class-name: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\n username: root\n password: password\n # 从库数据源\n # slave:\n # username: \n # password: \n # url: \n # driver-class-name: \n\n# mybatis配置\nmybatis:\n # 搜索指定包别名\n typeAliasesPackage: com.ruoyi.system,com.ruoyi.job.domain\n # 配置MyBatis日志输出\n configuration:\n log-impl: org.apache.ibatis.logging.stdout.StdOutImpl\n\n# 本地文件上传 \nfile:\n domain: http://127.0.0.1:9201\n path: D:/temp/ruoyi/uploadPath\n prefix: /statics\n\n# FastDFS配置\nfdfs:\n domain: http://8.129.231.12\n soTimeout: 3000\n connectTimeout: 2000\n trackerList: 8.129.231.12:22122\n\n# Minio配置\nminio:\n url: http://8.129.231.12:9000\n accessKey: minioadmin\n secretKey: minioadmin\n bucketName: test\n\n# 特殊登录控制(不需要验证码)\nspecial:\n auth:\n login-enabled: true\n', '79e0d26257e644b6a248990af323f59d', '2024-01-31 09:34:19', '2024-02-01 08:28:49', NULL, '0:0:0:0:0:0:0:1', '', '', '', '', '', 'yaml', '', '');
INSERT INTO `config_info` VALUES (36, 'ruoyi-system-dev.yml', 'GROUP_ALL_IN_1', '# spring配置\nspring:\n redis:\n host: localhost\n port: 6379\n password:\n datasource:\n druid:\n stat-view-servlet:\n enabled: true\n loginUsername: admin\n loginPassword: 123456\n dynamic:\n druid:\n initial-size: 5\n min-idle: 5\n maxActive: 20\n maxWait: 60000\n connectTimeout: 30000\n socketTimeout: 60000\n timeBetweenEvictionRunsMillis: 60000\n minEvictableIdleTimeMillis: 300000\n validationQuery: SELECT 1 FROM DUAL\n testWhileIdle: true\n testOnBorrow: false\n testOnReturn: false\n poolPreparedStatements: true\n maxPoolPreparedStatementPerConnectionSize: 20\n filters: stat,slf4j\n connectionProperties: druid.stat.mergeSql\\=true;druid.stat.slowSqlMillis\\=5000\n datasource:\n # 主库数据源\n master:\n driver-class-name: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\n username: root\n password: password\n # 从库数据源\n # slave:\n # username: \n # password: \n # url: \n # driver-class-name: \n\n# mybatis配置\nmybatis:\n # 搜索指定包别名\n typeAliasesPackage: com.ruoyi.system,com.ruoyi.job.domain\n # 配置MyBatis日志输出\n configuration:\n log-impl: org.apache.ibatis.logging.stdout.StdOutImpl\n\n# 本地文件上传 \nfile:\n domain: http://127.0.0.1:9201\n path: D:/temp/RYAS/uploadPath\n prefix: /statics\n\n# FastDFS配置\nfdfs:\n domain: http://8.129.231.12\n soTimeout: 3000\n connectTimeout: 2000\n trackerList: 8.129.231.12:22122\n\n# Minio配置\nminio:\n url: http://8.129.231.12:9000\n accessKey: minioadmin\n secretKey: minioadmin\n bucketName: test\n\n# 特殊登录控制(不需要验证码)\nspecial:\n auth:\n login-enabled: true\n', '0c0f59e0b7c6b7277b3161e194d078ab', '2024-01-31 09:34:19', '2024-02-19 09:43:34', 'alan', '223.166.15.195', '', '', '', '', '', 'yaml', '', '');
INSERT INTO `config_info` VALUES (37, 'application-dev.yml', 'GROUP_ALL_IN_1', 'spring:\n autoconfigure:\n exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure\n mvc:\n pathmatch:\n matching-strategy: ant_path_matcher\n cloud:\n # feign 配置\n openfeign:\n sentinel:\n enabled: true\n okhttp:\n enabled: true\n httpclient:\n enabled: false\n client:\n config:\n default:\n connectTimeout: 10000\n readTimeout: 10000\n compression:\n request:\n enabled: true\n min-request-size: 8192\n response:\n enabled: true\n\n# 暴露监控端点\nmanagement:\n endpoints:\n web:\n exposure:\n include: \'*\'\n', '40039af000c00c2a42c264e926c1d2fc', '2024-01-31 09:37:04', '2024-01-31 09:37:04', NULL, '0:0:0:0:0:0:0:1', '', '', '通用配置', NULL, NULL, 'yaml', NULL, '');
INSERT INTO `config_info` VALUES (38, 'ruoyi-monitor-dev.yml', 'GROUP_ALL_IN_1', '# spring\nspring:\n security:\n user:\n name: ryas\n password: 123456\n boot:\n admin:\n ui:\n title: RYAS服务状态监控\n', '8b3ccaa35d17b5abe8c05a66a264e5f5', '2024-01-31 09:37:29', '2024-01-31 09:37:29', NULL, '0:0:0:0:0:0:0:1', '', '', '监控中心', NULL, NULL, 'yaml', NULL, '');
INSERT INTO `config_info` VALUES (39, 'ruoyi-gen-dev.yml', 'GROUP_ALL_IN_1', '# spring配置\nspring:\n redis:\n host: localhost\n port: 6379\n password:\n datasource:\n driver-class-name: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\n username: root\n password: password\n\n# mybatis配置\nmybatis:\n # 搜索指定包别名\n typeAliasesPackage: com.ruoyi.gen.domain\n # 配置mapper的扫描找到所有的mapper.xml映射文件\n mapperLocations: classpath:mapper/**/*.xml\n\n# swagger配置\nswagger:\n title: 代码生成接口文档\n license: Powered By ruoyi\n licenseUrl: https://ruoyi.vip\n\n# 代码生成\ngen:\n # 作者\n author: ryas\n # 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool\n packageName: com.ruoyi.system\n # 自动去除表前缀默认是false\n autoRemovePre: false\n # 表前缀(生成类名不会包含表前缀,多个用逗号分隔)\n tablePrefix: sys_\n', '6a608ec04c64588783a08316dbe2ac3e', '2024-01-31 09:37:29', '2024-02-05 08:56:38', 'alan', '101.229.149.67', '', '', '代码生成', '', '', 'yaml', '', '');
@ -201,7 +201,7 @@ CREATE TABLE `his_config_info` (
INDEX `idx_gmt_create`(`gmt_create` ASC) USING BTREE,
INDEX `idx_gmt_modified`(`gmt_modified` ASC) USING BTREE,
INDEX `idx_did`(`data_id` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 54 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_bin COMMENT = '多租户改造' ROW_FORMAT = Dynamic;
) ENGINE = InnoDB AUTO_INCREMENT = 56 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_bin COMMENT = '多租户改造' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of his_config_info

Loading…
Cancel
Save