This commit is contained in:
邹宗楠
2022-11-18 18:17:04 +08:00
parent de9747944a
commit c346adc760

View File

@@ -394,7 +394,17 @@ func TestPPPPPPPPPPPPPP(t *testing.T) {
}
func TestGetProductAuditList(t *testing.T) {
data, err := a.GetProductAuditList(1, 100, 2)
globals.SugarLogger.Debugf("data %s", utils.Format4Output(data, false))
globals.SugarLogger.Debugf("data %s", err)
data, _ := a.GetProductAuditList(1, 100, 2)
updateCategory := make(map[string]string, 0) // 修改分类的Map
for _, v := range data {
if _, ok := v.AuditReason["综合原因"]; ok {
if strings.Contains(v.AuditReason["综合原因"][0], "该商品类目选择错误,推荐放置在") {
list := strings.Split(v.AuditReason["综合原因"][0], ``)
list2 := strings.Split(list[1], ``)
categoryNameList := strings.Split(list2[0], "/")
updateCategory[utils.Int64ToStr(v.ProductId)] = categoryNameList[len(categoryNameList)-1]
}
}
}
}