mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-08-27 07:23:40 +08:00
perf 改进表格图片、文件展示组件使用方式,减少冗余
fix 修复生成树表时选项加载错误 chore 清理生成代码cli包中的测试文件
This commit is contained in:
@@ -103,7 +103,16 @@ func (c *c@{.varName}) Switch(ctx context.Context, req *@{.varName | ToLower}.Sw
|
||||
// TreeOption 获取@{.tableComment}关系树选项
|
||||
func (c *c@{.varName}) TreeOption(ctx context.Context, req *@{.varName | ToLower}.TreeOptionReq) (res *@{.varName | ToLower}.TreeOptionRes, err error) {
|
||||
data, err := service.@{.servFunName}().TreeOption(ctx)
|
||||
res = (*@{.varName | ToLower}.TreeOptionRes)(&data)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if len(data) > 0 {
|
||||
res = (*@{.varName | ToLower}.TreeOptionRes)(&data)
|
||||
} else {
|
||||
temp := make(@{.varName | ToLower}.TreeOptionRes, 0)
|
||||
res = &temp
|
||||
}
|
||||
return
|
||||
}
|
||||
@{end}
|
||||
|
Reference in New Issue
Block a user