# template_config_o

name: entity
file_name: ${context.javaBeanName}.java
content:
  package ${context.packageName}.entity;

  #if(${table.hasDateField})
  import java.util.Date;
  #end
  #if(${table.hasLocalDateField})
  import java.time.LocalDate;
  #end
  #if(${table.hasLocalDateTimeField})
  import java.time.LocalDateTime;
  #end
  #if(${table.hasBigDecimalField})
  import java.math.BigDecimal;
  #end

  #if( "${table.comment}" != "" )
  /**
   * ${table.comment}
   */
  #end
  public class ${context.javaBeanName} {
  #foreach($column in $columns)
  #if( "${column.comment}" != "" )
  	/** ${column.comment} */
  #end
  	private ${column.javaTypeBox} ${column.javaFieldName};
  #end

  #foreach(${column} in ${columns})
  	public void set${column.javaFieldNameUF}(${column.javaTypeBox} ${column.javaFieldName}) {
  		this.${column.javaFieldName} = ${column.javaFieldName};
  	}
  	
  	public ${column.javaTypeBox} get${column.javaFieldNameUF}() {
  		return this.${column.javaFieldName};
  	}
  	
  #end

  	@Override
      public boolean equals(Object o) {
          if (this == o) { return true; }
          if (o == null || getClass() != o.getClass()) {return false;}
          ${context.javaBeanName} that = (${context.javaBeanName}) o;
          return ${pk.javaFieldName}.equals(that.${pk.javaFieldName});
      }

      @Override
      public int hashCode() {
          return java.util.Objects.hash(${pk.javaFieldName});
      }
      
      @Override
      public String toString() {
          return "${context.javaBeanName}{" +
  #foreach(${column} in ${columns})
  		#if($velocityCount == 1)
  		"${column.javaFieldName}=" + ${column.javaFieldName} +
  		#else
  		",${column.javaFieldName}='" + ${column.javaFieldName} + "'" + 
  		#end
  #end
                  '}';
      }
  	
  }


name: mybatis
file_name: ${context.javaBeanName}Mapper.xml
content:
  #set($jq="$")
  <?xml version="1.0" encoding="UTF-8" ?>
  <!DOCTYPE  mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
  <mapper namespace="${context.packageName}.mapper.${context.javaBeanName}Mapper">
  	<resultMap id="BaseResultMap" type="${context.packageName}.entity.${context.javaBeanName}">
      #foreach($column in $columns)    
          <result column="${column.columnName}" property="${column.javaFieldName}" />
  	#end
  	</resultMap>  
      
      <!-- 表字段 -->
      <sql id="baseColumns">
      #foreach($column in $columns)
      #if($velocityCount > 1),#end t.${column.columnName}
      #end
      </sql> 
      
      <!-- 查询全部 -->
      <select id="listAll" resultMap="BaseResultMap">
  		SELECT         
          	<include refid="baseColumns" />
  		FROM ${table.tableName} t
  	</select>
   
   	<!-- 根据主键获取单条记录 -->
      <select id="getById" resultMap="BaseResultMap" parameterType="${pk.javaTypeBox}">
  		SELECT         
          	<include refid="baseColumns" />
  		FROM ${table.tableName} t
  		WHERE ${pk.columnName} = #{${pk.javaFieldName}}
  	</select>

  	<!-- 插入全部字段 -->
      <insert id="insert" parameterType="${context.packageName}.entity.${context.javaBeanName}"
  		keyProperty="${context.javaPkName}" keyColumn="${context.pkName}" useGeneratedKeys="true"
      >
  	INSERT INTO ${table.tableName}
      <trim prefix="(" suffix=")" suffixOverrides=",">	 
      #foreach($column in $columns) 
      	#if(!${column.isIdentityPk}) 
      	${column.columnName},
      	#end          
      #end
      </trim>
      <trim prefix="VALUES (" suffix=")" suffixOverrides=",">            
      #foreach($column in $columns) 
      	#if(!${column.isIdentityPk})                     
          #{${column.javaFieldName}},                   
      	#end          
      #end
      </trim>
  	</insert>
      
      <!-- 插入不为NULL的字段 -->
      <insert id="insertIgnoreNull" parameterType="${context.packageName}.entity.${context.javaBeanName}"
          keyProperty="${pk.javaFieldName}" keyColumn="${context.pkName}" useGeneratedKeys="true"
          >
          INSERT INTO ${table.tableName}    
          <trim prefix="(" suffix=")" suffixOverrides=",">	 

              #foreach($column in $columns) 
                  #if(!${column.isIdentityPk}) 
                      <if test="${column.javaFieldName} != null">
                     ${column.columnName},
                      </if>
                  #end          
              #end
          </trim>
          <trim prefix="VALUES (" suffix=")" suffixOverrides=",">            
              #foreach($column in $columns) 
                  #if(!${column.isIdentityPk})  
                      <if test="${column.javaFieldName} != null" >
                      #{${column.javaFieldName}},                    
                      </if>
                  #end          
              #end
          </trim>
      </insert>

  	<!-- 更新,更新全部字段 -->
      <update id="update" parameterType="${context.packageName}.entity.${context.javaBeanName}">
      UPDATE ${table.tableName}
       <set>		
       #foreach($column in $columns) 
           #if(!${column.isPk})               
           ${column.columnName}=#{${column.javaFieldName}},        
           #end          
       #end
       </set>	
      WHERE ${pk.columnName} = #{${pk.javaFieldName}}
      </update>  
      
      
      <!-- 更新不为NULL的字段 -->
      <update id="updateIgnoreNull" parameterType="${context.packageName}.entity.${context.javaBeanName}">
      UPDATE ${table.tableName}
      <set>
      	#foreach($column in $columns) 
              #if(!${column.isPk})  
                  <if test="${column.javaFieldName} != null" >
                  ${column.columnName}=#{${column.javaFieldName}},                 
                  </if>
              #end          
          #end
      </set>
      WHERE ${pk.columnName} = #{${pk.javaFieldName}}
      </update>

  		
  	<!-- 根据主键删除记录 -->
  	<delete id="delete" parameterType="${context.packageName}.entity.${context.javaBeanName}">
  		UPDATE ${table.tableName}
  		SET is_deleted=1
  		WHERE ${pk.columnName} = #{${pk.javaFieldName}}
  	</delete>


  </mapper>


name: dao
file_name: ${context.javaBeanName}Mapper.java
content:
  package ${context.packageName}.mapper;

  import java.util.List;
  import org.apache.ibatis.annotations.Mapper;
  import ${context.packageName}.entity.${context.javaBeanName};

  @Mapper
  public interface ${context.javaBeanName}Mapper {

  	/**
       * 查询所有记录
       *
       * @return 返回集合，没有返回空List
       */
  	List<${context.javaBeanName}> listAll();


  	/**
       * 根据主键查询
       *
       * @param id 主键
       * @return 返回记录，没有返回null
       */
  	${context.javaBeanName} getById(${pk.javaTypeBox} ${pk.javaFieldName});
  	
  	/**
       * 新增，插入所有字段
       *
       * @param ${context.javaBeanNameLF} 新增的记录
       * @return 返回影响行数
       */
  	int insert(${context.javaBeanName} ${context.javaBeanNameLF});
  	
  	/**
       * 新增，忽略null字段
       *
       * @param ${context.javaBeanNameLF} 新增的记录
       * @return 返回影响行数
       */
  	int insertIgnoreNull(${context.javaBeanName} ${context.javaBeanNameLF});
  	
  	/**
       * 修改，修改所有字段
       *
       * @param ${context.javaBeanNameLF} 修改的记录
       * @return 返回影响行数
       */
  	int update(${context.javaBeanName} ${context.javaBeanNameLF});
  	
  	/**
       * 修改，忽略null字段
       *
       * @param ${context.javaBeanNameLF} 修改的记录
       * @return 返回影响行数
       */
  	int updateIgnoreNull(${context.javaBeanName} ${context.javaBeanNameLF});
  	
  	/**
       * 删除记录
       *
       * @param ${context.javaBeanNameLF} 待删除的记录
       * @return 返回影响行数
       */
  	int delete(${context.javaBeanName} ${context.javaBeanNameLF});
  	
  }


name: vue
file_name: ${context.javaBeanNameLF}.vue
content:
  #set($jq="$")
  <template>
    <div class="app-container">
      <el-form :inline="true" :model="searchFormData" class="demo-form-inline" size="mini">
        #foreach($column in $columns)
        	#if(!${column.isPk})
          <el-form-item
        	#if( "${column.comment}" != "" )
          label="${column.comment}"
          #else
          label="${column.javaFieldName}"
          #end
        >
        	<el-input v-model="searchFormData.${column.javaFieldName}" :clearable="true" placeholder="${column.comment}" style="width: 250px;" />
        </el-form-item>
          #end
        #end
        <el-form-item>
          <el-button type="primary" icon="el-icon-search" @click="loadTable">查询</el-button>
        </el-form-item>
      </el-form>
      <el-button type="primary" size="mini" icon="el-icon-plus" style="margin-bottom: 10px;" @click="onAdd">新增</el-button>
      <el-table
        :data="pageInfo.rows"
        border
        highlight-current-row
      >
      #foreach($column in $columns)
        <el-table-column
          prop="${column.javaFieldName}"
          #if( "${column.comment}" != "" )
          label="${column.comment}"
          #else
          label="${column.javaFieldName}"
          #end
        />
       #end
       <el-table-column>
          <template slot-scope="scope">
            <el-button type="text" size="mini" @click="onTableUpdate(scope.row)">修改</el-button>
            <el-button type="text" size="mini" @click="onTableDelete(scope.row)">删除</el-button>
          </template>
        </el-table-column>
      </el-table>
      <el-pagination
        background
        style="margin-top: 5px"
        :current-page="searchFormData.pageIndex"
        :page-size="searchFormData.pageSize"
        :page-sizes="[5, 10, 20, 40]"
        :total="pageInfo.total"
        layout="total, sizes, prev, pager, next"
        @size-change="onSizeChange"
        @current-change="onPageIndexChange"
      />
      <!--dialog-->
      <el-dialog
        :title="dialogTitle"
        :visible.sync="dialogVisible"
        :close-on-click-modal="false"
        @close="resetForm('dialogForm')"
      >
        <el-form
          ref="dialogForm"
          :rules="dialogFormRules"
          :model="dialogFormData"
          label-width="120px"
          size="mini"
        >
        #foreach($column in $columns)
        	#if(!${column.isPk})
          <el-form-item
        	prop="${column.javaFieldName}"
          #if( "${column.comment}" != "" )
          label="${column.comment}"
          #else
          label="${column.javaFieldName}"
          #end
         >
            <el-input v-model="dialogFormData.${column.javaFieldName}" />
          </el-form-item>
          #end      
        #end
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button @click="dialogVisible = false">取 消</el-button>
          <el-button type="primary" @click="onDialogSave">保 存</el-button>
        </div>
      </el-dialog>
    </div>
  </template>

  <script>
  import axios from 'axios'
  // 创建axios实例
  const client = axios.create({
    baseURL: process.env.VUE_APP_BASE_API, // api 的 base_url
    timeout: 60000 // 请求超时时间,60秒
  })
  export default {
    data() {    
      return {
        searchFormData: {
          #foreach($column in $columns)
          ${column.javaFieldName}: '',
          #end
          pageIndex: 1,
          pageSize: 10
        },
        pageInfo: {
          rows: [],
          total: 0
        },
        dialogVisible: false,
        dialogTitle: '',
        dialogFormData: {
          #foreach($column in $columns)
          #if($velocityCount > 1),#end ${column.javaFieldName}: ''
          #end
        },
        dialogFormRules: {        
          #foreach($column in $columns)
          #if($velocityCount > 1),#end ${column.javaFieldName}: [
            { required: true, message: '不能为空', trigger: 'blur' }
          ]
          #end
        }
      }
    },
    created() {
      this.loadTable()
    },
    methods: {
      loadTable() {
        this.post('/${context.javaBeanNameLF}/list', this.searchFormData, resp => {
          this.pageInfo.rows = resp.data
        })
      },
      onTableUpdate(row) {
        this.dialogTitle = '修改'
        this.dialogVisible = true
        this.${jq}nextTick(() => {
          Object.assign(this.dialogFormData, row)
        })
      },
      onTableDelete(row) {
        this.confirm(`确认要删除该记录吗？`, function(done) {
          const data = {
            ${pk.javaFieldName}: row.${pk.javaFieldName}
          }
          this.post('/${context.javaBeanNameLF}/del', data, () => {
            done()
            this.tip('删除成功')
            this.loadTable()
          })
        })
      },
      onDialogSave() {
        this.${jq}refs.dialogForm.validate((valid) => {
          if (valid) {
            const uri = this.dialogFormData.${pk.javaFieldName} ? '/${context.javaBeanNameLF}/update' : '/${context.javaBeanNameLF}/add'
            this.post(uri, this.dialogFormData, () => {
              this.dialogVisible = false
              this.loadTable()
            })
          }
        })
      },
      onSizeChange(size) {
        this.searchFormData.pageSize = size
        this.loadTable()
      },
      onAdd() {
        this.dialogTitle = '新增'
        this.dialogVisible = true
        this.dialogFormData.${pk.javaFieldName} = 0
      },
      onPageIndexChange(pageIndex) {
        this.searchFormData.pageIndex = pageIndex
        this.loadTable()
      },
      /**
       * 请求接口
       * @param uri uri
       * @param data 请求数据
       * @param callback 成功时回调
       * @param errorCallback 错误时回调
       */
      post(uri, data, callback, errorCallback) {
        const that = this
        client.post(uri, data).then(function(response) {
          const resp = response.data
          const code = resp.code
          if (code === '0') { // 成功
            callback && callback.call(that, resp)
          } else {
            that.${jq}message.error(resp.msg)
          }
        }).catch(function(error) {
          console.error(error)
          errorCallback && errorCallback(error)
          that.${jq}message.error(error.message)
        })
      }
    }
  }
  </script>


name: Model-C#
file_name: ${context.className}.cs
content:
  using Newtonsoft.Json;

  namespace ${context.packageName}
  {
  #if( "${table.comment}" != "" )
   	/// <summary>
      /// ${table.comment}
      /// </summary>
  #end
      public class ${context.className}
      {
  #foreach($column in $csharpColumns)
  #if( "${column.comment}" != "" )
          /// <summary>
          /// ${column.comment}
          /// </summary>
  #end
          [JsonProperty("${column.field}")]
  		public ${column.fieldType} ${column.property} { get; set; }
          
  #end
      }
  }


# database_type

name: mysql
driverClass: com.mysql.cj.jdbc.Driver
remark: MySQL
driverUrlTmp:
  jdbc:mysql://${dbconf.dbHost}:${dbconf.dbPort}/${dbconf.dbName}?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true


# database_config

dbTypeName: mysql
driverClass: com.mysql.cj.jdbc.Driver
dbName: yaxin_cmsh
dbHost: 127.0.0.1
username: root
password: root
remark: yaxin(cmsh)
driverUrl:
  jdbc:mysql://127.0.0.1:3306/yaxin_cmsh?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true


dbTypeName: mysql
driverClass: com.mysql.cj.jdbc.Driver
dbName: jbase_admin
dbHost: 127.0.0.1
username: root
password: root
remark: jbase_admin
driverUrl:
  jdbc:mysql://127.0.0.1:3306/jbase_admin?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true


dbTypeName: mysql
driverClass: com.mysql.cj.jdbc.Driver
dbName: hsgs_lmjtj
dbHost: 127.0.0.1
username: root
password: root
remark: hsgs_lmjtj
driverUrl:
  jdbc:mysql://127.0.0.1:3306/hsgs_lmjtj?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true


dbTypeName: mysql
driverClass: com.mysql.cj.jdbc.Driver
dbName: jbase_community_care
dbHost: 127.0.0.1
username: root
password: root
remark: jbase_community_care
driverUrl:
  jdbc:mysql://127.0.0.1:3306/jbase_community_care?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true


dbTypeName: mysql
driverClass: com.mysql.cj.jdbc.Driver
dbName: jbase_hwp_nxy
dbHost: 127.0.0.1
username: root
password: root
remark: jbase_hwp_nxy
driverUrl:
  jdbc:mysql://127.0.0.1:3306/jbase_hwp_nxy?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true


dbTypeName: mysql
driverClass: com.mysql.cj.jdbc.Driver
dbName: jbase_flowable
dbHost: 127.0.0.1
username: root
password: root
remark: jbase_flowable
driverUrl:
  jdbc:mysql://127.0.0.1:3306/jbase_flowable?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true


dbTypeName: mysql
driverClass: com.mysql.cj.jdbc.Driver
dbName: ys_rcgy
dbHost: 127.0.0.1
username: root
password: root
remark: ys_rcgy
driverUrl:
  jdbc:mysql://127.0.0.1:3306/ys_rcgy?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true


dbTypeName: mysql
driverClass: com.mysql.cj.jdbc.Driver
dbName: anrui_scm
dbHost: 127.0.0.1
username: root
password: root
remark: 测试
driverUrl:
  jdbc:mysql://127.0.0.1:3306/anrui_scm?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true


# template_config

