This commit is contained in:
邹宗楠
2022-11-21 10:40:49 +08:00
parent c346adc760
commit ce2bdea956
2 changed files with 5 additions and 5 deletions

View File

@@ -8148,7 +8148,7 @@ func (a *API) GetProductUpdateRule2(categoryId int64) bool {
} }
// GetProductAuditList 获取商品的审核记录 // GetProductAuditList 获取商品的审核记录
func (a *API) GetProductAuditList(page, pageSize, status int64) ([]product_auditList_response.RecordsItem, error) { func (a *API) GetProductAuditList(page, pageSize, status int64) ([]product_auditList_response.RecordsItem, int64, error) {
request := product_auditList_request.New() request := product_auditList_request.New()
request.Param.PublishStatus = status request.Param.PublishStatus = status
request.Param.Page = page request.Param.Page = page
@@ -8156,11 +8156,11 @@ func (a *API) GetProductAuditList(page, pageSize, status int64) ([]product_audit
result, err := request.Execute(a.accessTokenObj) result, err := request.Execute(a.accessTokenObj)
if err != nil { if err != nil {
return nil, err return nil, 0, err
} }
if result.Code != RequestSuccessCode { if result.Code != RequestSuccessCode {
return nil, errors.New(result.SubMsg) return nil, 0, errors.New(result.SubMsg)
} }
return result.Data.Records, nil return result.Data.Records, result.Data.Total, nil
} }

View File

@@ -394,7 +394,7 @@ func TestPPPPPPPPPPPPPP(t *testing.T) {
} }
func TestGetProductAuditList(t *testing.T) { func TestGetProductAuditList(t *testing.T) {
data, _ := a.GetProductAuditList(1, 100, 2) data, _, _ := a.GetProductAuditList(1, 100, 2)
updateCategory := make(map[string]string, 0) // 修改分类的Map updateCategory := make(map[string]string, 0) // 修改分类的Map
for _, v := range data { for _, v := range data {
if _, ok := v.AuditReason["综合原因"]; ok { if _, ok := v.AuditReason["综合原因"]; ok {