|
|
@@ -1,9 +1,18 @@
|
|
|
package com.hssx.pcbms.controller;
|
|
|
|
|
|
|
|
|
+import com.hssx.pcbms.entity.GoodsTags;
|
|
|
+import com.hssx.pcbms.entity.vo.GoodsVO;
|
|
|
+import com.hssx.pcbms.service.GoodsTagsService;
|
|
|
+import com.hssx.pcbms.util.HttpRespMsg;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
+import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
/**
|
|
|
* <p>
|
|
|
@@ -16,6 +25,35 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
@RestController
|
|
|
@RequestMapping("/goodstags")
|
|
|
public class GoodsTagsController {
|
|
|
+ @Autowired
|
|
|
+ private GoodsTagsService goodsTagsService;
|
|
|
|
|
|
+ /**
|
|
|
+ * 标签的添加或修改
|
|
|
+ * 参数:
|
|
|
+ * name :名称
|
|
|
+ * 修改需要传 id:标签id
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @ApiOperation(value = "标签的添加或修改", notes = "标签的添加或修改方法")
|
|
|
+ @RequestMapping("/addOrUpdate")
|
|
|
+ @ResponseBody
|
|
|
+ public HttpRespMsg adaddOrUpdated(GoodsTags goodsTags) {
|
|
|
+ HttpRespMsg msg = goodsTagsService.add(goodsTags);
|
|
|
+ return msg;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 标签的列表
|
|
|
+ * 参数: keyName:关键字(非必传)
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @ApiOperation(value = "标签的列表", notes = "标签的列表")
|
|
|
+ @RequestMapping("/list")
|
|
|
+ @ResponseBody
|
|
|
+ public HttpRespMsg list(@RequestParam(required = false)String keyName) {
|
|
|
+ HttpRespMsg msg = goodsTagsService.getListByKeyName(keyName);
|
|
|
+ return msg;
|
|
|
+ }
|
|
|
}
|
|
|
|