fuliqi
2024-01-24 29c1e7eb5ac16e90d8991a86c1c071bc312ec8d9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
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()