File tree Expand file tree Collapse file tree 5 files changed +16
-10
lines changed
web/src/view/systemTools/autoCodeAdmin Expand file tree Collapse file tree 5 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -236,6 +236,7 @@ type AutoFunc struct {
236
236
Package string `json:"package"`
237
237
FuncName string `json:"funcName"` // 方法名称
238
238
Router string `json:"router"` // 路由名称
239
+ FuncDesc string `json:"funcDesc"` // 方法介绍
239
240
BusinessDB string `json:"businessDB"` // 业务库
240
241
StructName string `json:"structName"` // Struct名称
241
242
PackageName string `json:"packageName"` // 文件名称
Original file line number Diff line number Diff line change 1
1
{ {if .IsPlugin} }
2
- // { {.FuncName} } 等待开发的的 { {.Description } }接口
2
+ // { {.FuncName} } { {.FuncDesc } }
3
3
// @Tags { {.StructName} }
4
- // @Summary 等待开发的的 { {.Description } }接口
4
+ // @Summary { {.FuncDesc } }
5
5
// @accept application/json
6
6
// @Produce application/json
7
7
// @Param data query request.{ {.StructName} }Search true "分页获取{ {.Description} }列表"
@@ -20,9 +20,9 @@ func (a *{{.Abbreviation}}) {{.FuncName}}(c *gin.Context) {
20
20
21
21
{ {- else -} }
22
22
23
- // { {.FuncName} } 等待开发的的 { {.Description } }接口
23
+ // { {.FuncName} } { {.FuncDesc } }
24
24
// @Tags { {.StructName} }
25
- // @Summary 等待开发的的 { {.Description } }接口
25
+ // @Summary { {.FuncDesc } }
26
26
// @accept application/json
27
27
// @Produce application/json
28
28
// @Param data query { {.Package} }Req.{ {.StructName} }Search true "成功"
Original file line number Diff line number Diff line change 1
1
{ {if .IsPlugin} }
2
- // { {.FuncName} } 等待开发的的 { {.Description } }接口
2
+ // { {.FuncName} } { {.FuncDesc } }
3
3
// @Tags { {.StructName} }
4
- // @Summary 等待开发的的 { {.Description } }接口
4
+ // @Summary { {.FuncDesc } }
5
5
// @accept application/json
6
6
// @Produce application/json
7
7
// @Param data query request.{ {.StructName} }Search true "分页获取{ {.Description} }列表"
@@ -16,9 +16,9 @@ export const {{.Router}} = () => {
16
16
17
17
{ {- else -} }
18
18
19
- // { {.FuncName} } 等待开发的的 { {.Description } }接口
19
+ // { {.FuncName} } { {.FuncDesc } }
20
20
// @Tags { {.StructName} }
21
- // @Summary 等待开发的的 { {.Description } }接口
21
+ // @Summary { {.FuncDesc } }
22
22
// @accept application/json
23
23
// @Produce application/json
24
24
// @Param data query { {.Package} }Req.{ {.StructName} }Search true "成功"
Original file line number Diff line number Diff line change 6
6
{ {- end} }
7
7
{ {if .IsPlugin} }
8
8
9
- // { {.FuncName} } 请实现方法
9
+ // { {.FuncName} } { {.FuncDesc } }
10
10
// Author [yourname](https://github.com/yourname)
11
11
func (s *{ {.Abbreviation} }) { {.FuncName} }() (err error) {
12
12
db := {{$db } }.Model(&model.{ {.StructName} }{ } )
@@ -15,7 +15,7 @@ func (s *{{.Abbreviation}}) {{.FuncName}}() (err error) {
15
15
16
16
{ {- else -} }
17
17
18
- // { {.FuncName} } 请实现方法
18
+ // { {.FuncName} } { {.FuncDesc } }
19
19
// Author [yourname](https://github.com/yourname)
20
20
func ({ {.Abbreviation} }Service *{ {.StructName} }Service){ {.FuncName} }() (err error) {
21
21
// 请在这里实现自己的业务逻辑
Original file line number Diff line number Diff line change 177
177
<el-form-item label =" 缩写:" >
178
178
<el-input v-model =" autoFunc.abbreviation" placeholder =" 请输入缩写" disabled />
179
179
</el-form-item >
180
+ <el-form-item label =" 方法名:" >
181
+ <el-input v-model =" autoFunc.funcDesc" placeholder =" 请输入方法介绍" />
182
+ </el-form-item >
180
183
<el-form-item label =" 方法名:" >
181
184
<el-input v-model =" autoFunc.funcName" placeholder =" 请输入方法名" />
182
185
</el-form-item >
@@ -238,6 +241,7 @@ const autoFunc = ref({
238
241
humpPackageName: " " ,
239
242
businessDB: " " ,
240
243
method: " " ,
244
+ funcDesc: " "
241
245
})
242
246
243
247
const addFuncBtn = (row ) => {
@@ -252,6 +256,7 @@ const addFuncBtn = (row) => {
252
256
autoFunc .value .method = " "
253
257
autoFunc .value .funcName = " "
254
258
autoFunc .value .router = " "
259
+ autoFunc .value .funcDesc = " 方法介绍"
255
260
funcFlag .value = true ;
256
261
};
257
262
You can’t perform that action at this time.
0 commit comments