{
  "author" : "fangjiakai",
  "version" : "1.2.8",
  "userSecure" : "",
  "currTypeMapperGroupName" : "Default",
  "currTemplateGroupName" : "zcloud-gbs",
  "currColumnConfigGroupName" : "Default",
  "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" : "REGEX",
        "columnType" : "(tiny|medium|long)*text",
        "javaType" : "java.lang.String"
      }, {
        "matchType" : "REGEX",
        "columnType" : "decimal(\\(\\d+,\\d+\\))?",
        "javaType" : "java.lang.Double"
      }, {
        "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.util.Date"
      }, {
        "matchType" : "ORDINARY",
        "columnType" : "datetime",
        "javaType" : "java.util.Date"
      }, {
        "matchType" : "ORDINARY",
        "columnType" : "timestamp",
        "javaType" : "java.util.Date"
      }, {
        "matchType" : "ORDINARY",
        "columnType" : "time",
        "javaType" : "java.time.LocalTime"
      }, {
        "matchType" : "ORDINARY",
        "columnType" : "boolean",
        "javaType" : "java.lang.Boolean"
      }, {
        "matchType" : "ORDINARY",
        "columnType" : "double(10,2)",
        "javaType" : "java.lang.Double"
      }, {
        "matchType" : "ORDINARY",
        "columnType" : "int(2) unsigned zerofill",
        "javaType" : "java.lang.Integer"
      }, {
        "matchType" : "ORDINARY",
        "columnType" : "double(11,2)",
        "javaType" : "java.lang.Double"
      }, {
        "matchType" : "ORDINARY",
        "columnType" : "double(10,1)",
        "javaType" : "java.lang.Double"
      }, {
        "matchType" : "ORDINARY",
        "columnType" : "double(20,2)",
        "javaType" : "java.lang.Double"
      }, {
        "matchType" : "ORDINARY",
        "columnType" : "decimal(10)",
        "javaType" : "java.math.BigDecimal"
      }, {
        "matchType" : "ORDINARY",
        "columnType" : "json",
        "javaType" : "com.alibaba.fastjson.JSONObject"
      } ]
    }
  },
  "template" : {
    "zcloud-gbs" : {
      "name" : "zcloud-gbs",
      "elementList" : [ {
        "name" : "addCmd.vm",
        "code" : "##定义初始变量\n#set($tableName = $tool.append($tableInfo.name, \"AddCmd\"))\n##设置回调\n$!callback.setFileName($tool.append($tableName, \".java\"))\n$!callback.setSavePath($tool.append($tableInfo.savePath, \"/dto\"))\n\n#foreach($column in $tableInfo.fullColumn)\n    #if(${column.comment} == \"业务主键id\")\n        #set($uuid = $column.name)\n    #end\n#end\n\n#if($tableInfo.savePackageName)package $!{tableInfo.savePackageName}.dto#{end};\n\nimport com.alibaba.cola.dto.Command;\nimport io.swagger.annotations.ApiModelProperty;\nimport lombok.AllArgsConstructor;\nimport lombok.Data;\nimport lombok.EqualsAndHashCode;\nimport lombok.NoArgsConstructor;\nimport javax.validation.constraints.*;\n\n/**\n* web-client\n* @Author $!author\n* @Date $!time.currTime()\n*/\n@EqualsAndHashCode(callSuper = true)\n@Data\n@NoArgsConstructor\n@AllArgsConstructor\npublic class $!{tableInfo.name}AddCmd extends Command {\n#foreach($column in $tableInfo.fullColumn)\n#if(${column.name} != \"id\" && ${column.name} != \"createTime\" && ${column.name} != \"updateTime\" && ${column.name} != \"createId\"\n&& ${column.name} != \"updateId\" && ${column.name} != \"env\" && ${column.name} != \"deleteEnum\"&& ${column.name} != \"remarks\" \n&& ${column.name} != \"createName\" && ${column.name} != \"updateName\" && ${column.name} != \"tenantId\" && ${column.name} != \"orgId\"\n&& ${column.name} != \"version\" && ${column.name} != ${uuid})\n    @ApiModelProperty(value = \"${column.comment}\", name = \"$!{column.name}\", required = true)\n    #if($!{tool.getClsNameByFullName($column.type)} == \"Integer\" || $!{tool.getClsNameByFullName($column.type)} == \"Long\"\n    || $!{tool.getClsNameByFullName($column.type)} == \"Date\" || $!{tool.getClsNameByFullName($column.type)} == \"BigDecimal\"\n    || $!{tool.getClsNameByFullName($column.type)} == \"Float\" || $!{tool.getClsNameByFullName($column.type)} == \"Double\")\n    @NotNull(message = \"${column.comment}不能为空\")\n    #else\n    @NotEmpty(message = \"${column.comment}不能为空\")\n    #end\n    #if($!{tool.getClsNameByFullName($column.type)} == \"Date\")\n     @JsonFormat(pattern = \"yyyy-MM-dd\")\n    #end\n     #if($!{tool.getClsNameByFullName($column.type)} == \"LocalDateTime\")\n     @JsonFormat(pattern = \"yyyy-MM-dd HH:mm:ss\")\n    #end\n    private $!{tool.getClsNameByFullName($column.type)} $!{column.name};\n    \n#end\n#end\n}\n"
      }, {
        "name" : "addExe.vm",
        "code" : "##定义初始变量\n#set($tableName = $tool.append($tableInfo.name, \"AddExe\"))\n##设置回调\n$!callback.setFileName($tool.append($tableName, \".java\"))\n$!callback.setSavePath($tool.append($tableInfo.savePath, \"/command\"))\n\n#if($tableInfo.savePackageName)package $!{tableInfo.savePackageName}.command#{end};\n\nimport $!{tableInfo.savePackageName}.domain.gateway.$!{tableInfo.name}Gateway;\nimport $!{tableInfo.savePackageName}.domain.model.$!{tableInfo.name}E;\nimport $!{tableInfo.savePackageName}.dto.$!{tableInfo.name}AddCmd;\nimport com.alibaba.cola.exception.BizException;\nimport lombok.AllArgsConstructor;\nimport org.springframework.beans.BeanUtils;\nimport org.springframework.stereotype.Component;\nimport org.springframework.transaction.annotation.Transactional;\n\n\n\n\n/**\n* web-app\n* @Author $!author\n* @Date $!time.currTime()\n*/\n@Component\n@AllArgsConstructor\npublic class $!{tableInfo.name}AddExe {\n    private final $!{tableInfo.name}Gateway $!{tool.firstLowerCase($tableInfo.name)}Gateway;\n\n    @Transactional(rollbackFor = Exception.class)\n    public boolean execute($!{tableInfo.name}AddCmd cmd) {\n        $!{tableInfo.name}E $!{tool.firstLowerCase($tableInfo.name)}E = new $!{tableInfo.name}E();\n        BeanUtils.copyProperties(cmd, $!{tool.firstLowerCase($tableInfo.name)}E);\n        boolean res = false;\n        try {\n            res = $!{tool.firstLowerCase($tableInfo.name)}Gateway.add($!{tool.firstLowerCase($tableInfo.name)}E);\n        } catch (Exception e) {\n            throw new RuntimeException(e);\n        }\n        if (!res) {\n            throw new BizException(\"保存失败\");\n        }\n        return true;\n    }\n}\n"
      }, {
        "name" : "co.vm",
        "code" : "##定义初始变量\n#set($tableName = $tool.append($tableInfo.name, \"CO\"))\n##设置回调\n$!callback.setFileName($tool.append($tableName, \".java\"))\n$!callback.setSavePath($tool.append($tableInfo.savePath, \"/dto/clientobject\"))\n\n#set($firstColumn = $tableInfo.fullColumn.get(1))\n\n#if($tableInfo.savePackageName)package $!{tableInfo.savePackageName}.dto.clientobject#{end};\n\nimport com.alibaba.cola.dto.ClientObject;\nimport com.fasterxml.jackson.annotation.JsonFormat;\nimport io.swagger.annotations.ApiModelProperty;\nimport lombok.Data;\nimport java.sql.Date;\n\n\n\n/**\n* web-client\n* @Author $!author\n* @Date $!time.currTime()\n*/\n@Data\npublic class $!{tableInfo.name}CO extends ClientObject {\n#foreach($column in $tableInfo.fullColumn)\n    #if(${column.comment})\n    //${column.comment}\n    @ApiModelProperty(value = \"${column.comment}\")\n    #end\n   #if($!{tool.getClsNameByFullName($column.type)} == \"Date\")\n     @JsonFormat(pattern = \"yyyy-MM-dd\")\n    #end\n    #if($!{tool.getClsNameByFullName($column.type)} == \"LocalDateTime\")\n     @JsonFormat(pattern = \"yyyy-MM-dd HH:mm:ss\")\n    #end\n    private $!{tool.getClsNameByFullName($column.type)} $!{column.name};\n#end\n}\n"
      }, {
        "name" : "controller.vm",
        "code" : "##定义初始变量\n#set($tableName = $tool.append($tableInfo.name, \"Controller\"))\n##设置回调\n$!callback.setFileName($tool.append($tableName, \".java\"))\n$!callback.setSavePath($tool.append($tableInfo.savePath, \"/web\"))\n\n#if($tableInfo.savePackageName)package $!{tableInfo.savePackageName}.web#{end};\n\n\nimport $!{tableInfo.savePackageName}.api.$!{tableInfo.name}ServiceI;\nimport $!{tableInfo.savePackageName}.dto.$!{tableInfo.name}AddCmd;\nimport $!{tableInfo.savePackageName}.dto.$!{tableInfo.name}PageQry;\nimport $!{tableInfo.savePackageName}.dto.$!{tableInfo.name}UpdateCmd;\nimport $!{tableInfo.savePackageName}.dto.clientobject.$!{tableInfo.name}CO;\nimport com.alibaba.cola.dto.MultiResponse;\nimport com.alibaba.cola.dto.PageResponse;\nimport com.alibaba.cola.dto.Response;\nimport com.alibaba.cola.dto.SingleResponse;\nimport com.jjb.saas.framework.auth.model.SSOUser;\nimport com.jjb.saas.framework.auth.utils.AuthContext;\nimport io.swagger.annotations.Api;\nimport io.swagger.annotations.ApiOperation;\nimport lombok.AllArgsConstructor;\nimport org.springframework.validation.annotation.Validated;\nimport org.springframework.web.bind.annotation.*;\n\nimport java.util.ArrayList;\n/**\n* web-adapter\n* @Author $!author\n* @Date $!time.currTime()\n*/\n@Api(tags = \"$!{tableInfo.comment}\")\n@RequestMapping(\"/${application.gateway}/$!{tool.firstLowerCase($tableInfo.name)}\")\n@RestController\n@AllArgsConstructor\npublic class $!{tableInfo.name}Controller {\n    private final $!{tableInfo.name}ServiceI $!{tool.firstLowerCase($tableInfo.name)}Service;\n\n    @ApiOperation(\"新增\")\n    @PostMapping(\"/save\")\n    public SingleResponse<$!{tableInfo.name}CO> add(@Validated @RequestBody $!{tableInfo.name}AddCmd cmd) {\n        SSOUser ssoUser = AuthContext.getCurrentUser();\n        return $!{tool.firstLowerCase($tableInfo.name)}Service.add(cmd);\n    }\n\n    @ApiOperation(\"分页\")\n    @PostMapping(\"/list\")\n    public PageResponse<$!{tableInfo.name}CO> page(@RequestBody $!{tableInfo.name}PageQry qry) {\n        return $!{tool.firstLowerCase($tableInfo.name)}Service.listPage(qry);\n    }\n\n    @ApiOperation(\"所有数据\")\n    @GetMapping(\"/listAll\")\n    public MultiResponse<$!{tableInfo.name}CO> listAll() {\n        return MultiResponse.of(new ArrayList<$!{tableInfo.name}CO>());\n    }\n\n    @ApiOperation(\"详情\")\n    @GetMapping(\"/{id}\")\n    public SingleResponse<$!{tableInfo.name}CO> getInfoById(@PathVariable(\"id\") Long id) {\n        return SingleResponse.of($!{tool.firstLowerCase($tableInfo.name)}Service.queryById(id));\n    }\n\n    @ApiOperation(\"删除\")\n    @DeleteMapping(\"/{id}\")\n    public Response remove(@PathVariable(\"id\") Long id) {\n        $!{tool.firstLowerCase($tableInfo.name)}Service.remove(id);\n        return SingleResponse.buildSuccess();\n    }\n\n    @ApiOperation(\"删除多个\")\n    @DeleteMapping(\"/ids\")\n        public Response removeBatch(@RequestParam Long[] ids) {\n        $!{tool.firstLowerCase($tableInfo.name)}Service.removeBatch(ids);\n        return SingleResponse.buildSuccess();\n    }\n\n    @ApiOperation(\"修改\")\n    @PutMapping(\"/edit\")\n    public SingleResponse edit(@Validated @RequestBody $!{tableInfo.name}UpdateCmd $!{tool.firstLowerCase($tableInfo.name)}UpdateCmd) {\n        $!{tool.firstLowerCase($tableInfo.name)}Service.edit($!{tool.firstLowerCase($tableInfo.name)}UpdateCmd);\n        return SingleResponse.buildSuccess();\n    }\n}\n"
      }, {
        "name" : "convertor.vm",
        "code" : "##定义初始变量\n#set($tableName = $tool.append($tableInfo.name, \"CoConvertor\"))\n##设置回调\n$!callback.setFileName($tool.append($tableName, \".java\"))\n$!callback.setSavePath($tool.append($tableInfo.savePath, \"/command/convertor\"))\n\n#if($tableInfo.savePackageName)package $!{tableInfo.savePackageName}.command.convertor#{end};\n\nimport $!{tableInfo.savePackageName}.dto.clientobject.$!{tableInfo.name}CO;\nimport $!{tableInfo.savePackageName}.persistence.dataobject.$!{tableInfo.name}DO;\nimport org.mapstruct.Mapper;\n\nimport java.util.List;\n\n\n\n/**\n* web-app\n* @Author $!author\n* @Date $!time.currTime()\n*/\n@Mapper(componentModel = \"spring\")\npublic interface $!{tableInfo.name}CoConvertor {\n    /**\n    * @param $!{tool.firstLowerCase($tableInfo.name)}DOs\n    * @return\n    */\n    List<$!{tableInfo.name}CO> converDOsToCOs(List<$!{tableInfo.name}DO> $!{tool.firstLowerCase($tableInfo.name)}DOs);\n    \n    $!{tableInfo.name}CO converDOToCO($!{tableInfo.name}DO $!{tool.firstLowerCase($tableInfo.name)}DO);\n}\n"
      }, {
        "name" : "e.vm",
        "code" : "##定义初始变量\n#set($tableName = $tool.append($tableInfo.name, \"E\"))\n##设置回调\n$!callback.setFileName($tool.append($tableName, \".java\"))\n$!callback.setSavePath($tool.append($tableInfo.savePath, \"/domain/model\"))\n\n#if($tableInfo.savePackageName)package $!{tableInfo.savePackageName}.domain.model#{end};\n\nimport com.alibaba.cola.domain.Entity;\nimport com.jjb.saas.framework.domain.model.BaseE;\nimport lombok.Data;\nimport lombok.EqualsAndHashCode;\n\n/**\n* web-domain\n* @Author $!author\n* @Date $!time.currTime()\n*/\n@Data\npublic class $!{tableName} extends BaseE {\n#foreach($column in $tableInfo.fullColumn)\n#if(${column.name} != \"id\" && ${column.name} != \"createTime\" && ${column.name} != \"updateTime\" && ${column.name} != \"createId\"\n&& ${column.name} != \"updateId\" && ${column.name} != \"env\" && ${column.name} != \"deleteEnum\"&& ${column.name} != \"remarks\" \n&& ${column.name} != \"createName\" && ${column.name} != \"updateName\" && ${column.name} != \"tenantId\" && ${column.name} != \"orgId\"\n&& ${column.name} != \"version\" && ${column.name} != ${uuid})\n    #if(${column.comment})\n    //${column.comment}\n    #end\n    private $!{tool.getClsNameByFullName($column.type)} $!{column.name};\n#end\n#end\n}\n"
      }, {
        "name" : "entity.java.vm",
        "code" : "##定义初始变量\n#set($tableName = $tool.append($tableInfo.name, \"DO\"))\n##设置回调\n$!callback.setFileName($tool.append($tableName, \".java\"))\n$!callback.setSavePath($tool.append($tableInfo.savePath, \"/persistence/dataobject\"))\n\n##拿到主键\n#if(!$tableInfo.pkColumn.isEmpty())\n    #set($pk = $tableInfo.pkColumn.get(0))\n#end\n\n#foreach($column in $tableInfo.fullColumn)\n    #if(${column.comment} == \"业务主键id\")\n        #set($uuid = $column.name)\n    #end\n#end\n\n##自动导入包（全局变量）\n#if($tableInfo.savePackageName)package $!{tableInfo.savePackageName}.persistence.dataobject#{end};\n\nimport com.baomidou.mybatisplus.annotation.TableName;\nimport com.jjb.saas.framework.repository.basedo.BaseDO;\nimport io.swagger.annotations.ApiModelProperty;\nimport lombok.Data;\nimport lombok.EqualsAndHashCode;\nimport lombok.NoArgsConstructor;\n\n/**\n* web-infrastructure\n* @Author $!author\n* @Date $!time.currTime()\n*/\n@Data\n@TableName(\"$!{tableInfo.obj.name}\")\n@NoArgsConstructor\n@EqualsAndHashCode(callSuper = true)\npublic class $!{tableName} extends BaseDO {\n#foreach($column in $tableInfo.fullColumn)\n#if(${column.name} != \"id\" && ${column.name} != \"createTime\" && ${column.name} != \"updateTime\" && ${column.name} != \"createId\"\n&& ${column.name} != \"updateId\" && ${column.name} != \"env\" && ${column.name} != \"deleteEnum\"&& ${column.name} != \"remarks\" \n&& ${column.name} != \"createName\" && ${column.name} != \"updateName\" && ${column.name} != \"tenantId\" && ${column.name} != \"orgId\"\n&& ${column.name} != \"version\")\n    #if(${column.comment})\n    //${column.comment}\n    @ApiModelProperty(value = \"${column.comment}\")\n    #end\n    #if(${column.name}==$!pk.name)\n    @TableId(type = IdType.ASSIGN_ID)\n    #end\n     #if($!{tool.getClsNameByFullName($column.type)} == \"JSONObject\")\n     private String $!{column.name};\n     \n     #else\n    private $!{tool.getClsNameByFullName($column.type)} $!{column.name};\n    #end\n#end\n#end\n\n  public $!{tableName}(String $!{uuid}) {\n        this.$!{uuid} = $!{uuid};\n    }\n\n}\n"
      }, {
        "name" : "gateway.vm",
        "code" : "##定义初始变量\n#set($tableName = $tool.append($tableInfo.name, \"Gateway\"))\n##设置回调\n$!callback.setFileName($tool.append($tableName, \".java\"))\n$!callback.setSavePath($tool.append($tableInfo.savePath, \"/domain/gateway\"))\n\n#if($tableInfo.savePackageName)package $!{tableInfo.savePackageName}.domain.gateway#{end};\n\nimport $!{tableInfo.savePackageName}.domain.model.$!{tableInfo.name}E;\n\n/**\n* web-domain\n* @Author $!author\n* @Date $!time.currTime()\n*/\npublic interface $!{tableInfo.name}Gateway {\n\n    /**\n    * 新增\n    */\n    Boolean add($!{tableInfo.name}E $!{tool.firstLowerCase($tableInfo.name)}E) ;\n\n    /**\n    * 修改\n    */\n    Boolean update($!{tableInfo.name}E $!{tool.firstLowerCase($tableInfo.name)}E);\n\n    /**\n    * 删除\n    */\n    Boolean deleted$!{tableInfo.name}ById(Long id);\n    Boolean deleted$!{tableInfo.name}ByIds(Long[] id);\n}\n"
      }, {
        "name" : "gatewayimpl.vm",
        "code" : "##定义初始变量\n#set($tableName = $tool.append($tableInfo.name, \"GatewayImpl\"))\n##设置回调\n$!callback.setFileName($tool.append($tableName, \".java\"))\n$!callback.setSavePath($tool.append($tableInfo.savePath, \"/gatewayimpl\"))\n\n#foreach($column in $tableInfo.fullColumn)\n    #if(${column.comment} == \"业务主键id\")\n        #set($uuid = $column.name)\n    #end\n#end\n\n#if($tableInfo.savePackageName)package $!{tableInfo.savePackageName}.gatewayimpl#{end};\n\nimport $!{tableInfo.savePackageName}.domain.gateway.$!{tableInfo.name}Gateway;\nimport $!{tableInfo.savePackageName}.domain.model.$!{tableInfo.name}E;\nimport $!{tableInfo.savePackageName}.persistence.dataobject.$!{tableInfo.name}DO;\nimport $!{tableInfo.savePackageName}.persistence.repository.$!{tableInfo.name}Repository;\nimport lombok.AllArgsConstructor;\nimport com.zcloud.gbscommon.utils.Tools;\nimport org.springframework.beans.BeanUtils;\nimport org.springframework.stereotype.Service;\n\nimport java.util.Arrays;\n\n/**\n* web-infrastructure\n* @Author $!author\n* @Date $!time.currTime()\n*/\n@Service\n@AllArgsConstructor\npublic class $!{tableInfo.name}GatewayImpl implements $!{tableInfo.name}Gateway {\n    private final $!{tableInfo.name}Repository $!{tool.firstLowerCase($tableInfo.name)}Repository;\n\n    @Override\n    public Boolean add($!{tableInfo.name}E $!{tool.firstLowerCase($tableInfo.name)}E) {\n        $!{tableInfo.name}DO d = new $!{tableInfo.name}DO(Tools.get32UUID());\n        BeanUtils.copyProperties($!{tool.firstLowerCase($tableInfo.name)}E, d,\"${uuid}\");\n        $!{tool.firstLowerCase($tableInfo.name)}Repository.save(d);\n        return true;\n    }\n\n    @Override\n    public Boolean update($!{tableInfo.name}E $!{tool.firstLowerCase($tableInfo.name)}E) {\n        $!{tableInfo.name}DO d = new $!{tableInfo.name}DO();\n        BeanUtils.copyProperties($!{tool.firstLowerCase($tableInfo.name)}E, d);\n        $!{tool.firstLowerCase($tableInfo.name)}Repository.updateById(d);\n        return true;\n    }\n\n    @Override\n    public Boolean deleted$!{tableInfo.name}ById(Long id) {\n        return $!{tool.firstLowerCase($tableInfo.name)}Repository.removeById(id);\n    }\n\n    @Override\n    public Boolean deleted$!{tableInfo.name}ByIds(Long[] ids) {\n        return $!{tool.firstLowerCase($tableInfo.name)}Repository.removeByIds(Arrays.asList(ids));\n    }\n}\n"
      }, {
        "name" : "mapper.vm",
        "code" : "##定义初始变量\n#set($tableName = $tool.append($tableInfo.name, \"Mapper\"))\n##设置回调\n$!callback.setFileName($tool.append($tableName, \".java\"))\n$!callback.setSavePath($tool.append($tableInfo.savePath, \"/persistence/mapper\"))\n\n#if($tableInfo.savePackageName)package $!{tableInfo.savePackageName}.persistence.mapper#{end};\n\nimport $!{tableInfo.savePackageName}.persistence.dataobject.$!{tableInfo.name}DO;\nimport com.baomidou.mybatisplus.core.mapper.BaseMapper;\nimport org.apache.ibatis.annotations.Mapper;\n\n/**\n* web-infrastructure\n* @Author $!author\n* @Date $!time.currTime()\n*/\n@Mapper\npublic interface $!{tableName} extends BaseMapper<$!{tableInfo.name}DO> {\n\n    }\n"
      }, {
        "name" : "mapper.xml.vm",
        "code" : "##定义初始变量\n#set($tableName = $tool.append($tableInfo.name, \"Mapper\"))\n##设置回调\n$!callback.setFileName($tool.append($tableName, \".xml\"))\n$!callback.setSavePath($tool.append($tableInfo.savePath, \"/persistence/dataobject\"))\n\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE mapper PUBLIC \"-//mybatis.org//DTD Mapper 3.0//EN\"\n        \"http://mybatis.org/dtd/mybatis-3-mapper.dtd\">\n\n<mapper namespace=\"$!{tableInfo.savePackageName}.persistence.mapper.$!{tableInfo.name}Mapper\">\n\n</mapper>\n"
      }, {
        "name" : "pageQry.vm",
        "code" : "##定义初始变量\n#set($tableName = $tool.append($tableInfo.name, \"PageQry\"))\n##设置回调\n$!callback.setFileName($tool.append($tableName, \".java\"))\n$!callback.setSavePath($tool.append($tableInfo.savePath, \"/dto\"))\n\n#set($firstColumn = $tableInfo.fullColumn.get(1))\n\n#if($tableInfo.savePackageName)package $!{tableInfo.savePackageName}.dto#{end};\n\nimport com.alibaba.cola.dto.PageQuery;\nimport io.swagger.annotations.ApiModelProperty;\nimport lombok.Data;\n\n\n\n/**\n* web-client\n* @Author $!author\n* @Date $!time.currTime()\n*/\n@Data\npublic class $!{tableInfo.name}PageQry extends PageQuery {\n\n/**\n* 查询条件操作前缀,支持以下几种数据库查询操作：\n* - `like`: 模糊匹配查询，对应SQL的LIKE操作符\n* - `eq`: 等值查询，对应SQL的=操作符\n* - `gt`: 大于比较查询\n* - `lt`: 小于比较查询\n* - `ge`: 大于等于比较查询\n* - `le`: 小于等于比较查询\n* - `ne`: 不等比较查询，对应SQL的!=操作符\n*/\n    private $!{tool.getClsNameByFullName($firstColumn.type)} like$!{tool.firstUpperCase($firstColumn.name)};\n}\n"
      }, {
        "name" : "queryExe.vm",
        "code" : "##定义初始变量\n#set($tableName = $tool.append($tableInfo.name, \"QueryExe\"))\n##设置回调\n$!callback.setFileName($tool.append($tableName, \".java\"))\n$!callback.setSavePath($tool.append($tableInfo.savePath, \"/command/query\"))\n\n#if($tableInfo.savePackageName)package $!{tableInfo.savePackageName}.command.query#{end};\n\nimport $!{tableInfo.savePackageName}.command.convertor.$!{tableInfo.name}CoConvertor;\nimport $!{tableInfo.savePackageName}.dto.$!{tableInfo.name}PageQry;\nimport $!{tableInfo.savePackageName}.dto.clientobject.$!{tableInfo.name}CO;\nimport $!{tableInfo.savePackageName}.persistence.dataobject.$!{tableInfo.name}DO;\nimport $!{tableInfo.savePackageName}.persistence.repository.$!{tableInfo.name}Repository;\nimport com.zcloud.gbscommon.utils.PageQueryHelper;\nimport com.alibaba.cola.dto.PageResponse;\nimport lombok.AllArgsConstructor;\nimport org.springframework.stereotype.Component;\n\nimport java.util.List;\nimport java.util.Map;\n\n\n\n/**\n* web-app\n* @Author $!author\n* @Date $!time.currTime()\n*/\n@Component\n@AllArgsConstructor\npublic class $!{tableInfo.name}QueryExe {\n    private final $!{tableInfo.name}Repository $!{tool.firstLowerCase($tableInfo.name)}Repository;\n    private final $!{tableInfo.name}CoConvertor $!{tool.firstLowerCase($tableInfo.name)}CoConvertor;\n\n    /**\n     * 根据id查询\n     * @param id\n     * @return\n     */\n    public $!{tableInfo.name}CO queryById(Long id) {\n        return $!{tool.firstLowerCase($tableInfo.name)}CoConvertor.converDOToCO($!{tool.firstLowerCase($tableInfo.name)}Repository.getById(id));\n    }\n    /**\n    * 分页\n    *\n    * @param $!{tool.firstLowerCase($tableInfo.name)}PageQry\n    * @return\n    */\n    public PageResponse<$!{tableInfo.name}CO> execute($!{tableInfo.name}PageQry $!{tool.firstLowerCase($tableInfo.name)}PageQry) {\n        Map<String,Object> params = PageQueryHelper.toHashMap($!{tool.firstLowerCase($tableInfo.name)}PageQry);\n        PageResponse<$!{tableInfo.name}DO> pageResponse = $!{tool.firstLowerCase($tableInfo.name)}Repository.listPage(params);\n            List<$!{tableInfo.name}CO> examCenterCOS = $!{tool.firstLowerCase($tableInfo.name)}CoConvertor.converDOsToCOs(pageResponse.getData());\n                return PageResponse.of(examCenterCOS, pageResponse.getTotalCount(), pageResponse.getPageSize(), pageResponse.getPageIndex());\n    }\n}\n"
      }, {
        "name" : "removeExe.vm",
        "code" : "##定义初始变量\n#set($tableName = $tool.append($tableInfo.name, \"RemoveExe\"))\n##设置回调\n$!callback.setFileName($tool.append($tableName, \".java\"))\n$!callback.setSavePath($tool.append($tableInfo.savePath, \"/command\"))\n\n#if($tableInfo.savePackageName)package $!{tableInfo.savePackageName}.command#{end};\n\nimport $!{tableInfo.savePackageName}.domain.gateway.$!{tableInfo.name}Gateway;\nimport com.alibaba.cola.exception.BizException;\nimport lombok.AllArgsConstructor;\nimport org.springframework.stereotype.Component;\nimport org.springframework.transaction.annotation.Transactional;\n\n\n\n\n/**\n* web-app\n* @Author $!author\n* @Date $!time.currTime()\n*/\n@Component\n@AllArgsConstructor\npublic class $!{tableInfo.name}RemoveExe {\n    private final $!{tableInfo.name}Gateway $!{tool.firstLowerCase($tableInfo.name)}Gateway;\n\n    @Transactional(rollbackFor = Exception.class)\n    public boolean execute(Long id) {\n        boolean res = $!{tool.firstLowerCase($tableInfo.name)}Gateway.deleted$!{tableInfo.name}ById(id);\n        if(!res){\n            throw new BizException(\"删除失败\");\n        }\n        return true;\n    }\n\n    @Transactional(rollbackFor = Exception.class)\n    public boolean execute(Long[] ids) {\n        boolean res = $!{tool.firstLowerCase($tableInfo.name)}Gateway.deleted$!{tableInfo.name}ByIds(ids);\n        if(!res){\n            throw new BizException(\"删除失败\");\n        }\n        return true;\n    }\n}\n"
      }, {
        "name" : "repository.vm",
        "code" : "##定义初始变量\n#set($tableName = $tool.append($tableInfo.name, \"Repository\"))\n##设置回调\n$!callback.setFileName($tool.append($tableName, \".java\"))\n$!callback.setSavePath($tool.append($tableInfo.savePath, \"/persistence/repository\"))\n\n#if($tableInfo.savePackageName)package $!{tableInfo.savePackageName}.persistence.repository#{end};\n\nimport $!{tableInfo.savePackageName}.persistence.dataobject.$!{tableInfo.name}DO;\nimport com.alibaba.cola.dto.PageResponse;\nimport com.baomidou.mybatisplus.core.metadata.IPage;\nimport com.jjb.saas.framework.repository.repo.BaseRepository;\nimport java.util.Map;\n\n/**\n* web-infrastructure\n* @Author $!author\n* @Date $!time.currTime()\n*/\npublic interface $!{tableInfo.name}Repository extends BaseRepository<$!{tableInfo.name}DO> {\n    PageResponse<$!{tableInfo.name}DO> listPage(Map<String,Object> params);\n}\n"
      }, {
        "name" : "repositoryImpl.vm",
        "code" : "##定义初始变量\n#set($tableName = $tool.append($tableInfo.name, \"RepositoryImpl\"))\n##设置回调\n$!callback.setFileName($tool.append($tableName, \".java\"))\n$!callback.setSavePath($tool.append($tableInfo.savePath, \"/persistence/repository/impl\"))\n\n#if($tableInfo.savePackageName)package $!{tableInfo.savePackageName}.persistence.repository.impl#{end};\n\nimport $!{tableInfo.savePackageName}.persistence.dataobject.$!{tableInfo.name}DO;\nimport $!{tableInfo.savePackageName}.persistence.mapper.$!{tableInfo.name}Mapper;\nimport $!{tableInfo.savePackageName}.persistence.repository.$!{tableInfo.name}Repository;\nimport com.alibaba.cola.dto.PageResponse;\nimport com.jjb.saas.framework.repository.common.PageHelper;\nimport com.zcloud.gbscommon.utils.PageQueryHelper;\nimport com.zcloud.gbscommon.utils.Query;\nimport com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;\nimport com.baomidou.mybatisplus.core.metadata.IPage;\nimport com.jjb.saas.framework.repository.repo.impl.BaseRepositoryImpl;\nimport lombok.RequiredArgsConstructor;\nimport org.springframework.stereotype.Service;\nimport java.util.Map;\n\n/**\n* web-infrastructure\n* @Author $!author\n* @Date $!time.currTime()\n*/\n@Service\n@RequiredArgsConstructor\npublic class $!{tableInfo.name}RepositoryImpl extends BaseRepositoryImpl<$!{tableInfo.name}Mapper, $!{tableInfo.name}DO> implements $!{tableInfo.name}Repository {\n    private final $!{tableInfo.name}Mapper $!{tool.firstLowerCase($tableInfo.name)}Mapper;\n\n    @Override\n    public  PageResponse<$!{tableInfo.name}DO> listPage(Map<String,Object> params) {\n    IPage<$!{tableInfo.name}DO> iPage = new Query<$!{tableInfo.name}DO>().getPage(params);\n        QueryWrapper<$!{tableInfo.name}DO> queryWrapper = new QueryWrapper<>();\n        queryWrapper = PageQueryHelper.createPageQueryWrapper(queryWrapper, params);\n        queryWrapper.orderByDesc(\"create_time\");\n        IPage<$!{tableInfo.name}DO> result = $!{tool.firstLowerCase($tableInfo.name)}Mapper.selectPage(iPage, queryWrapper);\n        return PageHelper.pageToResponse(result, result.getRecords());\n    }\n}\n"
      }, {
        "name" : "serviceI.vm",
        "code" : "##定义初始变量\n#set($tableName = $tool.append($tableInfo.name, \"ServiceI\"))\n##设置回调\n$!callback.setFileName($tool.append($tableName, \".java\"))\n$!callback.setSavePath($tool.append($tableInfo.savePath, \"/api\"))\n\n#if($tableInfo.savePackageName)package $!{tableInfo.savePackageName}.api#{end};\n\nimport $!{tableInfo.savePackageName}.dto.$!{tableInfo.name}AddCmd;\nimport $!{tableInfo.savePackageName}.dto.$!{tableInfo.name}PageQry;\nimport $!{tableInfo.savePackageName}.dto.$!{tableInfo.name}UpdateCmd;\nimport $!{tableInfo.savePackageName}.dto.clientobject.$!{tableInfo.name}CO;\n\nimport com.alibaba.cola.dto.PageResponse;\nimport com.alibaba.cola.dto.SingleResponse;\n\n/**\n* web-client\n* @Author $!author\n* @Date $!time.currTime()\n*/\npublic interface $!{tableInfo.name}ServiceI {\n    $!{tableInfo.name}CO  queryById(Long id);\n    \n    PageResponse<$!{tableInfo.name}CO> listPage($!{tableInfo.name}PageQry qry);\n\n    SingleResponse<$!{tableInfo.name}CO> add($!{tableInfo.name}AddCmd cmd);\n\n    void edit($!{tableInfo.name}UpdateCmd cmd);\n\n    void remove(Long id);\n\n    void removeBatch(Long[] ids);\n}\n"
      }, {
        "name" : "serviceImpl.vm",
        "code" : "##定义初始变量\n#set($tableName = $tool.append($tableInfo.name, \"ServiceImpl\"))\n##设置回调\n$!callback.setFileName($tool.append($tableName, \".java\"))\n$!callback.setSavePath($tool.append($tableInfo.savePath, \"/service\"))\n\n#if($tableInfo.savePackageName)package $!{tableInfo.savePackageName}.service#{end};\n\nimport $!{tableInfo.savePackageName}.api.$!{tableInfo.name}ServiceI;\nimport $!{tableInfo.savePackageName}.command.$!{tableInfo.name}AddExe;\nimport $!{tableInfo.savePackageName}.command.$!{tableInfo.name}RemoveExe;\nimport $!{tableInfo.savePackageName}.command.$!{tableInfo.name}UpdateExe;\nimport $!{tableInfo.savePackageName}.command.query.$!{tableInfo.name}QueryExe;\nimport $!{tableInfo.savePackageName}.dto.$!{tableInfo.name}AddCmd;\nimport $!{tableInfo.savePackageName}.dto.$!{tableInfo.name}PageQry;\nimport $!{tableInfo.savePackageName}.dto.$!{tableInfo.name}UpdateCmd;\nimport $!{tableInfo.savePackageName}.dto.clientobject.$!{tableInfo.name}CO;\n\nimport com.alibaba.cola.dto.PageResponse;\nimport com.alibaba.cola.dto.SingleResponse;\nimport lombok.AllArgsConstructor;\nimport org.springframework.stereotype.Service;\n\n/**\n* web-app\n* @Author $!author\n* @Date $!time.currTime()\n*/\n@Service\n@AllArgsConstructor\npublic class $!{tableInfo.name}ServiceImpl implements $!{tableInfo.name}ServiceI {\n    private final $!{tableInfo.name}AddExe $!{tool.firstLowerCase($tableInfo.name)}AddExe;\n    private final $!{tableInfo.name}UpdateExe $!{tool.firstLowerCase($tableInfo.name)}UpdateExe;\n    private final $!{tableInfo.name}RemoveExe $!{tool.firstLowerCase($tableInfo.name)}RemoveExe;\n    private final $!{tableInfo.name}QueryExe $!{tool.firstLowerCase($tableInfo.name)}QueryExe;\n\n    @Override\n    public $!{tableInfo.name}CO  queryById(Long id){\n        return $!{tool.firstLowerCase($tableInfo.name)}QueryExe.queryById(id);\n    }\n    \n    @Override\n    public PageResponse<$!{tableInfo.name}CO> listPage($!{tableInfo.name}PageQry qry){\n\n        return $!{tool.firstLowerCase($tableInfo.name)}QueryExe.execute(qry);\n    }\n\n    @Override\n    public SingleResponse add($!{tableInfo.name}AddCmd cmd) {\n\n        $!{tool.firstLowerCase($tableInfo.name)}AddExe.execute(cmd);\n        return SingleResponse.buildSuccess();\n    }\n\n    @Override\n    public void edit($!{tableInfo.name}UpdateCmd $!{tool.firstLowerCase($tableInfo.name)}UpdateCmd) {\n        $!{tool.firstLowerCase($tableInfo.name)}UpdateExe.execute($!{tool.firstLowerCase($tableInfo.name)}UpdateCmd);\n    }\n\n    @Override\n    public void remove(Long id) {\n        $!{tool.firstLowerCase($tableInfo.name)}RemoveExe.execute(id);\n    }\n\n    @Override\n    public void removeBatch(Long[] ids) {\n        $!{tool.firstLowerCase($tableInfo.name)}RemoveExe.execute(ids);\n    }\n}\n"
      }, {
        "name" : "updateCmd.vm",
        "code" : "##定义初始变量\n#set($tableName = $tool.append($tableInfo.name, \"UpdateCmd\"))\n##设置回调\n$!callback.setFileName($tool.append($tableName, \".java\"))\n$!callback.setSavePath($tool.append($tableInfo.savePath, \"/dto\"))\n\n#if($tableInfo.savePackageName)package $!{tableInfo.savePackageName}.dto#{end};\n\nimport com.alibaba.cola.dto.Command;\nimport io.swagger.annotations.ApiModelProperty;\nimport lombok.AllArgsConstructor;\nimport lombok.Data;\nimport lombok.EqualsAndHashCode;\nimport lombok.NoArgsConstructor;\nimport javax.validation.constraints.*;\n\n/**\n* web-client\n* @Author $!author\n* @Date $!time.currTime()\n*/\n@EqualsAndHashCode(callSuper = true)\n@Data\n@NoArgsConstructor\n@AllArgsConstructor\npublic class $!{tableInfo.name}UpdateCmd extends Command {\n#foreach($column in $tableInfo.fullColumn)\n#if(${column.name} != \"createTime\" && ${column.name} != \"updateTime\" && ${column.name} != \"createId\"\n&& ${column.name} != \"updateId\" && ${column.name} != \"env\" && ${column.name} != \"deleteEnum\"&& ${column.name} != \"remarks\" \n&& ${column.name} != \"createName\" && ${column.name} != \"updateName\" && ${column.name} != \"tenantId\" && ${column.name} != \"orgId\"\n&& ${column.name} != \"version\")\n    @ApiModelProperty(value = \"${column.comment}\", name = \"$!{column.name}\", required = true)\n    #if($!{tool.getClsNameByFullName($column.type)} == \"Integer\" || $!{tool.getClsNameByFullName($column.type)} == \"Long\"\n    || $!{tool.getClsNameByFullName($column.type)} == \"Date\" || $!{tool.getClsNameByFullName($column.type)} == \"BigDecimal\"\n    || $!{tool.getClsNameByFullName($column.type)} == \"Float\" || $!{tool.getClsNameByFullName($column.type)} == \"Double\")\n    @NotNull(message = \"${column.comment}不能为空\")\n    #else\n    @NotEmpty(message = \"${column.comment}不能为空\")\n    #end\n    #if($!{tool.getClsNameByFullName($column.type)} == \"Date\")\n     @JsonFormat(pattern = \"yyyy-MM-dd\")\n    #end\n     #if($!{tool.getClsNameByFullName($column.type)} == \"LocalDateTime\")\n     @JsonFormat(pattern = \"yyyy-MM-dd HH:mm:ss\")\n    #end\n    private $!{tool.getClsNameByFullName($column.type)} $!{column.name};\n#end\n#end\n}\n"
      }, {
        "name" : "updateExe.vm",
        "code" : "##定义初始变量\n#set($tableName = $tool.append($tableInfo.name, \"UpdateExe\"))\n##设置回调\n$!callback.setFileName($tool.append($tableName, \".java\"))\n$!callback.setSavePath($tool.append($tableInfo.savePath, \"/command\"))\n\n#if($tableInfo.savePackageName)package $!{tableInfo.savePackageName}.command#{end};\n\nimport com.alibaba.cola.exception.BizException;\nimport $!{tableInfo.savePackageName}.domain.gateway.$!{tableInfo.name}Gateway;\nimport $!{tableInfo.savePackageName}.domain.model.$!{tableInfo.name}E;\nimport $!{tableInfo.savePackageName}.dto.$!{tableInfo.name}UpdateCmd;\nimport lombok.AllArgsConstructor;\nimport org.springframework.beans.BeanUtils;\nimport org.springframework.stereotype.Component;\nimport org.springframework.transaction.annotation.Transactional;\n\n\n\n\n/**\n* web-app\n* @Author $!author\n* @Date $!time.currTime()\n*/\n@Component\n@AllArgsConstructor\npublic class $!{tableInfo.name}UpdateExe {\n    private final $!{tableInfo.name}Gateway $!{tool.firstLowerCase($tableInfo.name)}Gateway;\n\n    @Transactional(rollbackFor = Exception.class)\n    public void execute($!{tableInfo.name}UpdateCmd $!{tool.firstLowerCase($tableInfo.name)}UpdateCmd) {\n        $!{tableInfo.name}E $!{tool.firstLowerCase($tableInfo.name)}E = new $!{tableInfo.name}E();\n        BeanUtils.copyProperties($!{tool.firstLowerCase($tableInfo.name)}UpdateCmd, $!{tool.firstLowerCase($tableInfo.name)}E);\n        boolean res = $!{tool.firstLowerCase($tableInfo.name)}Gateway.update($!{tool.firstLowerCase($tableInfo.name)}E);\n        if (!res) {\n            throw new BizException(\"修改失败\");\n        }\n    }\n}\n"
      }, {
        "name" : "index.vue.vm",
        "code" : "$!callback.setFileName(\"index.js\")\n$!callback.setSavePath($tool.append($tableInfo.savePath, \"/Container/\",$tableInfo.name))\n\n##拿到主键\n#if(!$tableInfo.pkColumn.isEmpty())\n    #set($pk = $tableInfo.pkColumn.get(0))\n#end\n\n#foreach($column in $tableInfo.fullColumn)\n    #if(${column.comment} == \"业务主键id\")\n        #set($uuid = $column.name)\n    #end\n#end\n\n\nimport { Connect } from \"@cqsjjb/jjb-dva-runtime\";\nimport { Button, Form, message, Modal, Space ,Descriptions} from \"antd\";\nimport { useEffect, useState } from \"react\";\nimport FormBuilder from \"zy-react-library/components/FormBuilder\";\nimport Search from \"zy-react-library/components/Search\";\nimport Table from \"zy-react-library/components/Table\";\nimport { FORM_ITEM_RENDER_ENUM } from \"zy-react-library/enum/formItemRender\";\nimport useTable from \"zy-react-library/hooks/useTable\";\nimport { NS_$!{tableInfo.name} } from \"~/enumerate/namespace\";\nimport AddIcon from \"zy-react-library/components/Icon/AddIcon\";\nimport DeleteIcon from \"zy-react-library/components/Icon/DeleteIcon\";\n\nfunction $!{tableInfo.name}(props) {\n    const [addModalVisible, setAddModalVisible] = useState(false);\n    const [infoModalVisible, setInfoModalVisible] = useState(false);\n    const [currentId, setCurrentId] = useState(\"\");\n    const [selectedRowKeys, setSelectedRowKeys] = useState([]);\n    const [form] = Form.useForm();\n    const { tableProps, getData } = useTable(props[\"$!{tool.firstLowerCase($tableInfo.name)}List\"], {\n        form,\n    });\n    return (\n    <div style={{ padding: 10 }}>\n      <Search\n        form={form}\n        onFinish={getData}\n        options={[\n    #foreach($column in $tableInfo.fullColumn)\n        #if(${column.name} != \"id\" && ${column.name} != \"createTime\" && ${column.name} != \"updateTime\" && ${column.name} != \"createId\"\n&& ${column.name} != \"updateId\" && ${column.name} != \"env\" && ${column.name} != \"deleteEnum\"&& ${column.name} != \"remarks\" \n&& ${column.name} != \"createName\" && ${column.name} != \"updateName\" && ${column.name} != \"tenantId\" && ${column.name} != \"orgId\"\n&& ${column.name} != \"version\" && ${column.name} != ${uuid})\n          { name: \"${column.name}\", label: \"${column.comment}\" },\n        #end\n    #end\n      ]}\n      />\n      <Table\n          rowSelection={{\n          selectedRowKeys,\n          onChange: selectedRowKeys => setSelectedRowKeys(selectedRowKeys),\n        }}\n        toolBarRender={() => (\n        <Space>\n          <Button type=\"primary\" icon={<AddIcon />} onClick={() => setAddModalVisible(true)}>新增</Button>\n          <Button\n               icon={<DeleteIcon />}\n              type=\"primary\"\n              danger\n              onClick={() => {\n                  if (!selectedRowKeys.length)\n                  return message.warning(\"请选择要删除的行\");\n                  Modal.confirm({\n                  title: \"确定删除吗？\",\n                  onOk: async () => {\n                  await props[\"$!{tool.firstLowerCase($tableInfo.name)}BatchDelete\"]({ ids: selectedRowKeys });\n                  message.success(\"删除成功\");\n                  getData();\n                },\n          });\n          }}\n          >\n          批量删除\n          </Button>\n        </Space>\n        )}\n        columns={[\n          #foreach($column in $tableInfo.fullColumn)\n             #if(${column.name} != \"id\" && ${column.name} != \"createTime\" && ${column.name} != \"updateTime\" && ${column.name} != \"createId\"\n&& ${column.name} != \"updateId\" && ${column.name} != \"env\" && ${column.name} != \"deleteEnum\"&& ${column.name} != \"remarks\" \n&& ${column.name} != \"createName\" && ${column.name} != \"updateName\" && ${column.name} != \"tenantId\" && ${column.name} != \"orgId\"\n&& ${column.name} != \"version\" && ${column.name} != ${uuid})\n                { dataIndex: \"${column.name}\", title: \"${column.comment}\" },\n              #end\n          #end\n        {\n        title: \"操作\",\n        align: \"center\",\n        width: 200,\n        render: (_, record) => (\n        <Space>\n          <Button\n              type=\"link\"\n              onClick={() => {\n          setCurrentId(record.id);\n          setInfoModalVisible(true);\n          }}\n          >\n          查看\n          </Button>\n          <Button\n              type=\"link\"\n              onClick={() => {\n          setCurrentId(record.id);\n          setAddModalVisible(true);\n          }}\n          >\n          编辑\n          </Button>\n          <Button\n              type=\"link\"\n              danger\n              onClick={() => {\n          Modal.confirm({\n          title: \"确定删除吗？\",\n          onOk: async () => {\n          await props[\"$!{tool.firstLowerCase($tableInfo.name)}Delete\"]({ id: record.id });\n          message.success(\"删除成功\");\n          getData();\n          },\n          });\n          }}\n          >\n          删除\n          </Button>\n        </Space>\n        ),\n        },\n        ]}\n        {...tableProps}\n        />\n        <AddModal\n            visible={addModalVisible}\n            currentId={currentId}\n            onCancel={() => {\n        setAddModalVisible(false);\n        setCurrentId(\"\");\n        }}\n        getData={getData}\n        />\n\n        <InfoModal\n            visible={infoModalVisible}\n            currentId={currentId}\n            onCancel={() => {\n        setInfoModalVisible(false);\n        setCurrentId(\"\");\n        }}\n        getData={getData}\n        />\n    </div>\n    );\n}\n\nfunction AddModalComponent(props) {\nconst [form] = Form.useForm();\nuseEffect(() => {\nif (props.currentId) {\nprops[\"$!{tool.firstLowerCase($tableInfo.name)}Info\"]({ id: props.currentId }).then((res) => {\nform.setFieldsValue(res.data);\n});\n}\n}, [props.currentId]);\nconst onCancel = () => {\nform.resetFields();\nprops.onCancel();\n};\nconst submit = async (values) => {\nawait props[!props.currentId ? \"$!{tool.firstLowerCase($tableInfo.name)}Add\" : \"$!{tool.firstLowerCase($tableInfo.name)}Edit\"]({ ...values, id: props.currentId });\nonCancel();\nprops.getData();\n};\nreturn (\n<Modal\n    open={props.visible}\n    onCancel={onCancel}\n    onOk={form.submit}\n    title=\"新增\"\n    loading={props.$!{tool.firstLowerCase($tableInfo.name)}.loading}\n>\n  <FormBuilder\n      form={form}\n      span={24}\n      onFinish={submit}\n      showActionButtons={false}\n      options={[\n      #foreach($column in $tableInfo.fullColumn)\n          #if(${column.name} != \"id\" && ${column.name} != \"createTime\" && ${column.name} != \"updateTime\" && ${column.name} != \"createId\"\n&& ${column.name} != \"updateId\" && ${column.name} != \"env\" && ${column.name} != \"deleteEnum\"&& ${column.name} != \"remarks\" \n&& ${column.name} != \"createName\" && ${column.name} != \"updateName\" && ${column.name} != \"tenantId\" && ${column.name} != \"orgId\"\n&& ${column.name} != \"version\" && ${column.name} != ${uuid})\n      { name: \"${column.name}\", label: \"${column.comment}\" },\n          #end\n      #end\n  ]}\n  />\n</Modal>\n);\n}\n\nfunction InfoModalComponent(props){\nconst [info,setInfo] = useState({});\nuseEffect(() => {\nif (props.currentId) {\nprops[\"$!{tool.firstLowerCase($tableInfo.name)}Info\"]({ id: props.currentId }).then((res) => {\nsetInfo(res.data);\n});\n}\n}, [props.currentId]);\n\nreturn (\n<Modal\n    open={props.visible}\n    footer={<Button onClick={props.onCancel}>关闭</Button>}\n  title=\"查看\"\n  loading={props.$!{tool.firstLowerCase($tableInfo.name)}.loading}\n  >\n  <Descriptions\n      labelStyle={{ width: 200 }}\n      column={1}\n      bordered\n      items={[\n    #foreach($column in $tableInfo.fullColumn)\n        #if(${column.name} != \"id\" && ${column.name} != \"createTime\" && ${column.name} != \"updateTime\" && ${column.name} != \"createId\"\n&& ${column.name} != \"updateId\" && ${column.name} != \"env\" && ${column.name} != \"deleteEnum\"&& ${column.name} != \"remarks\" \n&& ${column.name} != \"createName\" && ${column.name} != \"updateName\" && ${column.name} != \"tenantId\" && ${column.name} != \"orgId\"\n&& ${column.name} != \"version\" && ${column.name} != ${uuid})\n      { children: info.${column.name}, label: \"${column.comment}\" },\n        #end\n    #end\n  ]}\n  />\n</Modal>\n);\n}\nconst AddModal = Connect([NS_$!{tableInfo.name}], true)(AddModalComponent);\nconst InfoModal = Connect([NS_$!{tableInfo.name}], true)(InfoModalComponent);\nexport default Connect([NS_$!{tableInfo.name}], true)($!{tableInfo.name});\n"
      }, {
        "name" : "index.js.vm",
        "code" : "$!callback.setFileName(\"index.js\")\n$!callback.setSavePath($tool.append($tableInfo.savePath, \"/api/\",$tableInfo.name))\n\nimport { declareRequest } from '@cqsjjb/jjb-dva-runtime';\n\nexport const $!{tool.firstLowerCase($tableInfo.name)}List = declareRequest(\n    '$!{tool.firstLowerCase($tableInfo.name)}Loading',\n    'Post > @/risk/$!{tool.firstLowerCase($tableInfo.name)}/page',\n);\nexport const $!{tool.firstLowerCase($tableInfo.name)}Add = declareRequest(\n    '$!{tool.firstLowerCase($tableInfo.name)}Loading',\n    'Post > @/risk/$!{tool.firstLowerCase($tableInfo.name)}/save'\n);\nexport const $!{tool.firstLowerCase($tableInfo.name)}Edit = declareRequest(\n    '$!{tool.firstLowerCase($tableInfo.name)}Loading',\n    'Put > @/risk/$!{tool.firstLowerCase($tableInfo.name)}/edit'\n);\nexport const $!{tool.firstLowerCase($tableInfo.name)}Delete = declareRequest(\n    '$!{tool.firstLowerCase($tableInfo.name)}Loading',\n    'Delete > @/risk/$!{tool.firstLowerCase($tableInfo.name)}/{id}'\n);\nexport const $!{tool.firstLowerCase($tableInfo.name)}BatchDelete = declareRequest(\n    '$!{tool.firstLowerCase($tableInfo.name)}Loading',\n    'Delete > @/risk/$!{tool.firstLowerCase($tableInfo.name)}/ids/{ids}'\n);\nexport const $!{tool.firstLowerCase($tableInfo.name)}Info = declareRequest('$!{tool.firstLowerCase($tableInfo.name)}Loading', 'Get > /risk/$!{tool.firstLowerCase($tableInfo.name)}/{id}');\n"
      } ]
    }
  },
  "columnConfig" : { },
  "globalConfig" : { }
}