aa
This commit is contained in:
@@ -4070,3 +4070,11 @@ func GetStoreAcctBalance(ctx *jxcontext.Context, storeID int) (storeAcct *model.
|
|||||||
AccountBalance: totalIncome - totalExpend,
|
AccountBalance: totalIncome - totalExpend,
|
||||||
}, err
|
}, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// func SendVendorStoreStatusChanged(ctx *jxcontext.Context) (err error) {
|
||||||
|
// var (
|
||||||
|
// db = dao.GetDB()
|
||||||
|
// )
|
||||||
|
// dao.GetStoresMapList(db, []int{model.VendorIDJD, model.VendorIDMTWM, model.VendorIDEBAI}, nil, nil, model.StoreStatusAll, model.StoreIsSyncAll, "", "", "")
|
||||||
|
// return err
|
||||||
|
// }
|
||||||
|
|||||||
@@ -8,6 +8,9 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"git.rosy.net.cn/jx-callback/business/jxutils/ddmsg"
|
||||||
|
|
||||||
|
"git.rosy.net.cn/baseapi/platformapi/dingdingapi"
|
||||||
"git.rosy.net.cn/baseapi/platformapi/mtwmapi"
|
"git.rosy.net.cn/baseapi/platformapi/mtwmapi"
|
||||||
|
|
||||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||||
@@ -427,6 +430,13 @@ func RefreshStoreManageState(ctx *jxcontext.Context) {
|
|||||||
storeManage.CoverArea = utils.Str2Float64(fmt.Sprintf("%.2f", storeManage.CoverArea))
|
storeManage.CoverArea = utils.Str2Float64(fmt.Sprintf("%.2f", storeManage.CoverArea))
|
||||||
//营业状态
|
//营业状态
|
||||||
storeManage.VendorStatus = store.Status
|
storeManage.VendorStatus = store.Status
|
||||||
|
//不一致发消息
|
||||||
|
if storeDetail.VendorStatus != store.Status {
|
||||||
|
content := "您的门店 [" + storeDetail.Name + "],ID:[" + utils.Int2Str(storeDetail.ID) + "],在[" + model.VendorNames[vendorID] + "] 平台上营业状态和京西不一致!"
|
||||||
|
if user, err := dao.GetUserByID(db, "mobile", storeDetail.MarketManPhone); err == nil {
|
||||||
|
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, user.UserID, "平台门店状态变化", content)
|
||||||
|
}
|
||||||
|
}
|
||||||
//营业时长
|
//营业时长
|
||||||
optime := jxutils.JxOperationTime2TimeByDate(storeDetail.CloseTime1, time.Now()).Sub(jxutils.JxOperationTime2TimeByDate(storeDetail.OpenTime1, time.Now())).Hours()
|
optime := jxutils.JxOperationTime2TimeByDate(storeDetail.CloseTime1, time.Now()).Sub(jxutils.JxOperationTime2TimeByDate(storeDetail.OpenTime1, time.Now())).Hours()
|
||||||
if storeDetail.CloseTime2 != 0 && storeDetail.OpenTime2 != 0 {
|
if storeDetail.CloseTime2 != 0 && storeDetail.OpenTime2 != 0 {
|
||||||
|
|||||||
Reference in New Issue
Block a user