13 lines
540 B
Go
Executable File
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
|
|
}
|