perf:【INFRA 基础设施】优化一些 todo 提到的问题
This commit is contained in:
parent
064fecf4ee
commit
b9ffa1820d
|
@ -53,4 +53,14 @@ public abstract class BaseDO implements Serializable, TransPojo {
|
||||||
@TableLogic
|
@TableLogic
|
||||||
private Boolean deleted;
|
private Boolean deleted;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 把 creator、createTime、updateTime、updater 都清空,避免前端直接传递 creator 之类的字段,直接就被更新了。
|
||||||
|
*/
|
||||||
|
public void clean(){
|
||||||
|
this.creator = null;
|
||||||
|
this.createTime = null;
|
||||||
|
this.updater = null;
|
||||||
|
this.updateTime = null;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo;
|
package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 基于数据库的表结构,创建代码生成器的表和字段定义 Request VO")
|
@Schema(description = "管理后台 - 基于数据库的表结构,创建代码生成器的表和字段定义 Request VO")
|
||||||
|
|
|
@ -3,10 +3,10 @@ package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo;
|
||||||
import cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.column.CodegenColumnSaveReqVO;
|
import cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.column.CodegenColumnSaveReqVO;
|
||||||
import cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.table.CodegenTableSaveReqVO;
|
import cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.table.CodegenTableSaveReqVO;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 代码生成表和字段的修改 Request VO")
|
@Schema(description = "管理后台 - 代码生成表和字段的修改 Request VO")
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.column;
|
package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.column;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 代码生成字段定义创建/修改 Request VO")
|
@Schema(description = "管理后台 - 代码生成字段定义创建/修改 Request VO")
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -3,8 +3,6 @@ package cn.iocoder.yudao.module.infra.controller.admin.codegen.vo.table;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import lombok.ToString;
|
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
@ -13,8 +11,6 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 表定义分页 Request VO")
|
@Schema(description = "管理后台 - 表定义分页 Request VO")
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@ToString(callSuper = true)
|
|
||||||
public class CodegenTablePageReqVO extends PageParam {
|
public class CodegenTablePageReqVO extends PageParam {
|
||||||
|
|
||||||
@Schema(description = "表名称,模糊匹配", example = "yudao")
|
@Schema(description = "表名称,模糊匹配", example = "yudao")
|
||||||
|
|
|
@ -5,10 +5,9 @@ import cn.iocoder.yudao.module.infra.enums.codegen.CodegenSceneEnum;
|
||||||
import cn.iocoder.yudao.module.infra.enums.codegen.CodegenTemplateTypeEnum;
|
import cn.iocoder.yudao.module.infra.enums.codegen.CodegenTemplateTypeEnum;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import jakarta.validation.constraints.AssertTrue;
|
import jakarta.validation.constraints.AssertTrue;
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 代码生成表定义创建/修改 Response VO")
|
@Schema(description = "管理后台 - 代码生成表定义创建/修改 Response VO")
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -5,7 +5,9 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||||
import cn.iocoder.yudao.module.infra.controller.admin.config.vo.*;
|
import cn.iocoder.yudao.module.infra.controller.admin.config.vo.ConfigPageReqVO;
|
||||||
|
import cn.iocoder.yudao.module.infra.controller.admin.config.vo.ConfigRespVO;
|
||||||
|
import cn.iocoder.yudao.module.infra.controller.admin.config.vo.ConfigSaveReqVO;
|
||||||
import cn.iocoder.yudao.module.infra.convert.config.ConfigConvert;
|
import cn.iocoder.yudao.module.infra.convert.config.ConfigConvert;
|
||||||
import cn.iocoder.yudao.module.infra.dal.dataobject.config.ConfigDO;
|
import cn.iocoder.yudao.module.infra.dal.dataobject.config.ConfigDO;
|
||||||
import cn.iocoder.yudao.module.infra.enums.ErrorCodeConstants;
|
import cn.iocoder.yudao.module.infra.enums.ErrorCodeConstants;
|
||||||
|
@ -13,13 +15,13 @@ import cn.iocoder.yudao.module.infra.service.config.ConfigService;
|
||||||
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.Parameter;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
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.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import jakarta.annotation.Resource;
|
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
|
||||||
import jakarta.validation.Valid;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,6 @@ package cn.iocoder.yudao.module.infra.controller.admin.config.vo;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import lombok.ToString;
|
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
@ -13,8 +11,6 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 参数配置分页 Request VO")
|
@Schema(description = "管理后台 - 参数配置分页 Request VO")
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@ToString(callSuper = true)
|
|
||||||
public class ConfigPageReqVO extends PageParam {
|
public class ConfigPageReqVO extends PageParam {
|
||||||
|
|
||||||
@Schema(description = "数据源名称,模糊匹配", example = "名称")
|
@Schema(description = "数据源名称,模糊匹配", example = "名称")
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
package cn.iocoder.yudao.module.infra.controller.admin.config.vo;
|
package cn.iocoder.yudao.module.infra.controller.admin.config.vo;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import jakarta.validation.constraints.NotEmpty;
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import jakarta.validation.constraints.Size;
|
import jakarta.validation.constraints.Size;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 参数配置创建/修改 Request VO")
|
@Schema(description = "管理后台 - 参数配置创建/修改 Request VO")
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -9,12 +9,12 @@ import cn.iocoder.yudao.module.infra.service.db.DataSourceConfigService;
|
||||||
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.Parameter;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
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.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import jakarta.annotation.Resource;
|
|
||||||
import jakarta.validation.Valid;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package cn.iocoder.yudao.module.infra.controller.admin.db.vo;
|
package cn.iocoder.yudao.module.infra.controller.admin.db.vo;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.*;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import jakarta.validation.constraints.*;
|
import lombok.Data;
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 数据源配置创建/修改 Request VO")
|
@Schema(description = "管理后台 - 数据源配置创建/修改 Request VO")
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -60,12 +60,12 @@ public class Demo01ContactController {
|
||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping("/delete-batch")
|
@DeleteMapping("/delete-list")
|
||||||
@Parameter(name = "ids", description = "编号", required = true)
|
@Parameter(name = "ids", description = "编号", required = true)
|
||||||
@Operation(summary = "批量删除示例联系人")
|
@Operation(summary = "批量删除示例联系人")
|
||||||
@PreAuthorize("@ss.hasPermission('infra:demo01-contact:delete')")
|
@PreAuthorize("@ss.hasPermission('infra:demo01-contact:delete')")
|
||||||
public CommonResult<Boolean> deleteDemo01Contact(@RequestParam("ids") List<Long> ids) {
|
public CommonResult<Boolean> deleteDemo0iContactList(@RequestParam("ids") List<Long> ids) {
|
||||||
demo01ContactService.deleteDemo01ContactByIds(ids);
|
demo01ContactService.deleteDemo0iContactListByIds(ids);
|
||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,6 @@ package cn.iocoder.yudao.module.infra.controller.admin.demo.demo01.vo;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import lombok.ToString;
|
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
@ -13,8 +11,6 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 示例联系人分页 Request VO")
|
@Schema(description = "管理后台 - 示例联系人分页 Request VO")
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@ToString(callSuper = true)
|
|
||||||
public class Demo01ContactPageReqVO extends PageParam {
|
public class Demo01ContactPageReqVO extends PageParam {
|
||||||
|
|
||||||
@Schema(description = "名字", example = "张三")
|
@Schema(description = "名字", example = "张三")
|
||||||
|
|
|
@ -62,12 +62,12 @@ public class Demo03StudentErpController {
|
||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping("/delete-batch")
|
@DeleteMapping("/delete-list")
|
||||||
@Parameter(name = "ids", description = "编号", required = true)
|
@Parameter(name = "ids", description = "编号", required = true)
|
||||||
@Operation(summary = "批量删除学生")
|
@Operation(summary = "批量删除学生")
|
||||||
@PreAuthorize("@ss.hasPermission('infra:demo03-student:delete')")
|
@PreAuthorize("@ss.hasPermission('infra:demo03-student:delete')")
|
||||||
public CommonResult<Boolean> deleteDemo03Student(@RequestParam("ids") List<Long> ids) {
|
public CommonResult<Boolean> deleteDemo03StudentList(@RequestParam("ids") List<Long> ids) {
|
||||||
demo03StudentErpService.deleteDemo03StudentByIds(ids);
|
demo03StudentErpService.deleteDemo03StudentListByIds(ids);
|
||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -136,12 +136,12 @@ public class Demo03StudentErpController {
|
||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping("/demo03-course/delete-batch")
|
@DeleteMapping("/demo03-course/delete-list")
|
||||||
@Parameter(name = "ids", description = "编号", required = true)
|
@Parameter(name = "ids", description = "编号", required = true)
|
||||||
@Operation(summary = "批量删除学生课程")
|
@Operation(summary = "批量删除学生课程")
|
||||||
@PreAuthorize("@ss.hasPermission('infra:demo03-student:delete')")
|
@PreAuthorize("@ss.hasPermission('infra:demo03-student:delete')")
|
||||||
public CommonResult<Boolean> deleteDemo03Course(@RequestParam("ids") List<Long> ids) {
|
public CommonResult<Boolean> deleteDemo03CourseList(@RequestParam("ids") List<Long> ids) {
|
||||||
demo03StudentErpService.deleteDemo03CourseByIds(ids);
|
demo03StudentErpService.deleteDemo03CourseListByIds(ids);
|
||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -188,12 +188,12 @@ public class Demo03StudentErpController {
|
||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping("/demo03-grade/delete-batch")
|
@DeleteMapping("/demo03-grade/delete-list")
|
||||||
@Parameter(name = "ids", description = "编号", required = true)
|
@Parameter(name = "ids", description = "编号", required = true)
|
||||||
@Operation(summary = "批量删除学生班级")
|
@Operation(summary = "批量删除学生班级")
|
||||||
@PreAuthorize("@ss.hasPermission('infra:demo03-student:delete')")
|
@PreAuthorize("@ss.hasPermission('infra:demo03-student:delete')")
|
||||||
public CommonResult<Boolean> deleteDemo03Grade(@RequestParam("ids") List<Long> ids) {
|
public CommonResult<Boolean> deleteDemo03GradeList(@RequestParam("ids") List<Long> ids) {
|
||||||
demo03StudentErpService.deleteDemo03GradeByIds(ids);
|
demo03StudentErpService.deleteDemo03GradeListByIds(ids);
|
||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,6 @@ package cn.iocoder.yudao.module.infra.controller.admin.demo.demo03.erp.vo;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import lombok.ToString;
|
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
@ -13,8 +11,6 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 学生分页 Request VO")
|
@Schema(description = "管理后台 - 学生分页 Request VO")
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@ToString(callSuper = true)
|
|
||||||
public class Demo03StudentErpPageReqVO extends PageParam {
|
public class Demo03StudentErpPageReqVO extends PageParam {
|
||||||
|
|
||||||
@Schema(description = "名字", example = "芋艿")
|
@Schema(description = "名字", example = "芋艿")
|
||||||
|
|
|
@ -62,12 +62,12 @@ public class Demo03StudentInnerController {
|
||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping("/delete-batch")
|
@DeleteMapping("/delete-list")
|
||||||
@Parameter(name = "ids", description = "编号", required = true)
|
@Parameter(name = "ids", description = "编号", required = true)
|
||||||
@Operation(summary = "批量删除学生")
|
@Operation(summary = "批量删除学生")
|
||||||
@PreAuthorize("@ss.hasPermission('infra:demo03-student:delete')")
|
@PreAuthorize("@ss.hasPermission('infra:demo03-student:delete')")
|
||||||
public CommonResult<Boolean> deleteDemo03Student(@RequestParam("ids") List<Long> ids) {
|
public CommonResult<Boolean> deleteDemo03StudentList(@RequestParam("ids") List<Long> ids) {
|
||||||
demo03StudentInnerService.deleteDemo03StudentByIds(ids);
|
demo03StudentInnerService.deleteDemo03StudentListByIds(ids);
|
||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,6 @@ package cn.iocoder.yudao.module.infra.controller.admin.demo.demo03.inner.vo;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import lombok.ToString;
|
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
@ -13,8 +11,6 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 学生分页 Request VO")
|
@Schema(description = "管理后台 - 学生分页 Request VO")
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@ToString(callSuper = true)
|
|
||||||
public class Demo03StudentInnerPageReqVO extends PageParam {
|
public class Demo03StudentInnerPageReqVO extends PageParam {
|
||||||
|
|
||||||
@Schema(description = "名字", example = "芋艿")
|
@Schema(description = "名字", example = "芋艿")
|
||||||
|
|
|
@ -62,12 +62,12 @@ public class Demo03StudentNormalController {
|
||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping("/delete-batch")
|
@DeleteMapping("/delete-list")
|
||||||
@Parameter(name = "ids", description = "编号", required = true)
|
@Parameter(name = "ids", description = "编号", required = true)
|
||||||
@Operation(summary = "批量删除学生")
|
@Operation(summary = "批量删除学生")
|
||||||
@PreAuthorize("@ss.hasPermission('infra:demo03-student:delete')")
|
@PreAuthorize("@ss.hasPermission('infra:demo03-student:delete')")
|
||||||
public CommonResult<Boolean> deleteDemo03Student(@RequestParam("ids") List<Long> ids) {
|
public CommonResult<Boolean> deleteDemo03StudentList(@RequestParam("ids") List<Long> ids) {
|
||||||
demo03StudentNormalService.deleteDemo03StudentByIds(ids);
|
demo03StudentNormalService.deleteDemo03StudentListByIds(ids);
|
||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,6 @@ package cn.iocoder.yudao.module.infra.controller.admin.demo.demo03.normal.vo;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import lombok.ToString;
|
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
@ -13,8 +11,6 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 学生分页 Request VO")
|
@Schema(description = "管理后台 - 学生分页 Request VO")
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@ToString(callSuper = true)
|
|
||||||
public class Demo03StudentNormalPageReqVO extends PageParam {
|
public class Demo03StudentNormalPageReqVO extends PageParam {
|
||||||
|
|
||||||
@Schema(description = "名字", example = "芋艿")
|
@Schema(description = "名字", example = "芋艿")
|
||||||
|
|
|
@ -11,13 +11,12 @@ import cn.iocoder.yudao.module.infra.service.file.FileConfigService;
|
||||||
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.Parameter;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
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.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import jakarta.annotation.Resource;
|
|
||||||
import jakarta.validation.Valid;
|
|
||||||
|
|
||||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||||
|
|
||||||
@Tag(name = "管理后台 - 文件配置")
|
@Tag(name = "管理后台 - 文件配置")
|
||||||
|
|
|
@ -3,8 +3,6 @@ package cn.iocoder.yudao.module.infra.controller.admin.file.vo.config;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import lombok.ToString;
|
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
@ -13,8 +11,6 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 文件配置分页 Request VO")
|
@Schema(description = "管理后台 - 文件配置分页 Request VO")
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@ToString(callSuper = true)
|
|
||||||
public class FileConfigPageReqVO extends PageParam {
|
public class FileConfigPageReqVO extends PageParam {
|
||||||
|
|
||||||
@Schema(description = "配置名", example = "S3 - 阿里云")
|
@Schema(description = "配置名", example = "S3 - 阿里云")
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package cn.iocoder.yudao.module.infra.controller.admin.file.vo.config;
|
package cn.iocoder.yudao.module.infra.controller.admin.file.vo.config;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 文件配置创建/修改 Request VO")
|
@Schema(description = "管理后台 - 文件配置创建/修改 Request VO")
|
||||||
|
|
|
@ -3,8 +3,6 @@ package cn.iocoder.yudao.module.infra.controller.admin.file.vo.file;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import lombok.ToString;
|
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
@ -13,8 +11,6 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 文件分页 Request VO")
|
@Schema(description = "管理后台 - 文件分页 Request VO")
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@ToString(callSuper = true)
|
|
||||||
public class FilePageReqVO extends PageParam {
|
public class FilePageReqVO extends PageParam {
|
||||||
|
|
||||||
@Schema(description = "文件路径,模糊匹配", example = "yudao")
|
@Schema(description = "文件路径,模糊匹配", example = "yudao")
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
package cn.iocoder.yudao.module.infra.controller.admin.file.vo.file;
|
package cn.iocoder.yudao.module.infra.controller.admin.file.vo.file;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 上传文件 Request VO")
|
@Schema(description = "管理后台 - 上传文件 Request VO")
|
||||||
@Data
|
@Data
|
||||||
public class FileUploadReqVO {
|
public class FileUploadReqVO {
|
||||||
|
|
|
@ -3,13 +3,9 @@ package cn.iocoder.yudao.module.infra.controller.admin.job.vo.job;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import lombok.ToString;
|
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 定时任务分页 Request VO")
|
@Schema(description = "管理后台 - 定时任务分页 Request VO")
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@ToString(callSuper = true)
|
|
||||||
public class JobPageReqVO extends PageParam {
|
public class JobPageReqVO extends PageParam {
|
||||||
|
|
||||||
@Schema(description = "任务名称,模糊匹配", example = "测试任务")
|
@Schema(description = "任务名称,模糊匹配", example = "测试任务")
|
||||||
|
|
|
@ -6,9 +6,9 @@ import cn.iocoder.yudao.module.infra.enums.DictTypeConstants;
|
||||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 定时任务 Response VO")
|
@Schema(description = "管理后台 - 定时任务 Response VO")
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
package cn.iocoder.yudao.module.infra.controller.admin.job.vo.job;
|
package cn.iocoder.yudao.module.infra.controller.admin.job.vo.job;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotEmpty;
|
import jakarta.validation.constraints.NotEmpty;
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 定时任务创建/修改 Request VO")
|
@Schema(description = "管理后台 - 定时任务创建/修改 Request VO")
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -3,8 +3,6 @@ package cn.iocoder.yudao.module.infra.controller.admin.job.vo.log;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import lombok.ToString;
|
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
@ -13,8 +11,6 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 定时任务日志分页 Request VO")
|
@Schema(description = "管理后台 - 定时任务日志分页 Request VO")
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@ToString(callSuper = true)
|
|
||||||
public class JobLogPageReqVO extends PageParam {
|
public class JobLogPageReqVO extends PageParam {
|
||||||
|
|
||||||
@Schema(description = "任务编号", example = "10")
|
@Schema(description = "任务编号", example = "10")
|
||||||
|
|
|
@ -12,15 +12,15 @@ import cn.iocoder.yudao.module.infra.dal.dataobject.logger.ApiAccessLogDO;
|
||||||
import cn.iocoder.yudao.module.infra.service.logger.ApiAccessLogService;
|
import cn.iocoder.yudao.module.infra.service.logger.ApiAccessLogService;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
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.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import jakarta.annotation.Resource;
|
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
|
||||||
import jakarta.validation.Valid;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
|
@ -14,13 +14,13 @@ import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
import io.swagger.v3.oas.annotations.Parameters;
|
import io.swagger.v3.oas.annotations.Parameters;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
|
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.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import jakarta.annotation.Resource;
|
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
|
||||||
import jakarta.validation.Valid;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,6 @@ package cn.iocoder.yudao.module.infra.controller.admin.logger.vo.apiaccesslog;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import lombok.ToString;
|
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
@ -13,8 +11,6 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
|
||||||
|
|
||||||
@Schema(description = "管理后台 - API 访问日志分页 Request VO")
|
@Schema(description = "管理后台 - API 访问日志分页 Request VO")
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@ToString(callSuper = true)
|
|
||||||
public class ApiAccessLogPageReqVO extends PageParam {
|
public class ApiAccessLogPageReqVO extends PageParam {
|
||||||
|
|
||||||
@Schema(description = "用户编号", example = "666")
|
@Schema(description = "用户编号", example = "666")
|
||||||
|
|
|
@ -3,8 +3,6 @@ package cn.iocoder.yudao.module.infra.controller.admin.logger.vo.apierrorlog;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import lombok.ToString;
|
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
@ -13,8 +11,6 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
|
||||||
|
|
||||||
@Schema(description = "管理后台 - API 错误日志分页 Request VO")
|
@Schema(description = "管理后台 - API 错误日志分页 Request VO")
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@ToString(callSuper = true)
|
|
||||||
public class ApiErrorLogPageReqVO extends PageParam {
|
public class ApiErrorLogPageReqVO extends PageParam {
|
||||||
|
|
||||||
@Schema(description = "用户编号", example = "666")
|
@Schema(description = "用户编号", example = "666")
|
||||||
|
|
|
@ -5,6 +5,7 @@ import cn.iocoder.yudao.module.infra.controller.admin.redis.vo.RedisMonitorRespV
|
||||||
import cn.iocoder.yudao.module.infra.convert.redis.RedisConvert;
|
import cn.iocoder.yudao.module.infra.convert.redis.RedisConvert;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.data.redis.connection.RedisServerCommands;
|
import org.springframework.data.redis.connection.RedisServerCommands;
|
||||||
import org.springframework.data.redis.core.RedisCallback;
|
import org.springframework.data.redis.core.RedisCallback;
|
||||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||||
|
@ -13,7 +14,6 @@ import org.springframework.web.bind.annotation.GetMapping;
|
||||||
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;
|
||||||
|
|
||||||
import jakarta.annotation.Resource;
|
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
package cn.iocoder.yudao.module.infra.controller.app.file.vo;
|
package cn.iocoder.yudao.module.infra.controller.app.file.vo;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
|
||||||
|
|
||||||
@Schema(description = "用户 App - 上传文件 Request VO")
|
@Schema(description = "用户 App - 上传文件 Request VO")
|
||||||
@Data
|
@Data
|
||||||
public class AppFileUploadReqVO {
|
public class AppFileUploadReqVO {
|
||||||
|
|
|
@ -79,7 +79,8 @@ public class FileConfigDO extends BaseDO {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object parse(String json) {
|
public Object parse(String json) {
|
||||||
FileClientConfig config = JsonUtils.parseObjectQuietly(json, new TypeReference<>() {});
|
FileClientConfig config = JsonUtils.parseObjectQuietly(json, new TypeReference<>() {
|
||||||
|
});
|
||||||
if (config != null) {
|
if (config != null) {
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,6 +39,6 @@ public interface ApiErrorLogMapper extends BaseMapperX<ApiErrorLogDO> {
|
||||||
* @return 删除条数
|
* @return 删除条数
|
||||||
*/
|
*/
|
||||||
@Delete("DELETE FROM infra_api_error_log WHERE create_time < #{createTime} LIMIT #{limit}")
|
@Delete("DELETE FROM infra_api_error_log WHERE create_time < #{createTime} LIMIT #{limit}")
|
||||||
Integer deleteByCreateTimeLt(@Param("createTime") LocalDateTime createTime, @Param("limit")Integer limit);
|
Integer deleteByCreateTimeLt(@Param("createTime") LocalDateTime createTime, @Param("limit") Integer limit);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -214,7 +214,6 @@ public class CodegenBuilder {
|
||||||
// description、memo、remark
|
// description、memo、remark
|
||||||
if (StrUtil.endWithAnyIgnoreCase(column.getColumnName(), "description", "memo", "remark")) {
|
if (StrUtil.endWithAnyIgnoreCase(column.getColumnName(), "description", "memo", "remark")) {
|
||||||
column.setExample(randomEle(new String[]{"你猜", "随便", "你说的对"}));
|
column.setExample(randomEle(new String[]{"你猜", "随便", "你说的对"}));
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
import cn.iocoder.yudao.module.infra.controller.admin.config.vo.ConfigPageReqVO;
|
import cn.iocoder.yudao.module.infra.controller.admin.config.vo.ConfigPageReqVO;
|
||||||
import cn.iocoder.yudao.module.infra.controller.admin.config.vo.ConfigSaveReqVO;
|
import cn.iocoder.yudao.module.infra.controller.admin.config.vo.ConfigSaveReqVO;
|
||||||
import cn.iocoder.yudao.module.infra.dal.dataobject.config.ConfigDO;
|
import cn.iocoder.yudao.module.infra.dal.dataobject.config.ConfigDO;
|
||||||
|
|
||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -8,12 +8,11 @@ import cn.iocoder.yudao.module.infra.dal.dataobject.config.ConfigDO;
|
||||||
import cn.iocoder.yudao.module.infra.dal.mysql.config.ConfigMapper;
|
import cn.iocoder.yudao.module.infra.dal.mysql.config.ConfigMapper;
|
||||||
import cn.iocoder.yudao.module.infra.enums.config.ConfigTypeEnum;
|
import cn.iocoder.yudao.module.infra.enums.config.ConfigTypeEnum;
|
||||||
import com.google.common.annotations.VisibleForTesting;
|
import com.google.common.annotations.VisibleForTesting;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
import jakarta.annotation.Resource;
|
|
||||||
|
|
||||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||||
import static cn.iocoder.yudao.module.infra.enums.ErrorCodeConstants.*;
|
import static cn.iocoder.yudao.module.infra.enums.ErrorCodeConstants.*;
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,8 @@ package cn.iocoder.yudao.module.infra.service.db;
|
||||||
|
|
||||||
import cn.iocoder.yudao.module.infra.controller.admin.db.vo.DataSourceConfigSaveReqVO;
|
import cn.iocoder.yudao.module.infra.controller.admin.db.vo.DataSourceConfigSaveReqVO;
|
||||||
import cn.iocoder.yudao.module.infra.dal.dataobject.db.DataSourceConfigDO;
|
import cn.iocoder.yudao.module.infra.dal.dataobject.db.DataSourceConfigDO;
|
||||||
|
|
||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -7,10 +7,10 @@ import cn.iocoder.yudao.module.infra.dal.dataobject.db.DataSourceConfigDO;
|
||||||
import cn.iocoder.yudao.module.infra.dal.mysql.db.DataSourceConfigMapper;
|
import cn.iocoder.yudao.module.infra.dal.mysql.db.DataSourceConfigMapper;
|
||||||
import com.baomidou.dynamic.datasource.creator.DataSourceProperty;
|
import com.baomidou.dynamic.datasource.creator.DataSourceProperty;
|
||||||
import com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceProperties;
|
import com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceProperties;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
import jakarta.annotation.Resource;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ public interface Demo01ContactService {
|
||||||
*
|
*
|
||||||
* @param ids 编号
|
* @param ids 编号
|
||||||
*/
|
*/
|
||||||
void deleteDemo01ContactByIds(List<Long> ids);
|
void deleteDemo0iContactListByIds(List<Long> ids);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得示例联系人
|
* 获得示例联系人
|
||||||
|
|
|
@ -55,7 +55,7 @@ public class Demo01ContactServiceImpl implements Demo01ContactService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteDemo01ContactByIds(List<Long> ids) {
|
public void deleteDemo0iContactListByIds(List<Long> ids) {
|
||||||
// 校验存在
|
// 校验存在
|
||||||
validateDemo01ContactExists(ids);
|
validateDemo01ContactExists(ids);
|
||||||
// 删除
|
// 删除
|
||||||
|
|
|
@ -45,7 +45,7 @@ public interface Demo03StudentErpService {
|
||||||
*
|
*
|
||||||
* @param ids 编号
|
* @param ids 编号
|
||||||
*/
|
*/
|
||||||
void deleteDemo03StudentByIds(List<Long> ids);
|
void deleteDemo03StudentListByIds(List<Long> ids);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得学生
|
* 获得学生
|
||||||
|
@ -101,7 +101,7 @@ public interface Demo03StudentErpService {
|
||||||
*
|
*
|
||||||
* @param ids 编号
|
* @param ids 编号
|
||||||
*/
|
*/
|
||||||
void deleteDemo03CourseByIds(List<Long> ids);
|
void deleteDemo03CourseListByIds(List<Long> ids);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得学生课程
|
* 获得学生课程
|
||||||
|
@ -149,7 +149,7 @@ public interface Demo03StudentErpService {
|
||||||
*
|
*
|
||||||
* @param ids 编号
|
* @param ids 编号
|
||||||
*/
|
*/
|
||||||
void deleteDemo03GradeByIds(List<Long> ids);
|
void deleteDemo03GradeListByIds(List<Long> ids);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得学生班级
|
* 获得学生班级
|
||||||
|
|
|
@ -71,7 +71,7 @@ public class Demo03StudentErpServiceImpl implements Demo03StudentErpService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void deleteDemo03StudentByIds(List<Long> ids) {
|
public void deleteDemo03StudentListByIds(List<Long> ids) {
|
||||||
// 校验存在
|
// 校验存在
|
||||||
validateDemo03StudentExists(ids);
|
validateDemo03StudentExists(ids);
|
||||||
// 删除
|
// 删除
|
||||||
|
@ -123,7 +123,7 @@ public class Demo03StudentErpServiceImpl implements Demo03StudentErpService {
|
||||||
// 校验存在
|
// 校验存在
|
||||||
validateDemo03CourseExists(demo03Course.getId());
|
validateDemo03CourseExists(demo03Course.getId());
|
||||||
// 更新
|
// 更新
|
||||||
demo03Course.setUpdater(null).setUpdateTime(null); // 解决更新情况下:updateTime 不更新
|
demo03Course.clean();
|
||||||
demo03CourseErpMapper.updateById(demo03Course);
|
demo03CourseErpMapper.updateById(demo03Course);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -136,7 +136,7 @@ public class Demo03StudentErpServiceImpl implements Demo03StudentErpService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteDemo03CourseByIds(List<Long> ids) {
|
public void deleteDemo03CourseListByIds(List<Long> ids) {
|
||||||
// 校验存在
|
// 校验存在
|
||||||
validateDemo03CourseExists(ids);
|
validateDemo03CourseExists(ids);
|
||||||
// 删除
|
// 删除
|
||||||
|
@ -192,7 +192,7 @@ public class Demo03StudentErpServiceImpl implements Demo03StudentErpService {
|
||||||
// 校验存在
|
// 校验存在
|
||||||
validateDemo03GradeExists(demo03Grade.getId());
|
validateDemo03GradeExists(demo03Grade.getId());
|
||||||
// 更新
|
// 更新
|
||||||
demo03Grade.setUpdater(null).setUpdateTime(null); // 解决更新情况下:updateTime 不更新
|
demo03Grade.clean();
|
||||||
demo03GradeErpMapper.updateById(demo03Grade);
|
demo03GradeErpMapper.updateById(demo03Grade);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -205,7 +205,7 @@ public class Demo03StudentErpServiceImpl implements Demo03StudentErpService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteDemo03GradeByIds(List<Long> ids) {
|
public void deleteDemo03GradeListByIds(List<Long> ids) {
|
||||||
// 校验存在
|
// 校验存在
|
||||||
validateDemo03GradeExists(ids);
|
validateDemo03GradeExists(ids);
|
||||||
// 删除
|
// 删除
|
||||||
|
|
|
@ -44,7 +44,7 @@ public interface Demo03StudentInnerService {
|
||||||
*
|
*
|
||||||
* @param ids 编号
|
* @param ids 编号
|
||||||
*/
|
*/
|
||||||
void deleteDemo03StudentByIds(List<Long> ids);
|
void deleteDemo03StudentListByIds(List<Long> ids);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得学生
|
* 获得学生
|
||||||
|
|
|
@ -83,7 +83,7 @@ public class Demo03StudentInnerServiceImpl implements Demo03StudentInnerService
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void deleteDemo03StudentByIds(List<Long> ids) {
|
public void deleteDemo03StudentListByIds(List<Long> ids) {
|
||||||
// 校验存在
|
// 校验存在
|
||||||
validateDemo03StudentExists(ids);
|
validateDemo03StudentExists(ids);
|
||||||
// 删除
|
// 删除
|
||||||
|
@ -125,17 +125,17 @@ public class Demo03StudentInnerServiceImpl implements Demo03StudentInnerService
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createDemo03CourseList(Long studentId, List<Demo03CourseDO> list) {
|
private void createDemo03CourseList(Long studentId, List<Demo03CourseDO> list) {
|
||||||
list.forEach(o -> o.setStudentId(studentId));
|
list.forEach(o -> o.setStudentId(studentId).clean());
|
||||||
demo03CourseInnerMapper.insertBatch(list);
|
demo03CourseInnerMapper.insertBatch(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateDemo03CourseList(Long studentId, List<Demo03CourseDO> list) {
|
private void updateDemo03CourseList(Long studentId, List<Demo03CourseDO> list) {
|
||||||
list.forEach(o -> o.setStudentId(studentId));
|
list.forEach(o -> o.setStudentId(studentId).clean());
|
||||||
List<Demo03CourseDO> oldList = demo03CourseInnerMapper.selectListByStudentId(studentId);
|
List<Demo03CourseDO> oldList = demo03CourseInnerMapper.selectListByStudentId(studentId);
|
||||||
List<List<Demo03CourseDO>> diffList = diffList(oldList, list, (oldVal, newVal) -> {
|
List<List<Demo03CourseDO>> diffList = diffList(oldList, list, (oldVal, newVal) -> {
|
||||||
boolean same = ObjectUtil.equal(oldVal.getId(), newVal.getId());
|
boolean same = ObjectUtil.equal(oldVal.getId(), newVal.getId());
|
||||||
if (same) {
|
if (same) {
|
||||||
newVal.setId(oldVal.getId()).setUpdater(null).setUpdateTime(null); // 解决更新情况下:updateTime 不更新
|
newVal.setId(oldVal.getId());
|
||||||
}
|
}
|
||||||
return same;
|
return same;
|
||||||
});
|
});
|
||||||
|
@ -179,8 +179,7 @@ public class Demo03StudentInnerServiceImpl implements Demo03StudentInnerService
|
||||||
if (demo03Grade == null) {
|
if (demo03Grade == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
demo03Grade.setStudentId(studentId);
|
demo03Grade.setStudentId(studentId).clean();
|
||||||
demo03Grade.setUpdater(null).setUpdateTime(null); // 解决更新情况下:updateTime 不更新
|
|
||||||
demo03GradeInnerMapper.insertOrUpdate(demo03Grade);
|
demo03GradeInnerMapper.insertOrUpdate(demo03Grade);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ public interface Demo03StudentNormalService {
|
||||||
*
|
*
|
||||||
* @param ids 编号
|
* @param ids 编号
|
||||||
*/
|
*/
|
||||||
void deleteDemo03StudentByIds(List<Long> ids);
|
void deleteDemo03StudentListByIds(List<Long> ids);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得学生
|
* 获得学生
|
||||||
|
|
|
@ -83,7 +83,7 @@ public class Demo03StudentNormalServiceImpl implements Demo03StudentNormalServic
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void deleteDemo03StudentByIds(List<Long> ids) {
|
public void deleteDemo03StudentListByIds(List<Long> ids) {
|
||||||
// 校验存在
|
// 校验存在
|
||||||
validateDemo03StudentExists(ids);
|
validateDemo03StudentExists(ids);
|
||||||
// 删除
|
// 删除
|
||||||
|
@ -125,17 +125,17 @@ public class Demo03StudentNormalServiceImpl implements Demo03StudentNormalServic
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createDemo03CourseList(Long studentId, List<Demo03CourseDO> list) {
|
private void createDemo03CourseList(Long studentId, List<Demo03CourseDO> list) {
|
||||||
list.forEach(o -> o.setStudentId(studentId));
|
list.forEach(o -> o.setStudentId(studentId).clean());
|
||||||
demo03CourseNormalMapper.insertBatch(list);
|
demo03CourseNormalMapper.insertBatch(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateDemo03CourseList(Long studentId, List<Demo03CourseDO> list) {
|
private void updateDemo03CourseList(Long studentId, List<Demo03CourseDO> list) {
|
||||||
list.forEach(o -> o.setStudentId(studentId));
|
list.forEach(o -> o.setStudentId(studentId).clean());
|
||||||
List<Demo03CourseDO> oldList = demo03CourseNormalMapper.selectListByStudentId(studentId);
|
List<Demo03CourseDO> oldList = demo03CourseNormalMapper.selectListByStudentId(studentId);
|
||||||
List<List<Demo03CourseDO>> diffList = diffList(oldList, list, (oldVal, newVal) -> {
|
List<List<Demo03CourseDO>> diffList = diffList(oldList, list, (oldVal, newVal) -> {
|
||||||
boolean same = ObjectUtil.equal(oldVal.getId(), newVal.getId());
|
boolean same = ObjectUtil.equal(oldVal.getId(), newVal.getId());
|
||||||
if (same) {
|
if (same) {
|
||||||
newVal.setId(oldVal.getId()).setUpdater(null).setUpdateTime(null); // 解决更新情况下:updateTime 不更新
|
newVal.setId(oldVal.getId());
|
||||||
}
|
}
|
||||||
return same;
|
return same;
|
||||||
});
|
});
|
||||||
|
@ -179,8 +179,7 @@ public class Demo03StudentNormalServiceImpl implements Demo03StudentNormalServic
|
||||||
if (demo03Grade == null) {
|
if (demo03Grade == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
demo03Grade.setStudentId(studentId);
|
demo03Grade.setStudentId(studentId).clean();
|
||||||
demo03Grade.setUpdater(null).setUpdateTime(null); // 解决更新情况下:updateTime 不更新
|
|
||||||
demo03GradeNormalMapper.insertOrUpdate(demo03Grade);
|
demo03GradeNormalMapper.insertOrUpdate(demo03Grade);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
package cn.iocoder.yudao.module.infra.service.file;
|
package cn.iocoder.yudao.module.infra.service.file;
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
import cn.iocoder.yudao.module.infra.framework.file.core.client.FileClient;
|
|
||||||
import cn.iocoder.yudao.module.infra.controller.admin.file.vo.config.FileConfigPageReqVO;
|
import cn.iocoder.yudao.module.infra.controller.admin.file.vo.config.FileConfigPageReqVO;
|
||||||
import cn.iocoder.yudao.module.infra.controller.admin.file.vo.config.FileConfigSaveReqVO;
|
import cn.iocoder.yudao.module.infra.controller.admin.file.vo.config.FileConfigSaveReqVO;
|
||||||
import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileConfigDO;
|
import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileConfigDO;
|
||||||
|
import cn.iocoder.yudao.module.infra.framework.file.core.client.FileClient;
|
||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -5,25 +5,25 @@ import cn.hutool.core.util.IdUtil;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
import cn.iocoder.yudao.framework.common.util.json.JsonUtils;
|
import cn.iocoder.yudao.framework.common.util.json.JsonUtils;
|
||||||
import cn.iocoder.yudao.framework.common.util.validation.ValidationUtils;
|
import cn.iocoder.yudao.framework.common.util.validation.ValidationUtils;
|
||||||
import cn.iocoder.yudao.module.infra.framework.file.core.client.FileClient;
|
|
||||||
import cn.iocoder.yudao.module.infra.framework.file.core.client.FileClientConfig;
|
|
||||||
import cn.iocoder.yudao.module.infra.framework.file.core.client.FileClientFactory;
|
|
||||||
import cn.iocoder.yudao.module.infra.framework.file.core.enums.FileStorageEnum;
|
|
||||||
import cn.iocoder.yudao.module.infra.controller.admin.file.vo.config.FileConfigPageReqVO;
|
import cn.iocoder.yudao.module.infra.controller.admin.file.vo.config.FileConfigPageReqVO;
|
||||||
import cn.iocoder.yudao.module.infra.controller.admin.file.vo.config.FileConfigSaveReqVO;
|
import cn.iocoder.yudao.module.infra.controller.admin.file.vo.config.FileConfigSaveReqVO;
|
||||||
import cn.iocoder.yudao.module.infra.convert.file.FileConfigConvert;
|
import cn.iocoder.yudao.module.infra.convert.file.FileConfigConvert;
|
||||||
import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileConfigDO;
|
import cn.iocoder.yudao.module.infra.dal.dataobject.file.FileConfigDO;
|
||||||
import cn.iocoder.yudao.module.infra.dal.mysql.file.FileConfigMapper;
|
import cn.iocoder.yudao.module.infra.dal.mysql.file.FileConfigMapper;
|
||||||
|
import cn.iocoder.yudao.module.infra.framework.file.core.client.FileClient;
|
||||||
|
import cn.iocoder.yudao.module.infra.framework.file.core.client.FileClientConfig;
|
||||||
|
import cn.iocoder.yudao.module.infra.framework.file.core.client.FileClientFactory;
|
||||||
|
import cn.iocoder.yudao.module.infra.framework.file.core.enums.FileStorageEnum;
|
||||||
import com.google.common.cache.CacheLoader;
|
import com.google.common.cache.CacheLoader;
|
||||||
import com.google.common.cache.LoadingCache;
|
import com.google.common.cache.LoadingCache;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import jakarta.validation.Validator;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
import jakarta.annotation.Resource;
|
|
||||||
import jakarta.validation.Validator;
|
|
||||||
import java.time.Duration;
|
import java.time.Duration;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
|
@ -5,12 +5,12 @@ import cn.iocoder.yudao.module.infra.controller.admin.job.vo.log.JobLogPageReqVO
|
||||||
import cn.iocoder.yudao.module.infra.dal.dataobject.job.JobLogDO;
|
import cn.iocoder.yudao.module.infra.dal.dataobject.job.JobLogDO;
|
||||||
import cn.iocoder.yudao.module.infra.dal.mysql.job.JobLogMapper;
|
import cn.iocoder.yudao.module.infra.dal.mysql.job.JobLogMapper;
|
||||||
import cn.iocoder.yudao.module.infra.enums.job.JobLogStatusEnum;
|
import cn.iocoder.yudao.module.infra.enums.job.JobLogStatusEnum;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.scheduling.annotation.Async;
|
import org.springframework.scheduling.annotation.Async;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
import jakarta.annotation.Resource;
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -4,9 +4,8 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
import cn.iocoder.yudao.module.infra.controller.admin.job.vo.job.JobPageReqVO;
|
import cn.iocoder.yudao.module.infra.controller.admin.job.vo.job.JobPageReqVO;
|
||||||
import cn.iocoder.yudao.module.infra.controller.admin.job.vo.job.JobSaveReqVO;
|
import cn.iocoder.yudao.module.infra.controller.admin.job.vo.job.JobSaveReqVO;
|
||||||
import cn.iocoder.yudao.module.infra.dal.dataobject.job.JobDO;
|
import cn.iocoder.yudao.module.infra.dal.dataobject.job.JobDO;
|
||||||
import org.quartz.SchedulerException;
|
|
||||||
|
|
||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
|
import org.quartz.SchedulerException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定时任务 Service 接口
|
* 定时任务 Service 接口
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package cn.iocoder.yudao.module.infra.service.logger;
|
package cn.iocoder.yudao.module.infra.service.logger;
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|
||||||
import cn.iocoder.yudao.framework.common.biz.infra.logger.dto.ApiErrorLogCreateReqDTO;
|
import cn.iocoder.yudao.framework.common.biz.infra.logger.dto.ApiErrorLogCreateReqDTO;
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
import cn.iocoder.yudao.module.infra.controller.admin.logger.vo.apierrorlog.ApiErrorLogPageReqVO;
|
import cn.iocoder.yudao.module.infra.controller.admin.logger.vo.apierrorlog.ApiErrorLogPageReqVO;
|
||||||
import cn.iocoder.yudao.module.infra.dal.dataobject.logger.ApiErrorLogDO;
|
import cn.iocoder.yudao.module.infra.dal.dataobject.logger.ApiErrorLogDO;
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
package cn.iocoder.yudao.module.infra.service.logger;
|
package cn.iocoder.yudao.module.infra.service.logger;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.biz.infra.logger.dto.ApiErrorLogCreateReqDTO;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||||
import cn.iocoder.yudao.framework.common.util.string.StrUtils;
|
import cn.iocoder.yudao.framework.common.util.string.StrUtils;
|
||||||
import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder;
|
import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder;
|
||||||
import cn.iocoder.yudao.framework.tenant.core.util.TenantUtils;
|
import cn.iocoder.yudao.framework.tenant.core.util.TenantUtils;
|
||||||
import cn.iocoder.yudao.framework.common.biz.infra.logger.dto.ApiErrorLogCreateReqDTO;
|
|
||||||
import cn.iocoder.yudao.module.infra.controller.admin.logger.vo.apierrorlog.ApiErrorLogPageReqVO;
|
import cn.iocoder.yudao.module.infra.controller.admin.logger.vo.apierrorlog.ApiErrorLogPageReqVO;
|
||||||
import cn.iocoder.yudao.module.infra.dal.dataobject.logger.ApiErrorLogDO;
|
import cn.iocoder.yudao.module.infra.dal.dataobject.logger.ApiErrorLogDO;
|
||||||
import cn.iocoder.yudao.module.infra.dal.mysql.logger.ApiErrorLogMapper;
|
import cn.iocoder.yudao.module.infra.dal.mysql.logger.ApiErrorLogMapper;
|
||||||
|
|
|
@ -75,14 +75,14 @@ public class ${sceneEnum.prefixClass}${table.className}Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ( $table.templateType != 2 && $deleteBatchEnable)
|
#if ( $table.templateType != 2 && $deleteBatchEnable)
|
||||||
@DeleteMapping("/delete-batch")
|
@DeleteMapping("/delete-list")
|
||||||
@Parameter(name = "ids", description = "编号", required = true)
|
@Parameter(name = "ids", description = "编号", required = true)
|
||||||
@Operation(summary = "批量删除${table.classComment}")
|
@Operation(summary = "批量删除${table.classComment}")
|
||||||
#if ($sceneEnum.scene == 1)
|
#if ($sceneEnum.scene == 1)
|
||||||
@PreAuthorize("@ss.hasPermission('${permissionPrefix}:delete')")
|
@PreAuthorize("@ss.hasPermission('${permissionPrefix}:delete')")
|
||||||
#end
|
#end
|
||||||
public CommonResult<Boolean> delete${simpleClassName}(@RequestParam("ids") List<${primaryColumn.javaType}> ids) {
|
public CommonResult<Boolean> delete${simpleClassName}List(@RequestParam("ids") List<${primaryColumn.javaType}> ids) {
|
||||||
${classNameVar}Service.delete${simpleClassName}ByIds(ids);
|
${classNameVar}Service.delete${simpleClassName}ListByIds(ids);
|
||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
#end
|
#end
|
||||||
|
@ -244,14 +244,14 @@ public class ${sceneEnum.prefixClass}${table.className}Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ($deleteBatchEnable)
|
#if ($deleteBatchEnable)
|
||||||
@DeleteMapping("/${subSimpleClassName_strikeCase}/delete-batch")
|
@DeleteMapping("/${subSimpleClassName_strikeCase}/delete-list")
|
||||||
@Parameter(name = "ids", description = "编号", required = true)
|
@Parameter(name = "ids", description = "编号", required = true)
|
||||||
@Operation(summary = "批量删除${subTable.classComment}")
|
@Operation(summary = "批量删除${subTable.classComment}")
|
||||||
#if ($sceneEnum.scene == 1)
|
#if ($sceneEnum.scene == 1)
|
||||||
@PreAuthorize("@ss.hasPermission('${permissionPrefix}:delete')")
|
@PreAuthorize("@ss.hasPermission('${permissionPrefix}:delete')")
|
||||||
#end
|
#end
|
||||||
public CommonResult<Boolean> delete${subSimpleClassName}(@RequestParam("ids") List<${subPrimaryColumn.javaType}> ids) {
|
public CommonResult<Boolean> delete${subSimpleClassName}List(@RequestParam("ids") List<${subPrimaryColumn.javaType}> ids) {
|
||||||
${classNameVar}Service.delete${subSimpleClassName}ByIds(ids);
|
${classNameVar}Service.delete${subSimpleClassName}ListByIds(ids);
|
||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
#end
|
#end
|
||||||
|
|
|
@ -28,8 +28,6 @@ import static ${DateUtilsClassName}.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||||
|
|
||||||
@Schema(description = "${sceneEnum.name} - ${table.classComment}分页 Request VO")
|
@Schema(description = "${sceneEnum.name} - ${table.classComment}分页 Request VO")
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@ToString(callSuper = true)
|
|
||||||
public class ${sceneEnum.prefixClass}${table.className}PageReqVO extends PageParam {
|
public class ${sceneEnum.prefixClass}${table.className}PageReqVO extends PageParam {
|
||||||
|
|
||||||
#foreach ($column in $columns)
|
#foreach ($column in $columns)
|
||||||
|
|
|
@ -77,17 +77,23 @@ public class ${table.className}DO extends BaseDO {
|
||||||
private ${column.javaType} ${column.javaField};
|
private ${column.javaType} ${column.javaField};
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
|
|
||||||
## 特殊:主子表专属逻辑(非 ERP 模式)
|
## 特殊:主子表专属逻辑(非 ERP 模式)
|
||||||
#if ( $voType == 20 && $subTables && $subTables.size() > 0 && $table.templateType != 11 )
|
#if ( $voType == 20 && $subTables && $subTables.size() > 0 && $table.templateType != 11 )
|
||||||
#foreach ($subTable in $subTables)
|
#foreach ($subTable in $subTables)
|
||||||
#set ($index = $foreach.count - 1)
|
#set ($index = $foreach.count - 1)
|
||||||
#if ( $subTable.subJoinMany)
|
#if ( $subTable.subJoinMany)
|
||||||
|
/**
|
||||||
|
* ${subTable.classComment}列表
|
||||||
|
*/
|
||||||
@Schema(description = "${subTable.classComment}列表")
|
@Schema(description = "${subTable.classComment}列表")
|
||||||
|
@TableField(exist = false)
|
||||||
private List<${subTable.className}DO> ${subClassNameVars.get($index)}s;
|
private List<${subTable.className}DO> ${subClassNameVars.get($index)}s;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
/**
|
||||||
|
* ${subTable.classComment}
|
||||||
|
*/
|
||||||
@Schema(description = "${subTable.classComment}")
|
@Schema(description = "${subTable.classComment}")
|
||||||
|
@TableField(exist = false)
|
||||||
private ${subTable.className}DO ${subClassNameVars.get($index)};
|
private ${subTable.className}DO ${subClassNameVars.get($index)};
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
|
|
|
@ -46,7 +46,7 @@ public interface ${table.className}Service {
|
||||||
*
|
*
|
||||||
* @param ids 编号
|
* @param ids 编号
|
||||||
*/
|
*/
|
||||||
void delete${simpleClassName}ByIds(List<${primaryColumn.javaType}> ids);
|
void delete${simpleClassName}ListByIds(List<${primaryColumn.javaType}> ids);
|
||||||
#end
|
#end
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -149,7 +149,7 @@ public interface ${table.className}Service {
|
||||||
*
|
*
|
||||||
* @param ids 编号
|
* @param ids 编号
|
||||||
*/
|
*/
|
||||||
void delete${subSimpleClassName}ByIds(List<${subPrimaryColumn.javaType}> ids);
|
void delete${subSimpleClassName}ListByIds(List<${subPrimaryColumn.javaType}> ids);
|
||||||
#end
|
#end
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -169,7 +169,7 @@ public class ${table.className}ServiceImpl implements ${table.className}Service
|
||||||
#if ( $subTables && $subTables.size() > 0)
|
#if ( $subTables && $subTables.size() > 0)
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
#end
|
#end
|
||||||
public void delete${simpleClassName}ByIds(List<${primaryColumn.javaType}> ids) {
|
public void delete${simpleClassName}ListByIds(List<${primaryColumn.javaType}> ids) {
|
||||||
// 校验存在
|
// 校验存在
|
||||||
validate${simpleClassName}Exists(ids);
|
validate${simpleClassName}Exists(ids);
|
||||||
// 删除
|
// 删除
|
||||||
|
@ -328,7 +328,7 @@ public class ${table.className}ServiceImpl implements ${table.className}Service
|
||||||
// 校验存在
|
// 校验存在
|
||||||
validate${subSimpleClassName}Exists(${subClassNameVar}.getId());
|
validate${subSimpleClassName}Exists(${subClassNameVar}.getId());
|
||||||
// 更新
|
// 更新
|
||||||
${subClassNameVar}.setUpdater(null).setUpdateTime(null); // 解决更新情况下:updateTime 不更新
|
${subClassNameVar}.clean(); // 解决更新情况下:updateTime 不更新
|
||||||
${subClassNameVars.get($index)}Mapper.updateById(${subClassNameVar});
|
${subClassNameVars.get($index)}Mapper.updateById(${subClassNameVar});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -342,7 +342,7 @@ public class ${table.className}ServiceImpl implements ${table.className}Service
|
||||||
|
|
||||||
#if ($deleteBatchEnable)
|
#if ($deleteBatchEnable)
|
||||||
@Override
|
@Override
|
||||||
public void delete${subSimpleClassName}ByIds(List<${subPrimaryColumn.javaType}> ids) {
|
public void delete${subSimpleClassName}ListByIds(List<${subPrimaryColumn.javaType}> ids) {
|
||||||
// 校验存在
|
// 校验存在
|
||||||
validate${subSimpleClassName}Exists(ids);
|
validate${subSimpleClassName}Exists(ids);
|
||||||
// 删除
|
// 删除
|
||||||
|
@ -374,17 +374,17 @@ public class ${table.className}ServiceImpl implements ${table.className}Service
|
||||||
#else
|
#else
|
||||||
#if ( $subTable.subJoinMany)
|
#if ( $subTable.subJoinMany)
|
||||||
private void create${subSimpleClassName}List(${primaryColumn.javaType} ${subJoinColumn.javaField}, List<${subTable.className}DO> list) {
|
private void create${subSimpleClassName}List(${primaryColumn.javaType} ${subJoinColumn.javaField}, List<${subTable.className}DO> list) {
|
||||||
list.forEach(o -> o.set${SubJoinColumnName}(${subJoinColumn.javaField}));
|
list.forEach(o -> o.set${SubJoinColumnName}(${subJoinColumn.javaField}).clean());
|
||||||
${subClassNameVars.get($index)}Mapper.insertBatch(list);
|
${subClassNameVars.get($index)}Mapper.insertBatch(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void update${subSimpleClassName}List(${primaryColumn.javaType} ${subJoinColumn.javaField}, List<${subTable.className}DO> list) {
|
private void update${subSimpleClassName}List(${primaryColumn.javaType} ${subJoinColumn.javaField}, List<${subTable.className}DO> list) {
|
||||||
list.forEach(o -> o.set${SubJoinColumnName}(${subJoinColumn.javaField}));
|
list.forEach(o -> o.set${SubJoinColumnName}(${subJoinColumn.javaField}).clean());
|
||||||
List<${subTable.className}DO> oldList = ${subClassNameVar}Mapper.selectListBy${SubJoinColumnName}(${subJoinColumn.javaField});
|
List<${subTable.className}DO> oldList = ${subClassNameVar}Mapper.selectListBy${SubJoinColumnName}(${subJoinColumn.javaField});
|
||||||
List<List<${subTable.className}DO>> diffList = diffList(oldList, list, (oldVal, newVal) -> {
|
List<List<${subTable.className}DO>> diffList = diffList(oldList, list, (oldVal, newVal) -> {
|
||||||
boolean same = ObjectUtil.equal(oldVal.getId(), newVal.getId());
|
boolean same = ObjectUtil.equal(oldVal.getId(), newVal.getId());
|
||||||
if (same) {
|
if (same) {
|
||||||
newVal.setId(oldVal.getId()).setUpdater(null).setUpdateTime(null); // 解决更新情况下:updateTime 不更新
|
newVal.setId(oldVal.getId()).clean(); // 解决更新情况下:updateTime 不更新
|
||||||
}
|
}
|
||||||
return same;
|
return same;
|
||||||
});
|
});
|
||||||
|
@ -414,8 +414,7 @@ public class ${table.className}ServiceImpl implements ${table.className}Service
|
||||||
if (${subClassNameVar} == null) {
|
if (${subClassNameVar} == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
${subClassNameVar}.set$SubJoinColumnName(${subJoinColumn.javaField});
|
${subClassNameVar}.set$SubJoinColumnName(${subJoinColumn.javaField}).clean();// 解决更新情况下:updateTime 不更新
|
||||||
${subClassNameVar}.setUpdater(null).setUpdateTime(null); // 解决更新情况下:updateTime 不更新
|
|
||||||
${subClassNameVars.get($index)}Mapper.insertOrUpdate(${subClassNameVar});
|
${subClassNameVars.get($index)}Mapper.insertOrUpdate(${subClassNameVar});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -90,9 +90,9 @@ export function delete${simpleClassName}(id: number) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ( $table.templateType != 2 && $deleteBatchEnable)
|
#if ( $table.templateType != 2 && $deleteBatchEnable)
|
||||||
// 批量删除${table.classComment}
|
/** 批量删除${table.classComment} */
|
||||||
export function delete${simpleClassName}ByIds(ids: number[]) {
|
export function delete${simpleClassName}ListByIds(ids: number[]) {
|
||||||
return requestClient.delete(`${baseURL}/delete-batch?ids=${ids.join(',')}`)
|
return requestClient.delete(`${baseURL}/delete-list?ids=${ids.join(',')}`)
|
||||||
}
|
}
|
||||||
#end
|
#end
|
||||||
|
|
||||||
|
@ -152,9 +152,9 @@ export function delete${subSimpleClassName}(id: number) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ($deleteBatchEnable)
|
#if ($deleteBatchEnable)
|
||||||
// 批量删除${subTable.classComment}
|
/** 批量删除${subTable.classComment} */
|
||||||
export function delete${subSimpleClassName}ByIds(ids: number[]) {
|
export function delete${subSimpleClassName}ListByIds(ids: number[]) {
|
||||||
return requestClient.delete(`${baseURL}/${subSimpleClassName_strikeCase}/delete-batch?ids=${ids.join(',')}`)
|
return requestClient.delete(`${baseURL}/${subSimpleClassName_strikeCase}/delete-list?ids=${ids.join(',')}`)
|
||||||
}
|
}
|
||||||
#end
|
#end
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||||
#if (${table.templateType} == 2)## 树表接口
|
#if (${table.templateType} == 2)## 树表接口
|
||||||
import { get${simpleClassName}List, delete${simpleClassName}, export${simpleClassName} } from '#/api/${table.moduleName}/${table.businessName}';
|
import { get${simpleClassName}List, delete${simpleClassName}, export${simpleClassName} } from '#/api/${table.moduleName}/${table.businessName}';
|
||||||
#else## 标准表接口
|
#else## 标准表接口
|
||||||
import { get${simpleClassName}Page, delete${simpleClassName},#if ($deleteBatchEnable) delete${simpleClassName}ByIds,#end export${simpleClassName} } from '#/api/${table.moduleName}/${table.businessName}';
|
import { get${simpleClassName}Page, delete${simpleClassName},#if ($deleteBatchEnable) delete${simpleClassName}ListByIds,#end export${simpleClassName} } from '#/api/${table.moduleName}/${table.businessName}';
|
||||||
#end
|
#end
|
||||||
import { downloadFileFromBlobPart, isEmpty } from '@vben/utils';
|
import { downloadFileFromBlobPart, isEmpty } from '@vben/utils';
|
||||||
|
|
||||||
|
@ -93,15 +93,6 @@ async function onDelete(row: ${simpleClassName}Api.${simpleClassName}) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ($table.templateType != 2 && $deleteBatchEnable)
|
#if ($table.templateType != 2 && $deleteBatchEnable)
|
||||||
const deleteIds = ref<number[]>([]) // 待删除${table.classComment} ID
|
|
||||||
const showDeleteBatchBtn = computed(() => isEmpty(deleteIds.value));
|
|
||||||
function setDeleteIds({
|
|
||||||
records,
|
|
||||||
}: {
|
|
||||||
records: ${simpleClassName}Api.${simpleClassName}[];
|
|
||||||
}) {
|
|
||||||
deleteIds.value = records.map((item) => item.id);
|
|
||||||
}
|
|
||||||
/** 批量删除${table.classComment} */
|
/** 批量删除${table.classComment} */
|
||||||
async function onDeleteBatch() {
|
async function onDeleteBatch() {
|
||||||
const hideLoading = message.loading({
|
const hideLoading = message.loading({
|
||||||
|
@ -110,13 +101,22 @@ async function onDeleteBatch() {
|
||||||
key: 'action_process_msg',
|
key: 'action_process_msg',
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await delete${simpleClassName}ByIds(deleteIds.value);
|
await delete${simpleClassName}ListByIds(deleteIds.value);
|
||||||
message.success( $t('ui.actionMessage.deleteSuccess') );
|
message.success( $t('ui.actionMessage.deleteSuccess') );
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} finally {
|
} finally {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const deleteIds = ref<number[]>([]) // 待删除${table.classComment} ID
|
||||||
|
function setDeleteIds({
|
||||||
|
records,
|
||||||
|
}: {
|
||||||
|
records: ${simpleClassName}Api.${simpleClassName}[];
|
||||||
|
}) {
|
||||||
|
deleteIds.value = records.map((item) => item.id);
|
||||||
|
}
|
||||||
#end
|
#end
|
||||||
|
|
||||||
/** 导出表格 */
|
/** 导出表格 */
|
||||||
|
@ -268,7 +268,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
||||||
type="primary"
|
type="primary"
|
||||||
danger
|
danger
|
||||||
class="ml-2"
|
class="ml-2"
|
||||||
:disabled="showDeleteBatchBtn"
|
:disabled="isEmpty(deleteIds)"
|
||||||
@click="onDeleteBatch"
|
@click="onDeleteBatch"
|
||||||
v-access:code="['${table.moduleName}:${simpleClassName_strikeCase}:delete']"
|
v-access:code="['${table.moduleName}:${simpleClassName_strikeCase}:delete']"
|
||||||
>
|
>
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
|
|
||||||
#if ($table.templateType == 11) ## erp
|
#if ($table.templateType == 11) ## erp
|
||||||
import { delete${subSimpleClassName},#if ($deleteBatchEnable) delete${subSimpleClassName}ByIds,#end get${subSimpleClassName}Page } from '#/api/${table.moduleName}/${table.businessName}';
|
import { delete${subSimpleClassName},#if ($deleteBatchEnable) delete${subSimpleClassName}ListByIds,#end get${subSimpleClassName}Page } from '#/api/${table.moduleName}/${table.businessName}';
|
||||||
import { use${subSimpleClassName}GridFormSchema, use${subSimpleClassName}GridColumns } from '../data';
|
import { use${subSimpleClassName}GridFormSchema, use${subSimpleClassName}GridColumns } from '../data';
|
||||||
import { isEmpty } from '@vben/utils';
|
import { isEmpty } from '@vben/utils';
|
||||||
#else
|
#else
|
||||||
|
@ -74,15 +74,6 @@ async function onDelete(row: ${simpleClassName}Api.${subSimpleClassName}) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ($deleteBatchEnable)
|
#if ($deleteBatchEnable)
|
||||||
const deleteIds = ref<number[]>([]) // 待删除${subTable.classComment} ID
|
|
||||||
const showDeleteBatchBtn = computed(() => isEmpty(deleteIds.value));
|
|
||||||
function setDeleteIds({
|
|
||||||
records,
|
|
||||||
}: {
|
|
||||||
records: ${simpleClassName}Api.${subSimpleClassName}[];
|
|
||||||
}) {
|
|
||||||
deleteIds.value = records.map((item) => item.id);
|
|
||||||
}
|
|
||||||
/** 批量删除${subTable.classComment} */
|
/** 批量删除${subTable.classComment} */
|
||||||
async function onDeleteBatch() {
|
async function onDeleteBatch() {
|
||||||
const hideLoading = message.loading({
|
const hideLoading = message.loading({
|
||||||
|
@ -91,13 +82,22 @@ async function onDeleteBatch() {
|
||||||
key: 'action_process_msg',
|
key: 'action_process_msg',
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await delete${subSimpleClassName}ByIds(deleteIds.value);
|
await delete${subSimpleClassName}ListByIds(deleteIds.value);
|
||||||
message.success( $t('ui.actionMessage.deleteSuccess') );
|
message.success( $t('ui.actionMessage.deleteSuccess') );
|
||||||
onRefresh();
|
onRefresh();
|
||||||
} finally {
|
} finally {
|
||||||
hideLoading();
|
hideLoading();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const deleteIds = ref<number[]>([]) // 待删除${subTable.classComment} ID
|
||||||
|
function setDeleteIds({
|
||||||
|
records,
|
||||||
|
}: {
|
||||||
|
records: ${simpleClassName}Api.${subSimpleClassName}[];
|
||||||
|
}) {
|
||||||
|
deleteIds.value = records.map((item) => item.id);
|
||||||
|
}
|
||||||
#end
|
#end
|
||||||
|
|
||||||
/** 表格操作按钮的回调函数 */
|
/** 表格操作按钮的回调函数 */
|
||||||
|
@ -213,7 +213,7 @@ const onRefresh = async ()=> {
|
||||||
type="primary"
|
type="primary"
|
||||||
danger
|
danger
|
||||||
class="ml-2"
|
class="ml-2"
|
||||||
:disabled="showDeleteBatchBtn"
|
:disabled="isEmpty(deleteIds)"
|
||||||
@click="onDeleteBatch"
|
@click="onDeleteBatch"
|
||||||
v-access:code="['${table.moduleName}:${simpleClassName_strikeCase}:delete']"
|
v-access:code="['${table.moduleName}:${simpleClassName_strikeCase}:delete']"
|
||||||
>
|
>
|
||||||
|
|
Loading…
Reference in New Issue