【update】代码生成器一对多代码修改
This commit is contained in:
+1
-1
@@ -81,7 +81,7 @@ public class ${entityName}Controller {
|
|||||||
*/
|
*/
|
||||||
@AutoLog(value = "${tableVo.ftlDescription}-分页列表查询")
|
@AutoLog(value = "${tableVo.ftlDescription}-分页列表查询")
|
||||||
@ApiOperation(value="${tableVo.ftlDescription}-分页列表查询", notes="${tableVo.ftlDescription}-分页列表查询")
|
@ApiOperation(value="${tableVo.ftlDescription}-分页列表查询", notes="${tableVo.ftlDescription}-分页列表查询")
|
||||||
@GetMapping(value = "/list")
|
@GetMapping(value = "/page")
|
||||||
public Result<?> queryPageList(${entityName} ${entityName?uncap_first},
|
public Result<?> queryPageList(${entityName} ${entityName?uncap_first},
|
||||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
|||||||
-1
@@ -2,7 +2,6 @@ package ${bussiPackage}.${entityPackage}.entity;
|
|||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.util.Date;
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
|||||||
+1
-2
@@ -10,7 +10,6 @@ import lombok.Data;
|
|||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
import java.util.Date;
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
@@ -21,7 +20,7 @@ import java.io.UnsupportedEncodingException;
|
|||||||
* @Date: ${.now?string["yyyy-MM-dd"]}
|
* @Date: ${.now?string["yyyy-MM-dd"]}
|
||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
@ApiModel(value="${tableName}对象", description="${tableVo.ftlDescription}")
|
@ApiModel(value="${subTab.tableName}对象", description="${subTab.ftlDescription}")
|
||||||
@Data
|
@Data
|
||||||
@TableName("${subTab.tableName}")
|
@TableName("${subTab.tableName}")
|
||||||
public class ${subTab.entityName} implements Serializable {
|
public class ${subTab.entityName} implements Serializable {
|
||||||
|
|||||||
+9
-1
@@ -1,5 +1,13 @@
|
|||||||
<?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="${bussiPackage}.${entityPackage}.mapper.${entityName}Mapper">
|
<mapper namespace="${bussiPackage}.${entityPackage}.mapper.${entityName}Mapper">
|
||||||
|
<resultMap id="${entityName}ResultMap" type="${bussiPackage}.${entityPackage}.entity.${entityName}">
|
||||||
|
<#list originalColumns as field>
|
||||||
|
<#if field.fieldDbName=="id">
|
||||||
|
<id column="${field.fieldDbName}" property="${field.fieldName}" />
|
||||||
|
<#else>
|
||||||
|
<result column="${field.fieldDbName}" property="${field.fieldName}" />
|
||||||
|
</#if>
|
||||||
|
</#list>
|
||||||
|
</resultMap>
|
||||||
</mapper>
|
</mapper>
|
||||||
+9
-1
@@ -4,7 +4,15 @@
|
|||||||
<?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="${bussiPackage}.${entityPackage}.mapper.${subTab.entityName}Mapper">
|
<mapper namespace="${bussiPackage}.${entityPackage}.mapper.${subTab.entityName}Mapper">
|
||||||
|
<resultMap id="${subTab.entityName}ResultMap" type="${bussiPackage}.${entityPackage}.entity.${subTab.entityName}">
|
||||||
|
<#list subTab.originalColumns as field>
|
||||||
|
<#if field.fieldDbName=="id">
|
||||||
|
<id column="${field.fieldDbName}" property="${field.fieldName}" />
|
||||||
|
<#else>
|
||||||
|
<result column="${field.fieldDbName}" property="${field.fieldName}" />
|
||||||
|
</#if>
|
||||||
|
</#list>
|
||||||
|
</resultMap>
|
||||||
<delete id="deleteByMainId" parameterType="java.lang.String">
|
<delete id="deleteByMainId" parameterType="java.lang.String">
|
||||||
DELETE
|
DELETE
|
||||||
FROM ${subTab.tableName}
|
FROM ${subTab.tableName}
|
||||||
|
|||||||
+1
-1
@@ -310,7 +310,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
url: {
|
url: {
|
||||||
list: "/${entityPackage}/${entityName?uncap_first}/list",
|
list: "/${entityPackage}/${entityName?uncap_first}/page",
|
||||||
delete: "/${entityPackage}/${entityName?uncap_first}/delete",
|
delete: "/${entityPackage}/${entityName?uncap_first}/delete",
|
||||||
deleteBatch: "/${entityPackage}/${entityName?uncap_first}/deleteBatch",
|
deleteBatch: "/${entityPackage}/${entityName?uncap_first}/deleteBatch",
|
||||||
exportXlsUrl: "/${entityPackage}/${entityName?uncap_first}/exportXls",
|
exportXlsUrl: "/${entityPackage}/${entityName?uncap_first}/exportXls",
|
||||||
|
|||||||
Reference in New Issue
Block a user