Commit ae1fdbcb by fsn

删除mybatis-plus的自定义模板

parent 783ddaae
......@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.mapper.BaseMapper;
* </p>
*
* @author stylefeng
* @since 2017-05-21
* @since 2017-05-23
*/
public interface DeptMapper extends BaseMapper<Dept> {
......
......@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.mapper.BaseMapper;
* </p>
*
* @author stylefeng
* @since 2017-05-21
* @since 2017-05-23
*/
public interface DictMapper extends BaseMapper<Dict> {
......
......@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.mapper.BaseMapper;
* </p>
*
* @author stylefeng
* @since 2017-05-21
* @since 2017-05-23
*/
public interface LoginLogMapper extends BaseMapper<LoginLog> {
......
......@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.mapper.BaseMapper;
* </p>
*
* @author stylefeng
* @since 2017-05-21
* @since 2017-05-23
*/
public interface MenuMapper extends BaseMapper<Menu> {
......
......@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.mapper.BaseMapper;
* </p>
*
* @author stylefeng
* @since 2017-05-21
* @since 2017-05-23
*/
public interface NoticeMapper extends BaseMapper<Notice> {
......
......@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.mapper.BaseMapper;
* </p>
*
* @author stylefeng
* @since 2017-05-21
* @since 2017-05-23
*/
public interface OperationLogMapper extends BaseMapper<OperationLog> {
......
......@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.mapper.BaseMapper;
* </p>
*
* @author stylefeng
* @since 2017-05-21
* @since 2017-05-23
*/
public interface RelationMapper extends BaseMapper<Relation> {
......
......@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.mapper.BaseMapper;
* </p>
*
* @author stylefeng
* @since 2017-05-21
* @since 2017-05-23
*/
public interface RoleMapper extends BaseMapper<Role> {
......
......@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.mapper.BaseMapper;
* </p>
*
* @author stylefeng
* @since 2017-05-21
* @since 2017-05-23
*/
public interface UserMapper extends BaseMapper<User> {
......
......@@ -11,7 +11,7 @@ import java.io.Serializable;
* </p>
*
* @author stylefeng
* @since 2017-05-21
* @since 2017-05-23
*/
public class Dept extends Model<Dept> {
......
......@@ -11,7 +11,7 @@ import java.io.Serializable;
* </p>
*
* @author stylefeng
* @since 2017-05-21
* @since 2017-05-23
*/
public class Dict extends Model<Dict> {
......
package com.stylefeng.guns.common.persistence.model;
import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
......@@ -13,7 +14,7 @@ import java.io.Serializable;
* </p>
*
* @author stylefeng
* @since 2017-05-21
* @since 2017-05-23
*/
@TableName("login_log")
public class LoginLog extends Model<LoginLog> {
......
......@@ -11,7 +11,7 @@ import java.io.Serializable;
* </p>
*
* @author stylefeng
* @since 2017-05-21
* @since 2017-05-23
*/
public class Menu extends Model<Menu> {
......
package com.stylefeng.guns.common.persistence.model;
import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
......@@ -12,7 +13,7 @@ import java.io.Serializable;
* </p>
*
* @author stylefeng
* @since 2017-05-21
* @since 2017-05-23
*/
public class Notice extends Model<Notice> {
......
......@@ -13,7 +13,7 @@ import java.io.Serializable;
* </p>
*
* @author stylefeng
* @since 2017-05-21
* @since 2017-05-23
*/
@TableName("operation_log")
public class OperationLog extends Model<OperationLog> {
......
......@@ -11,7 +11,7 @@ import java.io.Serializable;
* </p>
*
* @author stylefeng
* @since 2017-05-21
* @since 2017-05-23
*/
public class Relation extends Model<Relation> {
......
......@@ -11,7 +11,7 @@ import java.io.Serializable;
* </p>
*
* @author stylefeng
* @since 2017-05-21
* @since 2017-05-23
*/
public class Role extends Model<Role> {
......
......@@ -12,7 +12,7 @@ import java.io.Serializable;
* </p>
*
* @author stylefeng
* @since 2017-05-21
* @since 2017-05-23
*/
public class User extends Model<User> {
......
package ${package.Entity};
#if(${activeRecord})
import com.baomidou.mybatisplus.activerecord.Model;
#end
#foreach($pkg in ${table.importPackages})
import ${pkg};
#end
import java.io.Serializable;
import com.baomidou.mybatisplus.annotations.TableId;
/**
* <p>
* ${table.comment}
* </p>
*
* @author ${author}
* @since ${date}
*/
#if(${table.convert})
@TableName("${table.name}")
#end
#if(${superEntityClass})
public class ${entity} extends ${superEntityClass}#if(${activeRecord})<${entity}>#end {
#elseif(${activeRecord})
public class ${entity} extends Model<${entity}> {
#else
public class ${entity} implements Serializable {
#end
private static final long serialVersionUID = 1L;
#foreach($field in ${table.fields})
#if(${field.keyFlag})
#set($keyPropertyName=${field.propertyName})
#end
#if("$!field.comment" != "")
/**
* ${field.comment}
*/
#end
#if(${field.convert})
#if(${field.keyFlag})
@TableId("${field.name}")
#else
@TableField("${field.name}")
#end
#else
#if(${field.keyFlag})
@TableId
#end
#end
private ${field.propertyType} ${field.propertyName};
#end
#foreach($field in ${table.fields})
#if(${field.propertyType.equals("Boolean")})
#set($getprefix="is")
#else
#set($getprefix="get")
#end
public ${field.propertyType} ${getprefix}${field.capitalName}() {
return ${field.propertyName};
}
#if(${entityBuliderModel})
public ${entity} set${field.capitalName}(${field.propertyType} ${field.propertyName}) {
#else
public void set${field.capitalName}(${field.propertyType} ${field.propertyName}) {
#end
this.${field.propertyName} = ${field.propertyName};
#if(${entityBuliderModel})
return this;
#end
}
#end
#if(${entityColumnConstant})
#foreach($field in ${table.fields})
public static final String ${field.name.toUpperCase()} = "${field.name}";
#end
#end
#if(${activeRecord})
@Override
protected Serializable pkVal() {
#if(${keyPropertyName})
return this.${keyPropertyName};
#else
return this.id;
#end
}
#end
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment