Jelajahi Sumber

controller完成

yq 4 tahun lalu
induk
melakukan
04418d662a
22 mengubah file dengan 225 tambahan dan 201 penghapusan
  1. 20 4
      fiveep-controller/src/main/java/com/bizmatics/controller/web/AlarmPowerController.java
  2. 24 4
      fiveep-controller/src/main/java/com/bizmatics/controller/web/DeviceController.java
  3. 9 5
      fiveep-controller/src/main/java/com/bizmatics/controller/web/DeviceStatusController.java
  4. 35 4
      fiveep-controller/src/main/java/com/bizmatics/controller/web/HtAnalogDataController.java
  5. 9 4
      fiveep-controller/src/main/java/com/bizmatics/controller/web/HtSwitchDataController.java
  6. 0 129
      fiveep-controller/src/main/java/com/bizmatics/controller/web/MybatisGeneratorUtils.java
  7. 20 4
      fiveep-controller/src/main/java/com/bizmatics/controller/web/PersonnelController.java
  8. 9 4
      fiveep-controller/src/main/java/com/bizmatics/controller/web/RouteController.java
  9. 19 4
      fiveep-controller/src/main/java/com/bizmatics/controller/web/RtAnalogDataController.java
  10. 8 4
      fiveep-controller/src/main/java/com/bizmatics/controller/web/RtSwitchDataController.java
  11. 35 4
      fiveep-controller/src/main/java/com/bizmatics/controller/web/SiteController.java
  12. 8 5
      fiveep-controller/src/main/java/com/bizmatics/controller/web/SitedtlController.java
  13. 0 16
      fiveep-controller/src/main/java/com/bizmatics/controller/web/TestController.java
  14. 7 4
      fiveep-controller/src/main/java/com/bizmatics/controller/web/UserSiteController.java
  15. 2 1
      fiveep-controller/src/main/java/com/bizmatics/controller/web/WcAccessTokenController.java
  16. 2 1
      fiveep-controller/src/main/java/com/bizmatics/controller/web/WcBlackoutPlanController.java
  17. 2 1
      fiveep-controller/src/main/java/com/bizmatics/controller/web/WcKeySecretController.java
  18. 2 1
      fiveep-controller/src/main/java/com/bizmatics/controller/web/WcMeasTypeController.java
  19. 2 1
      fiveep-controller/src/main/java/com/bizmatics/controller/web/WcUserController.java
  20. 2 1
      fiveep-controller/src/main/java/com/bizmatics/controller/web/WcUserTokenController.java
  21. 5 0
      fiveep-service/src/main/java/com/bizmatics/service/HtAnalogDataService.java
  22. 5 0
      fiveep-service/src/main/java/com/bizmatics/service/SiteService.java

+ 20 - 4
fiveep-controller/src/main/java/com/bizmatics/controller/web/AlarmPowerController.java

@@ -1,21 +1,37 @@
 package com.bizmatics.controller.web;
 
 
+import com.bizmatics.common.core.bean.ApiResult;
+import com.bizmatics.service.AlarmPowerService;
+import com.bizmatics.service.vo.ApCountVO;
+import org.checkerframework.checker.units.qual.A;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
 
 import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RestController;
 
 /**
- * <p>
- * 电力告警 前端控制器
- * </p>
+ * 电力告警
  *
  * @author ya
  * @since 2021-07-07
  */
-@Controller
+@RestController
 @RequestMapping("/alarmPower")
 public class AlarmPowerController {
 
+    @Autowired
+    private AlarmPowerService alarmPowerService;
+
+
+    /**
+     * 查询电力告警总数
+     * @return
+     */
+    @RequestMapping("/count")
+    public ApiResult<ApCountVO> count(){
+        return ApiResult.success(alarmPowerService.selectCount());
+    }
 }
 

+ 24 - 4
fiveep-controller/src/main/java/com/bizmatics/controller/web/DeviceController.java

@@ -1,21 +1,41 @@
 package com.bizmatics.controller.web;
 
 
