Blame view

inferface-document/product-color.md 3.63 KB
chenchao authored
1 2 3 4 5 6 7 8 9 10 11 12
# 产品颜色管理接口服务定义
---------------------

# 添加颜色接口

> 接口名: `/productColor/addProductColor/`

### 入参

-------------------------
|属性名称|类型|例子|说明|是否必填|
|--------|----|----|----|--------|
chenchao authored
13 14 15
|colorName|string|X色|颜色名称|是|
|colorCode|string|FFFF|RGB code|是|
|colorValue|string|www.io.png|图片URL|是|
chenchao authored
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 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145

---------------------

### 返回

``` json
{
  "code":200,
  "message":"success"
}

```

# 获取颜色列表

> 接口名: `/productColor/queryProductColors`

### 入参

-------------------------
|属性名称|类型|例子|说明|是否必填|
|-------|----|----|----|-------|
--------------------------------

### 返回

``` json
{
  "code": 200,
  "data": [
    {
      "colorCode": "FFFFFF",
      "colorName": "白色",
      "colorValue": "",
      "id": 1
    },
    {
      "colorCode": "333333",
      "colorName": "黑色",
      "colorValue": "",
      "id": 2
    },
    {
      "colorCode": "b9b7af",
      "colorName": "灰色",
      "colorValue": "",
      "id": 3
    },
    {
      "colorCode": "8b5402",
      "colorName": "棕色",
      "colorValue": "",
      "id": 4
    },
    {
      "colorCode": "47ba17",
      "colorName": "绿色",
      "colorValue": "",
      "id": 6
    },
    {
      "colorCode": "0000fe",
      "colorName": "蓝色",
      "colorValue": "",
      "id": 7
    },
    {
      "colorCode": "710098",
      "colorName": "紫色",
      "colorValue": "",
      "id": 8
    },
    {
      "colorCode": "ffeb00",
      "colorName": "黄色",
      "colorValue": "",
      "id": 9
    },
    {
      "colorCode": "ee0000",
      "colorName": "红色",
      "colorValue": "",
      "id": 11
    },
    {
      "colorCode": "ff5c01",
      "colorName": "橙色",
      "colorValue": "",
      "id": 12
    },
    {
      "colorCode": "#ccccc",
      "colorName": "银色",
      "colorValue": "http://img02.static.yohobuy.com/adpic/2014/01/27/13/02c286ddb8f5c6824a64a45ef6c8e2d18d.png",
      "id": 13
    },
    {
      "colorCode": "FFD83D",
      "colorName": "金色",
      "colorValue": "http://img01.static.yohobuy.com/adpic/2014/01/27/13/011443440339c06843acfd2f62fda68770.png",
      "id": 14
    },
    {
      "colorCode": "#fffff",
      "colorName": "彩色",
      "colorValue": "http://img02.static.yohobuy.com/adpic/2014/01/27/13/0272608508f09e2bf7eb5543bf5cc70d31.png",
      "id": 15
    }
  ],
  "md5": "a05b6b224e8d517720865f0060b484ad",
  "message": "success"
}

```






# 更新产品颜色接口

> 接口名: `/productColor/updateProductColor`

### 入参

-------------------------
|属性名称|类型|例子|说明|是否必填|
|--------|----|----|----|--------|
|id      |int|1    |id  |是   |
chenchao authored
146 147 148
|colorName|string|X色|颜色名称|是|
|colorCode|string|000fff|RGB code|是|
|colorValue|string|www.meili.png|图片URL|是|
chenchao authored
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193
---------------------

### 返回

``` json
{
  "code": 200,
  "data": [],
  "md5": "d751713988987e9331980363e24189ce",
  "message": " success."
}

```



# 获取单个产品颜色接口

> 接口名: `/productColor/queryProductColor`

### 入参

-------------------------
|属性名称|类型|例子|说明|是否必填|
|--------|----|----|----|--------|
|param|int|1|颜色ID|是
---------------------

### 返回

``` json
{
  "code": 200,
  "data": {
    "colorCode": "cc",
    "colorName": "彩色",
    "colorValue": "cc-value",
    "id": 16
  },
  "md5": "d08f272cd425a5a89528299e5ab9ebdf",
  "message": "success"
}

```