超12小时自动审核售后单
This commit is contained in:
@@ -287,9 +287,9 @@ func Init() {
|
||||
"04:05:06",
|
||||
})
|
||||
//京东的订单信息解密密钥获取
|
||||
// ScheduleTimerFuncByInterval(func() {
|
||||
// jdshop.InitKey()
|
||||
// }, 10*time.Second, 8*time.Hour)
|
||||
ScheduleTimerFuncByInterval(func() {
|
||||
jdshop.InitKey()
|
||||
}, 10*time.Second, 8*time.Hour)
|
||||
ScheduleTimerFunc("ChangeJxPriceByDiscountAct", func() {
|
||||
act.ChangeJxPriceByDiscountAct(jxcontext.AdminCtx)
|
||||
}, discountActJxList)
|
||||
|
||||
@@ -137,24 +137,29 @@ func result2Orders(msg *jdshopapi.CallBackResult) (order *model.GoodsOrder, err
|
||||
return order, err
|
||||
}
|
||||
if len(storeList) > 0 {
|
||||
order.StoreID = storeList[0].ID
|
||||
order.JxStoreID = storeList[0].ID
|
||||
order.StoreName = storeList[0].Name
|
||||
globals.SugarLogger.Debugf("jds GetStoreListByLocation, orderID: %v storeID :%v", order.VendorOrderID, order.StoreID)
|
||||
//结算类型
|
||||
storeDetail, _ := dao.GetStoreDetail(dao.GetDB(), order.StoreID, model.VendorIDJDShop)
|
||||
if storeDetail != nil {
|
||||
if storeDetail.PayPercentage < 50 {
|
||||
order.EarningType = model.EarningTypePoints
|
||||
} else {
|
||||
order.EarningType = model.EarningTypeQuote
|
||||
for _, store := range storeList {
|
||||
order.StoreID = store.ID
|
||||
order.JxStoreID = store.ID
|
||||
order.StoreName = store.Name
|
||||
globals.SugarLogger.Debugf("jds GetStoreListByLocation, orderID: %v storeID :%v", order.VendorOrderID, order.StoreID)
|
||||
//结算类型
|
||||
storeDetail, _ := dao.GetStoreDetail(dao.GetDB(), order.StoreID, model.VendorIDJDShop)
|
||||
if storeDetail != nil {
|
||||
if storeDetail.PayPercentage < 50 {
|
||||
order.EarningType = model.EarningTypePoints
|
||||
} else {
|
||||
order.EarningType = model.EarningTypeQuote
|
||||
}
|
||||
}
|
||||
}
|
||||
if order.EarningType == model.EarningTypeQuote {
|
||||
var shopPriceSum int
|
||||
storeSkuList, _ := dao.GetStoresSkusInfo(dao.GetDB(), []int{order.StoreID}, skuIDs)
|
||||
for _, storeSku := range storeSkuList {
|
||||
shopPriceSum += storeSku.Price
|
||||
if order.EarningType == model.EarningTypeQuote {
|
||||
var shopPriceSum int
|
||||
storeSkuList, _ := dao.GetStoresSkusInfo(dao.GetDB(), []int{order.StoreID}, skuIDs)
|
||||
for _, storeSku := range storeSkuList {
|
||||
shopPriceSum += storeSku.Price
|
||||
}
|
||||
if shopPriceSum+700 > order.TotalShopMoney {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user