diff --git a/business/partner/purchase/ebai/store.go b/business/partner/purchase/ebai/store.go index cdb06e363..87ce68313 100644 --- a/business/partner/purchase/ebai/store.go +++ b/business/partner/purchase/ebai/store.go @@ -722,68 +722,51 @@ func (c *PurchaseHandler) SyncQualify(ctx *jxcontext.Context, storeDetail *dao.S idMap["license_name"] = storeDetail.IDName idMap["photos"] = []map[string]interface{}{ map[string]interface{}{ - "photo_url": storeDetail.Licence2Image, - "waterprinter_url": storeDetail.Licence2Image, + "photo_url": storeDetail.IDCardFront, + "waterprinter_url": storeDetail.IDCardFront, + }, + map[string]interface{}{ + "photo_url": storeDetail.IDCardBack, + "waterprinter_url": storeDetail.IDCardBack, }, } - if storeDetail.Licence2Expire == "" { + if storeDetail.IDExpire == "" { idMap["long_term_valid"] = 1 } else { if storeDetail.Licence2Valid != "" { - if utils.Str2Time(storeDetail.Licence2Expire).Sub(utils.Str2Time(storeDetail.Licence2Valid)) > 0 { - idMap["license_validdate"] = storeDetail.Licence2Expire + if utils.Str2Time(storeDetail.IDExpire).Sub(utils.Str2Time(storeDetail.IDValid)) > 0 { + idMap["license_validdate"] = storeDetail.IDExpire } else { - idMap["license_validdate"] = storeDetail.Licence2Valid + idMap["license_validdate"] = storeDetail.IDValid } } else { - idMap["license_validdate"] = storeDetail.Licence2Expire + idMap["license_validdate"] = storeDetail.IDExpire } } params := make(map[string]interface{}) - var maps []map[string]interface{} - maps = append(maps, licenceMap) - maps = append(maps, licence2Map) - maps = append(maps, map[string]interface{}{ - "type_1": 5, - "type_2": 501, - "photos": []map[string]interface{}{ - map[string]interface{}{ - "photo_url": storeDetail.StoreFrontPic, - "waterprinter_url": storeDetail.StoreFrontPic, - }, - }, - }, map[string]interface{}{ - "type_1": 5, - "type_2": 502, - "photos": []map[string]interface{}{ - map[string]interface{}{ - "photo_url": storeDetail.StoreInPic, - "waterprinter_url": storeDetail.StoreInPic, - }, - }, - }) - params["aptitude"] = maps - params["aptitude"] = []map[string]interface{}{ - map[string]interface{}{ - "type_1": 3, - "type_2": 301, - "license_number": "510921196608255211", - "long_term_valid": 1, - "license_name": "身份证", - "legal_representative_name": "张应友", + maps := []map[string]interface{}{ + licenceMap, licence2Map, idMap, map[string]interface{}{ + "type_1": 5, + "type_2": 501, "photos": []map[string]interface{}{ map[string]interface{}{ - "photo_url": "http://image.jxc4.com/image/ebdaf32e771a6c050e397624c3fae369.jpg", - "waterprinter_url": "http://image.jxc4.com/image/ebdaf32e771a6c050e397624c3fae369.jpg", + "photo_url": storeDetail.StoreFrontPic, + "waterprinter_url": storeDetail.StoreFrontPic, }, + }, + }, map[string]interface{}{ + "type_1": 5, + "type_2": 502, + "photos": []map[string]interface{}{ map[string]interface{}{ - "photo_url": "http://image.jxc4.com/image/75fad719d61326cedd73f17b1af6338b.jpg", - "waterprinter_url": "http://image.jxc4.com/image/75fad719d61326cedd73f17b1af6338b.jpg", + "photo_url": storeDetail.StoreInPic, + "waterprinter_url": storeDetail.StoreInPic, }, }, }, } + params["aptitude"] = maps err = api.EbaiAPI.ShopAptitudeUpload("", utils.Str2Int64(storeDetail.VendorStoreID), params) return err }