diff --git a/platformapi/lakala/lakala_incoming.go b/platformapi/lakala/lakala_incoming.go index 6c1453bc..f9be766d 100644 --- a/platformapi/lakala/lakala_incoming.go +++ b/platformapi/lakala/lakala_incoming.go @@ -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 } diff --git a/platformapi/lakala/lakala_token_test.go b/platformapi/lakala/lakala_token_test.go index 4cd97178..e20ea5ef 100644 --- a/platformapi/lakala/lakala_token_test.go +++ b/platformapi/lakala/lakala_token_test.go @@ -208,7 +208,7 @@ func TestQueryMerchantReviewStatus(t *testing.T) { // TestCheckImgIsSupplement 检查门店需要补充的图片 func TestCheckImgIsSupplement(t *testing.T) { - api.CheckImgIsSupplement("100139367") + api.CheckImgIsSupplement("822651059990E0M") } // TestGetMerchantReportStatus 商户报备查询