feat(UFOP): UFOP新增bucketName
This commit is contained in:
parent
14a6d2b1d3
commit
f20ae789b6
4
pom.xml
4
pom.xml
@ -6,11 +6,11 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.qiwenshare</groupId>
|
<groupId>com.qiwenshare</groupId>
|
||||||
<artifactId>qiwenshare</artifactId>
|
<artifactId>qiwenshare</artifactId>
|
||||||
<version>1.1.4</version>
|
<version>1.1.5</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>qiwen-file</artifactId>
|
<artifactId>qiwen-file</artifactId>
|
||||||
<version>1.1.4-SNAPSHOT</version>
|
<version>1.1.5-SNAPSHOT</version>
|
||||||
<name>qiwen-file</name>
|
<name>qiwen-file</name>
|
||||||
<description>pan.qiwenshare.com</description>
|
<description>pan.qiwenshare.com</description>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
@ -1,11 +1,14 @@
|
|||||||
package com.qiwenshare.file.api;
|
package com.qiwenshare.file.api;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.qiwenshare.file.domain.SysParam;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author MAC
|
* @author MAC
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
* @description: TODO
|
* @description: TODO
|
||||||
* @date 2021/12/30 14:54
|
* @date 2021/12/30 14:54
|
||||||
*/
|
*/
|
||||||
public interface ISysParamService {
|
public interface ISysParamService extends IService<SysParam> {
|
||||||
String getValue(String key);
|
String getValue(String key);
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,40 @@
|
|||||||
|
package com.qiwenshare.file.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.qiwenshare.common.result.RestResult;
|
||||||
|
import com.qiwenshare.file.api.ISysParamService;
|
||||||
|
import com.qiwenshare.file.domain.SysParam;
|
||||||
|
import com.qiwenshare.file.dto.param.QueryGroupParamDTO;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Tag(name = "系统参数管理")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/param")
|
||||||
|
public class SysParamController {
|
||||||
|
@Resource
|
||||||
|
ISysParamService sysParamService;
|
||||||
|
|
||||||
|
@Operation(summary = "查询系统参数组", tags = {"系统参数管理"})
|
||||||
|
@RequestMapping(value = "/grouplist", method = RequestMethod.GET)
|
||||||
|
@ResponseBody
|
||||||
|
public RestResult<SysParam> groupList(
|
||||||
|
@Parameter(description = "查询参数dto", required = false)
|
||||||
|
QueryGroupParamDTO queryGroupParamDTO
|
||||||
|
) {
|
||||||
|
List<SysParam> list = sysParamService.list(new QueryWrapper<SysParam>().lambda().eq(SysParam::getGroupName, queryGroupParamDTO.getGroupName()));
|
||||||
|
|
||||||
|
return RestResult.success().data(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -21,6 +21,7 @@ public class FileExtend {
|
|||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.AUTO)
|
@GeneratedValue(strategy = GenerationType.AUTO)
|
||||||
@TableId(type = IdType.AUTO)
|
@TableId(type = IdType.AUTO)
|
||||||
|
@Column(columnDefinition="varchar(25)")
|
||||||
private String fileExtendName;
|
private String fileExtendName;
|
||||||
@Column(columnDefinition="varchar(25) comment '文件扩展名描述'")
|
@Column(columnDefinition="varchar(25) comment '文件扩展名描述'")
|
||||||
private String fileExtendDesc;
|
private String fileExtendDesc;
|
||||||
|
@ -14,13 +14,15 @@ import javax.persistence.*;
|
|||||||
public class SysParam {
|
public class SysParam {
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
@Column(columnDefinition="bigint(20)")
|
@Column(columnDefinition = "bigint(20)")
|
||||||
@TableId(type = IdType.AUTO)
|
@TableId(type = IdType.AUTO)
|
||||||
private Long sysParamId;
|
private Long sysParamId;
|
||||||
@Column(columnDefinition="varchar(50) comment '系统参数key'")
|
@Column(columnDefinition = "varchar(50)")
|
||||||
|
private String groupName;
|
||||||
|
@Column(columnDefinition = "varchar(50)")
|
||||||
private String sysParamKey;
|
private String sysParamKey;
|
||||||
@Column(columnDefinition="varchar(50) comment '系统参数值'")
|
@Column(columnDefinition = "varchar(50)")
|
||||||
private String sysParamValue;
|
private String sysParamValue;
|
||||||
@Column(columnDefinition="varchar(50) comment '系统参数描述'")
|
@Column(columnDefinition = "varchar(50)")
|
||||||
private String sysParamDesc;
|
private String sysParamDesc;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,13 @@
|
|||||||
|
package com.qiwenshare.file.dto.param;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Schema(name = "获取组参数列表DTO")
|
||||||
|
public class QueryGroupParamDTO {
|
||||||
|
|
||||||
|
@Schema(description = "组名")
|
||||||
|
private String groupName;
|
||||||
|
|
||||||
|
}
|
26
src/main/java/com/qiwenshare/file/vo/param/SysParamVO.java
Normal file
26
src/main/java/com/qiwenshare/file/vo/param/SysParamVO.java
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
package com.qiwenshare.file.vo.param;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@Schema(name = "系统列表Vo")
|
||||||
|
public class SysParamVO {
|
||||||
|
@Schema(description = "系统参数ID")
|
||||||
|
private Long sysParamId;
|
||||||
|
@Schema(description = "组名")
|
||||||
|
private String groupName;
|
||||||
|
@Schema(description = "名称")
|
||||||
|
private String sysParamKey;
|
||||||
|
@Schema(description = "内容")
|
||||||
|
private String sysParamValue;
|
||||||
|
@Schema(description = "排序")
|
||||||
|
private String sysParamDesc;
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
private String createTime;
|
||||||
|
@Schema(description = "修改时间")
|
||||||
|
private String modifyTime;
|
||||||
|
}
|
@ -15,7 +15,7 @@ logging.level.root=info
|
|||||||
|
|
||||||
#jpa配置 create/update
|
#jpa配置 create/update
|
||||||
spring.jpa.hibernate.ddl-auto=update
|
spring.jpa.hibernate.ddl-auto=update
|
||||||
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
|
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
|
||||||
spring.jpa.show-sql=true
|
spring.jpa.show-sql=true
|
||||||
spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
|
spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
|
||||||
|
|
||||||
@ -42,6 +42,7 @@ springdoc.swagger-ui.path=/doc.html
|
|||||||
ufop.storage-type=0
|
ufop.storage-type=0
|
||||||
#文件存储路径
|
#文件存储路径
|
||||||
ufop.local-storage-path=
|
ufop.local-storage-path=
|
||||||
|
ufop.bucket-name=upload
|
||||||
#图片缩略图
|
#图片缩略图
|
||||||
ufop.thumb-image.width=150
|
ufop.thumb-image.width=150
|
||||||
ufop.thumb-image.height=150
|
ufop.thumb-image.height=150
|
||||||
|
10
src/main/resources/mapper/SysParamMapper.xml
Normal file
10
src/main/resources/mapper/SysParamMapper.xml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
|
||||||
|
|
||||||
|
<mapper namespace="com.qiwenshare.admin.mapper.SysParamMapper">
|
||||||
|
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue
Block a user