- dont't use JdRange2JxRange.

This commit is contained in:
gazebo
2018-09-21 09:56:05 +08:00
parent 49a2d30f0e
commit d10869cef4
5 changed files with 16 additions and 6 deletions

View File

@@ -142,7 +142,7 @@ type SkuCategory struct {
func (*SkuCategory) TableUnique() [][]string {
return [][]string{
[]string{"Name", "DeletedAt", "Level"},
[]string{"Name", "Level", "DeletedAt"},
[]string{"JdID", "DeletedAt"},
}
}

View File

@@ -21,7 +21,7 @@ type StoreSkuCategoryMap struct {
func (*StoreSkuCategoryMap) TableUnique() [][]string {
return [][]string{
[]string{"StoreID", "SkuCategoryID"},
[]string{"StoreID", "SkuCategoryID", "DeletedAt"},
}
}

View File

@@ -131,6 +131,16 @@ func (p *PurchaseHandler) UpdateStore(storeID int, userName string) (err error)
// todo remove out shop id
}
}
if err == nil {
mergeStatus := jxutils.MergeStoreStatus(store.Status, store.EbaiStoreStatus)
if mergeStatus == model.StoreStatusOpened {
err = api.EbaiAPI.ShopOnline("", utils.Str2Int64(store.VendorStoreID))
} else if mergeStatus == model.StoreStatusClosed {
err = api.EbaiAPI.ShopOffline("", utils.Str2Int64(store.VendorStoreID))
} else if mergeStatus == model.StoreStatusClosed {
err = api.EbaiAPI.ShopClose("", utils.Str2Int64(store.VendorStoreID))
}
}
}
}
}

View File

@@ -11,7 +11,7 @@ import (
)
// 京东到家,以有库存表示关注(认领)
func (p *PurchaseHandler) SyncStoreSkus(storeID int, skuIDs []int, isForce bool, userName string) (err error) {
func (p *PurchaseHandler) SyncStoreSku(storeID int, skuIDs []int, isForce bool, userName string) (err error) {
db := dao.GetDB()
var storeSkus []*model.StoreSkuBind
sqlParams := []interface{}{

View File

@@ -31,9 +31,9 @@ var (
// @Title 给微信用的回调接口
// @Description 给微信用的回调接口,自己不能直接调用
// @Param code query string true "门店ID"
// @Param block query string true "门店所属的厂商ID"
// @Param state query string false "门店所属的厂商ID"
// @Param code query string true "客户同意后得到的code"
// @Param block query string true "回调地址"
// @Param state query string false "微信回调的登录状态"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /GetWeiXinUserInfo [get]