| | |
| | | import com.sandu.common.domain.CommonPage; |
| | | import com.sandu.common.domain.ResponseVO; |
| | | import com.sandu.common.object.BaseConditionVO; |
| | | import com.sandu.common.security.annotation.AnonymousAccess; |
| | | import com.sandu.common.util.ResponseUtil; |
| | | import com.sandu.ximon.admin.param.LightControlParam; |
| | | import com.sandu.ximon.admin.param.LightPowerSettingParam; |
| | | import com.sandu.ximon.admin.param.LightRemarkParam; |
| | | import com.sandu.ximon.admin.security.PermissionConfig; |
| | | import com.sandu.ximon.admin.service.LightReportDataService; |
| | |
| | | return ResponseUtil.success(lightService.controlEnergySaving()); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/Energy") |
| | | @AnonymousAccess |
| | | public ResponseVO<Object> Energy() { |
| | | return ResponseUtil.success(lightService.controlEnergy()); |
| | | } |
| | | |
| | | // /** |
| | | // * 获取设备码 |
| | | // */ |
| | |
| | | * 设置功率 |
| | | */ |
| | | @PostMapping("/setPower/{power1}/{power2}") |
| | | public ResponseVO<Object> setPower(@RequestBody List<Long> ids, @PathVariable Integer power1,@PathVariable Integer power2) { |
| | | if(ids.isEmpty()||power1==null||power2==null){ |
| | | return ResponseUtil.fail("id为空或者功率为空"); |
| | | } |
| | | boolean resule= lightService.setPower(ids,power1,power2); |
| | | public ResponseVO<Object> setPower(@RequestBody LightPowerSettingParam lightPowerSettingParam) { |
| | | boolean resule= lightService.setPower(lightPowerSettingParam); |
| | | return ResponseUtil.success(resule); |
| | | } |
| | | } |