Van333
2022-10-26 f7debb464a2d49b6e66b014cf2beef2a9c4bf98d
src/main/java/api/controller/SinglelampDataController.java
@@ -36,13 +36,13 @@
    @RequestMapping(value = "/list",method = RequestMethod.POST)
    public Msg list(@RequestBody ReqParams reqParams){
        rateLimiter.acquire(1);
        if (reqParams.getLimit()>50){
        if (reqParams.getLimit()>200){
            return Msg.error("limit exception!!!");
        }
        Long userId = accessService.getUserId(reqParams.getAccessToken());
        if(userId == null){
            return Msg.error("server exception!!!");
            return Msg.error("accessToken exception!!!");
        }
        reqParams.toString();
@@ -50,7 +50,9 @@
        Map data = new HashMap();
        data.put("total",info.getTotal());
        data.put("dataSize",info.getStartRow());
        data.put("lampSize",info.getEndRow());
        data.put("totalPage",Math.ceil(info.getStartRow()*1.0/reqParams.getLimit()));
        data.put("list",info.getList());
        return Msg.ok().put("data",data);
@@ -65,7 +67,7 @@
        Long userId = accessService.getUserId(reqParams.getAccessToken());
        if(userId == null){
            return Msg.error("server exception!!!");
            return Msg.error("accessToken exception!!!");
        }
        PageInfo<SinglelampDataEntity> info = singlelampDataServer.selectByStreetlightId(reqParams);