@@ -30,7 +30,7 @@ public class PageParam implements Serializable {
|
||||
@Schema(description = "每页条数,最大值为 100", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
|
||||
@NotNull(message = "每页条数不能为空")
|
||||
@Min(value = 1, message = "每页条数最小值为 1")
|
||||
@Max(value = 100, message = "每页条数最大值为 100")
|
||||
@Max(value = 10000, message = "每页条数最大值为 10000")
|
||||
private Integer pageSize = PAGE_SIZE;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package cn.iocoder.yudao.framework.common.pojo.vo;
|
||||
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author chenbowen
|
||||
*/
|
||||
@Data
|
||||
public class BatchDeleteReqVO {
|
||||
@NotEmpty(message = "批量删除 ids 不能为空")
|
||||
private List<Long> ids;
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
|
||||
package cn.iocoder.yudao.module.infra.api.stdnms;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.module.infra.api.stdnms.dto.StdNmsRespDTO;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Parameters;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@FeignClient(name = "stdnms-api") // 可根据实际服务名调整
|
||||
@Tag(name = "RPC 服务 - 数据命名与简写标准")
|
||||
public interface StdNmsApi {
|
||||
|
||||
String PREFIX = "/api/stdnms";
|
||||
|
||||
@DeleteMapping(PREFIX + "/delete")
|
||||
@Operation(summary = "删除数据命名与简写标准")
|
||||
@Parameters({
|
||||
@Parameter(name = "id", description = "主键ID", example = "1001", required = true)
|
||||
})
|
||||
CommonResult<Boolean> deleteStdNms(@RequestParam("id") Long id);
|
||||
|
||||
@DeleteMapping(PREFIX + "/delete-batch")
|
||||
@Operation(summary = "批量删除数据命名与简写标准")
|
||||
@Parameters({
|
||||
@Parameter(name = "ids", description = "主键ID集合", example = "[1001,1002]", required = true)
|
||||
})
|
||||
CommonResult<Boolean> deleteStdNmsList(@RequestParam("ids") List<Long> ids);
|
||||
|
||||
@GetMapping(PREFIX + "/get")
|
||||
@Operation(summary = "根据主键获取数据命名与简写标准")
|
||||
@Parameters({
|
||||
@Parameter(name = "id", description = "主键ID", example = "1001", required = true)
|
||||
})
|
||||
CommonResult<StdNmsRespDTO> getStdNms(@RequestParam("id") Long id);
|
||||
|
||||
@GetMapping(PREFIX + "/get-by-abbr")
|
||||
@Operation(summary = "根据缩写获取数据命名与简写标准")
|
||||
@Parameters({
|
||||
@Parameter(name = "abbr", description = "简写/缩写", example = "devNm", required = true)
|
||||
})
|
||||
CommonResult<StdNmsRespDTO> getStdNmsByAbbr(@RequestParam("abbr") String abbr);
|
||||
|
||||
@GetMapping(PREFIX + "/list-by-abbrs")
|
||||
@Operation(summary = "根据缩写列表查询数据命名与简写标准")
|
||||
@Parameters({
|
||||
@Parameter(name = "abbrs", description = "简写/缩写集合", example = "[devNm,devType]", required = true)
|
||||
})
|
||||
CommonResult<List<StdNmsRespDTO>> getStdNmsListByAbbrs(@RequestParam("abbrs") Collection<String> abbrs);
|
||||
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
package cn.iocoder.yudao.module.infra.api.stdnms.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Schema(description = "数据命名与简写标准响应 DTO")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class StdNmsRespDTO implements Serializable {
|
||||
|
||||
@Schema(description = "主键ID", example = "1001")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "名称", example = "设备名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "简写/缩写", example = "devNm")
|
||||
private String abbr;
|
||||
|
||||
// 可根据实际需求补充其他字段
|
||||
}
|
||||
@@ -24,6 +24,7 @@ import ${jakartaPackage}.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import ${basePackage}.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import ${PageParamClassName};
|
||||
import ${PageResultClassName};
|
||||
import ${CommonResultClassName};
|
||||
@@ -111,8 +112,8 @@ public class ${sceneEnum.prefixClass}${table.className}Controller extends Abstra
|
||||
#if ($sceneEnum.scene == 1)
|
||||
@PreAuthorize("@ss.hasPermission('${permissionPrefix}:delete')")
|
||||
#end
|
||||
public CommonResult<Boolean> delete${simpleClassName}List(@RequestParam("ids") List<${primaryColumn.javaType}> ids) {
|
||||
${classNameVar}Service.delete${simpleClassName}ListByIds(ids);
|
||||
public CommonResult<Boolean> delete${simpleClassName}List(@RequestBody BatchDeleteReqVO req) {
|
||||
${classNameVar}Service.delete${simpleClassName}ListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
#end
|
||||
|
||||
@@ -60,6 +60,14 @@ export const ${simpleClassName}Api = {
|
||||
return await request.delete({ url: `${baseURL}/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 批量删除${table.classComment}
|
||||
delete${simpleClassName}List: async (ids: IdType[]) => {
|
||||
return await request.delete({
|
||||
url: `${baseURL}/delete-list`,
|
||||
data: { ids }
|
||||
})
|
||||
},
|
||||
|
||||
// 导出${table.classComment} Excel
|
||||
export${simpleClassName}: async (params) => {
|
||||
return await request.download({ url: `${baseURL}/export-excel`, params })
|
||||
|
||||
@@ -101,6 +101,17 @@
|
||||
>
|
||||
<Icon icon="ep:download" class="mr-5px" /> 导出
|
||||
</el-button>
|
||||
#if ( $table.templateType != 12 && $table.templateType != 11 && $table.templateType != 2 )
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
@click="handleBatchDelete"
|
||||
:disabled="selectRecords.length === 0"
|
||||
v-hasPermi="['template:demo-virtualized-table:delete']"
|
||||
>
|
||||
<Icon icon="ep:delete" class="mr-5px" /> 批量删除({{ selectRecords.length }})
|
||||
</el-button>
|
||||
#end
|
||||
## 特殊:树表专属逻辑
|
||||
#if ( $table.templateType == 2 )
|
||||
<el-button type="danger" plain @click="toggleExpandAll">
|
||||
@@ -134,8 +145,8 @@
|
||||
:default-expand-all="isExpandAll"
|
||||
v-if="refreshTable"
|
||||
>
|
||||
#else
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
###else
|
||||
## <el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||
#end
|
||||
## 特殊:主子表专属逻辑
|
||||
#if ( $table.templateType == 12 && $subTables && $subTables.size() > 0 )
|
||||
@@ -156,6 +167,8 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
#end
|
||||
## 特殊表格依然使用 element table
|
||||
#if ( $table.templateType == 12 || $table.templateType == 11 || $table.templateType == 2 )
|
||||
#foreach($column in $columns)
|
||||
#if ($column.listOperationResult)
|
||||
#set ($dictType=$column.dictType)
|
||||
@@ -205,12 +218,43 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
#else
|
||||
## 普通表格使用 Vxe table 支持大数据量渲染
|
||||
<vxe-grid
|
||||
ref="gridRef"
|
||||
v-bind="gridOptions"
|
||||
@checkbox-change="onCheckboxChange"
|
||||
>
|
||||
<template #action="{ row }">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="openForm('update', row.id)"
|
||||
v-hasPermi="['${permissionPrefix}:update']"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
@click="handleDelete(row.id)"
|
||||
v-hasPermi="['${permissionPrefix}:delete']"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
#if($isFileUpload && $isFileUpload == true)
|
||||
<el-button link @click="openBusinessFile(row.id)">附件</el-button>
|
||||
#end
|
||||
</template>
|
||||
</vxe-grid>
|
||||
#end
|
||||
<!-- 分页 -->
|
||||
<Pagination
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNo"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
:page-sizes="[10, 20, 50, 100, 200, 500, 700,5000, 10000]"
|
||||
/>
|
||||
</ContentWrap>
|
||||
|
||||
@@ -242,6 +286,7 @@ import { dateFormatter } from '@/utils/formatTime'
|
||||
#if ( $table.templateType == 2 )
|
||||
import { handleTree } from '@/utils/tree'
|
||||
#end
|
||||
import { useVxeGrid } from '@/hooks/web/useVxeGrid'
|
||||
import download from '@/utils/download'
|
||||
import { ${simpleClassName}Api, ${simpleClassName}VO } from '@/api/${table.moduleName}/${table.businessName}'
|
||||
import ${simpleClassName}Form from './${simpleClassName}Form.vue'
|
||||
@@ -274,6 +319,8 @@ const list = ref<${simpleClassName}VO[]>([]) // 列表的数据
|
||||
#if ( $table.templateType != 2 )
|
||||
const total = ref(0) // 列表的总页数
|
||||
#end
|
||||
const gridRef = ref() // vxe-grid 的引用
|
||||
const selectRecords = ref<${simpleClassName}VO[]>([]) // 选中的记录
|
||||
const queryParams = reactive({
|
||||
## 特殊:树表专属逻辑(树不需要分页接口)
|
||||
#if ( $table.templateType != 2 )
|
||||
@@ -294,6 +341,69 @@ const queryParams = reactive({
|
||||
const queryFormRef = ref() // 搜索的表单
|
||||
const exportLoading = ref(false) // 导出的加载中
|
||||
|
||||
#if ( $table.templateType != 12 && $table.templateType != 11 && $table.templateType != 2 )
|
||||
/** vxe-grid 复选框事件 */
|
||||
const onCheckboxChange = ({ records }) => {
|
||||
selectRecords.value = records
|
||||
}
|
||||
|
||||
// vxe-grid 配置 (兼容 VxeTable 4.6.25)
|
||||
const { gridOptions } = useVxeGrid({
|
||||
loading,
|
||||
data: list,
|
||||
columns: [
|
||||
{
|
||||
type: 'checkbox',
|
||||
width: 50,
|
||||
align: 'center',
|
||||
fixed: 'left' // 固定在左侧
|
||||
},
|
||||
#foreach($column in $columns)
|
||||
#if ($column.listOperationResult)
|
||||
#set ($dictType=$column.dictType)
|
||||
#set ($javaField = $column.javaField)
|
||||
#set ($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
|
||||
#set ($comment=$column.columnComment)
|
||||
#if ($column.javaType == "LocalDateTime")## 时间类型
|
||||
{
|
||||
field: '${javaField}',
|
||||
title: '${comment}',
|
||||
width: 180,
|
||||
align: 'center',
|
||||
formatter: ({ cellValue }) => dateFormatter(null,null,cellValue)
|
||||
},
|
||||
#elseif($column.dictType && "" != $column.dictType)## 数据字典
|
||||
{
|
||||
field: '${javaField}',
|
||||
title: '${comment}',
|
||||
width: 120,
|
||||
align: 'center',
|
||||
formatter: ({ cellValue }) => {
|
||||
const dict = getStrDictOptions(DICT_TYPE.${dictType.toUpperCase()}).find(item => item.value === cellValue)
|
||||
return dict ? dict.label : cellValue
|
||||
}
|
||||
},
|
||||
#else
|
||||
{
|
||||
field: '${javaField}',
|
||||
title: '${comment}',
|
||||
minWidth: 120,
|
||||
align: 'center'
|
||||
},
|
||||
#end
|
||||
#end
|
||||
#end
|
||||
{
|
||||
title: '操作',
|
||||
width: 200,
|
||||
align: 'center',
|
||||
fixed: 'right', // 固定在右侧
|
||||
slots: { default: 'action' }
|
||||
}
|
||||
]
|
||||
})
|
||||
#end
|
||||
|
||||
/** 查询列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
@@ -343,6 +453,27 @@ const handleDelete = async (id: number) => {
|
||||
} catch {}
|
||||
}
|
||||
|
||||
/** 批量删除按钮操作 */
|
||||
const handleBatchDelete = async () => {
|
||||
try {
|
||||
if (selectRecords.value.length === 0) {
|
||||
message.warning('请至少选择一条记录')
|
||||
return
|
||||
}
|
||||
// 删除的二次确认
|
||||
await message.delConfirm(`确定要删除选中的 ${selectRecords.value.length} 条记录吗?`)
|
||||
// 批量删除
|
||||
const ids = selectRecords.value.map((record) => record.id)
|
||||
await ${simpleClassName}Api.delete${simpleClassName}List(ids)
|
||||
message.success(t('common.delSuccess'))
|
||||
// 清空选中状态
|
||||
gridRef.value?.clearCheckboxRow()
|
||||
selectRecords.value = []
|
||||
// 刷新列表
|
||||
await getList()
|
||||
} catch {}
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
const handleExport = async () => {
|
||||
try {
|
||||
|
||||
@@ -13,4 +13,7 @@ public interface ErrorCodeConstants {
|
||||
// ========== 合同 补充编号 ==========
|
||||
ErrorCode DEMO_CONTRACT_NOT_EXISTS = new ErrorCode(2_100_000_000, "合同不存在");
|
||||
|
||||
// ========== 虚拟化表格 1_100_000_001 ==========
|
||||
ErrorCode DEMO_VIRTUALIZED_TABLE_NOT_EXISTS = new ErrorCode(1_100_000_001, "虚拟化表格不存在");
|
||||
|
||||
}
|
||||
|
||||
@@ -1,43 +1,42 @@
|
||||
package cn.iocoder.yudao.module.template.controller.admin.contract;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import cn.iocoder.yudao.framework.business.annotation.FileUploadController;
|
||||
import cn.iocoder.yudao.framework.business.controller.AbstractFileUploadController;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import jakarta.validation.constraints.*;
|
||||
import jakarta.validation.*;
|
||||
import jakarta.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.template.controller.admin.contract.vo.*;
|
||||
import cn.iocoder.yudao.module.template.controller.admin.contract.vo.DemoContractPageReqVO;
|
||||
import cn.iocoder.yudao.module.template.controller.admin.contract.vo.DemoContractRespVO;
|
||||
import cn.iocoder.yudao.module.template.controller.admin.contract.vo.DemoContractSaveReqVO;
|
||||
import cn.iocoder.yudao.module.template.dal.dataobject.contract.DemoContractDO;
|
||||
import cn.iocoder.yudao.module.template.service.contract.DemoContractService;
|
||||
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.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 合同")
|
||||
@RestController
|
||||
@RequestMapping("/template/demo-contract")
|
||||
@Validated
|
||||
@FileUploadController(source = "template.contract")
|
||||
public class DemoContractController extends AbstractFileUploadController {
|
||||
public class DemoContractController extends AbstractFileUploadController implements BusinessControllerMarker{
|
||||
|
||||
static {
|
||||
FileUploadController annotation = DemoContractController.class.getAnnotation(FileUploadController.class);
|
||||
@@ -77,8 +76,8 @@ public class DemoContractController extends AbstractFileUploadController {
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除合同")
|
||||
@PreAuthorize("@ss.hasPermission('template:demo-contract:delete')")
|
||||
public CommonResult<Boolean> deleteDemoContractList(@RequestParam("ids") List<Long> ids) {
|
||||
demoContractService.deleteDemoContractListByIds(ids);
|
||||
public CommonResult<Boolean> deleteDemoContractList(@RequestBody BatchDeleteReqVO req) {
|
||||
demoContractService.deleteDemoContractListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
|
||||
@@ -17,13 +17,13 @@ public class DemoContractPageReqVO extends PageParam {
|
||||
@Schema(description = "合同编号")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "合同名称", example = "赵六")
|
||||
@Schema(description = "合同名称", example = "李四")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "合同状态", example = "2")
|
||||
@Schema(description = "合同状态", example = "1")
|
||||
private Short status;
|
||||
|
||||
@Schema(description = "流程实例ID", example = "10492")
|
||||
@Schema(description = "流程实例ID", example = "7282")
|
||||
private Long processInstanceId;
|
||||
|
||||
@Schema(description = "签订日期")
|
||||
@@ -41,11 +41,14 @@ public class DemoContractPageReqVO extends PageParam {
|
||||
@Schema(description = "合同金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@Schema(description = "备注", example = "你说的对")
|
||||
@Schema(description = "备注", example = "随便")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "岗位ID", example = "26779")
|
||||
private Long postId;
|
||||
|
||||
}
|
||||
@@ -13,7 +13,7 @@ import com.alibaba.excel.annotation.*;
|
||||
@ExcelIgnoreUnannotated
|
||||
public class DemoContractRespVO {
|
||||
|
||||
@Schema(description = "合同ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "27417")
|
||||
@Schema(description = "合同ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "29614")
|
||||
@ExcelProperty("合同ID")
|
||||
private Long id;
|
||||
|
||||
@@ -21,15 +21,15 @@ public class DemoContractRespVO {
|
||||
@ExcelProperty("合同编号")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "合同名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
|
||||
@Schema(description = "合同名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
|
||||
@ExcelProperty("合同名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "合同状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@Schema(description = "合同状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@ExcelProperty("合同状态")
|
||||
private Short status;
|
||||
|
||||
@Schema(description = "流程实例ID", example = "10492")
|
||||
@Schema(description = "流程实例ID", example = "7282")
|
||||
@ExcelProperty("流程实例ID")
|
||||
private Long processInstanceId;
|
||||
|
||||
@@ -49,7 +49,7 @@ public class DemoContractRespVO {
|
||||
@ExcelProperty("合同金额")
|
||||
private BigDecimal amount;
|
||||
|
||||
@Schema(description = "备注", example = "你说的对")
|
||||
@Schema(description = "备注", example = "随便")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@@ -57,12 +57,24 @@ public class DemoContractRespVO {
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "公司名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
|
||||
@Schema(description = "公司ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "9176")
|
||||
@ExcelProperty("公司ID")
|
||||
private Long companyId;
|
||||
|
||||
@Schema(description = "公司名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||
@ExcelProperty("公司名称")
|
||||
private String companyName;
|
||||
|
||||
@Schema(description = "部门名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
|
||||
@Schema(description = "部门ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "23987")
|
||||
@ExcelProperty("部门ID")
|
||||
private Long deptId;
|
||||
|
||||
@Schema(description = "部门名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
||||
@ExcelProperty("部门名称")
|
||||
private String deptName;
|
||||
|
||||
@Schema(description = "岗位ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26779")
|
||||
@ExcelProperty("岗位ID")
|
||||
private Long postId;
|
||||
|
||||
}
|
||||
@@ -1,33 +1,24 @@
|
||||
package cn.iocoder.yudao.module.template.controller.admin.contract.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 合同新增/修改 Request VO")
|
||||
@Data
|
||||
public class DemoContractSaveReqVO {
|
||||
|
||||
@Schema(description = "合同ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "27417")
|
||||
@Schema(description = "合同ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "29614")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "合同编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String code;
|
||||
|
||||
@Schema(description = "合同名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
|
||||
@Schema(description = "合同名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
|
||||
@NotEmpty(message = "合同名称不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "合同状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
private Short status;
|
||||
|
||||
@Schema(description = "流程实例ID", example = "10492")
|
||||
private Long processInstanceId;
|
||||
|
||||
@Schema(description = "签订日期")
|
||||
private LocalDateTime signDate;
|
||||
|
||||
@@ -41,7 +32,11 @@ public class DemoContractSaveReqVO {
|
||||
@NotNull(message = "合同金额不能为空")
|
||||
private BigDecimal amount;
|
||||
|
||||
@Schema(description = "备注", example = "你说的对")
|
||||
@Schema(description = "备注", example = "随便")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "岗位ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26779")
|
||||
@NotNull(message = "岗位ID不能为空")
|
||||
private Long postId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
package cn.iocoder.yudao.module.template.controller.admin.virtualizedtable;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.module.template.controller.admin.virtualizedtable.vo.DemoVirtualizedTablePageReqVO;
|
||||
import cn.iocoder.yudao.module.template.controller.admin.virtualizedtable.vo.DemoVirtualizedTableRespVO;
|
||||
import cn.iocoder.yudao.module.template.controller.admin.virtualizedtable.vo.DemoVirtualizedTableSaveReqVO;
|
||||
import cn.iocoder.yudao.module.template.convert.virtualizedtable.DemoVirtualizedTableConvert;
|
||||
import cn.iocoder.yudao.module.template.dal.dataobject.virtualizedtable.DemoVirtualizedTableDO;
|
||||
import cn.iocoder.yudao.module.template.service.virtualizedtable.DemoVirtualizedTableService;
|
||||
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.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 虚拟表格测试")
|
||||
@RestController
|
||||
@RequestMapping("/template/demo-virtualized-table")
|
||||
@Validated
|
||||
public class DemoVirtualizedTableController {
|
||||
|
||||
|
||||
@Resource
|
||||
private DemoVirtualizedTableService demoVirtualizedTableService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建虚拟表格测试")
|
||||
@PreAuthorize("@ss.hasPermission('template:demo-virtualized-table:create')")
|
||||
public CommonResult<DemoVirtualizedTableRespVO> createDemoVirtualizedTable(@Valid @RequestBody DemoVirtualizedTableSaveReqVO createReqVO) {
|
||||
return success(demoVirtualizedTableService.createDemoVirtualizedTable(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新虚拟表格测试")
|
||||
@PreAuthorize("@ss.hasPermission('template:demo-virtualized-table:update')")
|
||||
public CommonResult<Boolean> updateDemoVirtualizedTable(@Valid @RequestBody DemoVirtualizedTableSaveReqVO updateReqVO) {
|
||||
demoVirtualizedTableService.updateDemoVirtualizedTable(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除虚拟表格测试")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('template:demo-virtualized-table:delete')")
|
||||
public CommonResult<Boolean> deleteDemoVirtualizedTable(@RequestParam("id") Long id) {
|
||||
demoVirtualizedTableService.deleteDemoVirtualizedTable(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除虚拟表格测试")
|
||||
@PreAuthorize("@ss.hasPermission('template:demo-virtualized-table:delete')")
|
||||
public CommonResult<Boolean> deleteDemoVirtualizedTableList(@RequestBody BatchDeleteReqVO req) {
|
||||
demoVirtualizedTableService.deleteDemoVirtualizedTableListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得虚拟表格测试")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('template:demo-virtualized-table:query')")
|
||||
public CommonResult<DemoVirtualizedTableRespVO> getDemoVirtualizedTable(@RequestParam("id") Long id) {
|
||||
DemoVirtualizedTableDO demoVirtualizedTable = demoVirtualizedTableService.getDemoVirtualizedTable(id);
|
||||
return success(BeanUtils.toBean(demoVirtualizedTable, DemoVirtualizedTableRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得虚拟表格测试分页")
|
||||
@PreAuthorize("@ss.hasPermission('template:demo-virtualized-table:query')")
|
||||
public CommonResult<PageResult<DemoVirtualizedTableRespVO>> getDemoVirtualizedTablePage(@Valid DemoVirtualizedTablePageReqVO pageReqVO) {
|
||||
PageResult<DemoVirtualizedTableDO> pageResult = demoVirtualizedTableService.getDemoVirtualizedTablePage(pageReqVO);
|
||||
PageResult<DemoVirtualizedTableRespVO> convert = DemoVirtualizedTableConvert.INSTANCE.convert(pageResult);
|
||||
return success(convert);
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出虚拟表格测试 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('template:demo-virtualized-table:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportDemoVirtualizedTableExcel(@Valid DemoVirtualizedTablePageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<DemoVirtualizedTableDO> list = demoVirtualizedTableService.getDemoVirtualizedTablePage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "虚拟表格测试.xls", "数据", DemoVirtualizedTableRespVO.class,
|
||||
BeanUtils.toBean(list, DemoVirtualizedTableRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package cn.iocoder.yudao.module.template.controller.admin.virtualizedtable.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 虚拟表格测试分页 Request VO")
|
||||
@Data
|
||||
public class DemoVirtualizedTablePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "COL_1")
|
||||
private String col1;
|
||||
|
||||
@Schema(description = "COL_2")
|
||||
private String col2;
|
||||
|
||||
@Schema(description = "COL_3")
|
||||
private String col3;
|
||||
|
||||
@Schema(description = "COL_4")
|
||||
private String col4;
|
||||
|
||||
@Schema(description = "COL_5")
|
||||
private String col5;
|
||||
|
||||
@Schema(description = "COL_6")
|
||||
private String col6;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,423 @@
|
||||
package cn.iocoder.yudao.module.template.controller.admin.virtualizedtable.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 虚拟表格测试 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class DemoVirtualizedTableRespVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "4009")
|
||||
@ExcelProperty("ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "COL_1")
|
||||
@ExcelProperty("COL_1")
|
||||
private String col1;
|
||||
|
||||
@Schema(description = "COL_2")
|
||||
@ExcelProperty("COL_2")
|
||||
private String col2;
|
||||
|
||||
@Schema(description = "COL_3")
|
||||
@ExcelProperty("COL_3")
|
||||
private String col3;
|
||||
|
||||
@Schema(description = "COL_4")
|
||||
@ExcelProperty("COL_4")
|
||||
private String col4;
|
||||
|
||||
@Schema(description = "COL_5")
|
||||
@ExcelProperty("COL_5")
|
||||
private String col5;
|
||||
|
||||
@Schema(description = "COL_6")
|
||||
@ExcelProperty("COL_6")
|
||||
private String col6;
|
||||
|
||||
@Schema(description = "COL_7")
|
||||
@ExcelProperty("COL_7")
|
||||
private String col7;
|
||||
|
||||
@Schema(description = "COL_8")
|
||||
@ExcelProperty("COL_8")
|
||||
private String col8;
|
||||
|
||||
@Schema(description = "COL_9")
|
||||
@ExcelProperty("COL_9")
|
||||
private String col9;
|
||||
|
||||
@Schema(description = "COL_10")
|
||||
@ExcelProperty("COL_10")
|
||||
private String col10;
|
||||
|
||||
@Schema(description = "COL_11")
|
||||
@ExcelProperty("COL_11")
|
||||
private String col11;
|
||||
|
||||
@Schema(description = "COL_12")
|
||||
@ExcelProperty("COL_12")
|
||||
private String col12;
|
||||
|
||||
@Schema(description = "COL_13")
|
||||
@ExcelProperty("COL_13")
|
||||
private String col13;
|
||||
|
||||
@Schema(description = "COL_14")
|
||||
@ExcelProperty("COL_14")
|
||||
private String col14;
|
||||
|
||||
@Schema(description = "COL_15")
|
||||
@ExcelProperty("COL_15")
|
||||
private String col15;
|
||||
|
||||
@Schema(description = "COL_16")
|
||||
@ExcelProperty("COL_16")
|
||||
private String col16;
|
||||
|
||||
@Schema(description = "COL_17")
|
||||
@ExcelProperty("COL_17")
|
||||
private String col17;
|
||||
|
||||
@Schema(description = "COL_18")
|
||||
@ExcelProperty("COL_18")
|
||||
private String col18;
|
||||
|
||||
@Schema(description = "COL_19")
|
||||
@ExcelProperty("COL_19")
|
||||
private String col19;
|
||||
|
||||
@Schema(description = "COL_20")
|
||||
@ExcelProperty("COL_20")
|
||||
private String col20;
|
||||
|
||||
@Schema(description = "COL_21")
|
||||
@ExcelProperty("COL_21")
|
||||
private String col21;
|
||||
|
||||
@Schema(description = "COL_22")
|
||||
@ExcelProperty("COL_22")
|
||||
private String col22;
|
||||
|
||||
@Schema(description = "COL_23")
|
||||
@ExcelProperty("COL_23")
|
||||
private String col23;
|
||||
|
||||
@Schema(description = "COL_24")
|
||||
@ExcelProperty("COL_24")
|
||||
private String col24;
|
||||
|
||||
@Schema(description = "COL_25")
|
||||
@ExcelProperty("COL_25")
|
||||
private String col25;
|
||||
|
||||
@Schema(description = "COL_26")
|
||||
@ExcelProperty("COL_26")
|
||||
private String col26;
|
||||
|
||||
@Schema(description = "COL_27")
|
||||
@ExcelProperty("COL_27")
|
||||
private String col27;
|
||||
|
||||
@Schema(description = "COL_28")
|
||||
@ExcelProperty("COL_28")
|
||||
private String col28;
|
||||
|
||||
@Schema(description = "COL_29")
|
||||
@ExcelProperty("COL_29")
|
||||
private String col29;
|
||||
|
||||
@Schema(description = "COL_30")
|
||||
@ExcelProperty("COL_30")
|
||||
private String col30;
|
||||
|
||||
@Schema(description = "COL_31")
|
||||
@ExcelProperty("COL_31")
|
||||
private String col31;
|
||||
|
||||
@Schema(description = "COL_32")
|
||||
@ExcelProperty("COL_32")
|
||||
private String col32;
|
||||
|
||||
@Schema(description = "COL_33")
|
||||
@ExcelProperty("COL_33")
|
||||
private String col33;
|
||||
|
||||
@Schema(description = "COL_34")
|
||||
@ExcelProperty("COL_34")
|
||||
private String col34;
|
||||
|
||||
@Schema(description = "COL_35")
|
||||
@ExcelProperty("COL_35")
|
||||
private String col35;
|
||||
|
||||
@Schema(description = "COL_36")
|
||||
@ExcelProperty("COL_36")
|
||||
private String col36;
|
||||
|
||||
@Schema(description = "COL_37")
|
||||
@ExcelProperty("COL_37")
|
||||
private String col37;
|
||||
|
||||
@Schema(description = "COL_38")
|
||||
@ExcelProperty("COL_38")
|
||||
private String col38;
|
||||
|
||||
@Schema(description = "COL_39")
|
||||
@ExcelProperty("COL_39")
|
||||
private String col39;
|
||||
|
||||
@Schema(description = "COL_40")
|
||||
@ExcelProperty("COL_40")
|
||||
private String col40;
|
||||
|
||||
@Schema(description = "COL_41")
|
||||
@ExcelProperty("COL_41")
|
||||
private String col41;
|
||||
|
||||
@Schema(description = "COL_42")
|
||||
@ExcelProperty("COL_42")
|
||||
private String col42;
|
||||
|
||||
@Schema(description = "COL_43")
|
||||
@ExcelProperty("COL_43")
|
||||
private String col43;
|
||||
|
||||
@Schema(description = "COL_44")
|
||||
@ExcelProperty("COL_44")
|
||||
private String col44;
|
||||
|
||||
@Schema(description = "COL_45")
|
||||
@ExcelProperty("COL_45")
|
||||
private String col45;
|
||||
|
||||
@Schema(description = "COL_46")
|
||||
@ExcelProperty("COL_46")
|
||||
private String col46;
|
||||
|
||||
@Schema(description = "COL_47")
|
||||
@ExcelProperty("COL_47")
|
||||
private String col47;
|
||||
|
||||
@Schema(description = "COL_48")
|
||||
@ExcelProperty("COL_48")
|
||||
private String col48;
|
||||
|
||||
@Schema(description = "COL_49")
|
||||
@ExcelProperty("COL_49")
|
||||
private String col49;
|
||||
|
||||
@Schema(description = "COL_50")
|
||||
@ExcelProperty("COL_50")
|
||||
private String col50;
|
||||
|
||||
@Schema(description = "COL_51")
|
||||
@ExcelProperty("COL_51")
|
||||
private String col51;
|
||||
|
||||
@Schema(description = "COL_52")
|
||||
@ExcelProperty("COL_52")
|
||||
private String col52;
|
||||
|
||||
@Schema(description = "COL_53")
|
||||
@ExcelProperty("COL_53")
|
||||
private String col53;
|
||||
|
||||
@Schema(description = "COL_54")
|
||||
@ExcelProperty("COL_54")
|
||||
private String col54;
|
||||
|
||||
@Schema(description = "COL_55")
|
||||
@ExcelProperty("COL_55")
|
||||
private String col55;
|
||||
|
||||
@Schema(description = "COL_56")
|
||||
@ExcelProperty("COL_56")
|
||||
private String col56;
|
||||
|
||||
@Schema(description = "COL_57")
|
||||
@ExcelProperty("COL_57")
|
||||
private String col57;
|
||||
|
||||
@Schema(description = "COL_58")
|
||||
@ExcelProperty("COL_58")
|
||||
private String col58;
|
||||
|
||||
@Schema(description = "COL_59")
|
||||
@ExcelProperty("COL_59")
|
||||
private String col59;
|
||||
|
||||
@Schema(description = "COL_60")
|
||||
@ExcelProperty("COL_60")
|
||||
private String col60;
|
||||
|
||||
@Schema(description = "COL_61")
|
||||
@ExcelProperty("COL_61")
|
||||
private String col61;
|
||||
|
||||
@Schema(description = "COL_62")
|
||||
@ExcelProperty("COL_62")
|
||||
private String col62;
|
||||
|
||||
@Schema(description = "COL_63")
|
||||
@ExcelProperty("COL_63")
|
||||
private String col63;
|
||||
|
||||
@Schema(description = "COL_64")
|
||||
@ExcelProperty("COL_64")
|
||||
private String col64;
|
||||
|
||||
@Schema(description = "COL_65")
|
||||
@ExcelProperty("COL_65")
|
||||
private String col65;
|
||||
|
||||
@Schema(description = "COL_66")
|
||||
@ExcelProperty("COL_66")
|
||||
private String col66;
|
||||
|
||||
@Schema(description = "COL_67")
|
||||
@ExcelProperty("COL_67")
|
||||
private String col67;
|
||||
|
||||
@Schema(description = "COL_68")
|
||||
@ExcelProperty("COL_68")
|
||||
private String col68;
|
||||
|
||||
@Schema(description = "COL_69")
|
||||
@ExcelProperty("COL_69")
|
||||
private String col69;
|
||||
|
||||
@Schema(description = "COL_70")
|
||||
@ExcelProperty("COL_70")
|
||||
private String col70;
|
||||
|
||||
@Schema(description = "COL_71")
|
||||
@ExcelProperty("COL_71")
|
||||
private String col71;
|
||||
|
||||
@Schema(description = "COL_72")
|
||||
@ExcelProperty("COL_72")
|
||||
private String col72;
|
||||
|
||||
@Schema(description = "COL_73")
|
||||
@ExcelProperty("COL_73")
|
||||
private String col73;
|
||||
|
||||
@Schema(description = "COL_74")
|
||||
@ExcelProperty("COL_74")
|
||||
private String col74;
|
||||
|
||||
@Schema(description = "COL_75")
|
||||
@ExcelProperty("COL_75")
|
||||
private String col75;
|
||||
|
||||
@Schema(description = "COL_76")
|
||||
@ExcelProperty("COL_76")
|
||||
private String col76;
|
||||
|
||||
@Schema(description = "COL_77")
|
||||
@ExcelProperty("COL_77")
|
||||
private String col77;
|
||||
|
||||
@Schema(description = "COL_78")
|
||||
@ExcelProperty("COL_78")
|
||||
private String col78;
|
||||
|
||||
@Schema(description = "COL_79")
|
||||
@ExcelProperty("COL_79")
|
||||
private String col79;
|
||||
|
||||
@Schema(description = "COL_80")
|
||||
@ExcelProperty("COL_80")
|
||||
private String col80;
|
||||
|
||||
@Schema(description = "COL_81")
|
||||
@ExcelProperty("COL_81")
|
||||
private String col81;
|
||||
|
||||
@Schema(description = "COL_82")
|
||||
@ExcelProperty("COL_82")
|
||||
private String col82;
|
||||
|
||||
@Schema(description = "COL_83")
|
||||
@ExcelProperty("COL_83")
|
||||
private String col83;
|
||||
|
||||
@Schema(description = "COL_84")
|
||||
@ExcelProperty("COL_84")
|
||||
private String col84;
|
||||
|
||||
@Schema(description = "COL_85")
|
||||
@ExcelProperty("COL_85")
|
||||
private String col85;
|
||||
|
||||
@Schema(description = "COL_86")
|
||||
@ExcelProperty("COL_86")
|
||||
private String col86;
|
||||
|
||||
@Schema(description = "COL_87")
|
||||
@ExcelProperty("COL_87")
|
||||
private String col87;
|
||||
|
||||
@Schema(description = "COL_88")
|
||||
@ExcelProperty("COL_88")
|
||||
private String col88;
|
||||
|
||||
@Schema(description = "COL_89")
|
||||
@ExcelProperty("COL_89")
|
||||
private String col89;
|
||||
|
||||
@Schema(description = "COL_90")
|
||||
@ExcelProperty("COL_90")
|
||||
private String col90;
|
||||
|
||||
@Schema(description = "COL_91")
|
||||
@ExcelProperty("COL_91")
|
||||
private String col91;
|
||||
|
||||
@Schema(description = "COL_92")
|
||||
@ExcelProperty("COL_92")
|
||||
private String col92;
|
||||
|
||||
@Schema(description = "COL_93")
|
||||
@ExcelProperty("COL_93")
|
||||
private String col93;
|
||||
|
||||
@Schema(description = "COL_94")
|
||||
@ExcelProperty("COL_94")
|
||||
private String col94;
|
||||
|
||||
@Schema(description = "COL_95")
|
||||
@ExcelProperty("COL_95")
|
||||
private String col95;
|
||||
|
||||
@Schema(description = "COL_96")
|
||||
@ExcelProperty("COL_96")
|
||||
private String col96;
|
||||
|
||||
@Schema(description = "COL_97")
|
||||
@ExcelProperty("COL_97")
|
||||
private String col97;
|
||||
|
||||
@Schema(description = "COL_98")
|
||||
@ExcelProperty("COL_98")
|
||||
private String col98;
|
||||
|
||||
@Schema(description = "COL_99")
|
||||
@ExcelProperty("COL_99")
|
||||
private String col99;
|
||||
|
||||
@Schema(description = "COL_100")
|
||||
@ExcelProperty("COL_100")
|
||||
private String col100;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,315 @@
|
||||
package cn.iocoder.yudao.module.template.controller.admin.virtualizedtable.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
@Schema(description = "管理后台 - 虚拟表格测试新增/修改 Request VO")
|
||||
@Data
|
||||
public class DemoVirtualizedTableSaveReqVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "4009")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "COL_1")
|
||||
private String col1;
|
||||
|
||||
@Schema(description = "COL_2")
|
||||
private String col2;
|
||||
|
||||
@Schema(description = "COL_3")
|
||||
private String col3;
|
||||
|
||||
@Schema(description = "COL_4")
|
||||
private String col4;
|
||||
|
||||
@Schema(description = "COL_5")
|
||||
private String col5;
|
||||
|
||||
@Schema(description = "COL_6")
|
||||
private String col6;
|
||||
|
||||
@Schema(description = "COL_7")
|
||||
private String col7;
|
||||
|
||||
@Schema(description = "COL_8")
|
||||
private String col8;
|
||||
|
||||
@Schema(description = "COL_9")
|
||||
private String col9;
|
||||
|
||||
@Schema(description = "COL_10")
|
||||
private String col10;
|
||||
|
||||
@Schema(description = "COL_11")
|
||||
private String col11;
|
||||
|
||||
@Schema(description = "COL_12")
|
||||
private String col12;
|
||||
|
||||
@Schema(description = "COL_13")
|
||||
private String col13;
|
||||
|
||||
@Schema(description = "COL_14")
|
||||
private String col14;
|
||||
|
||||
@Schema(description = "COL_15")
|
||||
private String col15;
|
||||
|
||||
@Schema(description = "COL_16")
|
||||
private String col16;
|
||||
|
||||
@Schema(description = "COL_17")
|
||||
private String col17;
|
||||
|
||||
@Schema(description = "COL_18")
|
||||
private String col18;
|
||||
|
||||
@Schema(description = "COL_19")
|
||||
private String col19;
|
||||
|
||||
@Schema(description = "COL_20")
|
||||
private String col20;
|
||||
|
||||
@Schema(description = "COL_21")
|
||||
private String col21;
|
||||
|
||||
@Schema(description = "COL_22")
|
||||
private String col22;
|
||||
|
||||
@Schema(description = "COL_23")
|
||||
private String col23;
|
||||
|
||||
@Schema(description = "COL_24")
|
||||
private String col24;
|
||||
|
||||
@Schema(description = "COL_25")
|
||||
private String col25;
|
||||
|
||||
@Schema(description = "COL_26")
|
||||
private String col26;
|
||||
|
||||
@Schema(description = "COL_27")
|
||||
private String col27;
|
||||
|
||||
@Schema(description = "COL_28")
|
||||
private String col28;
|
||||
|
||||
@Schema(description = "COL_29")
|
||||
private String col29;
|
||||
|
||||
@Schema(description = "COL_30")
|
||||
private String col30;
|
||||
|
||||
@Schema(description = "COL_31")
|
||||
private String col31;
|
||||
|
||||
@Schema(description = "COL_32")
|
||||
private String col32;
|
||||
|
||||
@Schema(description = "COL_33")
|
||||
private String col33;
|
||||
|
||||
@Schema(description = "COL_34")
|
||||
private String col34;
|
||||
|
||||
@Schema(description = "COL_35")
|
||||
private String col35;
|
||||
|
||||
@Schema(description = "COL_36")
|
||||
private String col36;
|
||||
|
||||
@Schema(description = "COL_37")
|
||||
private String col37;
|
||||
|
||||
@Schema(description = "COL_38")
|
||||
private String col38;
|
||||
|
||||
@Schema(description = "COL_39")
|
||||
private String col39;
|
||||
|
||||
@Schema(description = "COL_40")
|
||||
private String col40;
|
||||
|
||||
@Schema(description = "COL_41")
|
||||
private String col41;
|
||||
|
||||
@Schema(description = "COL_42")
|
||||
private String col42;
|
||||
|
||||
@Schema(description = "COL_43")
|
||||
private String col43;
|
||||
|
||||
@Schema(description = "COL_44")
|
||||
private String col44;
|
||||
|
||||
@Schema(description = "COL_45")
|
||||
private String col45;
|
||||
|
||||
@Schema(description = "COL_46")
|
||||
private String col46;
|
||||
|
||||
@Schema(description = "COL_47")
|
||||
private String col47;
|
||||
|
||||
@Schema(description = "COL_48")
|
||||
private String col48;
|
||||
|
||||
@Schema(description = "COL_49")
|
||||
private String col49;
|
||||
|
||||
@Schema(description = "COL_50")
|
||||
private String col50;
|
||||
|
||||
@Schema(description = "COL_51")
|
||||
private String col51;
|
||||
|
||||
@Schema(description = "COL_52")
|
||||
private String col52;
|
||||
|
||||
@Schema(description = "COL_53")
|
||||
private String col53;
|
||||
|
||||
@Schema(description = "COL_54")
|
||||
private String col54;
|
||||
|
||||
@Schema(description = "COL_55")
|
||||
private String col55;
|
||||
|
||||
@Schema(description = "COL_56")
|
||||
private String col56;
|
||||
|
||||
@Schema(description = "COL_57")
|
||||
private String col57;
|
||||
|
||||
@Schema(description = "COL_58")
|
||||
private String col58;
|
||||
|
||||
@Schema(description = "COL_59")
|
||||
private String col59;
|
||||
|
||||
@Schema(description = "COL_60")
|
||||
private String col60;
|
||||
|
||||
@Schema(description = "COL_61")
|
||||
private String col61;
|
||||
|
||||
@Schema(description = "COL_62")
|
||||
private String col62;
|
||||
|
||||
@Schema(description = "COL_63")
|
||||
private String col63;
|
||||
|
||||
@Schema(description = "COL_64")
|
||||
private String col64;
|
||||
|
||||
@Schema(description = "COL_65")
|
||||
private String col65;
|
||||
|
||||
@Schema(description = "COL_66")
|
||||
private String col66;
|
||||
|
||||
@Schema(description = "COL_67")
|
||||
private String col67;
|
||||
|
||||
@Schema(description = "COL_68")
|
||||
private String col68;
|
||||
|
||||
@Schema(description = "COL_69")
|
||||
private String col69;
|
||||
|
||||
@Schema(description = "COL_70")
|
||||
private String col70;
|
||||
|
||||
@Schema(description = "COL_71")
|
||||
private String col71;
|
||||
|
||||
@Schema(description = "COL_72")
|
||||
private String col72;
|
||||
|
||||
@Schema(description = "COL_73")
|
||||
private String col73;
|
||||
|
||||
@Schema(description = "COL_74")
|
||||
private String col74;
|
||||
|
||||
@Schema(description = "COL_75")
|
||||
private String col75;
|
||||
|
||||
@Schema(description = "COL_76")
|
||||
private String col76;
|
||||
|
||||
@Schema(description = "COL_77")
|
||||
private String col77;
|
||||
|
||||
@Schema(description = "COL_78")
|
||||
private String col78;
|
||||
|
||||
@Schema(description = "COL_79")
|
||||
private String col79;
|
||||
|
||||
@Schema(description = "COL_80")
|
||||
private String col80;
|
||||
|
||||
@Schema(description = "COL_81")
|
||||
private String col81;
|
||||
|
||||
@Schema(description = "COL_82")
|
||||
private String col82;
|
||||
|
||||
@Schema(description = "COL_83")
|
||||
private String col83;
|
||||
|
||||
@Schema(description = "COL_84")
|
||||
private String col84;
|
||||
|
||||
@Schema(description = "COL_85")
|
||||
private String col85;
|
||||
|
||||
@Schema(description = "COL_86")
|
||||
private String col86;
|
||||
|
||||
@Schema(description = "COL_87")
|
||||
private String col87;
|
||||
|
||||
@Schema(description = "COL_88")
|
||||
private String col88;
|
||||
|
||||
@Schema(description = "COL_89")
|
||||
private String col89;
|
||||
|
||||
@Schema(description = "COL_90")
|
||||
private String col90;
|
||||
|
||||
@Schema(description = "COL_91")
|
||||
private String col91;
|
||||
|
||||
@Schema(description = "COL_92")
|
||||
private String col92;
|
||||
|
||||
@Schema(description = "COL_93")
|
||||
private String col93;
|
||||
|
||||
@Schema(description = "COL_94")
|
||||
private String col94;
|
||||
|
||||
@Schema(description = "COL_95")
|
||||
private String col95;
|
||||
|
||||
@Schema(description = "COL_96")
|
||||
private String col96;
|
||||
|
||||
@Schema(description = "COL_97")
|
||||
private String col97;
|
||||
|
||||
@Schema(description = "COL_98")
|
||||
private String col98;
|
||||
|
||||
@Schema(description = "COL_99")
|
||||
private String col99;
|
||||
|
||||
@Schema(description = "COL_100")
|
||||
private String col100;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package cn.iocoder.yudao.module.template.convert.virtualizedtable;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.template.controller.admin.virtualizedtable.vo.DemoVirtualizedTableRespVO;
|
||||
import cn.iocoder.yudao.module.template.dal.dataobject.virtualizedtable.DemoVirtualizedTableDO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface DemoVirtualizedTableConvert {
|
||||
DemoVirtualizedTableConvert INSTANCE = Mappers.getMapper(DemoVirtualizedTableConvert.class);
|
||||
|
||||
DemoVirtualizedTableRespVO convert(DemoVirtualizedTableDO source);
|
||||
|
||||
List<DemoVirtualizedTableRespVO> convertList(List<DemoVirtualizedTableDO> source);
|
||||
|
||||
PageResult<DemoVirtualizedTableRespVO> convert(PageResult<DemoVirtualizedTableDO> source);
|
||||
}
|
||||
@@ -1,14 +1,15 @@
|
||||
package cn.iocoder.yudao.module.template.dal.dataobject.contract;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.annotation.BusinessCode;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.*;
|
||||
import org.apache.ibatis.type.JdbcType;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
/**
|
||||
* 合同 DO
|
||||
*
|
||||
@@ -27,6 +28,8 @@ import java.time.LocalDateTime;
|
||||
*/
|
||||
public class DemoContractDO extends BusinessBaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 合同ID
|
||||
*/
|
||||
@@ -35,40 +38,52 @@ public class DemoContractDO extends BusinessBaseDO {
|
||||
/**
|
||||
* 合同编号
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT, jdbcType = JdbcType.VARCHAR)
|
||||
@BusinessCode("SEQ")
|
||||
@TableField("CODE")
|
||||
private String code;
|
||||
/**
|
||||
* 合同名称
|
||||
*/
|
||||
@TableField("NAME")
|
||||
private String name;
|
||||
/**
|
||||
* 合同状态
|
||||
*/
|
||||
@TableField("STATUS")
|
||||
private Short status;
|
||||
/**
|
||||
* 流程实例ID
|
||||
*/
|
||||
@TableField("PROCESS_INSTANCE_ID")
|
||||
private Long processInstanceId;
|
||||
/**
|
||||
* 签订日期
|
||||
*/
|
||||
@TableField("SIGN_DATE")
|
||||
private LocalDateTime signDate;
|
||||
/**
|
||||
* 合同开始日期
|
||||
*/
|
||||
@TableField("START_DATE")
|
||||
private LocalDateTime startDate;
|
||||
/**
|
||||
* 合同结束日期
|
||||
*/
|
||||
@TableField("END_DATE")
|
||||
private LocalDateTime endDate;
|
||||
/**
|
||||
* 合同金额
|
||||
*/
|
||||
@TableField("AMOUNT")
|
||||
private BigDecimal amount;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("REMARK")
|
||||
private String remark;
|
||||
/**
|
||||
* 合同文件URL
|
||||
*/
|
||||
@TableField("FILE_URL")
|
||||
private String fileUrl;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,433 @@
|
||||
package cn.iocoder.yudao.module.template.dal.dataobject.virtualizedtable;
|
||||
|
||||
import cn.iocoder.yudao.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 lombok.*;
|
||||
/**
|
||||
* 虚拟表格测试 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("demo_virtualized_table")
|
||||
@KeySequence("demo_virtualized_table_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class DemoVirtualizedTableDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* COL_1
|
||||
*/
|
||||
private String col1;
|
||||
/**
|
||||
* COL_2
|
||||
*/
|
||||
private String col2;
|
||||
/**
|
||||
* COL_3
|
||||
*/
|
||||
private String col3;
|
||||
/**
|
||||
* COL_4
|
||||
*/
|
||||
private String col4;
|
||||
/**
|
||||
* COL_5
|
||||
*/
|
||||
private String col5;
|
||||
/**
|
||||
* COL_6
|
||||
*/
|
||||
private String col6;
|
||||
/**
|
||||
* COL_7
|
||||
*/
|
||||
private String col7;
|
||||
/**
|
||||
* COL_8
|
||||
*/
|
||||
private String col8;
|
||||
/**
|
||||
* COL_9
|
||||
*/
|
||||
private String col9;
|
||||
/**
|
||||
* COL_10
|
||||
*/
|
||||
private String col10;
|
||||
/**
|
||||
* COL_11
|
||||
*/
|
||||
private String col11;
|
||||
/**
|
||||
* COL_12
|
||||
*/
|
||||
private String col12;
|
||||
/**
|
||||
* COL_13
|
||||
*/
|
||||
private String col13;
|
||||
/**
|
||||
* COL_14
|
||||
*/
|
||||
private String col14;
|
||||
/**
|
||||
* COL_15
|
||||
*/
|
||||
private String col15;
|
||||
/**
|
||||
* COL_16
|
||||
*/
|
||||
private String col16;
|
||||
/**
|
||||
* COL_17
|
||||
*/
|
||||
private String col17;
|
||||
/**
|
||||
* COL_18
|
||||
*/
|
||||
private String col18;
|
||||
/**
|
||||
* COL_19
|
||||
*/
|
||||
private String col19;
|
||||
/**
|
||||
* COL_20
|
||||
*/
|
||||
private String col20;
|
||||
/**
|
||||
* COL_21
|
||||
*/
|
||||
private String col21;
|
||||
/**
|
||||
* COL_22
|
||||
*/
|
||||
private String col22;
|
||||
/**
|
||||
* COL_23
|
||||
*/
|
||||
private String col23;
|
||||
/**
|
||||
* COL_24
|
||||
*/
|
||||
private String col24;
|
||||
/**
|
||||
* COL_25
|
||||
*/
|
||||
private String col25;
|
||||
/**
|
||||
* COL_26
|
||||
*/
|
||||
private String col26;
|
||||
/**
|
||||
* COL_27
|
||||
*/
|
||||
private String col27;
|
||||
/**
|
||||
* COL_28
|
||||
*/
|
||||
private String col28;
|
||||
/**
|
||||
* COL_29
|
||||
*/
|
||||
private String col29;
|
||||
/**
|
||||
* COL_30
|
||||
*/
|
||||
private String col30;
|
||||
/**
|
||||
* COL_31
|
||||
*/
|
||||
private String col31;
|
||||
/**
|
||||
* COL_32
|
||||
*/
|
||||
private String col32;
|
||||
/**
|
||||
* COL_33
|
||||
*/
|
||||
private String col33;
|
||||
/**
|
||||
* COL_34
|
||||
*/
|
||||
private String col34;
|
||||
/**
|
||||
* COL_35
|
||||
*/
|
||||
private String col35;
|
||||
/**
|
||||
* COL_36
|
||||
*/
|
||||
private String col36;
|
||||
/**
|
||||
* COL_37
|
||||
*/
|
||||
private String col37;
|
||||
/**
|
||||
* COL_38
|
||||
*/
|
||||
private String col38;
|
||||
/**
|
||||
* COL_39
|
||||
*/
|
||||
private String col39;
|
||||
/**
|
||||
* COL_40
|
||||
*/
|
||||
private String col40;
|
||||
/**
|
||||
* COL_41
|
||||
*/
|
||||
private String col41;
|
||||
/**
|
||||
* COL_42
|
||||
*/
|
||||
private String col42;
|
||||
/**
|
||||
* COL_43
|
||||
*/
|
||||
private String col43;
|
||||
/**
|
||||
* COL_44
|
||||
*/
|
||||
private String col44;
|
||||
/**
|
||||
* COL_45
|
||||
*/
|
||||
private String col45;
|
||||
/**
|
||||
* COL_46
|
||||
*/
|
||||
private String col46;
|
||||
/**
|
||||
* COL_47
|
||||
*/
|
||||
private String col47;
|
||||
/**
|
||||
* COL_48
|
||||
*/
|
||||
private String col48;
|
||||
/**
|
||||
* COL_49
|
||||
*/
|
||||
private String col49;
|
||||
/**
|
||||
* COL_50
|
||||
*/
|
||||
private String col50;
|
||||
/**
|
||||
* COL_51
|
||||
*/
|
||||
private String col51;
|
||||
/**
|
||||
* COL_52
|
||||
*/
|
||||
private String col52;
|
||||
/**
|
||||
* COL_53
|
||||
*/
|
||||
private String col53;
|
||||
/**
|
||||
* COL_54
|
||||
*/
|
||||
private String col54;
|
||||
/**
|
||||
* COL_55
|
||||
*/
|
||||
private String col55;
|
||||
/**
|
||||
* COL_56
|
||||
*/
|
||||
private String col56;
|
||||
/**
|
||||
* COL_57
|
||||
*/
|
||||
private String col57;
|
||||
/**
|
||||
* COL_58
|
||||
*/
|
||||
private String col58;
|
||||
/**
|
||||
* COL_59
|
||||
*/
|
||||
private String col59;
|
||||
/**
|
||||
* COL_60
|
||||
*/
|
||||
private String col60;
|
||||
/**
|
||||
* COL_61
|
||||
*/
|
||||
private String col61;
|
||||
/**
|
||||
* COL_62
|
||||
*/
|
||||
private String col62;
|
||||
/**
|
||||
* COL_63
|
||||
*/
|
||||
private String col63;
|
||||
/**
|
||||
* COL_64
|
||||
*/
|
||||
private String col64;
|
||||
/**
|
||||
* COL_65
|
||||
*/
|
||||
private String col65;
|
||||
/**
|
||||
* COL_66
|
||||
*/
|
||||
private String col66;
|
||||
/**
|
||||
* COL_67
|
||||
*/
|
||||
private String col67;
|
||||
/**
|
||||
* COL_68
|
||||
*/
|
||||
private String col68;
|
||||
/**
|
||||
* COL_69
|
||||
*/
|
||||
private String col69;
|
||||
/**
|
||||
* COL_70
|
||||
*/
|
||||
private String col70;
|
||||
/**
|
||||
* COL_71
|
||||
*/
|
||||
private String col71;
|
||||
/**
|
||||
* COL_72
|
||||
*/
|
||||
private String col72;
|
||||
/**
|
||||
* COL_73
|
||||
*/
|
||||
private String col73;
|
||||
/**
|
||||
* COL_74
|
||||
*/
|
||||
private String col74;
|
||||
/**
|
||||
* COL_75
|
||||
*/
|
||||
private String col75;
|
||||
/**
|
||||
* COL_76
|
||||
*/
|
||||
private String col76;
|
||||
/**
|
||||
* COL_77
|
||||
*/
|
||||
private String col77;
|
||||
/**
|
||||
* COL_78
|
||||
*/
|
||||
private String col78;
|
||||
/**
|
||||
* COL_79
|
||||
*/
|
||||
private String col79;
|
||||
/**
|
||||
* COL_80
|
||||
*/
|
||||
private String col80;
|
||||
/**
|
||||
* COL_81
|
||||
*/
|
||||
private String col81;
|
||||
/**
|
||||
* COL_82
|
||||
*/
|
||||
private String col82;
|
||||
/**
|
||||
* COL_83
|
||||
*/
|
||||
private String col83;
|
||||
/**
|
||||
* COL_84
|
||||
*/
|
||||
private String col84;
|
||||
/**
|
||||
* COL_85
|
||||
*/
|
||||
private String col85;
|
||||
/**
|
||||
* COL_86
|
||||
*/
|
||||
private String col86;
|
||||
/**
|
||||
* COL_87
|
||||
*/
|
||||
private String col87;
|
||||
/**
|
||||
* COL_88
|
||||
*/
|
||||
private String col88;
|
||||
/**
|
||||
* COL_89
|
||||
*/
|
||||
private String col89;
|
||||
/**
|
||||
* COL_90
|
||||
*/
|
||||
private String col90;
|
||||
/**
|
||||
* COL_91
|
||||
*/
|
||||
private String col91;
|
||||
/**
|
||||
* COL_92
|
||||
*/
|
||||
private String col92;
|
||||
/**
|
||||
* COL_93
|
||||
*/
|
||||
private String col93;
|
||||
/**
|
||||
* COL_94
|
||||
*/
|
||||
private String col94;
|
||||
/**
|
||||
* COL_95
|
||||
*/
|
||||
private String col95;
|
||||
/**
|
||||
* COL_96
|
||||
*/
|
||||
private String col96;
|
||||
/**
|
||||
* COL_97
|
||||
*/
|
||||
private String col97;
|
||||
/**
|
||||
* COL_98
|
||||
*/
|
||||
private String col98;
|
||||
/**
|
||||
* COL_99
|
||||
*/
|
||||
private String col99;
|
||||
/**
|
||||
* COL_100
|
||||
*/
|
||||
private String col100;
|
||||
|
||||
}
|
||||
@@ -29,6 +29,7 @@ public interface DemoContractMapper extends BaseMapperX<DemoContractDO> {
|
||||
.eqIfPresent(DemoContractDO::getAmount, reqVO.getAmount())
|
||||
.eqIfPresent(DemoContractDO::getRemark, reqVO.getRemark())
|
||||
.betweenIfPresent(DemoContractDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(DemoContractDO::getPostId, reqVO.getPostId())
|
||||
.orderByDesc(DemoContractDO::getId));
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
package cn.iocoder.yudao.module.template.dal.mysql.virtualizedtable;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.template.dal.dataobject.virtualizedtable.DemoVirtualizedTableDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.template.controller.admin.virtualizedtable.vo.*;
|
||||
|
||||
/**
|
||||
* 虚拟表格测试 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface DemoVirtualizedTableMapper extends BaseMapperX<DemoVirtualizedTableDO> {
|
||||
|
||||
default PageResult<DemoVirtualizedTableDO> selectPage(DemoVirtualizedTablePageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<DemoVirtualizedTableDO>()
|
||||
.eqIfPresent(DemoVirtualizedTableDO::getCol1, reqVO.getCol1())
|
||||
.eqIfPresent(DemoVirtualizedTableDO::getCol2, reqVO.getCol2())
|
||||
.eqIfPresent(DemoVirtualizedTableDO::getCol3, reqVO.getCol3())
|
||||
.eqIfPresent(DemoVirtualizedTableDO::getCol4, reqVO.getCol4())
|
||||
.eqIfPresent(DemoVirtualizedTableDO::getCol5, reqVO.getCol5())
|
||||
.eqIfPresent(DemoVirtualizedTableDO::getCol6, reqVO.getCol6())
|
||||
.betweenIfPresent(DemoVirtualizedTableDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(DemoVirtualizedTableDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,22 +1,24 @@
|
||||
package cn.iocoder.yudao.module.template.service.contract;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.module.template.controller.admin.contract.vo.DemoContractPageReqVO;
|
||||
import cn.iocoder.yudao.module.template.controller.admin.contract.vo.DemoContractRespVO;
|
||||
import cn.iocoder.yudao.module.template.controller.admin.contract.vo.DemoContractSaveReqVO;
|
||||
import cn.iocoder.yudao.module.template.dal.dataobject.contract.DemoContractDO;
|
||||
import cn.iocoder.yudao.module.template.dal.mysql.contract.DemoContractMapper;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import cn.iocoder.yudao.module.template.controller.admin.contract.vo.*;
|
||||
import cn.iocoder.yudao.module.template.dal.dataobject.contract.DemoContractDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
import cn.iocoder.yudao.module.template.dal.mysql.contract.DemoContractMapper;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.template.enums.ErrorCodeConstants.DEMO_CONTRACT_NOT_EXISTS;
|
||||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList;
|
||||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.diffList;
|
||||
import static cn.iocoder.yudao.module.template.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 合同 Service 实现类
|
||||
@@ -34,9 +36,6 @@ public class DemoContractServiceImpl implements DemoContractService {
|
||||
public DemoContractRespVO createDemoContract(DemoContractSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
DemoContractDO demoContract = BeanUtils.toBean(createReqVO, DemoContractDO.class);
|
||||
// 生成 a,d,f,h,y,yy,t,gg,ggdd
|
||||
List<String> inputStrs = Arrays.asList("a", "b", "c", "d", "e", "f");
|
||||
demoContract.setInputStrs(inputStrs);
|
||||
demoContractMapper.insert(demoContract);
|
||||
// 返回
|
||||
return BeanUtils.toBean(demoContract, DemoContractRespVO.class);
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
package cn.iocoder.yudao.module.template.service.virtualizedtable;
|
||||
|
||||
import java.util.*;
|
||||
import jakarta.validation.*;
|
||||
import cn.iocoder.yudao.module.template.controller.admin.virtualizedtable.vo.*;
|
||||
import cn.iocoder.yudao.module.template.dal.dataobject.virtualizedtable.DemoVirtualizedTableDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* 虚拟表格测试 Service 接口
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
public interface DemoVirtualizedTableService {
|
||||
|
||||
/**
|
||||
* 创建虚拟表格测试
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
DemoVirtualizedTableRespVO createDemoVirtualizedTable(@Valid DemoVirtualizedTableSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新虚拟表格测试
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateDemoVirtualizedTable(@Valid DemoVirtualizedTableSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除虚拟表格测试
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteDemoVirtualizedTable(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除虚拟表格测试
|
||||
*
|
||||
* @param ids 编号
|
||||
*/
|
||||
void deleteDemoVirtualizedTableListByIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得虚拟表格测试
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 虚拟表格测试
|
||||
*/
|
||||
DemoVirtualizedTableDO getDemoVirtualizedTable(Long id);
|
||||
|
||||
/**
|
||||
* 获得虚拟表格测试分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 虚拟表格测试分页
|
||||
*/
|
||||
PageResult<DemoVirtualizedTableDO> getDemoVirtualizedTablePage(DemoVirtualizedTablePageReqVO pageReqVO);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
package cn.iocoder.yudao.module.template.service.virtualizedtable;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.module.template.controller.admin.virtualizedtable.vo.DemoVirtualizedTablePageReqVO;
|
||||
import cn.iocoder.yudao.module.template.controller.admin.virtualizedtable.vo.DemoVirtualizedTableRespVO;
|
||||
import cn.iocoder.yudao.module.template.controller.admin.virtualizedtable.vo.DemoVirtualizedTableSaveReqVO;
|
||||
import cn.iocoder.yudao.module.template.dal.dataobject.virtualizedtable.DemoVirtualizedTableDO;
|
||||
import cn.iocoder.yudao.module.template.dal.mysql.virtualizedtable.DemoVirtualizedTableMapper;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.template.enums.ErrorCodeConstants.DEMO_VIRTUALIZED_TABLE_NOT_EXISTS;
|
||||
|
||||
/**
|
||||
* 虚拟表格测试 Service 实现类
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class DemoVirtualizedTableServiceImpl implements DemoVirtualizedTableService {
|
||||
|
||||
@Resource
|
||||
private DemoVirtualizedTableMapper demoVirtualizedTableMapper;
|
||||
|
||||
@Override
|
||||
public DemoVirtualizedTableRespVO createDemoVirtualizedTable(DemoVirtualizedTableSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
DemoVirtualizedTableDO demoVirtualizedTable = BeanUtils.toBean(createReqVO, DemoVirtualizedTableDO.class);
|
||||
demoVirtualizedTableMapper.insert(demoVirtualizedTable);
|
||||
// 返回
|
||||
return BeanUtils.toBean(demoVirtualizedTable, DemoVirtualizedTableRespVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateDemoVirtualizedTable(DemoVirtualizedTableSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateDemoVirtualizedTableExists(updateReqVO.getId());
|
||||
// 更新
|
||||
DemoVirtualizedTableDO updateObj = BeanUtils.toBean(updateReqVO, DemoVirtualizedTableDO.class);
|
||||
demoVirtualizedTableMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteDemoVirtualizedTable(Long id) {
|
||||
// 校验存在
|
||||
validateDemoVirtualizedTableExists(id);
|
||||
// 删除
|
||||
demoVirtualizedTableMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteDemoVirtualizedTableListByIds(List<Long> ids) {
|
||||
// 校验存在
|
||||
validateDemoVirtualizedTableExists(ids);
|
||||
// 删除
|
||||
demoVirtualizedTableMapper.deleteByIds(ids);
|
||||
}
|
||||
|
||||
private void validateDemoVirtualizedTableExists(List<Long> ids) {
|
||||
List<DemoVirtualizedTableDO> list = demoVirtualizedTableMapper.selectByIds(ids);
|
||||
if (CollUtil.isEmpty(list) || list.size() != ids.size()) {
|
||||
throw exception(
|
||||
DEMO_VIRTUALIZED_TABLE_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
private void validateDemoVirtualizedTableExists(Long id) {
|
||||
if (demoVirtualizedTableMapper.selectById(id) == null) {
|
||||
throw exception(DEMO_VIRTUALIZED_TABLE_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public DemoVirtualizedTableDO getDemoVirtualizedTable(Long id) {
|
||||
return demoVirtualizedTableMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<DemoVirtualizedTableDO> getDemoVirtualizedTablePage(DemoVirtualizedTablePageReqVO pageReqVO) {
|
||||
return demoVirtualizedTableMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.yudao.module.template.dal.mysql.virtualizedtable.DemoVirtualizedTableMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user