1
This commit is contained in:
@@ -436,17 +436,19 @@ func (p *PurchaseHandler) UpdateStoreSkusSpecTag(ctx *jxcontext.Context, vendorO
|
||||
return err
|
||||
}
|
||||
|
||||
type CategoryList struct {
|
||||
DdId string `json:"dd_id"`
|
||||
Id int `json:"id"`
|
||||
NameId int `json:"name_id"`
|
||||
}
|
||||
|
||||
func GetProductAuditList(vendorOrgCode string) map[string]string {
|
||||
var page int64 = 1
|
||||
var pageSize int64 = 1
|
||||
|
||||
updateCategory := make(map[string]string, 100) // 修改分类的Map
|
||||
ddIDList := make([]string, 0, 100)
|
||||
skuList := make([]struct {
|
||||
DdId string `json:"dd_id"`
|
||||
Id int `json:"id"`
|
||||
NameId int `json:"name_id"`
|
||||
}, 0, 100)
|
||||
skuList := make([]CategoryList, 0, 100)
|
||||
db := dao.GetDB()
|
||||
for {
|
||||
data, _, err := getAPI(vendorOrgCode, 0, "").GetProductAuditList(page, pageSize, 2)
|
||||
@@ -465,6 +467,10 @@ func GetProductAuditList(vendorOrgCode string) map[string]string {
|
||||
}
|
||||
|
||||
}
|
||||
if len(ddIDList) == 0 {
|
||||
ddIDList = append(ddIDList, "")
|
||||
updateCategory[utils.Int64ToStr(3583974659122702090)] = "99999"
|
||||
}
|
||||
globals.SugarLogger.Debugf("====================ddIDList %s", utils.Format4Output(ddIDList, false))
|
||||
sql := " SELECT b.dd_id,s.id,s.name_id FROM store_sku_bind b INNER JOIN sku s ON b.sku_id = s.id AND s.deleted_at = ? WHERE b.dd_id IN (" + dao.GenQuestionMarks(len(ddIDList)) + ") AND b.deleted_at = ?"
|
||||
params := []interface{}{utils.DefaultTimeValue, ddIDList, utils.DefaultTimeValue}
|
||||
@@ -490,18 +496,13 @@ func GetProductAuditList(vendorOrgCode string) map[string]string {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
break
|
||||
//if page*pageSize < total {
|
||||
// page++
|
||||
//}
|
||||
//updateCategory = make(map[string]string, 100) // 修改分类的Map
|
||||
//ddIDList = make([]string, 0, 100)
|
||||
//skuList = make([]struct {
|
||||
// DdID string `json:"dd_id"`
|
||||
// ID int `json:"id"`
|
||||
// NameId int `json:"name_id"`
|
||||
//}, 0, 100)
|
||||
//skuList = make([]CategoryList, 0, 100)
|
||||
}
|
||||
return updateCategory
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user