groupName: default(SpringBoot)
name: entity
fileName: ${table.entityClassName}.java
remark: 实体类
fileFolder: /${pinfo.name}-biz/src/main/java/${pinfo.packagePath}/biz/${table.shortName}
content:
  /*********************************************************
   *********************************************************
   ********************                  *******************
   *************                                ************
   *******                  _oo0oo_                  *******
   ***                     o8888888o                     ***
   *                       88" . "88                       *
   *                       (| -_- |)                       *
   *                       0\  =  /0                       *
   *                     ___/`---'\___                     *
   *                   .' \\|     |// '.                   *
   *                  / \\|||  :  |||// \                  *
   *                 / _||||| -:- |||||- \                 *
   *                |   | \\\  -  /// |   |                *
   *                | \_|  ''\---/''  |_/ |                *
   *                \  .-\__  '-'  ___/-. /                *
   *              ___'. .'  /--.--\  `. .'___              *
   *           ."" '<  `.___\_<|>_/___.' >' "".            *
   *          | | :  `- \`.;`\ _ /`;.`/ - ` : | |          *
   *          \  \ `_.   \_ __\ /__ _/   .-` /  /          *
   *      =====`-.____`.___ \_____/___.-`___.-'=====       *
   *                        `=---='                        *
   *      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      *
   *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
   *********************************************************/
  package ${pinfo.packageName}.biz.${table.shortName};

  <% 
    var _date = date(); 
    var _tableComment = table.name;
    if(isNotEmpty(table.comment)) {
      _tableComment = table.comment;
    }
    var _beanName = "IdEntity";
    if(1==table.entityType) { 
      _beanName = "Entity";
    }
    if(3==table.entityType) {
      _beanName = "BaseEntity";
    }
  %>
  import com.baomidou.mybatisplus.annotation.TableName;
  import org.jbase.jbsc.commons.core.domain.${_beanName};
  <% if(table.hasDateField) { %>
  import com.fasterxml.jackson.annotation.JsonFormat;
  import java.util.Date;
  <% } %>
  import io.swagger.annotations.ApiModel;
  import io.swagger.annotations.ApiModelProperty;

  /**
   * Project: ${pinfo.name}(${pinfo.nameCN}) <br/>
   * File: ${table.entityClassName}.java <br/>
   * Class: ${pinfo.packageName}.biz.${table.shortName}.${table.entityClassName} <br/>
   * Description: ${_tableComment}. <br/>
   * Copyright: ${pinfo.copyright} <br/>
   * Company: ${pinfo.company} <br/>
   * Makedate: ${_date,dateFormat="yyyy-MM-dd HH:mm:ss"} <br/>
   *
   * @author ${pinfo.author}
   * @version 1.0
   * @since 1.0
   */
  @ApiModel(value = "${_tableComment}", description = "${_tableComment}")
  @TableName("${table.name}")
  public class ${table.entityClassName} extends ${_beanName} {
      private static final long serialVersionUID = 1L;

  <% for(col in columns) { %>
      
  	<% if("Date" == col.javaTypeBox){ %>
      @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
      <% } %>
  	<% if(isEmpty(col.comment)){ %>
  	@ApiModelProperty("${col.name}")
  	<% } else {%>
  	@ApiModelProperty("${col.comment}")
      <% } %>
      <% if(isEmpty(col.defVal)){ %>
      private ${col.javaTypeBox} ${col.name}; // ${col.comment}
      <% } else { %>
      <% if("Date" == col.type){ %>
      private ${col.javaTypeBox} ${col.name} = new Date(); // ${col.comment}
      <% } else if("String" == col.type){ %>
      private ${col.javaTypeBox} ${col.name} = "${col.defVal}"; // ${col.comment}
      <% } else { %>
      private ${col.javaTypeBox} ${col.name} = ${col.defVal}; // ${col.comment}
      <% } %>
      <% } %>
  <% } %>

  <% for(col in columns) { %>
  	/**
  	 * @return ${col.comment}
  	 */
  	public ${col.javaTypeBox} get${col.nameUF}(){
  		return ${col.name};
  	}
  	
  	/**
  	 * @param ${col.name} ${col.comment} to set
  	 */
  	public void set${col.nameUF}(${col.javaTypeBox} ${col.name}){
  		this.${col.name} = ${col.name};
  	}
  <% } %>
  }


groupName: default(SpringBoot)
name: Mapper.xml
fileName: ${table.entityClassName}Mapper.xml
remark: mapper
fileFolder: /${pinfo.name}-biz/src/main/java/${pinfo.packagePath}/biz/${table.shortName}
content:
  <?xml version="1.0" encoding="UTF-8" ?>
  <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  <mapper namespace="${pinfo.packageName}.biz.${table.shortName}.${table.entityClassName}Mapper">
  <!--    <where> \${ew.sqlSegment} </where>-->
  </mapper>


groupName: default(SpringBoot)
name: Mapper接口
fileName: ${table.entityClassName}Mapper.java
remark: Mapper接口
fileFolder: /${pinfo.name}-biz/src/main/java/${pinfo.packagePath}/biz/${table.shortName}
content:
  /*********************************************************
   *********************************************************
   ********************                  *******************
   *************                                ************
   *******                  _oo0oo_                  *******
   ***                     o8888888o                     ***
   *                       88" . "88                       *
   *                       (| -_- |)                       *
   *                       0\  =  /0                       *
   *                     ___/`---'\___                     *
   *                   .' \\|     |// '.                   *
   *                  / \\|||  :  |||// \                  *
   *                 / _||||| -:- |||||- \                 *
   *                |   | \\\  -  /// |   |                *
   *                | \_|  ''\---/''  |_/ |                *
   *                \  .-\__  '-'  ___/-. /                *
   *              ___'. .'  /--.--\  `. .'___              *
   *           ."" '<  `.___\_<|>_/___.' >' "".            *
   *          | | :  `- \`.;`\ _ /`;.`/ - ` : | |          *
   *          \  \ `_.   \_ __\ /__ _/   .-` /  /          *
   *      =====`-.____`.___ \_____/___.-`___.-'=====       *
   *                        `=---='                        *
   *      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      *
   *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
   *********************************************************/
  package ${pinfo.packageName}.biz.${table.shortName};

  <% 
    var _date = date(); 
    var _tableComment = table.name;
    if(isNotEmpty(table.comment)) {
      _tableComment = table.comment;
    }
  %>
  import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  import org.apache.ibatis.annotations.Mapper;

  /**
   * Project: ${pinfo.name}(${pinfo.nameCN}) <br/>
   * File: ${table.entityClassName}Mapper.java <br/>
   * Class: ${pinfo.packageName}.biz.${table.shortName}.${table.entityClassName}Mapper <br/>
   * Description: ${_tableComment}. <br/>
   * Copyright: ${pinfo.copyright} <br/>
   * Company: ${pinfo.company} <br/>
   * Makedate: ${_date,dateFormat="yyyy-MM-dd HH:mm:ss"} <br/>
   *
   * @author ${pinfo.author}
   * @version 1.0
   * @since 1.0
   */
  @Mapper
  public interface ${table.entityClassName}Mapper extends BaseMapper<${table.entityClassName}> {

      //@Update("update ${table.name} set name=#{msg} where id=#{id}")
      //IPage<${table.entityClassName}Vo> voPage(IPage<${table.entityClassName}> page, @Param(Constants.WRAPPER) QueryWrapper<${table.entityClassName}> qw);

  }


groupName: default(SpringBoot)
name: 项目pom文件
fileName: pom.xml
remark: 项目根目录下的pom文件
fileFolder: /
content:
  <?xml version="1.0" encoding="UTF-8"?>
  <project xmlns="http://maven.apache.org/POM/4.0.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
      <modelVersion>4.0.0</modelVersion>

      <groupId>${pinfo.packageName}</groupId>
      <artifactId>${pinfo.name}</artifactId>
      <version>1.0</version>
      <modules>
          <module>${pinfo.name}-biz</module>
      </modules>
      <packaging>pom</packaging>
      <name>${pinfo.name}</name>
      <description>${pinfo.nameCN}-${pinfo.nameDesc}</description>

  </project>


groupName: default(SpringBoot)
name: 后台项目pom文件
fileName: pom.xml
remark: 用于SpringBoot项目的Maven文件
fileFolder: /${pinfo.name}-biz
content:
  <?xml version="1.0" encoding="UTF-8"?>
  <project xmlns="http://maven.apache.org/POM/4.0.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
      <parent>
          <artifactId>jbsc-parent</artifactId>
          <groupId>org.jbase.jbsc</groupId>
          <version>0.0.1</version>
          <relativePath/>
      </parent>
      <modelVersion>4.0.0</modelVersion>

      <artifactId>${pinfo.name}-biz</artifactId>
      <groupId>${pinfo.packageName}</groupId>
      <version>1.0</version>

      <dependencies>
          <dependency>
              <groupId>org.springframework.boot</groupId>
              <artifactId>spring-boot-starter-cache</artifactId>
          </dependency>
          <dependency>
              <groupId>org.jbase.jbsc</groupId>
              <artifactId>jbsc-commons-base</artifactId>
              <version>0.0.1</version>
          </dependency>

          ${pinfo.dbTypeMaven}
          <dependency>
              <groupId>org.apache.poi</groupId>
              <artifactId>poi-ooxml</artifactId>
          </dependency>
          <dependency>
              <groupId>io.jsonwebtoken</groupId>
              <artifactId>jjwt</artifactId>
          </dependency>
          <dependency>
              <groupId>com.google.zxing</groupId>
              <artifactId>core</artifactId>
          </dependency>
          <dependency>
              <groupId>cn.hutool</groupId>
              <artifactId>hutool-extra</artifactId>
          </dependency>
          <dependency>
              <groupId>cn.hutool</groupId>
              <artifactId>hutool-http</artifactId>
          </dependency>
          <dependency>
              <groupId>cn.hutool</groupId>
              <artifactId>hutool-crypto</artifactId>
          </dependency>
          <dependency>
              <groupId>cn.hutool</groupId>
              <artifactId>hutool-cache</artifactId>
          </dependency>

          <dependency>
              <groupId>com.github.xiaoymin</groupId>
              <artifactId>knife4j-spring-boot-starter</artifactId>
          </dependency>

          <dependency>
              <groupId>org.springframework.boot</groupId>
              <artifactId>spring-boot-starter-test</artifactId>
              <scope>test</scope>
          </dependency>
      </dependencies>

      <build>
          <plugins>
              <plugin>
                  <groupId>org.springframework.boot</groupId>
                  <artifactId>spring-boot-maven-plugin</artifactId>
                  <executions>
                      <execution>
                          <goals>
                              <goal>repackage</goal>
                          </goals>
                      </execution>
                  </executions>
              </plugin>
          </plugins>
          <resources>
              <resource>
                  <directory>src/main/java</directory>
                  <includes>
                      <include>**/*Mapper.xml</include>
                  </includes>
              </resource>
              <resource>
                  <directory>src/main/resources</directory>
                  <includes>
                      <include>**/*.*</include>
                  </includes>
                  <filtering>false</filtering>
              </resource>
          </resources>
      </build>
  </project>


groupName: default(SpringBoot)
name: SpringBoot项目application.yml
fileName: application.yml
remark: SpringBoot项目配置
fileFolder: /${pinfo.name}-biz/src/main/resources
content:
  server:
    port: ${pinfo.serverPort}
  spring:
    application:
      name: ${pinfo.name}
    messages:
      basename: i18n/messages
    servlet:
      multipart:
        max-file-size: 50MB
        max-request-size: 100MB
    datasource:
      driver-class-name: ${pinfo.dbDriver}
      url: ${pinfo.dbUrl}
      username: ${pinfo.dbUsername}
      password: ${pinfo.dbPassword}
  mybatis-plus:
    mapper-locations: classpath*:**Mapper.xml
    global-config:
      refresh: true
      db-config:
        id-type: 0
        db-type: ${pinfo.dbType}
    configuration:
      map-underscore-to-camel-case: false
      cache-enabled: true
      call-setters-on-nulls: true
  image:
    upload:
      path: static/upload/
    url:
      prefix: http://127.0.0.1:${pinfo.serverPort}/upload/


groupName: default(SpringBoot)
name: 日志配置logback-spring.xml
fileName: logback-spring.xml
remark: 日志配置logback-spring.xml
fileFolder: /${pinfo.name}-biz/src/main/resources
content:
  <?xml version="1.0" encoding="UTF-8"?>
  <configuration>

  	<property name="log.base" value="logs/${pinfo.name}" />

  	<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
  		<encoder>
  			<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
  			</pattern>
  			<!--<charset>UTF-8</charset> -->
  		</encoder>
  	</appender>

  	<appender name="FILEOUT"
  		class="ch.qos.logback.core.rolling.RollingFileAppender">
  		<file>\${log.base}.log</file>
  		<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
  			<fileNamePattern>\${log.base}.%d{yyyyMMdd}.%i.log.zip
  			</fileNamePattern>
  			<!-- 当文件大小超过10MB时触发滚动 -->
  			<timeBasedFileNamingAndTriggeringPolicy
  				class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
  				<maxFileSize>1MB</maxFileSize>
  			</timeBasedFileNamingAndTriggeringPolicy>
  		</rollingPolicy>
  		<encoder>
  			<pattern>%date [%thread] %-5level %logger{35} - %msg%n</pattern>
  			<!--<charset>UTF-8</charset> -->
  		</encoder>
  	</appender>

  	<root level="DEBUG">
  		<appender-ref ref="STDOUT" />
  		<appender-ref ref="FILEOUT" />
  	</root>

  </configuration>


groupName: default(SpringBoot)
name: 启动类
fileName: ${pinfo.nameShort}App.java
remark: 启动程序Application
fileFolder: /${pinfo.name}-biz/src/main/java/${pinfo.packagePath}
content:
  /*********************************************************
   *********************************************************
   ********************                  *******************
   *************                                ************
   *******                  _oo0oo_                  *******
   ***                     o8888888o                     ***
   *                       88" . "88                       *
   *                       (| -_- |)                       *
   *                       0\  =  /0                       *
   *                     ___/`---'\___                     *
   *                   .' \\|     |// '.                   *
   *                  / \\|||  :  |||// \                  *
   *                 / _||||| -:- |||||- \                 *
   *                |   | \\\  -  /// |   |                *
   *                | \_|  ''\---/''  |_/ |                *
   *                \  .-\__  '-'  ___/-. /                *
   *              ___'. .'  /--.--\  `. .'___              *
   *           ."" '<  `.___\_<|>_/___.' >' "".            *
   *          | | :  `- \`.;`\ _ /`;.`/ - ` : | |          *
   *          \  \ `_.   \_ __\ /__ _/   .-` /  /          *
   *      =====`-.____`.___ \_____/___.-`___.-'=====       *
   *                        `=---='                        *
   *      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      *
   *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
   *********************************************************/
  package ${pinfo.packageName};

  import org.springframework.boot.SpringApplication;
  import org.springframework.boot.autoconfigure.SpringBootApplication;

  /**
   * Project: ${pinfo.name}(${pinfo.nameCN}) <br/>
   * File: ${pinfo.nameShort}App.java <br/>
   * Class: ${pinfo.packageName}.${pinfo.nameShort}App <br/>
   * Description: ${pinfo.nameDesc} . <br/>
   * Copyright: ${pinfo.copyright} <br/>
   * Company: ${pinfo.company} <br/>
   <% var date = date(); %>
   * Makedate: ${date,dateFormat="yyyy-MM-dd HH:mm:ss"} <br/>
   *
   * @author ${pinfo.author}
   * @version 1.0
   * @since 1.0
   */
  @SpringBootApplication(scanBasePackages = {
          "org.jbase.jbsc.commons.base.config",
          "${pinfo.packageName}"
  })
  public class ${pinfo.nameShort}App {

      public static void main(String[] args) {
          SpringApplication.run(${pinfo.nameShort}App.class, args);
      }
  }


groupName: default(SpringBoot)
name: Swagger2Config
fileName: Swagger2Config.java
remark: Swagger配置文件
fileFolder: /${pinfo.name}-biz/src/main/java/${pinfo.packagePath}/config
content:
  /*********************************************************
   *********************************************************
   ********************                  *******************
   *************                                ************
   *******                  _oo0oo_                  *******
   ***                     o8888888o                     ***
   *                       88" . "88                       *
   *                       (| -_- |)                       *
   *                       0\  =  /0                       *
   *                     ___/`---'\___                     *
   *                   .' \\|     |// '.                   *
   *                  / \\|||  :  |||// \                  *
   *                 / _||||| -:- |||||- \                 *
   *                |   | \\\  -  /// |   |                *
   *                | \_|  ''\---/''  |_/ |                *
   *                \  .-\__  '-'  ___/-. /                *
   *              ___'. .'  /--.--\  `. .'___              *
   *           ."" '<  `.___\_<|>_/___.' >' "".            *
   *          | | :  `- \`.;`\ _ /`;.`/ - ` : | |          *
   *          \  \ `_.   \_ __\ /__ _/   .-` /  /          *
   *      =====`-.____`.___ \_____/___.-`___.-'=====       *
   *                        `=---='                        *
   *      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      *
   *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
   *********************************************************/
  package ${pinfo.packageName}.config;

  import org.springframework.context.annotation.Configuration;
  import springfox.documentation.builders.ApiInfoBuilder;
  import springfox.documentation.builders.PathSelectors;
  import springfox.documentation.builders.RequestHandlerSelectors;
  import springfox.documentation.service.ApiInfo;
  import springfox.documentation.spi.DocumentationType;
  import springfox.documentation.spring.web.plugins.Docket;
  import springfox.documentation.swagger2.annotations.EnableSwagger2;

  /**
   * Project: ${pinfo.nameCN} <br/>
   * File: Swagger2Config.java <br/>
   * Class: ${pinfo.packageName}.config.Swagger2Config <br/>
   * Description: <描述类的功能>. <br/>
   * Copyright: ${pinfo.copyright} <br/>
   * Company: ${pinfo.company} <br/>
   <% var date = date(); %>
   * Makedate: ${date,dateFormat="yyyy-MM-dd HH:mm:ss"} <br/>
   *
   * @author ${pinfo.author}
   * @version 1.0
   * @since 1.0
   */
  @Configuration
  @EnableSwagger2
  //@EnableKnife4j
  public class Swagger2Config {

      public Docket createRestApi() {
          return new Docket(DocumentationType.SWAGGER_2)
                  .apiInfo(apiInfo())
                  .select()
                  .apis(RequestHandlerSelectors.basePackage("${pinfo.packageName}"))
                  .paths(PathSelectors.any())
                  .build();
      }

      private ApiInfo apiInfo() {
          return new ApiInfoBuilder()
                  .title("${pinfo.nameCN} ")
                  .description("${pinfo.nameDesc} ")
                  .version("1.0")
                  .build();
      }
  }


