Van333
2022-09-02 2234cee8e872fd7633b95eef5b0c760cbbb8eabf
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);