|
@@ -0,0 +1,35 @@
|
|
|
+package com.chelvc.cloud.maintain.controller;
|
|
|
+
|
|
|
+import com.chelvc.cloud.vehicle.api.service.HotWordsService;
|
|
|
+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 java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 搜索接口
|
|
|
+ *
|
|
|
+ * @author qizai
|
|
|
+ * @date 2023/11/3
|
|
|
+ */
|
|
|
+@Validated
|
|
|
+@RestController
|
|
|
+@ResponseWrapping
|
|
|
+public class SearchController {
|
|
|
+ @DubboReference
|
|
|
+ private HotWordsService hotWordsService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取热门搜索关键词
|
|
|
+ *
|
|
|
+ * @param number 热词数量
|
|
|
+ * @return 热词集合
|
|
|
+ */
|
|
|
+ @GetMapping("/search/hotwords")
|
|
|
+ public List<String> listHotWords(Integer number) {
|
|
|
+ return hotWordsService.listHotWords(number);
|
|
|
+ }
|
|
|
+}
|