aa
This commit is contained in:
@@ -4221,6 +4221,85 @@ func UpdateVendorStoreBussinessStatus(ctx *jxcontext.Context, storeID, vendorID,
|
||||
return err
|
||||
}
|
||||
|
||||
type JdPage struct {
|
||||
ID int `orm:"column(id)" json:"id"`
|
||||
Name string `json:"name"`
|
||||
MonthSalesTip string `json:"month_sales_tip"`
|
||||
ShippingTime string `json:"shipping_time"`
|
||||
Address string `json:"address"`
|
||||
Phone string `json:"phone"`
|
||||
Pj string `json:"pj"`
|
||||
Orgcode string `json:"orgcode"`
|
||||
Wmpoiid string `json:"wmpoiid"`
|
||||
ThirdCategory string `json:"third_category"`
|
||||
Set string `json:"set"`
|
||||
Settime string `json:"settime"`
|
||||
Latr string `json:"latr"`
|
||||
Longr string `json:"longr"`
|
||||
Rek string `json:"rek"`
|
||||
BakInfo string `json:"bak_info"`
|
||||
GoodsNumber int `json:"goods_number"`
|
||||
Lat string `json:"lat"`
|
||||
Lng string `json:"lng"`
|
||||
DistrictName string `json:"district_name"`
|
||||
}
|
||||
|
||||
type MtPage struct {
|
||||
ID int `orm:"column(id)" json:"id"`
|
||||
Name string `json:"name"`
|
||||
MonthSalesTip string `json:"month_sales_tip"`
|
||||
ShippingTime string `json:"shipping_time"`
|
||||
Address string `json:"address"`
|
||||
Phone string `json:"phone"`
|
||||
Pj string `json:"pj"`
|
||||
Wmpoiid string `json:"wmpoiid"`
|
||||
ThirdCategory string `json:"third_category"`
|
||||
Set string `json:"set"`
|
||||
Settime string `json:"settime"`
|
||||
Latr string `json:"latr"`
|
||||
Longr string `json:"longr"`
|
||||
Rek string `json:"rek"`
|
||||
CityName string `json:"city_name"`
|
||||
GoodsNumber int `json:"goods_number"`
|
||||
Lat string `json:"lat"`
|
||||
Lng string `json:"lng"`
|
||||
DistrictName string `json:"district_name"`
|
||||
}
|
||||
|
||||
func RefreshPageStore() {
|
||||
var (
|
||||
db = dao.GetDB()
|
||||
jds []*JdPage
|
||||
mts []*MtPage
|
||||
)
|
||||
sql := `
|
||||
SELECT * FROM jingdong_showd WHERE lng IS NULL AND lat IS NULL
|
||||
`
|
||||
dao.GetRows(db, &jds, sql, nil)
|
||||
for _, v := range jds {
|
||||
if v.Lat == "" && v.Lng == "" {
|
||||
if v.BakInfo != "" {
|
||||
result, _ := api.AutonaviAPI.GetCoordinateFromAddressAll(v.Address, v.BakInfo)
|
||||
v.Lng, v.Lat, v.DistrictName = utils.Float64ToStr(result.Lng), utils.Float64ToStr(result.Lat), result.AdName
|
||||
dao.UpdateEntity(db, v, "Lng", "Lat", "DistrictName")
|
||||
}
|
||||
}
|
||||
}
|
||||
sql2 := `
|
||||
SELECT * FROM meituan_showd WHERE lng IS NULL AND lat IS NULL
|
||||
`
|
||||
dao.GetRows(db, &mts, sql2, nil)
|
||||
for _, v := range mts {
|
||||
if v.Lat == "" && v.Lng == "" {
|
||||
if v.CityName != "" {
|
||||
result, _ := api.AutonaviAPI.GetCoordinateFromAddressAll(v.Address, v.CityName)
|
||||
v.Lng, v.Lat, v.DistrictName = utils.Float64ToStr(result.Lng), utils.Float64ToStr(result.Lat), result.AdName
|
||||
dao.UpdateEntity(db, v, "Lng", "Lat", "DistrictName")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func QueryPageStores2(db *dao.DaoDB, pageSize, offset int, keyword string, vendorStoreID string, vendorID, cityCode, districtCode int, tel string,
|
||||
minShopScore float32, minRecentOrderNum, minSkuCount int, lng1, lat1, lng2, lat2 float64) (pagedInfo *model.PagedInfo, err error) {
|
||||
db.Db = orm.NewOrmUsingDB("c4beta")
|
||||
|
||||
@@ -299,6 +299,12 @@ func Init() {
|
||||
}, []string{
|
||||
"22:00:00",
|
||||
})
|
||||
//刷新门店数据坐标等
|
||||
ScheduleTimerFunc("RefreshPageStore", func() {
|
||||
cms.RefreshPageStore()
|
||||
}, []string{
|
||||
"20:00:00",
|
||||
})
|
||||
}
|
||||
if configs, err := dao.QueryConfigs(dao.GetDB(), "ebaiStorePageCookie", model.ConfigTypeCookie, ""); err == nil {
|
||||
ebaiStorePageCookie = configs[0].Value
|
||||
|
||||
@@ -4,7 +4,6 @@ import (
|
||||
"bytes"
|
||||
"context"
|
||||
"fmt"
|
||||
"git.rosy.net.cn/jx-callback/business/jxcallback/orderman"
|
||||
"regexp"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -1924,7 +1923,7 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) {
|
||||
// dao.UpdateEntity(db, v, "ConsigneeMobile2")
|
||||
// }
|
||||
//}
|
||||
orderman.FixedOrderManager.AmendMissingOrders(ctx, []int{1}, 100920, time.Now().AddDate(0, 0, -18), time.Now(), false, true)
|
||||
cms.RefreshPageStore()
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user