代码拉取完成,页面将自动刷新
同步操作将从 米朵/aps 制造 排产 排程 系统 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
{
"author": "peanut",
"version": "1.2.9",
"userSecure": "",
"currTypeMapperGroupName": "Default",
"currTemplateGroupName": "SDK",
"currColumnConfigGroupName": "Default",
"externalEasyCodeFolders": "",
"currGlobalConfigGroupName": "Default",
"typeMapper": {
"Default": {
"name": "Default",
"elementList": [
{
"matchType": "REGEX",
"columnType": "varchar(\\(\\d+\\))?",
"javaType": "java.lang.String"
},
{
"matchType": "REGEX",
"columnType": "char(\\(\\d+\\))?",
"javaType": "java.lang.String"
},
{
"matchType": "ORDINARY",
"columnType": "tinyint(1)",
"javaType": "java.lang.Boolean"
},
{
"matchType": "REGEX",
"columnType": "(tiny|medium|long)*text",
"javaType": "java.lang.String"
},
{
"matchType": "REGEX",
"columnType": "decimal(\\(\\d+,\\d+\\))?",
"javaType": "java.math.BigDecimal"
},
{
"matchType": "ORDINARY",
"columnType": "integer",
"javaType": "java.lang.Integer"
},
{
"matchType": "REGEX",
"columnType": "(tiny|small|medium)*int(\\(\\d+\\))?",
"javaType": "java.lang.Integer"
},
{
"matchType": "ORDINARY",
"columnType": "int4",
"javaType": "java.lang.Integer"
},
{
"matchType": "ORDINARY",
"columnType": "int8",
"javaType": "java.lang.Long"
},
{
"matchType": "REGEX",
"columnType": "bigint(\\(\\d+\\))?",
"javaType": "java.lang.Long"
},
{
"matchType": "ORDINARY",
"columnType": "date",
"javaType": "java.time.LocalDate"
},
{
"matchType": "ORDINARY",
"columnType": "datetime",
"javaType": "java.time.LocalDateTime"
},
{
"matchType": "ORDINARY",
"columnType": "timestamp",
"javaType": "java.time.LocalDateTime"
},
{
"matchType": "ORDINARY",
"columnType": "time",
"javaType": "java.time.LocalTime"
},
{
"matchType": "ORDINARY",
"columnType": "boolean",
"javaType": "java.lang.Boolean"
},
{
"matchType": "ORDINARY",
"columnType": "version",
"javaType": "java.lang.String"
},
{
"matchType": "ORDINARY",
"columnType": "decimal(10)",
"javaType": "java.math.BigDecimal"
}
]
}
},
"template": {
"SDK": {
"name": "SDK",
"elementList": [
{
"name": "api.java.vm",
"code": "##导入宏定义\n$!{define.vm}\n\n##保存文件(宏定义)\n#save(\"/api\", \"Api.java\")\n\n##包路径(宏定义)\n#setPackageSuffix(\"api\")\n\n##自动导入包(全局变量) \nimport org.springframework.validation.annotation.Validated;\nimport com.olivia.sdk.utils.DynamicsPage;\nimport jakarta.validation.Valid; \nimport org.springframework.web.bind.annotation.*;\nimport $!{tableInfo.savePackageName}.api.entity.$tool.firstLowerCase($!{tableInfo.name}).*; \nimport java.time.LocalDate;\nimport java.time.LocalDateTime; \nimport org.springframework.web.multipart.MultipartFile;\nimport com.olivia.sdk.ann.InsertCheck;\nimport com.olivia.sdk.ann.UpdateCheck;\nimport jakarta.validation.constraints.NotBlank;\nimport jakarta.validation.constraints.NotNull;\n\n \n##表注释(宏定义)\n#tableComment(\"对外API\")\n// @FeignClient(value = \"\",contextId = \"$tool.firstLowerCase( $!{tableInfo.name})-api\",url = \"${ portal..center.endpoint:}\")\npublic interface $!{tableInfo.name}Api {\n\n /**\n * 保存 $!{tableInfo.comment}\n *\n */\n @PostMapping(\"/$tool.firstLowerCase($!{tableInfo.name})/insert\")\n $!{tableInfo.name}InsertRes insert(@RequestBody @Validated(InsertCheck.class) $!{tableInfo.name}InsertReq req);\n /**\n * 根据ID 删除 $!{tableInfo.comment}\n *\n */\n @PostMapping(\"/$tool.firstLowerCase($!{tableInfo.name})/deleteByIdList\")\n $!{tableInfo.name}DeleteByIdListRes deleteByIdList(@RequestBody @Valid $!{tableInfo.name}DeleteByIdListReq req);\n\n /**\n * 查询 $!{tableInfo.comment}\n *\n */\n @PostMapping(\"/$tool.firstLowerCase($!{tableInfo.name})/queryList\")\n $!{tableInfo.name}QueryListRes queryList(@RequestBody @Valid $!{tableInfo.name}QueryListReq req);\n\n /**\n * 根据ID 更新 $!{tableInfo.comment}\n *\n */\n @PostMapping(\"/$tool.firstLowerCase($!{tableInfo.name})/updateById\")\n $!{tableInfo.name}UpdateByIdRes updateById(@RequestBody @Validated(UpdateCheck.class) $!{tableInfo.name}UpdateByIdReq req);\n\n/**\n* 分页查询 $!{tableInfo.comment}\n*/\n @PostMapping(\"/$tool.firstLowerCase($!{tableInfo.name})/queryPageList\")\n\n DynamicsPage<$!{tableInfo.name}ExportQueryPageListInfoRes > queryPageList(@RequestBody @Valid $!{tableInfo.name}ExportQueryPageListReq req);\n \n /**\n * 导出 $!{tableInfo.comment}\n */\n @PostMapping(\"/$tool.firstLowerCase($!{tableInfo.name})/exportQueryPageList\")\n void queryPageListExport(@RequestBody @Valid $!{tableInfo.name}ExportQueryPageListReq req);\n \n /**\n * 导入\n */\n @PostMapping(\"/$tool.firstLowerCase($!{tableInfo.name})/importData\")\n $!{tableInfo.name}ImportRes importData(@RequestParam(\"file\") MultipartFile file);\n \n \n /**\n * 根据ID 批量查询\n */\n @PostMapping(\"/$tool.firstLowerCase($!{tableInfo.name})/queryByIdList\")\n\n $!{tableInfo.name}QueryByIdListRes queryByIdListRes(@RequestBody @Valid $!{tableInfo.name}QueryByIdListReq req);\n\n \n}"
},
{
"name": "api.impl.java.vm",
"code": "##导入宏定义\n$!{define.vm}\n\n##保存文件(宏定义)\n#save(\"/api/impl\", \"ApiImpl.java\")\n\n##包路径(宏定义)\n#setPackageSuffix(\"api.impl\")\n\n##自动导入包(全局变量)\n$!{autoImport.vm} \n\nimport $!{tableInfo.savePackageName}.model.$!tableInfo.name;\nimport com.olivia.sdk.utils.$;\nimport com.olivia.sdk.utils.DynamicsPage;\nimport com.olivia.sdk.utils.PoiExcelUtil;\nimport java.util.stream.Collectors;\nimport java.time.LocalDate;\nimport java.time.LocalDateTime; \nimport java.util.*;\nimport org.apache.commons.lang3.StringUtils;\nimport java.util.List; \nimport org.springframework.beans.factory.annotation.Autowired; \nimport org.springframework.web.bind.annotation.RequestBody;\nimport $!{tableInfo.savePackageName}.api.entity.$tool.firstLowerCase($!{tableInfo.name}).*;\nimport $!{tableInfo.savePackageName}.service.$!{tableInfo.name}Service; \nimport $!{tableInfo.savePackageName}.model.*;\nimport com.baomidou.mybatisplus.core.conditions.query.*;\nimport com.github.yulichang.wrapper.MPJLambdaWrapper;\nimport org.springframework.web.bind.annotation.*;\nimport $!{tableInfo.savePackageName}.api.$!{tableInfo.name}Api;\n\nimport $!{tableInfo.savePackageName}.api.impl.listener.*; \nimport org.springframework.web.multipart.MultipartFile;\n\n##表注释(宏定义)\n#tableComment(\"表服务实现类\")\n@RestController\npublic class $!{tableInfo.name}ApiImpl implements $!{tableInfo.name}Api {\n\n private @Autowired $!{tableInfo.name}Service $tool.firstLowerCase($!{tableInfo.name})Service;\n /****\n * insert\n *\n */ \n public @Override $!{tableInfo.name}InsertRes insert($!{tableInfo.name}InsertReq req){ \n this.$tool.firstLowerCase($!{tableInfo.name})Service .save($.copy(req,$!{tableInfo.name}.class));\n return new $!{tableInfo.name}InsertRes().setCount(1);\n }\n /****\n * deleteByIds\n *\n */ \n public @Override $!{tableInfo.name}DeleteByIdListRes deleteByIdList( $!{tableInfo.name}DeleteByIdListReq req){\n $tool.firstLowerCase($!{tableInfo.name})Service. removeByIds ( req.getIdList());\n return new $!{tableInfo.name}DeleteByIdListRes ();\n }\n\n /****\n * queryList\n *\n */ \n public @Override $!{tableInfo.name}QueryListRes queryList( $!{tableInfo.name}QueryListReq req){\n return $tool.firstLowerCase($!{tableInfo.name})Service .queryList (req); \n }\n\n /****\n * updateById\n *\n */ \n public @Override $!{tableInfo.name}UpdateByIdRes updateById( $!{tableInfo.name}UpdateByIdReq req){\n $tool.firstLowerCase($!{tableInfo.name})Service. updateById($.copy(req,$!{tableInfo.name}.class));\n return new $!{tableInfo.name}UpdateByIdRes ();\n \n }\n\n public @Override DynamicsPage<$!{tableInfo.name}ExportQueryPageListInfoRes > queryPageList($!{tableInfo.name}ExportQueryPageListReq req){\n return $tool.firstLowerCase($!{tableInfo.name})Service .queryPageList (req); \n }\n\n public @Override void queryPageListExport( $!{tableInfo.name}ExportQueryPageListReq req){\n DynamicsPage<$!{tableInfo.name}ExportQueryPageListInfoRes > page= queryPageList(req);\n List<$!{tableInfo.name}ExportQueryPageListInfoRes> list= page.getDataList();\n // 类型转换, 更换枚举 等操作\n List<$!{tableInfo.name}ExportQueryPageListInfoRes> listInfoRes = $.copyList(list, $!{tableInfo.name}ExportQueryPageListInfoRes.class);\n PoiExcelUtil.export($!{tableInfo.name}ExportQueryPageListInfoRes.class,listInfoRes,\"$!{tableInfo.comment}\");\n }\n\npublic @Override $!{tableInfo.name}ImportRes importData(@RequestParam(\"file\") MultipartFile file){ \n List< $!{tableInfo.name}ImportReq> reqList = PoiExcelUtil.readData(file, new $!{tableInfo.name}ImportListener(), $!{tableInfo.name}ImportReq.class);\n // 类型转换, 更换枚举 等操作\n List<$!{tableInfo.name}> readList = $.copyList(reqList, $!{tableInfo.name}.class);\n boolean bool= $tool.firstLowerCase($!{tableInfo.name})Service . saveBatch(readList);\n int c=bool?readList.size():0;\n return new $!{tableInfo.name}ImportRes().setCount(c);\n}\n\npublic @Override $!{tableInfo.name}QueryByIdListRes queryByIdListRes( $!{tableInfo.name}QueryByIdListReq req){\n MPJLambdaWrapper< $!{tableInfo.name}> q= new MPJLambdaWrapper< $!{tableInfo.name}>($!{tableInfo.name} .class)\n.selectAll( $!{tableInfo.name} .class).in($!{tableInfo.name}::getId, req.getIdList());\nList<$!{tableInfo.name} > list=this. $tool.firstLowerCase($!{tableInfo.name})Service. list(q);\nList<$!{tableInfo.name}Dto > dataList = $.copyList(list, $!{tableInfo.name}Dto.class);\n this. $tool.firstLowerCase($!{tableInfo.name})Service.setName(dataList);\nreturn new $!{tableInfo.name}QueryByIdListRes ().setDataList(dataList);\n }\n}"
},
{
"name": "InsertReq.java.vm",
"code": "##导入宏定义\n$!{define.vm}\n\n##保存文件(宏定义)\n#save(\"/api/entity/$tool.firstLowerCase($!{tableInfo.name})\", \"InsertReq.java\")\n\n##包路径(宏定义)\n#setPackageSuffix(\"api.entity.$tool.firstLowerCase($!{tableInfo.name})\")\n\n##自动导入包(全局变量) \nimport lombok.Getter; \nimport lombok.Setter; \nimport lombok.experimental.Accessors; \n \nimport java.time.LocalDate;\nimport java.time.LocalDateTime;\n##表注释(宏定义)\n#tableComment(\"保存入参\")\n@Accessors(chain=true)\n@Getter\n@Setter\n@SuppressWarnings(\"serial\")\npublic class $!{tableInfo.name}InsertReq extends $!{tableInfo.name}Dto {\n \n public void checkParam(){\n }\n}\n"
},
{
"name": "InsertRes.java.vm",
"code": "##导入宏定义\n$!{define.vm}\n\n##保存文件(宏定义)\n#save(\"/api/entity/$tool.firstLowerCase($!{tableInfo.name})\", \"InsertRes.java\")\n\n##包路径(宏定义)\n#setPackageSuffix(\"api.entity.$tool.firstLowerCase($!{tableInfo.name})\")\n\n##自动导入包(全局变量) \nimport lombok.Getter; \nimport lombok.Setter; \nimport lombok.experimental.Accessors;\n\nimport java.time.LocalDate;\nimport java.time.LocalDateTime;\n##表注释(宏定义)\n#tableComment(\"保存返回\")\n@Accessors(chain=true)\n@Getter\n@Setter\n@SuppressWarnings(\"serial\")\npublic class $!{tableInfo.name}InsertRes {\n /****\n * 写入行数\n */\n private int count;\n \n private Long id;\n}\n"
},
{
"name": "DeleteByIdListRes.java.vm",
"code": "##导入宏定义\n$!{define.vm}\n\n##保存文件(宏定义)\n#save(\"/api/entity/$tool.firstLowerCase($!{tableInfo.name})\", \"DeleteByIdListRes.java\")\n\n##包路径(宏定义)\n#setPackageSuffix(\"api.entity.$tool.firstLowerCase($!{tableInfo.name})\")\n\n##自动导入包(全局变量) \nimport lombok.Getter; \nimport lombok.Setter; \nimport lombok.experimental.Accessors;\nimport java.util.List;\n\nimport java.time.LocalDate;\nimport java.time.LocalDateTime;\n##表注释(宏定义)\n#tableComment(\"根据ID删除多个反参\")\n@Accessors(chain=true)\n@Getter\n@Setter\n@SuppressWarnings(\"serial\")\npublic class $!{tableInfo.name}DeleteByIdListRes {\n /***\n * 受影响行数\n */\n private int count;\n \n}\n"
},
{
"name": "DeleteByIdListReq.java.vm",
"code": "##导入宏定义\n$!{define.vm}\n\n##保存文件(宏定义)\n#save(\"/api/entity/$tool.firstLowerCase($!{tableInfo.name})\", \"DeleteByIdListReq.java\")\n\n##包路径(宏定义)\n#setPackageSuffix(\"api.entity.$tool.firstLowerCase($!{tableInfo.name})\")\n\n##自动导入包(全局变量) \nimport lombok.Getter; \nimport lombok.Setter;\nimport lombok.experimental.Accessors;\nimport java.util.List; \nimport jakarta.validation.constraints.NotEmpty;\nimport java.time.LocalDate;\nimport java.time.LocalDateTime;\n\n##表注释(宏定义)\n#tableComment(\"根据ID删除多个入参\")\n@Accessors(chain=true)\n@Getter\n@Setter\n@SuppressWarnings(\"serial\")\npublic class $!{tableInfo.name}DeleteByIdListReq {\n /***\n * 要删除的ID\n */\n @NotEmpty(message =\"请选择删除对象\" )\nprivate List<Long> idList;\n \n \n public void checkParam(){\n }\n\n}\n"
},
{
"name": "QueryListReq.java.vm",
"code": "##导入宏定义\n$!{define.vm}\n\n##保存文件(宏定义)\n#save(\"/api/entity/$tool.firstLowerCase($!{tableInfo.name})\", \"QueryListReq.java\")\n\n##包路径(宏定义)\n#setPackageSuffix(\"api.entity.$tool.firstLowerCase($!{tableInfo.name})\")\n\n##自动导入包(全局变量) \nimport java.time.LocalDateTime;\nimport lombok.Getter; \nimport lombok.Setter; \nimport lombok.experimental.Accessors;\n \n\nimport java.time.LocalDate;\nimport java.time.LocalDateTime;\n##表注释(宏定义)\n#tableComment(\"查询对象入参\")\n@Accessors(chain=true)\n@Getter\n@Setter\n@SuppressWarnings(\"serial\")\npublic class $!{tableInfo.name}QueryListReq {\n \n private $!{tableInfo.name}Dto data;\n}\n"
},
{
"name": "QueryListRes.java.vm",
"code": "##导入宏定义\n$!{define.vm}\n\n##保存文件(宏定义)\n#save(\"/api/entity/$tool.firstLowerCase($!{tableInfo.name})\", \"QueryListRes.java\")\n\n##包路径(宏定义)\n#setPackageSuffix(\"api.entity.$tool.firstLowerCase($!{tableInfo.name})\")\n\n##自动导入包(全局变量) \n$!{autoImport.vm} \nimport lombok.Getter; \nimport lombok.Setter; \nimport lombok.experimental.Accessors;\nimport java.util.List;\n\nimport java.time.LocalDate;\nimport java.time.LocalDateTime;\n##表注释(宏定义)\n#tableComment(\"查询对象返回\")\n@Accessors(chain=true)\n@Getter\n@Setter\n@SuppressWarnings(\"serial\")\npublic class $!{tableInfo.name}QueryListRes {\n /***\n * 返回对象列表\n */\nprivate List< $!{tableInfo.name}Dto> dataList;\n \n \n}\n"
},
{
"name": "UpdateByIdReq.java.vm",
"code": "##导入宏定义\n$!{define.vm}\n\n##保存文件(宏定义)\n#save(\"/api/entity/$tool.firstLowerCase($!{tableInfo.name})\", \"UpdateByIdReq.java\")\n\n##包路径(宏定义)\n#setPackageSuffix(\"api.entity.$tool.firstLowerCase($!{tableInfo.name})\")\n\n##自动导入包(全局变量)\n$!{autoImport.vm} \n\nimport java.time.LocalDate;\nimport java.time.LocalDateTime;\nimport java.io.Serializable;\nimport lombok.Getter; \nimport lombok.Setter;\nimport lombok.ToString;\nimport lombok.experimental.Accessors; \n \n##表注释(宏定义)\n#tableComment(\"表实体类\")\n@Accessors(chain=true)\n@Getter\n@Setter\n@SuppressWarnings(\"serial\")\npublic class $!{tableInfo.name}UpdateByIdReq extends $!{tableInfo.name}Dto {\n \n \n public void checkParam(){\n }\n\n}\n"
},
{
"name": "UpdateByIdRes.java.vm",
"code": "##导入宏定义\n$!{define.vm}\n\n##保存文件(宏定义)\n#save(\"/api/entity/$tool.firstLowerCase($!{tableInfo.name})\", \"UpdateByIdRes.java\")\n\n##包路径(宏定义)\n#setPackageSuffix(\"api.entity.$tool.firstLowerCase($!{tableInfo.name})\")\n\n##自动导入包(全局变量) \nimport lombok.Getter; \nimport lombok.Setter; \nimport lombok.experimental.Accessors;\n\nimport java.time.LocalDate;\nimport java.time.LocalDateTime;\n##表注释(宏定义)\n#tableComment(\"修改对象返回\")\n@Accessors(chain=true)\n@Getter\n@Setter\n@SuppressWarnings(\"serial\")\npublic class $!{tableInfo.name}UpdateByIdRes {\n\n \n}\n"
},
{
"name": "ExportQueryPageListRes.java.vm",
"code": "##导入宏定义\n$!{define.vm}\n\n##保存文件(宏定义)\n#save(\"/api/entity/$tool.firstLowerCase($!{tableInfo.name})\", \"ExportQueryPageListInfoRes.java\")\n\n##包路径(宏定义)\n#setPackageSuffix(\"api.entity.$tool.firstLowerCase($!{tableInfo.name})\")\n\n##自动导入包(全局变量) \n$!{autoImport.vm} \nimport lombok.Getter; \nimport lombok.Setter; \nimport lombok.experimental.Accessors;\nimport java.util.List;\n\nimport com.alibaba.excel.annotation.ExcelProperty;\nimport java.time.LocalDate;\nimport java.time.LocalDateTime;\n##表注释(宏定义)\n#tableComment(\"查询对象返回\")\n@Accessors(chain=true)\n@Getter\n@Setter\n@SuppressWarnings(\"serial\")\npublic class $!{tableInfo.name}ExportQueryPageListInfoRes extends $!{tableInfo.name}Dto {\n \n}\n\n"
},
{
"name": "ExportQueryPageListReq.java.vm",
"code": "##导入宏定义\n$!{define.vm}\n\n##保存文件(宏定义)\n#save(\"/api/entity/$tool.firstLowerCase($!{tableInfo.name})\", \"ExportQueryPageListReq.java\")\n\n##包路径(宏定义)\n#setPackageSuffix(\"api.entity.$tool.firstLowerCase($!{tableInfo.name})\")\n\n##自动导入包(全局变量) \nimport java.time.LocalDateTime;\nimport lombok.Getter; \nimport lombok.Setter; \nimport lombok.experimental.Accessors;\n \n\nimport java.time.LocalDate;\nimport java.time.LocalDateTime;\n##表注释(宏定义)\n#tableComment(\"查询对象入参\")\n@Accessors(chain=true)\n@Getter\n@Setter\n@SuppressWarnings(\"serial\")\npublic class $!{tableInfo.name}ExportQueryPageListReq {\n private int pageNum;\n private int pageSize;\n private Boolean queryPage=true;\n private $!{tableInfo.name}Dto data;\n \n \n public void checkParam(){\n }\n\n}\n"
},
{
"name": "ImportReq.java.vm",
"code": "##导入宏定义\n$!{define.vm}\n\n##保存文件(宏定义)\n#save(\"/api/entity/$tool.firstLowerCase($!{tableInfo.name})\", \"ImportReq.java\")\n\n##包路径(宏定义)\n#setPackageSuffix(\"api.entity.$tool.firstLowerCase($!{tableInfo.name})\")\n\n##自动导入包(全局变量) \n$!{autoImport.vm} \nimport lombok.Getter; \nimport lombok.Setter; \nimport lombok.experimental.Accessors;\nimport java.util.List;\n\nimport com.alibaba.excel.annotation.ExcelProperty;\nimport java.time.LocalDate;\nimport java.time.LocalDateTime;\n##表注释(宏定义)\n#tableComment(\"查询对象返回\")\n//@Accessors(chain=true)\n@Getter\n@Setter\n@SuppressWarnings(\"serial\")\npublic class $!{tableInfo.name}ImportReq extends $!{tableInfo.name}Dto {\n \n \n public void checkParam(){\n }\n\n}\n\n"
},
{
"name": "ImportRes.java.vm",
"code": "##导入宏定义\n$!{define.vm}\n\n##保存文件(宏定义)\n#save(\"/api/entity/$tool.firstLowerCase($!{tableInfo.name})\", \"ImportRes.java\")\n\n##包路径(宏定义)\n#setPackageSuffix(\"api.entity.$tool.firstLowerCase($!{tableInfo.name})\")\n\n##自动导入包(全局变量) \nimport lombok.Getter; \nimport lombok.Setter; \nimport lombok.experimental.Accessors;\nimport java.util.List;\nimport java.time.LocalDate;\nimport java.time.LocalDateTime;\n##表注释(宏定义)\n#tableComment(\"保存返回\")\n@Accessors(chain=true)\n@Getter\n@Setter\n@SuppressWarnings(\"serial\")\npublic class $!{tableInfo.name}ImportRes {\n /****\n * 写入行数\n */\n private int count;\n /**\n * 错误信息\n */\n private List<String> errorMsg;\n}\n"
},
{
"name": "entity.java.vm",
"code": "##导入宏定义\n$!{define.vm}\n\n##保存文件(宏定义)\n#save(\"/model\", \".java\")\n\n##包路径(宏定义)\n#setPackageSuffix(\"model\")\n\n##自动导入包(全局变量) \n\nimport java.time.LocalDate;\nimport java.time.LocalDateTime; \nimport com.olivia.sdk.utils.BaseEntity;\nimport lombok.Getter;\nimport lombok.Setter; \nimport lombok.experimental.Accessors;\nimport com.baomidou.mybatisplus.annotation.TableName;\n##表注释(宏定义)\n#tableComment(\"表实体类\")\n@Accessors(chain=true)\n@Getter\n@Setter\n//@SuppressWarnings(\"serial\")\n@TableName(\"$!{tableInfo.obj.name}\")\npublic class $!{tableInfo.name} extends BaseEntity {\n#foreach($column in $tableInfo.fullColumn)\n #if ($!{column.name}!=\"id\" &&$!{column.name}!=\"tenantId\" &&$!{column.name}!=\"createBy\" &&$!{column.name}!=\"updateBy\" \n &&$!{column.name}!=\"versionNum\" &&$!{column.name}!=\"version\" &&$!{column.name}!=\"traceId\" \n &&$!{column.name}!=\"traceId\" && $!{column.name}!=\"isDelete\"&& $!{column.name}!=\"createTime\" &&$!{column.name}!=\"updateTime\"\n )\n #if(${column.comment})\n /***\n * ${column.comment}\n */\n #end \n private $!{tool.getClsNameByFullName($column.type)} $!{column.name};\n #end\n#end\n \n}\n"
},
{
"name": "dao.java.vm",
"code": "##导入宏定义\n$!{define.vm}\n\n##设置表后缀(宏定义)\n#setTableSuffix(\"Mapper\")\n\n##保存文件(宏定义)\n#save(\"/mapper\", \"Mapper.java\")\n\n##包路径(宏定义)\n#setPackageSuffix(\"mapper\")\nimport com.github.yulichang.base.MPJBaseMapper; \nimport com.baomidou.mybatisplus.core.mapper.BaseMapper;\nimport $!{tableInfo.savePackageName}.model.$!tableInfo.name;\nimport org.apache.ibatis.annotations.Mapper;\n\n##表注释(宏定义)\n#tableComment(\"表数据库访问层\")\n@Mapper\npublic interface $!{tableName} extends MPJBaseMapper<$!tableInfo.name> {\n\n}\n"
},
{
"name": "service.java.vm",
"code": "##导入宏定义\n$!{define.vm}\n\n##设置表后缀(宏定义)\n#setTableSuffix(\"Service\")\n\n##保存文件(宏定义)\n#save(\"/service\", \"Service.java\")\n\n##包路径(宏定义)\n#setPackageSuffix(\"service\")\n\nimport com.olivia.sdk.utils.DynamicsPage; \nimport com.baomidou.mybatisplus.extension.service.IService;\nimport $!{tableInfo.savePackageName}.model.$!tableInfo.name;\nimport java.util.List;\nimport com.github.yulichang.base.MPJBaseService;\n\nimport $!{tableInfo.savePackageName}.api.entity.$tool.firstLowerCase($!{tableInfo.name}).*;\n\n##表注释(宏定义)\n#tableComment(\"表服务接口\")\npublic interface $!{tableName} extends MPJBaseService<$!tableInfo.name> {\n $!{tableInfo.name}QueryListRes queryList( $!{tableInfo.name}QueryListReq req);\n DynamicsPage<$!{tableInfo.name}ExportQueryPageListInfoRes > queryPageList( $!{tableInfo.name}ExportQueryPageListReq req);\n\n\n\n void setName(List<? extends $!{tableInfo.name}Dto> $tool.firstLowerCase($!{tableInfo.name})DtoList) ;\n}\n"
},
{
"name": "serviceImpl.java.vm",
"code": "##导入宏定义\n$!{define.vm}\n\n##设置表后缀(宏定义)\n#setTableSuffix(\"ServiceImpl\")\n\n##保存文件(宏定义)\n#save(\"/service/impl\", \"ServiceImpl.java\")\n\n##包路径(宏定义)\n#setPackageSuffix(\"service.impl\")\nimport org.springframework.aop.framework.AopContext;\nimport com.baomidou.mybatisplus.core.metadata.IPage;\nimport com.github.yulichang.base.MPJBaseServiceImpl;\nimport com.github.yulichang.wrapper.MPJLambdaWrapper;\nimport com.google.common.cache.Cache;\nimport com.google.common.cache.CacheBuilder; \nimport jakarta.annotation.Resource;\nimport com.olivia.sdk.utils.$;\nimport com.olivia.sdk.utils.DynamicsPage; \nimport java.util.List;\nimport java.util.Map;\nimport java.util.Objects;\nimport java.util.concurrent.TimeUnit;\nimport java.util.stream.Collectors;\nimport org.apache.commons.lang3.StringUtils;\nimport org.springframework.stereotype.Service;\nimport org.springframework.transaction.annotation.Transactional;\nimport $!{tableInfo.savePackageName}.mapper.$!{tableInfo.name}Mapper;\nimport $!{tableInfo.savePackageName}.model.$!{tableInfo.name};\nimport $!{tableInfo.savePackageName}.service.$!{tableInfo.name}Service; \nimport cn.hutool.core.collection.CollUtil;\n//import $!{tableInfo.savePackageName}.service.BaseTableHeaderService;\nimport com.olivia.peanut.portal.service.BaseTableHeaderService;\nimport $!{tableInfo.savePackageName}.api.entity.$tool.firstLowerCase($!{tableInfo.name}).*;\nimport com.olivia.peanut.util.SetNamePojoUtils;\nimport com.olivia.sdk.service.SetNameService;\n\n##表注释(宏定义)\n#tableComment(\"表服务实现类\")\n@Service(\"$!tool.firstLowerCase($tableInfo.name)Service\")\n@Transactional\npublic class $!{tableName} extends MPJBaseServiceImpl<$!{tableInfo.name}Mapper, $!{tableInfo.name}> implements $!{tableInfo.name}Service {\n\n final static Cache<String, Map<String, String>> cache = CacheBuilder.newBuilder().maximumSize(100).expireAfterWrite(30, TimeUnit.MINUTES).build();\n\n @Resource\n BaseTableHeaderService tableHeaderService;\n @Resource\n SetNameService setNameService;\n\n\n\n public @Override $!{tableInfo.name}QueryListRes queryList( $!{tableInfo.name}QueryListReq req){\n \n MPJLambdaWrapper< $!{tableInfo.name}> q= getWrapper(req.getData());\n List< $!{tableInfo.name}> list= this. list( q); \n \n List<$!{tableInfo.name}Dto> dataList=list.stream().map(t->$.copy(t,$!{tableInfo.name}Dto.class)).collect(Collectors.toList());\n (($!{tableInfo.name}Service) AopContext.currentProxy()).setName(dataList);\n return new $!{tableInfo.name}QueryListRes ().setDataList(dataList); \n }\n \n \n public @Override DynamicsPage<$!{tableInfo.name}ExportQueryPageListInfoRes > queryPageList($!{tableInfo.name}ExportQueryPageListReq req){\n \n DynamicsPage<$!{tableInfo.name}> page = new DynamicsPage<>();\n page.setCurrent(req.getPageNum()).setSize(req.getPageSize());\nsetQueryListHeader(page);\n MPJLambdaWrapper <$!{tableInfo.name}> q= getWrapper(req.getData());\n List<$!{tableInfo.name}ExportQueryPageListInfoRes> records;\n if (Boolean.TRUE.equals(req.getQueryPage())) {\n IPage< $!{tableInfo.name}> list= this . page( page,q ); \n IPage<$!{tableInfo.name}ExportQueryPageListInfoRes> dataList = list.convert(t -> $.copy(t, $!{tableInfo.name}ExportQueryPageListInfoRes.class));\n records = dataList.getRecords();\n }else{ \n records = $.copyList(this. list(q), $!{tableInfo.name}ExportQueryPageListInfoRes .class);\n }\n \n // 类型转换, 更换枚举 等操作 \n \n List<$!{tableInfo.name}ExportQueryPageListInfoRes> listInfoRes = $.copyList(records, $!{tableInfo.name}ExportQueryPageListInfoRes.class);\n (($!{tableInfo.name}Service) AopContext.currentProxy()).setName(listInfoRes);\n\n return DynamicsPage.init(page,listInfoRes);\n }\n \n // 以下为私有对象封装\n \n public @Override void setName(List<? extends $!{tableInfo.name}Dto> list) {\n \n // setNameService.setName(list, SetNamePojoUtils.FACTORY, SetNamePojoUtils.OP_USER_NAME);\n\n }\n \n \n \n private MPJLambdaWrapper<$!{tableInfo.name}> getWrapper($!{tableInfo.name}Dto obj) {\n MPJLambdaWrapper<$!{tableInfo.name}> q = new MPJLambdaWrapper<>();\n \n \n if (Objects.nonNull(obj)){\n q\n #foreach($column in $tableInfo.fullColumn)\n #if ($!{column.name}!=\"id\" &&$!{column.name}!=\"tenantId\" &&$!{column.name}!=\"createBy\" &&$!{column.name}!=\"updateBy\" \n &&$!{column.name}!=\"versionNum\" &&$!{column.name}!=\"version\" &&$!{column.name}!=\"traceId\" \n &&$!{column.name}!=\"traceId\" && $!{column.name}!=\"isDelete\"&& $!{column.name}!=\"createTime\" &&$!{column.name}!=\"updateTime\"\n )\n #if ($column.shortType==\"String\")\n .eq(StringUtils.isNoneBlank(obj.get$tool.firstUpperCase($column.name)()),$!{tableInfo.name}::get$tool.firstUpperCase($column.name),obj.get$tool.firstUpperCase($column.name)())\n #else\n .eq(Objects.nonNull(obj.get$tool.firstUpperCase($column.name)()),$!{tableInfo.name}::get$tool.firstUpperCase($column.name),obj.get$tool.firstUpperCase($column.name)())\n #end\n #end\n #end\n \n ;\n }\n q .orderByDesc($!{tableInfo.name}::getId);\n return q;\n \n } \n \n private void setQueryListHeader(DynamicsPage <$!{tableInfo.name}> page){\n \n tableHeaderService.listByBizKey(page, \"$!{tableInfo.name}Service#queryPageList\");\n\n }\n \n \n}\n"
},
{
"name": "importListener.java.vm",
"code": "##导入宏定义\n$!{define.vm}\n\n##设置表后缀(宏定义)\n#setPackageSuffix(\"api.impl.listener\")\n\n##保存文件(宏定义)\n#save(\"/api/impl/listener\", \"ImportListener.java\")\n\n##包路径(宏定义) \n\nimport $!{tableInfo.savePackageName}.model.$!tableInfo.name;\nimport org.apache.ibatis.annotations.Mapper;\nimport com.baomidou.mybatisplus.core.mapper.BaseMapper;\nimport $!{tableInfo.savePackageName}.api.entity.$tool.firstLowerCase($!{tableInfo.name}).*; \nimport com.alibaba.excel.context.AnalysisContext;\nimport com.alibaba.excel.event.AnalysisEventListener; \nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.Map;\nimport lombok.Getter;\nimport lombok.experimental.Accessors;\nimport lombok.extern.slf4j.Slf4j;\n##表注释(宏定义)\n#tableComment(\"文件导入监听\")\npublic class $!{tableInfo.name}ImportListener extends AnalysisEventListener<$!{tableInfo.name}ImportReq> {\n\n @Override\n public void invoke($!{tableInfo.name}ImportReq data, AnalysisContext analysisContext) {\n // 文件校验\n }\n\n @Override\n public void doAfterAllAnalysed(AnalysisContext analysisContext) {\n // 数据处理完毕后的操作(如果需要)\n }\n\n @Override\n public void onException(Exception exception, AnalysisContext context) throws Exception {\n // 异常处理\n super.onException(exception, context);\n }\n\n @Override\n public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) {\n // log.info(\"headMap:{}\", JSON.toJSONString(headMap));\n super.invokeHeadMap(headMap, context);\n }\n\n\n}"
},
{
"name": "QueryByIdListReq.java.vm",
"code": "##导入宏定义\n$!{define.vm}\n\n##保存文件(宏定义)\n#save(\"/api/entity/$tool.firstLowerCase($!{tableInfo.name})\", \"QueryByIdListReq.java\")\n\n##包路径(宏定义)\n#setPackageSuffix(\"api.entity.$tool.firstLowerCase($!{tableInfo.name})\")\n\n##自动导入包(全局变量) \nimport java.time.LocalDateTime;\nimport java.util.List;\nimport lombok.Getter; \nimport lombok.Setter; \nimport lombok.experimental.Accessors;\n \n\nimport java.time.LocalDate;\nimport java.time.LocalDateTime;\n##表注释(宏定义)\n#tableComment(\"查询对象入参\")\n@Accessors(chain=true)\n@Getter\n@Setter\n@SuppressWarnings(\"serial\")\npublic class $!{tableInfo.name}QueryByIdListReq {\n private List<Long> idList;\n \n \n public void checkParam(){\n }\n\n}\n"
},
{
"name": "QueryByIdListRes.java.vm",
"code": "##导入宏定义\n$!{define.vm}\n\n##保存文件(宏定义)\n#save(\"/api/entity/$tool.firstLowerCase($!{tableInfo.name})\", \"QueryByIdListRes.java\")\n\n##包路径(宏定义)\n#setPackageSuffix(\"api.entity.$tool.firstLowerCase($!{tableInfo.name})\")\n\n##自动导入包(全局变量) \n$!{autoImport.vm} \nimport lombok.Getter; \nimport lombok.Setter; \nimport lombok.experimental.Accessors;\nimport java.util.List;\n\nimport java.time.LocalDate;\nimport java.time.LocalDateTime;\n##表注释(宏定义)\n#tableComment(\"查询对象返回\")\n@Accessors(chain=true)\n@Getter\n@Setter\n@SuppressWarnings(\"serial\")\npublic class $!{tableInfo.name}QueryByIdListRes {\n /***\n * 返回对象列表\n */\nprivate List<$!{tableInfo.name}Dto> dataList;\n \n \n}\n"
},
{
"name": "entityDto.java.vm",
"code": "##导入宏定义\n$!{define.vm}\n\n##保存文件(宏定义)\n#save(\"/api/entity/$tool.firstLowerCase($!{tableInfo.name})\", \"Dto.java\")\n\n##包路径(宏定义)\n#setPackageSuffix(\"api.entity.$tool.firstLowerCase($!{tableInfo.name})\")\n\n##自动导入包(全局变量) \n$!{autoImport.vm} \nimport lombok.Getter; \nimport lombok.Setter; \nimport lombok.experimental.Accessors;\nimport java.util.List;\nimport com.olivia.peanut.portal.api.entity.BaseEntityDto;\nimport com.alibaba.excel.annotation.ExcelProperty;\nimport java.time.LocalDate;\nimport java.time.LocalDateTime;\nimport com.olivia.sdk.ann.InsertCheck;\nimport com.olivia.sdk.ann.UpdateCheck;\nimport jakarta.validation.constraints.NotBlank;\nimport jakarta.validation.constraints.NotNull;\n\n##表注释(宏定义)\n#tableComment(\"查询对象返回\")\n//@Accessors(chain=true)\n@Getter\n@Setter\n@SuppressWarnings(\"serial\")\npublic class $!{tableInfo.name}Dto extends BaseEntityDto {\n\n#foreach($column in $tableInfo.fullColumn)\n #if ($!{column.name}!=\"id\" &&$!{column.name}!=\"tenantId\" &&$!{column.name}!=\"createBy\" &&$!{column.name}!=\"updateBy\" \n &&$!{column.name}!=\"versionNum\" &&$!{column.name}!=\"version\" &&$!{column.name}!=\"traceId\" \n &&$!{column.name}!=\"traceId\" && $!{column.name}!=\"isDelete\" && $!{column.name}!=\"createTime\" && $!{column.name}!=\"updateTime\"\n )\n #if(${column.comment})\n /***\n * ${column.comment}\n */\n #end \n #if ($!{tool.getClsNameByFullName($column.type)}==\"String\" )\n @NotBlank(message = \"${column.comment}不能为空\", groups = {InsertCheck.class, UpdateCheck.class})\n #else\n @NotNull(message = \"${column.comment}不能为空\", groups = {InsertCheck.class, UpdateCheck.class})\n #end\n private $!{tool.getClsNameByFullName($column.type)} $!{column.name};\n #end\n#end\n \n}\n\n"
},
{
"name": "index.vue.vm",
"code": "##导入宏定义\n$!{define.vm}\n##保存文件(宏定义)\n#save(\"/vue/$tool.firstLowerCase($!{tableInfo.name})\", \".vue\")\n<template>\n <div class=\"app-container\">\n <el-form v-show=\"showSearch\" ref=\"queryForm\" :inline=\"true\" :model=\"queryParams\" label-width=\"88px\" size=\"small\">\n #foreach($column in $tableInfo.fullColumn)\n #if ($!{column.name}!=\"id\" &&$!{column.name}!=\"tenantId\" &&$!{column.name}!=\"createBy\" &&$!{column.name}!=\"updateBy\" \n &&$!{column.name}!=\"versionNum\" &&$!{column.name}!=\"version\" &&$!{column.name}!=\"traceId\" \n &&$!{column.name}!=\"traceId\" && $!{column.name}!=\"isDelete\"&& $!{column.name}!=\"createTime\" &&$!{column.name}!=\"updateTime\"\n )\n <el-form-item label=\"${column.comment}\" prop=\"$!{column.name}\">\n <el-input v-model=\"queryParams.data.$!{column.name}\" clearable placeholder=\"请输入${column.comment}\" @keyup.enter.native=\"handleQuery\"/>\n </el-form-item>\n #end\n #end\n </el-form>\n\n <el-row :gutter=\"10\" class=\"mb8\">\n <el-col :span=\"1.5\">\n <el-button icon=\"el-icon-plus\" plain size=\"mini\" type=\"primary\" @click=\"handleAdd\"></el-button>\n </el-col>\n <el-col :span=\"1.5\">\n <el-button :disabled=\"multiple\" icon=\"el-icon-delete\" plain size=\"mini\" type=\"danger\" @click=\"handleDelete\"></el-button>\n </el-col>\n <right-toolbar :showSearch.sync=\"showSearch\" @queryTable=\"getList\"></right-toolbar>\n </el-row>\n\n <el-table v-loading=\"loading\" :data=\"$tool.firstLowerCase($!{tableInfo.name})List\" @selection-change=\"handleSelectionChange\">\n <el-table-column align=\"center\" label=\"全选\" prop=\"id\" type=\"selection\" width=\"50\"/>\n <el-table-column v-for=\"(item,index) in tableHeaderList\" :key=\"index\" :label=\"item.showName\" :prop=\"item.fieldName\" align=\"center\" :width=\"item.width+'px'\"/>\n <el-table-column align=\"center\" class-name=\"small-padding fixed-width\" label=\"操作\">\n <template slot-scope=\"scope\">\n <el-button icon=\"el-icon-edit\" size=\"mini\" type=\"text\" @click=\"handleUpdate(scope.row)\">修改</el-button>\n <el-button icon=\"el-icon-delete\" size=\"mini\" type=\"text\" @click=\"handleDelete(scope.row)\">删除</el-button>\n </template>\n </el-table-column>\n </el-table>\n\n <pagination\n v-show=\"total>0\"\n :limit.sync=\"queryParams.pageSize\"\n :page.sync=\"queryParams.pageNum\"\n :total=\"total\"\n @pagination=\"getList\"\n />\n\n <!-- 添加或修改参数配置对话框 -->\n <el-dialog :title=\"title\" :visible.sync=\"open\" append-to-body width=\"500px\">\n <el-form ref=\"form\" :model=\"form\" :rules=\"rules\" label-width=\"100px\">\n\n #foreach($column in $tableInfo.fullColumn)\n #if ($!{column.name}!=\"id\" &&$!{column.name}!=\"tenantId\" &&$!{column.name}!=\"createBy\" &&$!{column.name}!=\"updateBy\" \n &&$!{column.name}!=\"versionNum\" &&$!{column.name}!=\"version\" &&$!{column.name}!=\"traceId\" \n &&$!{column.name}!=\"traceId\" && $!{column.name}!=\"isDelete\"&& $!{column.name}!=\"createTime\" &&$!{column.name}!=\"updateTime\"\n )\n <el-form-item label=\"${column.comment}\" prop=\"$!{column.name}\">\n <el-input v-model=\"form.$!{column.name}\" clearable placeholder=\"请输入${column.comment}\"/>\n </el-form-item>\n #end\n #end\n \n </el-form>\n <div slot=\"footer\" class=\"dialog-footer\">\n <el-button type=\"primary\" @click=\"submitForm\">确 定</el-button>\n <el-button @click=\"cancel\">取 消</el-button>\n </div>\n </el-dialog>\n </div>\n</template>\n\n\n<script>\n\nimport { add, deleteByIdList, getById, queryPageList, updateById } from '@/api/common'\nimport { getFactoryList } from '@/api/factory'\nexport default {\n name: 'tenantName',\n data() {\n\n return {\n // 遮罩层\n loading: true,\n // 选中数组\n ids: [],\n // 非单个禁用\n single: true,\n // 非多个禁用\n multiple: true,\n // 显示搜索条件\n showSearch: false,\n // 总条数\n total: 0,\n $tool.firstLowerCase($!{tableInfo.name})List: [], \n // 弹出层标题\n title: '',\n // 是否显示弹出层\n open: false,\n // 查询参数\n queryParams: {\n pageNum: 1,\n pageSize: 10,\n data: {}\n },\n // 表单参数\n form: {\n #foreach($column in $tableInfo.fullColumn)\n #if ($!{column.name}!=\"id\" &&$!{column.name}!=\"tenantId\" &&$!{column.name}!=\"createBy\" &&$!{column.name}!=\"updateBy\" \n &&$!{column.name}!=\"versionNum\" &&$!{column.name}!=\"version\" &&$!{column.name}!=\"traceId\" \n &&$!{column.name}!=\"traceId\" && $!{column.name}!=\"isDelete\"&& $!{column.name}!=\"createTime\" &&$!{column.name}!=\"updateTime\"\n )\n $!{column.name} :undefined,\n #end\n #end\n id: undefined\n },\n // 表单校验\n rules: {},\n tableHeaderList: []\n }\n },\n created() {\n document['pagePath'] = '/$tool.firstLowerCase($!{tableInfo.name})' \n this.getList()\n },\n methods: {\n /** 查询公告列表 */\n getList() {\n this.loading = true\n queryPageList(this.queryParams).then(response => {\n response = response.data\n this.tableHeaderList = response.headerList\n this.$tool.firstLowerCase($!{tableInfo.name})List = response.dataList\n this.total = parseInt(response.total)\n this.loading = false\n })\n },\n cancel() {\n this.open = false\n this.reset()\n },\n // 表单重置\n reset() {\n let fid=this.form.id\n this.form = {\n #foreach($column in $tableInfo.fullColumn)\n #if ($!{column.name}!=\"id\" &&$!{column.name}!=\"tenantId\" &&$!{column.name}!=\"createBy\" &&$!{column.name}!=\"updateBy\" \n &&$!{column.name}!=\"versionNum\" &&$!{column.name}!=\"version\" &&$!{column.name}!=\"traceId\" \n &&$!{column.name}!=\"traceId\" && $!{column.name}!=\"isDelete\"&& $!{column.name}!=\"createTime\" &&$!{column.name}!=\"updateTime\"\n )\n $!{column.name} :undefined,\n #end\n #end\n id: fid\n }\n this.resetForm('form')\n },\n /** 搜索按钮操作 */\n handleQuery() {\n this.queryParams.pageNum = 1\n this.getList()\n },\n /** 重置按钮操作 */\n resetQuery() {\n this.resetForm('queryForm')\n this.handleQuery()\n },\n // 多选框选中数据\n handleSelectionChange(selection) {\n this.ids = selection.map(item => item.id)\n this.single = selection.length !== 1\n this.multiple = !selection.length\n },\n /** 新增按钮操作 */\n handleAdd() {\n this.reset();\n this.title = '添加${tableInfo.comment}'\n this.open = true\n }, \n /** 修改按钮操作 */\n handleUpdate(row) {\n this.reset()\n let req = { idList: [row.id], pageSize: 1, pageNum: 1 }\n getById(req).then(response => {\n this.form = response.data.dataList[0]\n this.title = '修改${tableInfo.comment}'\n this.open = true\n })\n\n },\n\n #set($refs=\"$refs['form']\")\n /** 提交按钮 */\n submitForm: function() {\n this.${refs}.validate(valid => {\n if (valid) {\n if (this.form.id !== undefined) {\n updateById(this.form).then(response => {\n this.$modal.msgSuccess('修改成功')\n this.open = false\n this.getList()\n })\n } else {\n add(this.form).then(response => {\n this.$modal.msgSuccess('新增成功')\n this.open = false\n this.getList()\n })\n }\n }\n })\n },\n #set($modal=\"$modal\")\n /** 删除按钮操作 */\n handleDelete(row) {\n const idList = row.id ? [row.id] : this.ids\n this.${modal}.confirm('是否确认删序号为 <span style=\"color:red\">' + idList + '</span> 的数据项?', '删除提示').then(function() {\n let req = {\n idList: idList\n }\n return deleteByIdList(req)\n }).then(() => {\n this.getList()\n this.$modal.msgSuccess('删除成功')\n })\n document.getElementsByClassName('el-message-box')[0].style.width = '520px'\n }\n }\n \n }\n\n\n</script>\n"
}
]
}
},
"columnConfig": {
"Default": {
"name": "Default",
"elementList": [
{
"title": "disable",
"type": "BOOLEAN",
"selectValue": ""
},
{
"title": "support",
"type": "SELECT",
"selectValue": "add,edit,query,del,ui"
}
]
}
},
"globalConfig": {
"MybatisCodeHelperPro": {
"name": "MybatisCodeHelperPro",
"elementList": [
{
"name": "autoImport.vm",
"value": "##自动导入包(仅导入实体属性需要的包,通常用于实体类)\n#foreach($import in $importList)\nimport $!import;\n#end"
},
{
"name": "define.vm",
"value": "##(Velocity宏定义)\n\n##定义设置表名后缀的宏定义,调用方式:#setTableSuffix(\"Test\")\n#macro(setTableSuffix $suffix)\n #set($tableName = $!tool.append($tableInfo.name, $suffix))\n#end\n\n##定义设置包名后缀的宏定义,调用方式:#setPackageSuffix(\"Test\")\n#macro(setPackageSuffix $suffix)\n#if($suffix!=\"\")package #end#if($tableInfo.savePackageName!=\"\")$!{tableInfo.savePackageName}.#{end}$!suffix;\n#end\n\n##定义直接保存路径与文件名简化的宏定义,调用方式:#save(\"/entity\", \".java\")\n#macro(save $path $fileName)\n $!callback.setSavePath($tool.append($tableInfo.savePath, $path))\n $!callback.setFileName($tool.append($tableInfo.name, $fileName))\n#end\n\n##定义表注释的宏定义,调用方式:#tableComment(\"注释信息\")\n#macro(tableComment $desc)\n/**\n * $!{tableInfo.comment}($!{tableInfo.name})$desc\n *\n * @author $!author\n * @since $!time.currTime()\n */\n#end\n\n##定义GET,SET方法的宏定义,调用方式:#getSetMethod($column)\n#macro(getSetMethod $column)\n\n public $!{tool.getClsNameByFullName($column.type)} get$!{tool.firstUpperCase($column.name)}() {\n return $!{column.name};\n }\n\n public void set$!{tool.firstUpperCase($column.name)}($!{tool.getClsNameByFullName($column.type)} $!{column.name}) {\n this.$!{column.name} = $!{column.name};\n }\n#end"
},
{
"name": "init.vm",
"value": "##初始化区域\n\n##去掉表的t_前缀\n$!tableInfo.setName($tool.getClassName($tableInfo.obj.name.replaceFirst(\"book_\",\"\")))\n\n##参考阿里巴巴开发手册,POJO 类中布尔类型的变量,都不要加 is 前缀,否则部分框架解析会引起序列化错误\n#foreach($column in $tableInfo.fullColumn)\n#if($column.name.startsWith(\"is\") && $column.type.equals(\"java.lang.Boolean\"))\n $!column.setName($tool.firstLowerCase($column.name.substring(2)))\n#end\n#end\n\n##实现动态排除列\n#set($temp = $tool.newHashSet(\"testCreateTime\", \"otherColumn\"))\n#foreach($item in $temp)\n #set($newList = $tool.newArrayList())\n #foreach($column in $tableInfo.fullColumn)\n #if($column.name!=$item)\n ##带有反回值的方法调用时使用$tool.call来消除返回值\n $tool.call($newList.add($column))\n #end\n #end\n ##重新保存\n $tableInfo.setFullColumn($newList)\n#end\n\n##对importList进行篡改\n#set($temp = $tool.newHashSet())\n#foreach($column in $tableInfo.fullColumn)\n #if(!$column.type.startsWith(\"java.lang.\"))\n ##带有反回值的方法调用时使用$tool.call来消除返回值\n $tool.call($temp.add($column.type))\n #end\n#end\n##覆盖\n#set($importList = $temp)\n"
},
{
"name": "mybatisCodehelper.vm",
"value": "##following code can be generated use MybatisCodeHelperPro plugin mybatis generator mingrate to template generate.\n##copy group for different project.\n#set($javamodelSrcFolder=\"${projectPath}/src/main/java\")\n#set($modelPackageName=\"com.model\")\n#set($mapperSrcFolder=\"${projectPath}/src/main/java\")\n#set($mapperPackageName=\"com.mapper\")\n#set($mapperXmlFolder=\"${projectPath}/src/main/resources\")\n#set($mapperXmlPackage=\"mapperxml\")\n#set($serviceSrcFolder=\"${projectPath}/src/main/java\")\n#set($servicePackageName=\"com.service\")\n#set($serviceImplSrcFolder=\"${projectPath}/src/main/java\")\n#set($serviceImplPackageName=\"com.service.impl\")\n#set($controllerSrcFolder=\"${projectPath}/src/main/java\")\n#set($controllerPackageName=\"com.controller\")\n#set($useLombok=true)\n#set($useSwagger=false)\n#set($useOpenApi=false)\n#set($addSchemaName=false)\n#set($mapperSuffix=\"Mapper\")\n#set($daoSuffix=\"Mapper\")\n"
},
{
"name": "mybatisSupport.vm",
"value": "##针对Mybatis 进行支持,主要用于生成xml文件\n#foreach($column in $tableInfo.fullColumn)\n ##储存列类型\n $tool.call($column.ext.put(\"sqlType\", $tool.getField($column.obj.dataType, \"typeName\")))\n #if($tool.newHashSet(\"java.lang.String\").contains($column.type))\n #set($jdbcType=\"VARCHAR\")\n #elseif($tool.newHashSet(\"java.lang.Boolean\", \"boolean\").contains($column.type))\n #set($jdbcType=\"BOOLEAN\")\n #elseif($tool.newHashSet(\"java.lang.Byte\", \"byte\").contains($column.type))\n #set($jdbcType=\"BYTE\")\n #elseif($tool.newHashSet(\"java.lang.Integer\", \"int\", \"java.lang.Short\", \"short\").contains($column.type))\n #set($jdbcType=\"INTEGER\")\n #elseif($tool.newHashSet(\"java.lang.Long\", \"long\").contains($column.type))\n #set($jdbcType=\"INTEGER\")\n #elseif($tool.newHashSet(\"java.lang.Float\", \"float\", \"java.lang.Double\", \"double\").contains($column.type))\n #set($jdbcType=\"NUMERIC\")\n #elseif($tool.newHashSet(\"java.util.Date\", \"java.sql.Timestamp\", \"java.time.Instant\", \"java.time.LocalDateTime\", \"java.time.OffsetDateTime\", \"\tjava.time.ZonedDateTime\").contains($column.type))\n #set($jdbcType=\"TIMESTAMP\")\n #elseif($tool.newHashSet(\"java.sql.Date\", \"java.time.LocalDate\").contains($column.type))\n #set($jdbcType=\"TIMESTAMP\")\n #else\n ##其他类型\n #set($jdbcType=\"VARCHAR\")\n #end\n $tool.call($column.ext.put(\"jdbcType\", $jdbcType))\n#end\n\n##定义宏,查询所有列\n#macro(allSqlColumn)#foreach($column in $tableInfo.fullColumn)$column.obj.name#if($velocityHasNext), #end#end#end\n"
}
]
},
"Default": {
"name": "Default",
"elementList": [
{
"name": "autoImport.vm",
"value": "##自动导入包(仅导入实体属性需要的包,通常用于实体类)\n#foreach($import in $importList)\nimport $!import;\n#end"
},
{
"name": "define.vm",
"value": "##(Velocity宏定义)\n\n##定义设置表名后缀的宏定义,调用方式:#setTableSuffix(\"Test\")\n#macro(setTableSuffix $suffix)\n #set($tableName = $!tool.append($tableInfo.name, $suffix))\n#end\n\n##定义设置包名后缀的宏定义,调用方式:#setPackageSuffix(\"Test\")\n#macro(setPackageSuffix $suffix)\n#if($suffix!=\"\")package #end#if($tableInfo.savePackageName!=\"\")$!{tableInfo.savePackageName}.#{end}$!suffix;\n#end\n\n##定义直接保存路径与文件名简化的宏定义,调用方式:#save(\"/entity\", \".java\")\n#macro(save $path $fileName)\n $!callback.setSavePath($tool.append($tableInfo.savePath, $path))\n $!callback.setFileName($tool.append($tableInfo.name, $fileName))\n#end\n\n##定义表注释的宏定义,调用方式:#tableComment(\"注释信息\")\n#macro(tableComment $desc)\n/**\n * $!{tableInfo.comment}($!{tableInfo.name})$desc\n *\n * @author $!author\n * @since $!time.currTime()\n */\n#end\n\n##定义GET,SET方法的宏定义,调用方式:#getSetMethod($column)\n#macro(getSetMethod $column)\n\n public $!{tool.getClsNameByFullName($column.type)} get$!{tool.firstUpperCase($column.name)}() {\n return $!{column.name};\n }\n\n public void set$!{tool.firstUpperCase($column.name)}($!{tool.getClsNameByFullName($column.type)} $!{column.name}) {\n this.$!{column.name} = $!{column.name};\n }\n#end"
},
{
"name": "init.vm",
"value": "##初始化区域\n\n##去掉表的t_前缀\n$!tableInfo.setName($tool.getClassName($tableInfo.obj.name.replaceFirst(\"book_\",\"\")))\n\n##参考阿里巴巴开发手册,POJO 类中布尔类型的变量,都不要加 is 前缀,否则部分框架解析会引起序列化错误\n#foreach($column in $tableInfo.fullColumn)\n#if($column.name.startsWith(\"is\") && $column.type.equals(\"java.lang.Boolean\"))\n $!column.setName($tool.firstLowerCase($column.name.substring(2)))\n#end\n#end\n\n##实现动态排除列\n#set($temp = $tool.newHashSet(\"testCreateTime\", \"otherColumn\"))\n#foreach($item in $temp)\n #set($newList = $tool.newArrayList())\n #foreach($column in $tableInfo.fullColumn)\n #if($column.name!=$item)\n ##带有反回值的方法调用时使用$tool.call来消除返回值\n $tool.call($newList.add($column))\n #end\n #end\n ##重新保存\n $tableInfo.setFullColumn($newList)\n#end\n\n##对importList进行篡改\n#set($temp = $tool.newHashSet())\n#foreach($column in $tableInfo.fullColumn)\n #if(!$column.type.startsWith(\"java.lang.\"))\n ##带有反回值的方法调用时使用$tool.call来消除返回值\n $tool.call($temp.add($column.type))\n #end\n#end\n##覆盖\n#set($importList = $temp)\n"
},
{
"name": "mybatisSupport.vm",
"value": "##针对Mybatis 进行支持,主要用于生成xml文件\n#foreach($column in $tableInfo.fullColumn)\n ##储存列类型\n $tool.call($column.ext.put(\"sqlType\", $tool.getField($column.obj.dataType, \"typeName\")))\n #if($tool.newHashSet(\"java.lang.String\").contains($column.type))\n #set($jdbcType=\"VARCHAR\")\n #elseif($tool.newHashSet(\"java.lang.Boolean\", \"boolean\").contains($column.type))\n #set($jdbcType=\"BOOLEAN\")\n #elseif($tool.newHashSet(\"java.lang.Byte\", \"byte\").contains($column.type))\n #set($jdbcType=\"BYTE\")\n #elseif($tool.newHashSet(\"java.lang.Integer\", \"int\", \"java.lang.Short\", \"short\").contains($column.type))\n #set($jdbcType=\"INTEGER\")\n #elseif($tool.newHashSet(\"java.lang.Long\", \"long\").contains($column.type))\n #set($jdbcType=\"INTEGER\")\n #elseif($tool.newHashSet(\"java.lang.Float\", \"float\", \"java.lang.Double\", \"double\").contains($column.type))\n #set($jdbcType=\"NUMERIC\")\n #elseif($tool.newHashSet(\"java.util.Date\", \"java.sql.Timestamp\", \"java.time.Instant\", \"java.time.LocalDateTime\", \"java.time.OffsetDateTime\", \"\tjava.time.ZonedDateTime\").contains($column.type))\n #set($jdbcType=\"TIMESTAMP\")\n #elseif($tool.newHashSet(\"java.sql.Date\", \"java.time.LocalDate\").contains($column.type))\n #set($jdbcType=\"TIMESTAMP\")\n #else\n ##其他类型\n #set($jdbcType=\"VARCHAR\")\n #end\n $tool.call($column.ext.put(\"jdbcType\", $jdbcType))\n#end\n\n##定义宏,查询所有列\n#macro(allSqlColumn)#foreach($column in $tableInfo.fullColumn)$column.obj.name#if($foreach.hasNext), #end#end#end\n"
}
]
}
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。