更新代码生成器
This commit is contained in:
@@ -5,7 +5,7 @@ import service from '@/utils/request'
|
||||
// @Security ApiKeyAuth
|
||||
// @accept application/json
|
||||
// @Produce application/json
|
||||
// @Param data body {{.PackageName}}.{{.StructName}} true "创建{{.StructName}}"
|
||||
// @Param data body model.{{.StructName}} true "创建{{.StructName}}"
|
||||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
|
||||
// @Router /{{.Abbreviation}}/create{{.StructName}} [post]
|
||||
export const create{{.StructName}} = (data) => {
|
||||
@@ -22,13 +22,13 @@ export const create{{.StructName}} = (data) => {
|
||||
// @Security ApiKeyAuth
|
||||
// @accept application/json
|
||||
// @Produce application/json
|
||||
// @Param data body {{.PackageName}}.{{.StructName}} true "删除{{.StructName}}"
|
||||
// @Param data body model.{{.StructName}} true "删除{{.StructName}}"
|
||||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
|
||||
// @Router /{{.Abbreviation}}/delete{{.StructName}} [post]
|
||||
// @Router /{{.Abbreviation}}/delete{{.StructName}} [delete]
|
||||
export const delete{{.StructName}} = (data) => {
|
||||
return service({
|
||||
url: "/{{.Abbreviation}}/delete{{.StructName}}",
|
||||
method: 'post',
|
||||
method: 'delete',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -38,13 +38,13 @@ export const create{{.StructName}} = (data) => {
|
||||
// @Security ApiKeyAuth
|
||||
// @accept application/json
|
||||
// @Produce application/json
|
||||
// @Param data body {{.PackageName}}.{{.StructName}} true "更新{{.StructName}}"
|
||||
// @Param data body model.{{.StructName}} true "更新{{.StructName}}"
|
||||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
|
||||
// @Router /{{.Abbreviation}}/update{{.StructName}} [post]
|
||||
// @Router /{{.Abbreviation}}/update{{.StructName}} [put]
|
||||
export const update{{.StructName}} = (data) => {
|
||||
return service({
|
||||
url: "/{{.Abbreviation}}/update{{.StructName}}",
|
||||
method: 'post',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -55,14 +55,14 @@ export const create{{.StructName}} = (data) => {
|
||||
// @Security ApiKeyAuth
|
||||
// @accept application/json
|
||||
// @Produce application/json
|
||||
// @Param data body {{.PackageName}}.{{.StructName}} true "用id查询{{.StructName}}"
|
||||
// @Param data body model.{{.StructName}} true "用id查询{{.StructName}}"
|
||||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
|
||||
// @Router /{{.Abbreviation}}/find{{.StructName}} [post]
|
||||
// @Router /{{.Abbreviation}}/find{{.StructName}} [get]
|
||||
export const find{{.StructName}} = (data) => {
|
||||
return service({
|
||||
url: "/{{.Abbreviation}}/find{{.StructName}}",
|
||||
method: 'post',
|
||||
data
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
@@ -74,11 +74,11 @@ export const create{{.StructName}} = (data) => {
|
||||
// @Produce application/json
|
||||
// @Param data body request.PageInfo true "分页获取{{.StructName}}列表"
|
||||
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
|
||||
// @Router /{{.Abbreviation}}/get{{.StructName}}List [post]
|
||||
// @Router /{{.Abbreviation}}/get{{.StructName}}List [get]
|
||||
export const get{{.StructName}}List = (data) => {
|
||||
return service({
|
||||
url: "/{{.Abbreviation}}/get{{.StructName}}List",
|
||||
method: 'post',
|
||||
data
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user