jiangping
2023-09-05 d3a2b49a770ac5247fba0b7a8e15c720beb0cad2
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
import request from '../../utils/request'
 
// 查询
export function fetchList (data) {
  return request.post('/business/goods/page', data, {
    trim: true
  })
}
 
// 导出Excel
export function exportExcel (data) {
  return request.post('/business/goods/exportExcel', data, {
    trim: true,
    download: true
  })
}
 
// 导出模板
export function exportDoc (params) {
  return request.get('/business/goods/export', params, {
    trim: true,
    download: true
  })
}
 
// 创建
export function create (data) {
  return request.post('/business/goods/create', data)
}
 
// 修改
export function updateById (data) {
  return request.post('/business/goods/updateById', data)
}
 
// 删除
export function deleteById (id) {
  return request.get(`/business/goods/delete/${id}`)
}
 
// 批量删除
export function deleteByIdInBatch (ids) {
  return request.get('/business/goods/delete/batch', {
    params: {
      ids
    }
  })
}
 
// 修改状态
export function updateDisableById (data) {
  return request.post('/business/goods/updateDisableById', data)
}
 
// 列表 - 商品选择
export function findListForGoodsId (goodsId) {
  return request.get(`/business/category/findListForGoodsId?goodsId=${goodsId}`)
}
 
// 根据ID查询
export function queryById (id) {
  return request.get(`business/goods/${id}`)
}