fix
This commit is contained in:
@@ -16,7 +16,7 @@ type (
|
||||
fsProductSizeModel
|
||||
CountByStatus(ctx context.Context, status int) (total int, err error)
|
||||
GetAllByProductIds(ctx context.Context, productIds []string, sort string) (resp []FsProductSize, err error)
|
||||
GetAllByiIds(ctx context.Context, ids []string, sort string) (resp []FsProductSize, err error)
|
||||
GetAllByIds(ctx context.Context, ids []string, sort string) (resp []FsProductSize, err error)
|
||||
}
|
||||
|
||||
customFsProductSizeModel struct {
|
||||
@@ -53,8 +53,8 @@ func (m *defaultFsProductSizeModel) GetAllByProductIds(ctx context.Context, prod
|
||||
return
|
||||
}
|
||||
|
||||
func (m *defaultFsProductSizeModel) GetAllByiIds(ctx context.Context, ids []string, sort string) (resp []FsProductSize, err error) {
|
||||
query := fmt.Sprintf("select %s from %s where `id` in(?) and `status` = ? ", fsProductSizeRows, m.table)
|
||||
func (m *defaultFsProductSizeModel) GetAllByIds(ctx context.Context, ids []string, sort string) (resp []FsProductSize, err error) {
|
||||
query := fmt.Sprintf("select %s from %s where `id` in (?) and `status` = ? ", fsProductSizeRows, m.table)
|
||||
switch sort {
|
||||
case "sort-asc":
|
||||
query = fmt.Sprintf("%s order by `sort` ASC", query)
|
||||
|
||||
Reference in New Issue
Block a user