fusenapi/model/gmodel/fs_product_template_v2_logic.go
laodaming 47bf9580da fix
2023-06-16 15:11:37 +08:00

17 lines
414 B
Go
Executable File

package gmodel
import (
"context"
)
func (t *FsProductTemplateV2Model) FindAllByProductIds(ctx context.Context, productIds []int64) (resp []FsProductTemplateV2, err error) {
if len(productIds) == 0 {
return
}
err = t.db.WithContext(ctx).Model(&FsProductTemplateV2{}).Where("`id` in (?) and `is_del` = ? and `status` = ?", productIds, 0, 1).Find(&resp).Error
if err != nil {
return nil, err
}
return
}