+import com.bizmatics.common.core.bean.ApiResult;
+import com.bizmatics.service.AlarmPowerService;
+import com.bizmatics.service.DeviceService;
+import com.bizmatics.service.vo.ApCountVO;
+import com.bizmatics.service.vo.SiteCountVO;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
 
 import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Date;
 
 /**
- * <p>
- *  前端控制器
- * </p>
+ * 设备
  *
  * @author ya
  * @since 2021-07-07
  */
-@Controller
+@RestController
 @RequestMapping("/device")
 public class DeviceController {
+    @Autowired
+    private DeviceService deviceService;
+
 
+    /**
+     * 查询设备总数
+     * @param startTime
+     * @param endTime
+     * @return
+     */
+    @RequestMapping("/count")
+    public ApiResult<SiteCountVO> count(Date startTime, Date endTime){
+        return ApiResult.success(deviceService.selectDeviceCount(startTime,endTime));
+    }
 }
 

+ 9 - 5
fiveep-controller/src/main/java/com/bizmatics/controller/web/DeviceStatusController.java

@@ -1,21 +1,25 @@
 package com.bizmatics.controller.web;
 
 
+import com.bizmatics.model.DeviceStatus;
+import com.bizmatics.service.DeviceStatusService;
+import org.checkerframework.checker.units.qual.A;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
 
 import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RestController;
 
 /**
- * <p>
- *  前端控制器
- * </p>
- *
+ * 设备状态
  * @author ya
  * @since 2021-07-07
  */
-@Controller
+@RestController
 @RequestMapping("/deviceStatus")
 public class DeviceStatusController {
 
+    @Autowired
+    private DeviceStatusService deviceStatusService;
 }
 

+ 35 - 4
fiveep-controller/src/main/java/com/bizmatics/controller/web/HtAnalogDataController.java

@@ -1,21 +1,52 @@
 package com.bizmatics.controller.web;
 
 
+import com.bizmatics.common.core.bean.ApiResult;
+import com.bizmatics.service.HtAnalogDataService;
+import com.bizmatics.service.vo.CommonIcoVO;
+import com.bizmatics.service.vo.HadCountVO;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
 
 import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Date;
+import java.util.List;
 
 /**
- * <p>
- *  前端控制器
- * </p>
+ * 历史消费组模拟量
  *
  * @author ya
  * @since 2021-07-07
  */
-@Controller
+@RestController
 @RequestMapping("/htAnalogData")
 public class HtAnalogDataController {
 
+    @Autowired
+    private HtAnalogDataService htAnalogDataService;
+
+
+
+    /**
+     * 日/月/年用电量
+     * @return
+     */
+    @RequestMapping("count")
+    public ApiResult<HadCountVO> count(){
+        return ApiResult.success(htAnalogDataService.selectCount());
+    }
+
+    /**
+     * 用电趋势图
+     * @param startTime
+     * @return
+     */
+    @RequestMapping("trendByDate")
+    public ApiResult<List<CommonIcoVO>> getTrendByDate(@RequestParam Date startTime){
+        return ApiResult.success(htAnalogDataService.selectTrendByDate(startTime));
+    }
 }
 

+ 9 - 4
fiveep-controller/src/main/java/com/bizmatics/controller/web/HtSwitchDataController.java

@@ -1,21 +1,26 @@
 package com.bizmatics.controller.web;
 
 
+import com.bizmatics.service.HtSwitchDataService;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
 
 import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RestController;
 
 /**
- * <p>
- *  前端控制器
- * </p>
  *
+ * 历史消费组开关
  * @author ya
  * @since 2021-07-07
  */
-@Controller
+@RestController
 @RequestMapping("/htSwitchData")
 public class HtSwitchDataController {
 
+
+    @Autowired
+    private HtSwitchDataService htSwitchDataService;
+
 }
 

+ 0 - 129
fiveep-controller/src/main/java/com/bizmatics/controller/web/MybatisGeneratorUtils.java

