- remove duplicated cms const storeDeliveryTypeName

- change misc.Init to StartRefreshEbaiRealMobile and make it async to minimize startup time
This commit is contained in:
gazebo
2019-03-15 10:53:57 +08:00
parent dec14126a7
commit df54ea9478
5 changed files with 7 additions and 12 deletions

View File

@@ -27,12 +27,7 @@ const (
)
var (
CurrentScheduler IScheduler
StoreDeliveryTypeName = map[int]string{
StoreDeliveryTypeCrowdSourcing: "平台众包",
StoreDeliveryTypeByPlatform: "平台专送",
StoreDeliveryTypeByStore: "商家自送",
}
CurrentScheduler IScheduler
)
var (

View File

@@ -6,7 +6,6 @@ import (
"strconv"
"git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/business/jxcallback/scheduler"
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
"git.rosy.net.cn/jx-callback/business/jxutils/tasksch"
"git.rosy.net.cn/jx-callback/business/model"
@@ -44,7 +43,6 @@ func InitServiceInfo(version, buildDate, gitCommit string) {
"bankName": model.BankName,
"promotionStatusName": model.PromotionStatusName,
"orderTypeName": model.OrderTypeName,
"storeDeliveryTypeName": scheduler.StoreDeliveryTypeName,
"taskStatusName": tasksch.TaskStatusName,
"opRequestTypeName": model.RequestTypeName,
"opRequestStatusName": model.RequestStatusName,

View File

@@ -8,8 +8,10 @@ import (
"git.rosy.net.cn/jx-callback/business/partner/purchase/ebai"
)
func Init() {
RefreshEbaiRealMobile()
func StartRefreshEbaiRealMobile() {
utils.AfterFuncWithRecover(5*time.Second, func() {
RefreshEbaiRealMobile()
})
}
func RefreshEbaiRealMobile() {

View File

@@ -39,7 +39,7 @@ var (
DeliveryRangeTypeRadius: "圆",
}
DeliveryTypeName = map[int]string{
StoreDeliveryTypeCrowdSourcing: "平台众包配送",
StoreDeliveryTypeCrowdSourcing: "平台众包",
StoreDeliveryTypeByPlatform: "平台专送",
StoreDeliveryTypeByStore: "门店自送",
}

View File

@@ -38,7 +38,7 @@ func Init() {
api.Init()
cms.InitServiceInfo(Version, BuildDate, GitCommit)
promotion.Init()
misc.Init()
misc.StartRefreshEbaiRealMobile()
ebai.CurPurchaseHandler.StartRefreshComment()
}