diff --git a/config.yaml b/config.yaml index e78f296..82c6ca4 100644 --- a/config.yaml +++ b/config.yaml @@ -99,16 +99,16 @@ kfz_config: http_url: task_url: "http://127.0.0.1:8080" #A 程序接口地址 file_url: - xian_yu_dll: "D:\\source\\planA\\planB\\modules\\xianYu" #闲鱼 DLL库路径 - pdd_dll: "D:\\source\\planA\\planB\\modules\\pdd" #拼多多 DLL库路径 - kfz_dll: "D:\\source\\planA\\planB\\modules\\kfz" #孔夫子 DLL库路径 - log_dll: "D:\\source\\planA\\planB\\modules\\logs" #日志 DLL库路径 - image_dll: "D:\\source\\planA\\planB\\modules\\image" #水印 DLL库路径 - b_file_name: "D:\\source\\planA\\planB\\planB.exe" #B 程序文件路径 - c_file_name: "D:\\source\\planA\\planC\\planC.exe" #C 程序文件路径 - d_file_name: "D:\\source\\planA\\planD\\planD.exe" #D 程序文件路径 - e_file_name: "D:\\source\\planA\\planE\\planE.exe" #E 程序文件路径 - f_file_name: "D:\\source\\planA\\planF\\planF.exe" #F 程序文件路径 + xian_yu_dll: "D:\\source\\daShangDao_planA\\planB\\modules\\xianYu" #闲鱼 DLL库路径 + pdd_dll: "D:\\source\\daShangDao_planA\\planB\\modules\\pdd" #拼多多 DLL库路径 + kfz_dll: "D:\\source\\daShangDao_planA\\planB\\modules\\kfz" #孔夫子 DLL库路径 + log_dll: "D:\\source\\daShangDao_planA\\planB\\modules\\logs" #日志 DLL库路径 + image_dll: "D:\\source\\daShangDao_planA\\planB\\modules\\image" #水印 DLL库路径 + b_file_name: "D:\\source\\daShangDao_planA\\planB\\planB.exe" #B 程序文件路径 + c_file_name: "D:\\source\\daShangDao_planA\\planC\\planC.exe" #C 程序文件路径 + d_file_name: "D:\\source\\daShangDao_planA\\planD\\planD.exe" #D 程序文件路径 + e_file_name: "D:\\source\\daShangDao_planA\\planE\\planE.exe" #E 程序文件路径 + f_file_name: "D:\\source\\daShangDao_planA\\planF\\planF.exe" #F 程序文件路径 create_task_url: "https://api.buzhiyushu.cn/zhishu/baseInfo/addNewTask" #新增任务接口 create_task_notice_url: "http://36.212.12.92:8055/task" #核价软件提交数据通知接口 create_operation_task_notice_url: "http://36.212.12.92:8055/taskV2" #操作商品任务核价软件提交数据通知接口 diff --git a/controller/task.go b/controller/task.go index 737ae0b..20ef14f 100644 --- a/controller/task.go +++ b/controller/task.go @@ -1390,7 +1390,7 @@ func AddTask(taskId string, bodyData []string, header _type.TaskHeader) int { var catIdObject _type.CatIdObject unmarshalErr := json.Unmarshal([]byte(psiBookInfo.CatID), &catIdObject) if unmarshalErr != nil { - fmt.Printf("获取BookInfo失败-原因: %v\n", unmarshalErr) + fmt.Printf("psi获取BookInfo失败-原因: %v 类没id %v 原始body数据 %v \n", unmarshalErr, psiBookInfo.CatID, jsonStr) continue } @@ -1420,7 +1420,7 @@ func AddTask(taskId string, bodyData []string, header _type.TaskHeader) int { } } if header.TaskType != 5 { - fmt.Printf("获取BookInfo失败-原因: %v\n", GetTaskBookErr) + fmt.Printf("选品中心获取BookInfo失败-原因2: %v 原始body数据 %v \n", GetTaskBookErr, jsonStr) continue } } diff --git a/modules/xianYu/xy.dll b/modules/xianYu/xy.dll index af6630d..02ca026 100644 Binary files a/modules/xianYu/xy.dll and b/modules/xianYu/xy.dll differ diff --git a/planB/config.yaml b/planB/config.yaml index 3d380fb..34b09e3 100644 --- a/planB/config.yaml +++ b/planB/config.yaml @@ -95,16 +95,16 @@ taobao_config: http_url: task_url: "http://127.0.0.1:8080" #A 程序接口地址 file_url: - xian_yu_dll: "D:\\source\\planA\\planB\\modules\\xianYu" #闲鱼 DLL库路径 - pdd_dll: "D:\\source\\planA\\planB\\modules\\pdd" #拼多多 DLL库路径 - kfz_dll: "D:\\source\\planA\\planB\\modules\\kfz" #孔夫子 DLL库路径 - log_dll: "D:\\source\\planA\\planB\\modules\\logs" #日志 DLL库路径 - image_dll: "D:\\source\\planA\\planB\\modules\\image" #水印 DLL库路径 - b_file_name: "D:\\source\\planA\\planB\\planB.exe" #B 程序文件路径 - c_file_name: "D:\\source\\planA\\planC\\planC.exe" #C 程序文件路径 - d_file_name: "D:\\source\\planA\\planD\\planD.exe" #D 程序文件路径 - e_file_name: "D:\\source\\planA\\planE\\planE.exe" #E 程序文件路径 - f_file_name: "D:\\source\\planA\\planE\\planF.exe" #F 程序文件路径 + xian_yu_dll: "D:\\source\\daShangDao_planA\\planB\\modules\\xianYu" #闲鱼 DLL库路径 + pdd_dll: "D:\\source\\daShangDao_planA\\planB\\modules\\pdd" #拼多多 DLL库路径 + kfz_dll: "D:\\source\\daShangDao_planA\\planB\\modules\\kfz" #孔夫子 DLL库路径 + log_dll: "D:\\source\\daShangDao_planA\\planB\\modules\\logs" #日志 DLL库路径 + image_dll: "D:\\source\\daShangDao_planA\\planB\\modules\\image" #水印 DLL库路径 + b_file_name: "D:\\source\\daShangDao_planA\\planB\\planB.exe" #B 程序文件路径 + c_file_name: "D:\\source\\daShangDao_planA\\planC\\planC.exe" #C 程序文件路径 + d_file_name: "D:\\source\\daShangDao_planA\\planD\\planD.exe" #D 程序文件路径 + e_file_name: "D:\\source\\daShangDao_planA\\planE\\planE.exe" #E 程序文件路径 + f_file_name: "D:\\source\\daShangDao_planA\\planE\\planF.exe" #F 程序文件路径 create_task_url: "https://api.buzhiyushu.cn/zhishu/baseInfo/addNewTask" #新增任务接口 create_task_notice_url: "http://36.212.12.92:8055/task" #核价软件提交数据通知接口 create_operation_task_notice_url: "http://36.212.12.92:8055/taskV2" #操作商品任务核价软件提交数据通知接口 diff --git a/planB/dispatcher/kongfuzi/kongfizi.go b/planB/dispatcher/kongfuzi/kongfizi.go index 1656103..8ee33c9 100644 --- a/planB/dispatcher/kongfuzi/kongfizi.go +++ b/planB/dispatcher/kongfuzi/kongfizi.go @@ -1225,6 +1225,7 @@ func publishGoods(logUuid string, taskMsg planAType.TaskBody) (planAType.TaskBod var marshalErr error var img string var skuCode string + fmt.Println(taskMsg.BookInfo.Isbn) if strings.HasPrefix(taskMsg.BookInfo.Isbn, "678") { //模板13 无isbn goodsAdd13, err := template13(taskMsg) @@ -1465,8 +1466,8 @@ func template13(taskMsg planAType.TaskBody) (planBTypeKfz.GoodsAdd13, error) { // *********************构建参数 开始******************************** // - //模板编号 默认 17 - goodsAdd.Tpl = "17" + //模板编号 默认 13 + goodsAdd.Tpl = "13" //分类编号 if value, exists := golabl.KfzGetCommonCategory[string(taskMsg.BookInfo.CatIdObject.KongFuZiCatId)]; exists { diff --git a/planB/dispatcher/xianyu/xianyu.go b/planB/dispatcher/xianyu/xianyu.go index 6b99112..ad67eb0 100644 --- a/planB/dispatcher/xianyu/xianyu.go +++ b/planB/dispatcher/xianyu/xianyu.go @@ -1286,15 +1286,10 @@ func publishGoods(logUuid string, taskMsg planAType.TaskBody) (planAType.TaskBod goodsAdd.CatIds = "8bd8d9724880b84d28d88a08a19453dc" //学习笔记(无ISBN可以发布成功)OK spBizType = 99 //(其他) // isbn = "" - fmt.Println("Misty-goodsAdd.CatIds:", goodsAdd.CatIds) } goodsAdd.SpBizType = spBizType - fmt.Println("一级类目:", spBizType) - fmt.Println("二级类目:", goodsAdd.CatIds) - fmt.Println("isbn:", isbn) - if len(taskMsg.BookInfo.ImageObject.CarouselUrlArray) == 0 { // 无图片信息 isbn计次 setNoImgCountErr := service.SetNoImgCount(taskMsg.BookInfo.Isbn) @@ -1309,7 +1304,6 @@ func publishGoods(logUuid string, taskMsg planAType.TaskBody) (planAType.TaskBod oldCarouselUrlArray := append([]string{}, taskMsg.BookInfo.ImageObject.CarouselUrlArray...) //原始轮播图,用于后续处理,不会被打上水印 //存在水印图片,则打水印 - fmt.Println("水印图片地址:", golabl.Task.Header.ShopMsg.WatermarkImgUrl) if golabl.Task.Header.ShopMsg.WatermarkImgUrl != "" { //获取水印图片 watermarkImgUrl, watermarkImgErr := tool.GetWatermarkImg() @@ -1362,7 +1356,6 @@ func publishGoods(logUuid string, taskMsg planAType.TaskBody) (planAType.TaskBod // 构建商品信息 content := taskMsg.BookInfo.BookName + " " + taskMsg.BookInfo.Isbn + " " + taskMsg.BookInfo.Author + " " + taskMsg.BookInfo.Publishing content = content + "\n" + golabl.Task.Header.ShopMsg.ShopContext - // 店铺信息 goodsAdd.Shop = []planBTypeXianyu.ShopInfo{ { @@ -1401,7 +1394,7 @@ func publishGoods(logUuid string, taskMsg planAType.TaskBody) (planAType.TaskBod taskMsg.Detail.Price = taskMsg.Detail.Price + taskMsg.Detail.ShippingCost } - //构建参考价格 + //构建销售价格 price := tool.BuildPrice(golabl.Task.Header.PriceMod, taskMsg.Detail.Price) if price == 0 { return taskMsg, fmt.Errorf("不在价格区间内 isbn:%v", taskMsg.BookInfo.Isbn) @@ -1414,8 +1407,9 @@ func publishGoods(logUuid string, taskMsg planAType.TaskBody) (planAType.TaskBod goodsAdd.ItemBizType = 2 goodsAdd.SpBizType = spBizType - goodsAdd.Price = taskMsgBookInfoPrice + goodsAdd.Price = taskMsg.Detail.Price goodsAdd.Stock = taskMsg.Detail.Stock + goodsAdd.OriginalPrice = taskMsgBookInfoPrice // 图书类商品信息 if strings.HasPrefix(taskMsg.BookInfo.Isbn, "678") { diff --git a/planB/modules/xianYu/xianYu.go b/planB/modules/xianYu/xianYu.go index d5466da..65e2fd2 100644 --- a/planB/modules/xianYu/xianYu.go +++ b/planB/modules/xianYu/xianYu.go @@ -55,7 +55,7 @@ func (m *XianYuDLL) XianYuGoodsAdd(bodyJson string, configFile string) (string, return result, nil } -// XianYuGoodsAddCheckIsbn 商品新增检查ISBN +// XianYuGoodsAddNew 商品新增检查ISBN func (m *XianYuDLL) XianYuGoodsAddNew(bodyJson string, configFile string) (string, error) { proc, err := m.Dll.FindProc("ExecuteGoodsCreatNew") if err != nil { diff --git a/planB/modules/xianYu/xy.dll b/planB/modules/xianYu/xy.dll index ad30ec5..02ca026 100644 Binary files a/planB/modules/xianYu/xy.dll and b/planB/modules/xianYu/xy.dll differ diff --git a/planB/service/task.go b/planB/service/task.go index d2b3afa..39b9e88 100644 --- a/planB/service/task.go +++ b/planB/service/task.go @@ -154,7 +154,6 @@ func GetTaskToPopFromBodyWait() (planAType.TaskBody, error) { if rPopErr != nil { return planAType.TaskBody{}, rPopErr } - // 判断 body 数据是否为空 if bodyData == "" { return planAType.TaskBody{}, fmt.Errorf("任务详情信息为空")