Merge jygk/dsc/test into local test, re-implement file presigned URL cache
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
package com.zt.plat.module.infra.api.file.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "RPC 服务 - 文件创建 Request DTO")
|
||||
@Data
|
||||
|
||||
@@ -6,12 +6,11 @@ import com.zt.plat.module.infra.api.websocket.dto.WebSocketSendReqDTO;
|
||||
import com.zt.plat.module.infra.enums.ApiConstants;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
@FeignClient(name = ApiConstants.NAME) // TODO ZT:fallbackFactory =
|
||||
@Tag(name = "RPC 服务 - WebSocket 发送器的") // 对 WebSocketMessageSender 进行封装,提供给其它模块使用
|
||||
public interface WebSocketSenderApi {
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package com.zt.plat.module.infra.api.websocket.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "RPC 服务 - WebSocket 消息发送 Request DTO")
|
||||
@Data
|
||||
|
||||
@@ -4,11 +4,10 @@ import com.zt.plat.framework.common.biz.infra.logger.ApiAccessLogCommonApi;
|
||||
import com.zt.plat.framework.common.biz.infra.logger.dto.ApiAccessLogCreateReqDTO;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.module.infra.service.logger.ApiAccessLogService;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@RestController // 提供 RESTful API 接口,给 Feign 调用
|
||||
|
||||
@@ -101,7 +101,7 @@ public class BusinessFileController {
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得业务附件关联分页")
|
||||
@PreAuthorize("@ss.hasPermission('infra:business-file:query')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions({'infra:business-file:query','supply:purchase-credit-granting-form-template:query-list','supply:purchase-amount-request-form-template:query-list'})")
|
||||
public CommonResult<PageResult<BusinessFileRespVO>> getBusinessFilePage(@Valid BusinessFilePageReqVO pageReqVO) {
|
||||
PageResult<BusinessFileDO> pageResult = businessFileService.getBusinessFilePage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, BusinessFileRespVO.class));
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.zt.plat.module.infra.controller.admin.businessfile.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.zt.plat.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@@ -12,7 +12,6 @@ import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Base64;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
@@ -3,10 +3,10 @@ package com.zt.plat.module.infra.controller.admin.codegen.vo;
|
||||
import com.zt.plat.module.infra.controller.admin.codegen.vo.column.CodegenColumnSaveReqVO;
|
||||
import com.zt.plat.module.infra.controller.admin.codegen.vo.table.CodegenTableSaveReqVO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 代码生成表和字段的修改 Request VO")
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package com.zt.plat.module.infra.controller.admin.codegen.vo.column;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 代码生成字段定义创建/修改 Request VO")
|
||||
@Data
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.zt.plat.module.infra.controller.admin.config.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.zt.plat.framework.excel.core.annotations.DictFormat;
|
||||
import com.zt.plat.framework.excel.core.convert.DictConvert;
|
||||
import com.zt.plat.module.infra.enums.DictTypeConstants;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
package com.zt.plat.module.infra.controller.admin.config.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 参数配置创建/修改 Request VO")
|
||||
@Data
|
||||
|
||||
@@ -9,12 +9,12 @@ import com.zt.plat.module.infra.service.db.DataSourceConfigService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
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.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package com.zt.plat.module.infra.controller.admin.db.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 数据源配置创建/修改 Request VO")
|
||||
@Data
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package com.zt.plat.module.infra.controller.admin.demo.demo01.vo;
|
||||
|
||||
import com.zt.plat.framework.excel.core.annotations.DictFormat;
|
||||
import com.zt.plat.framework.excel.core.convert.DictConvert;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.zt.plat.framework.excel.core.annotations.DictFormat;
|
||||
import com.zt.plat.framework.excel.core.convert.DictConvert;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package com.zt.plat.module.infra.controller.admin.demo.demo03.erp.vo;
|
||||
|
||||
import com.zt.plat.framework.excel.core.annotations.DictFormat;
|
||||
import com.zt.plat.framework.excel.core.convert.DictConvert;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.zt.plat.framework.excel.core.annotations.DictFormat;
|
||||
import com.zt.plat.framework.excel.core.convert.DictConvert;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package com.zt.plat.module.infra.controller.admin.demo.demo03.inner.vo;
|
||||
|
||||
import com.zt.plat.framework.excel.core.annotations.DictFormat;
|
||||
import com.zt.plat.framework.excel.core.convert.DictConvert;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.zt.plat.framework.excel.core.annotations.DictFormat;
|
||||
import com.zt.plat.framework.excel.core.convert.DictConvert;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
package com.zt.plat.module.infra.controller.admin.doc.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 在线文档创建 Request VO")
|
||||
@Data
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package com.zt.plat.module.infra.controller.admin.doc.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 文档权限 Request VO")
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package com.zt.plat.module.infra.controller.admin.doc.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 在线文档更新 Request VO")
|
||||
@Data
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package com.zt.plat.module.infra.controller.admin.file.vo.config;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.util.Map;
|
||||
|
||||
@Schema(description = "管理后台 - 文件配置创建/修改 Request VO")
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.zt.plat.module.infra.controller.admin.logger.vo.apiaccesslog;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.zt.plat.framework.excel.core.annotations.DictFormat;
|
||||
import com.zt.plat.framework.excel.core.convert.DictConvert;
|
||||
import com.zt.plat.module.infra.enums.DictTypeConstants;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.zt.plat.module.infra.controller.admin.redis.vo.RedisMonitorRespVO;
|
||||
import com.zt.plat.module.infra.convert.redis.RedisConvert;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.data.redis.connection.RedisServerCommands;
|
||||
import org.springframework.data.redis.core.RedisCallback;
|
||||
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.RestController;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
import java.util.Properties;
|
||||
|
||||
import static com.zt.plat.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.zt.plat.module.infra.convert.codegen;
|
||||
|
||||
import com.baomidou.mybatisplus.generator.config.po.TableField;
|
||||
import com.baomidou.mybatisplus.generator.config.po.TableInfo;
|
||||
import com.zt.plat.framework.common.util.collection.CollectionUtils;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.module.infra.controller.admin.codegen.vo.CodegenDetailRespVO;
|
||||
@@ -8,8 +10,6 @@ import com.zt.plat.module.infra.controller.admin.codegen.vo.column.CodegenColumn
|
||||
import com.zt.plat.module.infra.controller.admin.codegen.vo.table.CodegenTableRespVO;
|
||||
import com.zt.plat.module.infra.dal.dataobject.codegen.CodegenColumnDO;
|
||||
import com.zt.plat.module.infra.dal.dataobject.codegen.CodegenTableDO;
|
||||
import com.baomidou.mybatisplus.generator.config.po.TableField;
|
||||
import com.baomidou.mybatisplus.generator.config.po.TableInfo;
|
||||
import org.apache.ibatis.type.JdbcType;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.zt.plat.module.infra.dal.dataobject.businessfile;
|
||||
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
||||
import lombok.*;
|
||||
/**
|
||||
* 业务附件关联 DO
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package com.zt.plat.module.infra.dal.dataobject.codegen;
|
||||
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
||||
import com.zt.plat.framework.tenant.core.aop.TenantIgnore;
|
||||
import com.zt.plat.module.infra.enums.codegen.CodegenColumnHtmlTypeEnum;
|
||||
import com.zt.plat.module.infra.enums.codegen.CodegenColumnListConditionEnum;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.generator.config.po.TableField;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
||||
import com.zt.plat.framework.tenant.core.aop.TenantIgnore;
|
||||
import com.zt.plat.module.infra.enums.codegen.CodegenColumnHtmlTypeEnum;
|
||||
import com.zt.plat.module.infra.enums.codegen.CodegenColumnListConditionEnum;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package com.zt.plat.module.infra.dal.dataobject.config;
|
||||
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
||||
import com.zt.plat.framework.tenant.core.aop.TenantIgnore;
|
||||
import com.zt.plat.module.infra.enums.config.ConfigTypeEnum;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
||||
import com.zt.plat.framework.tenant.core.aop.TenantIgnore;
|
||||
import com.zt.plat.module.infra.enums.config.ConfigTypeEnum;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package com.zt.plat.module.infra.dal.dataobject.db;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
||||
import com.zt.plat.framework.mybatis.core.type.EncryptTypeHandler;
|
||||
import com.zt.plat.framework.tenant.core.aop.TenantIgnore;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.zt.plat.module.infra.dal.dataobject.demo.demo01;
|
||||
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.zt.plat.module.infra.dal.dataobject.demo.demo02;
|
||||
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
||||
import lombok.*;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.zt.plat.module.infra.dal.dataobject.demo.demo03;
|
||||
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
||||
import lombok.*;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.zt.plat.module.infra.dal.dataobject.demo.demo03;
|
||||
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
||||
import lombok.*;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.zt.plat.module.infra.dal.dataobject.demo.demo03;
|
||||
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package com.zt.plat.module.infra.dal.dataobject.logger;
|
||||
|
||||
import com.zt.plat.framework.apilog.core.enums.OperateTypeEnum;
|
||||
import com.zt.plat.framework.common.enums.UserTypeEnum;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.zt.plat.framework.apilog.core.enums.OperateTypeEnum;
|
||||
import com.zt.plat.framework.common.enums.UserTypeEnum;
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
package com.zt.plat.module.infra.dal.mysql.businessfile;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.module.infra.controller.admin.businessfile.vo.BusinessFilePageReqVO;
|
||||
import com.zt.plat.module.infra.dal.dataobject.businessfile.BusinessFileDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.zt.plat.module.infra.controller.admin.businessfile.vo.*;
|
||||
|
||||
/**
|
||||
* 业务附件关联 Mapper
|
||||
|
||||
@@ -2,12 +2,12 @@ package com.zt.plat.module.infra.framework.codegen.config;
|
||||
|
||||
import com.zt.plat.module.infra.enums.codegen.CodegenFrontTypeEnum;
|
||||
import com.zt.plat.module.infra.enums.codegen.CodegenVOTypeEnum;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.util.Collection;
|
||||
|
||||
@ConfigurationProperties(prefix = "zt.codegen")
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
package com.zt.plat.module.infra.job.logger;
|
||||
|
||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||
import com.zt.plat.framework.tenant.core.aop.TenantIgnore;
|
||||
import com.zt.plat.module.infra.service.logger.ApiAccessLogService;
|
||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 物理删除 N 天前的访问日志的 Job
|
||||
*
|
||||
|
||||
@@ -2,6 +2,9 @@ package com.zt.plat.module.infra.service.codegen;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.generator.config.po.TableField;
|
||||
import com.baomidou.mybatisplus.generator.config.po.TableInfo;
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.module.infra.controller.admin.codegen.vo.CodegenCreateListReqVO;
|
||||
@@ -18,9 +21,6 @@ import com.zt.plat.module.infra.framework.codegen.config.CodegenProperties;
|
||||
import com.zt.plat.module.infra.service.codegen.inner.CodegenBuilder;
|
||||
import com.zt.plat.module.infra.service.codegen.inner.CodegenEngine;
|
||||
import com.zt.plat.module.infra.service.db.DatabaseTableService;
|
||||
import com.baomidou.mybatisplus.generator.config.po.TableField;
|
||||
import com.baomidou.mybatisplus.generator.config.po.TableInfo;
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@@ -3,6 +3,9 @@ package com.zt.plat.module.infra.service.codegen.inner;
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import cn.hutool.core.util.ReflectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.generator.config.po.TableField;
|
||||
import com.baomidou.mybatisplus.generator.config.po.TableInfo;
|
||||
import com.google.common.collect.Sets;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
import com.zt.plat.module.infra.convert.codegen.CodegenConvert;
|
||||
@@ -11,9 +14,6 @@ import com.zt.plat.module.infra.dal.dataobject.codegen.CodegenTableDO;
|
||||
import com.zt.plat.module.infra.enums.codegen.CodegenColumnHtmlTypeEnum;
|
||||
import com.zt.plat.module.infra.enums.codegen.CodegenColumnListConditionEnum;
|
||||
import com.zt.plat.module.infra.enums.codegen.CodegenTemplateTypeEnum;
|
||||
import com.baomidou.mybatisplus.generator.config.po.TableField;
|
||||
import com.baomidou.mybatisplus.generator.config.po.TableInfo;
|
||||
import com.google.common.collect.Sets;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
|
||||
@@ -8,6 +8,11 @@ import cn.hutool.extra.template.TemplateConfig;
|
||||
import cn.hutool.extra.template.TemplateEngine;
|
||||
import cn.hutool.extra.template.engine.velocity.VelocityEngine;
|
||||
import cn.hutool.system.SystemUtil;
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import com.google.common.collect.ImmutableTable;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Table;
|
||||
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import com.zt.plat.framework.apilog.core.enums.OperateTypeEnum;
|
||||
import com.zt.plat.framework.common.exception.util.ServiceExceptionUtil;
|
||||
@@ -35,11 +40,6 @@ import com.zt.plat.module.infra.enums.codegen.CodegenTemplateTypeEnum;
|
||||
import com.zt.plat.module.infra.enums.codegen.CodegenVOTypeEnum;
|
||||
import com.zt.plat.module.infra.framework.codegen.config.CodegenProperties;
|
||||
import com.zt.plat.module.infra.service.standardname.StandardNameService;
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import com.google.common.collect.ImmutableTable;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Table;
|
||||
import jakarta.annotation.PostConstruct;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.Setter;
|
||||
|
||||
@@ -4,7 +4,6 @@ import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.module.infra.controller.admin.config.vo.ConfigPageReqVO;
|
||||
import com.zt.plat.module.infra.controller.admin.config.vo.ConfigSaveReqVO;
|
||||
import com.zt.plat.module.infra.dal.dataobject.config.ConfigDO;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.zt.plat.module.infra.service.config;
|
||||
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import com.zt.plat.framework.common.pojo.PageResult;
|
||||
import com.zt.plat.module.infra.controller.admin.config.vo.ConfigPageReqVO;
|
||||
import com.zt.plat.module.infra.controller.admin.config.vo.ConfigSaveReqVO;
|
||||
@@ -7,13 +8,11 @@ import com.zt.plat.module.infra.convert.config.ConfigConvert;
|
||||
import com.zt.plat.module.infra.dal.dataobject.config.ConfigDO;
|
||||
import com.zt.plat.module.infra.dal.mysql.config.ConfigMapper;
|
||||
import com.zt.plat.module.infra.enums.config.ConfigTypeEnum;
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
|
||||
import static com.zt.plat.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static com.zt.plat.module.infra.enums.ErrorCodeConstants.*;
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@ package com.zt.plat.module.infra.service.db;
|
||||
|
||||
import com.zt.plat.module.infra.controller.admin.db.vo.DataSourceConfigSaveReqVO;
|
||||
import com.zt.plat.module.infra.dal.dataobject.db.DataSourceConfigDO;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
package com.zt.plat.module.infra.service.db;
|
||||
|
||||
import com.baomidou.dynamic.datasource.creator.DataSourceProperty;
|
||||
import com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceProperties;
|
||||
import com.zt.plat.framework.common.util.object.BeanUtils;
|
||||
import com.zt.plat.framework.mybatis.core.util.JdbcUtils;
|
||||
import com.zt.plat.module.infra.controller.admin.db.vo.DataSourceConfigSaveReqVO;
|
||||
import com.zt.plat.module.infra.dal.dataobject.db.DataSourceConfigDO;
|
||||
import com.zt.plat.module.infra.dal.mysql.db.DataSourceConfigMapper;
|
||||
import com.baomidou.dynamic.datasource.creator.DataSourceProperty;
|
||||
import com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceProperties;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
|
||||
@@ -3,11 +3,6 @@ package com.zt.plat.module.infra.service.db;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.zt.plat.framework.mybatis.core.util.JdbcUtils;
|
||||
import com.zt.plat.module.infra.dal.dataobject.db.DataSourceConfigDO;
|
||||
import com.zt.plat.module.infra.dal.dataobject.standardname.StandardNameDO;
|
||||
import com.zt.plat.module.infra.service.codegen.inner.CodegenBuilder;
|
||||
import com.zt.plat.module.infra.service.standardname.StandardNameService;
|
||||
import com.baomidou.mybatisplus.generator.config.DataSourceConfig;
|
||||
import com.baomidou.mybatisplus.generator.config.GlobalConfig;
|
||||
import com.baomidou.mybatisplus.generator.config.StrategyConfig;
|
||||
@@ -16,6 +11,11 @@ import com.baomidou.mybatisplus.generator.config.po.TableField;
|
||||
import com.baomidou.mybatisplus.generator.config.po.TableInfo;
|
||||
import com.baomidou.mybatisplus.generator.config.rules.DateType;
|
||||
import com.baomidou.mybatisplus.generator.query.SQLQuery;
|
||||
import com.zt.plat.framework.mybatis.core.util.JdbcUtils;
|
||||
import com.zt.plat.module.infra.dal.dataobject.db.DataSourceConfigDO;
|
||||
import com.zt.plat.module.infra.dal.dataobject.standardname.StandardNameDO;
|
||||
import com.zt.plat.module.infra.service.codegen.inner.CodegenBuilder;
|
||||
import com.zt.plat.module.infra.service.standardname.StandardNameService;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
||||
@@ -38,14 +38,20 @@ spring:
|
||||
primary: master
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
|
||||
#url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
|
||||
#username: SYSDBA
|
||||
#password: pgbsci6ddJ6Sqj@e
|
||||
url: jdbc:dm://172.17.11.98:20870?schema=JYGK_TEST
|
||||
username: SYSDBA
|
||||
password: pgbsci6ddJ6Sqj@e
|
||||
password: P@ssword25
|
||||
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
|
||||
lazy: true # 开启懒加载,保证启动速度
|
||||
url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
|
||||
#url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
|
||||
#username: SYSDBA
|
||||
#password: pgbsci6ddJ6Sqj@e
|
||||
url: jdbc:dm://172.17.11.98:20870?schema=JYGK_TEST
|
||||
username: SYSDBA
|
||||
password: pgbsci6ddJ6Sqj@e
|
||||
password: P@ssword25
|
||||
|
||||
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
|
||||
data:
|
||||
@@ -98,5 +104,9 @@ spring:
|
||||
context-path: /admin # 配置 Spring
|
||||
|
||||
--- #################### ZT相关配置 ####################
|
||||
# 芋道配置项,设置当前项目所有自定义的配置
|
||||
zt:
|
||||
file:
|
||||
download-expire-seconds: 43200
|
||||
|
||||
|
||||
|
||||
@@ -43,14 +43,20 @@ spring:
|
||||
primary: master
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
|
||||
#url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
|
||||
#username: SYSDBA
|
||||
#password: pgbsci6ddJ6Sqj@e
|
||||
url: jdbc:dm://172.17.11.98:20870?schema=JYGK_TEST
|
||||
username: SYSDBA
|
||||
password: pgbsci6ddJ6Sqj@e
|
||||
password: P@ssword25
|
||||
slave: # 模拟从库,可根据自己需要修改 # 模拟从库,可根据自己需要修改
|
||||
lazy: true # 开启懒加载,保证启动速度
|
||||
url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
|
||||
#url: jdbc:dm://172.16.46.247:1050?schema=RUOYI-VUE-PRO
|
||||
#username: SYSDBA
|
||||
#password: pgbsci6ddJ6Sqj@e
|
||||
url: jdbc:dm://172.17.11.98:20870?schema=JYGK_TEST
|
||||
username: SYSDBA
|
||||
password: pgbsci6ddJ6Sqj@e
|
||||
password: P@ssword25
|
||||
|
||||
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
|
||||
data:
|
||||
|
||||
@@ -89,15 +89,17 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as ${simpleClassName}Api from '@/api/${table.moduleName}/${table.businessName}';
|
||||
import * as ${simpleClassName}Api
|
||||
from
|
||||
'@/api/';
|
||||
import ImageUpload from '@/components/ImageUpload';
|
||||
import FileUpload from '@/components/FileUpload';
|
||||
import Editor from '@/components/Editor';
|
||||
#if ($hasImageUploadColumn)
|
||||
import ImageUpload from '@/components/ImageUpload';
|
||||
#end
|
||||
#if ($hasFileUploadColumn)
|
||||
import FileUpload from '@/components/FileUpload';
|
||||
#end
|
||||
#if ($hasEditorColumn)
|
||||
import Editor from '@/components/Editor';
|
||||
#end
|
||||
export default {
|
||||
name: "${subSimpleClassName}Form",
|
||||
|
||||
@@ -221,15 +221,17 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as ${simpleClassName}Api from '@/api/${table.moduleName}/${table.businessName}';
|
||||
import * as ${simpleClassName}Api
|
||||
from
|
||||
'@/api/';
|
||||
import ImageUpload from '@/components/ImageUpload';
|
||||
import FileUpload from '@/components/FileUpload';
|
||||
import Editor from '@/components/Editor';
|
||||
#if ($hasImageUploadColumn)
|
||||
import ImageUpload from '@/components/ImageUpload';
|
||||
#end
|
||||
#if ($hasFileUploadColumn)
|
||||
import FileUpload from '@/components/FileUpload';
|
||||
#end
|
||||
#if ($hasEditorColumn)
|
||||
import Editor from '@/components/Editor';
|
||||
#end
|
||||
export default {
|
||||
name: "${subSimpleClassName}Form",
|
||||
|
||||
@@ -61,10 +61,16 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as ${simpleClassName}Api from '@/api/${table.moduleName}/${table.businessName}';
|
||||
#if ($table.templateType == 11)
|
||||
import ${subSimpleClassName}Form from './${subSimpleClassName}Form.vue';
|
||||
#end
|
||||
import * as ${simpleClassName}Api
|
||||
from
|
||||
'@/api/';
|
||||
import ${subSimpleClassName}
|
||||
|
||||
Form
|
||||
from
|
||||
'./';
|
||||
#if ($table.templateType == 11)
|
||||
#end
|
||||
export default {
|
||||
name: "${subSimpleClassName}List",
|
||||
#if ($table.templateType == 11)
|
||||
|
||||
@@ -107,25 +107,31 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as ${simpleClassName}Api from '@/api/${table.moduleName}/${table.businessName}';
|
||||
#if ($hasImageUploadColumn)
|
||||
import * as ${simpleClassName}Api
|
||||
from
|
||||
'@/api/';
|
||||
import ImageUpload from '@/components/ImageUpload';
|
||||
#end
|
||||
#if ($hasFileUploadColumn)
|
||||
import FileUpload from '@/components/FileUpload';
|
||||
import Editor from '@/components/Editor';
|
||||
import TreeSelect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
import ${subSimpleClassName}
|
||||
|
||||
Form
|
||||
from
|
||||
'./components/'
|
||||
#if ($hasImageUploadColumn)
|
||||
#end
|
||||
#if ($hasFileUploadColumn)
|
||||
#end
|
||||
#if ($hasEditorColumn)
|
||||
import Editor from '@/components/Editor';
|
||||
#end
|
||||
## 特殊:树表专属逻辑
|
||||
#if ( $table.templateType == 2 )
|
||||
import TreeSelect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
#end
|
||||
## 特殊:主子表专属逻辑
|
||||
#if ( $table.templateType == 10 || $table.templateType == 12 )
|
||||
#foreach ($subSimpleClassName in $subSimpleClassNames)
|
||||
import ${subSimpleClassName}Form from './components/${subSimpleClassName}Form.vue'
|
||||
#end
|
||||
#end
|
||||
export default {
|
||||
|
||||
@@ -167,22 +167,32 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as ${simpleClassName}Api from '@/api/${table.moduleName}/${table.businessName}';
|
||||
import ${simpleClassName}Form from './${simpleClassName}Form.vue';
|
||||
#if ($hasImageUploadColumn)
|
||||
import ImageUpload from '@/components/ImageUpload';
|
||||
#end
|
||||
import * as ${simpleClassName}Api
|
||||
from
|
||||
'@/api/';
|
||||
import ${simpleClassName}
|
||||
|
||||
Form
|
||||
from
|
||||
'./';
|
||||
import ImageUpload from '@/components/ImageUpload';
|
||||
import FileUpload from '@/components/FileUpload';
|
||||
import Editor from '@/components/Editor';
|
||||
import ${subSimpleClassName}
|
||||
|
||||
List
|
||||
from
|
||||
'./components/';
|
||||
#if ($hasImageUploadColumn)
|
||||
#end
|
||||
#if ($hasFileUploadColumn)
|
||||
import FileUpload from '@/components/FileUpload';
|
||||
#end
|
||||
#if ($hasEditorColumn)
|
||||
import Editor from '@/components/Editor';
|
||||
#end
|
||||
## 特殊:主子表专属逻辑
|
||||
#if ( $table.templateType != 10 )
|
||||
#if ( $subTables && $subTables.size() > 0 )
|
||||
#foreach ($subSimpleClassName in $subSimpleClassNames)
|
||||
import ${subSimpleClassName}List from './components/${subSimpleClassName}List.vue';
|
||||
#end
|
||||
#end
|
||||
#end
|
||||
|
||||
@@ -112,10 +112,13 @@
|
||||
</Dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { getIntDictOptions, getStrDictOptions, getBoolDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||
import { ${simpleClassName}Api } from '@/api/${table.moduleName}/${table.businessName}'
|
||||
import {
|
||||
${simpleClassName}Api
|
||||
}
|
||||
from
|
||||
'@/api/'
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
|
||||
@@ -262,10 +262,13 @@
|
||||
#end
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { getIntDictOptions, getStrDictOptions, getBoolDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||
import { ${simpleClassName}Api } from '@/api/${table.moduleName}/${table.businessName}'
|
||||
import {
|
||||
${simpleClassName}Api
|
||||
}
|
||||
from
|
||||
'@/api/'
|
||||
|
||||
const props = defineProps<{
|
||||
const props = defineProps<{
|
||||
${subJoinColumn.javaField}: undefined // ${subJoinColumn.columnComment}(主表的关联字段)
|
||||
}>()
|
||||
const formLoading = ref(false) // 表单的加载中
|
||||
|
||||
@@ -83,12 +83,13 @@
|
||||
#end
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { getIntDictOptions, getStrDictOptions, getBoolDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
import { ${simpleClassName}Api } from '@/api/${table.moduleName}/${table.businessName}'
|
||||
#if ($table.templateType == 11)
|
||||
import ${subSimpleClassName}Form from './${subSimpleClassName}Form.vue'
|
||||
#end
|
||||
import {
|
||||
${simpleClassName}Api
|
||||
}
|
||||
from
|
||||
'@/api/'
|
||||
#if ($table.templateType == 11)
|
||||
#end
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { defHttp } from '@/utils/http/axios'
|
||||
import {defHttp} from '@/utils/http/axios'
|
||||
#set ($baseURL = "/${table.moduleName}/${simpleClassName_strikeCase}")
|
||||
|
||||
// 查询${table.classComment}列表
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
<script lang="ts" setup>
|
||||
import { ref, unref } from 'vue'
|
||||
import { createFormSchema, updateFormSchema } from './${classNameVar}.data'
|
||||
import { useI18n } from '@/hooks/web/useI18n'
|
||||
import { useMessage } from '@/hooks/web/useMessage'
|
||||
import { BasicForm, useForm } from '@/components/Form'
|
||||
import { BasicModal, useModalInner } from '@/components/Modal'
|
||||
import { create${simpleClassName}, get${simpleClassName}, update${simpleClassName} } from '@/api/${table.moduleName}/${table.businessName}'
|
||||
import {ref, unref} from 'vue'
|
||||
import {createFormSchema, updateFormSchema} from './'
|
||||
import {useI18n} from '@/hooks/web/useI18n'
|
||||
import {useMessage} from '@/hooks/web/useMessage'
|
||||
import {useForm} from '@/components/Form'
|
||||
import {useModalInner} from '@/components/Modal'
|
||||
|
||||
defineOptions({ name: '${table.className}Modal' })
|
||||
import {create${simpleClassName}, get${simpleClassName}, update${simpleClassName}} from '@/api/'
|
||||
|
||||
defineOptions({ name: '${table.className}Modal' })
|
||||
|
||||
const emit = defineEmits(['success', 'register'])
|
||||
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
<script lang="ts" setup>
|
||||
import ${simpleClassName}Modal from './${simpleClassName}Modal.vue'
|
||||
import { columns, searchFormSchema } from './${classNameVar}.data'
|
||||
import { useI18n } from '@/hooks/web/useI18n'
|
||||
import { useMessage } from '@/hooks/web/useMessage'
|
||||
import { useModal } from '@/components/Modal'
|
||||
import { IconEnum } from '@/enums/appEnum'
|
||||
import { BasicTable, TableAction, useTable } from '@/components/Table'
|
||||
import { delete${simpleClassName}, export${simpleClassName}, get${simpleClassName}Page } from '@/api/${table.moduleName}/${table.businessName}'
|
||||
import {columns, searchFormSchema} from './'
|
||||
import {useI18n} from '@/hooks/web/useI18n'
|
||||
import {useMessage} from '@/hooks/web/useMessage'
|
||||
import {useModal} from '@/components/Modal'
|
||||
import {useTable} from '@/components/Table'
|
||||
|
||||
defineOptions({ name: '${table.className}' })
|
||||
import {delete${simpleClassName}, export${simpleClassName}} from '@/api/'
|
||||
|
||||
defineOptions({ name: '${table.className}' })
|
||||
|
||||
const { t } = useI18n()
|
||||
const { createConfirm, createMessage } = useMessage()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
import type { Dayjs } from 'dayjs';
|
||||
import type {PageParam, PageResult} from '@vben/request';
|
||||
import type {Dayjs} from 'dayjs';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
import {requestClient} from '#/api/request';
|
||||
#set ($baseURL = "/${table.moduleName}/${simpleClassName_strikeCase}")
|
||||
|
||||
export namespace ${simpleClassName}Api {
|
||||
|
||||
@@ -1,29 +1,27 @@
|
||||
<script lang="ts" setup>
|
||||
import type { ${simpleClassName}Api } from '#/api/${table.moduleName}/${simpleClassName_strikeCase}';
|
||||
import type { Rule } from 'ant-design-vue/es/form';
|
||||
import type {
|
||||
${simpleClassName}Api
|
||||
}
|
||||
from
|
||||
'#/api/';
|
||||
import {create${simpleClassName}, update${simpleClassName}} from '#/api/';
|
||||
import type {Rule} from 'ant-design-vue/es/form';
|
||||
|
||||
import { useVbenModal } from '@vben/common-ui';
|
||||
import { Tinymce as RichTextarea } from '#/components/tinymce';
|
||||
import { ImageUpload, FileUpload } from "#/components/upload";
|
||||
import { message, Tabs, Form, Input, Textarea, Select, RadioGroup, Radio, CheckboxGroup, Checkbox, DatePicker, TreeSelect } from 'ant-design-vue';
|
||||
import { DICT_TYPE, getDictOptions } from '#/utils';
|
||||
#if($table.templateType == 2)## 树表需要导入这些
|
||||
import { get${simpleClassName}List } from '#/api/${table.moduleName}/${table.businessName}';
|
||||
import { handleTree } from '@vben/utils'
|
||||
import {useVbenModal} from '@vben/common-ui';
|
||||
import {message} from 'ant-design-vue';
|
||||
import {handleTree} from '@vben/utils'
|
||||
import ${subSimpleClassName}Form from './'
|
||||
import {computed, ref} from 'vue';
|
||||
#if($table.templateType == 2)## 树表需要导入这些
|
||||
#end
|
||||
## 特殊:主子表专属逻辑
|
||||
#if ( $table.templateType == 10 || $table.templateType == 12 )
|
||||
#foreach ($subSimpleClassName in $subSimpleClassNames)
|
||||
#set ($index = $foreach.count - 1)
|
||||
#set ($subSimpleClassName_strikeCase = $subSimpleClassName_strikeCases.get($index))
|
||||
import ${subSimpleClassName}Form from './${subSimpleClassName_strikeCase}-form.vue'
|
||||
#end
|
||||
#end
|
||||
|
||||
import { computed, ref } from 'vue';
|
||||
import { $t } from '#/locales';
|
||||
import { get${simpleClassName}, create${simpleClassName}, update${simpleClassName} } from '#/api/${table.moduleName}/${table.businessName}';
|
||||
|
||||
const emit = defineEmits(['success']);
|
||||
|
||||
const formRef = ref();
|
||||
|
||||
@@ -1,38 +1,29 @@
|
||||
<script lang="ts" setup>
|
||||
import type { ${simpleClassName}Api } from '#/api/${table.moduleName}/${simpleClassName_strikeCase}';
|
||||
import type { VxeTableInstance } from '#/adapter/vxe-table';
|
||||
import type {
|
||||
${simpleClassName}Api
|
||||
}
|
||||
from
|
||||
'#/api/';
|
||||
import {delete${simpleClassName}, export${simpleClassName}} from '#/api/';
|
||||
|
||||
import { Page, useVbenModal } from '@vben/common-ui';
|
||||
import { cloneDeep, formatDateTime } from '@vben/utils';
|
||||
import { Button, message,Tabs,Pagination,Form,RangePicker,DatePicker,Select,Input } from 'ant-design-vue';
|
||||
import { DictTag } from '#/components/dict-tag';
|
||||
import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils';
|
||||
import ${simpleClassName}Form from './modules/form.vue';
|
||||
import { Download, Plus, RefreshCw, Search, Trash2 } from '@vben/icons';
|
||||
import { ContentWrap } from '#/components/content-wrap';
|
||||
import { VxeColumn, VxeTable } from '#/adapter/vxe-table';
|
||||
import { TableToolbar } from '#/components/table-toolbar';
|
||||
import { useTableToolbar } from '#/hooks';
|
||||
import {useVbenModal} from '@vben/common-ui';
|
||||
import {cloneDeep, downloadFileFromBlobPart} from '@vben/utils';
|
||||
import {message} from 'ant-design-vue';
|
||||
import ${simpleClassName}Form from './modules/form.vue';
|
||||
import {useTableToolbar} from '#/hooks';
|
||||
import {onMounted, reactive, ref} from 'vue';
|
||||
|
||||
## 特殊:主子表专属逻辑
|
||||
## 特殊:主子表专属逻辑
|
||||
#if ( $table.templateType == 11 || $table.templateType == 12 )
|
||||
#foreach ($subSimpleClassName in $subSimpleClassNames)
|
||||
#set ($index = $foreach.count - 1)
|
||||
#set ($subSimpleClassName_strikeCase = $subSimpleClassName_strikeCases.get($index))
|
||||
import ${subSimpleClassName}List from './modules/${subSimpleClassName_strikeCase}-list.vue'
|
||||
#end
|
||||
#end
|
||||
|
||||
import { ref, h, reactive,onMounted,nextTick } from 'vue';
|
||||
import { $t } from '#/locales';
|
||||
#if (${table.templateType} == 2)## 树表接口
|
||||
import { handleTree,isEmpty } from '@vben/utils'
|
||||
import { get${simpleClassName}List, delete${simpleClassName}, export${simpleClassName} } from '#/api/${table.moduleName}/${simpleClassName_strikeCase}';
|
||||
#else## 标准表接口
|
||||
import { isEmpty } from '@vben/utils';
|
||||
import { get${simpleClassName}Page, delete${simpleClassName},#if ($deleteBatchEnable) delete${simpleClassName}ListByIds,#end export${simpleClassName} } from '#/api/${table.moduleName}/${table.businessName}';
|
||||
#end
|
||||
import { downloadFileFromBlobPart } from '@vben/utils';
|
||||
|
||||
#if ($table.templateType == 12 || $table.templateType == 11) ## 内嵌和erp情况
|
||||
/** 子表的列表 */
|
||||
|
||||
@@ -3,19 +3,18 @@
|
||||
#set ($subJoinColumn = $subJoinColumns.get($subIndex))##当前 join 字段
|
||||
#set ($subSimpleClassName = $subSimpleClassNames.get($subIndex))
|
||||
<script lang="ts" setup>
|
||||
import type { ${simpleClassName}Api } from '#/api/${table.moduleName}/${simpleClassName_strikeCase}';
|
||||
import type { Rule } from 'ant-design-vue/es/form';
|
||||
import type {
|
||||
${simpleClassName}Api
|
||||
}
|
||||
from
|
||||
'#/api/';
|
||||
import {create${subSimpleClassName}, get${subSimpleClassName}, update${subSimpleClassName}} from '#/api/';
|
||||
import type {Rule} from 'ant-design-vue/es/form';
|
||||
|
||||
import { useVbenModal } from '@vben/common-ui';
|
||||
import { Tinymce as RichTextarea } from '#/components/tinymce';
|
||||
import { ImageUpload, FileUpload } from "#/components/upload";
|
||||
import { message, Tabs, Form, Input, Textarea, Select, RadioGroup, Radio, CheckboxGroup, Checkbox, DatePicker, TreeSelect } from 'ant-design-vue';
|
||||
import { DICT_TYPE, getDictOptions } from '#/utils';
|
||||
import {useVbenModal} from '@vben/common-ui';
|
||||
import {message} from 'ant-design-vue';
|
||||
|
||||
import { computed, ref } from 'vue';
|
||||
import { $t } from '#/locales';
|
||||
|
||||
import { get${subSimpleClassName}, create${subSimpleClassName}, update${subSimpleClassName} } from '#/api/${table.moduleName}/${simpleClassName_strikeCase}';
|
||||
import {computed, ref} from 'vue';
|
||||
|
||||
const emit = defineEmits(['success']);
|
||||
const getTitle = computed(() => {
|
||||
|
||||
@@ -5,23 +5,18 @@
|
||||
#set ($subClassNameVar = $subClassNameVars.get($subIndex))
|
||||
#set ($SubJoinColumnName = $subJoinColumn.javaField.substring(0,1).toUpperCase() + ${subJoinColumn.javaField.substring(1)})##首字母大写
|
||||
<script lang="ts" setup>
|
||||
import type { ${simpleClassName}Api } from '#/api/${table.moduleName}/${simpleClassName_strikeCase}';
|
||||
import type {
|
||||
${simpleClassName}Api
|
||||
}
|
||||
from
|
||||
'#/api/';
|
||||
import {nextTick, ref, watch} from 'vue';
|
||||
import type {VxeTableInstance} from '#/adapter/vxe-table';
|
||||
import type {Rule} from 'ant-design-vue/es/form';
|
||||
|
||||
import { message, Tabs, Form, Input, Textarea,Button, Select, RadioGroup, Radio, CheckboxGroup, Checkbox, DatePicker } from 'ant-design-vue';
|
||||
import { computed, ref, h, onMounted,watch,nextTick } from 'vue';
|
||||
import { $t } from '#/locales';
|
||||
import { DICT_TYPE, getDictOptions } from '#/utils';
|
||||
|
||||
#if ($subTable.subJoinMany) ## 一对多
|
||||
import type { VxeTableInstance } from '#/adapter/vxe-table';
|
||||
import { Plus } from "@vben/icons";
|
||||
import { VxeColumn, VxeTable } from '#/adapter/vxe-table';
|
||||
import { get${subSimpleClassName}ListBy${SubJoinColumnName} } from '#/api/${table.moduleName}/${simpleClassName_strikeCase}';
|
||||
#else
|
||||
import type { Rule } from 'ant-design-vue/es/form';
|
||||
import { Tinymce as RichTextarea } from '#/components/tinymce';
|
||||
import { get${subSimpleClassName}By${SubJoinColumnName} } from '#/api/${table.moduleName}/${simpleClassName_strikeCase}';
|
||||
#end
|
||||
#if ($subTable.subJoinMany) ## 一对多
|
||||
#else
|
||||
#end
|
||||
|
||||
const props = defineProps<{
|
||||
${subJoinColumn.javaField}?: number // ${subJoinColumn.columnComment}(主表的关联字段)
|
||||
|
||||
@@ -6,36 +6,25 @@
|
||||
#set ($subSimpleClassName_strikeCase = $subSimpleClassName_strikeCases.get($subIndex))
|
||||
#set ($SubJoinColumnName = $subJoinColumn.javaField.substring(0,1).toUpperCase() + ${subJoinColumn.javaField.substring(1)})##首字母大写
|
||||
<script lang="ts" setup>
|
||||
import type { ${simpleClassName}Api } from '#/api/${table.moduleName}/${simpleClassName_strikeCase}';
|
||||
import type { VxeTableInstance } from '#/adapter/vxe-table';
|
||||
import type {
|
||||
${simpleClassName}Api
|
||||
}
|
||||
from
|
||||
'#/api/';
|
||||
import {delete${subSimpleClassName}} from '#/api/';
|
||||
import {nextTick, onMounted, reactive, ref, watch} from 'vue';
|
||||
import {cloneDeep} from '@vben/utils';
|
||||
import {useVbenModal} from '@vben/common-ui';
|
||||
import {Form, message} from 'ant-design-vue';
|
||||
import {useTableToolbar} from '#/hooks';
|
||||
|
||||
import { DictTag } from '#/components/dict-tag';
|
||||
import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils';
|
||||
import { VxeColumn, VxeTable } from '#/adapter/vxe-table';
|
||||
import { reactive,ref, h, nextTick,watch,onMounted } from 'vue';
|
||||
import { cloneDeep, formatDateTime } from '@vben/utils';
|
||||
import { ContentWrap } from '#/components/content-wrap';
|
||||
#if ($table.templateType == 11) ## erp
|
||||
#end
|
||||
|
||||
#if ($table.templateType == 11) ## erp
|
||||
import { useVbenModal } from '@vben/common-ui';
|
||||
import ${subSimpleClassName}Form from './${subSimpleClassName_strikeCase}-form.vue'
|
||||
import { Tinymce as RichTextarea } from '#/components/tinymce';
|
||||
import { ImageUpload, FileUpload } from "#/components/upload";
|
||||
import { message,Button, Tabs,Pagination, Form, Input, Textarea, Select, RadioGroup, Radio, CheckboxGroup, Checkbox,RangePicker, DatePicker, TreeSelect } from 'ant-design-vue';
|
||||
import { Plus, Trash2 } from '@vben/icons';
|
||||
import { $t } from '#/locales';
|
||||
import { TableToolbar } from '#/components/table-toolbar';
|
||||
import { useTableToolbar } from '#/hooks';
|
||||
#end
|
||||
|
||||
#if ($table.templateType == 11) ## erp
|
||||
import { delete${subSimpleClassName},#if ($deleteBatchEnable) delete${subSimpleClassName}ListByIds,#end get${subSimpleClassName}Page } from '#/api/${table.moduleName}/${table.businessName}';
|
||||
import { isEmpty } from '@vben/utils';
|
||||
#else
|
||||
#else
|
||||
#if ($subTable.subJoinMany) ## 一对多
|
||||
import { get${subSimpleClassName}ListBy${SubJoinColumnName} } from '#/api/${table.moduleName}/${simpleClassName_strikeCase}';
|
||||
#else
|
||||
import { get${subSimpleClassName}By${SubJoinColumnName} } from '#/api/${table.moduleName}/${simpleClassName_strikeCase}';
|
||||
#end
|
||||
#end
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { PageParam, PageResult } from '@vben/request';
|
||||
import type { Dayjs } from 'dayjs';
|
||||
import type {PageParam, PageResult} from '@vben/request';
|
||||
import type {Dayjs} from 'dayjs';
|
||||
|
||||
import { requestClient } from '#/api/request';
|
||||
import {requestClient} from '#/api/request';
|
||||
#set ($baseURL = "/${table.moduleName}/${simpleClassName_strikeCase}")
|
||||
|
||||
export namespace ${simpleClassName}Api {
|
||||
|
||||
@@ -1,16 +1,9 @@
|
||||
import type { VbenFormSchema } from '#/adapter/form';
|
||||
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||
import type { ${simpleClassName}Api } from '#/api/${table.moduleName}/${table.businessName}';
|
||||
|
||||
import { z } from '#/adapter/form';
|
||||
import {
|
||||
DICT_TYPE,
|
||||
getDictOptions,
|
||||
getRangePickerDefaultProps,
|
||||
} from '#/utils';
|
||||
import type {VbenFormSchema} from '#/adapter/form';
|
||||
import type {VxeTableGridOptions} from '#/adapter/vxe-table';
|
||||
import type {${simpleClassName}Api} from '#/api/';
|
||||
import {DICT_TYPE, getDictOptions, getRangePickerDefaultProps,} from '#/utils';
|
||||
import {handleTree} from '@vben/utils';
|
||||
#if(${table.templateType} == 2)## 树表需要导入这些
|
||||
import { get${simpleClassName}List } from '#/api/${table.moduleName}/${table.businessName}';
|
||||
import { handleTree } from '@vben/utils';
|
||||
#end
|
||||
|
||||
/** 新增/修改的表单 */
|
||||
|
||||
@@ -1,24 +1,26 @@
|
||||
<script lang="ts" setup>
|
||||
import type { ${simpleClassName}Api } from '#/api/${table.moduleName}/${table.businessName}';
|
||||
import type {
|
||||
${simpleClassName}Api
|
||||
}
|
||||
from
|
||||
'#/api/';
|
||||
import {create${simpleClassName}, get${simpleClassName}, update${simpleClassName}} from '#/api/';
|
||||
|
||||
import { useVbenModal } from '@vben/common-ui';
|
||||
import { message, Tabs, Checkbox, Input, Textarea, Select,RadioGroup,CheckboxGroup, DatePicker } from 'ant-design-vue';
|
||||
## 特殊:主子表专属逻辑
|
||||
import {useVbenModal} from '@vben/common-ui';
|
||||
import {message} from 'ant-design-vue';
|
||||
import ${subSimpleClassName}Form from './'
|
||||
import {computed, ref} from 'vue';
|
||||
import {useVbenForm} from '#/adapter/form';
|
||||
|
||||
import {useFormSchema} from '../data';
|
||||
## 特殊:主子表专属逻辑
|
||||
#if ( $table.templateType == 10 || $table.templateType == 12 )
|
||||
#foreach ($subSimpleClassName in $subSimpleClassNames)
|
||||
#set ($index = $foreach.count - 1)
|
||||
#set ($subSimpleClassName_strikeCase = $subSimpleClassName_strikeCases.get($index))
|
||||
import ${subSimpleClassName}Form from './${subSimpleClassName_strikeCase}-form.vue'
|
||||
#end
|
||||
#end
|
||||
|
||||
import { computed, ref } from 'vue';
|
||||
import { $t } from '#/locales';
|
||||
import { useVbenForm } from '#/adapter/form';
|
||||
import { get${simpleClassName}, create${simpleClassName}, update${simpleClassName} } from '#/api/${table.moduleName}/${table.businessName}';
|
||||
|
||||
import { useFormSchema } from '../data';
|
||||
|
||||
const emit = defineEmits(['success']);
|
||||
const formData = ref<${simpleClassName}Api.${simpleClassName}>();
|
||||
const getTitle = computed(() => {
|
||||
|
||||
@@ -1,31 +1,33 @@
|
||||
<script lang="ts" setup>
|
||||
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||
import type { ${simpleClassName}Api } from '#/api/${table.moduleName}/${table.businessName}';
|
||||
import type {VxeTableGridOptions} from '#/adapter/vxe-table';
|
||||
import {useVbenVxeGrid} from '#/adapter/vxe-table';
|
||||
|
||||
import { Page, useVbenModal } from '@vben/common-ui';
|
||||
import { message,Tabs } from 'ant-design-vue';
|
||||
import Form from './modules/form.vue';
|
||||
import type {
|
||||
${simpleClassName}Api
|
||||
}
|
||||
from
|
||||
'#/api/';
|
||||
import {delete${simpleClassName}, export${simpleClassName}} from '#/api/';
|
||||
|
||||
## 特殊:主子表专属逻辑
|
||||
import {useVbenModal} from '@vben/common-ui';
|
||||
import {message} from 'ant-design-vue';
|
||||
import Form from './modules/form.vue';
|
||||
import {ref} from 'vue';
|
||||
import {downloadFileFromBlobPart} from '@vben/utils';
|
||||
|
||||
import {useGridColumns, useGridFormSchema} from './data';
|
||||
|
||||
## 特殊:主子表专属逻辑
|
||||
#if ( $table.templateType == 11 || $table.templateType == 12 )
|
||||
#foreach ($subSimpleClassName in $subSimpleClassNames)
|
||||
#set ($index = $foreach.count - 1)
|
||||
#set ($subSimpleClassName_strikeCase = $subSimpleClassName_strikeCases.get($index))
|
||||
import ${subSimpleClassName}List from './modules/${subSimpleClassName_strikeCase}-list.vue'
|
||||
#end
|
||||
#end
|
||||
#end
|
||||
|
||||
import { ref, computed } from 'vue';
|
||||
import { $t } from '#/locales';
|
||||
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||
#if (${table.templateType} == 2)## 树表接口
|
||||
import { get${simpleClassName}List, delete${simpleClassName}, export${simpleClassName} } from '#/api/${table.moduleName}/${table.businessName}';
|
||||
#else## 标准表接口
|
||||
import { get${simpleClassName}Page, delete${simpleClassName},#if ($deleteBatchEnable) delete${simpleClassName}ListByIds,#end export${simpleClassName} } from '#/api/${table.moduleName}/${table.businessName}';
|
||||
#end
|
||||
import { downloadFileFromBlobPart, isEmpty } from '@vben/utils';
|
||||
|
||||
import { useGridColumns, useGridFormSchema } from './data';
|
||||
|
||||
#if ($table.templateType == 12 || $table.templateType == 11) ## 内嵌和erp情况
|
||||
/** 子表的列表 */
|
||||
|
||||
@@ -3,17 +3,18 @@
|
||||
#set ($subJoinColumn = $subJoinColumns.get($subIndex))##当前 join 字段
|
||||
#set ($subSimpleClassName = $subSimpleClassNames.get($subIndex))
|
||||
<script lang="ts" setup>
|
||||
import type { ${simpleClassName}Api } from '#/api/${table.moduleName}/${table.businessName}';
|
||||
import type {
|
||||
${simpleClassName}Api
|
||||
}
|
||||
from
|
||||
'#/api/';
|
||||
import {create${subSimpleClassName}, get${subSimpleClassName}, update${subSimpleClassName}} from '#/api/';
|
||||
|
||||
import { useVbenModal } from '@vben/common-ui';
|
||||
import { message } from 'ant-design-vue';
|
||||
import {useVbenModal} from '@vben/common-ui';
|
||||
import {message} from 'ant-design-vue';
|
||||
|
||||
import { computed, ref } from 'vue';
|
||||
import { $t } from '#/locales';
|
||||
import { useVbenForm } from '#/adapter/form';
|
||||
import { get${subSimpleClassName}, create${subSimpleClassName}, update${subSimpleClassName} } from '#/api/${table.moduleName}/${table.businessName}';
|
||||
|
||||
import { use${subSimpleClassName}FormSchema } from '../data';
|
||||
import {computed, ref} from 'vue';
|
||||
import {useVbenForm} from '#/adapter/form';
|
||||
|
||||
const emit = defineEmits(['success']);
|
||||
const formData = ref<${simpleClassName}Api.${subSimpleClassName}>();
|
||||
|
||||
@@ -5,24 +5,20 @@
|
||||
#set ($subClassNameVar = $subClassNameVars.get($subIndex))
|
||||
#set ($SubJoinColumnName = $subJoinColumn.javaField.substring(0,1).toUpperCase() + ${subJoinColumn.javaField.substring(1)})##首字母大写
|
||||
<script lang="ts" setup>
|
||||
import type { ${simpleClassName}Api } from '#/api/${table.moduleName}/${table.businessName}';
|
||||
import type {
|
||||
${simpleClassName}Api
|
||||
}
|
||||
from
|
||||
'#/api/';
|
||||
|
||||
import { computed, ref, h, onMounted,watch,nextTick } from 'vue';
|
||||
import { $t } from '#/locales';
|
||||
import {nextTick, watch} from 'vue';
|
||||
import type {OnActionClickParams} from '#/adapter/vxe-table';
|
||||
import {useVbenVxeGrid} from '#/adapter/vxe-table';
|
||||
import {useVbenForm} from '#/adapter/form';
|
||||
|
||||
#if ($subTable.subJoinMany) ## 一对多
|
||||
import { Plus } from "@vben/icons";
|
||||
import { Button, Tabs, Checkbox, Input, Textarea, Select,RadioGroup,CheckboxGroup, DatePicker } from 'ant-design-vue';
|
||||
import { ImageUpload, FileUpload } from "#/components/upload";
|
||||
import type { OnActionClickParams } from '#/adapter/vxe-table';
|
||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||
import { use${subSimpleClassName}GridEditColumns } from '../data';
|
||||
import { get${subSimpleClassName}ListBy${SubJoinColumnName} } from '#/api/${table.moduleName}/${table.businessName}';
|
||||
#else
|
||||
import { useVbenForm } from '#/adapter/form';
|
||||
import { use${subSimpleClassName}FormSchema } from '../data';
|
||||
import { get${subSimpleClassName}By${SubJoinColumnName} } from '#/api/${table.moduleName}/${table.businessName}';
|
||||
#end
|
||||
#if ($subTable.subJoinMany) ## 一对多
|
||||
#else
|
||||
#end
|
||||
|
||||
const props = defineProps<{
|
||||
${subJoinColumn.javaField}?: number // ${subJoinColumn.columnComment}(主表的关联字段)
|
||||
|
||||
@@ -6,29 +6,28 @@
|
||||
#set ($subSimpleClassName_strikeCase = $subSimpleClassName_strikeCases.get($subIndex))
|
||||
#set ($SubJoinColumnName = $subJoinColumn.javaField.substring(0,1).toUpperCase() + ${subJoinColumn.javaField.substring(1)})##首字母大写
|
||||
<script lang="ts" setup>
|
||||
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||
import type { ${simpleClassName}Api } from '#/api/${table.moduleName}/${table.businessName}';
|
||||
import type {VxeTableGridOptions} from '#/adapter/vxe-table';
|
||||
import {useVbenVxeGrid} from '#/adapter/vxe-table';
|
||||
|
||||
#if ($table.templateType == 11) ## erp
|
||||
import ${subSimpleClassName}Form from './${subSimpleClassName_strikeCase}-form.vue'
|
||||
import type {
|
||||
${simpleClassName}Api
|
||||
}
|
||||
from
|
||||
'#/api/';
|
||||
import {delete${subSimpleClassName}} from '#/api/';
|
||||
import ${subSimpleClassName}Form from './'
|
||||
import {useVbenModal} from '@vben/common-ui';
|
||||
import {message} from 'ant-design-vue';
|
||||
import {nextTick, ref, watch} from 'vue';
|
||||
|
||||
#if ($table.templateType == 11) ## erp
|
||||
#end
|
||||
import { useVbenModal } from '@vben/common-ui';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { ref, computed, nextTick,watch } from 'vue';
|
||||
import { $t } from '#/locales';
|
||||
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||
|
||||
#if ($table.templateType == 11) ## erp
|
||||
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 { isEmpty } from '@vben/utils';
|
||||
#else
|
||||
#if ($subTable.subJoinMany) ## 一对多
|
||||
import { get${subSimpleClassName}ListBy${SubJoinColumnName} } from '#/api/${table.moduleName}/${table.businessName}';
|
||||
#else
|
||||
import { get${subSimpleClassName}By${SubJoinColumnName} } from '#/api/${table.moduleName}/${table.businessName}';
|
||||
#end
|
||||
import { use${subSimpleClassName}GridColumns } from '../data';
|
||||
#end
|
||||
|
||||
const props = defineProps<{
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
<springProperty scope="context" name="zt.info.base-package" source="zt.info.base-package"/>
|
||||
<!-- 格式化输出:%d 表示日期,%X{tid} SkWalking 链路追踪编号,%thread 表示线程名,%-5level:级别从左显示 5 个字符宽度,%msg:日志消息,%n是换行符 -->
|
||||
<property name="PATTERN_DEFAULT" value="%d{${LOG_DATEFORMAT_PATTERN:-yyyy-MM-dd HH:mm:ss.SSS}} | %highlight(${LOG_LEVEL_PATTERN:-%5p} ${PID:- }) | %boldYellow(%thread [%tid]) %boldGreen(%-40.40logger{39}) | %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}"/>
|
||||
<!--应用名称-->
|
||||
<springProperty scope="context" name="spring.application.name" source="spring.application.name"/>
|
||||
<!-- 日志输出路径 -->
|
||||
<property name="LOG_DIR" value="${user.home}/logs/${spring.application.name}"/>
|
||||
|
||||
<!-- 控制台 Appender -->
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
@@ -31,7 +35,7 @@
|
||||
<!-- 启动服务时,是否清理历史日志,一般不建议清理 -->
|
||||
<cleanHistoryOnStart>${LOGBACK_ROLLINGPOLICY_CLEAN_HISTORY_ON_START:-false}</cleanHistoryOnStart>
|
||||
<!-- 日志文件,到达多少容量,进行滚动 -->
|
||||
<maxFileSize>${LOGBACK_ROLLINGPOLICY_MAX_FILE_SIZE:-10MB}</maxFileSize>
|
||||
<maxFileSize>${LOGBACK_ROLLINGPOLICY_MAX_FILE_SIZE:-50MB}</maxFileSize>
|
||||
<!-- 日志文件的总大小,0 表示不限制 -->
|
||||
<totalSizeCap>${LOGBACK_ROLLINGPOLICY_TOTAL_SIZE_CAP:-0}</totalSizeCap>
|
||||
<!-- 日志文件的保留天数 -->
|
||||
@@ -56,18 +60,44 @@
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- ERROR 级别日志 -->
|
||||
<appender name="ERROR" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${LOG_DIR}-error.log</file>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<level>ERROR</level>
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<fileNamePattern>${LOG_DIR}-error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<maxHistory>30</maxHistory> <!-- 保留30天的日志 -->
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!--logback的日志级别 FATAL > ERROR > WARN > INFO > DEBUG-->
|
||||
<!-- 本地环境 -->
|
||||
<springProfile name="local">
|
||||
<root level="INFO">
|
||||
<springProfile name="local,dev">
|
||||
<root level="WARN">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
<appender-ref ref="ERROR"/>
|
||||
<appender-ref ref="GRPC"/> <!-- 本地环境下,如果不想接入 SkyWalking 日志服务,可以注释掉本行 -->
|
||||
<appender-ref ref="ASYNC"/> <!-- 本地环境下,如果不想打印日志,可以注释掉本行 -->
|
||||
</root>
|
||||
|
||||
<!--针对不同的业务路径,配置dao层的sql打印日志级别为DEBUG-->
|
||||
<logger name="com.zt.plat.module.infra.dal.mysql" level="DEBUG" additivity="false">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
</logger>
|
||||
</springProfile>
|
||||
|
||||
<!-- 其它环境 -->
|
||||
<springProfile name="dev,test,stage,prod,default">
|
||||
<root level="INFO">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
<appender-ref ref="ERROR"/>
|
||||
<appender-ref ref="ASYNC"/>
|
||||
<appender-ref ref="GRPC"/>
|
||||
</root>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.zt.plat.module.infra.service;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.generator.query.DefaultQuery;
|
||||
import com.baomidou.mybatisplus.generator.config.DataSourceConfig;
|
||||
import com.baomidou.mybatisplus.generator.config.builder.ConfigBuilder;
|
||||
import com.baomidou.mybatisplus.generator.config.po.TableInfo;
|
||||
import com.baomidou.mybatisplus.generator.query.DefaultQuery;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package com.zt.plat.module.infra.service.codegen.inner;
|
||||
|
||||
import com.zt.plat.framework.test.core.ut.BaseMockitoUnitTest;
|
||||
import com.zt.plat.module.infra.dal.dataobject.codegen.CodegenColumnDO;
|
||||
import com.zt.plat.module.infra.dal.dataobject.codegen.CodegenTableDO;
|
||||
import com.baomidou.mybatisplus.generator.config.po.TableField;
|
||||
import com.baomidou.mybatisplus.generator.config.po.TableInfo;
|
||||
import com.baomidou.mybatisplus.generator.config.rules.IColumnType;
|
||||
import com.zt.plat.framework.test.core.ut.BaseMockitoUnitTest;
|
||||
import com.zt.plat.module.infra.dal.dataobject.codegen.CodegenColumnDO;
|
||||
import com.zt.plat.module.infra.dal.dataobject.codegen.CodegenTableDO;
|
||||
import org.apache.ibatis.type.JdbcType;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.mockito.InjectMocks;
|
||||
|
||||
@@ -9,10 +9,10 @@ import com.zt.plat.module.infra.controller.admin.config.vo.ConfigSaveReqVO;
|
||||
import com.zt.plat.module.infra.dal.dataobject.config.ConfigDO;
|
||||
import com.zt.plat.module.infra.dal.mysql.config.ConfigMapper;
|
||||
import com.zt.plat.module.infra.enums.config.ConfigTypeEnum;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.context.annotation.Import;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import static cn.hutool.core.util.RandomUtil.randomEle;
|
||||
|
||||
@@ -3,14 +3,15 @@ package com.zt.plat.module.infra.service.db;
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import cn.hutool.core.util.ReflectUtil;
|
||||
import cn.hutool.crypto.symmetric.AES;
|
||||
import com.baomidou.dynamic.datasource.creator.DataSourceProperty;
|
||||
import com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceProperties;
|
||||
import com.zt.plat.framework.mybatis.core.type.EncryptTypeHandler;
|
||||
import com.zt.plat.framework.mybatis.core.util.JdbcUtils;
|
||||
import com.zt.plat.framework.test.core.ut.BaseDbUnitTest;
|
||||
import com.zt.plat.module.infra.controller.admin.db.vo.DataSourceConfigSaveReqVO;
|
||||
import com.zt.plat.module.infra.dal.dataobject.db.DataSourceConfigDO;
|
||||
import com.zt.plat.module.infra.dal.mysql.db.DataSourceConfigMapper;
|
||||
import com.baomidou.dynamic.datasource.creator.DataSourceProperty;
|
||||
import com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceProperties;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.mockito.MockedStatic;
|
||||
@@ -18,7 +19,6 @@ import org.mockito.stubbing.Answer;
|
||||
import org.springframework.boot.test.mock.mockito.MockBean;
|
||||
import org.springframework.context.annotation.Import;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
import static com.zt.plat.framework.test.core.util.AssertUtils.assertPojoEquals;
|
||||
|
||||
@@ -8,10 +8,10 @@ import com.zt.plat.framework.test.core.ut.BaseDbUnitTest;
|
||||
import com.zt.plat.module.infra.controller.admin.logger.vo.apiaccesslog.ApiAccessLogPageReqVO;
|
||||
import com.zt.plat.module.infra.dal.dataobject.logger.ApiAccessLogDO;
|
||||
import com.zt.plat.module.infra.dal.mysql.logger.ApiAccessLogMapper;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.context.annotation.Import;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
import java.time.Duration;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user