Просмотр исходного кода

消息通知配置与商家认证

liude 1 год назад
Родитель
Сommit
5ce76580a6

+ 1 - 1
src/main/java/com/chelvc/cloud/maintain/controller/CartItemController.java

@@ -62,7 +62,7 @@ public class CartItemController {
     }
 
     /**
-     * 修改购物车商品的数量
+     * 删除购物车
      *
      * @return 购物车主键
      */

+ 63 - 0
src/main/java/com/chelvc/cloud/maintain/controller/FeedbackController.java

@@ -0,0 +1,63 @@
+package com.chelvc.cloud.maintain.controller;
+import com.chelvc.cloud.vehicle.api.dto.FeedBackDTO;
+import com.chelvc.cloud.vehicle.api.param.FeedBackModifyParam;
+import com.chelvc.cloud.vehicle.api.service.FeedbackService;
+import com.chelvc.framework.base.annotation.ResponseWrapping;
+import org.apache.dubbo.config.annotation.DubboReference;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.validation.Valid;
+import javax.validation.constraints.Min;
+
+/**
+ * 意见反馈接口
+ *
+ * @author liude
+ * @date 2023/1/16
+ */
+@Validated
+@RestController
+@ResponseWrapping
+public class FeedbackController {
+    @DubboReference
+    private FeedbackService feedbackService;
+
+    /**
+     * 新增意见反馈
+     *
+     * @param param 新增参数
+     * @return 意见反馈主键
+     */
+    @PostMapping("/feedback")
+    public Long addFeedback(@RequestBody @Valid FeedBackModifyParam param) {
+        return this.feedbackService.addFeedback(param);
+    }
+
+    /**
+     * 修改意见反馈
+     *
+     * @param id    意见反馈主键
+     * @param param 修改参数
+     */
+    @PutMapping("/feedback/{id}")
+    public void updateFeedback(@PathVariable("id") @Min(value = 1, message = "商家主键不能小于1") Long id,
+                                   @RequestBody @Valid FeedBackModifyParam param) {
+        this.feedbackService.updateFeedback(id, param);
+    }
+
+    /**
+     * 查询意见反馈
+     */
+    @PostMapping("/feedback/queryById")
+    public FeedBackDTO queryById() {
+        return this.feedbackService.getFeedback();
+    }
+
+
+
+}

+ 65 - 0
src/main/java/com/chelvc/cloud/maintain/controller/MerchantAuthController.java

@@ -0,0 +1,65 @@
+package com.chelvc.cloud.maintain.controller;
+import com.chelvc.cloud.vehicle.api.dto.MerchantAuthDTO;
+import com.chelvc.cloud.vehicle.api.param.MerchantAuthModifyParam;
+import com.chelvc.cloud.vehicle.api.service.CarouselImagesService;
+import com.chelvc.cloud.vehicle.api.service.MerchantAuthService;
+import com.chelvc.framework.base.annotation.ResponseWrapping;
+import org.apache.dubbo.config.annotation.DubboReference;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.validation.Valid;
+import javax.validation.constraints.Min;
+
+/**
+ * 商家认证接口
+ *
+ * @author liude
+ * @date 2023/1/10
+ */
+@Validated
+@RestController
+@ResponseWrapping
+public class MerchantAuthController {
+    @DubboReference
+    private MerchantAuthService merchantAuthService;
+
+    /**
+     * 新增商家认证
+     *
+     * @param param 新增参数
+     * @return 商家商家认证主键
+     */
+    @PostMapping("/merchantAuth")
+    public Long addMerchantAuth(@RequestBody @Valid MerchantAuthModifyParam param) {
+        return this.merchantAuthService.addMerchantAuth(param);
+    }
+
+    /**
+     * 修改商家商家认证
+     *
+     * @param id    商家商家认证主键
+     * @param param 修改参数
+     */
+    @PutMapping("/merchantAuth/{id}")
+    public void updateMerchantAuth(@PathVariable("id") @Min(value = 1, message = "商家主键不能小于1") Long id,
+                                   @RequestBody @Valid MerchantAuthModifyParam param) {
+        this.merchantAuthService.updateMerchantAuth(id, param);
+    }
+
+    /**
+     * 查询商家认证
+     */
+    @PostMapping("/merchantAuth/queryById")
+    public MerchantAuthDTO queryById() {
+        return this.merchantAuthService.queryById();
+    }
+
+
+
+}