|
|
@@ -0,0 +1,59 @@
|
|
|
+package com.uas.platform.b2c.prod.commodity.controller;
|
|
|
+
|
|
|
+import com.uas.platform.b2c.prod.commodity.model.ProductAttachSubmit;
|
|
|
+import com.uas.platform.b2c.prod.commodity.service.ProductAttachService;
|
|
|
+import com.uas.platform.b2c.trade.support.ResultMap;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+/**
|
|
|
+ * Created by wangyc on 2018/6/27.
|
|
|
+ *
|
|
|
+ * @version 2018/6/27 10:43 wangyc
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("trade/product/attach")
|
|
|
+public class ProductAttachSubmitController {
|
|
|
+
|
|
|
+ private final ProductAttachService productAttachService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ public ProductAttachSubmitController(ProductAttachService productAttachService) {
|
|
|
+ this.productAttachService = productAttachService;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 审核通过
|
|
|
+ * @param submit 申请
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/auditSuccess", method = RequestMethod.POST, produces = "application/json")
|
|
|
+ public ResultMap auditSuccess(@RequestBody ProductAttachSubmit submit) {
|
|
|
+ return productAttachService.auditSuccess(submit);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 审核不通过
|
|
|
+ * @param submitId 申请id
|
|
|
+ * @param reason 原因
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/auditFailed", method = RequestMethod.POST, produces = "application/json")
|
|
|
+ public ResultMap auditFailed(Long submitId, String reason) {
|
|
|
+ return productAttachService.auditFailed(submitId, reason);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 选择确认最终规格书并审核通过
|
|
|
+ * @param chooseAttach 选中规格书
|
|
|
+ * @param submit 申请
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/chooseAttach", method = RequestMethod.POST, produces = "application/json")
|
|
|
+ public ResultMap chooseAttach(String chooseAttach, @RequestBody ProductAttachSubmit submit) {
|
|
|
+ return productAttachService.chooseAttach(chooseAttach,submit);
|
|
|
+ }
|
|
|
+}
|