Merge branch 'jdshop' of e.coding.net:rosydev/jx-callback into jdshop
This commit is contained in:
@@ -5896,6 +5896,15 @@ func UpdateStorePoiStatus(ctx *jxcontext.Context) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//抖音定时任务
|
||||||
|
//func UpdateStoreRelInformation(ctx *jxcontext.Context) error {
|
||||||
|
// var (
|
||||||
|
// db = dao.GetDB()
|
||||||
|
// )
|
||||||
|
//storeList,_:=dao.GetStoreList(db,[]int{model.VendorIDDD},nil,[]int{model.store})
|
||||||
|
// return nil
|
||||||
|
//}
|
||||||
|
|
||||||
//获取抖店门店建议范围 (即电子围栏)
|
//获取抖店门店建议范围 (即电子围栏)
|
||||||
func GetDDScope(ctx *jxcontext.Context, storeID int, vendorStoreID string) (warehouse_getFences_response.FencesItem, error) {
|
func GetDDScope(ctx *jxcontext.Context, storeID int, vendorStoreID string) (warehouse_getFences_response.FencesItem, error) {
|
||||||
var (
|
var (
|
||||||
|
|||||||
@@ -185,6 +185,12 @@ func Init() {
|
|||||||
}, []string{
|
}, []string{
|
||||||
"22:00:00",
|
"22:00:00",
|
||||||
})
|
})
|
||||||
|
//每天晚上23:00获取门店 电子围栏、仓库、限售模板、运费模板ID同步进数据库
|
||||||
|
ScheduleTimerFunc("UpdateStoreRelInformation", func() {
|
||||||
|
//cms.UpdateStoreRelInformation(jxcontext.AdminCtx)
|
||||||
|
}, []string{
|
||||||
|
"22:00:00",
|
||||||
|
})
|
||||||
|
|
||||||
// 每分钟轮询一次,推送抖店骑手信息
|
// 每分钟轮询一次,推送抖店骑手信息
|
||||||
ScheduleTimerFuncByInterval(func() {
|
ScheduleTimerFuncByInterval(func() {
|
||||||
|
|||||||
@@ -1024,7 +1024,7 @@ type FreightTemplate struct {
|
|||||||
TemplateID int64 `orm:"column(template_id)" json:"templateID"` //运费模板ID 1对1
|
TemplateID int64 `orm:"column(template_id)" json:"templateID"` //运费模板ID 1对1
|
||||||
WarehouseID int64 `orm:"column(warehouse_id)" json:"warehouseID"` //创建门店时绑定的仓库id 1对1
|
WarehouseID int64 `orm:"column(warehouse_id)" json:"warehouseID"` //创建门店时绑定的仓库id 1对1
|
||||||
FenceID string `orm:"column(fence_id)" json:"fenceID"` //电子围栏id 1对1
|
FenceID string `orm:"column(fence_id)" json:"fenceID"` //电子围栏id 1对1
|
||||||
TradeLimitID int64 `orm:"column(trade_limit_id)" json:"tradeLimitID"` //限售模板id
|
TradeLimitID int64 `orm:"column(trade_limit_id)" json:"tradeLimitID"` //限售模板id 1对1(默认会创建)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (*FreightTemplate) TableUnique() [][]string {
|
func (*FreightTemplate) TableUnique() [][]string {
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ func CreateFenceByStore(appOrgCode string, storeID int64) (fenceID string, err e
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//直接创建电子围栏方式
|
//直接创建电子围栏方式 暂时未使用
|
||||||
func CreateFenceDirectly(param warehouse_createFence_request.WarehouseCreateFenceParam) (fenceID string, err error) {
|
func CreateFenceDirectly(param warehouse_createFence_request.WarehouseCreateFenceParam) (fenceID string, err error) {
|
||||||
info := &warehouse_createFence_request.WarehouseCreateFenceParam{
|
info := &warehouse_createFence_request.WarehouseCreateFenceParam{
|
||||||
FenceInfo: param.FenceInfo,
|
FenceInfo: param.FenceInfo,
|
||||||
@@ -181,7 +181,7 @@ func UpdateFenceByStore(appOrgCode, outFenceID string, storeID int) error {
|
|||||||
model.VendorIDDD,
|
model.VendorIDDD,
|
||||||
}
|
}
|
||||||
sqlStr := ` SELECT t.lng,t.lat,t.delivery_range_type,t.delivery_range,s.vendor_store_id FROM store t
|
sqlStr := ` SELECT t.lng,t.lat,t.delivery_range_type,t.delivery_range,s.vendor_store_id FROM store t
|
||||||
LEFT JOIN store_map s ON t.id = s.store_id WHERE s.vendor_id= ? `
|
LEFT JOIN store_map s ON t.id = s.store_id WHERE s.vendor_id = ? `
|
||||||
if storeID != 0 {
|
if storeID != 0 {
|
||||||
sqlStr += " AND t.id = ? "
|
sqlStr += " AND t.id = ? "
|
||||||
sqlParam = append(sqlParam, storeID)
|
sqlParam = append(sqlParam, storeID)
|
||||||
|
|||||||
Reference in New Issue
Block a user