@@ -1,129 +0,0 @@
-package com.bizmatics.controller.web;
-
-import com.baomidou.mybatisplus.core.toolkit.StringPool;
-import com.baomidou.mybatisplus.generator.AutoGenerator;
-import com.baomidou.mybatisplus.generator.InjectionConfig;
-import com.baomidou.mybatisplus.generator.config.*;
-import com.baomidou.mybatisplus.generator.config.po.TableInfo;
-import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @author yq
- * @date 2021/7/6 11:42
- */
-public class MybatisGeneratorUtils {
-    public static void main(String[] args) {
-        //修改成自己的模块名称
-        String[] models = {"fiveep-controller", "fiveep-service", "fiveep-model", "fiveep-persistence"};
-        for (String model : models) {
-            shell(model);
-        }
-    }
-
-    private static void shell(String model) {
-
-        AutoGenerator mpg = new AutoGenerator();
-        //1、全局配置
-        GlobalConfig gc = new GlobalConfig();
-        File file = new File(model);
-        String path = file.getAbsolutePath();
-        gc.setOutputDir(path + "/src/main/java");  //生成路径(一般都是生成在此项目的src/main/java下面)
-        //修改为自己的名字
-        gc.setAuthor("ya"); //设置作者
-        gc.setOpen(false);
-        gc.setFileOverride(true); //第二次生成会把第一次生成的覆盖掉
-        gc.setServiceName("%sService"); //生成的service接口名字首字母是否为I,这样设置就没有
-        gc.setBaseResultMap(true); //生成resultMap
-        mpg.setGlobalConfig(gc);
-
-        //2、数据源配置
-        //修改数据源
-        DataSourceConfig dsc = new DataSourceConfig();
-        dsc.setUrl("jdbc:mysql://124.71.145.219:3306/smart_electricity?useUnicode=true&serverTimezone=GMT&useSSL=false&characterEncoding=utf8");
-        dsc.setDriverName("com.mysql.jdbc.Driver");
-        dsc.setUsername("root");
-        dsc.setPassword("Wjzn2021Db");
-        mpg.setDataSource(dsc);
-
-        // 3、包配置
-        PackageConfig pc = new PackageConfig();
-        pc.setParent("com.bizmatics");
-        pc.setController("controller.web");
-        pc.setEntity("model");
-        pc.setMapper("persistence.mapper");
-        pc.setService("service");
-        pc.setServiceImpl("service.impl");
-        //pc.setModuleName("test");
-        mpg.setPackageInfo(pc);
-
-        // 4、策略配置
-        StrategyConfig strategy = new StrategyConfig();
-        strategy.setNaming(NamingStrategy.underline_to_camel);
-        strategy.setColumnNaming(NamingStrategy.underline_to_camel);
-        strategy.setSuperMapperClass("com.bizmatics.common.mvc.base.CrudMapper");
-        strategy.setSuperServiceClass("com.bizmatics.common.mvc.base.CrudService");
-        strategy.setSuperServiceImplClass("com.bizmatics.common.mvc.base.AbstractCrudService");
-        // strategy.setTablePrefix("t_"); // 表名前缀
-        strategy.setEntityLombokModel(true); //使用lombok
-        //修改自己想要生成的表
-//        strategy.setInclude("test");  // 逆向工程使用的表   如果要生成多个,这里可以传入String[]
-        mpg.setStrategy(strategy);
-
-        // 关闭默认 xml 生成,调整生成 至 根目录
-        //修改对应的模块名称
-        TemplateConfig tc = new TemplateConfig();
-        if ("fiveep-persistence".equals(model)) {
-            tc.setController(null);
-            tc.setEntity(null);
-            tc.setService(null);
-            tc.setServiceImpl(null);
-            // 自定义配置
-            InjectionConfig cfg = new InjectionConfig() {
-                @Override
-                public void initMap() {
-                    // to do nothing
-                }
-            };
-            //如果模板引擎是 velocity
-            String templatePath = "/templates/mapper.xml.vm";
-            // 自定义输出配置
-            List<FileOutConfig> focList = new ArrayList<>();
-            // 自定义配置会被优先输出
-            focList.add(new FileOutConfig(templatePath) {
-                @Override
-                public String outputFile(TableInfo tableInfo) {
-                    // 自定义输出文件名 , 如果你 Entity 设置了前后缀、此处注意 xml 的名称会跟着发生变化!!
-                    return path + "/src/main/resources/mapper/mysql/" + "/"
-                            + tableInfo.getEntityName() + "Mapper" + StringPool.DOT_XML;
-                }
-            });
-            cfg.setFileOutConfigList(focList);
-            mpg.setCfg(cfg);
-            tc.setXml(null);
-        } else if ("fiveep-model".equals(model)) {
-            tc.setController(null);
-            tc.setService(null);
-            tc.setServiceImpl(null);
-            tc.setMapper(null);
-            tc.setXml(null);
-        } else if ("fiveep-service".equals(model)) {
-            tc.setController(null);
-            tc.setMapper(null);
-            tc.setXml(null);
-            tc.setEntity(null);
-        } else if ("fiveep-controller".equals(model)) {
-            tc.setMapper(null);
-            tc.setXml(null);
-            tc.setService(null);
-            tc.setServiceImpl(null);
-            tc.setEntity(null);
-        }
-        mpg.setTemplate(tc);
-        //5、执行
-        mpg.execute();
-    }
-}