groupName: default(SpringBoot)
name: Query
fileName: ${table.entityClassName}Query.java
remark: 查询条件类
fileFolder: /${pinfo.name}-biz/src/main/java/${pinfo.packagePath}/biz/${table.shortName}
content:
  /*********************************************************
   *********************************************************
   ********************                  *******************
   *************                                ************
   *******                  _oo0oo_                  *******
   ***                     o8888888o                     ***
   *                       88" . "88                       *
   *                       (| -_- |)                       *
   *                       0\  =  /0                       *
   *                     ___/`---'\___                     *
   *                   .' \\|     |// '.                   *
   *                  / \\|||  :  |||// \                  *
   *                 / _||||| -:- |||||- \                 *
   *                |   | \\\  -  /// |   |                *
   *                | \_|  ''\---/''  |_/ |                *
   *                \  .-\__  '-'  ___/-. /                *
   *              ___'. .'  /--.--\  `. .'___              *
   *           ."" '<  `.___\_<|>_/___.' >' "".            *
   *          | | :  `- \`.;`\ _ /`;.`/ - ` : | |          *
   *          \  \ `_.   \_ __\ /__ _/   .-` /  /          *
   *      =====`-.____`.___ \_____/___.-`___.-'=====       *
   *                        `=---='                        *
   *      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      *
   *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
   *********************************************************/
  package ${pinfo.packageName}.biz.${table.shortName};

  <% 
    var _date = date(); 
    var _tableComment = table.name;
    if(isNotEmpty(table.comment)) {
      _tableComment = table.comment;
    }
    var _beanName = "IdEntity";
    if(1==table.entityType) { 
      _beanName = "Entity";
    }
    if(3==table.entityType) {
      _beanName = "BaseEntity";
    }
  %>

  import org.jbase.jbsc.commons.core.query.Query;

  <% if(table.hasDateField) { %>
  import com.fasterxml.jackson.annotation.JsonFormat;
  import java.util.Date;
  <% } %>
  import io.swagger.annotations.ApiModel;
  import io.swagger.annotations.ApiModelProperty;

  /**
   * Project: ${pinfo.name}(${pinfo.nameCN}) <br/>
   * File: ${table.entityClassName}Query.java <br/>
   * Class: ${pinfo.packageName}.biz.${table.shortName}.${table.entityClassName}Query <br/>
   * Description: ${_tableComment} 查询条件. <br/>
   * Copyright: ${pinfo.copyright} <br/>
   * Company: ${pinfo.company} <br/>
   * Makedate: ${_date,dateFormat="yyyy-MM-dd HH:mm:ss"} <br/>
   *
   * @author ${pinfo.author}
   * @version 1.0
   * @since 1.0
   */
  public class ${table.entityClassName}Query implements Query {

  <% for(col in columns) { %>
      
  	<% if("Date" == col.javaTypeBox){ %>
      @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
      <% } %>
  	<% if(isEmpty(col.comment)){ %>
  	@ApiModelProperty("${col.name}")
  	<% } else {%>
  	@ApiModelProperty("${col.comment}")
      <% } %>
      <% if("Date" == col.javaTypeBox){ %>
      private ${col.javaTypeBox} ${col.name}Start; // ${col.comment}
      private ${col.javaTypeBox} ${col.name}End; // ${col.comment}
      <% } else { %>
      private ${col.javaTypeBox} ${col.name}; // ${col.comment}
      <% } %>
  <% } %>

  <% for(col in columns) { %>
  	
      <% if("Date" == col.javaTypeBox){ %>
  	/**
  	 * @return ${col.comment}
  	 */
  	public ${col.javaTypeBox} get${col.nameUF}Start(){
  		return ${col.name}Start;
  	}
  	
  	/**
  	 * @param ${col.name} ${col.comment} to set
  	 */
  	public void set${col.nameUF}Start(${col.javaTypeBox} ${col.name}){
  		this.${col.name}Start = ${col.name};
  	}
  	/**
  	 * @return ${col.comment}
  	 */
  	public ${col.javaTypeBox} get${col.nameUF}End(){
  		return ${col.name}End;
  	}
  	
  	/**
  	 * @param ${col.name} ${col.comment} to set
  	 */
  	public void set${col.nameUF}End(${col.javaTypeBox} ${col.name}){
  		this.${col.name}End = ${col.name};
  	}
      <% } else { %>
  	/**
  	 * @return ${col.comment}
  	 */
  	public ${col.javaTypeBox} get${col.nameUF}(){
  		return ${col.name};
  	}
  	
  	/**
  	 * @param ${col.name} ${col.comment} to set
  	 */
  	public void set${col.nameUF}(${col.javaTypeBox} ${col.name}){
  		this.${col.name} = ${col.name};
  	}
      <% } %>
  <% } %>
  }


groupName: default(SpringBoot)
name: Service
fileName: ${table.entityClassName}Service.java
remark: Service类
fileFolder: /${pinfo.name}-biz/src/main/java/${pinfo.packagePath}/biz/${table.shortName}
content:
  /*********************************************************
   *********************************************************
   ********************                  *******************
   *************                                ************
   *******                  _oo0oo_                  *******
   ***                     o8888888o                     ***
   *                       88" . "88                       *
   *                       (| -_- |)                       *
   *                       0\  =  /0                       *
   *                     ___/`---'\___                     *
   *                   .' \\|     |// '.                   *
   *                  / \\|||  :  |||// \                  *
   *                 / _||||| -:- |||||- \                 *
   *                |   | \\\  -  /// |   |                *
   *                | \_|  ''\---/''  |_/ |                *
   *                \  .-\__  '-'  ___/-. /                *
   *              ___'. .'  /--.--\  `. .'___              *
   *           ."" '<  `.___\_<|>_/___.' >' "".            *
   *          | | :  `- \`.;`\ _ /`;.`/ - ` : | |          *
   *          \  \ `_.   \_ __\ /__ _/   .-` /  /          *
   *      =====`-.____`.___ \_____/___.-`___.-'=====       *
   *                        `=---='                        *
   *      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      *
   *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
   *********************************************************/
  package ${pinfo.packageName}.biz.${table.shortName};

  <% 
    var _date = date(); 
    var _tableComment = table.name;
    if(isNotEmpty(table.comment)) {
      _tableComment = table.comment;
    }
  %>

  import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
  import com.baomidou.mybatisplus.core.metadata.IPage;
  import org.apache.commons.lang3.StringUtils;
  import org.jbase.jbsc.commons.base.service.MybatisBaseService;
  import org.jbase.jbsc.commons.base.utils.PagerUtil;
  import org.jbase.jbsc.commons.core.query.PagerQuery;
  import org.jbase.jbsc.commons.core.result.ResultBean;
  import org.jbase.jbsc.commons.core.vo.PagerVo;

  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.stereotype.Service;

  import java.util.List;

  /**
   * Project: ${pinfo.name}(${pinfo.nameCN}) <br/>
   * File: ${table.entityClassName}Service.java <br/>
   * Class: ${pinfo.packageName}.biz.${table.shortName}.${table.entityClassName}Service <br/>
   * Description: ${_tableComment} 业务逻辑. <br/>
   * Copyright: ${pinfo.copyright} <br/>
   * Company: ${pinfo.company} <br/>
   * Makedate: ${_date,dateFormat="yyyy-MM-dd HH:mm:ss"} <br/>
   *
   * @author ${pinfo.author}
   * @version 1.0
   * @since 1.0
   */
  @Service
  public class ${table.entityClassName}Service extends MybatisBaseService<${table.entityClassName}Mapper, ${table.entityClassName}> {

      public PagerVo<${table.entityClassName}> listPage(PagerQuery<${table.entityClassName}Query> pq) {
          ${table.entityClassName}Query query = pq.getParams();
          QueryWrapper<${table.entityClassName}> qw = createQueryWrapper(query);
          IPage<${table.entityClassName}> page = PagerUtil.queryToPage(pq);
          IPage<${table.entityClassName}> pagging = baseMapper.selectPage(page, qw);
          PagerVo<${table.entityClassName}> p = PagerUtil.pageToVo(pagging, null);
          return p;
      }

      private QueryWrapper<${table.entityClassName}> createQueryWrapper(${table.entityClassName}Query query) {
          // todo: 这里根据具体业务调整查询条件
          // 多字段Like示例：qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName()));
          QueryWrapper<${table.entityClassName}> qw = new QueryWrapper<>();
    
  <% for(col in columns) { %>

  	<% if("Date" == col.javaTypeBox){ %>
  		if (query.get${col.nameUF}Start() != null) {
  			qw.ge("${col.name}", query.get${col.nameUF}Start());
  		}
  		if (query.get${col.nameUF}End() != null) {
  			qw.le("${col.name}", query.get${col.nameUF}End());
  		}
  	<% } else if("String" == col.javaTypeBox){ %>
  		if (StringUtils.isNotBlank(query.get${col.nameUF}())) {
  			qw.eq("${col.name}", query.get${col.nameUF}());
  		}
  	<% } else {%>
  		if (query.get${col.nameUF}() != null) {
  			qw.eq("${col.name}", query.get${col.nameUF}());
  		}
  		<% } %>
  <% } %>
          return qw;
      }
  }


groupName: default(SpringBoot)
name: Controller
fileName: ${table.entityClassName}Rest.java
remark: Controller接口
fileFolder: /${pinfo.name}-biz/src/main/java/${pinfo.packagePath}/biz/${table.shortName}
content:
  /*********************************************************
   *********************************************************
   ********************                  *******************
   *************                                ************
   *******                  _oo0oo_                  *******
   ***                     o8888888o                     ***
   *                       88" . "88                       *
   *                       (| -_- |)                       *
   *                       0\  =  /0                       *
   *                     ___/`---'\___                     *
   *                   .' \\|     |// '.                   *
   *                  / \\|||  :  |||// \                  *
   *                 / _||||| -:- |||||- \                 *
   *                |   | \\\  -  /// |   |                *
   *                | \_|  ''\---/''  |_/ |                *
   *                \  .-\__  '-'  ___/-. /                *
   *              ___'. .'  /--.--\  `. .'___              *
   *           ."" '<  `.___\_<|>_/___.' >' "".            *
   *          | | :  `- \`.;`\ _ /`;.`/ - ` : | |          *
   *          \  \ `_.   \_ __\ /__ _/   .-` /  /          *
   *      =====`-.____`.___ \_____/___.-`___.-'=====       *
   *                        `=---='                        *
   *      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      *
   *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
   *********************************************************/
  package ${pinfo.packageName}.biz.${table.shortName};

  <% 
    var _date = date(); 
    var _tableComment = table.name;
    if(isNotEmpty(table.comment)) {
      _tableComment = table.comment;
    }
  %>
  import io.swagger.annotations.Api;
  import io.swagger.annotations.ApiOperation;
  import org.jbase.jbsc.commons.core.query.PagerQuery;
  import org.jbase.jbsc.commons.core.result.ResultBean;
  import org.jbase.jbsc.commons.core.vo.PagerVo;
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.web.bind.annotation.*;

  import java.util.List;

  /**
   * Project: ${pinfo.name}(${pinfo.nameCN}) <br/>
   * File: ${table.entityClassName}Rest.java <br/>
   * Class: ${pinfo.packageName}.biz.${table.shortName}.${table.entityClassName}Rest <br/>
   * Description: ${_tableComment}. <br/>
   * Copyright: ${pinfo.copyright} <br/>
   * Company: ${pinfo.company} <br/>
   * Makedate: ${_date,dateFormat="yyyy-MM-dd HH:mm:ss"} <br/>
   *
   * @author ${pinfo.author}
   * @version 1.0
   * @since 1.0
   */
  @Api(tags = "${_tableComment}")
  @RestController("${pinfo.packageName}.biz.${table.shortName}.${table.entityClassName}Rest")
  @RequestMapping("/${table.shortName}")
  public class ${table.entityClassName}Rest {

      @Autowired
      private ${table.entityClassName}Service ${table.entityClassNameLF}Service;

      @ApiOperation("根据条件分页查询数据的列表")
      @PostMapping("/listPage")
      public ResultBean<PagerVo<${table.entityClassName}>> listPage(@RequestBody PagerQuery<${table.entityClassName}Query> pq) {
          ResultBean rb = ResultBean.fireFail();
          PagerVo<${table.entityClassName}> pv = ${table.entityClassNameLF}Service.listPage(pq);
          return rb.success().setData(pv);
      }

      @ApiOperation("所有数据列表")
      @GetMapping("/list")
      public ResultBean<List<${table.entityClassName}>> list() {
          ResultBean rb = ResultBean.fireFail();
          List<${table.entityClassName}> list = ${table.entityClassNameLF}Service.list();
          return rb.success().setData(list);
      }

      @ApiOperation("保存新增或修改的数据")
      @PostMapping("/save")
      public ResultBean save(@RequestBody ${table.entityClassName} entity) {
          ResultBean rb = ResultBean.fireFail();
          ${table.entityClassNameLF}Service.saveOrUpdate(entity);
          return rb.success();
      }

      @ApiOperation("删除记录")
      @GetMapping("/del/{ids}")
      public ResultBean del(@PathVariable("ids") String ids) {
          ResultBean rb = ResultBean.fireFail();
          ${table.entityClassNameLF}Service.delByIds(ids);
          return rb.success();
      }

      @ApiOperation("获取一条记录")
      @GetMapping("/fetch/{id}")
      public ResultBean<${table.entityClassName}> fetch(@PathVariable("id") String id) {
          ResultBean rb = ResultBean.fireFail();
          ${table.entityClassName} entity = ${table.entityClassNameLF}Service.fetchById(id);
          return rb.success().setData(entity);
      }
  }


groupName: ruoyi-ui
name: menus-data
fileName: menus-data-${pinfo.name}.js
remark: 左侧菜单的数据
fileFolder: /${pinfo.name}-adminui/src/demodata
content:
  export const gencodeMenus = {
    "msg": "操作成功",
    "code": 200,
    "data": [{
      "name": "${pinfo.nameShort}",
      "path": "/${pinfo.nameShortLow}",
      "hidden": false,
      "redirect": "noRedirect",
      "component": "Layout",
      "alwaysShow": true,
      "meta": {
        "title": "${pinfo.nameCN}",
        "icon": "system",
        "noCache": false
      },
      "children": [
  <% 
    for (tinfo in pinfo.tables){ 
    var _tableComment = tinfo.name;
    if(isNotEmpty(tinfo.comment)) {
    _tableComment = tinfo.comment;
    }
    if(tinfoLP.last){
  %>
        {
          "name": "${pinfo.nameShort}${tinfo.entityClassName}Index",
          "path": "${tinfo.shortName}",
          "hidden": false,
          "component": "${pinfo.nameShortLow}/${tinfo.shortName}/index",
          "meta": {
            "title": "${_tableComment}",
            "icon": "dict",
            "noCache": false
          }
        }
  <% 
    } else {
  %>
        {
          "name": "${pinfo.nameShort}${tinfo.entityClassName}Index",
          "path": "${tinfo.shortName}",
          "hidden": false,
          "component": "${pinfo.nameShortLow}/${tinfo.shortName}/index",
          "meta": {
            "title": "${_tableComment}",
            "icon": "dict",
            "noCache": false
          }
        },
  <% 
    }
  } 
  %>
      ]
    }]
  }


groupName: ruoyi-ui
name: index.vue
fileName: index.vue
remark: 表页面
fileFolder: /${pinfo.name}-adminui/src/views/${pinfo.nameShortLow}/${table.shortName}
content:
  <template>
    <div class="app-container">
      <el-form v-show="showSearch" :inline="true" class="demo-form-inline" size="mini">
  <% for(col in columns) { 
    var _colComment = col.comment;
    if(isEmpty(col.comment)){
      _colComment = col.name;
    }
  %>
  	<% if("Date" == col.javaTypeBox){ %>
        <el-form-item>
          <el-date-picker v-model="queryParams.params.${col.name}Start" type="date" placeholder="${_colComment}始" value-format="yyyy-MM-dd" clearable />
          <el-date-picker v-model="queryParams.params.${col.name}End" type="date" placeholder="${_colComment}止" value-format="yyyy-MM-dd" clearable />
        </el-form-item>
      <% } else { %>
        <el-form-item><el-input v-model='queryParams.params.${col.name}' placeholder="${_colComment}" clearable /></el-form-item>
      <% } %>
  <% } %>
        <el-form-item>
          <el-button type="success" icon="el-icon-search" @click="dosearch">搜索</el-button>
          <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
        </el-form-item>
      </el-form>
      <el-row :gutter="10" class="mb8">
        <el-col :span="1.5"><el-button type="primary" plain icon="el-icon-plus" size="mini" @click="showAddView">新增</el-button></el-col>
        <right-toolbar :showSearch.sync="showSearch" @queryTable="loadList"></right-toolbar>
      </el-row>
      <tablepagging :tableloading="tableLoading" :datalist="datalist" :queryparams="queryParams" @reloadlist="loadList" @showeditview="showEditView" @showinfoview="showInfoView" />
      <editdialog ref="editDialog" @reloadlist="loadList" />
      <infodrawer ref="infoDrawer" />
    </div>
  </template>
  <script>
  import tablepagging from './tablepagging'
  import editdialog from './editdialog'
  import infodrawer from './infodrawer'
  import req from '@/api/${pinfo.nameShortLow}/${table.shortName}'
  export default {
    name: '${pinfo.nameShort}${table.entityClassName}Index',
    components: { tablepagging, editdialog, infodrawer },
    data() {
      return {
        showSearch: true,
        tableLoading: false,
        datalist: [],
        queryParams: {
          current: 1,
          size: 10,
          total: 0,
          params: {
  <% for(col in columns) { 
    var _colComment = col.comment;
    if(isEmpty(col.comment)){
      _colComment = col.name;
    }
  %>
  <% if(colLP.last){ %>
  	<% if("Date" == col.javaTypeBox){ %>
            ${col.name}Start: '', // ${_colComment}
            ${col.name}End: '' // ${_colComment}
      <% } else { %>
            ${col.name}: '' // ${_colComment}
      <% } %>
  <% } else { %>
  	<% if("Date" == col.javaTypeBox){ %>
            ${col.name}Start: '', // ${_colComment}
            ${col.name}End: '', // ${_colComment}
      <% } else { %>
            ${col.name}: '', // ${_colComment}
      <% } %>
  <% } %>
  <% } %>
          }
        }
      }
    },
    created: function() {
      this.loadList()
    },
    methods: {
      dosearch() {
        this.queryParams.current = 1
        this.loadList()
      },
      resetQuery() {
  <% for(col in columns) { 
    var _colComment = col.comment;
    if(isEmpty(col.comment)){
      _colComment = col.name;
    }
  %>
  	<% if("Date" == col.javaTypeBox){ %>
        this.queryParams.params.${col.name}Start = '' // ${_colComment}
        this.queryParams.params.${col.name}End = '' // ${_colComment}
      <% } else { %>
        this.queryParams.params.${col.name} = '' // ${_colComment}
      <% } %>
  <% } %>
        this.dosearch()
      },
      loadList() {
        const _this = this;
        this.tableLoading = true;
        req.listPage(this.queryParams).then(resp => {
          _this.tableLoading = false
          const data = resp.data
          _this.queryParams.total = data.total
          _this.datalist = data.records
        }).catch(() => { _this.tableLoading = false })
      },
      showAddView() {
        this.$refs["editDialog"].showAddView()
      },
      showEditView(row) {
        this.$refs["editDialog"].showEditView(row)
      },
      showInfoView(row) {
        this.$refs['infoDrawer'].showView(row)
      }
    }
  }
  </script>
  <style lang="scss" scoped></style>


