接口位置移动,门店归属补漏修改,获取京东用户修改

This commit is contained in:
苏尹岚
2019-12-02 11:12:09 +08:00
parent 6c0c837fae
commit 3c5afc31b6
13 changed files with 359 additions and 347 deletions

View File

@@ -200,7 +200,6 @@ var (
const (
parallelCount = 5
UpdateGoodsShelfStatusCount = 50 //微盟下架商品api限制一次50个
fileExt = ".xlsx"
)
func (d *DataSuccessLock) AppendData(dataSuccess DataSuccess) {
@@ -751,12 +750,12 @@ func WriteToExcel(task *tasksch.SeqTask, dataSuccess []DataSuccess, dataFailed [
}
sheetList2 = append(sheetList2, excelConf2)
if excelConf1 != nil {
downloadURL1, fileName1, err = UploadExeclAndPushMsg(sheetList1, "微盟已更新商品")
downloadURL1, fileName1, err = jxutils.UploadExeclAndPushMsg(sheetList1, "微盟已更新商品")
} else {
baseapi.SugarLogger.Debug("WriteToExcel: dataSuccess is nil!")
}
if excelConf2 != nil {
downloadURL2, fileName2, err = UploadExeclAndPushMsg(sheetList2, "缺少商品_微盟")
downloadURL2, fileName2, err = jxutils.UploadExeclAndPushMsg(sheetList2, "缺少商品_微盟")
} else {
baseapi.SugarLogger.Debug("WriteToExcel: dataFailed is nil!")
}
@@ -770,15 +769,6 @@ func WriteToExcel(task *tasksch.SeqTask, dataSuccess []DataSuccess, dataFailed [
return err
}
func UploadExeclAndPushMsg(sheetList []*excel.Obj2ExcelSheetConfig, name string) (downloadURL, fileName string, err error) {
excelBin := excel.Obj2Excel(sheetList)
timeStr := utils.Int64ToStr(time.Now().Unix())
fileName = name + timeStr + fileExt
baseapi.SugarLogger.Debugf("WriteToExcel:save %s success", fileName)
downloadURL, err = jxutils.UploadExportContent(excelBin, fileName)
return downloadURL, fileName, err
}
func UpdateJxPriceByWeimob(ctx *jxcontext.Context, storeIDs []int, isAsync, isContinueWhenError bool) (hint string, err error) {
var (
storeSkuBindInfoList []interface{}
@@ -907,12 +897,12 @@ func WriteToExcel3(task *tasksch.SeqTask, dataSuccess []DataStoreSkusSuccess, da
}
sheetList2 = append(sheetList2, excelConf2)
if excelConf1 != nil {
downloadURL1, fileName1, err = UploadExeclAndPushMsg(sheetList1, "京西已更新商品")
downloadURL1, fileName1, err = jxutils.UploadExeclAndPushMsg(sheetList1, "京西已更新商品")
} else {
baseapi.SugarLogger.Debug("WriteToExcel: dataSuccess is nil!")
}
if excelConf2 != nil {
downloadURL2, fileName2, err = UploadExeclAndPushMsg(sheetList2, "缺少商品_京西")
downloadURL2, fileName2, err = jxutils.UploadExeclAndPushMsg(sheetList2, "缺少商品_京西")
} else {
baseapi.SugarLogger.Debug("WriteToExcel: dataFailed is nil!")
}
@@ -1103,13 +1093,13 @@ func WriteToExcel2(ctx *jxcontext.Context, DataFineList, DataHairyList []*Data)
sheetList2 = append(sheetList2, excelConf2)
noticeMsg += "[详情点我]"
if len(DataFineList) > 0 {
downloadURL1, fileName1, err = UploadExeclAndPushMsg(sheetList1, "京西采购_精品")
downloadURL1, fileName1, err = jxutils.UploadExeclAndPushMsg(sheetList1, "京西采购_精品")
noticeMsg += "path1=" + downloadURL1 + " "
} else {
baseapi.SugarLogger.Debug("WriteToExcel: DataFineList is nil!")
}
if len(DataHairyList) > 0 {
downloadURL2, fileName2, err = UploadExeclAndPushMsg(sheetList2, "京西采购_毛菜")
downloadURL2, fileName2, err = jxutils.UploadExeclAndPushMsg(sheetList2, "京西采购_毛菜")
noticeMsg += "path2=" + downloadURL2
} else {
baseapi.SugarLogger.Debug("WriteToExcel: DataHairyList is nil!")