- UpdateStoresSkusSale中对于autoSaleAt按服务器设置处理,不管客户端传的具体值
This commit is contained in:
@@ -163,6 +163,8 @@ type tGetStoresSkusInfo struct {
|
|||||||
const (
|
const (
|
||||||
maxStoreNameBind = 3000 // 最大门店SkuName bind个数
|
maxStoreNameBind = 3000 // 最大门店SkuName bind个数
|
||||||
maxStoreNameBind2 = 10000 // 最大门店乘SkuName个数
|
maxStoreNameBind2 = 10000 // 最大门店乘SkuName个数
|
||||||
|
|
||||||
|
AutoSaleAtStr = "20:25:00"
|
||||||
)
|
)
|
||||||
|
|
||||||
func GetStoreSkus(ctx *jxcontext.Context, storeID int, skuIDs []int, isFocus bool, keyword string, isBySku bool, params map[string]interface{}, offset, pageSize int) (skuNamesInfo *StoreSkuNamesInfo, err error) {
|
func GetStoreSkus(ctx *jxcontext.Context, storeID int, skuIDs []int, isFocus bool, keyword string, isBySku bool, params map[string]interface{}, offset, pageSize int) (skuNamesInfo *StoreSkuNamesInfo, err error) {
|
||||||
@@ -1307,6 +1309,15 @@ func getSkuSaleStatus(inSkuBind *StoreSkuBindSkuInfo, skuBindInfo *StoreSkuBindI
|
|||||||
return model.StoreSkuBindStatusNA
|
return model.StoreSkuBindStatusNA
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func formatAutoSaleTime(autoSaleTime time.Time) (outAutoSaleTime time.Time) {
|
||||||
|
if utils.IsTimeZero(autoSaleTime) {
|
||||||
|
outAutoSaleTime = utils.DefaultTimeValue
|
||||||
|
} else {
|
||||||
|
outAutoSaleTime = jxutils.GetNextTimeFromList(time.Now(), []string{AutoSaleAtStr})
|
||||||
|
}
|
||||||
|
return outAutoSaleTime
|
||||||
|
}
|
||||||
|
|
||||||
// todo 应该用updateStoresSkusWithoutSync实现
|
// todo 应该用updateStoresSkusWithoutSync实现
|
||||||
func updateStoreSkusSaleWithoutSync(ctx *jxcontext.Context, storeID int, skuBindSkuInfos []*StoreSkuBindSkuInfo, autoSaleTime time.Time, userName string) (needSyncSkus []int, err error) {
|
func updateStoreSkusSaleWithoutSync(ctx *jxcontext.Context, storeID int, skuBindSkuInfos []*StoreSkuBindSkuInfo, autoSaleTime time.Time, userName string) (needSyncSkus []int, err error) {
|
||||||
var num int64
|
var num int64
|
||||||
@@ -1331,6 +1342,7 @@ func updateStoreSkusSaleWithoutSync(ctx *jxcontext.Context, storeID int, skuBind
|
|||||||
dao.Rollback(db)
|
dao.Rollback(db)
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
autoSaleTime = formatAutoSaleTime(autoSaleTime)
|
||||||
for _, skuBind := range storeSkuList {
|
for _, skuBind := range storeSkuList {
|
||||||
if v := skuBindSkuInfosMap[skuBind.SkuID]; v != nil && v.IsSale != 0 {
|
if v := skuBindSkuInfosMap[skuBind.SkuID]; v != nil && v.IsSale != 0 {
|
||||||
if v.IsSale == 1 {
|
if v.IsSale == 1 {
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ var (
|
|||||||
}
|
}
|
||||||
|
|
||||||
autoSaleStoreSkuTimeList = []string{
|
autoSaleStoreSkuTimeList = []string{
|
||||||
"20:20:00",
|
cms.AutoSaleAtStr,
|
||||||
}
|
}
|
||||||
|
|
||||||
importantTaskMap = &sync.Map{}
|
importantTaskMap = &sync.Map{}
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ package model
|
|||||||
type AppKeyConfig struct {
|
type AppKeyConfig struct {
|
||||||
ModelIDCULD
|
ModelIDCULD
|
||||||
VendorID int
|
VendorID int
|
||||||
AppKey string // 同一平台下不同的Key
|
AppCode string // 同一平台下不同的商户代码
|
||||||
|
|
||||||
Name string
|
AppName string
|
||||||
AppType int
|
AppType int
|
||||||
Value1 string
|
Value1 string
|
||||||
Value2 string
|
Value2 string
|
||||||
|
|||||||
Reference in New Issue
Block a user