import service from '../service'
|
// 积分商品api
|
|
export class IntegralProdApi {
|
getList = (params, showLoading = true) => {
|
return service.post('/awl-product-service/ecIntegralProduct/getPageEcIntegralProduct', params, showLoading)
|
}
|
|
editInfo = (params) => {
|
return service.post('/awl-product-service/ecIntegralProduct/updateByPrimaryKeySelective', params)
|
}
|
|
addInfo = (params) => {
|
return service.post('/awl-product-service/ecIntegralProduct/insertSelective', params)
|
}
|
|
detailsItem = (params, showLoading = true) => {
|
return service.get(`/awl-product-service/ecIntegralProduct/getEcIntegralProductById?id=${params.id}`, { showLoading })
|
}
|
|
deleteItem = (params) => {
|
return service.post(`/awl-product-service/ecIntegralProduct/deleteByPrimaryKey?id=${params.id}`, params)
|
}
|
|
/**
|
* 模糊查询积分商品
|
* @param {*} params
|
* @returns
|
*/
|
queryProdBySpuName = (params) => {
|
return service.get('/awl-product-service/prod/info/queryProdsBySpuId', { params })
|
}
|
|
/**
|
*获取商品详细信息
|
* @param {*} params
|
* @param {*} showLoading
|
* @returns
|
*/
|
getProdInfo = (params) => {
|
return service.get('/awl-product-service/prod/info/getProdByShopSpuId', { params })
|
}
|
|
/**
|
* 商品是否上架
|
* @param {*} params
|
* @returns
|
*/
|
isPublishItem = (params, showLoading = true) => {
|
return service.get('/awl-product-service/ecIntegralProduct/groundingIntegralProduct', { params, showLoading })
|
}
|
|
/**
|
*查询类目
|
* @param {*} params
|
*@returns
|
*/
|
getCategoryList = (params, showLoading = true) => {
|
return service.post('/awl-product-service/ecCommodityCategory/getPageEcCommodityCategory', params, showLoading)
|
}
|
|
/**
|
*新增类目
|
* @param {*} params
|
* @returns
|
*/
|
addCategory = (params) => {
|
return service.post('/awl-product-service/ecCommodityCategory/insertSelective', params)
|
}
|
|
/**
|
*删除类目
|
* @param {*} params
|
* @returns
|
*/
|
deleteCategory = (params, showLoading = true) => {
|
return service.get('/awl-product-service/ecCommodityCategory/deleteByPrimaryKey', { params })
|
}
|
|
/**
|
*查询用户所在店铺
|
*/
|
findShopByMerchantId= (params) => {
|
return service.get(`/awl-market-service/ecMarketShop/findShopByMerchantId?merchantId=${params}`, { showLoading: true })
|
}
|
|
/**
|
*查询积分商品是否存在
|
* @param {*} params
|
* @param {*} showLoading
|
* @returns
|
*/
|
integralProductExist = (params, showLoading = true) => {
|
return service.get('/awl-product-service/ecIntegralProduct/getEcIntegralProductByIds', { params })
|
}
|
}
|
export default new IntegralProdApi()
|