aa
This commit is contained in:
@@ -4002,10 +4002,10 @@ func RefreshMTWMToken(ctx *jxcontext.Context) (err error) {
|
||||
var (
|
||||
db = dao.GetDB()
|
||||
)
|
||||
if time.Now().YearDay()%20 != 0 {
|
||||
if time.Now().YearDay()%10 != 0 {
|
||||
return
|
||||
}
|
||||
//token是1个月过期,每20天刷一次吧
|
||||
//token是1个月过期,每10天刷一次吧
|
||||
storeMaps, _ := dao.GetStoresMapList(db, []int{model.VendorIDMTWM}, nil, nil, model.StoreStatusAll, model.StoreIsSyncAll, "", "", globals.Mtwm2Code)
|
||||
for _, v := range storeMaps {
|
||||
if v.MtwmRefreshToken != "" {
|
||||
|
||||
@@ -481,10 +481,10 @@ func GetStoreManageState(ctx *jxcontext.Context, storeIDs []int, vendorID int, f
|
||||
for _, v := range storeSkus {
|
||||
if v.Status == model.StoreSkuBindStatusNormal && v.Stock > 0 {
|
||||
skuCount++
|
||||
}
|
||||
if priceRefer, err := dao.GetPriceReferPrice(db, 0, v.SkuID, utils.Time2Date(time.Now().AddDate(0, 0, -1))); err == nil && priceRefer != nil {
|
||||
if v.UnitPrice > priceRefer.MidUnitPrice {
|
||||
highSkuCount++
|
||||
if priceRefer, err := dao.GetPriceReferPrice(db, 0, v.SkuID, utils.Time2Date(time.Now().AddDate(0, 0, -1))); err == nil && priceRefer != nil {
|
||||
if v.UnitPrice > priceRefer.MidUnitPrice {
|
||||
highSkuCount++
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -501,7 +501,7 @@ func GetStoreManageState(ctx *jxcontext.Context, storeIDs []int, vendorID int, f
|
||||
nullOrderCount++
|
||||
}
|
||||
if waybills, err2 := dao.GetWayBillByOrderID(db, 0, vendorID, 0, v.VendorOrderID); err2 == nil {
|
||||
if len(waybills) > 0 {
|
||||
if len(waybills) == 0 {
|
||||
refuseOrderCount++
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user