Merge branch 'mark' of e.coding.net:rosydev/jx-callback into mark
This commit is contained in:
@@ -1707,6 +1707,8 @@ func GetStoresVendorSnapshot(ctx *jxcontext.Context, parentTask tasksch.ITask, v
|
||||
DeliveryType: store.DeliveryType,
|
||||
StoreName: store.OriginalName,
|
||||
IsAutoOrder: store.IsAutoOrder,
|
||||
|
||||
JdStoreLevel: store.JdStoreLevel,
|
||||
}}
|
||||
}
|
||||
}
|
||||
@@ -1748,11 +1750,12 @@ func updateVendorStoreStatusBySnapshot(db *dao.DaoDB, curSnapshotList []*model.V
|
||||
}()
|
||||
for _, v := range storeMapList {
|
||||
if snapshot := snapshotMap[jxutils.Combine2Int(v.StoreID, v.VendorID)]; snapshot != nil &&
|
||||
(v.Status != snapshot.Status || v.DeliveryType != snapshot.DeliveryType || v.StoreName != snapshot.StoreName) {
|
||||
(v.Status != snapshot.Status || v.DeliveryType != snapshot.DeliveryType || v.StoreName != snapshot.StoreName || v.JdStoreLevel != snapshot.JdStoreLevel) {
|
||||
v.Status = snapshot.Status
|
||||
v.DeliveryType = snapshot.DeliveryType
|
||||
v.StoreName = snapshot.StoreName
|
||||
if _, err = dao.UpdateEntity(db, v, model.FieldStatus, "DeliveryType", "StoreName"); err != nil {
|
||||
v.JdStoreLevel = snapshot.JdStoreLevel
|
||||
if _, err = dao.UpdateEntity(db, v, model.FieldStatus, "DeliveryType", "StoreName", "JdStoreLevel"); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,6 +38,8 @@ type StoreDetail struct {
|
||||
MarketManName string `json:"marketManName"` //市场负责人
|
||||
OperatorName string `json:"operatorName"` //运营负责人
|
||||
OperatorName2 string `json:"operatorName2"`
|
||||
|
||||
JdStoreLevel string `json:"jdStoreLevel"` //京东门店等级
|
||||
}
|
||||
|
||||
// 带快递门店信息的
|
||||
|
||||
@@ -389,10 +389,11 @@ type StoreMap struct {
|
||||
DeliveryFee int `json:"deliveryFee"`
|
||||
DeliveryCompetition int8 `orm:"default(1)" json:"deliveryCompetition"` // 是否支持配送竞争
|
||||
|
||||
SyncStatus int8 `orm:"default(2)" json:"syncStatus"`
|
||||
IsSync int8 `orm:"default(1)" json:"isSync"` // 是否同步
|
||||
FakeOpenStart int16 `orm:"default(0)" json:"fakeOpenStart"` // 假开店开始
|
||||
FakeOpenStop int16 `orm:"default(0)" json:"fakeOpenStop"` // 假开店结束
|
||||
SyncStatus int8 `orm:"default(2)" json:"syncStatus"`
|
||||
IsSync int8 `orm:"default(1)" json:"isSync"` // 是否同步
|
||||
FakeOpenStart int16 `orm:"default(0)" json:"fakeOpenStart"` // 假开店开始
|
||||
FakeOpenStop int16 `orm:"default(0)" json:"fakeOpenStop"` // 假开店结束
|
||||
JdStoreLevel string `orm:"size(32)" json:"jdStoreLevel"` //京东门店等级
|
||||
}
|
||||
|
||||
func (*StoreMap) TableUnique() [][]string {
|
||||
@@ -522,6 +523,7 @@ type VendorStoreSnapshot struct {
|
||||
DeliveryType int8 `orm:"default(0)" json:"deliveryType"` // 配送类型
|
||||
StoreName string `orm:"size(255)" json:"storeName"` // 平台门店的名字
|
||||
IsAutoOrder int8 `json:"isAutoOrder"` // 平台是否自动接单,-1:否,0:未知,1:是
|
||||
JdStoreLevel string `orm:"size(32)" json:"jdStoreLevel"` //京东门店等级
|
||||
}
|
||||
|
||||
func (*VendorStoreSnapshot) TableUnique() [][]string {
|
||||
|
||||
@@ -91,6 +91,9 @@ func (p *PurchaseHandler) ReadStore(ctx *jxcontext.Context, vendorOrgCode, vendo
|
||||
}
|
||||
}
|
||||
}
|
||||
if level, err := a.GetJdStoreLevel(vendorOrgCode, vendorStoreID); err == nil {
|
||||
retVal.JdStoreLevel = level
|
||||
}
|
||||
if retVal.DistrictCode == 0 {
|
||||
retVal.DistrictCode = api.AutonaviAPI.GetCoordinateDistrictCode(lng, lat)
|
||||
if retVal.CityCode == 0 {
|
||||
|
||||
@@ -621,3 +621,16 @@ func (c *StoreController) CreateStorePriceScore() {
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 测试jdlevel
|
||||
// @Description 测试jdlevel
|
||||
// @Param token header string true "认证token"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /SaveAndSendAlarmVendorSnapshot [post]
|
||||
func (c *StoreController) SaveAndSendAlarmVendorSnapshot() {
|
||||
c.callSaveAndSendAlarmVendorSnapshot(func(params *tStoreSaveAndSendAlarmVendorSnapshotParams) (retVal interface{}, errCode string, err error) {
|
||||
err = cms.SaveAndSendAlarmVendorSnapshot(params.Ctx, nil, nil, true)
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1467,6 +1467,15 @@ func init() {
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:StoreController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:StoreController"],
|
||||
beego.ControllerComments{
|
||||
Method: "SaveAndSendAlarmVendorSnapshot",
|
||||
Router: `/SaveAndSendAlarmVendorSnapshot`,
|
||||
AllowHTTPMethods: []string{"post"},
|
||||
MethodParams: param.Make(),
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:StoreController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:StoreController"],
|
||||
beego.ControllerComments{
|
||||
Method: "ScoreStore",
|
||||
|
||||
Reference in New Issue
Block a user