This commit is contained in:
邹宗楠
2023-01-29 11:15:59 +08:00
parent b33c248c76
commit 431202e0b2
2 changed files with 18 additions and 4 deletions

View File

@@ -3,7 +3,8 @@ package tasksch
import ( import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"git.rosy.net.cn/jx-callback/business/jxutils/weixinmsg" "git.rosy.net.cn/baseapi/platformapi/dingdingapi"
"git.rosy.net.cn/jx-callback/business/jxutils/ddmsg"
"strings" "strings"
"sync" "sync"
"time" "time"
@@ -173,6 +174,18 @@ func (t *BaseTask) GetID() string {
return t.ID return t.ID
} }
func (t *BaseTask) GetIsGetResultCalled() bool {
return t.isGetResultCalled
}
func (t *BaseTask) GetParent() ITask {
return t.parent
}
func (t *BaseTask) GetContext() *jxcontext.Context {
return t.ctx
}
func (t *BaseTask) Run() { func (t *BaseTask) Run() {
} }
@@ -495,8 +508,7 @@ func SendMessage(t *BaseTask) {
} else { } else {
content += ",\n" + t.Error() content += ",\n" + t.Error()
} }
// ddmsg.SendUserMessage(dingdingapi.MsgTyeText, authInfo.UserID, "异步任务完成", content) ddmsg.SendUserMessage(dingdingapi.MsgTyeText, authInfo.UserID, "异步任务完成", content)
weixinmsg.SendMsgToUser(authInfo.UserID, weixinmsg.WX_NORMAL_STORE_MSG_TEMPLATE_ID, "异步任务完成:"+content)
} }
} }
} }

View File

@@ -159,6 +159,9 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
} else { } else {
storeParams.OutSystemID = store.VendorStoreID storeParams.OutSystemID = store.VendorStoreID
} }
if storeParams.OutSystemID == "" {
storeParams.OutSystemID = utils.Int2Str(store.ID)
}
if store.SyncStatus&(model.SyncFlagNewMask|model.SyncFlagStoreName) != 0 { if store.SyncStatus&(model.SyncFlagNewMask|model.SyncFlagStoreName) != 0 {
if store.VendorStoreName != "" { if store.VendorStoreName != "" {
storeParams.StationName = store.VendorStoreName storeParams.StationName = store.VendorStoreName
@@ -205,7 +208,6 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
modifyCloseStatus = true modifyCloseStatus = true
_, storeParams.CloseStatus = JxStoreStatus2JdStatus(jxutils.MergeStoreStatus(store.Status, store.JdStoreStatus)) // 1storeParams.CloseStatus _, storeParams.CloseStatus = JxStoreStatus2JdStatus(jxutils.MergeStoreStatus(store.Status, store.JdStoreStatus)) // 1storeParams.CloseStatus
} }
fillOpTimeParams(storeParams, store.GetOpTimeList()) fillOpTimeParams(storeParams, store.GetOpTimeList())
errList := errlist.New() errList := errlist.New()
if globals.EnableJdStoreWrite { if globals.EnableJdStoreWrite {