+ 20 - 4
fiveep-controller/src/main/java/com/bizmatics/controller/web/PersonnelController.java

@@ -1,21 +1,37 @@
 package com.bizmatics.controller.web;
 
 
+import com.bizmatics.common.core.bean.ApiResult;
+import com.bizmatics.service.PersonnelService;
+import com.bizmatics.service.vo.PerCountVO;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
 
 import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RestController;
 
 /**
- * <p>
- *  前端控制器
- * </p>
+ * 人员信息
  *
  * @author ya
  * @since 2021-07-07
  */
-@Controller
+@RestController
 @RequestMapping("/personnel")
 public class PersonnelController {
 
+
+    @Autowired
+    private PersonnelService personnelService;
+
+
+    /**
+     * 查询运维人员
+     * @return
+     */
+    @RequestMapping("count")
+    public ApiResult<PerCountVO> getCount(){
+        return ApiResult.success(personnelService.selectCount());
+    }
 }
 

+ 9 - 4
fiveep-controller/src/main/java/com/bizmatics/controller/web/RouteController.java

@@ -1,21 +1,26 @@
 package com.bizmatics.controller.web;
 
 
+import com.bizmatics.service.RouteService;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
 
 import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RestController;
 
 /**
- * <p>
- *  前端控制器
- * </p>
+ * 线路表
  *
  * @author ya
  * @since 2021-07-07
  */
-@Controller
+@RestController
 @RequestMapping("/route")
 public class RouteController {
 
+
+    @Autowired
+    private RouteService routeService;
+
 }
 

+ 19 - 4
fiveep-controller/src/main/java/com/bizmatics/controller/web/RtAnalogDataController.java

@@ -1,21 +1,36 @@
 package com.bizmatics.controller.web;
 
 
+import com.bizmatics.common.core.bean.ApiResult;
+import com.bizmatics.service.RtAnalogDataService;
+import com.bizmatics.service.vo.RadCountVO;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
 
 import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RestController;
 
 /**
- * <p>
- *  前端控制器
- * </p>
+ * 实时消费组模拟量
  *
  * @author ya
  * @since 2021-07-07
  */
-@Controller
+@RestController
 @RequestMapping("/rtAnalogData")
 public class RtAnalogDataController {
 
+
+    @Autowired
+    private RtAnalogDataService rtAnalogDataService;
+
+    /**
+     * 汇总
+     * @return
+     */
+    @RequestMapping("count")
+    public ApiResult<RadCountVO> getCount(){
+        return ApiResult.success(rtAnalogDataService.selectCount());
+    }
 }
 

