|
|
@@ -0,0 +1,60 @@
|
|
|
+package com.template.controller;
|
|
|
+
|
|
|
+
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.template.annotation.PassToken;
|
|
|
+import com.template.api.ToiletBaseControllerAPI;
|
|
|
+import com.template.api.WarmSmokeControllerAPI;
|
|
|
+import com.template.mapper.ToiletBaseMapper;
|
|
|
+import com.template.mapper.WarmSmokeMapper;
|
|
|
+import com.template.model.result.CommonResult;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
+import org.springframework.http.ResponseEntity;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.client.RestTemplate;
|
|
|
+
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+/**
|
|
|
+ * <p>
|
|
|
+ * 前端控制器
|
|
|
+ * </p>
|
|
|
+ *
|
|
|
+ * @author ceshi
|
|
|
+ * @since 2023-03-30
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+public class WarmSmokeController implements WarmSmokeControllerAPI {
|
|
|
+
|
|
|
+
|
|
|
+ @Value("${diseaseRightUrl}")
|
|
|
+ String url;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private WarmSmokeMapper warmSmokeMapper;
|
|
|
+
|
|
|
+
|
|
|
+ @Override
|
|
|
+ @PassToken
|
|
|
+ public CommonResult getWarmSmokeByPlace(String place) {
|
|
|
+ List<Map<String, String>> warmSmokeByPlace = warmSmokeMapper.getWarmSmokeByPlace(place);
|
|
|
+ if (warmSmokeByPlace.isEmpty()){
|
|
|
+ return CommonResult.ok("查询为空",warmSmokeByPlace);
|
|
|
+ }
|
|
|
+ return CommonResult.ok(warmSmokeByPlace);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ @PassToken
|
|
|
+ public CommonResult getWarmSmokeCount() {
|
|
|
+ List<Map<String, String>> warmSmokeCount = warmSmokeMapper.getWarmSmokeCount();
|
|
|
+ if (warmSmokeCount.isEmpty()){
|
|
|
+ return CommonResult.ok("查询为空",warmSmokeCount);
|
|
|
+ }
|
|
|
+ return CommonResult.ok(warmSmokeCount);
|
|
|
+ }
|
|
|
+}
|
|
|
+
|