groupName: ruoyi-ui
name: editdialog.vue
fileName: editdialog.vue
remark: 表弹出窗口编辑页
fileFolder: /${pinfo.name}-adminui/src/views/${pinfo.nameShortLow}/${table.shortName}
content:
  <template>
    <el-dialog :visible.sync="dlgvisible" :title="dlgtitle" :before-close="resetForm" :close-on-click-modal="false" width="80%">
      <el-form :model="formobj" :rules="rules" ref="form_obj" label-width="200px" label-suffix='：' size='small' style="margin-right:100px">
  <% for(col in columns) { 
    var _colComment = col.comment;
    if(isEmpty(col.comment)){
      _colComment = col.name;
    }
  %>
  	<% if("Date" == col.javaTypeBox){ %>
        <el-form-item label="${_colComment}" prop="${col.name}"><el-date-picker v-model="formobj.${col.name}" type="date" placeholder="${_colComment}" value-format="yyyy-MM-dd" clearable /></el-form-item>
      <% } else { %>
        <el-form-item label="${_colComment}" prop="${col.name}"><el-input v-model='formobj.${col.name}' placeholder="${_colComment}" clearable /></el-form-item>
      <% } %>
  <% } %>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="resetForm" size="small">取 消</el-button>
        <el-button :disabled="submitdisabled" type="primary" @click="submitForm()" size="small">保 存</el-button>
      </span>
    </el-dialog>
  </template>
  <script>
  import req from '@/api/${pinfo.nameShortLow}/${table.shortName}'
  export default {
    name: '${pinfo.nameShort}${table.entityClassName}EditDialog',
    props: {},
    data() {
      return {
        dlgvisible: false,
        dlgtitle: '',
        formobj: {
          id : '',
  <% for(col in columns) { 
    var _colComment = col.comment;
    if(isEmpty(col.comment)){
      _colComment = col.name;
    }
  %>
  <% if(colLP.last){ %>
          ${col.name}: '' // ${_colComment}
  <% } else { %>
          ${col.name}: '', // ${_colComment}
  <% } %>
  <% } %>
        },
        rules: {
  <% for(col in columns) { 
    var _colComment = col.comment;
    if(isEmpty(col.comment)){
      _colComment = col.name;
    }
  %>
  <% if(colLP.last){ %>
          ${col.name}: [{ required: true, message: '${_colComment}不能为空', trigger: 'blur' }] // ${_colComment}
  <% } else { %>
          ${col.name}: [{ required: true, message: '${_colComment}不能为空', trigger: 'blur' }], // ${_colComment}
  <% } %>
  <% } %>
        },
        submitdisabled: false
      }
    },
    created: function() {},
    methods: {
      resetForm(isreload) {
        if ('true' == isreload) this.$emit('reloadlist')
        this.formobj.id = ''
  <% for(col in columns) {
    var _colComment = col.comment;
    if(isEmpty(col.comment)){
      _colComment = col.name;
    }
  %>
        this.formobj.${col.name} = '' // ${_colComment}
  <% } %>
        this.$refs['form_obj'].resetFields()
        this.dlgvisible = false
      },
      showAddView() {
        this.dlgtitle = "添加${table.comment}"
        this.dlgvisible = true;
      },
      showEditView(row) {
        this.dlgtitle = "修改${table.comment}";
        this.dlgvisible = true
        const _this = this;
        req.fetch(row.id).then(resp => {
          const vdata = resp.data
          _this.formobj.id = vdata.id
  <% for(col in columns) {
    var _colComment = col.comment;
    if(isEmpty(col.comment)){
      _colComment = col.name;
    }
  %>
          _this.formobj.${col.name} = vdata.${col.name} // ${_colComment}
  <% } %>
        });
      },
      submitForm() {
        const _this = this;
        this.$refs['form_obj'].validate((valid) => {
          if (valid) {
            this.submitdisabled = true
            req.save(this.formobj).then(resp => {
              this.submitdisabled = false
              _this.$message({ showClose: true, type: 'success', message: resp.msg })
              _this.resetForm('true')
            }).catch(() => { this.submitdisabled = false })
          } else { return false }
        })
      }
    }
  }
  </script>
  <style lang="scss" scoped></style>


groupName: ruoyi-ui
name: tablepagging.vue
fileName: tablepagging.vue
remark: 表格带分页
fileFolder: /${pinfo.name}-adminui/src/views/${pinfo.nameShortLow}/${table.shortName}
content:
  <template>
    <div>
      <el-table v-loading="tableloading" :data="datalist" border stripe @selection-change="handleSelectionChange" size="mini" style="width: 100%">
        <el-table-column type="selection" align="center" width="40" />
        <el-table-column type="index" align="center" width="40" />
  <% for(col in columns) { 
    var _colComment = col.comment;
    if(isEmpty(col.comment)){
      _colComment = col.name;
    }
  %>
        <el-table-column prop="${col.name}" label="${_colComment}" />
  <% } %>
        <el-table-column fixed="right" label="操作" align="center" width="210">
          <template slot-scope="scope">
            <el-button type="primary" class="table-btn" size="mini" @click="showEditView(scope.row)">编辑</el-button>
            <el-button type="danger" class="table-btn" size="mini" @click="delOne(scope.row)">删除</el-button>
            <el-button type="success" class="table-btn" size="mini" @click="showInfoView(scope.row)">详情</el-button>
          </template>
        </el-table-column>
      </el-table>
      <pagging :queryparams="queryparams" :multipleselection="multipleSelection" @reloading="reLoadingTable" @dodelete="doDelete" idname="id" />
    </div>
  </template>
  <script>
  import pagging from '@/components/Pagging'
  import req from '@/api/${pinfo.nameShortLow}/${table.shortName}'
  export default {
    name: '${pinfo.nameShort}${table.entityClassName}TablePagging',
    components: { pagging },
    props: {
      tableloading: Boolean,
      datalist: Array,
      queryparams: Object
    },
    data() {
      return {
        multipleSelection: []
      }
    },
    methods: {
      handleSelectionChange(val) {
        this.multipleSelection = val
      },
      reLoadingTable() {
        this.$emit('reloadlist')
      },
      doDelete(ids) {
        let _this = this
        req.delete(ids).then(resp => {
          _this.$message({ type: 'success', message: resp.msg, showClose: true })
          _this.reLoadingTable()
        })
      },
      delOne(row) {
        this.$confirm('此操作将删除所选记录, 是否继续?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          this.doDelete(row.id)
        }).catch(() => {})
      },
      showInfoView(row) {
        this.$emit('showinfoview', row)
      },
      showEditView(row) {
        this.$emit('showeditview',row)
      }
    }
  }
  </script>
  <style lang="scss" scoped></style>


groupName: ruoyi-ui
name: Api.js
fileName: ${table.shortName}.js
remark: 接口文件
fileFolder: /${pinfo.name}-adminui/src/api/${pinfo.nameShortLow}
content:
  import request from '@/utils/request'

  export default {

    list: function() {
      return request({
        url: '/${table.shortName}/list'
      })
    },
    listPage: function(params) {
      return request({
        url: '/${table.shortName}/listPage',
        method: 'post',
        data: params
      })
    },
    delete: function(id) {
      return request({
        url: '/${table.shortName}/del/' + id
      })
    },
    fetch: function(id) {
      return request({
        url: '/${table.shortName}/fetch/' + id
      })
    },
    save: function(params) {
      return request({
        url: '/${table.shortName}/save',
        method: 'post',
        data: params
      })
    }
  }


groupName: default(SpringBoot)
name: 启动测试类
fileName: ${pinfo.nameShort}AppTests.java
remark: 项目启动程序的测试类
fileFolder: /${pinfo.name}-biz/src/test/java/${pinfo.packagePath}
content:
  package ${pinfo.packageName};

  import org.junit.Test;
  import org.junit.runner.RunWith;
  import org.springframework.boot.test.context.SpringBootTest;
  import org.springframework.test.context.junit4.SpringRunner;

  @RunWith(SpringRunner.class)
  @SpringBootTest
  public class ${pinfo.nameShort}AppTests {

  	@Test
  	public void contextLoads() {
  	}

  }


groupName: default(SpringBoot)
name: Menus.sql
fileName: ${pinfo.name}_menus_data.sql
remark: 菜单数据的SQL
fileFolder: /docs/databases/menus/
content:
  -- ----------------------------
  -- 初始化-菜单信息表数据
  -- ----------------------------
  -- 一级菜单
  insert into admin_menu(id,comName,name,path,component,icon,parentId,menuType)
  values(700,'${pinfo.nameShort}', '${pinfo.nameCN}', '/${pinfo.nameShortLow}','Layout', 'system', 0,'M');
  -- 二级菜单
  <% 
    for (tinfo in pinfo.tables){ 
    var _currid = 700+ tinfoLP.index;
    var _tableComment = tinfo.name;
    if(isNotEmpty(tinfo.comment)) {
    _tableComment = tinfo.comment;
    }
  %>
  insert into admin_menu(id,comName,name,path,component,icon,parentId,menuType)
  VALUES(${_currid},'${pinfo.nameShort}${tinfo.entityClassName}Index','${_tableComment}', '${tinfo.shortName}', '${pinfo.nameShortLow}/${tinfo.shortName}/index', 'dict',700, 'C');
  <% 
  } 
  %>


groupName: yxt(SpringCloud-Nacos)
name: 子项目pom文件
fileName: pom.xml
remark: 服务模块子项目的pom文件
fileFolder: /
content:
  <?xml version="1.0" encoding="UTF-8"?>
  <project xmlns="http://maven.apache.org/POM/4.0.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
      <modelVersion>4.0.0</modelVersion>

      <groupId>${pinfo.packageName}</groupId>
      <artifactId>${pinfo.name}</artifactId>
      <version>0.0.1</version>
      <modules>
          <module>${pinfo.name}-api</module>
          <module>${pinfo.name}-biz</module>
      </modules>
      <packaging>pom</packaging>
      <name>${pinfo.name}</name>
      <description>${pinfo.nameCN}-${pinfo.nameDesc}</description>

  </project>


groupName: yxt(SpringCloud-Nacos)
name: 子项目biz的pom文件
fileName: pom.xml
remark: 微服务模块子项目业务逻辑的pom文件
fileFolder: /${pinfo.name}-biz
content:
  <?xml version="1.0" encoding="UTF-8"?>
  <project xmlns="http://maven.apache.org/POM/4.0.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
      <parent>
          <groupId>com.yxt</groupId>
          <artifactId>yxt-parent</artifactId>
          <version>0.0.1</version>
          <relativePath/>
      </parent>
      <modelVersion>4.0.0</modelVersion>

      <artifactId>${pinfo.name}-biz</artifactId>
      <groupId>${pinfo.packageName}</groupId>
      <version>0.0.1</version>

      <dependencies>
          <dependency>
              <groupId>org.springframework.boot</groupId>
              <artifactId>spring-boot-starter-cache</artifactId>
          </dependency>
          <dependency>
              <groupId>${pinfo.packageName}</groupId>
              <artifactId>${pinfo.name}-api</artifactId>
              <version>0.0.1</version>
          </dependency>
          <dependency>
              <groupId>com.yxt</groupId>
              <artifactId>yxt-common-base</artifactId>
              <version>0.0.1</version>
          </dependency>
          <dependency>
              <groupId>com.alibaba.cloud</groupId>
              <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
          </dependency>
        
          <dependency>
              <groupId>org.projectlombok</groupId>
              <artifactId>lombok</artifactId>
              <optional>true</optional>
          </dependency>

          ${pinfo.dbTypeMaven}
          <dependency>
              <groupId>org.apache.poi</groupId>
              <artifactId>poi-ooxml</artifactId>
          </dependency>
          <dependency>
              <groupId>io.jsonwebtoken</groupId>
              <artifactId>jjwt</artifactId>
          </dependency>
          <dependency>
              <groupId>cn.hutool</groupId>
              <artifactId>hutool-extra</artifactId>
          </dependency>
          <dependency>
              <groupId>cn.hutool</groupId>
              <artifactId>hutool-http</artifactId>
          </dependency>
          <dependency>
              <groupId>cn.hutool</groupId>
              <artifactId>hutool-crypto</artifactId>
          </dependency>
          <dependency>
              <groupId>cn.hutool</groupId>
              <artifactId>hutool-cache</artifactId>
          </dependency>

          <dependency>
              <groupId>com.github.xiaoymin</groupId>
              <artifactId>knife4j-spring-boot-starter</artifactId>
          </dependency>

          <dependency>
              <groupId>org.springframework.boot</groupId>
              <artifactId>spring-boot-starter-test</artifactId>
              <scope>test</scope>
          </dependency>
      </dependencies>

      <build>
          <plugins>
              <plugin>
                  <groupId>org.springframework.boot</groupId>
                  <artifactId>spring-boot-maven-plugin</artifactId>
                  <executions>
                      <execution>
                          <goals>
                              <goal>repackage</goal>
                          </goals>
                      </execution>
                  </executions>
              </plugin>
          </plugins>
          <resources>
              <resource>
                  <directory>src/main/java</directory>
                  <includes>
                      <include>**/*Mapper.xml</include>
                  </includes>
              </resource>
              <resource>
                  <directory>src/main/resources</directory>
                  <includes>
                      <include>**/*.*</include>
                  </includes>
                  <filtering>false</filtering>
              </resource>
          </resources>
      </build>
  </project>


groupName: yxt(SpringCloud-Nacos)
name: 子项目api的pom文件
fileName: pom.xml
remark: 微服务模块子项目接口的pom文件
fileFolder: /${pinfo.name}-api
content:
  <?xml version="1.0" encoding="UTF-8"?>
  <project xmlns="http://maven.apache.org/POM/4.0.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
      <parent>
          <groupId>com.yxt</groupId>
          <artifactId>yxt-parent</artifactId>
          <version>0.0.1</version>
          <relativePath/>
      </parent>
      <modelVersion>4.0.0</modelVersion>

      <artifactId>${pinfo.name}-api</artifactId>
      <groupId>${pinfo.packageName}</groupId>
      <version>0.0.1</version>

      <dependencies>
          <dependency>
              <groupId>com.yxt</groupId>
              <artifactId>yxt-common-core</artifactId>
              <version>0.0.1</version>
          </dependency>
          <dependency>
              <groupId>org.springframework.cloud</groupId>
              <artifactId>spring-cloud-starter-openfeign</artifactId>
          </dependency>
          <dependency>
              <groupId>org.projectlombok</groupId>
              <artifactId>lombok</artifactId>
              <optional>true</optional>
          </dependency>
          <dependency>
              <groupId>org.hibernate.validator</groupId>
              <artifactId>hibernate-validator</artifactId>
          </dependency>
      </dependencies>

  </project>


groupName: yxt(SpringCloud-Nacos)
name: 子项目application.yml
fileName: application.yml
remark: 配置文件application.yml
fileFolder: /${pinfo.name}-biz/src/main/resources
content:
  server:
    port: ${pinfo.serverPort}
  spring:
    application:
      name: ${pinfo.name}
    profiles: 
      active: dev
    messages:
      basename: i18n/messages
    servlet:
      multipart:
        max-file-size: 50MB
        max-request-size: 100MB
    output:
      ansi:
        enabled: ALWAYS

  mybatis-plus:
    mapper-locations: classpath*:**Mapper.xml
    global-config:
      refresh: true
      db-config:
        id-type: 0
        db-type: ${pinfo.dbType}
    configuration:
      map-underscore-to-camel-case: false
      cache-enabled: true
      call-setters-on-nulls: true

  #hystrix的超时时间
  hystrix:
    command:
      default:
        execution:
          timeout:
            enabled: true
          isolation:
            thread:
              timeoutInMilliseconds: 30000
  #ribbon的超时时间
  ribbon:
    ReadTimeout: 30000
    ConnectTimeout: 30000


groupName: yxt(SpringCloud-Nacos)
name: 子项目application-dev.yml
fileName: application-dev.yml
remark: 配置文件application-dev.yml
fileFolder: /${pinfo.name}-biz/src/main/resources
content:
  spring:
    datasource:
      driver-class-name: ${pinfo.dbDriver}
      url: ${pinfo.dbUrl}
      username: ${pinfo.dbUsername}
      password: ${pinfo.dbPassword}
    nacos:
      discovery:
        server-addr: 127.0.0.1:8848
    redis:
      database: 6  # Redis数据库索引（默认为0）
      host: 127.0.0.1
      jedis:
        pool:
          max-active: -1  #连接池最大连接数（使用负值表示没有限制）
          max-idle: 8  #连接池中的最大空闲连接
          max-wait: -1   # 连接池最大阻塞等待时间（使用负值表示没有限制）
          min-idle: 0  # 连接池中的最小空闲连接
      password:
      port: 6379
      timeout: 0  # 连接超时时间（毫秒）
  image:
    upload:
      path: static/upload/
    url:
      prefix: http://127.0.0.1:${pinfo.serverPort}/upload/


