import request from '@/utils/request'

// 查询本人店铺
export function mchListStore(params) {
  return request({
    url: '/app/store/list',
    method: 'get',
    params
  })
}

// 查询本人店铺详情
export function mchGetStore(storeId) {
  return request({
    url: `/app/store/mch/${storeId}`,
    method: 'get'
  })
}


// 新增店铺
export function mchAddStore(data) {
  return request({
    url: '/app/store',
    method: 'post',
    data
  })
}

// 修改店铺
export function mchUpdateStore(data) {
  return request({
    url: '/app/store',
    method: 'put',
    data
  })
}

// 删除店铺
export function mchDelStore(id) {
  return request({
    url: `/app/store/${id}`,
    method: 'delete'
  })
}

// 商户查询店铺列表
export function mchListStoreByIds(ids) {
  return request({
    url: `/mch/store/listByIds/${ids}`,
    method: 'get',
  })
}
