

## ${functionName}服务接口
### 查询${functionName}列表
**URL:** http://localhost:8080/m/${RequestMapping}/list

**Type:** POST

**Content-Type:** application/x-www-form-urlencoded;charset=utf-8

**Description:** 查询${functionName}

**Query-parameters:**

参数名称|类型|备注|必填|其它
    ---|---|---|---|---
pageInfo|object|分页对象|否|-
└─beginIndex|Integer|开始记录序号|否|-
└─prePageResult|Integer|每页条数|否|-
└─totalResult|Integer|总条数|否|-
└─totalPage|Integer|总页数|否|-
└─currPage|Integer|当前页|否|-
└─displayPageSize|Integer|显示页数量|否|-
└─hasNextPage|Boolean|是否有下一页|否|-
└─hasPrePage|Boolean|是否有前一页|否|-
└─lastRecordKey|String|最后一条|否|-
└─countPage|Boolean|是否计算总页数|否|-
query|object|查询对象|否|-
<#list columns as column>
└─${column.javaField}|${column.javaType}|${column.columnComment}|否|-
</#list>
<#list columns as column>
<#if column.javaType == "Long"||column.javaType == "Integer"||column.javaType == "BigDecimal">
└─${column.javaField}Start|${column.javaType}|大于 > ${column.columnComment}|否|-
└─${column.javaField}End|${column.javaType}|小于 < ${column.columnComment}|否|-
└─${column.javaField}List|array|${column.columnComment}列表|否|-
</#if>
<#if column.javaType == "String">
└─${column.javaField}List|array|${column.columnComment}列表|否|-
</#if>
<#if column.javaType == "Date">
└─${column.javaField}Start|${column.javaType}|大于 > ${column.columnComment}|否|-
└─${column.javaField}End|${column.javaType}|小于 < ${column.columnComment}|否|-
</#if>
</#list>

**请求样例:**
```
curl -X POST -i http://localhost:8080/m/${RequestMapping}/list --data 'query.id=1'
```
**响应参数:**

参数名称 |参数类型|备注|其它
---|---|---|---
code|Integer|结果码（0.失败，1.成功）|-
msg|String|消息|-
data|object|数据对象|-
└─result|array|结果集列表|数组
<#list columns as column>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;└─${column.javaField}|${column.javaType}|${column.columnComment}|-
</#list>
└─pageInfo|object|分页对象|-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;└─beginIndex|Integer|开始记录序号|-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;└─prePageResult|Integer|每页条数|-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;└─totalResult|Integer|总条数|-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;└─totalPage|Integer|总页数|-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;└─currPage|Integer|当前页|-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;└─displayPageSize|Integer|显示页数量|-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;└─hasNextPage|Boolean|是否有下一页|-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;└─hasPrePage|Boolean|是否有前一页|-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;└─lastRecordKey|String|最后一条|-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;└─countPage|Boolean|是否计算总页数|-
└─dict|object|字典对象|-
<#list columns as column>
    <#if column.dict??&&(column.columnType?contains("tinyint") ||column.htmlType==3||column.htmlType==5)>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;└─${column.javaField}|object|字典属性对象，详见附录|-
    </#if>
</#list>
└─query|object|查询时候返回的查询列表参数对象|-


**响应消息样例:**
```
{
    "code":1,
    "data":{
        "result":[
            {
                "appId":6,
                "businessName":"device",
            }
        ],
        "pageInfo":{
            "currPage":1,
            "prePageResult":200,
            "totalPage":1,
            "totalResult":16
        },
        "dict":{
            "dividedTableType":{
                "0":"无",
                "1":"日"
            }
        }
    },
    "query":{
        "appId":6
    }
}
```

### 编辑${functionName}
**URL:** http://localhost:8080/m/${RequestMapping}/edit

**Type:** POST

**Content-Type:** application/x-www-form-urlencoded;charset=utf-8

**Description:** 编辑${functionName}，返回实例详细信息

**Query-parameters:**

参数名称|类型|备注|必填|其它
---|---|---|---|---
${pkColumn.javaField}|array|实例主键ID，数组形式|是|-

**请求样例:**
```
curl -X POST -i http://localhost:8080/m/${RequestMapping}/edit --data 'id=[1]'
```
**响应参数:**

参数名称 |参数类型|备注|其它
---|---|---|---
code|Integer|结果码（0.失败，1.成功）|-
msg|String|消息|-
data|object|数据对象|-
└─entity|object|对象实体|对象
<#list columns as column>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;└─${column.javaField}|${column.javaType}|${column.columnComment}|-
</#list>
└─dict|object|字典对象|-
<#list columns as column>
    <#if column.dict??&&(column.columnType?contains("tinyint") ||column.htmlType==3||column.htmlType==5)>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;└─${column.javaField}|object|字典属性对象，详见附录|-
    </#if>
</#list>


**响应消息样例:**
```
{
    "code":1,
    "data":{
        "dict":{
            "interimExcuteStatus":{
                "0":"未启用",
                "1":"立即执行并保留"
            }
        },
        "entity":{
            "createTime":1628737643000,
            "createUserId":1,
            "createUserName":"系统管理员",
            "excuteDate":0
        }
    }
}
```