groupName: yxt(SpringCloud-Nacos)
name: 子项目App
fileName: ${pinfo.nameShort}App.java
remark: 微服务启动程序Application
fileFolder: /${pinfo.name}-biz/src/main/java/${pinfo.packagePath}
content:
  /*********************************************************
   *********************************************************
   ********************                  *******************
   *************                                ************
   *******                  _oo0oo_                  *******
   ***                     o8888888o                     ***
   *                       88" . "88                       *
   *                       (| -_- |)                       *
   *                       0\  =  /0                       *
   *                     ___/`---'\___                     *
   *                   .' \\|     |// '.                   *
   *                  / \\|||  :  |||// \                  *
   *                 / _||||| -:- |||||- \                 *
   *                |   | \\\  -  /// |   |                *
   *                | \_|  ''\---/''  |_/ |                *
   *                \  .-\__  '-'  ___/-. /                *
   *              ___'. .'  /--.--\  `. .'___              *
   *           ."" '<  `.___\_<|>_/___.' >' "".            *
   *          | | :  `- \`.;`\ _ /`;.`/ - ` : | |          *
   *          \  \ `_.   \_ __\ /__ _/   .-` /  /          *
   *      =====`-.____`.___ \_____/___.-`___.-'=====       *
   *                        `=---='                        *
   *      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      *
   *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
   *********************************************************/
  package ${pinfo.packageName};

  import org.springframework.boot.SpringApplication;
  import org.springframework.boot.autoconfigure.SpringBootApplication;
  import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
  import org.springframework.cloud.openfeign.EnableFeignClients;

  /**
   * Project: ${pinfo.name}(${pinfo.nameCN}) <br/>
   * File: ${pinfo.nameShort}App.java <br/>
   * Class: ${pinfo.packageName}.${pinfo.nameShort}App <br/>
   * Description: ${pinfo.nameDesc} . <br/>
   * Copyright: ${pinfo.copyright} <br/>
   * Company: ${pinfo.company} <br/>
   <% var date = date(); %>
   * Makedate: ${date,dateFormat="yyyy-MM-dd HH:mm:ss"} <br/>
   *
   * @author ${pinfo.author}
   * @version 1.0
   * @since 1.0
   */
  @EnableDiscoveryClient
  @SpringBootApplication(scanBasePackages = {
          "com.yxt.common.base.config",
          "${pinfo.packageName}"
  })
  @EnableFeignClients(basePackages = {"${pinfo.packageName}"})
  public class ${pinfo.nameShort}App {

      public static void main(String[] args) {
          SpringApplication.run(${pinfo.nameShort}App.class, args);
      }
  }


groupName: yxt(SpringCloud-Nacos)
name: yxt-api-entity
fileName: ${table.entityClassName}.java
remark: 实体类
fileFolder: /${pinfo.name}-api/src/main/java/${pinfo.packagePath}/api/${table.shortName}
content:
  /*********************************************************
   *********************************************************
   ********************                  *******************
   *************                                ************
   *******                  _oo0oo_                  *******
   ***                     o8888888o                     ***
   *                       88" . "88                       *
   *                       (| -_- |)                       *
   *                       0\  =  /0                       *
   *                     ___/`---'\___                     *
   *                   .' \\|     |// '.                   *
   *                  / \\|||  :  |||// \                  *
   *                 / _||||| -:- |||||- \                 *
   *                |   | \\\  -  /// |   |                *
   *                | \_|  ''\---/''  |_/ |                *
   *                \  .-\__  '-'  ___/-. /                *
   *              ___'. .'  /--.--\  `. .'___              *
   *           ."" '<  `.___\_<|>_/___.' >' "".            *
   *          | | :  `- \`.;`\ _ /`;.`/ - ` : | |          *
   *          \  \ `_.   \_ __\ /__ _/   .-` /  /          *
   *      =====`-.____`.___ \_____/___.-`___.-'=====       *
   *                        `=---='                        *
   *      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      *
   *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
   *********************************************************/
  package ${pinfo.packageName}.api.${table.shortName};

  <% 
    var _date = date(); 
    var _tableComment = table.name;
    if(isNotEmpty(table.comment)) {
      _tableComment = table.comment;
    }
    var _beanName = "IdEntity";
    if(1==table.entityType) { 
      _beanName = "Entity";
    }
    if(3==table.entityType) {
      _beanName = "BaseEntity";
    }
  %>
  import com.baomidou.mybatisplus.annotation.TableName;
  import com.yxt.common.core.domain.${_beanName};
  <% if(table.hasDateField) { %>
  import com.fasterxml.jackson.annotation.JsonFormat;
  import java.util.Date;
  <% } %>
  import io.swagger.annotations.ApiModel;
  import io.swagger.annotations.ApiModelProperty;
  import lombok.Data;

  /**
   * Project: ${pinfo.name}(${pinfo.nameCN}) <br/>
   * File: ${table.entityClassName}.java <br/>
   * Class: ${pinfo.packageName}.api.${table.shortName}.${table.entityClassName} <br/>
   * Description: ${_tableComment}. <br/>
   * Copyright: ${pinfo.copyright} <br/>
   * Company: ${pinfo.company} <br/>
   * Makedate: ${_date,dateFormat="yyyy-MM-dd HH:mm:ss"} <br/>
   *
   * @author ${pinfo.author}
   * @version 1.0
   * @since 1.0
   */
  @Data
  @ApiModel(value = "${_tableComment}", description = "${_tableComment}")
  @TableName("${table.name}")
  public class ${table.entityClassName} extends ${_beanName} {
      private static final long serialVersionUID = 1L;

  <% for(col in columns) { %>
  	<% if("Date" == col.javaTypeBox){ %>
      @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
      <% } %>
  	<% if(isEmpty(col.comment)){ %>
  	@ApiModelProperty("${col.name}")
  	<% } else {%>
  	@ApiModelProperty("${col.comment}")
      <% } %>
      <% if(isEmpty(col.defVal)){ %>
      private ${col.javaTypeBox} ${col.name}; // ${col.comment}
      <% } else { %>
      <% if("Date" == col.type){ %>
      private ${col.javaTypeBox} ${col.name} = new Date(); // ${col.comment}
      <% } else if("String" == col.type){ %>
      private ${col.javaTypeBox} ${col.name} = "${col.defVal}"; // ${col.comment}
      <% } else { %>
      private ${col.javaTypeBox} ${col.name} = ${col.defVal}; // ${col.comment}
      <% } %>
      <% } %>
  <% } %>

  }


groupName: yxt(SpringCloud-Nacos)
name: yxt-api-Query
fileName: ${table.entityClassName}Query.java
remark: 查询条件
fileFolder: /${pinfo.name}-api/src/main/java/${pinfo.packagePath}/api/${table.shortName}
content:
  /*********************************************************
   *********************************************************
   ********************                  *******************
   *************                                ************
   *******                  _oo0oo_                  *******
   ***                     o8888888o                     ***
   *                       88" . "88                       *
   *                       (| -_- |)                       *
   *                       0\  =  /0                       *
   *                     ___/`---'\___                     *
   *                   .' \\|     |// '.                   *
   *                  / \\|||  :  |||// \                  *
   *                 / _||||| -:- |||||- \                 *
   *                |   | \\\  -  /// |   |                *
   *                | \_|  ''\---/''  |_/ |                *
   *                \  .-\__  '-'  ___/-. /                *
   *              ___'. .'  /--.--\  `. .'___              *
   *           ."" '<  `.___\_<|>_/___.' >' "".            *
   *          | | :  `- \`.;`\ _ /`;.`/ - ` : | |          *
   *          \  \ `_.   \_ __\ /__ _/   .-` /  /          *
   *      =====`-.____`.___ \_____/___.-`___.-'=====       *
   *                        `=---='                        *
   *      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      *
   *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
   *********************************************************/
  package ${pinfo.packageName}.api.${table.shortName};

  <% 
    var _date = date(); 
    var _tableComment = table.name;
    if(isNotEmpty(table.comment)) {
      _tableComment = table.comment;
    }
    var _beanName = "IdEntity";
    if(1==table.entityType) { 
      _beanName = "Entity";
    }
    if(3==table.entityType) {
      _beanName = "BaseEntity";
    }
  %>

  import com.yxt.common.core.query.Query;

  <% if(table.hasDateField) { %>
  import com.fasterxml.jackson.annotation.JsonFormat;
  import java.util.Date;
  <% } %>
  import io.swagger.annotations.ApiModel;
  import io.swagger.annotations.ApiModelProperty;
  import lombok.Data;

  /**
   * Project: ${pinfo.name}(${pinfo.nameCN}) <br/>
   * File: ${table.entityClassName}Query.java <br/>
   * Class: ${pinfo.packageName}.api.${table.shortName}.${table.entityClassName}Query <br/>
   * Description: ${_tableComment} 查询条件. <br/>
   * Copyright: ${pinfo.copyright} <br/>
   * Company: ${pinfo.company} <br/>
   * Makedate: ${_date,dateFormat="yyyy-MM-dd HH:mm:ss"} <br/>
   *
   * @author ${pinfo.author}
   * @version 1.0
   * @since 1.0
   */
  @Data
  @ApiModel(value = "${_tableComment} 查询条件", description = "${_tableComment} 查询条件")
  public class ${table.entityClassName}Query implements Query {

  <% for(col in columns) { %>
  	<% if("Date" == col.javaTypeBox){ %>
      @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
      <% } %>
  	<% if(isEmpty(col.comment)){ %>
  	@ApiModelProperty("${col.name}")
  	<% } else {%>
  	@ApiModelProperty("${col.comment}")
      <% } %>
      <% if("Date" == col.javaTypeBox){ %>
      private ${col.javaTypeBox} ${col.name}Start; // ${col.comment}
      private ${col.javaTypeBox} ${col.name}End; // ${col.comment}
      <% } else { %>
      private ${col.javaTypeBox} ${col.name}; // ${col.comment}
      <% } %>
  <% } %>

  }


groupName: yxt(SpringCloud-Nacos)
name: yxt-api-Dto
fileName: ${table.entityClassName}Dto.java
remark: 数据传输对象
fileFolder: /${pinfo.name}-api/src/main/java/${pinfo.packagePath}/api/${table.shortName}
content:
  /*********************************************************
   *********************************************************
   ********************                  *******************
   *************                                ************
   *******                  _oo0oo_                  *******
   ***                     o8888888o                     ***
   *                       88" . "88                       *
   *                       (| -_- |)                       *
   *                       0\  =  /0                       *
   *                     ___/`---'\___                     *
   *                   .' \\|     |// '.                   *
   *                  / \\|||  :  |||// \                  *
   *                 / _||||| -:- |||||- \                 *
   *                |   | \\\  -  /// |   |                *
   *                | \_|  ''\---/''  |_/ |                *
   *                \  .-\__  '-'  ___/-. /                *
   *              ___'. .'  /--.--\  `. .'___              *
   *           ."" '<  `.___\_<|>_/___.' >' "".            *
   *          | | :  `- \`.;`\ _ /`;.`/ - ` : | |          *
   *          \  \ `_.   \_ __\ /__ _/   .-` /  /          *
   *      =====`-.____`.___ \_____/___.-`___.-'=====       *
   *                        `=---='                        *
   *      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      *
   *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
   *********************************************************/
  package ${pinfo.packageName}.api.${table.shortName};

  <% 
    var _date = date(); 
    var _tableComment = table.name;
    if(isNotEmpty(table.comment)) {
      _tableComment = table.comment;
    }
    var _beanName = "IdEntity";
    if(1==table.entityType) { 
      _beanName = "Entity";
    }
    if(3==table.entityType) {
      _beanName = "BaseEntity";
    }
  %>

  import com.yxt.common.core.dto.Dto;

  <% if(table.hasDateField) { %>
  import com.fasterxml.jackson.annotation.JsonFormat;
  import java.util.Date;
  <% } %>
  import io.swagger.annotations.ApiModel;
  import io.swagger.annotations.ApiModelProperty;
  import lombok.Data;

  /**
   * Project: ${pinfo.name}(${pinfo.nameCN}) <br/>
   * File: ${table.entityClassName}Dto.java <br/>
   * Class: ${pinfo.packageName}.api.${table.shortName}.${table.entityClassName}Dto <br/>
   * Description: ${_tableComment} 数据传输对象. <br/>
   * Copyright: ${pinfo.copyright} <br/>
   * Company: ${pinfo.company} <br/>
   * Makedate: ${_date,dateFormat="yyyy-MM-dd HH:mm:ss"} <br/>
   *
   * @author ${pinfo.author}
   * @version 1.0
   * @since 1.0
   */
  @Data
  @ApiModel(value = "${_tableComment} 数据传输对象", description = "${_tableComment} 数据传输对象")
  public class ${table.entityClassName}Dto implements Dto {

      private String sid; // sid

  <% for(col in columns) { %>
  	<% if("Date" == col.javaTypeBox){ %>
      @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
      <% } %>
  	<% if(isEmpty(col.comment)){ %>
  	@ApiModelProperty("${col.name}")
  	<% } else {%>
  	@ApiModelProperty("${col.comment}")
      <% } %>
      <% if("Date" == col.javaTypeBox){ %>
      private ${col.javaTypeBox} ${col.name}Start; // ${col.comment}
      private ${col.javaTypeBox} ${col.name}End; // ${col.comment}
      <% } else { %>
      private ${col.javaTypeBox} ${col.name}; // ${col.comment}
      <% } %>
  <% } %>

  }


groupName: yxt(SpringCloud-Nacos)
name: yxt-api-Vo
fileName: ${table.entityClassName}Vo.java
remark: 视图数据对象
fileFolder: /${pinfo.name}-api/src/main/java/${pinfo.packagePath}/api/${table.shortName}
content:
  /*********************************************************
   *********************************************************
   ********************                  *******************
   *************                                ************
   *******                  _oo0oo_                  *******
   ***                     o8888888o                     ***
   *                       88" . "88                       *
   *                       (| -_- |)                       *
   *                       0\  =  /0                       *
   *                     ___/`---'\___                     *
   *                   .' \\|     |// '.                   *
   *                  / \\|||  :  |||// \                  *
   *                 / _||||| -:- |||||- \                 *
   *                |   | \\\  -  /// |   |                *
   *                | \_|  ''\---/''  |_/ |                *
   *                \  .-\__  '-'  ___/-. /                *
   *              ___'. .'  /--.--\  `. .'___              *
   *           ."" '<  `.___\_<|>_/___.' >' "".            *
   *          | | :  `- \`.;`\ _ /`;.`/ - ` : | |          *
   *          \  \ `_.   \_ __\ /__ _/   .-` /  /          *
   *      =====`-.____`.___ \_____/___.-`___.-'=====       *
   *                        `=---='                        *
   *      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      *
   *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
   *********************************************************/
  package ${pinfo.packageName}.api.${table.shortName};

  <% 
    var _date = date(); 
    var _tableComment = table.name;
    if(isNotEmpty(table.comment)) {
      _tableComment = table.comment;
    }
    var _beanName = "IdEntity";
    if(1==table.entityType) { 
      _beanName = "Entity";
    }
    if(3==table.entityType) {
      _beanName = "BaseEntity";
    }
  %>

  import com.yxt.common.core.vo.Vo;

  <% if(table.hasDateField) { %>
  import com.fasterxml.jackson.annotation.JsonFormat;
  import java.util.Date;
  <% } %>
  import io.swagger.annotations.ApiModel;
  import io.swagger.annotations.ApiModelProperty;
  import lombok.Data;

  /**
   * Project: ${pinfo.name}(${pinfo.nameCN}) <br/>
   * File: ${table.entityClassName}Vo.java <br/>
   * Class: ${pinfo.packageName}.api.${table.shortName}.${table.entityClassName}Vo <br/>
   * Description: ${_tableComment} 视图数据对象. <br/>
   * Copyright: ${pinfo.copyright} <br/>
   * Company: ${pinfo.company} <br/>
   * Makedate: ${_date,dateFormat="yyyy-MM-dd HH:mm:ss"} <br/>
   *
   * @author ${pinfo.author}
   * @version 1.0
   * @since 1.0
   */
  @Data
  @ApiModel(value = "${_tableComment} 视图数据对象", description = "${_tableComment} 视图数据对象")
  public class ${table.entityClassName}Vo implements Vo {

      private String sid; // sid

  <% for(col in columns) { %>
  	<% if("Date" == col.javaTypeBox){ %>
      @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
      <% } %>
  	<% if(isEmpty(col.comment)){ %>
  	@ApiModelProperty("${col.name}")
  	<% } else {%>
  	@ApiModelProperty("${col.comment}")
      <% } %>
      <% if("Date" == col.javaTypeBox){ %>
      private ${col.javaTypeBox} ${col.name}Start; // ${col.comment}
      private ${col.javaTypeBox} ${col.name}End; // ${col.comment}
      <% } else { %>
      private ${col.javaTypeBox} ${col.name}; // ${col.comment}
      <% } %>
  <% } %>

  }


groupName: yxt(SpringCloud-Nacos)
name: yxt-api-Feign
fileName: ${table.entityClassName}Feign.java
remark: 微服务功能接口
fileFolder: /${pinfo.name}-api/src/main/java/${pinfo.packagePath}/api/${table.shortName}
content:
  /*********************************************************
   *********************************************************
   ********************                  *******************
   *************                                ************
   *******                  _oo0oo_                  *******
   ***                     o8888888o                     ***
   *                       88" . "88                       *
   *                       (| -_- |)                       *
   *                       0\  =  /0                       *
   *                     ___/`---'\___                     *
   *                   .' \\|     |// '.                   *
   *                  / \\|||  :  |||// \                  *
   *                 / _||||| -:- |||||- \                 *
   *                |   | \\\  -  /// |   |                *
   *                | \_|  ''\---/''  |_/ |                *
   *                \  .-\__  '-'  ___/-. /                *
   *              ___'. .'  /--.--\  `. .'___              *
   *           ."" '<  `.___\_<|>_/___.' >' "".            *
   *          | | :  `- \`.;`\ _ /`;.`/ - ` : | |          *
   *          \  \ `_.   \_ __\ /__ _/   .-` /  /          *
   *      =====`-.____`.___ \_____/___.-`___.-'=====       *
   *                        `=---='                        *
   *      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      *
   *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
   *********************************************************/
  package ${pinfo.packageName}.api.${table.shortName};

  <% 
    var _date = date(); 
    var _tableComment = table.name;
    if(isNotEmpty(table.comment)) {
      _tableComment = table.comment;
    }
  %>
  import io.swagger.annotations.Api;
  import io.swagger.annotations.ApiOperation;
  import com.yxt.common.core.query.PagerQuery;
  import com.yxt.common.core.result.ResultBean;
  import com.yxt.common.core.vo.PagerVo;
  import org.springframework.cloud.openfeign.FeignClient;
  import org.springframework.web.bind.annotation.*;

  import java.util.List;

  /**
   * Project: ${pinfo.name}(${pinfo.nameCN}) <br/>
   * File: ${table.entityClassName}Feign.java <br/>
   * Class: ${pinfo.packageName}.api.${table.shortName}.${table.entityClassName}Feign <br/>
   * Description: ${_tableComment}. <br/>
   * Copyright: ${pinfo.copyright} <br/>
   * Company: ${pinfo.company} <br/>
   * Makedate: ${_date,dateFormat="yyyy-MM-dd HH:mm:ss"} <br/>
   *
   * @author ${pinfo.author}
   * @version 1.0
   * @since 1.0
   */
  @Api(tags = "${_tableComment}")
  @FeignClient(
          contextId = "${pinfo.name}-${table.entityClassName}",
          name = "${pinfo.name}",
          path = "v1/${table.shortName}",
          fallback = ${table.entityClassName}FeignFallback.class)
  public interface ${table.entityClassName}Feign {

      @ApiOperation("根据条件分页查询数据的列表")
      @PostMapping("/listPage")
      @ResponseBody
      public ResultBean<PagerVo<${table.entityClassName}Vo>> listPage(@RequestBody PagerQuery<${table.entityClassName}Query> pq);

      @ApiOperation("新增或修改")
      @PostMapping("/save")
      @ResponseBody
      public ResultBean save(@RequestBody ${table.entityClassName}Dto dto);
          
      @ApiOperation("根据sid删除记录")
      @DeleteMapping("/delBySids")
      @ResponseBody
      public ResultBean delBySids(@RequestBody String[] sids);
        
      @ApiOperation("根据SID获取一条记录")
      @GetMapping("/fetchDetailsBySid/{sid}")
      @ResponseBody
      public ResultBean<${table.entityClassName}DetailsVo> fetchDetailsBySid(@PathVariable("sid") String sid);
  }