+ 8 - 4
fiveep-controller/src/main/java/com/bizmatics/controller/web/RtSwitchDataController.java

@@ -1,21 +1,25 @@
 package com.bizmatics.controller.web;
 
 
+import com.bizmatics.service.RtSwitchDataService;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
 
 import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RestController;
 
 /**
- * <p>
- *  前端控制器
- * </p>
+ * 实时消费组开关
  *
  * @author ya
  * @since 2021-07-07
  */
-@Controller
+@RestController
 @RequestMapping("/rtSwitchData")
 public class RtSwitchDataController {
 
+    @Autowired
+    private RtSwitchDataService rtSwitchDataService;
+
 }
 

+ 35 - 4
fiveep-controller/src/main/java/com/bizmatics/controller/web/SiteController.java

@@ -1,21 +1,52 @@
 package com.bizmatics.controller.web;
 
 
+import com.bizmatics.common.core.bean.ApiResult;
+import com.bizmatics.service.SiteService;
+import com.bizmatics.service.vo.SiteCountVO;
+import com.bizmatics.service.vo.SiteVO;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
 
 import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
 
 /**
- * <p>
- *  前端控制器
- * </p>
+ * 站点
  *
  * @author ya
  * @since 2021-07-07
  */
-@Controller
+@RestController
 @RequestMapping("/site")
 public class SiteController {
 
+
+    @Autowired
+    private SiteService siteService;
+
+    /**
+     * 查看不同状态的站点数量
+     * @return
+     */
+    @RequestMapping("count")
+    public ApiResult<SiteCountVO> getCount(){
+        return ApiResult.success(siteService.selectCount());
+    }
+
+
+    /**
+     * 查看站点列表
+     * @param name
+     * @return
+     */
+    @RequestMapping("list")
+    public ApiResult<List<SiteVO>> list(@RequestParam(required = false) String name){
+        return ApiResult.success(siteService.list(name));
+    }
+
 }
 

+ 8 - 5
fiveep-controller/src/main/java/com/bizmatics/controller/web/SitedtlController.java

@@ -1,21 +1,24 @@
 package com.bizmatics.controller.web;
 
 
+import com.bizmatics.service.SitedtlService;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
 
 import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RestController;
 
 /**
- * <p>
- *  前端控制器
- * </p>
- *
+ * 站点详情
  * @author ya
  * @since 2021-07-07
  */
-@Controller
+@RestController
 @RequestMapping("/sitedtl")
 public class SitedtlController {
 
+
+    @Autowired
+    private SitedtlService sitedtlService;
 }
 

+ 0 - 16
fiveep-controller/src/main/java/com/bizmatics/controller/web/TestController.java

@@ -1,16 +0,0 @@
-package com.bizmatics.controller.web;
-
-import org.springframework.web.bind.annotation.RequestMapping;
-
-/**
- * @author yq
- * @date 2021/7/5 18:12
- */
-@RequestMapping
-public class TestController {
-
-    @RequestMapping("test")
-    public String test(){
-        return "!11";
-    }
-}

+ 7 - 4
fiveep-controller/src/main/java/com/bizmatics/controller/web/UserSiteController.java

@@ -1,21 +1,24 @@
 package com.bizmatics.controller.web;
 
 
+import com.bizmatics.service.UserSiteService;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
 
 import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RestController;
 
 /**
- * <p>
- *  前端控制器
- * </p>
+ * 用户站点信息
  *
  * @author ya
  * @since 2021-07-07
  */
-@Controller
+@RestController
 @RequestMapping("/userSite")
 public class UserSiteController {
 
+    @Autowired
+    private UserSiteService userSiteService;
 }
 

+ 2 - 1
fiveep-controller/src/main/java/com/bizmatics/controller/web/WcAccessTokenController.java

