文件资源也添加租户信息;首页统计-数量统计,使用排行统计;
This commit is contained in:
parent
f007ff0ff2
commit
2cc30e4315
|
@ -141,9 +141,6 @@ tenant:
|
||||||
- sys_client
|
- sys_client
|
||||||
- sys_oss
|
- sys_oss
|
||||||
- sys_oss_config
|
- sys_oss_config
|
||||||
- sys_oss_resource
|
|
||||||
- sys_oss_textbook
|
|
||||||
- sys_oss_person
|
|
||||||
|
|
||||||
# MyBatisPlus配置
|
# MyBatisPlus配置
|
||||||
# https://baomidou.com/config/
|
# https://baomidou.com/config/
|
||||||
|
|
|
@ -4,10 +4,7 @@ import jakarta.servlet.http.HttpServletResponse;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.dromara.system.service.IFileService;
|
import org.dromara.system.service.IFileService;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>TODO<p>
|
* <p>TODO<p>
|
||||||
|
@ -24,14 +21,12 @@ public class FileController {
|
||||||
|
|
||||||
private final IFileService fileService;
|
private final IFileService fileService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 预览OSS对象
|
* 预览OSS对象
|
||||||
*
|
*
|
||||||
* @param ossId OSS对象ID
|
* @param ossId OSS对象ID
|
||||||
*/
|
*/
|
||||||
//@SaCheckPermission("system:oss:download")
|
//@SaCheckPermission("oss:file:preview")
|
||||||
@PostMapping("/preview/{ossId}")
|
@PostMapping("/preview/{ossId}")
|
||||||
public void preview(@PathVariable Long ossId, HttpServletResponse response) throws Exception {
|
public void preview(@PathVariable Long ossId, HttpServletResponse response) throws Exception {
|
||||||
fileService.preview(ossId, response);
|
fileService.preview(ossId, response);
|
||||||
|
@ -41,4 +36,5 @@ public class FileController {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,68 @@
|
||||||
|
package org.dromara.system.controller.file;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.dromara.common.core.domain.R;
|
||||||
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.system.domain.vo.StatisticNumVo;
|
||||||
|
import org.dromara.system.service.IStatisticService;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>TODO<p>
|
||||||
|
*
|
||||||
|
* @author cjw
|
||||||
|
* @version V1.0.0
|
||||||
|
* @date 2024/6/18 17:16
|
||||||
|
*/
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/statistic")
|
||||||
|
public class StatisticController extends BaseController {
|
||||||
|
|
||||||
|
private final IStatisticService statisticService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取总年级数
|
||||||
|
*/
|
||||||
|
@GetMapping("/grade/num")
|
||||||
|
public R<Integer> getGradeNum() {
|
||||||
|
return R.ok(statisticService.getGradeNum());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取总班级数
|
||||||
|
*/
|
||||||
|
@GetMapping("/class/num")
|
||||||
|
public R<Integer> getClassNum() {
|
||||||
|
return R.ok(statisticService.getCalssNum());
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取总班级数
|
||||||
|
*/
|
||||||
|
@GetMapping("/teacher/num")
|
||||||
|
public R<Integer> getTeacherNum() {
|
||||||
|
return R.ok(statisticService.getTeacherNum());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取总班级数
|
||||||
|
*/
|
||||||
|
@GetMapping("/oss/num")
|
||||||
|
public R<Integer> getOssNum() {
|
||||||
|
return R.ok(statisticService.getOssNum());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 资源使用排行榜
|
||||||
|
*/
|
||||||
|
@GetMapping("/oss/use/rank")
|
||||||
|
public R<List<StatisticNumVo>> getOssUseRank() {
|
||||||
|
return R.ok(statisticService.getOssUseRank());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -127,4 +127,10 @@ public class SysOssPersonController extends BaseController {
|
||||||
public R<Void> move(@RequestBody SysOssPersonBo bo) {
|
public R<Void> move(@RequestBody SysOssPersonBo bo) {
|
||||||
return toAjax(sysOssPersonService.moveByBo(bo));
|
return toAjax(sysOssPersonService.moveByBo(bo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SaCheckPermission("file:person:download")
|
||||||
|
@GetMapping("/download/{id}")
|
||||||
|
public void download(@PathVariable Long id, HttpServletResponse response) throws Exception {
|
||||||
|
sysOssPersonService.download(id, response);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package org.dromara.system.controller.file;
|
package org.dromara.system.controller.file;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import jakarta.validation.constraints.NotEmpty;
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
@ -134,4 +135,9 @@ public class SysOssResourceController extends BaseController {
|
||||||
public R<Void> move(@RequestBody SysOssResourceBo bo) {
|
public R<Void> move(@RequestBody SysOssResourceBo bo) {
|
||||||
return toAjax(sysOssResourceService.moveByBo(bo));
|
return toAjax(sysOssResourceService.moveByBo(bo));
|
||||||
}
|
}
|
||||||
|
@SaCheckPermission("file:resource:download")
|
||||||
|
@GetMapping("/download/{id}")
|
||||||
|
public void download(@PathVariable Long id, HttpServletResponse response) throws Exception {
|
||||||
|
sysOssResourceService.download(id, response);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package org.dromara.system.controller.file;
|
package org.dromara.system.controller.file;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import jakarta.validation.constraints.NotEmpty;
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
@ -137,4 +138,10 @@ public class SysOssTextbookController extends BaseController {
|
||||||
return toAjax(sysOssTextbookService.moveByBo(bo));
|
return toAjax(sysOssTextbookService.moveByBo(bo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SaCheckPermission("file:textbook:download")
|
||||||
|
@GetMapping("/download/{id}")
|
||||||
|
public void download(@PathVariable Long id, HttpServletResponse response) throws Exception {
|
||||||
|
sysOssTextbookService.download(id, response);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
package org.dromara.system.domain;
|
package org.dromara.system.domain;
|
||||||
|
|
||||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
import org.dromara.common.tenant.core.TenantEntity;
|
||||||
|
|
||||||
import java.io.Serial;
|
import java.io.Serial;
|
||||||
|
|
||||||
|
@ -16,34 +17,34 @@ import java.io.Serial;
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@TableName("sys_oss_person")
|
@TableName("sys_oss_person")
|
||||||
public class SysOssPerson extends BaseEntity {
|
public class SysOssPerson extends TenantEntity {
|
||||||
|
|
||||||
@Serial
|
@Serial
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@TableId(value = "id")
|
@TableId(value = "id")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long ossId;
|
private Long ossId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private Long catalogId;
|
private Long catalogId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private String fileName;
|
private String fileName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private String filePath;
|
private String filePath;
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
import org.dromara.common.tenant.core.TenantEntity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 【请填写功能名称】对象 sys_oss_resource
|
* 【请填写功能名称】对象 sys_oss_resource
|
||||||
|
@ -15,7 +15,7 @@ import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@TableName("sys_oss_resource")
|
@TableName("sys_oss_resource")
|
||||||
public class SysOssResource extends BaseEntity {
|
public class SysOssResource extends TenantEntity {
|
||||||
|
|
||||||
@TableId(value = "id")
|
@TableId(value = "id")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
|
@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
import org.dromara.common.tenant.core.TenantEntity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 【请填写功能名称】对象 sys_oss_textbook
|
* 【请填写功能名称】对象 sys_oss_textbook
|
||||||
|
@ -15,7 +15,7 @@ import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@TableName("sys_oss_textbook")
|
@TableName("sys_oss_textbook")
|
||||||
public class SysOssTextbook extends BaseEntity {
|
public class SysOssTextbook extends TenantEntity {
|
||||||
|
|
||||||
@TableId(value = "id")
|
@TableId(value = "id")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
package org.dromara.system.domain.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serial;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>基础统计类<p>
|
||||||
|
*
|
||||||
|
* @author cjw
|
||||||
|
* @version V1.0.0
|
||||||
|
* @date 2024/4/17 15:21
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class StatisticNumVo implements Serializable {
|
||||||
|
|
||||||
|
@Serial
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
private int value;
|
||||||
|
|
||||||
|
private int spareValue;
|
||||||
|
|
||||||
|
@JsonIgnore
|
||||||
|
private String deptName;
|
||||||
|
@JsonIgnore
|
||||||
|
private String parentName;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
package org.dromara.system.mapper;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.dromara.system.domain.vo.StatisticNumVo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface StatisticMapper {
|
||||||
|
int selectGradeNum(String tenantId);
|
||||||
|
int selectCalssNum(String tenantId);
|
||||||
|
int selectTeacherNum(String tenantId);
|
||||||
|
int selectOssNum(String tenantId);
|
||||||
|
|
||||||
|
List<StatisticNumVo> selectOssUse(String tenantId);
|
||||||
|
|
||||||
|
}
|
|
@ -19,6 +19,8 @@ import org.dromara.system.domain.vo.SysOssPersonVo;
|
||||||
public interface SysOssPersonMapper extends BaseMapperPlus<SysOssPerson, SysOssPersonVo> {
|
public interface SysOssPersonMapper extends BaseMapperPlus<SysOssPerson, SysOssPersonVo> {
|
||||||
|
|
||||||
Page<SysOssPersonVo> selectPageList(@Param("page") Page<SysOssPerson> page,
|
Page<SysOssPersonVo> selectPageList(@Param("page") Page<SysOssPerson> page,
|
||||||
@Param(Constants.WRAPPER) Wrapper<SysOssPerson> queryWrapper);
|
@Param(Constants.WRAPPER) Wrapper<SysOssPerson> queryWrapper);
|
||||||
|
|
||||||
|
int addDownloadNum(Long id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,4 +29,6 @@ public interface SysOssResourceMapper extends BaseMapperPlus<SysOssResource, Sys
|
||||||
})
|
})
|
||||||
Page<SysOssResourceVo> selectPageAwaitList(@Param("page") Page<SysOssTextbook> page,
|
Page<SysOssResourceVo> selectPageAwaitList(@Param("page") Page<SysOssTextbook> page,
|
||||||
@Param(Constants.WRAPPER) Wrapper<SysOssTextbook> queryWrapper);
|
@Param(Constants.WRAPPER) Wrapper<SysOssTextbook> queryWrapper);
|
||||||
|
|
||||||
|
int addDownloadNum(Long id);
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,4 +27,6 @@ public interface SysOssTextbookMapper extends BaseMapperPlus<SysOssTextbook, Sys
|
||||||
})
|
})
|
||||||
Page<SysOssTextbookVo> selectPageAwaitList(@Param("page") Page<SysOssTextbook> page,
|
Page<SysOssTextbookVo> selectPageAwaitList(@Param("page") Page<SysOssTextbook> page,
|
||||||
@Param(Constants.WRAPPER) Wrapper<SysOssTextbook> queryWrapper);
|
@Param(Constants.WRAPPER) Wrapper<SysOssTextbook> queryWrapper);
|
||||||
|
|
||||||
|
int addDownloadNum(Long id);
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,4 +14,7 @@ public interface IFileService {
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
void preview(Long ossId, HttpServletResponse response) throws Exception;
|
void preview(Long ossId, HttpServletResponse response) throws Exception;
|
||||||
|
|
||||||
|
void download(Long id, HttpServletResponse response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
package org.dromara.system.service;
|
||||||
|
|
||||||
|
import org.dromara.system.domain.vo.StatisticNumVo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface IStatisticService {
|
||||||
|
int getGradeNum();
|
||||||
|
|
||||||
|
int getCalssNum();
|
||||||
|
|
||||||
|
int getTeacherNum();
|
||||||
|
|
||||||
|
int getOssNum();
|
||||||
|
|
||||||
|
List<StatisticNumVo> getOssUseRank();
|
||||||
|
}
|
|
@ -1,10 +1,12 @@
|
||||||
package org.dromara.system.service;
|
package org.dromara.system.service;
|
||||||
|
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
import org.dromara.system.domain.bo.SysOssPersonBo;
|
import org.dromara.system.domain.bo.SysOssPersonBo;
|
||||||
import org.dromara.system.domain.vo.SysOssPersonVo;
|
import org.dromara.system.domain.vo.SysOssPersonVo;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -68,4 +70,7 @@ public interface ISysOssPersonService {
|
||||||
|
|
||||||
Boolean copyByBo(SysOssPersonBo bo);
|
Boolean copyByBo(SysOssPersonBo bo);
|
||||||
Boolean moveByBo(SysOssPersonBo bo);
|
Boolean moveByBo(SysOssPersonBo bo);
|
||||||
|
|
||||||
|
void download(Long id, HttpServletResponse response) throws IOException;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
package org.dromara.system.service;
|
package org.dromara.system.service;
|
||||||
|
|
||||||
|
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
import org.dromara.system.domain.bo.SysOssResourceBo;
|
import org.dromara.system.domain.bo.SysOssResourceBo;
|
||||||
import org.dromara.system.domain.vo.SysOssResourceVo;
|
import org.dromara.system.domain.vo.SysOssResourceVo;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -79,5 +81,9 @@ public interface ISysOssResourceService {
|
||||||
Boolean reviewByBo(SysOssResourceBo bo);
|
Boolean reviewByBo(SysOssResourceBo bo);
|
||||||
|
|
||||||
Boolean copyByBo(SysOssResourceBo bo);
|
Boolean copyByBo(SysOssResourceBo bo);
|
||||||
|
|
||||||
Boolean moveByBo(SysOssResourceBo bo);
|
Boolean moveByBo(SysOssResourceBo bo);
|
||||||
|
|
||||||
|
void download(Long id, HttpServletResponse response) throws IOException;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package org.dromara.system.service;
|
package org.dromara.system.service;
|
||||||
|
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
import org.dromara.system.domain.bo.SysOssBo;
|
import org.dromara.system.domain.bo.SysOssBo;
|
||||||
|
@ -7,6 +8,7 @@ import org.dromara.system.domain.vo.SysOssVo;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -64,7 +66,7 @@ public interface ISysOssService {
|
||||||
* @param ossId OSS对象ID
|
* @param ossId OSS对象ID
|
||||||
* @param response HttpServletResponse对象,用于设置响应头和向客户端发送文件内容
|
* @param response HttpServletResponse对象,用于设置响应头和向客户端发送文件内容
|
||||||
*/
|
*/
|
||||||
// void download(Long ossId, HttpServletResponse response) throws IOException;
|
void download(Long ossId, HttpServletResponse response) throws IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除OSS对象存储
|
* 删除OSS对象存储
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
package org.dromara.system.service;
|
package org.dromara.system.service;
|
||||||
|
|
||||||
|
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
import org.dromara.system.domain.bo.SysOssTextbookBo;
|
import org.dromara.system.domain.bo.SysOssTextbookBo;
|
||||||
import org.dromara.system.domain.vo.SysOssTextbookVo;
|
import org.dromara.system.domain.vo.SysOssTextbookVo;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -79,4 +81,7 @@ public interface ISysOssTextbookService {
|
||||||
Boolean reviewByBo(SysOssTextbookBo bo);
|
Boolean reviewByBo(SysOssTextbookBo bo);
|
||||||
Boolean copyByBo(SysOssTextbookBo bo);
|
Boolean copyByBo(SysOssTextbookBo bo);
|
||||||
Boolean moveByBo(SysOssTextbookBo bo);
|
Boolean moveByBo(SysOssTextbookBo bo);
|
||||||
|
|
||||||
|
void download(Long id, HttpServletResponse response) throws IOException;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,8 +7,8 @@ import jakarta.servlet.http.HttpServletResponse;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.dromara.common.oss.core.OssClient;
|
import org.dromara.common.oss.core.OssClient;
|
||||||
import org.dromara.common.oss.factory.OssFactory;
|
import org.dromara.common.oss.factory.OssFactory;
|
||||||
import org.dromara.system.service.IFileService;
|
|
||||||
import org.dromara.system.domain.vo.SysOssVo;
|
import org.dromara.system.domain.vo.SysOssVo;
|
||||||
|
import org.dromara.system.service.IFileService;
|
||||||
import org.dromara.system.service.ISysOssService;
|
import org.dromara.system.service.ISysOssService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@ -81,4 +81,9 @@ public class FileService implements IFileService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void download(Long id, HttpServletResponse response) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,53 @@
|
||||||
|
package org.dromara.system.service.impl;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.dromara.common.tenant.helper.TenantHelper;
|
||||||
|
import org.dromara.system.domain.vo.StatisticNumVo;
|
||||||
|
import org.dromara.system.mapper.StatisticMapper;
|
||||||
|
import org.dromara.system.service.IStatisticService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>TODO<p>
|
||||||
|
*
|
||||||
|
* @author cjw
|
||||||
|
* @version V1.0.0
|
||||||
|
* @date 2024/6/18 17:18
|
||||||
|
*/
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Service
|
||||||
|
public class StatisticServiceImpl implements IStatisticService {
|
||||||
|
private final StatisticMapper statisticMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getGradeNum() {
|
||||||
|
String tenantId = TenantHelper.getTenantId();
|
||||||
|
return statisticMapper.selectGradeNum(tenantId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getCalssNum() {
|
||||||
|
String tenantId = TenantHelper.getTenantId();
|
||||||
|
return statisticMapper.selectCalssNum(tenantId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getTeacherNum() {
|
||||||
|
String tenantId = TenantHelper.getTenantId();
|
||||||
|
return statisticMapper.selectTeacherNum(tenantId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getOssNum() {
|
||||||
|
String tenantId = TenantHelper.getTenantId();
|
||||||
|
return statisticMapper.selectOssNum(tenantId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<StatisticNumVo> getOssUseRank() {
|
||||||
|
String tenantId = TenantHelper.getTenantId();
|
||||||
|
return statisticMapper.selectOssUse(tenantId);
|
||||||
|
}
|
||||||
|
}
|
|
@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.dromara.common.core.exception.ServiceException;
|
import org.dromara.common.core.exception.ServiceException;
|
||||||
import org.dromara.common.core.utils.MapstructUtils;
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
|
@ -26,6 +27,7 @@ import org.dromara.system.service.ISysOssPersonService;
|
||||||
import org.dromara.system.service.ISysOssService;
|
import org.dromara.system.service.ISysOssService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -184,4 +186,10 @@ public class SysOssPersonServiceImpl implements ISysOssPersonService {
|
||||||
date.setFilePath(path);
|
date.setFilePath(path);
|
||||||
return date;
|
return date;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void download(Long id, HttpServletResponse response) throws IOException {
|
||||||
|
SysOssPerson ossPerson = baseMapper.selectById(id);
|
||||||
|
ossService.download(ossPerson.getOssId(), response);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.dromara.common.core.exception.ServiceException;
|
import org.dromara.common.core.exception.ServiceException;
|
||||||
import org.dromara.common.core.utils.MapstructUtils;
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
|
@ -26,6 +27,7 @@ import org.dromara.system.service.ISysOssResourceService;
|
||||||
import org.dromara.system.service.ISysOssService;
|
import org.dromara.system.service.ISysOssService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -203,4 +205,11 @@ public class SysOssResourceServiceImpl implements ISysOssResourceService {
|
||||||
date.setStatus(ossResource.getStatus());
|
date.setStatus(ossResource.getStatus());
|
||||||
return date;
|
return date;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void download(Long id, HttpServletResponse response) throws IOException {
|
||||||
|
SysOssResource ossResource = baseMapper.selectById(id);
|
||||||
|
ossService.download(ossResource.getOssId(), response);
|
||||||
|
baseMapper.addDownloadNum(id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@ import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.apache.commons.codec.digest.DigestUtils;
|
import org.apache.commons.codec.digest.DigestUtils;
|
||||||
import org.dromara.common.core.constant.CacheNames;
|
import org.dromara.common.core.constant.CacheNames;
|
||||||
|
@ -17,6 +18,7 @@ import org.dromara.common.core.utils.MapstructUtils;
|
||||||
import org.dromara.common.core.utils.SpringUtils;
|
import org.dromara.common.core.utils.SpringUtils;
|
||||||
import org.dromara.common.core.utils.StreamUtils;
|
import org.dromara.common.core.utils.StreamUtils;
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
|
import org.dromara.common.core.utils.file.FileUtils;
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
import org.dromara.common.oss.core.OssClient;
|
import org.dromara.common.oss.core.OssClient;
|
||||||
|
@ -30,6 +32,7 @@ import org.dromara.system.mapper.SysOssMapper;
|
||||||
import org.dromara.system.service.ISysOssService;
|
import org.dromara.system.service.ISysOssService;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.springframework.cache.annotation.Cacheable;
|
import org.springframework.cache.annotation.Cacheable;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
@ -165,18 +168,18 @@ public class SysOssServiceImpl implements ISysOssService, OssService {
|
||||||
* @param ossId OSS对象ID
|
* @param ossId OSS对象ID
|
||||||
* @param response HttpServletResponse对象,用于设置响应头和向客户端发送文件内容
|
* @param response HttpServletResponse对象,用于设置响应头和向客户端发送文件内容
|
||||||
*/
|
*/
|
||||||
// @Override
|
@Override
|
||||||
// public void download(Long ossId, HttpServletResponse response) throws IOException {
|
public void download(Long ossId, HttpServletResponse response) throws IOException {
|
||||||
// SysOssVo sysOss = SpringUtils.getAopProxy(this).getById(ossId);
|
SysOssVo sysOss = SpringUtils.getAopProxy(this).getById(ossId);
|
||||||
// if (ObjectUtil.isNull(sysOss)) {
|
if (ObjectUtil.isNull(sysOss)) {
|
||||||
// throw new ServiceException("文件数据不存在!");
|
throw new ServiceException("文件数据不存在!");
|
||||||
// }
|
}
|
||||||
// FileUtils.setAttachmentResponseHeader(response, sysOss.getOriginalName());
|
FileUtils.setAttachmentResponseHeader(response, sysOss.getOriginalName());
|
||||||
// response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE + "; charset=UTF-8");
|
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE + "; charset=UTF-8");
|
||||||
// OssClient storage = OssFactory.instance(sysOss.getService());
|
OssClient storage = OssFactory.instance(sysOss.getService());
|
||||||
// long contentLength = storage.download(sysOss.getFileName(), response.getOutputStream());
|
long contentLength = storage.download(sysOss.getFileName(), response.getOutputStream());
|
||||||
// response.setContentLengthLong(contentLength);
|
response.setContentLengthLong(contentLength);
|
||||||
// }
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上传 MultipartFile 到对象存储服务,并保存文件信息到数据库
|
* 上传 MultipartFile 到对象存储服务,并保存文件信息到数据库
|
||||||
|
|
|
@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.dromara.common.core.exception.ServiceException;
|
import org.dromara.common.core.exception.ServiceException;
|
||||||
import org.dromara.common.core.utils.MapstructUtils;
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
|
@ -25,6 +26,7 @@ import org.dromara.system.service.ISysOssService;
|
||||||
import org.dromara.system.service.ISysOssTextbookService;
|
import org.dromara.system.service.ISysOssTextbookService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -72,7 +74,7 @@ public class SysOssTextbookServiceImpl implements ISysOssTextbookService {
|
||||||
@Override
|
@Override
|
||||||
public TableDataInfo<SysOssTextbookVo> queryAwaitPageList(SysOssTextbookBo bo, PageQuery pageQuery) {
|
public TableDataInfo<SysOssTextbookVo> queryAwaitPageList(SysOssTextbookBo bo, PageQuery pageQuery) {
|
||||||
QueryWrapper<SysOssTextbook> wrapper = Wrappers.query();
|
QueryWrapper<SysOssTextbook> wrapper = Wrappers.query();
|
||||||
wrapper.le("ot.status",0);
|
wrapper.le("ot.status", 0);
|
||||||
Page<SysOssTextbookVo> result = baseMapper.selectPageAwaitList(pageQuery.build(), wrapper);
|
Page<SysOssTextbookVo> result = baseMapper.selectPageAwaitList(pageQuery.build(), wrapper);
|
||||||
return TableDataInfo.build(result);
|
return TableDataInfo.build(result);
|
||||||
}
|
}
|
||||||
|
@ -203,4 +205,11 @@ public class SysOssTextbookServiceImpl implements ISysOssTextbookService {
|
||||||
date.setStatus(ossTextbook.getStatus());
|
date.setStatus(ossTextbook.getStatus());
|
||||||
return date;
|
return date;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void download(Long id, HttpServletResponse response) throws IOException {
|
||||||
|
SysOssTextbook ossTextbook = baseMapper.selectById(id);
|
||||||
|
ossService.download(ossTextbook.getOssId(), response);
|
||||||
|
baseMapper.addDownloadNum(id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,47 @@
|
||||||
|
<?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="org.dromara.system.mapper.StatisticMapper">
|
||||||
|
<select id="selectGradeNum" resultType="int">
|
||||||
|
select count(*)
|
||||||
|
from sys_dept
|
||||||
|
where tenant_id = #{tenantId}
|
||||||
|
and parent_id = 100
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectCalssNum" resultType="int">
|
||||||
|
select count(*)
|
||||||
|
from sys_dept d
|
||||||
|
left join sys_dept p on d.parent_id = p.dept_id
|
||||||
|
where d.tenant_id = #{tenantId}
|
||||||
|
and p.parent_id = 100
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectTeacherNum" resultType="int">
|
||||||
|
select count(*)
|
||||||
|
from sys_teacher
|
||||||
|
where tenant_id = #{tenantId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectOssNum" resultType="int">
|
||||||
|
select t.tNum + r.rNum
|
||||||
|
from (select count(*) as tNum from sys_oss_textbook where tenant_id = #{tenantId}) as t,
|
||||||
|
(select count(*) as rNum from sys_oss_resource where tenant_id = #{tenantId}) as r
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectOssUse" resultType="org.dromara.system.domain.vo.StatisticNumVo">
|
||||||
|
select *
|
||||||
|
from (select download_num as value,
|
||||||
|
CONCAT(file_path, '/', file_name) as name
|
||||||
|
from sys_oss_resource
|
||||||
|
where tenant_id = #{tenantId}
|
||||||
|
union all
|
||||||
|
select download_num as value,
|
||||||
|
CONCAT(file_path, '/', file_name) as name
|
||||||
|
from sys_oss_textbook
|
||||||
|
where tenant_id = #{tenantId}) t
|
||||||
|
order by t.value desc
|
||||||
|
limit 10
|
||||||
|
</select>
|
||||||
|
</mapper>
|
|
@ -10,4 +10,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
left join sys_oss o on o.oss_id = op.oss_id
|
left join sys_oss o on o.oss_id = op.oss_id
|
||||||
${ew.getCustomSqlSegment}
|
${ew.getCustomSqlSegment}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<!DOCTYPE mapper
|
<!DOCTYPE mapper
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="org.dromara.system.mapper.SysOssResourceMapper">
|
<mapper namespace="org.dromara.system.mapper.SysOssResourceMapper">
|
||||||
|
|
||||||
<select id="selectPageList" resultType="org.dromara.system.domain.vo.SysOssResourceVo">
|
<select id="selectPageList" resultType="org.dromara.system.domain.vo.SysOssResourceVo">
|
||||||
select r.*, o.file_suffix, o.volume
|
select r.*, o.file_suffix, o.volume
|
||||||
from sys_oss_resource r
|
from sys_oss_resource r
|
||||||
|
@ -17,4 +16,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
left join sys_oss o on o.oss_id = r.oss_id
|
left join sys_oss o on o.oss_id = r.oss_id
|
||||||
${ew.getCustomSqlSegment}
|
${ew.getCustomSqlSegment}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="addDownloadNum" resultType="int">
|
||||||
|
update sys_oss_resource
|
||||||
|
set download_num = download_num + 1
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
@ -5,18 +5,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<mapper namespace="org.dromara.system.mapper.SysOssTextbookMapper">
|
<mapper namespace="org.dromara.system.mapper.SysOssTextbookMapper">
|
||||||
|
|
||||||
<select id="selectPageList" resultType="org.dromara.system.domain.vo.SysOssTextbookVo">
|
<select id="selectPageList" resultType="org.dromara.system.domain.vo.SysOssTextbookVo">
|
||||||
select ot.*,o.file_suffix,o.volume
|
select ot.*, o.file_suffix, o.volume
|
||||||
from sys_oss_textbook ot
|
from sys_oss_textbook ot
|
||||||
left join sys_catalog_textbook ct on ct.catalog_id = ot.catalog_id
|
|
||||||
left join sys_oss o on o.oss_id = ot.oss_id
|
left join sys_oss o on o.oss_id = ot.oss_id
|
||||||
${ew.getCustomSqlSegment}
|
${ew.getCustomSqlSegment}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectPageAwaitList" resultType="org.dromara.system.domain.vo.SysOssTextbookVo">
|
<select id="selectPageAwaitList" resultType="org.dromara.system.domain.vo.SysOssTextbookVo">
|
||||||
select ot.*,o.file_suffix,o.volume
|
select ot.*, o.file_suffix, o.volume
|
||||||
from sys_oss_textbook ot
|
from sys_oss_textbook ot
|
||||||
left join sys_catalog_textbook ct on ct.catalog_id = ot.catalog_id
|
|
||||||
left join sys_oss o on o.oss_id = ot.oss_id
|
left join sys_oss o on o.oss_id = ot.oss_id
|
||||||
${ew.getCustomSqlSegment}
|
${ew.getCustomSqlSegment}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="addDownloadNum" resultType="int">
|
||||||
|
update sys_oss_textbook
|
||||||
|
set download_num = download_num + 1
|
||||||
|
where id = #{id}
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
Loading…
Reference in New Issue