### 保存更新${functionName}
**URL:** http://localhost:8080/m/${RequestMapping}/save

**Type:** POST


**Content-Type:** application/x-www-form-urlencoded;charset=utf-8

**Description:** 保存或更新${functionName}：id为空时为新增保存，否则为更新提交

**Query-parameters:**

参数名称|类型|备注|必填|其它
---|---|---|---|---
entity|object|实体对象|是|-
<#list columns as column>
<#if !column.isSuperColumn(column.javaField)>
└─${column.javaField}|${column.javaType}|${column.columnComment}|是|-
</#if>
</#list>

**请求样例:**
```
...

```
**响应参数:**

参数名称 |参数类型|备注|其它
---|---|---|---
code|Integer|结果码（0.失败，1.成功）|-
msg|String|消息|-
data|object|数据对象|-
└─entity|object|保存实体|对象
<#list columns as column>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;└─${column.javaField}|${column.javaType}|${column.columnComment}|-
</#list>
└─dict|object|字典对象|-
<#list columns as column>
    <#if column.dict??&&(column.columnType?contains("tinyint") ||column.htmlType==3||column.htmlType==5)>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;└─${column.javaField}|object|字典属性对象想，详见附录|-
    </#if>
</#list>


**响应消息样例:**
```
{
    "code":1,
    "msg":"成功",
    "data":{
        "dict":{
            "interimExcuteStatus":{
                "0":"未启用",
                "1":"立即执行并保留"
            }
        },
        "entity":{
            "createTime":1628737643000,
            "createUserId":1,
            "createUserName":"系统管理员",
            "excuteDate":0
        }
    }
}
```

### 查看${functionName}
**URL:** http://localhost:8080/m/${RequestMapping}/view

**Type:** POST

**Content-Type:** application/x-www-form-urlencoded;charset=utf-8

**Description:** 查看${functionName}，返回实例详细信息

**Query-parameters:**

参数名称|类型|备注|必填|其它
---|---|---|---|---
${pkColumn.javaField}|array|实例主键ID，数组形式|是|-

**请求样例:**
```
curl -X POST -i http://localhost:8080/m/${RequestMapping}/view --data 'id=[1]'
```
**响应参数:**

参数名称 |参数类型|备注|其它
---|---|---|---
code|Integer|结果码（0.失败，1.成功）|-
msg|String|消息|-
data|object|数据对象|-
└─entity|object|对象实体|对象
<#list columns as column>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;└─${column.javaField}|${column.javaType}|${column.columnComment}|-
</#list>
└─dict|object|字典对象|-
<#list columns as column>
    <#if column.dict??&&(column.columnType?contains("tinyint") ||column.htmlType==3||column.htmlType==5)>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;└─${column.javaField}|object|字典属性对象，详见附录|-
    </#if>
</#list>


**响应消息样例:**
```
{
    "code":1,
    "data":{
        "dict":{
            "interimExcuteStatus":{
                "0":"未启用",
                "1":"立即执行并保留"
            }
        },
        "entity":{
            "createTime":1628737643000,
            "createUserId":1,
            "createUserName":"系统管理员",
            "excuteDate":0
        }
    }
}
```

### 删除${functionName}
**URL:** http://localhost:8080/m/${RequestMapping}/delete

**Type:** POST

**Content-Type:** application/x-www-form-urlencoded;charset=utf-8

**Description:** 删除${functionName}

**Query-parameters:**

参数名称|类型|备注|必填|其它
---|---|---|---|---
${pkColumn.javaField}|array|实例主键ID，数组形式|是|-

**请求样例:**
```
curl -X POST -i http://localhost:8080/m/${RequestMapping}/delete --data 'id=[1]'
```
**响应参数:**

参数名称 |参数类型|备注|其它
---|---|---|---
code|Integer|结果码（0.失败，1.成功）|-
msg|String|消息|-



**响应消息样例:**
```
{
    "code":1,
	"msg":"成功"

}
```

### ${functionName}导入模板下载
**URL:** http://localhost:8081/m/${RequestMapping}/downloadTemplate

**Type:** POST


**Content-Type:** application/x-www-form-urlencoded;charset=utf-8

**Description:** ${functionName}导入模板下载

**Request-example:**
```
curl -X POST -i http://localhost:8081/m/${RequestMapping}/downloadTemplate
```

**Response-example:**
```
...
```

### 导入${functionName}
**URL:** http://localhost:8081/m/${RequestMapping}/importData

**Type:** POST


**Content-Type:** multipart/form-data

**Description:** 导入${functionName}

**Query-parameters:**

参数名称|类型|备注|必填|其它
---|---|---|---|---
file|file|文件流|是|-
updateSupport|boolean|相同数据项是否更新|false|-

**Request-example:**
```
curl -X POST -H 'Content-Type: multipart/form-data' -i http://localhost:8081/m/${RequestMapping}/importData --data 'updateSupport=true'
```

**Response-example:**
```
...
```

