| | |
| | | import com.sandu.ximon.admin.service.MonitorService; |
| | | import com.sandu.ximon.admin.service.PoleService; |
| | | import com.sandu.ximon.dao.domain.Pole; |
| | | import com.sandu.ximon.dao.enums.MenuEnum; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | |
| | | @PostMapping("/list") |
| | | public ResponseVO<Object> listPole(BaseConditionVO baseConditionVO, @RequestBody PoleStatesParam param) { |
| | | if(!permissionConfig.check("路灯列表")){ |
| | | if(!permissionConfig.check(MenuEnum.POLE_LIST.getCode())){ |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize()); |
| | |
| | | return ResponseUtil.successPage(poles); |
| | | } |
| | | |
| | | /** |
| | | * 在线数量 |
| | | */ |
| | | @GetMapping("/online") |
| | | public ResponseVO<Object> online() { |
| | | return ResponseUtil.success(poleService.poleCount()); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 设置三元码 |