groupName: yxt(SpringCloud-Nacos)
name: yxt-api-FeignFallback
fileName: ${table.entityClassName}FeignFallback.java
remark: 微服务功能接口调用失败返回信息
fileFolder: /${pinfo.name}-api/src/main/java/${pinfo.packagePath}/api/${table.shortName}
content:
  /*********************************************************
   *********************************************************
   ********************                  *******************
   *************                                ************
   *******                  _oo0oo_                  *******
   ***                     o8888888o                     ***
   *                       88" . "88                       *
   *                       (| -_- |)                       *
   *                       0\  =  /0                       *
   *                     ___/`---'\___                     *
   *                   .' \\|     |// '.                   *
   *                  / \\|||  :  |||// \                  *
   *                 / _||||| -:- |||||- \                 *
   *                |   | \\\  -  /// |   |                *
   *                | \_|  ''\---/''  |_/ |                *
   *                \  .-\__  '-'  ___/-. /                *
   *              ___'. .'  /--.--\  `. .'___              *
   *           ."" '<  `.___\_<|>_/___.' >' "".            *
   *          | | :  `- \`.;`\ _ /`;.`/ - ` : | |          *
   *          \  \ `_.   \_ __\ /__ _/   .-` /  /          *
   *      =====`-.____`.___ \_____/___.-`___.-'=====       *
   *                        `=---='                        *
   *      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      *
   *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
   *********************************************************/
  package ${pinfo.packageName}.api.${table.shortName};

  <% 
    var _date = date(); 
    var _tableComment = table.name;
    if(isNotEmpty(table.comment)) {
      _tableComment = table.comment;
    }
  %>
  import com.yxt.common.core.query.PagerQuery;
  import com.yxt.common.core.result.ResultBean;
  import com.yxt.common.core.vo.PagerVo;
  import org.springframework.stereotype.Component;

  import java.util.List;

  /**
   * Project: ${pinfo.name}(${pinfo.nameCN}) <br/>
   * File: ${table.entityClassName}FeignFallback.java <br/>
   * Class: ${pinfo.packageName}.api.${table.shortName}.${table.entityClassName}FeignFallback <br/>
   * Description: ${_tableComment}. <br/>
   * Copyright: ${pinfo.copyright} <br/>
   * Company: ${pinfo.company} <br/>
   * Makedate: ${_date,dateFormat="yyyy-MM-dd HH:mm:ss"} <br/>
   *
   * @author ${pinfo.author}
   * @version 1.0
   * @since 1.0
   */
  @Component
  public class ${table.entityClassName}FeignFallback implements ${table.entityClassName}Feign {

  	@Override
  	public ResultBean<PagerVo<${table.entityClassName}Vo>> listPage(PagerQuery<${table.entityClassName}Query> pq){
  		ResultBean rb = ResultBean.fireFail();
  		return rb.setMsg("接口${pinfo.name}/${table.shortName}/listPage无法访问");
  	}

  	@Override
  	public ResultBean save(${table.entityClassName}Dto dto){
  		return ResultBean.fireFail().setMsg("接口${pinfo.name}/${table.shortName}/save无法访问");
  	}

  	@Override
  	public ResultBean delBySids( String[] sids){
  		return ResultBean.fireFail().setMsg("接口${pinfo.name}/${table.shortName}/delBySids无法访问");
  	}

  	@Override
  	public ResultBean<${table.entityClassName}DetailsVo> fetchDetailsBySid(String sid){
  		ResultBean rb = ResultBean.fireFail();
  		return rb.setMsg("接口${pinfo.name}/${table.shortName}/fetchDetailsBySid无法访问");
  	}
  }


groupName: yxt(SpringCloud-Nacos)
name: yxt-biz-Rest
fileName: ${table.entityClassName}Rest.java
remark: 微服务功能接口的实现
fileFolder: /${pinfo.name}-biz/src/main/java/${pinfo.packagePath}/biz/${table.shortName}
content:
  /*********************************************************
   *********************************************************
   ********************                  *******************
   *************                                ************
   *******                  _oo0oo_                  *******
   ***                     o8888888o                     ***
   *                       88" . "88                       *
   *                       (| -_- |)                       *
   *                       0\  =  /0                       *
   *                     ___/`---'\___                     *
   *                   .' \\|     |// '.                   *
   *                  / \\|||  :  |||// \                  *
   *                 / _||||| -:- |||||- \                 *
   *                |   | \\\  -  /// |   |                *
   *                | \_|  ''\---/''  |_/ |                *
   *                \  .-\__  '-'  ___/-. /                *
   *              ___'. .'  /--.--\  `. .'___              *
   *           ."" '<  `.___\_<|>_/___.' >' "".            *
   *          | | :  `- \`.;`\ _ /`;.`/ - ` : | |          *
   *          \  \ `_.   \_ __\ /__ _/   .-` /  /          *
   *      =====`-.____`.___ \_____/___.-`___.-'=====       *
   *                        `=---='                        *
   *      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      *
   *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
   *********************************************************/
  package ${pinfo.packageName}.biz.${table.shortName};

  <% 
    var _date = date(); 
    var _tableComment = table.name;
    if(isNotEmpty(table.comment)) {
      _tableComment = table.comment;
    }
  %>
  import com.yxt.common.core.query.PagerQuery;
  import com.yxt.common.core.result.ResultBean;
  import com.yxt.common.core.vo.PagerVo;
  import io.swagger.annotations.Api;
  import io.swagger.annotations.ApiOperation;
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.web.bind.annotation.*;

  import java.util.List;
  import ${pinfo.packageName}.api.${table.shortName}.${table.entityClassName};
  import ${pinfo.packageName}.api.${table.shortName}.${table.entityClassName}Query;
  import ${pinfo.packageName}.api.${table.shortName}.${table.entityClassName}Vo;
  import ${pinfo.packageName}.api.${table.shortName}.${table.entityClassName}DetailsVo;
  import ${pinfo.packageName}.api.${table.shortName}.${table.entityClassName}Dto;
  import ${pinfo.packageName}.api.${table.shortName}.${table.entityClassName}Feign;

  /**
   * Project: ${pinfo.name}(${pinfo.nameCN}) <br/>
   * File: ${table.entityClassName}FeignFallback.java <br/>
   * Class: ${pinfo.packageName}.biz.${table.shortName}.${table.entityClassName}Rest <br/>
   * Description: ${_tableComment}. <br/>
   * Copyright: ${pinfo.copyright} <br/>
   * Company: ${pinfo.company} <br/>
   * Makedate: ${_date,dateFormat="yyyy-MM-dd HH:mm:ss"} <br/>
   *
   * @author ${pinfo.author}
   * @version 1.0
   * @since 1.0
   */
  @Api(tags = "${_tableComment}")
  @RestController("${pinfo.packageName}.biz.${table.shortName}.${table.entityClassName}Rest")
  @RequestMapping("v1/${table.shortName}")
  public class ${table.entityClassName}Rest implements ${table.entityClassName}Feign {

  	@Autowired
  	private ${table.entityClassName}Service ${table.entityClassNameLF}Service;

  	@Override
  	@ApiOperation("根据条件分页查询数据的列表")
  	@PostMapping("/listPage")
  	public ResultBean<PagerVo<${table.entityClassName}Vo>> listPage(@RequestBody PagerQuery<${table.entityClassName}Query> pq){
  		ResultBean rb = ResultBean.fireFail();
  		PagerVo<${table.entityClassName}Vo> pv = ${table.entityClassNameLF}Service.listPageVo(pq);
  		return rb.success().setData(pv);
  	}

  	@Override
  	@ApiOperation("新增或修改")
  	@PostMapping("/save")
  	public ResultBean save(@RequestBody ${table.entityClassName}Dto dto){
  		ResultBean rb = ResultBean.fireFail();
  		${table.entityClassNameLF}Service.saveOrUpdateDto(dto);
  		return rb.success();
  	}

  	@Override
  	@ApiOperation("根据sid批量删除")
      @PostMapping("/delBySids")
      public ResultBean delBySids(@RequestBody String[] sids){
  		ResultBean rb = ResultBean.fireFail();
  		${table.entityClassNameLF}Service.delBySids(sids);
  		return rb.success();
  	}

  	@Override
  	@ApiOperation("根据SID获取一条记录")
      @GetMapping("/fetchDetailsBySid/{sid}")
      public ResultBean<${table.entityClassName}DetailsVo> fetchDetailsBySid(@PathVariable("sid") String sid){
  		ResultBean rb = ResultBean.fireFail();
  		${table.entityClassName}DetailsVo vo = ${table.entityClassNameLF}Service.fetchDetailsVoBySid(sid);
  		return rb.success().setData(vo);
  	}
  }


groupName: yxt(SpringCloud-Nacos)
name: yxt-biz-Service
fileName: ${table.entityClassName}Service.java
remark: 功能的业务逻辑实现
fileFolder: /${pinfo.name}-biz/src/main/java/${pinfo.packagePath}/biz/${table.shortName}
content:
  /*********************************************************
   *********************************************************
   ********************                  *******************
   *************                                ************
   *******                  _oo0oo_                  *******
   ***                     o8888888o                     ***
   *                       88" . "88                       *
   *                       (| -_- |)                       *
   *                       0\  =  /0                       *
   *                     ___/`---'\___                     *
   *                   .' \\|     |// '.                   *
   *                  / \\|||  :  |||// \                  *
   *                 / _||||| -:- |||||- \                 *
   *                |   | \\\  -  /// |   |                *
   *                | \_|  ''\---/''  |_/ |                *
   *                \  .-\__  '-'  ___/-. /                *
   *              ___'. .'  /--.--\  `. .'___              *
   *           ."" '<  `.___\_<|>_/___.' >' "".            *
   *          | | :  `- \`.;`\ _ /`;.`/ - ` : | |          *
   *          \  \ `_.   \_ __\ /__ _/   .-` /  /          *
   *      =====`-.____`.___ \_____/___.-`___.-'=====       *
   *                        `=---='                        *
   *      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      *
   *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
   *********************************************************/
  package ${pinfo.packageName}.biz.${table.shortName};

  <% 
  	var _date = date(); 
  	var _tableComment = table.name;
  	if(isNotEmpty(table.comment)) {
  		_tableComment = table.comment;
  	}
  %>
  import cn.hutool.core.bean.BeanUtil;
  import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
  import com.baomidou.mybatisplus.core.metadata.IPage;
  import org.apache.commons.lang3.StringUtils;
  import com.yxt.common.base.service.MybatisBaseService;
  import com.yxt.common.base.utils.PagerUtil;
  import com.yxt.common.core.query.PagerQuery;
  import com.yxt.common.core.result.ResultBean;
  import com.yxt.common.core.vo.PagerVo;
  import ${pinfo.packageName}.api.${table.shortName}.${table.entityClassName};
  import ${pinfo.packageName}.api.${table.shortName}.${table.entityClassName}Query;
  import ${pinfo.packageName}.api.${table.shortName}.${table.entityClassName}Vo;
  import ${pinfo.packageName}.api.${table.shortName}.${table.entityClassName}DetailsVo;
  import ${pinfo.packageName}.api.${table.shortName}.${table.entityClassName}Dto;
  import ${pinfo.packageName}.api.${table.shortName}.${table.entityClassName}Feign;

  import org.springframework.stereotype.Service;

  import java.util.List;

  /**
   * Project: ${pinfo.name}(${pinfo.nameCN}) <br/>
   * File: ${table.entityClassName}Service.java <br/>
   * Class: ${pinfo.packageName}.biz.${table.shortName}.${table.entityClassName}Service <br/>
   * Description: ${_tableComment} 业务逻辑. <br/>
   * Copyright: ${pinfo.copyright} <br/>
   * Company: ${pinfo.company} <br/>
   * Makedate: ${_date,dateFormat="yyyy-MM-dd HH:mm:ss"} <br/>
   *
   * @author ${pinfo.author}
   * @version 1.0
   * @since 1.0
   */
  @Service
  public class ${table.entityClassName}Service extends MybatisBaseService<${table.entityClassName}Mapper, ${table.entityClassName}> {
  	private QueryWrapper<${table.entityClassName}> createQueryWrapper(${table.entityClassName}Query query) {
  		// todo: 这里根据具体业务调整查询条件
  		// 多字段Like示例：qw.and(wrapper -> wrapper.like("name", query.getName()).or().like("remark", query.getName()));
  		QueryWrapper<${table.entityClassName}> qw = new QueryWrapper<>();
  		return qw;
  	}
  	
  	public PagerVo<${table.entityClassName}Vo> listPageVo(PagerQuery<${table.entityClassName}Query> pq) {
  		${table.entityClassName}Query query = pq.getParams();
  		QueryWrapper<${table.entityClassName}> qw = createQueryWrapper(query);
  		IPage<${table.entityClassName}> page = PagerUtil.queryToPage(pq);
  		IPage<${table.entityClassName}Vo> pagging = baseMapper.selectPageVo(page, qw);
  		PagerVo<${table.entityClassName}Vo> p = PagerUtil.pageToVo(pagging, null);
  		return p;
  	}
  	
  	public void saveOrUpdateDto(${table.entityClassName}Dto dto){
          String dtoSid = dto.getSid();
          if (StringUtils.isBlank(dtoSid)) {
              this.insertByDto(dto);
              return; 
          } 
  		this.updateByDto(dto);
  	}
  	
  	public void insertByDto(${table.entityClassName}Dto dto){
  		${table.entityClassName} entity = new ${table.entityClassName}();
  		BeanUtil.copyProperties(dto, entity, "id", "sid");
  		baseMapper.insert(entity);
  	}
  	
  	public void updateByDto(${table.entityClassName}Dto dto){
            String dtoSid = dto.getSid();
          if (StringUtils.isBlank(dtoSid)) {
              return;
          } 
  		${table.entityClassName} entity = fetchBySid(dtoSid);
  		BeanUtil.copyProperties(dto, entity, "id", "sid");
  		baseMapper.updateById(entity);
  	}
  	
  	public ${table.entityClassName}DetailsVo fetchDetailsVoBySid(String sid){
  		${table.entityClassName} entity = fetchBySid(sid);
  		${table.entityClassName}DetailsVo vo = new ${table.entityClassName}DetailsVo();
  		BeanUtil.copyProperties(entity, vo);
  		return vo;
  	}
  }


groupName: yxt(SpringCloud-Nacos)
name: yxt-biz-Mapper
fileName: ${table.entityClassName}Mapper.java
remark: 数据操作接口
fileFolder: /${pinfo.name}-biz/src/main/java/${pinfo.packagePath}/biz/${table.shortName}
content:
  /*********************************************************
   *********************************************************
   ********************                  *******************
   *************                                ************
   *******                  _oo0oo_                  *******
   ***                     o8888888o                     ***
   *                       88" . "88                       *
   *                       (| -_- |)                       *
   *                       0\  =  /0                       *
   *                     ___/`---'\___                     *
   *                   .' \\|     |// '.                   *
   *                  / \\|||  :  |||// \                  *
   *                 / _||||| -:- |||||- \                 *
   *                |   | \\\  -  /// |   |                *
   *                | \_|  ''\---/''  |_/ |                *
   *                \  .-\__  '-'  ___/-. /                *
   *              ___'. .'  /--.--\  `. .'___              *
   *           ."" '<  `.___\_<|>_/___.' >' "".            *
   *          | | :  `- \`.;`\ _ /`;.`/ - ` : | |          *
   *          \  \ `_.   \_ __\ /__ _/   .-` /  /          *
   *      =====`-.____`.___ \_____/___.-`___.-'=====       *
   *                        `=---='                        *
   *      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      *
   *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
   *********************************************************/
  package ${pinfo.packageName}.biz.${table.shortName};

  <% 
    var _date = date(); 
    var _tableComment = table.name;
    if(isNotEmpty(table.comment)) {
      _tableComment = table.comment;
    }
  %>
  import com.baomidou.mybatisplus.core.conditions.Wrapper;
  import com.baomidou.mybatisplus.core.metadata.IPage;
  import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  import com.baomidou.mybatisplus.core.toolkit.Constants;
  import org.apache.ibatis.annotations.Mapper;
  import org.apache.ibatis.annotations.Param;
  import org.apache.ibatis.annotations.Select;
  import ${pinfo.packageName}.api.${table.shortName}.${table.entityClassName};
  import ${pinfo.packageName}.api.${table.shortName}.${table.entityClassName}Vo;

  import java.util.List;

  /**
   * Project: ${pinfo.name}(${pinfo.nameCN}) <br/>
   * File: ${table.entityClassName}Mapper.java <br/>
   * Class: ${pinfo.packageName}.biz.${table.shortName}.${table.entityClassName}Mapper <br/>
   * Description: ${_tableComment}. <br/>
   * Copyright: ${pinfo.copyright} <br/>
   * Company: ${pinfo.company} <br/>
   * Makedate: ${_date,dateFormat="yyyy-MM-dd HH:mm:ss"} <br/>
   *
   * @author ${pinfo.author}
   * @version 1.0
   * @since 1.0
   */
  @Mapper
  public interface ${table.entityClassName}Mapper extends BaseMapper<${table.entityClassName}> {

  	//@Update("update ${table.name} set name=#{msg} where id=#{id}")
  	//IPage<${table.entityClassName}Vo> voPage(IPage<${table.entityClassName}> page, @Param(Constants.WRAPPER) QueryWrapper<${table.entityClassName}> qw);
  	
  	IPage<${table.entityClassName}Vo> selectPageVo(IPage<${table.entityClassName}> page, @Param(Constants.WRAPPER) Wrapper<${table.entityClassName}> qw);
  	
  	List<${table.entityClassName}Vo> selectListAllVo(@Param(Constants.WRAPPER) Wrapper<${table.entityClassName}> qw);
  	
  	@Select("select * from ${table.name}")
  	List<${table.entityClassName}Vo> selectListVo();
  }


