mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-08-26 16:46:14 +08:00
fix generate
接口返回list如果是nil,则赋值为空数组 前端State类加构造函数
This commit is contained in:
@@ -27,6 +27,10 @@ func (c *c@{.varName}) List(ctx context.Context, req *@{.varName | ToLower}.List
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
if list == nil {
|
||||
list = []*@{.templateGroup}in.@{.varName}ListModel{}
|
||||
}
|
||||
|
||||
res = new(@{.varName | ToLower}.ListRes)
|
||||
res.List = list
|
||||
|
Reference in New Issue
Block a user