mirror of
https://github.com/YunaiV/ruoyi-vue-pro.git
synced 2026-04-19 13:38:39 +00:00
feat:【infra】【system】新增文件与短信日志详情查询接口
This commit is contained in:
@@ -72,6 +72,14 @@ public class FileController {
|
|||||||
return success(fileService.createFile(createReqVO));
|
return success(fileService.createFile(createReqVO));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/get")
|
||||||
|
@Operation(summary = "获得文件")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
|
@PreAuthorize("@ss.hasPermission('infra:file:query')")
|
||||||
|
public CommonResult<FileRespVO> getFile(@RequestParam("id") Long id) {
|
||||||
|
return success(BeanUtils.toBean(fileService.getFile(id), FileRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
@DeleteMapping("/delete")
|
@DeleteMapping("/delete")
|
||||||
@Operation(summary = "删除文件")
|
@Operation(summary = "删除文件")
|
||||||
@Parameter(name = "id", description = "编号", required = true)
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ public interface FileService {
|
|||||||
* @return 编号
|
* @return 编号
|
||||||
*/
|
*/
|
||||||
Long createFile(FileCreateReqVO createReqVO);
|
Long createFile(FileCreateReqVO createReqVO);
|
||||||
|
FileDO getFile(Long id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除文件
|
* 删除文件
|
||||||
|
|||||||
@@ -152,6 +152,11 @@ public class FileServiceImpl implements FileService {
|
|||||||
return file.getId();
|
return file.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FileDO getFile(Long id) {
|
||||||
|
return validateFileExists(id);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteFile(Long id) throws Exception {
|
public void deleteFile(Long id) throws Exception {
|
||||||
// 校验存在
|
// 校验存在
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import cn.iocoder.yudao.module.system.controller.admin.sms.vo.log.SmsLogRespVO;
|
|||||||
import cn.iocoder.yudao.module.system.dal.dataobject.sms.SmsLogDO;
|
import cn.iocoder.yudao.module.system.dal.dataobject.sms.SmsLogDO;
|
||||||
import cn.iocoder.yudao.module.system.service.sms.SmsLogService;
|
import cn.iocoder.yudao.module.system.service.sms.SmsLogService;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
@@ -18,6 +19,7 @@ import jakarta.validation.Valid;
|
|||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
@@ -44,6 +46,15 @@ public class SmsLogController {
|
|||||||
return success(BeanUtils.toBean(pageResult, SmsLogRespVO.class));
|
return success(BeanUtils.toBean(pageResult, SmsLogRespVO.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/get")
|
||||||
|
@Operation(summary = "获得短信日志")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
|
@PreAuthorize("@ss.hasPermission('system:sms-log:query')")
|
||||||
|
public CommonResult<SmsLogRespVO> getSmsLog(@RequestParam("id") Long id) {
|
||||||
|
SmsLogDO smsLog = smsLogService.getSmsLog(id);
|
||||||
|
return success(BeanUtils.toBean(smsLog, SmsLogRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("/export-excel")
|
@GetMapping("/export-excel")
|
||||||
@Operation(summary = "导出短信日志 Excel")
|
@Operation(summary = "导出短信日志 Excel")
|
||||||
@PreAuthorize("@ss.hasPermission('system:sms-log:export')")
|
@PreAuthorize("@ss.hasPermission('system:sms-log:export')")
|
||||||
|
|||||||
@@ -58,6 +58,14 @@ public interface SmsLogService {
|
|||||||
void updateSmsReceiveResult(Long id, String apiSerialNo, Boolean success,
|
void updateSmsReceiveResult(Long id, String apiSerialNo, Boolean success,
|
||||||
LocalDateTime receiveTime, String apiReceiveCode, String apiReceiveMsg);
|
LocalDateTime receiveTime, String apiReceiveCode, String apiReceiveMsg);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得短信日志
|
||||||
|
*
|
||||||
|
* @param id 日志编号
|
||||||
|
* @return 短信日志
|
||||||
|
*/
|
||||||
|
SmsLogDO getSmsLog(Long id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得短信日志分页
|
* 获得短信日志分页
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -79,6 +79,11 @@ public class SmsLogServiceImpl implements SmsLogService {
|
|||||||
.receiveTime(receiveTime).apiReceiveCode(apiReceiveCode).apiReceiveMsg(apiReceiveMsg).build());
|
.receiveTime(receiveTime).apiReceiveCode(apiReceiveCode).apiReceiveMsg(apiReceiveMsg).build());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SmsLogDO getSmsLog(Long id) {
|
||||||
|
return smsLogMapper.selectById(id);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageResult<SmsLogDO> getSmsLogPage(SmsLogPageReqVO pageReqVO) {
|
public PageResult<SmsLogDO> getSmsLogPage(SmsLogPageReqVO pageReqVO) {
|
||||||
return smsLogMapper.selectPage(pageReqVO);
|
return smsLogMapper.selectPage(pageReqVO);
|
||||||
|
|||||||
Reference in New Issue
Block a user