爆品预警统一发送消息

This commit is contained in:
苏尹岚
2020-01-21 09:22:45 +08:00
parent 6ca1f427a3
commit f579b1e50e
8 changed files with 146 additions and 100 deletions

View File

@@ -398,7 +398,7 @@ func getStoresSql(ctx *jxcontext.Context, keyword string, params map[string]inte
}
func setStoreMapInfo(ctx *jxcontext.Context, db *dao.DaoDB, storesInfo *StoresInfo, storeIDs []int, briefLevel int) (err error) {
storeMapList, err := dao.GetStoresMapList(db, nil, storeIDs, model.StoreStatusAll, model.StoreIsSyncAll, "")
storeMapList, err := dao.GetStoresMapList(db, nil, storeIDs, nil, model.StoreStatusAll, model.StoreIsSyncAll, "")
if err != nil {
return err
}
@@ -1661,7 +1661,7 @@ func formalizeStore4Courier(storeDetail *dao.StoreDetail2) *dao.StoreDetail2 {
func ExportShopsHealthInfo(ctx *jxcontext.Context, vendorIDs, storeIDs []int, isAsync, isContinueWhenError bool) (hint string, err error) {
db := dao.GetDB()
vendorID := model.VendorIDEBAI
storeMapList, err := dao.GetStoresMapList(db, []int{vendorID}, storeIDs, model.StoreStatusAll, model.StoreIsSyncYes, "")
storeMapList, err := dao.GetStoresMapList(db, []int{vendorID}, storeIDs, nil, model.StoreStatusAll, model.StoreIsSyncYes, "")
if err != nil {
return "", err
}
@@ -1749,7 +1749,7 @@ func GetCorporationInfo(ctx *jxcontext.Context, licenceCode string) (corporation
func GetStoresVendorSnapshot(ctx *jxcontext.Context, parentTask tasksch.ITask, vendorIDs, storeIDs []int) (vendorStoreSnapshotList []*model.VendorStoreSnapshot, err error) {
db := dao.GetDB()
storeMapList, err := dao.GetStoresMapList(db, vendorIDs, storeIDs, model.StoreStatusAll, model.StoreIsSyncYes, "")
storeMapList, err := dao.GetStoresMapList(db, vendorIDs, storeIDs, nil, model.StoreStatusAll, model.StoreIsSyncYes, "")
if err != nil {
return nil, err
}
@@ -1796,7 +1796,7 @@ func getCurrentSnapshotAt(now time.Time) (snapshotAt time.Time) {
}
func updateVendorStoreStatusBySnapshot(db *dao.DaoDB, curSnapshotList []*model.VendorStoreSnapshot) (err error) {
storeMapList, err := dao.GetStoresMapList(db, nil, nil, model.StoreStatusAll, model.StoreIsSyncAll, "")
storeMapList, err := dao.GetStoresMapList(db, nil, nil, nil, model.StoreStatusAll, model.StoreIsSyncAll, "")
if err != nil {
return err
}
@@ -2380,7 +2380,7 @@ func JdStoreInfoCoordinateRecover(ctx *jxcontext.Context, vendorOrgCode string,
defer file1.Close()
db := dao.GetDB()
storeList, err := dao.GetStoresMapList(db, []int{model.VendorIDJD}, nil, model.StoreStatusAll, model.StoreIsSyncYes, "")
storeList, err := dao.GetStoresMapList(db, []int{model.VendorIDJD}, nil, nil, model.StoreStatusAll, model.StoreIsSyncYes, "")
if err == nil {
var validStoreList []*dao.StoreDetail
for _, v := range storeList {
@@ -2645,7 +2645,7 @@ func CreateStorePriceScore(ctx *jxcontext.Context) (err error) {
func RefreshJdLevel(ctx *jxcontext.Context) (err error) {
db := dao.GetDB()
storeMapList, err := dao.GetStoresMapList(db, []int{model.VendorIDJD}, nil, model.StoreStatusOpened, -1, "")
storeMapList, err := dao.GetStoresMapList(db, []int{model.VendorIDJD}, nil, nil, model.StoreStatusOpened, -1, "")
if len(storeMapList) > 0 {
dao.Begin(db)
defer func() {