Commit 7afec11c by yubaogu

tett

parent 306bb19e
...@@ -10,10 +10,6 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -10,10 +10,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.gitee.flying.cattle.mdg.aid.JsonResult; import com.gitee.flying.cattle.mdg.aid.JsonResult;
import com.gitee.flying.cattle.mdg.aid.PageParam; import com.gitee.flying.cattle.mdg.aid.PageParam;
<#if isSwagger=="true" > <#if isSwagger=="true" >
......
...@@ -6,8 +6,9 @@ ...@@ -6,8 +6,9 @@
*/ */
package ${daoUrl}; package ${daoUrl};
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ydl.common.service.BaseMapper;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import ${entityUrl}.${entityName}; import ${entityUrl}.${entityName};
/** /**
......
...@@ -5,9 +5,8 @@ ...@@ -5,9 +5,8 @@
* All right reserved. * All right reserved.
*/ */
package ${entityUrl}; package ${entityUrl};
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
<#if isSwagger=="true" > <#if isSwagger=="true" >
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
......
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="${daoUrl}.${entityName}Dao"> <mapper namespace="${daoUrl}.${entityName}Mapper">
<resultMap id="BaseResultMap" type="${entityUrl}.${entityName}"> <resultMap id="BaseResultMap" type="${entityUrl}.${entityName}">
<#list cis as ci> <#list cis as ci>
......
...@@ -6,8 +6,9 @@ ...@@ -6,8 +6,9 @@
*/ */
package ${serviceUrl}; package ${serviceUrl};
import com.ydl.common.service.IService;
import ${entityUrl}.${entityName}; import ${entityUrl}.${entityName};
import com.baomidou.mybatisplus.extension.service.IService;
/** /**
* @Description:TODO(${entityComment}服务层) * @Description:TODO(${entityComment}服务层)
* @version: ${version} * @version: ${version}
......
...@@ -10,8 +10,10 @@ import ${entityUrl}.${entityName}; ...@@ -10,8 +10,10 @@ import ${entityUrl}.${entityName};
import ${daoUrl}.${entityName}Dao; import ${daoUrl}.${entityName}Dao;
import ${serviceUrl}.${entityName}Service; import ${serviceUrl}.${entityName}Service;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ydl.common.service.impl.BaseService;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;
import com.github.pagehelper.PageHelper;
/** /**
* @Description:TODO(${entityComment}服务实现) * @Description:TODO(${entityComment}服务实现)
* *
......
...@@ -46,7 +46,7 @@ public class MyGenerator { ...@@ -46,7 +46,7 @@ public class MyGenerator {
public static final String XML_URL = "com.buybit.power.mapper.xml"; public static final String XML_URL = "com.buybit.power.mapper.xml";
public static final String SERVICE_URL = "com.buybit.power.service"; public static final String SERVICE_URL = "com.buybit.power.service";
public static final String SERVICE_IMPL_URL = "com.buybit.power.service.impl"; public static final String SERVICE_IMPL_URL = "com.buybit.power.service.impl";
public static final String CONTROLLER_URL = "com.buybit.power.web"; public static final String CONTROLLER_URL = "com.buybit.power.api";
//是否是Swagger配置 //是否是Swagger配置
public static final String IS_SWAGGER = "true"; public static final String IS_SWAGGER = "true";
...@@ -60,7 +60,7 @@ public class MyGenerator { ...@@ -60,7 +60,7 @@ public class MyGenerator {
bi.setEntityComment(CLASSCOMMENT); bi.setEntityComment(CLASSCOMMENT);
try { try {
bi = EntityInfoUtil.getInfo(bi); bi = EntityInfoUtil.getInfo(bi);
String fileUrl = "D:\\ydlwork\\generator\\";// 生成文件存放位置 String fileUrl = "D:\\ydlwork\\generator\\demo\\src\\main\\java\\";// 生成文件存放位置
//开始生成文件 //开始生成文件
String aa1 = Generator.createEntity(fileUrl, bi).toString(); String aa1 = Generator.createEntity(fileUrl, bi).toString();
String aa2 = Generator.createDao(fileUrl, bi).toString(); String aa2 = Generator.createDao(fileUrl, bi).toString();
......
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