Commit 6d299e29 by 284718418@qq.com

云盘基础代码

parent 585fc50a
package cn.timer.api.bean.disk;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
/**
* 云盘-资源目录表
*
* @author wuqingjun
* @email 284718418@qq.com
* @date 2021-12-27 09:24:49
*/
@Entity
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "disk_catalogue")
@ApiModel("资源目录表")
public class DiskCatalogue extends Model<DiskCatalogue> {
private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "编号")
private Integer id;
/**
* 目录名称
*/
@ApiModelProperty(value = "目录名称")
private String name;
/**
* 上级目录
*/
@ApiModelProperty(value = "上级目录")
private Integer parentId;
/**
* 所有上级目录
*/
@ApiModelProperty(value = "所有上级目录")
private String parentIds;
/**
* 0云盘,1文件夹
*/
@ApiModelProperty(value = "0云盘,1文件夹")
private Integer type;
/**
* 当前企业id
*/
@ApiModelProperty(value = "当前企业id")
private Integer orgId;
/**
* 空间大小,单位kb
*/
@ApiModelProperty(value = "空间大小,单位kb")
private Long size;
/**
* 已使用空间大小,单位kb
*/
@ApiModelProperty(value = "已使用空间大小,单位kb")
private Long usedSize;
/**
* 排序
*/
@ApiModelProperty(value = "排序")
private Integer sort;
/**
* 创建者
*/
@ApiModelProperty(value = "创建者")
private Integer createUserId;
/**
* 更新者
*/
@ApiModelProperty(value = "更新者")
private Integer updateUserId;
/**
* 备注信息
*/
@ApiModelProperty(value = "备注信息")
private String remark;
/**
* 逻辑删除标记0.未删除 1.删除
*/
@ApiModelProperty(value = "逻辑删除标记0.未删除 1.删除")
private Integer deleteFlag;
/**
* 创建时间
*/
@ApiModelProperty(value = "创建时间")
private Date createTime;
/**
* 更新时间
*/
@ApiModelProperty(value = "更新时间")
private Date updateTime;
}
package cn.timer.api.bean.disk;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
/**
* 云盘-资源目录,上传文件中间关系表
*
* @author wuqingjun
* @email 284718418@qq.com
* @date 2021-12-27 09:24:48
*/
@Entity
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "disk_catalogue_files")
@ApiModel("资源目录,上传文件中间关系表")
public class DiskCatalogueFiles extends Model<DiskCatalogueFiles> {
private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "编号")
private Integer id;
/**
* 资源目录表ID
*/
@ApiModelProperty(value = "资源目录表ID")
private Integer catalogueId;
/**
* 资源上传文件表ID
*/
@ApiModelProperty(value = "资源上传文件表ID")
private Integer filesId;
/**
* 逻辑删除标记0.未删除 1.删除
*/
@ApiModelProperty(value = "逻辑删除标记0.未删除 1.删除")
private Integer deleteFlag;
/**
* 创建时间
*/
@ApiModelProperty(value = "创建时间")
private Date createTime;
/**
* 更新时间
*/
@ApiModelProperty(value = "更新时间")
private Date updateTime;
}
package cn.timer.api.bean.disk;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
/**
* 云盘-云空间成员表
*
* @author wuqingjun
* @email 284718418@qq.com
* @date 2021-12-27 09:24:48
*/
@Entity
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "disk_cloud_disk_user")
@ApiModel("云空间成员表")
public class DiskCloudDiskUser extends Model<DiskCloudDiskUser> {
private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "编号")
private Integer id;
/**
* 资源目录表ID
*/
@ApiModelProperty(value = "资源目录表ID")
private Integer catalogueId;
/**
* 当前企业id
*/
@ApiModelProperty(value = "当前企业id")
private Integer orgId;
/**
* 用户ID
*/
@ApiModelProperty(value = "用户ID")
private Integer userId;
/**
* 用户姓名
*/
@ApiModelProperty(value = "用户姓名")
private String userName;
/**
* 用户头像
*/
@ApiModelProperty(value = "用户头像")
private String userHeadUrl;
/**
* 用户类型:0.超级管理员,1.管理员,2.普通用户
*/
@ApiModelProperty(value = "用户类型:0.超级管理员,1.管理员,2.普通用户")
private Integer userRole;
/**
* 用户权限:r查看,w编辑,x删除,d下载:例如rwxd
*/
@ApiModelProperty(value = "用户权限:r查看,w编辑,x删除,d下载:例如rwxd")
private String userPower;
/**
* 逻辑删除标记0.未删除 1.删除
*/
@ApiModelProperty(value = "逻辑删除标记0.未删除 1.删除")
private Integer deleteFlag;
}
package cn.timer.api.bean.disk;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;
/**
* 云盘-文件图标表
*
* @author wuqingjun
* @email 284718418@qq.com
* @date 2021-12-27 09:24:48
*/
@Entity
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "disk_file_image")
@ApiModel("文件图标表")
public class DiskFileImage extends Model<DiskFileImage> {
private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "编号")
private Integer id;
/**
* 图标类型:txt,doc,html,pdf,jpg,png,gif,swf,
*/
@ApiModelProperty(value = "图标类型:txt,doc,html,pdf,jpg,png,gif,swf,")
private Integer type;
/**
* 文件标题
*/
@ApiModelProperty(value = "文件标题")
private String title;
/**
* 文件路径
*/
@ApiModelProperty(value = "文件路径")
private String url;
/**
* 逻辑删除标记0.未删除 1.删除
*/
@ApiModelProperty(value = "逻辑删除标记0.未删除 1.删除")
private Integer deleteFlag;
/**
* 创建者
*/
@ApiModelProperty(value = "创建者")
private Integer createUserId;
/**
* 创建时间
*/
@ApiModelProperty(value = "创建时间")
private Date createTime;
}
package cn.timer.api.bean.disk;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;
/**
* 云盘-资源上传文件表
*
* @author wuqingjun
* @email 284718418@qq.com
* @date 2021-12-27 09:24:48
*/
@Entity
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "disk_files")
@ApiModel("资源上传文件表")
public class DiskFiles extends Model<DiskFiles> {
private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "编号")
private Integer id;
/**
* 文件标题
*/
@ApiModelProperty(value = "文件标题")
private String title;
/**
* 文件路径
*/
@ApiModelProperty(value = "文件路径")
private String urlPath;
/**
* 文件物理路径
*/
@ApiModelProperty(value = "文件物理路径")
private String diskPath;
/**
* 文件大小,单位kb
*/
@ApiModelProperty(value = "文件大小,单位kb")
private Long fileSize;
/**
* 显示大小
*/
@ApiModelProperty(value = "显示大小:10KB,5M,2G")
private Long showSize;
/**
* 文件格式类型
*/
@ApiModelProperty(value = "文件格式类型")
private String fileType;
/**
* 上传文件时的IP
*/
@ApiModelProperty(value = "上传文件时的IP")
private String uploadIp;
/**
* 逻辑删除标记0.未删除 1.删除
*/
@ApiModelProperty(value = "")
private Integer deleteFlag;
/**
* 创建者
*/
@ApiModelProperty(value = "")
private Integer createUserId;
/**
* 更新者
*/
@ApiModelProperty(value = "")
private Integer updateUserId;
/**
* 创建时间
*/
@ApiModelProperty(value = "")
private Date createTime;
/**
* 更新时间
*/
@ApiModelProperty(value = "")
private Date updateTime;
}
package cn.timer.api.bean.disk;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
/**
* 云盘-文件浏览记录表
*
* @author wuqingjun
* @email 284718418@qq.com
* @date 2021-12-27 09:24:49
*/
@Entity
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "disk_file_log")
@ApiModel("文件浏览记录表")
public class DiskFilesLog extends Model<DiskFilesLog> {
private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "编号")
private Integer id;
/**
* 资源上传文件表ID
*/
@ApiModelProperty(value = "资源上传文件表ID")
private Integer filesId;
/**
* 0查看,1下载,2创建
*/
@ApiModelProperty(value = "0查看,1下载,2创建")
private Integer type;
/**
* 文件标题
*/
@ApiModelProperty(value = "文件标题")
private String title;
/**
* 文件路径
*/
@ApiModelProperty(value = "文件路径")
private String filePath;
/**
* 文件大小,单位kb
*/
@ApiModelProperty(value = "文件大小,单位kb")
private Long fileSize;
/**
* 用户ID
*/
@ApiModelProperty(value = "用户ID")
private Integer userId;
/**
* 用户姓名
*/
@ApiModelProperty(value = "用户姓名")
private String userName;
/**
* 创建时间
*/
@ApiModelProperty(value = "创建时间")
private Date createTime;
/**
* 更新时间
*/
@ApiModelProperty(value = "更新时间")
private Date updateTime;
}
package cn.timer.api.bean.disk;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;
/**
* 云盘-文件接收表
*
* @author wuqingjun
* @email 284718418@qq.com
* @date 2021-12-27 09:24:48
*/
@Entity
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "disk_received")
@ApiModel("文件接收表")
public class DiskReceived extends Model<DiskReceived> {
private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "编号")
private Integer id;
/**
* 文件分享表ID
*/
@ApiModelProperty(value = "文件分享表ID")
private Integer shareId;
/**
* 资源上传文件表ID
*/
@ApiModelProperty(value = "资源上传文件表ID")
private Integer filesId;
/**
* 文件标题
*/
@ApiModelProperty(value = "文件标题")
private String title;
/**
* 文件路径
*/
@ApiModelProperty(value = "文件路径")
private String filePath;
/**
* 文件大小
*/
@ApiModelProperty(value = "文件大小")
private Long fileSize;
/**
* 接收用户ID
*/
@ApiModelProperty(value = "接收用户ID")
private Integer userId;
/**
* 接收用户姓名
*/
@ApiModelProperty(value = "接收用户姓名")
private String userName;
/**
* 逻辑删除标记0.未删除 1.删除
*/
@ApiModelProperty(value = "逻辑删除标记0.未删除 1.删除")
private Integer deleteFlag;
/**
* 创建时间
*/
@ApiModelProperty(value = "创建时间")
private Date createTime;
/**
* 更新时间
*/
@ApiModelProperty(value = "更新时间")
private Date updateTime;
}
package cn.timer.api.bean.disk;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;
/**
* 云盘-文件分享表
*
* @author wuqingjun
* @email 284718418@qq.com
* @date 2021-12-27 09:24:48
*/
@Entity
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "disk_share")
@ApiModel("文件分享表")
public class DiskShare extends Model<DiskShare> {
private static final long serialVersionUID = 1L;
/**
* 主键ID
*/
@Id
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "编号")
private Integer id;
/**
* 资源上传文件表ID
*/
@ApiModelProperty(value = "资源上传文件表ID")
private Integer filesId;
/**
* 文件标题
*/
@ApiModelProperty(value = "文件标题")
private String title;
/**
* 文件路径
*/
@ApiModelProperty(value = "文件路径")
private String filePath;
/**
* 用户ID
*/
@ApiModelProperty(value = "用户ID")
private Integer userId;
/**
* 用户姓名
*/
@ApiModelProperty(value = "用户姓名")
private String userName;
/**
* 浏览量
*/
@ApiModelProperty(value = "浏览量")
private Integer views;
/**
* 下载量
*/
@ApiModelProperty(value = "下载量")
private Integer downloads;
/**
* 类型:0查分享,1转发
*/
@ApiModelProperty(value = "类型:0查分享,1转发")
private Integer type;
/**
* 逻辑删除标记0.未删除 1.删除
*/
@ApiModelProperty(value = "逻辑删除标记0.未删除 1.删除")
private Integer deleteFlag;
/**
* 过期时间
*/
@ApiModelProperty(value = "过期时间")
private Date expireTime;
/**
* 创建时间
*/
@ApiModelProperty(value = "创建时间")
private Date createTime;
}
......@@ -249,4 +249,22 @@ public interface JxglEnumInterface {
}
/**
* 云盘-文件夹类型: 0云盘,1文件夹
*/
@Getter
enum DiskCatalogueType implements JxglEnumInterface {
NEED(0, "0云盘"), NOT_NEED(1, "1文件夹");
private Integer type;
private String name;
DiskCatalogueType(Integer type, String name) {
this.type = type;
this.name = name;
}
}
}
package cn.timer.api.controller.disk;
import cn.timer.api.bean.disk.DiskCatalogue;
import cn.timer.api.config.annotation.CurrentUser;
import cn.timer.api.config.annotation.UserBean;
import cn.timer.api.dto.disk.DiskCatalogueDto;
import cn.timer.api.dto.yggl.AddygdaDto;
import cn.timer.api.utils.Result;
import cn.timer.api.utils.ResultUtil;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
import org.springframework.util.StringUtils;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.transaction.Transactional;
/**
* 云盘-资源目录表
*
* @author wuqingjun
* @email 284718418@qq.com
* @date 2021-12-27 10:05:49
*/
@Api(tags = "云盘")
@Transactional(rollbackOn = Exception.class)
@RestController
@RequestMapping(value = "/disk/catalogue", produces = { "application/json" })
public class DiskCatalogueController{
/**
* 云盘-新建文件夹
*
* @param userBean
* @return
*/
@PostMapping(value = "/add_catalogue")
@ApiOperation(value = "1.新建文件夹或共享空间", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 1)
public Result<Object> addygda(@CurrentUser UserBean userBean, @Validated @RequestBody DiskCatalogueDto diskCatalogueDto) {
Integer empNum = userBean.getEmpNum();
Integer orgCode = userBean.getOrgCode();
DiskCatalogue diskCatalogue = new DiskCatalogue();
BeanUtils.copyProperties(diskCatalogueDto,diskCatalogue);
diskCatalogue.setCreateUserId(empNum);
diskCatalogue.setOrgId(orgCode);
Boolean count = diskCatalogue.insert();
if(count){
return ResultUtil.data(diskCatalogue, "新建文件夹成功!");
}else{
return ResultUtil.error("新建文件夹失败!");
}
}
}
package cn.timer.api.controller.disk;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.transaction.Transactional;
/**
* 云盘-资源目录,上传文件中间关系表
*
* @author wuqingjun
* @email 284718418@qq.com
* @date 2021-12-27 10:05:49
*/
@Api(tags = "云盘")
@Transactional(rollbackOn = Exception.class)
@RestController
@RequestMapping("diskcataloguefiles")
public class DiskCatalogueFilesController{
}
package cn.timer.api.controller.disk;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.transaction.Transactional;
/**
* 云盘-云空间成员表
*
* @author wuqingjun
* @email 284718418@qq.com
* @date 2021-12-27 10:05:49
*/
@Api(tags = "云盘")
@Transactional(rollbackOn = Exception.class)
@RestController
@RequestMapping("diskclouddiskuser")
public class DiskCloudDiskUserController{
}
package cn.timer.api.controller.disk;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.transaction.Transactional;
/**
* 云盘-文件图标表
*
* @author wuqingjun
* @email 284718418@qq.com
* @date 2021-12-27 10:05:49
*/
@Api(tags = "云盘")
@Transactional(rollbackOn = Exception.class)
@RestController
@RequestMapping("diskfileimage")
public class DiskFileImageController{
}
package cn.timer.api.controller.disk;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.transaction.Transactional;
/**
* 云盘-资源上传文件表
*
* @author wuqingjun
* @email 284718418@qq.com
* @date 2021-12-27 10:05:49
*/
@Api(tags = "云盘")
@Transactional(rollbackOn = Exception.class)
@RestController
@RequestMapping("diskfiles")
public class DiskFilesController{
}
package cn.timer.api.controller.disk;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.transaction.Transactional;
/**
* 云盘-文件浏览记录表
*
* @author wuqingjun
* @email 284718418@qq.com
* @date 2021-12-27 10:05:49
*/
@Api(tags = "云盘")
@Transactional(rollbackOn = Exception.class)
@RestController
@RequestMapping("diskfileslog")
public class DiskFilesLogController{
}
package cn.timer.api.controller.disk;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.transaction.Transactional;
/**
* 云盘-文件接收表
*
* @author wuqingjun
* @email 284718418@qq.com
* @date 2021-12-27 10:05:49
*/
@Api(tags = "云盘")
@Transactional(rollbackOn = Exception.class)
@RestController
@RequestMapping("diskreceived")
public class DiskReceivedController{
}
package cn.timer.api.controller.disk;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.transaction.Transactional;
/**
* 云盘-文件分享表
*
* @author wuqingjun
* @email 284718418@qq.com
* @date 2021-12-27 10:05:49
*/
@Api(tags = "云盘")
@Transactional(rollbackOn = Exception.class)
@RestController
@RequestMapping("diskshare")
public class DiskShareController{
}
package cn.timer.api.dao.disk;
import cn.timer.api.bean.disk.DiskCatalogueFiles;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
/**
* 云盘-资源目录,上传文件中间关系表
*
* @author wuqingjun
* @email 284718418@qq.com
* @date 2021-12-27 10:05:49
*/
@Repository
public interface DiskCatalogueFilesMapper extends BaseMapper<DiskCatalogueFiles> {
}
package cn.timer.api.dao.disk;
import cn.timer.api.bean.disk.DiskCatalogue;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
/**
* 云盘-资源目录表
*
* @author wuqingjun
* @email 284718418@qq.com
* @date 2021-12-27 10:05:49
*/
@Repository
public interface DiskCatalogueMapper extends BaseMapper<DiskCatalogue> {
}
package cn.timer.api.dao.disk;
import cn.timer.api.bean.disk.DiskCloudDiskUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
/**
* 云盘-云空间成员表
*
* @author wuqingjun
* @email 284718418@qq.com
* @date 2021-12-27 10:05:49
*/
@Repository
public interface DiskCloudDiskUserMapper extends BaseMapper<DiskCloudDiskUser> {
}
package cn.timer.api.dao.disk;
import cn.timer.api.bean.disk.DiskFileImage;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
/**
* 云盘-文件图标表
*
* @author wuqingjun
* @email 284718418@qq.com
* @date 2021-12-27 10:05:49
*/
@Repository
public interface DiskFileImageMapper extends BaseMapper<DiskFileImage> {
}
package cn.timer.api.dao.disk;
import cn.timer.api.bean.disk.DiskFilesLog;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
/**
* 云盘-文件浏览记录表
*
* @author wuqingjun
* @email 284718418@qq.com
* @date 2021-12-27 10:05:49
*/
@Repository
public interface DiskFilesLogMapper extends BaseMapper<DiskFilesLog> {
}
package cn.timer.api.dao.disk;
import cn.timer.api.bean.disk.DiskFiles;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
/**
* 云盘-资源上传文件表
*
* @author wuqingjun
* @email 284718418@qq.com
* @date 2021-12-27 10:05:49
*/
@Repository
public interface DiskFilesMapper extends BaseMapper<DiskFiles> {
}
package cn.timer.api.dao.disk;
import cn.timer.api.bean.disk.DiskReceived;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
/**
* 云盘-文件接收表
*
* @author wuqingjun
* @email 284718418@qq.com
* @date 2021-12-27 10:05:49
*/
@Repository
public interface DiskReceivedMapper extends BaseMapper<DiskReceived> {
}
package cn.timer.api.dao.disk;
import cn.timer.api.bean.disk.DiskShare;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
/**
* 云盘-文件分享表
*
* @author wuqingjun
* @email 284718418@qq.com
* @date 2021-12-27 10:05:49
*/
@Repository
public interface DiskShareMapper extends BaseMapper<DiskShare> {
}
package cn.timer.api.dto.disk;
import cn.timer.api.config.exception.Regular;
import cn.timer.api.config.exception.ValidationMsg;
import cn.timer.api.utils.Page;
import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.Date;
/**
* 云盘-资源目录表
*
* @author wuqingjun
* @email 284718418@qq.com
* @date 2021-12-27 10:05:49
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class DiskCatalogueDto implements Serializable{
private static final long serialVersionUID = -1230023773946170911L;
/**
* 目录名称
*/
@NotBlank(message = ValidationMsg.NOTBLANK)
@ApiModelProperty(value = "目录名称")
private String name;
/**
* 上级目录
*/
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value = "上级目录")
private Integer parentId;
/**
* 所有上级目录
*/
@ApiModelProperty(value = "所有上级目录")
private String parentIds;
/**
* 0云盘,1文件夹
*/
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value = "0云盘,1文件夹")
private Integer type;
/**
* 备注信息
*/
@ApiModelProperty(value = "备注信息")
private String remark;
}
<?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="cn.timer.api.dao.disk.DiskCatalogueFilesMapper">
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="cn.timer.api.bean.disk.DiskCatalogueFiles" id="BaseResultMap">
<id property="id" column="id"/>
<result property="catalogueId" column="catalogue_id"/>
<result property="filesId" column="files_id"/>
<result property="deleteFlag" column="delete_flag"/>
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
</resultMap>
</mapper>
\ No newline at end of file
<?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="cn.timer.api.dao.disk.DiskCatalogueMapper">
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="cn.timer.api.bean.disk.DiskCatalogue" id="BaseResultMap">
<id property="id" column="id"/>
<result property="name" column="name"/>
<result property="parentId" column="parent_id"/>
<result property="parentIds" column="parent_ids"/>
<result property="type" column="type"/>
<result property="orgId" column="org_id"/>
<result property="size" column="size"/>
<result property="usedSize" column="used_size"/>
<result property="sort" column="sort"/>
<result property="createUserId" column="create_user_id"/>
<result property="updateUserId" column="update_user_id"/>
<result property="remark" column="remark"/>
<result property="deleteFlag" column="delete_flag"/>
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
</resultMap>
</mapper>
\ No newline at end of file
<?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="cn.timer.api.dao.disk.DiskCloudDiskUserMapper">
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="cn.timer.api.bean.disk.DiskCloudDiskUser" id="BaseResultMap">
<id property="id" column="id"/>
<result property="catalogueId" column="catalogue_id"/>
<result property="orgId" column="org_id"/>
<result property="userId" column="user_id"/>
<result property="userName" column="user_name"/>
<result property="userHeadUrl" column="user_head_url"/>
<result property="userRole" column="user_role"/>
<result property="userPower" column="user_power"/>
<result property="deleteFlag" column="delete_flag"/>
</resultMap>
</mapper>
\ No newline at end of file
<?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="cn.timer.api.dao.disk.DiskFileImageMapper">
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="cn.timer.api.bean.disk.DiskFileImage" id="BaseResultMap">
<id property="id" column="id"/>
<result property="type" column="type"/>
<result property="title" column="title"/>
<result property="url" column="url"/>
<result property="deleteFlag" column="delete_flag"/>
<result property="createUserId" column="create_user_id"/>
<result property="createTime" column="create_time"/>
</resultMap>
</mapper>
\ No newline at end of file
<?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="cn.timer.api.dao.disk.DiskFilesLogMapper">
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="cn.timer.api.bean.disk.DiskFilesLog" id="BaseResultMap">
<id property="id" column="id"/>
<result property="filesId" column="files_id"/>
<result property="type" column="type"/>
<result property="title" column="title"/>
<result property="filePath" column="file_path"/>
<result property="fileSize" column="file_size"/>
<result property="userId" column="user_id"/>
<result property="userName" column="user_name"/>
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
</resultMap>
</mapper>
\ No newline at end of file
<?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="cn.timer.api.dao.disk.DiskFilesMapper">
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="cn.timer.api.bean.disk.DiskFiles" id="BaseResultMap">
<id property="id" column="id"/>
<result property="title" column="title"/>
<result property="urlPath" column="url_path"/>
<result property="diskPath" column="disk_path"/>
<result property="fileSize" column="file_size"/>
<result property="showSize" column="show_size"/>
<result property="fileType" column="file_type"/>
<result property="uploadIp" column="upload_ip"/>
<result property="deleteFlag" column="delete_flag"/>
<result property="createUserId" column="create_user_id"/>
<result property="updateUserId" column="update_user_id"/>
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
</resultMap>
</mapper>
\ No newline at end of file
<?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="cn.timer.api.dao.disk.DiskReceivedMapper">
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="cn.timer.api.bean.disk.DiskReceived" id="BaseResultMap">
<id property="id" column="id"/>
<result property="shareId" column="share_id"/>
<result property="filesId" column="files_id"/>
<result property="title" column="title"/>
<result property="filePath" column="file_path"/>
<result property="fileSize" column="file_size"/>
<result property="userId" column="user_id"/>
<result property="userName" column="user_name"/>
<result property="deleteFlag" column="delete_flag"/>
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
</resultMap>
</mapper>
\ No newline at end of file
<?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="cn.timer.api.dao.disk.DiskShareMapper">
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="cn.timer.api.bean.disk.DiskShare" id="BaseResultMap">
<id property="id" column="id"/>
<result property="filesId" column="files_id"/>
<result property="title" column="title"/>
<result property="filePath" column="file_path"/>
<result property="userId" column="user_id"/>
<result property="userName" column="user_name"/>
<result property="views" column="views"/>
<result property="downloads" column="downloads"/>
<result property="type" column="type"/>
<result property="deleteFlag" column="delete_flag"/>
<result property="expireTime" column="expire_time"/>
<result property="createTime" column="create_time"/>
</resultMap>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment