aa
This commit is contained in:
@@ -4163,3 +4163,16 @@ func RefreshStoreBind(ctx *jxcontext.Context) (err error) {
|
|||||||
task.GetID()
|
task.GetID()
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func UpdateVendorStoreBussinessStatus(ctx *jxcontext.Context, storeID, vendorID, status int) (err error) {
|
||||||
|
var (
|
||||||
|
db = dao.GetDB()
|
||||||
|
)
|
||||||
|
storeDetail, err := dao.GetStoreDetail(db, storeID, vendorID, "")
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
handler := partner.GetPurchasePlatformFromVendorID(vendorID)
|
||||||
|
err = handler.UpdateStoreLineStatus(ctx, storeDetail.VendorOrgCode, storeID, storeDetail.VendorStoreID, status)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|||||||
@@ -877,5 +877,6 @@ func (c *PurchaseHandler) SyncQualify(ctx *jxcontext.Context, storeDetail *dao.S
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *PurchaseHandler) UpdateStoreLineStatus(ctx *jxcontext.Context, vendorOrgCode string, storeID int, vendorStoreID string, lineStatus int) (err error) {
|
func (c *PurchaseHandler) UpdateStoreLineStatus(ctx *jxcontext.Context, vendorOrgCode string, storeID int, vendorStoreID string, lineStatus int) (err error) {
|
||||||
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -583,5 +583,5 @@ func (p *PurchaseHandler) DeleteStore(db *dao.DaoDB, storeID int, userName strin
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *PurchaseHandler) UpdateStoreLineStatus(ctx *jxcontext.Context, vendorOrgCode string, storeID int, vendorStoreID string, lineStatus int) (err error) {
|
func (c *PurchaseHandler) UpdateStoreLineStatus(ctx *jxcontext.Context, vendorOrgCode string, storeID int, vendorStoreID string, lineStatus int) (err error) {
|
||||||
return err
|
return fmt.Errorf("暂不支持此平台操作门店上下线!")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1072,12 +1072,14 @@ func (c *StoreController) GetStoreAcctBalance() {
|
|||||||
// @Description 直接修改平台门店上下线
|
// @Description 直接修改平台门店上下线
|
||||||
// @Param token header string true "认证token"
|
// @Param token header string true "认证token"
|
||||||
// @Param storeID formData int true "门店ID"
|
// @Param storeID formData int true "门店ID"
|
||||||
|
// @Param vendorID formData int true "平台ID"
|
||||||
// @Param status formData int true "状态,-1 下线,1上线"
|
// @Param status formData int true "状态,-1 下线,1上线"
|
||||||
// @Success 200 {object} controllers.CallResult
|
// @Success 200 {object} controllers.CallResult
|
||||||
// @Failure 200 {object} controllers.CallResult
|
// @Failure 200 {object} controllers.CallResult
|
||||||
// @router /UpdateVendorStoreBussinessStatus [post]
|
// @router /UpdateVendorStoreBussinessStatus [post]
|
||||||
func (c *StoreController) UpdateVendorStoreBussinessStatus() {
|
func (c *StoreController) UpdateVendorStoreBussinessStatus() {
|
||||||
c.callUpdateVendorStoreBussinessStatus(func(params *tStoreUpdateVendorStoreBussinessStatusParams) (retVal interface{}, errCode string, err error) {
|
c.callUpdateVendorStoreBussinessStatus(func(params *tStoreUpdateVendorStoreBussinessStatusParams) (retVal interface{}, errCode string, err error) {
|
||||||
|
err = cms.UpdateVendorStoreBussinessStatus(params.Ctx, params.StoreID, params.VendorID, params.Status)
|
||||||
return retVal, "", err
|
return retVal, "", err
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user