groupName: yxt(SpringCloud-Nacos)
name: yxt-biz-MapperXml
fileName: ${table.entityClassName}Mapper.xml
remark: MybatisSQL文件
fileFolder: /${pinfo.name}-biz/src/main/java/${pinfo.packagePath}/biz/${table.shortName}
content:
  <?xml version="1.0" encoding="UTF-8" ?>
  <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  <mapper namespace="${pinfo.packageName}.biz.${table.shortName}.${table.entityClassName}Mapper">
  <!--    <where> \${ew.sqlSegment} </where>-->
  <!--    \${ew.customSqlSegment} -->
  	<select id="selectPageVo" resultType="${pinfo.packageName}.api.${table.shortName}.${table.entityClassName}Vo">
  		SELECT * FROM ${table.name} <where> \${ew.sqlSegment} </where>
  	</select>
  	
  	<select id="selectListAllVo" resultType="${pinfo.packageName}.api.${table.shortName}.${table.entityClassName}Vo">
  		SELECT * FROM ${table.name} <where> \${ew.sqlSegment} </where>
  	</select>
  </mapper>


groupName: ruoyi-ui
name: vue.config.js
fileName: vue.config.js
remark: vue.config.js
fileFolder: /${pinfo.name}-adminui
content:
  'use strict'
  const path = require('path')

  function resolve(dir) {
    return path.join(__dirname, dir)
  }

  const name = process.env.VUE_APP_TITLE || '${pinfo.nameCN}' // 网页标题

  const port = process.env.port || process.env.npm_config_port || 80 // 端口

  // vue.config.js 配置说明
  //官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions
  // 这里只列一部分，具体配置参考文档
  module.exports = {
    // 部署生产环境和开发环境下的URL。
    // 默认情况下，Vue CLI 会假设你的应用是被部署在一个域名的根路径上
    // 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上，你就需要用这个选项指定这个子路径。例如，如果你的应用被部署在 https://www.ruoyi.vip/admin/，则设置 baseUrl 为 /admin/。
    publicPath: process.env.NODE_ENV === "production" ? "/" : "/",
    // 在npm run build 或 yarn build 时 ，生成文件的目录名称（要和baseUrl的生产环境路径一致）（默认dist）
    outputDir: 'dist',
    // 用于放置生成的静态资源 (js、css、img、fonts) 的；（项目打包之后，静态资源会放在这个文件夹下）
    assetsDir: 'static',
    // 是否开启eslint保存检测，有效值：ture | false | 'error'
    lintOnSave: process.env.NODE_ENV === 'development',
    // 如果你不需要生产环境的 source map，可以将其设置为 false 以加速生产环境构建。
    productionSourceMap: false,
    // webpack-dev-server 相关配置
    devServer: {
      host: '0.0.0.0',
      port: port,
      open: true,
      proxy: {
        // detail: https://cli.vuejs.org/config/#devserver-proxy
        [process.env.VUE_APP_BASE_API]: {
          target: `http://localhost:${pinfo.serverPort}`,
          changeOrigin: true,
          pathRewrite: {
            ['^' + process.env.VUE_APP_BASE_API]: ''
          }
        }
      },
      disableHostCheck: true
    },
    configureWebpack: {
      name: name,
      resolve: {
        alias: {
          '@': resolve('src')
        }
      }
    },
    chainWebpack(config) {
      config.plugins.delete('preload') // TODO: need test
      config.plugins.delete('prefetch') // TODO: need test

      // set svg-sprite-loader
      config.module
        .rule('svg')
        .exclude.add(resolve('src/assets/icons'))
        .end()
      config.module
        .rule('icons')
        .test(/\.svg$/)
        .include.add(resolve('src/assets/icons'))
        .end()
        .use('svg-sprite-loader')
        .loader('svg-sprite-loader')
        .options({
          symbolId: 'icon-[name]'
        })
        .end()

      config
        .when(process.env.NODE_ENV !== 'development',
          config => {
            config
              .plugin('ScriptExtHtmlWebpackPlugin')
              .after('html')
              .use('script-ext-html-webpack-plugin', [{
              // `runtime` must same as runtimeChunk name. default is `runtime`
                inline: /runtime\..*\.js$/
              }])
              .end()
            config
              .optimization.splitChunks({
                chunks: 'all',
                cacheGroups: {
                  libs: {
                    name: 'chunk-libs',
                    test: /[\\/]node_modules[\\/]/,
                    priority: 10,
                    chunks: 'initial' // only package third parties that are initially dependent
                  },
                  elementUI: {
                    name: 'chunk-elementUI', // split elementUI into a single package
                    priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app
                    test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm
                  },
                  commons: {
                    name: 'chunk-commons',
                    test: resolve('src/components'), // can customize your rules
                    minChunks: 3, //  minimum common number
                    priority: 5,
                    reuseExistingChunk: true
                  }
                }
              })
            config.optimization.runtimeChunk('single'),
            {
               from: path.resolve(__dirname, './public/robots.txt'), //防爬虫文件
               to: './' //到根目录下
            }
          }
        )
    }
  }


groupName: ruoyi-ui
name: infodrawer.vue
fileName: infodrawer.vue
remark: infodrawer.vue
fileFolder: /${pinfo.name}-adminui/src/views/${pinfo.nameShortLow}/${table.shortName}
content:
  <template>
    <el-drawer :visible.sync="drawvisible" title="${table.comment}" size="50%">
      <el-card shadow="never">
        <el-descriptions title="" :column="1">
          <% for(col in columns) { var _colComment = col.comment; if(isEmpty(col.comment)){ _colComment = col.name; } %>
  		<el-descriptions-item label="${_colComment}">{{ formobj.${col.name} }}</el-descriptions-item>
  		<% } %>
        </el-descriptions>
      </el-card>
    </el-drawer>
  </template>
  <script>
  export default {
    name: '${pinfo.nameShort}${table.entityClassName}InfoDrawer',
    props: {},
    data() {
      return {
        drawvisible: false,
        formobj: {}
      }
    },
    created: function() {},
    methods: {
      showView(row) {
        this.drawvisible = true
  <% for(col in columns) {
    var _colComment = col.comment;
    if(isEmpty(col.comment)){
      _colComment = col.name;
    }
  %>
        this.formobj.${col.name} = row.${col.name} // ${_colComment}
  <% } %>
      }
    }
  }
  </script>
  <style lang="scss" scoped></style>


groupName: default(SpringBoot)
name: CodeMsgEnum
fileName: CodeMsgEnum.java
remark: 统一错误编码的枚举
fileFolder: /${pinfo.name}-biz/src/main/java/${pinfo.packagePath}
content:
  /*********************************************************
   *********************************************************
   ********************                  *******************
   *************                                ************
   *******                  _oo0oo_                  *******
   ***                     o8888888o                     ***
   *                       88" . "88                       *
   *                       (| -_- |)                       *
   *                       0\  =  /0                       *
   *                     ___/`---'\___                     *
   *                   .' \\|     |// '.                   *
   *                  / \\|||  :  |||// \                  *
   *                 / _||||| -:- |||||- \                 *
   *                |   | \\\  -  /// |   |                *
   *                | \_|  ''\---/''  |_/ |                *
   *                \  .-\__  '-'  ___/-. /                *
   *              ___'. .'  /--.--\  `. .'___              *
   *           ."" '<  `.___\_<|>_/___.' >' "".            *
   *          | | :  `- \`.;`\ _ /`;.`/ - ` : | |          *
   *          \  \ `_.   \_ __\ /__ _/   .-` /  /          *
   *      =====`-.____`.___ \_____/___.-`___.-'=====       *
   *                        `=---='                        *
   *      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      *
   *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
   *********************************************************/
  package ${pinfo.packageName};

  import org.jbase.jbsc.commons.core.result.IResultCodeMsg;

  /**
   * 统一返回信息的code和msg，需要更新并安装yxt-common-core项目
   */
  public enum CodeMsgEnum implements IResultCodeMsg {

      /**
       * 返回正常
       */
      HTML200("200", "返回正常"),
      /**
       * 页面不存在
       */
      HTML404("404", "页面不存在"),
      /**
       * 服务器错误
       */
      HTML500("500", "服务器错误"),
      /**
       * 用户名不存在
       */
      AF_U_5001("af_u_5001", "用户名不存在");

      private String code;
      private String msg;

      private CodeMsgEnum(String code, String msg) {
          this.code = code;
          this.msg = msg;
      }

      @Override
      public String getMsg() {
          return msg;
      }

      @Override
      public String getCode() {
          return code;
      }
  }


groupName: anrui-ui
name: codemenu
fileName: codemenu.js
remark: 路由数据
fileFolder: /${pinfo.name}-ui/src/router/modules
content:
  import Layout from '@/layout'

  const codemenu = [
  <% 
    for (tinfo in pinfo.tables){ 
    var _tableComment = tinfo.name;
    if(isNotEmpty(tinfo.comment)) {
    _tableComment = tinfo.comment;
    }
    if(tinfoLP.last){
  %>
    {
      path: '/${tinfo.shortName}',
      component: Layout,
      redirect: '/${tinfo.shortName}/index',
      meta: {
        title: '${_tableComment}'
      },
      children: [{
        path: '/${tinfo.shortName}/index',
        component: () => import('@/views/${pinfo.nameShortLow}/${tinfo.shortName}/${tinfo.shortName}.vue'),
        name: '${tinfo.entityClassName}Index',
        meta: { title: '${_tableComment}' }
      }]
    }
  <% 
    } else {
  %>
    {
      path: '/${tinfo.shortName}',
      component: Layout,
      redirect: '/${tinfo.shortName}/index',
      meta: {
        title: '${_tableComment}'
      },
      children: [{
        path: '/${tinfo.shortName}/index',
        component: () => import('@/views/${pinfo.nameShortLow}/${tinfo.shortName}/${tinfo.shortName}.vue'),
        name: '${tinfo.entityClassName}Index',
        meta: { title: '${_tableComment}' }
      }]
    },
  <% 
    }
  } 
  %>

  ]
  export default codemenu


groupName: anrui-ui
name: sidebarindex
fileName: index.vue
remark: 左侧菜单
fileFolder: /${pinfo.name}-ui/src/layout/components/Sidebar
content:
  <template>
    <div :class="{ 'has-logo': showLogo }">
      <logo v-if="showLogo" :collapse="isCollapse" />
      <el-scrollbar wrap-class="scrollbar-wrapper">
        <el-menu
          :default-active="activeMenu"
          :background-color="variables.menuBg"
          :text-color="variables.menuText"
          :unique-opened="true"
          :active-text-color="variables.menuActiveText"
          :collapse-transition="true"
          mode="vertical"
          router
        >

  <% 
    for (tinfo in pinfo.tables){ 
    var _tableComment = tinfo.name;
    if(isNotEmpty(tinfo.comment)) {
    _tableComment = tinfo.comment;
    }
  %>
          <el-menu-item key="/${tinfo.shortName}" index="/${tinfo.shortName}/index"><span slot="title">${_tableComment}</span></el-menu-item>

  <% 
  } 
  %>
        </el-menu>
      </el-scrollbar>
    </div>
  </template>

  <script>
  import { mapGetters } from 'vuex'
  import Logo from './Logo'
  // import SidebarItem from './SidebarItem'
  import variables from '@/styles/variables.scss'
  import { getrolemenus } from '@/api/system/Role/role.js'
  import Layout from '@/layout'
  export default {
    components: {
      //	SidebarItem,
      Logo
    },
    data() {
      return {
        routes: []
      }
    },
    computed: {
      ...mapGetters(['sidebar']),
      //  routes() {
      //  	console.log(this.$router.options.routes)
      //    return this.$router.options.routes
      //  },
      activeMenu() {
        const route = this.$route
        const { meta, path } = route
        // if set path, the sidebar will highlight the path you set
        if (meta.activeMenu) {
          return meta.activeMenu
        }
        return path
      },
      showLogo() {
        return this.$store.state.settings.sidebarLogo
      },
      variables() {
        return variables
      },
      isCollapse() {
        return !this.sidebar.opened
      }
    },
    mounted() {
      this.getRoleRouter()
    },
    methods: {
      getRoleRouter() {
        const userSid = window.sessionStorage.getItem('userSid')
        //			let rolemenus = getrolemenus({userSid: userSid})
        const params = {
          sourceSid: 'df3e44ae-412e-4b02-b9e4-6893dbf5f83b',
          userSid: userSid
        }
        getrolemenus(params).then(res => {
          console.log(res)

          const userRoles = this.resRouter(res.data)
          userRoles.push({ path: '*', redirect: '/404', hidden: true })
          return userRoles
        })
      },
      resRouter(menus) {
        // 递归，将后台传来数组
        for (var i = 0; i < menus.length; i++) {
          if (menus[i].children && menus[i].children.length != 0) {
            this.resRouter(menus[i].children)
          }
          if (menus[i].children.length == 0) {
            delete menus[i].children
            delete menus[i].redirect
          }
          if (menus[i].component == '') {
            //		      menus[i].component = eval(menus[i].path.substr(1))
            console.log(menus[i])
            menus[i] = {
              path: menus[i].path,
              component: Layout,
              redirect: menus[i].path,
              children: [menus[i]],
              name: menus[i].meta.title
            }
          }
        }
        console.log(menus)
        this.routes = menus
        return menus
      }
    }
  }
  </script>
  <style scoped="scoped">
  /deep/.scrollbar-wrapper {
    padding-bottom: 40px;
  }
  </style>


