Merge remote-tracking branch 'origin/mark' into jxact
This commit is contained in:
@@ -199,25 +199,13 @@ 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/2)/int64(100)) && store.PayPercentage <= 50 {
|
||||||
// if order.NewEarningPrice == 0 || order.NewEarningPrice != order.TotalShopMoney*int64(100-store.PayPercentage)/int64(100) {
|
|
||||||
// order.NewEarningPrice = order.TotalShopMoney * int64(100-store.PayPercentage) / int64(100)
|
|
||||||
// }
|
|
||||||
// } 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)
|
order.NewEarningPrice = order.TotalShopMoney * int64(100-store.PayPercentage/2) / int64(100)
|
||||||
}
|
}
|
||||||
// }
|
|
||||||
} else {
|
} else {
|
||||||
// if order.VendorID == model.VendorIDJDShop || order.VendorID == model.VendorIDJX {
|
if (order.NewEarningPrice == 0 || order.NewEarningPrice != (order.TotalShopMoney-waybill.DesiredFee)*int64(100-store.PayPercentage/2)/int64(100)) && store.PayPercentage <= 50 {
|
||||||
// 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)
|
|
||||||
// }
|
|
||||||
// } else {
|
|
||||||
if order.NewEarningPrice == 0 || order.NewEarningPrice != (order.TotalShopMoney-waybill.DesiredFee)*int64(100-store.PayPercentage/2)/int64(100) {
|
|
||||||
order.NewEarningPrice = order.TotalShopMoney*int64(100-store.PayPercentage/2)/int64(100) - waybill.DesiredFee
|
order.NewEarningPrice = order.TotalShopMoney*int64(100-store.PayPercentage/2)/int64(100) - waybill.DesiredFee
|
||||||
}
|
}
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
dao.UpdateEntity(db, order, "NewEarningPrice")
|
dao.UpdateEntity(db, order, "NewEarningPrice")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -279,7 +279,7 @@ func init() {
|
|||||||
}
|
}
|
||||||
sch.defWorkflowConfig = []map[int]*StatusActionConfig{
|
sch.defWorkflowConfig = []map[int]*StatusActionConfig{
|
||||||
map[int]*StatusActionConfig{
|
map[int]*StatusActionConfig{
|
||||||
model.OrderStatusWaitAccepted: statusAccept(4 * time.Minute), //饿百假的自动接单
|
model.OrderStatusWaitAccepted: statusAccept(2 * time.Minute), //饿百假的自动接单
|
||||||
model.OrderStatusNew: statusAccept(10 * time.Millisecond),
|
model.OrderStatusNew: statusAccept(10 * time.Millisecond),
|
||||||
model.OrderStatusAccepted: &StatusActionConfig{ // 自动拣货
|
model.OrderStatusAccepted: &StatusActionConfig{ // 自动拣货
|
||||||
StatusActionParams: partner.StatusActionParams{
|
StatusActionParams: partner.StatusActionParams{
|
||||||
@@ -1521,7 +1521,7 @@ func OrderProfitWarning(order *model.GoodsOrder) {
|
|||||||
)
|
)
|
||||||
roleList = append(roleList, autils.NewRole(operatorRole, 0))
|
roleList = append(roleList, autils.NewRole(operatorRole, 0))
|
||||||
userIDMap, err := cms.GetRolesUserList(jxcontext.AdminCtx, roleList)
|
userIDMap, err := cms.GetRolesUserList(jxcontext.AdminCtx, roleList)
|
||||||
noticeMsg := fmt.Sprintf("利润 :[%v],运营负责人:[%v],门店ID:[%v],平台门店ID[%v],门店名:[%v],订单序号:[%v],订单号(点击进入详情):%v", profit, operatorName, order.StoreID, order.VendorStoreID, order.StoreName, order.OrderSeq, globals.BackstageHost+"/#/ordermanager/"+order.VendorOrderID)
|
noticeMsg := fmt.Sprintf("利润 :[%v],运营负责人:[%v],商家负责人:[%v],门店ID:[%v],平台门店ID[%v],门店名:[%v],订单序号:[%v],订单号(点击进入详情):%v", profit, operatorName, storeDetail.MarketManName, order.StoreID, order.VendorStoreID, order.StoreName, order.OrderSeq, globals.BackstageHost+"/#/ordermanager/"+order.VendorOrderID)
|
||||||
user, err := dao.GetUserByID(db, "mobile", operatorPhone)
|
user, err := dao.GetUserByID(db, "mobile", operatorPhone)
|
||||||
if user != nil && err == nil {
|
if user != nil && err == nil {
|
||||||
for _, v := range userIDMap {
|
for _, v := range userIDMap {
|
||||||
|
|||||||
Reference in New Issue
Block a user