订单
This commit is contained in:
@@ -199,13 +199,25 @@ func (c *OrderManager) OnOrderStatusChanged(vendorOrgCode string, orderStatus *m
|
|||||||
waybill, _ := c.LoadWaybill(order.VendorWaybillID, order.WaybillVendorID)
|
waybill, _ := c.LoadWaybill(order.VendorWaybillID, order.WaybillVendorID)
|
||||||
store, _ := c.LoadStoreDetail(jxutils.GetSaleStoreIDFromOrder(order), order.VendorID)
|
store, _ := c.LoadStoreDetail(jxutils.GetSaleStoreIDFromOrder(order), order.VendorID)
|
||||||
if waybill == nil {
|
if waybill == nil {
|
||||||
|
if order.VendorID == model.VendorIDJDShop || order.VendorID == model.VendorIDJX {
|
||||||
if order.NewEarningPrice == 0 || order.NewEarningPrice != order.TotalShopMoney*int64(100-store.PayPercentage)/int64(100) {
|
if order.NewEarningPrice == 0 || order.NewEarningPrice != order.TotalShopMoney*int64(100-store.PayPercentage)/int64(100) {
|
||||||
order.NewEarningPrice = order.TotalShopMoney * int64(100-store.PayPercentage) / int64(100)
|
order.NewEarningPrice = order.TotalShopMoney * int64(100-store.PayPercentage) / int64(100)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if order.NewEarningPrice == 0 || order.NewEarningPrice != order.TotalShopMoney*int64(100-store.PayPercentage/2)/int64(100) {
|
||||||
|
order.NewEarningPrice = order.TotalShopMoney * int64(100-store.PayPercentage/2) / int64(100)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if order.VendorID == model.VendorIDJDShop || order.VendorID == model.VendorIDJX {
|
||||||
if order.NewEarningPrice == 0 || order.NewEarningPrice != (order.TotalShopMoney-waybill.DesiredFee)*int64(100-store.PayPercentage)/int64(100) {
|
if order.NewEarningPrice == 0 || order.NewEarningPrice != (order.TotalShopMoney-waybill.DesiredFee)*int64(100-store.PayPercentage)/int64(100) {
|
||||||
order.NewEarningPrice = (order.TotalShopMoney - waybill.DesiredFee) * int64(100-store.PayPercentage) / int64(100)
|
order.NewEarningPrice = (order.TotalShopMoney - waybill.DesiredFee) * int64(100-store.PayPercentage) / int64(100)
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if order.NewEarningPrice == 0 || order.NewEarningPrice != (order.TotalShopMoney-waybill.DesiredFee)*int64(100-store.PayPercentage/2)/int64(100) {
|
||||||
|
order.NewEarningPrice = (order.TotalShopMoney - waybill.DesiredFee) * int64(100-store.PayPercentage/2) / int64(100)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
dao.UpdateEntity(db, order, "NewEarningPrice")
|
dao.UpdateEntity(db, order, "NewEarningPrice")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1297,6 +1297,12 @@ func SetMTPSStatus(ctx *jxcontext.Context, storeId, courierStatus int) {
|
|||||||
ShopInfo, _ := api.MtpsAPI.ShopQuery(strconv.Itoa(storeId))
|
ShopInfo, _ := api.MtpsAPI.ShopQuery(strconv.Itoa(storeId))
|
||||||
if ShopInfo != nil {
|
if ShopInfo != nil {
|
||||||
ShopName = ShopInfo.ShopName
|
ShopName = ShopInfo.ShopName
|
||||||
|
if ShopName == "" {
|
||||||
|
if StoreLists[0].Name[len(StoreLists[0].Name)-1:] == "店" {
|
||||||
|
|
||||||
|
}
|
||||||
|
ShopName = StoreLists[0].Name
|
||||||
|
}
|
||||||
StoreInfoList, _ = api.MtpsAPI.GetStoreStatus(ShopName)
|
StoreInfoList, _ = api.MtpsAPI.GetStoreStatus(ShopName)
|
||||||
if StoreInfoList != nil && StoreInfoList.DataList != nil {
|
if StoreInfoList != nil && StoreInfoList.DataList != nil {
|
||||||
goto ifExist
|
goto ifExist
|
||||||
|
|||||||
Reference in New Issue
Block a user