This commit is contained in:
苏尹岚
2021-02-23 16:07:46 +08:00
parent e3ff21f49e
commit e106a982a1
5 changed files with 101 additions and 14 deletions

View File

@@ -3,10 +3,12 @@ package mtpsapi
import "git.rosy.net.cn/baseapi/utils"
const (
ShopStatusAuditRejected = 10 // 审核驳回
ShopStatusAuditPassed = 20 // 审核通过
ShopStatusAuditCreated = 30 // 创建成功
ShopStatusAuditOnline = 40 // 上线可发单
ShopStatusAuditRejected = 10 // 审核驳回
ShopStatusAuditPassed = 20 // 审核通过
ShopStatusAuditCreated = 30 // 创建成功
ShopStatusAuditOnline = 40 // 上线可发单
ShopStatusAuditUpdateRejected = 50 // 修改审核驳回
ShopStatusAuditUpdatePassed = 60 // 修改审核通过
)
const (
@@ -55,6 +57,15 @@ func (a *API) ShopCreate(shopInfo *ShopInfo) (status int, err error) {
return status, err
}
func (a *API) ShopUpdate(shopInfo *ShopInfo) (status int, err error) {
params := utils.Struct2MapByJson(shopInfo)
result, err := a.AccessAPI("shop/update", params)
if err == nil {
status = int(utils.Interface2Int64WithDefault(result.Data["status"], 0))
}
return status, err
}
func (a *API) ShopQuery(shopID string) (shopInfo *ShopInfo, err error) {
result, err := a.AccessAPI("shop/query", map[string]interface{}{
"shop_id": shopID,