@@ -4,6 +4,7 @@ package com.bizmatics.controller.web;
 import org.springframework.web.bind.annotation.RequestMapping;
 
 import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RestController;
 
 /**
  * <p>
@@ -13,7 +14,7 @@ import org.springframework.stereotype.Controller;
  * @author ya
  * @since 2021-07-07
  */
-@Controller
+@RestController
 @RequestMapping("/wcAccessToken")
 public class WcAccessTokenController {
 

+ 2 - 1
fiveep-controller/src/main/java/com/bizmatics/controller/web/WcBlackoutPlanController.java

@@ -4,6 +4,7 @@ package com.bizmatics.controller.web;
 import org.springframework.web.bind.annotation.RequestMapping;
 
 import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RestController;
 
 /**
  * <p>
@@ -13,7 +14,7 @@ import org.springframework.stereotype.Controller;
  * @author ya
  * @since 2021-07-07
  */
-@Controller
+@RestController
 @RequestMapping("/wcBlackoutPlan")
 public class WcBlackoutPlanController {
 

+ 2 - 1
fiveep-controller/src/main/java/com/bizmatics/controller/web/WcKeySecretController.java

@@ -4,6 +4,7 @@ package com.bizmatics.controller.web;
 import org.springframework.web.bind.annotation.RequestMapping;
 
 import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RestController;
 
 /**
  * <p>
@@ -13,7 +14,7 @@ import org.springframework.stereotype.Controller;
  * @author ya
  * @since 2021-07-07
  */
-@Controller
+@RestController
 @RequestMapping("/wcKeySecret")
 public class WcKeySecretController {
 

+ 2 - 1
fiveep-controller/src/main/java/com/bizmatics/controller/web/WcMeasTypeController.java

@@ -4,6 +4,7 @@ package com.bizmatics.controller.web;
 import org.springframework.web.bind.annotation.RequestMapping;
 
 import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RestController;
 
 /**
  * <p>
@@ -13,7 +14,7 @@ import org.springframework.stereotype.Controller;
  * @author ya
  * @since 2021-07-07
  */
-@Controller
+@RestController
 @RequestMapping("/wcMeasType")
 public class WcMeasTypeController {
 

+ 2 - 1
fiveep-controller/src/main/java/com/bizmatics/controller/web/WcUserController.java

@@ -4,6 +4,7 @@ package com.bizmatics.controller.web;
 import org.springframework.web.bind.annotation.RequestMapping;
 
 import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RestController;
 
 /**
  * <p>
@@ -13,7 +14,7 @@ import org.springframework.stereotype.Controller;
  * @author ya
  * @since 2021-07-07
  */
-@Controller
+@RestController
 @RequestMapping("/wcUser")
 public class WcUserController {
 

+ 2 - 1
fiveep-controller/src/main/java/com/bizmatics/controller/web/WcUserTokenController.java

@@ -4,6 +4,7 @@ package com.bizmatics.controller.web;
 import org.springframework.web.bind.annotation.RequestMapping;
 
 import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RestController;
 
 /**
  * <p>
@@ -13,7 +14,7 @@ import org.springframework.stereotype.Controller;
  * @author ya
  * @since 2021-07-07
  */
-@Controller
+@RestController
 @RequestMapping("/wcUserToken")
 public class WcUserTokenController {
 

+ 5 - 0
fiveep-service/src/main/java/com/bizmatics/service/HtAnalogDataService.java

@@ -25,6 +25,11 @@ public interface HtAnalogDataService extends CrudService<HtAnalogData> {
      */
     HadCountVO selectCount();
 
+    /**
+     * 用电趋势图
+     * @param startTime
+     * @return
+     */
     List<CommonIcoVO> selectTrendByDate(Date startTime);
 
 }

+ 5 - 0
fiveep-service/src/main/java/com/bizmatics/service/SiteService.java

@@ -25,6 +25,11 @@ public interface SiteService extends CrudService<Site> {
     SiteCountVO selectCount();
 
 
+    /**
+     * 查看站点列表
+     * @param name
+     * @return
+     */
     List<SiteVO> list(String name);
 
 }