Commit 68d376ad by wang

自营完成

parent b18fc6e6
......@@ -14,4 +14,5 @@ SEARCH_API_MONITOR = 6d0fa85e01a02c39347d011ae973fd21b76c6c7ce582d3ea470c6b65a31
[spu_server]
api_domain = http://192.168.2.72:8005
;api_domain = http://192.168.2.72:8005
api_domain = http://localhost:8005
......@@ -10,6 +10,7 @@ import (
"go_sku_server/model"
"go_sku_server/model/saveModel"
"go_sku_server/pkg/common"
"go_sku_server/pkg/config"
"go_sku_server/pkg/e"
"go_sku_server/pkg/logger"
"go_sku_server/pkg/mysql"
......@@ -184,8 +185,9 @@ func (S *LySaveService) spuHandle(lySpuRequest saveModel.LySpuRequest,lySkuEntit
lySpuResponse:=saveModel.LySpuResponse{}
//err:=gout.POST(config.Get("spu_server.api_domain").String()+"/saveSpu1").Debug(false).SetJSON(&lySpuRequest).BindJSON(&lySpuResponse).Do()
err:=gout.POST("http://192.168.1.237:8005/saveSpu").Debug(false).SetJSON(&lySpuRequest).BindJSON(&lySpuResponse).Do()
fmt.Println("调用接口之前")
err:=gout.POST(config.Get("spu_server.api_domain").String()+"/saveSpu")/*.Debug(true)*/.SetJSON(&lySpuRequest).BindJSON(&lySpuResponse).Do()
//err:=gout.POST("http://192.168.1.237:8005/saveSpu").Debug(false).SetJSON(&lySpuRequest).BindJSON(&lySpuResponse).Do()
if(err!=nil){
return e.NewApiError("调用spu server saveSpu接口报错"+err.Error())
......@@ -193,7 +195,7 @@ func (S *LySaveService) spuHandle(lySpuRequest saveModel.LySpuRequest,lySkuEntit
if(lySpuResponse.ErrorCode==0){
lySkuEntity.SpuId=lySpuResponse.Data.SpuId
}else{
return e.NewApiError("spu Throw out"+lySpuResponse.ErrMsg)
return e.NewApiError("sku Throw out"+lySpuResponse.ErrMsg)
}
return nil
}
......@@ -205,7 +207,7 @@ func (S *LySaveService) spuHandle(lySpuRequest saveModel.LySpuRequest,lySkuEntit
stock 库存
ladder_price 阶梯价
处理流程
满足 字段 moq stock ladder_price都有值 ,并且 moq > stock ; 那么 sku状态 就是 审核通过(status=1)
满足 字段 moq stock ladder_price都有值 ,并且 moq < =stock ; 那么 sku状态 就是 审核通过(status=1)
否则 就是下架状态(status=3)
*/
func (S *LySaveService) statusHandle(lySkuEntity *saveModel.LySkuEntity) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment