fix
This commit is contained in:
@@ -1,2 +1,14 @@
|
||||
package gmodel
|
||||
// TODO: 使用model的属性做你想做的
|
||||
|
||||
import "context"
|
||||
|
||||
// TODO: 使用model的属性做你想做的
|
||||
|
||||
func (bm *FsProductTemplateBasemapModel) GetAllEnabledList(ctx context.Context, fields ...string) (resp []FsProductTemplateBasemap, err error) {
|
||||
db := bm.db.WithContext(ctx).Model(&FsProductTemplateBasemap{}).Where("`status` = ? ", 1)
|
||||
if len(fields) != 0 {
|
||||
db = db.Select(fields[0])
|
||||
}
|
||||
err = db.Find(&resp).Error
|
||||
return resp, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user