This commit is contained in:
苏尹岚
2021-02-05 16:43:38 +08:00
parent fb7ad6b750
commit 0e7ad07e19

View File

@@ -721,10 +721,11 @@ func (c *PurchaseHandler) SyncQualify(ctx *jxcontext.Context, storeDetail *dao.S
licenceMap["license_address"] = storeDetail.LicenceAddress licenceMap["license_address"] = storeDetail.LicenceAddress
licenceMap["legal_representative_name"] = storeDetail.LicenceOwnerName licenceMap["legal_representative_name"] = storeDetail.LicenceOwnerName
licenceMap["license_name"] = storeDetail.LicenceCorpName licenceMap["license_name"] = storeDetail.LicenceCorpName
licence, _ := api.EbaiAPI.PictureUpload(storeDetail.Licence, nil)
licenceMap["photos"] = []map[string]interface{}{ licenceMap["photos"] = []map[string]interface{}{
map[string]interface{}{ map[string]interface{}{
"photo_url": storeDetail.Licence, "photo_url": licence,
"waterprinter_url": storeDetail.Licence, "waterprinter_url": licence,
}, },
} }
if storeDetail.LicenceExpire == "" { if storeDetail.LicenceExpire == "" {
@@ -750,10 +751,11 @@ func (c *PurchaseHandler) SyncQualify(ctx *jxcontext.Context, storeDetail *dao.S
licence2Map["license_address"] = storeDetail.LicenceAddress licence2Map["license_address"] = storeDetail.LicenceAddress
licence2Map["legal_representative_name"] = storeDetail.LicenceOwnerName licence2Map["legal_representative_name"] = storeDetail.LicenceOwnerName
licence2Map["license_name"] = storeDetail.LicenceCorpName licence2Map["license_name"] = storeDetail.LicenceCorpName
licence2, _ := api.EbaiAPI.PictureUpload(storeDetail.Licence2Image, nil)
licence2Map["photos"] = []map[string]interface{}{ licence2Map["photos"] = []map[string]interface{}{
map[string]interface{}{ map[string]interface{}{
"photo_url": storeDetail.Licence2Image, "photo_url": licence2,
"waterprinter_url": storeDetail.Licence2Image, "waterprinter_url": licence2,
}, },
} }
if storeDetail.Licence2Expire == "" { if storeDetail.Licence2Expire == "" {
@@ -778,14 +780,16 @@ func (c *PurchaseHandler) SyncQualify(ctx *jxcontext.Context, storeDetail *dao.S
idMap["license_number"] = storeDetail.IDCode idMap["license_number"] = storeDetail.IDCode
idMap["legal_representative_name"] = storeDetail.IDName idMap["legal_representative_name"] = storeDetail.IDName
idMap["license_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{}{ idMap["photos"] = []map[string]interface{}{
map[string]interface{}{ map[string]interface{}{
"photo_url": storeDetail.IDCardFront, "photo_url": idCardFront,
"waterprinter_url": storeDetail.IDCardFront, "waterprinter_url": idCardFront,
}, },
map[string]interface{}{ map[string]interface{}{
"photo_url": storeDetail.IDCardBack, "photo_url": idCardBack,
"waterprinter_url": storeDetail.IDCardBack, "waterprinter_url": idCardBack,
}, },
} }
if storeDetail.IDExpire == "" { if storeDetail.IDExpire == "" {
@@ -801,16 +805,17 @@ func (c *PurchaseHandler) SyncQualify(ctx *jxcontext.Context, storeDetail *dao.S
idMap["license_validdate"] = storeDetail.IDExpire idMap["license_validdate"] = storeDetail.IDExpire
} }
} }
params := make(map[string]interface{}) params := make(map[string]interface{})
storeFrontPic, _ := api.EbaiAPI.PictureUpload(storeDetail.StoreFrontPic, nil)
storeInPic, _ := api.EbaiAPI.PictureUpload(storeDetail.StoreInPic, nil)
maps := []map[string]interface{}{ maps := []map[string]interface{}{
licenceMap, idMap, map[string]interface{}{ licenceMap, idMap, map[string]interface{}{
"type_1": 5, "type_1": 5,
"type_2": 501, "type_2": 501,
"photos": []map[string]interface{}{ "photos": []map[string]interface{}{
map[string]interface{}{ map[string]interface{}{
"photo_url": storeDetail.StoreFrontPic, "photo_url": storeFrontPic,
"waterprinter_url": storeDetail.StoreFrontPic, "waterprinter_url": storeFrontPic,
}, },
}, },
}, map[string]interface{}{ }, map[string]interface{}{
@@ -818,8 +823,8 @@ func (c *PurchaseHandler) SyncQualify(ctx *jxcontext.Context, storeDetail *dao.S
"type_2": 502, "type_2": 502,
"photos": []map[string]interface{}{ "photos": []map[string]interface{}{
map[string]interface{}{ map[string]interface{}{
"photo_url": storeDetail.StoreInPic, "photo_url": storeInPic,
"waterprinter_url": storeDetail.StoreInPic, "waterprinter_url": storeInPic,
}, },
}, },
}, },