This commit is contained in:
邹宗楠
2025-07-21 10:15:06 +08:00
parent c068b8853b
commit 913c86da47
2 changed files with 8 additions and 3 deletions

View File

@@ -288,12 +288,17 @@ func (a *API) CheckImgIsSupplement(externalCustomerNo string) (*OpenCustomerExtI
return nil, err
}
if imgSupplementResp.Code != "200" {
if imgSupplementResp.Code != Success {
return nil, fmt.Errorf(imgSupplementResp.Message)
}
base64DecryData, _ := base64.StdEncoding.DecodeString(result["data"].(string))
resultData, err := DecryptByPublicKey(base64DecryData, PublicKeyBegin)
if err != nil {
return nil, err
}
openCustomerExtImgVo := &OpenCustomerExtImgVo{}
if err = json.Unmarshal([]byte(imgSupplementResp.Data), openCustomerExtImgVo); err != nil {
if err = json.Unmarshal(resultData, openCustomerExtImgVo); err != nil {
return nil, err
}

View File

@@ -208,7 +208,7 @@ func TestQueryMerchantReviewStatus(t *testing.T) {
// TestCheckImgIsSupplement 检查门店需要补充的图片
func TestCheckImgIsSupplement(t *testing.T) {
api.CheckImgIsSupplement("100139367")
api.CheckImgIsSupplement("822651059990E0M")
}
// TestGetMerchantReportStatus 商户报备查询