mirror of
				https://github.com/dromara/RuoYi-Vue-Plus.git
				synced 2025-11-04 08:13:44 +08:00 
			
		
		
		
	update 将所有 云存储字样 改为 对象存储 避免误解
This commit is contained in:
		@@ -25,14 +25,14 @@ import javax.validation.constraints.NotNull;
 | 
			
		||||
import java.util.Arrays;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 云存储配置Controller
 | 
			
		||||
 * 对象存储配置Controller
 | 
			
		||||
 *
 | 
			
		||||
 * @author Lion Li
 | 
			
		||||
 * @author 孤舟烟雨
 | 
			
		||||
 * @date 2021-08-13
 | 
			
		||||
 */
 | 
			
		||||
@Validated
 | 
			
		||||
@Api(value = "云存储配置控制器", tags = {"云存储配置管理"})
 | 
			
		||||
@Api(value = "对象存储配置控制器", tags = {"对象存储配置管理"})
 | 
			
		||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
 | 
			
		||||
@RestController
 | 
			
		||||
@RequestMapping("/system/oss/config")
 | 
			
		||||
@@ -41,9 +41,9 @@ public class SysOssConfigController extends BaseController {
 | 
			
		||||
	private final ISysOssConfigService iSysOssConfigService;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * 查询云存储配置列表
 | 
			
		||||
	 * 查询对象存储配置列表
 | 
			
		||||
	 */
 | 
			
		||||
	@ApiOperation("查询云存储配置列表")
 | 
			
		||||
	@ApiOperation("查询对象存储配置列表")
 | 
			
		||||
	@PreAuthorize("@ss.hasPermi('system:oss:list')")
 | 
			
		||||
	@GetMapping("/list")
 | 
			
		||||
	public TableDataInfo<SysOssConfigVo> list(@Validated(QueryGroup.class) SysOssConfigBo bo) {
 | 
			
		||||
@@ -51,9 +51,9 @@ public class SysOssConfigController extends BaseController {
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * 获取云存储配置详细信息
 | 
			
		||||
	 * 获取对象存储配置详细信息
 | 
			
		||||
	 */
 | 
			
		||||
	@ApiOperation("获取云存储配置详细信息")
 | 
			
		||||
	@ApiOperation("获取对象存储配置详细信息")
 | 
			
		||||
	@PreAuthorize("@ss.hasPermi('system:oss:query')")
 | 
			
		||||
	@GetMapping("/{ossConfigId}")
 | 
			
		||||
	public AjaxResult<SysOssConfigVo> getInfo(@NotNull(message = "主键不能为空")
 | 
			
		||||
@@ -62,11 +62,11 @@ public class SysOssConfigController extends BaseController {
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * 新增云存储配置
 | 
			
		||||
	 * 新增对象存储配置
 | 
			
		||||
	 */
 | 
			
		||||
	@ApiOperation("新增云存储配置")
 | 
			
		||||
	@ApiOperation("新增对象存储配置")
 | 
			
		||||
	@PreAuthorize("@ss.hasPermi('system:oss:add')")
 | 
			
		||||
	@Log(title = "云存储配置", businessType = BusinessType.INSERT)
 | 
			
		||||
	@Log(title = "对象存储配置", businessType = BusinessType.INSERT)
 | 
			
		||||
	@RepeatSubmit()
 | 
			
		||||
	@PostMapping()
 | 
			
		||||
	public AjaxResult<Void> add(@Validated(AddGroup.class) @RequestBody SysOssConfigBo bo) {
 | 
			
		||||
@@ -74,11 +74,11 @@ public class SysOssConfigController extends BaseController {
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * 修改云存储配置
 | 
			
		||||
	 * 修改对象存储配置
 | 
			
		||||
	 */
 | 
			
		||||
	@ApiOperation("修改云存储配置")
 | 
			
		||||
	@ApiOperation("修改对象存储配置")
 | 
			
		||||
	@PreAuthorize("@ss.hasPermi('system:oss:edit')")
 | 
			
		||||
	@Log(title = "云存储配置", businessType = BusinessType.UPDATE)
 | 
			
		||||
	@Log(title = "对象存储配置", businessType = BusinessType.UPDATE)
 | 
			
		||||
	@RepeatSubmit()
 | 
			
		||||
	@PutMapping()
 | 
			
		||||
	public AjaxResult<Void> edit(@Validated(EditGroup.class) @RequestBody SysOssConfigBo bo) {
 | 
			
		||||
@@ -86,11 +86,11 @@ public class SysOssConfigController extends BaseController {
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * 删除云存储配置
 | 
			
		||||
	 * 删除对象存储配置
 | 
			
		||||
	 */
 | 
			
		||||
	@ApiOperation("删除云存储配置")
 | 
			
		||||
	@ApiOperation("删除对象存储配置")
 | 
			
		||||
	@PreAuthorize("@ss.hasPermi('system:oss:remove')")
 | 
			
		||||
	@Log(title = "云存储配置", businessType = BusinessType.DELETE)
 | 
			
		||||
	@Log(title = "对象存储配置", businessType = BusinessType.DELETE)
 | 
			
		||||
	@DeleteMapping("/{ossConfigIds}")
 | 
			
		||||
	public AjaxResult<Void> remove(@NotEmpty(message = "主键不能为空")
 | 
			
		||||
								   @PathVariable Long[] ossConfigIds) {
 | 
			
		||||
@@ -101,7 +101,7 @@ public class SysOssConfigController extends BaseController {
 | 
			
		||||
	 * 状态修改
 | 
			
		||||
	 */
 | 
			
		||||
	@PreAuthorize("@ss.hasPermi('system:oss:edit')")
 | 
			
		||||
	@Log(title = "云存储状态修改", businessType = BusinessType.UPDATE)
 | 
			
		||||
	@Log(title = "对象存储状态修改", businessType = BusinessType.UPDATE)
 | 
			
		||||
	@PutMapping("/changeStatus")
 | 
			
		||||
	public AjaxResult changeStatus(@RequestBody SysOssConfigBo bo) {
 | 
			
		||||
		return toAjax(iSysOssConfigService.updateOssConfigStatus(bo));
 | 
			
		||||
 
 | 
			
		||||
@@ -49,7 +49,7 @@ import java.util.Map;
 | 
			
		||||
 * @author Lion Li
 | 
			
		||||
 */
 | 
			
		||||
@Validated
 | 
			
		||||
@Api(value = "OSS云存储控制器", tags = {"OSS云存储管理"})
 | 
			
		||||
@Api(value = "OSS对象存储控制器", tags = {"OSS对象存储管理"})
 | 
			
		||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
 | 
			
		||||
@RestController
 | 
			
		||||
@RequestMapping("/system/oss")
 | 
			
		||||
@@ -59,9 +59,9 @@ public class SysOssController extends BaseController {
 | 
			
		||||
	private final ISysConfigService iSysConfigService;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * 查询OSS云存储列表
 | 
			
		||||
	 * 查询OSS对象存储列表
 | 
			
		||||
	 */
 | 
			
		||||
	@ApiOperation("查询OSS云存储列表")
 | 
			
		||||
	@ApiOperation("查询OSS对象存储列表")
 | 
			
		||||
	@PreAuthorize("@ss.hasPermi('system:oss:list')")
 | 
			
		||||
	@GetMapping("/list")
 | 
			
		||||
	public TableDataInfo<SysOssVo> list(@Validated(QueryGroup.class) SysOssBo bo) {
 | 
			
		||||
@@ -69,14 +69,14 @@ public class SysOssController extends BaseController {
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * 上传OSS云存储
 | 
			
		||||
	 * 上传OSS对象存储
 | 
			
		||||
	 */
 | 
			
		||||
	@ApiOperation("上传OSS云存储")
 | 
			
		||||
	@ApiOperation("上传OSS对象存储")
 | 
			
		||||
	@ApiImplicitParams({
 | 
			
		||||
		@ApiImplicitParam(name = "file", value = "文件", dataType = "java.io.File", required = true),
 | 
			
		||||
	})
 | 
			
		||||
	@PreAuthorize("@ss.hasPermi('system:oss:upload')")
 | 
			
		||||
	@Log(title = "OSS云存储", businessType = BusinessType.INSERT)
 | 
			
		||||
	@Log(title = "OSS对象存储", businessType = BusinessType.INSERT)
 | 
			
		||||
	@RepeatSubmit
 | 
			
		||||
	@PostMapping("/upload")
 | 
			
		||||
	public AjaxResult<Map<String, String>> upload(@RequestPart("file") MultipartFile file) {
 | 
			
		||||
@@ -90,7 +90,7 @@ public class SysOssController extends BaseController {
 | 
			
		||||
		return AjaxResult.success(map);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	@ApiOperation("下载OSS云存储")
 | 
			
		||||
	@ApiOperation("下载OSS对象存储")
 | 
			
		||||
	@PreAuthorize("@ss.hasPermi('system:oss:download')")
 | 
			
		||||
	@GetMapping("/download/{ossId}")
 | 
			
		||||
	public void download(@PathVariable Long ossId, HttpServletResponse response) throws IOException {
 | 
			
		||||
@@ -108,11 +108,11 @@ public class SysOssController extends BaseController {
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * 删除OSS云存储
 | 
			
		||||
	 * 删除OSS对象存储
 | 
			
		||||
	 */
 | 
			
		||||
	@ApiOperation("删除OSS云存储")
 | 
			
		||||
	@ApiOperation("删除OSS对象存储")
 | 
			
		||||
	@PreAuthorize("@ss.hasPermi('system:oss:remove')")
 | 
			
		||||
	@Log(title = "OSS云存储" , businessType = BusinessType.DELETE)
 | 
			
		||||
	@Log(title = "OSS对象存储" , businessType = BusinessType.DELETE)
 | 
			
		||||
	@DeleteMapping("/{ossIds}")
 | 
			
		||||
	public AjaxResult<Void> remove(@NotEmpty(message = "主键不能为空")
 | 
			
		||||
								   @PathVariable Long[] ossIds) {
 | 
			
		||||
@@ -124,7 +124,7 @@ public class SysOssController extends BaseController {
 | 
			
		||||
	 */
 | 
			
		||||
	@ApiOperation("变更图片列表预览状态")
 | 
			
		||||
	@PreAuthorize("@ss.hasPermi('system:oss:edit')")
 | 
			
		||||
	@Log(title = "OSS云存储" , businessType = BusinessType.UPDATE)
 | 
			
		||||
	@Log(title = "OSS对象存储" , businessType = BusinessType.UPDATE)
 | 
			
		||||
	@PutMapping("/changePreviewListResource")
 | 
			
		||||
	public AjaxResult<Void> changePreviewListResource(@RequestBody String body) {
 | 
			
		||||
		Map<String, Boolean> map = JsonUtils.parseMap(body);
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,7 @@ import java.util.Arrays;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 云存储常量
 | 
			
		||||
 * 对象存储常量
 | 
			
		||||
 *
 | 
			
		||||
 * @author Lion Li
 | 
			
		||||
 */
 | 
			
		||||
@@ -16,7 +16,7 @@ public class CloudConstant {
 | 
			
		||||
	public static final String SYS_OSS_KEY = "sys_oss:";
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * 云存储配置KEY
 | 
			
		||||
	 * 对象存储配置KEY
 | 
			
		||||
	 */
 | 
			
		||||
	public static final String CLOUD_STORAGE_CONFIG_KEY = "CloudStorageConfig";
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,7 @@ import lombok.AllArgsConstructor;
 | 
			
		||||
import lombok.Getter;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 云存储服务商枚举
 | 
			
		||||
 * 对象存储服务商枚举
 | 
			
		||||
 *
 | 
			
		||||
 * @author Lion Li
 | 
			
		||||
 */
 | 
			
		||||
 
 | 
			
		||||
@@ -5,7 +5,7 @@ import lombok.Data;
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * OSS云存储 配置属性
 | 
			
		||||
 * OSS对象存储 配置属性
 | 
			
		||||
 *
 | 
			
		||||
 * @author Lion Li
 | 
			
		||||
 */
 | 
			
		||||
 
 | 
			
		||||
@@ -5,7 +5,7 @@ import com.ruoyi.oss.entity.UploadResult;
 | 
			
		||||
import java.io.InputStream;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 云存储策略
 | 
			
		||||
 * 对象存储策略
 | 
			
		||||
 *
 | 
			
		||||
 * @author Lion Li
 | 
			
		||||
 */
 | 
			
		||||
 
 | 
			
		||||
@@ -11,7 +11,7 @@ import com.ruoyi.oss.service.ICloudStorageStrategy;
 | 
			
		||||
import java.io.InputStream;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 云存储策略(支持七牛、阿里云、腾讯云、minio)
 | 
			
		||||
 * 对象存储策略(支持七牛、阿里云、腾讯云、minio)
 | 
			
		||||
 *
 | 
			
		||||
 * @author Lion Li
 | 
			
		||||
 */
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,7 @@ import java.io.Serializable;
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * OSS云存储对象
 | 
			
		||||
 * OSS对象存储对象
 | 
			
		||||
 *
 | 
			
		||||
 * @author Lion Li
 | 
			
		||||
 */
 | 
			
		||||
@@ -23,7 +23,7 @@ public class SysOss implements Serializable {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * 云存储主键
 | 
			
		||||
	 * 对象存储主键
 | 
			
		||||
	 */
 | 
			
		||||
	@TableId(value = "oss_id", type = IdType.AUTO)
 | 
			
		||||
	private Long ossId;
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,7 @@ import java.util.Date;
 | 
			
		||||
import java.math.BigDecimal;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 云存储配置对象 sys_oss_config
 | 
			
		||||
 * 对象存储配置对象 sys_oss_config
 | 
			
		||||
 *
 | 
			
		||||
 * @author ruoyi
 | 
			
		||||
 * @date 2021-08-11
 | 
			
		||||
 
 | 
			
		||||
@@ -7,13 +7,13 @@ import lombok.Data;
 | 
			
		||||
import lombok.EqualsAndHashCode;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * OSS云存储分页查询对象 sys_oss
 | 
			
		||||
 * OSS对象存储分页查询对象 sys_oss
 | 
			
		||||
 *
 | 
			
		||||
 * @author Lion Li
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
@EqualsAndHashCode(callSuper = true)
 | 
			
		||||
@ApiModel("OSS云存储分页查询对象")
 | 
			
		||||
@ApiModel("OSS对象存储分页查询对象")
 | 
			
		||||
public class SysOssBo extends BaseEntity {
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
 
 | 
			
		||||
@@ -13,7 +13,7 @@ import javax.validation.constraints.NotNull;
 | 
			
		||||
import javax.validation.constraints.Size;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 云存储配置业务对象 sys_oss_config
 | 
			
		||||
 * 对象存储配置业务对象 sys_oss_config
 | 
			
		||||
 *
 | 
			
		||||
 * @author Lion Li
 | 
			
		||||
 * @author 孤舟烟雨
 | 
			
		||||
@@ -22,7 +22,7 @@ import javax.validation.constraints.Size;
 | 
			
		||||
 | 
			
		||||
@Data
 | 
			
		||||
@EqualsAndHashCode(callSuper = true)
 | 
			
		||||
@ApiModel("云存储配置业务对象")
 | 
			
		||||
@ApiModel("对象存储配置业务对象")
 | 
			
		||||
public class SysOssConfigBo extends BaseEntity {
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
 
 | 
			
		||||
@@ -8,14 +8,14 @@ import lombok.Data;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 云存储配置视图对象 sys_oss_config
 | 
			
		||||
 * 对象存储配置视图对象 sys_oss_config
 | 
			
		||||
 *
 | 
			
		||||
 * @author Lion Li
 | 
			
		||||
 * @author 孤舟烟雨
 | 
			
		||||
 * @date 2021-08-13
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
@ApiModel("云存储配置视图对象")
 | 
			
		||||
@ApiModel("对象存储配置视图对象")
 | 
			
		||||
@ExcelIgnoreUnannotated
 | 
			
		||||
public class SysOssConfigVo {
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -7,20 +7,20 @@ import lombok.Data;
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * OSS云存储视图对象 sys_oss
 | 
			
		||||
 * OSS对象存储视图对象 sys_oss
 | 
			
		||||
 *
 | 
			
		||||
 * @author Lion Li
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
@ApiModel("OSS云存储视图对象")
 | 
			
		||||
@ApiModel("OSS对象存储视图对象")
 | 
			
		||||
public class SysOssVo {
 | 
			
		||||
 | 
			
		||||
	private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 *  云存储主键
 | 
			
		||||
	 *  对象存储主键
 | 
			
		||||
	 */
 | 
			
		||||
	@ApiModelProperty("云存储主键")
 | 
			
		||||
	@ApiModelProperty("对象存储主键")
 | 
			
		||||
	private Long ossId;
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,7 @@ import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus;
 | 
			
		||||
import com.ruoyi.system.domain.SysOssConfig;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 云存储配置Mapper接口
 | 
			
		||||
 * 对象存储配置Mapper接口
 | 
			
		||||
 *
 | 
			
		||||
 * @author Lion Li
 | 
			
		||||
 * @author 孤舟烟雨
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,7 @@ import com.ruoyi.system.domain.vo.SysOssConfigVo;
 | 
			
		||||
import java.util.Collection;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 云存储配置Service接口
 | 
			
		||||
 * 对象存储配置Service接口
 | 
			
		||||
 *
 | 
			
		||||
 * @author Lion Li
 | 
			
		||||
 * @author 孤舟烟雨
 | 
			
		||||
@@ -29,15 +29,15 @@ public interface ISysOssConfigService extends IServicePlus<SysOssConfig, SysOssC
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * 根据新增业务对象插入云存储配置
 | 
			
		||||
	 * @param bo 云存储配置新增业务对象
 | 
			
		||||
	 * 根据新增业务对象插入对象存储配置
 | 
			
		||||
	 * @param bo 对象存储配置新增业务对象
 | 
			
		||||
	 * @return
 | 
			
		||||
	 */
 | 
			
		||||
	Boolean insertByBo(SysOssConfigBo bo);
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * 根据编辑业务对象修改云存储配置
 | 
			
		||||
	 * @param bo 云存储配置编辑业务对象
 | 
			
		||||
	 * 根据编辑业务对象修改对象存储配置
 | 
			
		||||
	 * @param bo 对象存储配置编辑业务对象
 | 
			
		||||
	 * @return
 | 
			
		||||
	 */
 | 
			
		||||
	Boolean updateByBo(SysOssConfigBo bo);
 | 
			
		||||
 
 | 
			
		||||
@@ -31,7 +31,7 @@ import java.util.Collection;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 云存储配置Service业务层处理
 | 
			
		||||
 * 对象存储配置Service业务层处理
 | 
			
		||||
 *
 | 
			
		||||
 * @author Lion Li
 | 
			
		||||
 * @author 孤舟烟雨
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
import request from '@/utils/request'
 | 
			
		||||
 | 
			
		||||
// 查询OSS云存储列表
 | 
			
		||||
// 查询OSS对象存储列表
 | 
			
		||||
export function listOss(query) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/system/oss/list',
 | 
			
		||||
@@ -9,7 +9,7 @@ export function listOss(query) {
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 删除OSS云存储
 | 
			
		||||
// 删除OSS对象存储
 | 
			
		||||
export function delOss(ossId) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/system/oss/' + ossId,
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
import request from '@/utils/request'
 | 
			
		||||
 | 
			
		||||
// 查询云存储配置列表
 | 
			
		||||
// 查询对象存储配置列表
 | 
			
		||||
export function listOssConfig(query) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/system/oss/config/list',
 | 
			
		||||
@@ -9,7 +9,7 @@ export function listOssConfig(query) {
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 查询云存储配置详细
 | 
			
		||||
// 查询对象存储配置详细
 | 
			
		||||
export function getOssConfig(ossConfigId) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/system/oss/config/' + ossConfigId,
 | 
			
		||||
@@ -17,7 +17,7 @@ export function getOssConfig(ossConfigId) {
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 新增云存储配置
 | 
			
		||||
// 新增对象存储配置
 | 
			
		||||
export function addOssConfig(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/system/oss/config',
 | 
			
		||||
@@ -26,7 +26,7 @@ export function addOssConfig(data) {
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 修改云存储配置
 | 
			
		||||
// 修改对象存储配置
 | 
			
		||||
export function updateOssConfig(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/system/oss/config',
 | 
			
		||||
@@ -35,7 +35,7 @@ export function updateOssConfig(data) {
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 删除云存储配置
 | 
			
		||||
// 删除对象存储配置
 | 
			
		||||
export function delOssConfig(ossConfigId) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/system/oss/config/' + ossConfigId,
 | 
			
		||||
 
 | 
			
		||||
@@ -118,7 +118,7 @@
 | 
			
		||||
      @pagination="getList"
 | 
			
		||||
    />
 | 
			
		||||
 | 
			
		||||
    <!-- 添加或修改云存储配置对话框 -->
 | 
			
		||||
    <!-- 添加或修改对象存储配置对话框 -->
 | 
			
		||||
    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
 | 
			
		||||
      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
 | 
			
		||||
        <el-form-item label="配置key" prop="configKey">
 | 
			
		||||
@@ -201,7 +201,7 @@ export default {
 | 
			
		||||
      showSearch: true,
 | 
			
		||||
      // 总条数
 | 
			
		||||
      total: 0,
 | 
			
		||||
      // 云存储配置表格数据
 | 
			
		||||
      // 对象存储配置表格数据
 | 
			
		||||
      ossConfigList: [],
 | 
			
		||||
      // configKeyOptions
 | 
			
		||||
      configKeyOptions: [],
 | 
			
		||||
@@ -284,7 +284,7 @@ export default {
 | 
			
		||||
    this.configKeyOptions = this.configKeyDatas;
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    /** 查询云存储配置列表 */
 | 
			
		||||
    /** 查询对象存储配置列表 */
 | 
			
		||||
    getList() {
 | 
			
		||||
      this.loading = true;
 | 
			
		||||
      listOssConfig(this.queryParams).then((response) => {
 | 
			
		||||
@@ -335,7 +335,7 @@ export default {
 | 
			
		||||
    handleAdd() {
 | 
			
		||||
      this.reset();
 | 
			
		||||
      this.open = true;
 | 
			
		||||
      this.title = "添加云存储配置";
 | 
			
		||||
      this.title = "添加对象存储配置";
 | 
			
		||||
    },
 | 
			
		||||
    /** 修改按钮操作 */
 | 
			
		||||
    handleUpdate(row) {
 | 
			
		||||
@@ -346,7 +346,7 @@ export default {
 | 
			
		||||
        this.loading = false;
 | 
			
		||||
        this.form = response.data;
 | 
			
		||||
        this.open = true;
 | 
			
		||||
        this.title = "修改云存储配置";
 | 
			
		||||
        this.title = "修改对象存储配置";
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    /** 提交按钮 */
 | 
			
		||||
@@ -377,7 +377,7 @@ export default {
 | 
			
		||||
    /** 删除按钮操作 */
 | 
			
		||||
    handleDelete(row) {
 | 
			
		||||
      const ossConfigIds = row.ossConfigId || this.ids;
 | 
			
		||||
      this.$confirm('是否确认删除云存储配置编号为"' + ossConfigIds + '"的数据项?', "警告", {
 | 
			
		||||
      this.$confirm('是否确认删除对象存储配置编号为"' + ossConfigIds + '"的数据项?', "警告", {
 | 
			
		||||
        confirmButtonText: "确定",
 | 
			
		||||
        cancelButtonText: "取消",
 | 
			
		||||
        type: "warning"
 | 
			
		||||
@@ -392,7 +392,7 @@ export default {
 | 
			
		||||
        this.loading = false;
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    // 云存储配置状态修改
 | 
			
		||||
    // 对象存储配置状态修改
 | 
			
		||||
    handleStatusChange(row) {
 | 
			
		||||
      let text = row.status === "0" ? "启用" : "停用";
 | 
			
		||||
      this.$confirm(
 | 
			
		||||
 
 | 
			
		||||
@@ -120,7 +120,7 @@
 | 
			
		||||
 | 
			
		||||
    <el-table v-loading="loading" :data="ossList" @selection-change="handleSelectionChange">
 | 
			
		||||
      <el-table-column type="selection" width="55" align="center" />
 | 
			
		||||
      <el-table-column label="云存储主键" align="center" prop="ossId" v-if="false"/>
 | 
			
		||||
      <el-table-column label="对象存储主键" align="center" prop="ossId" v-if="false"/>
 | 
			
		||||
      <el-table-column label="文件名" align="center" prop="fileName" />
 | 
			
		||||
      <el-table-column label="原名" align="center" prop="originalName" />
 | 
			
		||||
      <el-table-column label="文件后缀" align="center" prop="fileSuffix" />
 | 
			
		||||
@@ -170,7 +170,7 @@
 | 
			
		||||
      @pagination="getList"
 | 
			
		||||
    />
 | 
			
		||||
 | 
			
		||||
    <!-- 添加或修改OSS云存储对话框 -->
 | 
			
		||||
    <!-- 添加或修改OSS对象存储对话框 -->
 | 
			
		||||
    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
 | 
			
		||||
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
 | 
			
		||||
        <el-form-item label="文件名">
 | 
			
		||||
@@ -210,7 +210,7 @@ export default {
 | 
			
		||||
      showSearch: true,
 | 
			
		||||
      // 总条数
 | 
			
		||||
      total: 0,
 | 
			
		||||
      // OSS云存储表格数据
 | 
			
		||||
      // OSS对象存储表格数据
 | 
			
		||||
      ossList: [],
 | 
			
		||||
      // 弹出层标题
 | 
			
		||||
      title: "",
 | 
			
		||||
@@ -248,7 +248,7 @@ export default {
 | 
			
		||||
    this.getList();
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    /** 查询OSS云存储列表 */
 | 
			
		||||
    /** 查询OSS对象存储列表 */
 | 
			
		||||
    getList() {
 | 
			
		||||
      this.loading = true;
 | 
			
		||||
      this.queryParams.params = {};
 | 
			
		||||
@@ -330,7 +330,7 @@ export default {
 | 
			
		||||
    /** 删除按钮操作 */
 | 
			
		||||
    handleDelete(row) {
 | 
			
		||||
      const ossIds = row.ossId || this.ids;
 | 
			
		||||
      this.$confirm('是否确认删除OSS云存储编号为"' + ossIds + '"的数据项?', "警告", {
 | 
			
		||||
      this.$confirm('是否确认删除OSS对象存储编号为"' + ossIds + '"的数据项?', "警告", {
 | 
			
		||||
          confirmButtonText: "确定",
 | 
			
		||||
          cancelButtonText: "取消",
 | 
			
		||||
          type: "warning"
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										10
									
								
								sql/oss.sql
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								sql/oss.sql
									
									
									
									
									
								
							@@ -1,9 +1,9 @@
 | 
			
		||||
-- ----------------------------
 | 
			
		||||
-- OSS云存储表
 | 
			
		||||
-- OSS对象存储表
 | 
			
		||||
-- ----------------------------
 | 
			
		||||
drop table if exists sys_oss;
 | 
			
		||||
create table sys_oss (
 | 
			
		||||
    oss_id          bigint(20)   not null auto_increment    comment '云存储主键',
 | 
			
		||||
    oss_id          bigint(20)   not null auto_increment    comment '对象存储主键',
 | 
			
		||||
    file_name       varchar(64)  not null default ''        comment '文件名',
 | 
			
		||||
    original_name   varchar(64)  not null default ''        comment '原名',
 | 
			
		||||
    file_suffix     varchar(10)  not null default ''        comment '文件后缀名',
 | 
			
		||||
@@ -14,10 +14,10 @@ create table sys_oss (
 | 
			
		||||
    update_by       varchar(64)           default ''        comment '更新人',
 | 
			
		||||
    service         varchar(10)  not null default 'minio'   comment '服务商',
 | 
			
		||||
    primary key (oss_id)
 | 
			
		||||
) engine=innodb comment ='OSS云存储表';
 | 
			
		||||
) engine=innodb comment ='OSS对象存储表';
 | 
			
		||||
 | 
			
		||||
-- ----------------------------
 | 
			
		||||
-- OSS云存储动态配置表
 | 
			
		||||
-- OSS对象存储动态配置表
 | 
			
		||||
-- ----------------------------
 | 
			
		||||
drop table if exists sys_oss_config;
 | 
			
		||||
create table sys_oss_config (
 | 
			
		||||
@@ -38,7 +38,7 @@ create table sys_oss_config (
 | 
			
		||||
    update_time     datetime                default null    comment '更新时间',
 | 
			
		||||
    remark           varchar(500)           default null    comment '备注',
 | 
			
		||||
    primary key (oss_config_id)
 | 
			
		||||
) engine=innodb comment='云存储配置表';
 | 
			
		||||
) engine=innodb comment='对象存储配置表';
 | 
			
		||||
 | 
			
		||||
insert into sys_config values(11, 'OSS预览列表资源开关',   'sys.oss.previewListResource',      'true',           'Y', 'admin', sysdate(), '', null, 'true:开启, false:关闭');
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user