1、优化库存详情分类查询,支持选择父分类查询;
This commit is contained in:
parent
602f73a7a9
commit
6172ceaa66
|
@ -2784,7 +2784,12 @@ func (m *ErpStockCommodityListReq) buildQueryConditions(qs *gorm.DB, nType uint3
|
|||
}
|
||||
|
||||
if m.ErpCategoryId != 0 { //商品分类id
|
||||
qs = qs.Where("erp_category_id=?", m.ErpCategoryId)
|
||||
categoryList, _ := GetSubcategoryIds(m.ErpCategoryId)
|
||||
if categoryList == nil {
|
||||
categoryList = append(categoryList, m.ErpCategoryId)
|
||||
}
|
||||
|
||||
qs = qs.Where("erp_category_id in ?", categoryList)
|
||||
}
|
||||
|
||||
if m.IMEI != "" { //商品串码
|
||||
|
|
Loading…
Reference in New Issue
Block a user