fusenapi/model/gmodel/fs_product_model3d_light_logic.go
laodaming d876884397 fix
2023-06-25 17:11:42 +08:00

13 lines
540 B
Go
Executable File

package gmodel
import "context"
func (l *FsProductModel3dLightModel) GetAllByIds(ctx context.Context, ids []int64) (resp []FsProductModel3dLight, err error) {
err = l.db.WithContext(ctx).Model(&FsProductModel3dLight{}).Where("`id` in (?) and `status` = ?", ids, 1).Find(&resp).Error
return resp, err
}
func (l *FsProductModel3dLightModel) GetAll(ctx context.Context) (resp []FsProductModel3dLight, err error) {
err = l.db.WithContext(ctx).Model(&FsProductModel3dLight{}).Where("`status` = ?", 1).Find(&resp).Error
return resp, err
}