This commit is contained in:
suyl
2021-09-02 11:09:20 +08:00
parent 158586c902
commit ab76d2daf5

View File

@@ -1068,10 +1068,10 @@ func UpdateStore(ctx *jxcontext.Context, storeID int, payload map[string]interfa
} else {
dao.Commit(db, txDB)
}
notifyStoreOperatorChanged(store.ID, "京东运营", store.OperatorPhone, valid["operatorPhone"])
notifyStoreOperatorChanged(store.ID, "美团运营", store.OperatorPhone2, valid["operatorPhone2"])
notifyStoreOperatorChanged(store.ID, "饿百运营", store.OperatorPhone3, valid["operatorPhone3"])
notifyStoreOperatorChanged(store.ID, "市场", store.MarketManPhone, valid["marketManPhone"])
notifyStoreOperatorChanged(ctx, store.ID, "京东运营", store.OperatorPhone, valid["operatorPhone"])
notifyStoreOperatorChanged(ctx, store.ID, "美团运营", store.OperatorPhone2, valid["operatorPhone2"])
notifyStoreOperatorChanged(ctx, store.ID, "饿百运营", store.OperatorPhone3, valid["operatorPhone3"])
notifyStoreOperatorChanged(ctx, store.ID, "市场", store.MarketManPhone, valid["marketManPhone"])
if err == nil {
if valid["openTime1"] != 0 || valid["closeTime1"] != 0 || valid["openTime2"] != 0 || valid["closeTime2"] != 0 {
err = CurVendorSync.ChangeStoreSkuSaleStatus(ctx, storeID, true, true)
@@ -1084,7 +1084,7 @@ func UpdateStore(ctx *jxcontext.Context, storeID int, payload map[string]interfa
return num, err
}
func notifyStoreOperatorChanged(storeID int, operatorRoleName, phone string, newPhone interface{}) {
func notifyStoreOperatorChanged(ctx *jxcontext.Context, storeID int, operatorRoleName, phone string, newPhone interface{}) {
if phone != "" && newPhone != nil {
db := dao.GetDB()
if user, err := dao.GetUserByID(db, "mobile", phone); err == nil {
@@ -1094,7 +1094,7 @@ func notifyStoreOperatorChanged(storeID int, operatorRoleName, phone string, new
curUserName = curUser.GetName()
}
}
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, user.GetID(), fmt.Sprintf("门店%s变更", operatorRoleName), fmt.Sprintf("门店:%d,原%s:%s,变更为:%s", storeID, operatorRoleName, user.GetName(), curUserName))
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, user.GetID(), fmt.Sprintf("门店%s变更", operatorRoleName), fmt.Sprintf("门店:%d,原%s:%s,变更为:%s,操作人:%s", storeID, operatorRoleName, user.GetName(), curUserName, ctx.GetUserName()))
}
}
}