From 0e7ad07e1984b072565de67e66f671024d30193f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Fri, 5 Feb 2021 16:43:38 +0800 Subject: [PATCH] aa --- business/partner/purchase/ebai/store.go | 31 ++++++++++++++----------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/business/partner/purchase/ebai/store.go b/business/partner/purchase/ebai/store.go index f6a526359..758e113bd 100644 --- a/business/partner/purchase/ebai/store.go +++ b/business/partner/purchase/ebai/store.go @@ -721,10 +721,11 @@ func (c *PurchaseHandler) SyncQualify(ctx *jxcontext.Context, storeDetail *dao.S licenceMap["license_address"] = storeDetail.LicenceAddress licenceMap["legal_representative_name"] = storeDetail.LicenceOwnerName licenceMap["license_name"] = storeDetail.LicenceCorpName + licence, _ := api.EbaiAPI.PictureUpload(storeDetail.Licence, nil) licenceMap["photos"] = []map[string]interface{}{ map[string]interface{}{ - "photo_url": storeDetail.Licence, - "waterprinter_url": storeDetail.Licence, + "photo_url": licence, + "waterprinter_url": licence, }, } if storeDetail.LicenceExpire == "" { @@ -750,10 +751,11 @@ func (c *PurchaseHandler) SyncQualify(ctx *jxcontext.Context, storeDetail *dao.S licence2Map["license_address"] = storeDetail.LicenceAddress licence2Map["legal_representative_name"] = storeDetail.LicenceOwnerName licence2Map["license_name"] = storeDetail.LicenceCorpName + licence2, _ := api.EbaiAPI.PictureUpload(storeDetail.Licence2Image, nil) licence2Map["photos"] = []map[string]interface{}{ map[string]interface{}{ - "photo_url": storeDetail.Licence2Image, - "waterprinter_url": storeDetail.Licence2Image, + "photo_url": licence2, + "waterprinter_url": licence2, }, } if storeDetail.Licence2Expire == "" { @@ -778,14 +780,16 @@ func (c *PurchaseHandler) SyncQualify(ctx *jxcontext.Context, storeDetail *dao.S idMap["license_number"] = storeDetail.IDCode idMap["legal_representative_name"] = storeDetail.IDName idMap["license_name"] = storeDetail.IDName + idCardFront, _ := api.EbaiAPI.PictureUpload(storeDetail.IDCardFront, nil) + idCardBack, _ := api.EbaiAPI.PictureUpload(storeDetail.IDCardBack, nil) idMap["photos"] = []map[string]interface{}{ map[string]interface{}{ - "photo_url": storeDetail.IDCardFront, - "waterprinter_url": storeDetail.IDCardFront, + "photo_url": idCardFront, + "waterprinter_url": idCardFront, }, map[string]interface{}{ - "photo_url": storeDetail.IDCardBack, - "waterprinter_url": storeDetail.IDCardBack, + "photo_url": idCardBack, + "waterprinter_url": idCardBack, }, } if storeDetail.IDExpire == "" { @@ -801,16 +805,17 @@ func (c *PurchaseHandler) SyncQualify(ctx *jxcontext.Context, storeDetail *dao.S idMap["license_validdate"] = storeDetail.IDExpire } } - params := make(map[string]interface{}) + storeFrontPic, _ := api.EbaiAPI.PictureUpload(storeDetail.StoreFrontPic, nil) + storeInPic, _ := api.EbaiAPI.PictureUpload(storeDetail.StoreInPic, nil) maps := []map[string]interface{}{ licenceMap, idMap, map[string]interface{}{ "type_1": 5, "type_2": 501, "photos": []map[string]interface{}{ map[string]interface{}{ - "photo_url": storeDetail.StoreFrontPic, - "waterprinter_url": storeDetail.StoreFrontPic, + "photo_url": storeFrontPic, + "waterprinter_url": storeFrontPic, }, }, }, map[string]interface{}{ @@ -818,8 +823,8 @@ func (c *PurchaseHandler) SyncQualify(ctx *jxcontext.Context, storeDetail *dao.S "type_2": 502, "photos": []map[string]interface{}{ map[string]interface{}{ - "photo_url": storeDetail.StoreInPic, - "waterprinter_url": storeDetail.StoreInPic, + "photo_url": storeInPic, + "waterprinter_url": storeInPic, }, }, },