groupName: anrui-ui
name: tableindex
fileName: ${table.shortName}.vue
remark: 主页面
fileFolder: /${pinfo.name}-ui/src/views/${pinfo.nameShortLow}/${table.shortName}
content:
  <%
  	var _tableComment = table.name;
  	if(isNotEmpty(table.comment)) {
  	_tableComment = table.comment;
  	}
  %>
  <template>
  	<div class="app-container">
  		<div v-show="viewState == 1">
  			<button-bar view-title="${_tableComment}" :btndisabled="btndisabled" @btnhandle="btnHandle" />
  			<div class="searchcon">
  				<el-button size="small" class="searchbtn" @click="isSearchShow = !isSearchShow">{{ isSearchShow ? '隐藏查询条件' : '显示查询条件' }}</el-button>
  							<div v-show="isSearchShow" class="search">
  					<el-form :inline="true" class="tab-header">
  <% for(col in columns) { 
  	var _colComment = col.comment;
  	if(isEmpty(col.comment)){
  		_colComment = col.name;
  	}
  %>
  						<el-form-item label="${_colComment}"><el-input v-model="queryParams.params.${col.name}" placeholder="请输入${_colComment}" clearable /></el-form-item>
  <% } %>
  						<el-divider />
  						<div class="btn" style="text-align: center;">
  							<el-button type="primary" @click="dosearch">查询</el-button>
  							<el-button type="primary" @click="resetQuery">重置</el-button>
  						</div>
  					</el-form>
  				</div>
  			</div>
  			<!-- Start 项目列表头部 -->
  			<div class="listtop">
  				<div class="tit">${_tableComment}列表</div>
  				<pageye v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" :limit.sync="queryParams.size" class="pagination" @pagination="loadList" />
  			</div>
  			<!-- End 项目列表头部 -->

  			<!-- Start 项目列表 -->
  			<div class="listcon">
  				<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" @selection-change="handleSelectionChange">
  					<el-table-column width="50px" type="selection" align="center" />
  					<el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center" />
  					<el-table-column label="SID" align="center">
  						<template slot-scope="scope">
  							<span class="bluezi" @click="toInfo(scope.row)">{{ scope.row.sid }}</span>
  						</template>
  					</el-table-column>
  <% for(col in columns) { 
  	var _colComment = col.comment;
  	if(isEmpty(col.comment)){
  		_colComment = col.name;
  	}
  %>
  					<el-table-column prop="${col.name}" label="${_colComment}" align="center" />
  <% } %>
  				</el-table>
  			</div>
  			<!-- End 项目列表 -->
  			<div class="pages">
  				<div class="tit" />
  				<!--  翻页  -->
  				<pagination
  					v-show="dataList.length > 0"
  					:total="queryParams.total"
  					:page.sync="queryParams.current"
  					:limit.sync="queryParams.size"
  					class="pagination"
  					@pagination="loadList"
  				/>
  			</div>
  		</div>
  		<!-- End 查询和其列表部分 -->

  		<!-- 新增修改部分组件 -->
  		<div-add v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="loadList" />

  		<!-- 详情部分组件 -->
  		<div-info v-show="viewState == 4" ref="divinfo" @doback="resetState" />
  	</div>
  </template>

  <script>
  import req from '@/api/${pinfo.nameShortLow}/${table.shortName}'
  import ButtonBar from '@/components/ButtonBar'
  import Pagination from '@/components/pagination'
  import pageye from '@/components/pagination/pageye'
  import divAdd from './${table.shortName}Add'
  import divInfo from './${table.shortName}Info'

  export default {
  	name: '${table.entityClassName}Index',
  	components: {
  		ButtonBar,
  		Pagination,
  		pageye,
  		divAdd,
  		divInfo
  	},
  	data() {
  		return {
  			btndisabled: false,
  			viewState: 1, // 1、列表 2、添加 3、修改 4、查看
  			isSearchShow: true,
  			tableLoading: false,
  			dataList: [],
  			queryParams: {
  				current: 1,
  				size: 10,
  				total: 0,
  				params: {
  					sids: [], // 用于导出的时候保存已选择SID
  <% for(col in columns) { 
  	var _colComment = col.comment;
  	if(isEmpty(col.comment)){
  		_colComment = col.name;
  	}
  %>
  <% if(colLP.last){ %>
  				${col.name}: '' // ${_colComment}
  <% } else { %>
  				${col.name}: '', // ${_colComment}
  <% } %>
  <% } %>
  				}
  			},
  			multipleSelection: []
  		}
  	},
  	created() {
  		this.loadList()
  	},
  	methods: {
  		resetState() {
  			this.viewState = 1
  		},
  		btnHandle(btnKey) {
  			switch (btnKey) {
  				case 'toAdd':
  					this.toAdd()
  					break
  				case 'toEdit':
  					this.toEdit()
  					break
  				case 'doSubmit':
  					this.doSubmit()
  					break
  				case 'doDel':
  					this.doDel()
  					break
  				case 'doImport':
  					this.doImport()
  					break
  				case 'doExport':
  					this.doExport()
  					break
  				default:
  					break
  			}
  		},
  		toAdd(row) {
  			this.viewState = 2
  			this.$refs['divadd'].showAdd()
  		},
  		toEdit() {
  			if (this.multipleSelection.length === 0) {
  				this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行编辑' })
  				return
  			}
  			if (this.multipleSelection.length > 1) {
  				this.$message({ showClose: true, type: 'error', message: '只能选择一条记录进行编辑' })
  				return
  			}
  			this.viewState = 3
  			const row = this.multipleSelection[0]
  			this.$refs['divadd'].showEdit(row)
  		},
  		doSubmit(row) {
  			// 提交的代码
  			this.btndisabled = true
  			req
  				.doSubmit(this.queryParams.params)
  				.then(resp => {
  					console.log(resp)
  					this.btndisabled = false
  					if (resp.success) { 
  						// 加提交后的逻辑
  					} else {
  						// 根据resp.code进行异常情况处理
  					}
  				})
  				.catch(() => {
  					this.btndisabled = false
  				})
  		},
  		doDel(row) {
  			if (this.multipleSelection.length === 0) {
  				this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作' })
  				return
  			}
  			const _this = this
  			const sids = []
  			this.multipleSelection.forEach(row => {
  				sids.push(row.sid)
  			})
  			const tip = '请确认是否删除所选 ' + this.multipleSelection.length + ' 条记录?'
  			this.$confirm(tip, '提示', {
  				confirmButtonText: '确定',
  				cancelButtonText: '取消',
  				type: 'warning'
  			})
  				.then(() => {
  					const loading = this.$loading({
  						lock: true,
  						text: 'Loading',
  						spinner: 'el-icon-loading',
  						background: 'rgba(0, 0, 0, 0.7)'
  					})
  					req
  						.delBySids(sids)
  						.then(resp => {
  							loading.close()
  							if (resp.success) {
  								_this.$message({ type: 'success', message: resp.msg, showClose: true })
  								_this.loadList()
  							} else {
  								// 根据resp.code进行异常情况处理
  							}
  						})
  						.catch(e => {
  							loading.close()
  						})
  				})
  				.catch(() => {})
  		},
  		doImport(row) {
  			// 导入的代码
  			req
  				.importExcel(this.queryParams.params)
  				.then(resp => {
  					if (resp.success) { 
  						console.log(resp)
  					}
  				})
  				.catch(() => {})
  		},
  		doExport(row) {
  			// 导出的代码
  			const sids = []
  			this.multipleSelection.forEach(row => {
  				sids.push(row.sid)
  			})
  			this.queryParams.params.sids = sids
  			req
  				.exportExcel(this.queryParams.params)
  				.then(resp => {
  					if (resp.success) { 
  						var map = resp.data
  						const fileName = map.filename // 导出文件名
  						// // 对于<a>标签，只有 Firefox 和 Chrome（内核） 支持 download 属性
  						// // IE10以上支持blob但是依然不支持download
  						const link = document.createElement('a') // 创建a标签
  						link.download = fileName // a标签添加属性
  						link.style.display = 'none'
  						link.href = map.downurl
  						document.body.appendChild(link)
  						link.click() // 执行下载
  						URL.revokeObjectURL(link.href) // 释放url
  						document.body.removeChild(link) // 释放标签
  					}
  				})
  				.catch(() => {})
  		},
  		dosearch() {
  			this.queryParams.current = 1
  			this.loadList()
  		},
  		resetQuery() {
  			this.queryParams.params = {}
  			this.queryParams.params.sid = '' // sid
  			this.queryParams.params.name = '' // 登录名
  			this.dosearch()
  		},
  		loadList() {
  			const _this = this
  			this.tableLoading = true
  			req
  				.listPage(this.queryParams)
  				.then(resp => {
  					_this.tableLoading = false
  					if (resp.success) { 
  						const data = resp.data
  						_this.queryParams.total = data.total
  						_this.dataList = data.records
  					} else {
  						// 根据resp.code进行异常情况处理
  					}
  				})
  				.catch(() => {
  					_this.tableLoading = false
  				})
  		},
  		handleSelectionChange(val) {
  			this.multipleSelection = val
  		},
  		// 序号
  		indexMethod(index) {
  			var pagestart = (this.queryParams.current - 1) * this.queryParams.size
  			var pageindex = index + 1 + pagestart
  			return pageindex
  		},
  		toInfo(row) {
  			this.$refs['divinfo'].showInfo(row)
  			this.viewState = 4
  		}
  	}
  }
  </script>
  <style scoped>
  </style>


groupName: anrui-ui
name: anruiapi
fileName: ${table.shortName}.js
remark: API接口
fileFolder: /${pinfo.name}-ui/src/api/${pinfo.nameShortLow}
content:
  <%
    var _tableComment = table.name;
    if(isNotEmpty(table.comment)) {
    _tableComment = table.comment;
    }
  %>
  import request from '@/utils/request'
  // ${_tableComment}
  export default {

    // 查询分页列表
    listPage: function(params) {
      return request({
        url: '/${pinfo.nameShortLow}/v1/${table.shortName}/listPage',
        method: 'post',
        data: params
      })
    },
    // 保存新增记录
    saveOrUpdate: function(params) {
      return request({
        url: '/${pinfo.nameShortLow}/v1/${table.shortName}/save',
        method: 'post',
        data: params
      })
    },
    // 通过sid删除一条或多条记录
    delBySids: function(params) {
      return request({
        url: '/${pinfo.nameShortLow}/v1/${table.shortName}/delBySids',
        method: 'delete',
        data: params
      })
    },
    // 通过sid查询一条记录
    fetchBySid: function(sid) {
      return request({
        url: '/${pinfo.nameShortLow}/v1/${table.shortName}/fetchDetailsBySid/' + sid
      })
    },
    // 提交
    doSubmit: function(params) {
      return request({
        url: '/${pinfo.nameShortLow}/v1/${table.shortName}/doSubmit',
        method: 'post',
        data: params
      })
    },
    // 导入
    importExcel: function(params) {
      return request({
        url: '/${pinfo.nameShortLow}/v1/${table.shortName}/importExcel',
        method: 'post',
        data: params
      })
    },
    // 导出
    exportExcel: function(params) {
      return request({
        url: '/${pinfo.nameShortLow}/v1/${table.shortName}/exportExcel',
        method: 'post',
        data: params
      })
    }
  }


groupName: anrui-ui
name: tableadd
fileName: ${table.shortName}Add.vue
remark: 新增、修改页面
fileFolder: /${pinfo.name}-ui/src/views/${pinfo.nameShortLow}/${table.shortName}
content:
  <%
  	var _tableComment = table.name;
  	if(isNotEmpty(table.comment)) {
  	_tableComment = table.comment;
  	}
  %>
  <template>
  	<div>
  		<!-- 标题按钮部分开始 -->
  		<div class="tab-header webtop">
  			<!-- 标题 -->
  			<div>{{ viewTitle }}</div>
  			<!-- start 添加修改按钮 -->
  			<div>
  				<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">保存</el-button>
  				<el-button type="info" size="small" @click="handleReturn()">返回</el-button>
  			</div>
  			<!-- end 添加修改按钮 -->
  			<!-- end 详情按钮 -->
  		</div>
  		<!-- 标题按钮部分结束 -->
  		<!-- Start 新增修改部分 -->
  		<div class="listconadd">
  			<el-form ref="form_obj" :model="formobj" :rules="rules" label-position="right" class="formadd">
  				<div class="wlInfo"><span>${_tableComment}</span></div>
  <% for(col in columns) { 
  	var _colComment = col.comment;
  	if(isEmpty(col.comment)){
  		_colComment = col.name;
  	}
  %>
  				<el-row>
  					<el-col :span="4" class="tleftb">
  						<span><span class="icon">*</span>${_colComment}</span>
  					</el-col>
  					<el-col :span="8" class="trightb">
  						<el-form-item prop="${col.name}"><el-input v-model="formobj.${col.name}" placeholder="${_colComment}" class="addinputw" clearable /></el-form-item>
  					</el-col>
  				</el-row>
  <% } %>
  			</el-form>
  		</div>
  		<!-- End 添加修改部分 -->
  	</div>
  </template>

  <script>
  import req from '@/api/${pinfo.nameShortLow}/${table.shortName}'
  export default {
  	name: '${table.entityClassName}Add',
  	data() {
  		return {
  			submitdisabled: false,
  			viewTitle: '',
  			formobj: {
  				id: '',
  				sid: '',
  <% for(col in columns) { 
  	var _colComment = col.comment;
  	if(isEmpty(col.comment)){
  		_colComment = col.name;
  	}
  %>
  <% if(colLP.last){ %>
  				${col.name}: '' // ${_colComment}
  <% } else { %>
  				${col.name}: '', // ${_colComment}
  <% } %>
  <% } %>
  			},
  			rules: {
  <% for(col in columns) { 
  	var _colComment = col.comment;
  	if(isEmpty(col.comment)){
  		_colComment = col.name;
  	}
  %>
  <% if(colLP.last){ %>
  				${col.name}: [{ required: true, message: '${_colComment}不能为空', trigger: 'blur' }] // ${_colComment}
  <% } else { %>
  				${col.name}: [{ required: true, message: '${_colComment}不能为空', trigger: 'blur' }], // ${_colComment}
  <% } %>
  <% } %>
  			}
  		}
  	},
  	created() {},
  	methods: {
  		handleReturn(isreload) {
  			if (isreload === 'true') this.$emit('reloadlist')
  			this.formobj.id = ''
  			this.formobj.sid = '' // SID

  <% for(col in columns) { 
  	var _colComment = col.comment;
  	if(isEmpty(col.comment)){
  		_colComment = col.name;
  	}
  %>
  				this.${col.name} = '' // ${_colComment}
  <% } %>
  			
  			this.$refs['form_obj'].resetFields()
  			this.$emit('doback')
  		},
  		showAdd() {
  			this.$nextTick(() => {
  				this.$refs['form_obj'].clearValidate()
  			})
  			this.viewTitle = '【新增】${_tableComment}'
  		},
  		showEdit(row) {
  			this.$nextTick(() => {
  				this.$refs['form_obj'].clearValidate()
  			})
  			this.viewTitle = '【修改】${_tableComment}'
  			const _this = this
  			req
  				.fetchBySid(row.sid)
  				.then(resp => {
  					if (resp.sucess) {
  						const vdata = resp.data
  						_this.formobj.id = vdata.id
  						_this.formobj.sid = vdata.sid // SID

  <% for(col in columns) { 
  	var _colComment = col.comment;
  	if(isEmpty(col.comment)){
  		_colComment = col.name;
  	}
  %>
  						_this.formobj.${col.name} = vdata.${col.name} // ${_colComment}
  <% } %>
  					} else {
  						// 根据resp.code进行异常情况处理
  					}
  				})
  				.catch(e => {
  					this.formobj = row
  				})
  		},
  		saveOrUpdate() {
  			const _this = this
  			this.$refs['form_obj'].validate(valid => {
  				if (valid) {
  					this.submitdisabled = true
  					req
  						.saveOrUpdate(this.formobj)
  						.then(resp => {
  							this.submitdisabled = false
  							if (resp.success) {
  								_this.$message({ showClose: true, type: 'success', message: resp.msg })
  								_this.handleReturn('true')
  							} else {
  								// 根据resp.code进行异常情况处理
  							}
  						})
  						.catch(() => {
  							this.submitdisabled = false
  						})
  				} else {
  					return false
  				}
  			})
  		}
  	}
  }
  </script>

  <style scoped></style>


groupName: anrui-ui
name: tableinfo
fileName: ${table.shortName}Info.vue
remark: 信息详情页面
fileFolder: /${pinfo.name}-ui/src/views/${pinfo.nameShortLow}/${table.shortName}
content:
  <%
  	var _tableComment = table.name;
  	if(isNotEmpty(table.comment)) {
  	_tableComment = table.comment;
  	}
  %>
  <template>
  	<div>
  		<!-- 标题按钮部分开始 -->
  		<div class="tab-header webtop">
  			<!-- 标题 -->
  			<div>${_tableComment}详情</div>
  			<!-- start 详情按钮 -->
  			<div><el-button itype="info" size="small" @click="handleReturn()">返回</el-button></div>
  			<!-- end 详情按钮 -->
  		</div>
  		<!-- 标题按钮部分结束 -->
  		<div class="listconadd">
  			<el-form ref="form_obj" :model="formobj" label-position="right" class="formadd">
  				<div class="wlInfo"><span>${_tableComment}</span></div>
  <% for(col in columns) { 
  	var _colComment = col.comment;
  	if(isEmpty(col.comment)){
  		_colComment = col.name;
  	}
  %>
  			<el-row>
  				<el-col :span="4" class="tleftb">${_colComment}</el-col>
  				<el-col :span="8" class="trightb"><el-form-item prop="useOrg"><span>{{ formobj.${col.name} }}</span></el-form-item></el-col>
  			</el-row>
  <% } %>
  		</el-form>
  		</div>
  	</div>
  </template>

  <script>
  import req from '@/api/${pinfo.nameShortLow}/${table.shortName}'
  export default {
  	name: '${table.entityClassName}Info',
  	data() {
  		return {
  			formobj: {}
  		}
  	},
  	methods: {
  		handleReturn() {
  			this.formobj = {}
  			this.$emit('doback')
  		},
  		showInfo(row) {
  				req
  					.fetchBySid(row.sid)
  					.then(resp => {
  						if (resp.success) {
  							const vdata = resp.data
  							_this.formobj.id = vdata.id
  							_this.formobj.sid = vdata.sid // SID
  <% for(col in columns) { 
  	var _colComment = col.comment;
  	if(isEmpty(col.comment)){
  		_colComment = col.name;
  	}
  %>
  							_this.formobj.${col.name} = vdata.${col.name} // ${_colComment}
  <% } %>
  						}
  					})
  				.catch(e => {
  					_this.formobj = row
  				})
  		}
  	}
  }
  </script>

  <style scoped></style>


groupName: yxt(SpringCloud-Nacos)
name: yxt-api-detail-vo
fileName: ${table.entityClassName}DetailsVo.java
remark: yxt-api-detail-vo
fileFolder: /${pinfo.name}-api/src/main/java/${pinfo.packagePath}/api/${table.shortName}
content:
  /*********************************************************
   *********************************************************
   ********************                  *******************
   *************                                ************
   *******                  _oo0oo_                  *******
   ***                     o8888888o                     ***
   *                       88" . "88                       *
   *                       (| -_- |)                       *
   *                       0\  =  /0                       *
   *                     ___/`---'\___                     *
   *                   .' \\|     |// '.                   *
   *                  / \\|||  :  |||// \                  *
   *                 / _||||| -:- |||||- \                 *
   *                |   | \\\  -  /// |   |                *
   *                | \_|  ''\---/''  |_/ |                *
   *                \  .-\__  '-'  ___/-. /                *
   *              ___'. .'  /--.--\  `. .'___              *
   *           ."" '<  `.___\_<|>_/___.' >' "".            *
   *          | | :  `- \`.;`\ _ /`;.`/ - ` : | |          *
   *          \  \ `_.   \_ __\ /__ _/   .-` /  /          *
   *      =====`-.____`.___ \_____/___.-`___.-'=====       *
   *                        `=---='                        *
   *      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      *
   *********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
   *********************************************************/
  package ${pinfo.packageName}.api.${table.shortName};

  <% 
    var _date = date(); 
    var _tableComment = table.name;
    if(isNotEmpty(table.comment)) {
      _tableComment = table.comment;
    }
    var _beanName = "IdEntity";
    if(1==table.entityType) { 
      _beanName = "Entity";
    }
    if(3==table.entityType) {
      _beanName = "BaseEntity";
    }
  %>

  import com.yxt.common.core.vo.Vo;

  <% if(table.hasDateField) { %>
  import com.fasterxml.jackson.annotation.JsonFormat;
  import java.util.Date;
  <% } %>
  import io.swagger.annotations.ApiModel;
  import io.swagger.annotations.ApiModelProperty;
  import lombok.Data;

  /**
   * Project: ${pinfo.name}(${pinfo.nameCN}) <br/>
   * File: ${table.entityClassName}Vo.java <br/>
   * Class: ${pinfo.packageName}.api.${table.shortName}.${table.entityClassName}Vo <br/>
   * Description: ${_tableComment} 视图数据对象. <br/>
   * Copyright: ${pinfo.copyright} <br/>
   * Company: ${pinfo.company} <br/>
   * Makedate: ${_date,dateFormat="yyyy-MM-dd HH:mm:ss"} <br/>
   *
   * @author ${pinfo.author}
   * @version 1.0
   * @since 1.0
   */
  @Data
  @ApiModel(value = "${_tableComment} 视图数据详情", description = "${_tableComment} 视图数据详情")
  public class ${table.entityClassName}DetailsVo implements Vo {

      private String sid; // sid

  <% for(col in columns) { %>
  	<% if("Date" == col.javaTypeBox){ %>
      @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
      <% } %>
  	<% if(isEmpty(col.comment)){ %>
  	@ApiModelProperty("${col.name}")
  	<% } else {%>
  	@ApiModelProperty("${col.comment}")
      <% } %>
      <% if("Date" == col.javaTypeBox){ %>
      private ${col.javaTypeBox} ${col.name}Start; // ${col.comment}
      private ${col.javaTypeBox} ${col.name}End; // ${col.comment}
      <% } else { %>
      private ${col.javaTypeBox} ${col.name}; // ${col.comment}
      <% } %>
  <% } %>

  }


