feat(后台管理): 七牛云管理

添加七牛云管理基础代码
master
wayn 4 years ago
parent 2daeacbd1e
commit be8007222b

@ -16,12 +16,12 @@ public class QiniuConfigController {
@Autowired
private IQiniuConfigService iQiniuConfigService;
@GetMapping
@GetMapping("config")
public R info() {
return R.success().add("data", iQiniuConfigService.getById(1));
}
@PutMapping
@PutMapping("config")
public R update(@Valid @RequestBody QiniuConfig qiniuConfig) {
qiniuConfig.setId(1L);
iQiniuConfigService.updateById(qiniuConfig);

@ -0,0 +1,69 @@
package com.wayn.common.core.domain.tool;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* <p>
*
* </p>
*
* @author wayn
* @since 2020-11-15
*/
@Data
@TableName("qiniu_content")
@EqualsAndHashCode(callSuper = false)
public class QiniuContent implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID
*/
@TableId(value = "content_id", type = IdType.AUTO)
private Long contentId;
/**
* Bucket
*/
private String bucket;
/**
*
*/
private String name;
/**
*
*/
private String size;
/**
*
*/
private String type;
/**
* url
*/
private String url;
/**
*
*/
private String suffix;
/**
*
*/
private LocalDateTime updateTime;
}

@ -0,0 +1,16 @@
package com.wayn.common.core.mapper.tool;
import com.wayn.common.core.domain.tool.QiniuContent;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* Mapper
* </p>
*
* @author wayn
* @since 2020-11-15
*/
public interface QiniuContentMapper extends BaseMapper<QiniuContent> {
}

@ -0,0 +1,16 @@
package com.wayn.common.core.service.tool;
import com.wayn.common.core.domain.tool.QiniuContent;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
*
* </p>
*
* @author wayn
* @since 2020-11-15
*/
public interface IQiniuContentService extends IService<QiniuContent> {
}

@ -0,0 +1,20 @@
package com.wayn.common.core.service.tool.impl;
import com.wayn.common.core.domain.tool.QiniuContent;
import com.wayn.common.core.mapper.tool.QiniuContentMapper;
import com.wayn.common.core.service.tool.IQiniuContentService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
*
* </p>
*
* @author wayn
* @since 2020-11-15
*/
@Service
public class QiniuContentServiceImpl extends ServiceImpl<QiniuContentMapper, QiniuContent> implements IQiniuContentService {
}

@ -0,0 +1,23 @@
<?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.wayn.common.core.mapper.tool.QiniuContentMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.wayn.common.core.domain.tool.QiniuContent">
<id column="content_id" property="contentId" />
<result column="bucket" property="bucket" />
<result column="name" property="name" />
<result column="size" property="size" />
<result column="type" property="type" />
<result column="url" property="url" />
<result column="suffix" property="suffix" />
<result column="update_time" property="updateTime" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
select content_id, bucket, name, size, type, url, suffix, update_time
from qiniu_content
</sql>
</mapper>
Loading…
Cancel
Save