This commit is contained in:
苏尹岚
2021-04-07 14:25:42 +08:00
parent 98f443379d
commit 7c6513e2b4
4 changed files with 17 additions and 1 deletions

View File

@@ -4163,3 +4163,16 @@ func RefreshStoreBind(ctx *jxcontext.Context) (err error) {
task.GetID()
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
}

View File

@@ -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) {
return err
}

View File

@@ -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) {
return err
return fmt.Errorf("暂不支持此平台操作门店上下线!")
}

View File

@@ -1072,12 +1072,14 @@ func (c *StoreController) GetStoreAcctBalance() {
// @Description 直接修改平台门店上下线
// @Param token header string true "认证token"
// @Param storeID formData int true "门店ID"
// @Param vendorID formData int true "平台ID"
// @Param status formData int true "状态,-1 下线1上线"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /UpdateVendorStoreBussinessStatus [post]
func (c *StoreController) UpdateVendorStoreBussinessStatus() {
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
})
}