aa
This commit is contained in:
@@ -1761,37 +1761,37 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) {
|
||||
v := batchItemList[0].(*model.StoreMap)
|
||||
detail, _ := api.JdShop2API.ShopDetail(utils.Str2Int(v.VendorStoreID))
|
||||
storeDetail, _ := dao.GetStoreDetail(db, v.StoreID, model.VendorIDJDShop, "2")
|
||||
// var (
|
||||
// url2 string
|
||||
// idCode string
|
||||
// startTime string
|
||||
// )
|
||||
// if storeDetail.IDCardFront != "" {
|
||||
// data2, _, _ := jxutils.DownloadFileByURL(storeDetail.IDCardFront)
|
||||
// fileName := storeDetail.IDCardFront[strings.LastIndex(storeDetail.IDCardFront, "/")+1 : len(storeDetail.IDCardFront)]
|
||||
// url2, _ = api.JdShop2API.UploadImageNew(data2, fileName)
|
||||
// } else {
|
||||
// data2, _, _ := jxutils.DownloadFileByURL("http://image.jxc4.com/image/a9bfc170a950ab9a4c76bd10b48b222b.tem.jpg")
|
||||
// fileName := "a9bfc170a950ab9a4c76bd10b48b222b.tem.jpg"
|
||||
// url2, _ = api.JdShop2API.UploadImageNew(data2, fileName)
|
||||
// }
|
||||
// if storeDetail.IDCode == "" {
|
||||
// idCode = "610126198012230014"
|
||||
// } else {
|
||||
// idCode = storeDetail.IDCode
|
||||
// }
|
||||
// if storeDetail.IDValid == "" {
|
||||
// startTime = "2013-01-25 00:00:00"
|
||||
// } else {
|
||||
// startTime = utils.Time2Str(utils.Str2Time(storeDetail.IDValid))
|
||||
// }
|
||||
// ex := storeDetail.IDExpire
|
||||
// if ex == "" {
|
||||
// ex = utils.Time2Str(utils.Str2Time(storeDetail.IDValid).AddDate(10, 0, 0))
|
||||
// }
|
||||
// if !strings.Contains(ex, "00:00:00") {
|
||||
// ex += " 00:00:00"
|
||||
// }
|
||||
var (
|
||||
url2 string
|
||||
idCode string
|
||||
startTime string
|
||||
)
|
||||
if storeDetail.IDCardFront != "" {
|
||||
data2, _, _ := jxutils.DownloadFileByURL(storeDetail.IDCardFront)
|
||||
fileName := storeDetail.IDCardFront[strings.LastIndex(storeDetail.IDCardFront, "/")+1 : len(storeDetail.IDCardFront)]
|
||||
url2, _ = api.JdShop2API.UploadImageNew(data2, fileName)
|
||||
} else {
|
||||
data2, _, _ := jxutils.DownloadFileByURL("http://image.jxc4.com/image/a9bfc170a950ab9a4c76bd10b48b222b.tem.jpg")
|
||||
fileName := "a9bfc170a950ab9a4c76bd10b48b222b.tem.jpg"
|
||||
url2, _ = api.JdShop2API.UploadImageNew(data2, fileName)
|
||||
}
|
||||
if storeDetail.IDCode == "" {
|
||||
idCode = "610126198012230014"
|
||||
} else {
|
||||
idCode = storeDetail.IDCode
|
||||
}
|
||||
if storeDetail.IDValid == "" {
|
||||
startTime = "2013-01-25 00:00:00"
|
||||
} else {
|
||||
startTime = utils.Time2Str(utils.Str2Time(storeDetail.IDValid))
|
||||
}
|
||||
ex := storeDetail.IDExpire
|
||||
if ex == "" {
|
||||
ex = utils.Time2Str(utils.Str2Time(storeDetail.IDValid).AddDate(10, 0, 0))
|
||||
}
|
||||
if !strings.Contains(ex, "00:00:00") {
|
||||
ex += " 00:00:00"
|
||||
}
|
||||
api.JdShop2API.UpdateBasic(&jdshopapi.UpdateBasicParam{
|
||||
StoreID: detail.StoreID,
|
||||
StoreName: detail.StoreName,
|
||||
|
||||
@@ -103,7 +103,7 @@ func (p *PurchaseHandler) CreateStore2(db *dao.DaoDB, storeID int, userName stri
|
||||
url, _ := getAPI("2").UploadImageNew(data, "2659335b16e3880e367759b8fc675933.tem.png")
|
||||
ex := store.LicenceExpire
|
||||
if ex == "" {
|
||||
ex = utils.Time2Str(utils.Str2Time(store.LicenceValid).AddDate(10, 0, 0))
|
||||
ex = utils.Time2Str(utils.Str2Time(store.LicenceValid).AddDate(20, 0, 0))
|
||||
}
|
||||
if !strings.Contains(ex, "00:00:00") {
|
||||
ex += " 00:00:00"
|
||||
@@ -146,6 +146,37 @@ func (p *PurchaseHandler) CreateStore2(db *dao.DaoDB, storeID int, userName stri
|
||||
AddCode3: store.JdsCode,
|
||||
CategoryID1: 3,
|
||||
}
|
||||
var (
|
||||
url3 string
|
||||
idCode string
|
||||
startTime string
|
||||
)
|
||||
if storeDetail.IDCardFront != "" {
|
||||
data2, _, _ := jxutils.DownloadFileByURL(storeDetail.IDCardFront)
|
||||
fileName := storeDetail.IDCardFront[strings.LastIndex(storeDetail.IDCardFront, "/")+1 : len(storeDetail.IDCardFront)]
|
||||
url3, _ = api.JdShop2API.UploadImageNew(data2, fileName)
|
||||
} else {
|
||||
data2, _, _ := jxutils.DownloadFileByURL("http://image.jxc4.com/image/a9bfc170a950ab9a4c76bd10b48b222b.tem.jpg")
|
||||
fileName := "a9bfc170a950ab9a4c76bd10b48b222b.tem.jpg"
|
||||
url3, _ = api.JdShop2API.UploadImageNew(data2, fileName)
|
||||
}
|
||||
if storeDetail.IDCode == "" {
|
||||
idCode = "610126198012230014"
|
||||
} else {
|
||||
idCode = storeDetail.IDCode
|
||||
}
|
||||
if storeDetail.IDValid == "" {
|
||||
startTime = "2013-01-25 00:00:00"
|
||||
} else {
|
||||
startTime = utils.Time2Str(utils.Str2Time(storeDetail.IDValid))
|
||||
}
|
||||
ex2 := storeDetail.IDExpire
|
||||
if ex2 == "" {
|
||||
ex2 = utils.Time2Str(utils.Str2Time(storeDetail.IDValid).AddDate(20, 0, 0))
|
||||
}
|
||||
if !strings.Contains(ex2, "00:00:00") {
|
||||
ex2 += " 00:00:00"
|
||||
}
|
||||
if url2 != "" {
|
||||
param.CategoryID1 = 34
|
||||
param.CategoryID2 = 62
|
||||
@@ -159,6 +190,15 @@ func (p *PurchaseHandler) CreateStore2(db *dao.DaoDB, storeID int, userName stri
|
||||
EndingTime: ex,
|
||||
Time: []string{utils.Time2Str(utils.Str2Time(store.LicenceValid)), ex},
|
||||
},
|
||||
&jdshopapi.QualificationRequests{
|
||||
QualificationID: 42,
|
||||
QualificationName: "身份证件",
|
||||
QualificationNo: idCode,
|
||||
QualificationURL: url3,
|
||||
StartTime: startTime,
|
||||
EndingTime: ex2,
|
||||
Time: []string{startTime, ex2},
|
||||
},
|
||||
}
|
||||
}
|
||||
if store.JdsStreetCode != 0 {
|
||||
|
||||
Reference in New Issue
Block a user