Jelajahi Sumber

Merge branch 'master' of http://gogs.chelvc.com/wuyongqiang/maintain

woody 1 tahun lalu
induk
melakukan
58f9d7feb3

+ 15 - 0
src/main/java/com/chelvc/cloud/maintain/controller/GoodsController.java

@@ -1,6 +1,7 @@
 package com.chelvc.cloud.maintain.controller;
 
 import java.util.List;
+import java.util.Map;
 import javax.validation.Valid;
 import javax.validation.constraints.Min;
 
@@ -17,6 +18,7 @@ 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.RequestBody;
 import org.springframework.web.bind.annotation.RestController;
 
 /**
@@ -71,4 +73,17 @@ public class GoodsController {
     public Long addMerchantFavorite(@PathVariable("id") @Min(value = 1, message = "商家ID不能小于1") Long id) {
         return this.favoriteService.addMerchantFavorite(id,"GOODS");
     }
+
+    /**
+     * 商家端商品信息查询
+     *
+     * @param param 商品信息
+     * @return 商家端商品信息
+     */
+    @PostMapping("/merchant/goodsList")
+    public Map<String,Object> getMerchantGoodsList(@RequestBody @Valid GoodsQueryParam param) {
+        return this.goodsService.getCategoryAndGoods(param);
+    }
+
+
 }

+ 36 - 0
src/main/java/com/chelvc/cloud/maintain/controller/NoticeController.java

@@ -0,0 +1,36 @@
+package com.chelvc.cloud.maintain.controller;
+
+import com.chelvc.cloud.vehicle.api.dto.NoticeDTO;
+import com.chelvc.cloud.vehicle.api.service.NoticeService;
+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.RestController;
+import javax.validation.Valid;
+import java.util.List;
+
+/**
+ * 通知配置接口
+ *
+ * @author liude
+ * @date 2023/12/13
+ */
+@Validated
+@RestController
+@ResponseWrapping
+public class NoticeController {
+    @DubboReference
+    private NoticeService noticeService;
+
+    /**
+     * 查询通知配置列表
+     *
+     * @param type 查询参数  0-用户端 1-商家端
+     * @return 通知配置列表信息
+     */
+    @GetMapping("/notice/list")
+    public List<NoticeDTO> getNoticeList(@Valid String type) {
+        return this.noticeService.getNoticeList(type);
+    }
+}