This commit is contained in:
richboo111
2023-10-09 18:12:46 +08:00
parent 749fdc0744
commit a424851bd3

View File

@@ -4,6 +4,7 @@ import (
"bytes"
"encoding/json"
"errors"
"strings"
"git.rosy.net.cn/baseapi/platformapi/mtwmapi"
"git.rosy.net.cn/jx-callback/business/partner"
@@ -1169,7 +1170,7 @@ func (c *StoreController) GetStoreAcctBalance() {
// @Description 直接修改平台门店上下线
// @Param token header string true "认证token"
// @Param storeID formData int true "门店ID"
// @Param vendorIDs query string true "订单所属厂商列表[1,2,3],缺省不限制"
// @Param vendorIDs formData string true "订单所属厂商列表[1,2,3],缺省不限制"
// @Param status formData int true "状态,-1 下线1上线"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
@@ -1177,10 +1178,10 @@ func (c *StoreController) GetStoreAcctBalance() {
func (c *StoreController) UpdateVendorStoreBussinessStatus() {
c.callUpdateVendorStoreBussinessStatus(func(params *tStoreUpdateVendorStoreBussinessStatusParams) (retVal interface{}, errCode string, err error) {
var vendorIDList []int
if err = jxutils.Strings2Objs(params.VendorIDs, &vendorIDList); err != nil {
return retVal, "", err
temp := strings.Split(params.VendorIDs, ",")
for _, v := range temp {
vendorIDList = append(vendorIDList, utils.Str2Int(v))
}
err = cms.UpdateVendorStoreBussinessStatus(params.Ctx, params.StoreID, vendorIDList, params.Status)
return retVal, "", err
})