feat:完善项目
This commit is contained in:
@ -44,6 +44,26 @@ func (c *Breakdown) List(title string, page, pageSize int) (*basic.PageDataRespo
|
||||
return &basic.PageDataResponse{Data: list, Count: count}, nil
|
||||
}
|
||||
|
||||
// Select 查询信息
|
||||
func (c *Breakdown) Select() ([]*BreakdownInfo, error) {
|
||||
mSysBreakdown := model.NewSysBreakdown()
|
||||
|
||||
out := make([]*model2.SysBreakdown, 0)
|
||||
|
||||
if err := model2.ScanFields(mSysBreakdown.SysBreakdown, &out, []string{"id", "title"}); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
list := make([]*BreakdownInfo, 0)
|
||||
|
||||
for _, v := range out {
|
||||
list = append(list, &BreakdownInfo{
|
||||
CommonIDString: basic.CommonIDString{ID: v.GetEncodeID()},
|
||||
SysBreakdown: v,
|
||||
})
|
||||
}
|
||||
return list, nil
|
||||
}
|
||||
|
||||
// Form 数据处理
|
||||
func (c *Breakdown) Form(id uint64, title, remark string) error {
|
||||
mSysBreakdown := model.NewSysBreakdown()
|
||||
|
Reference in New Issue
Block a user