BatteryController.java
949 Bytes
package cn.com.glsx.stdinterface.modules.controller;
import cn.com.glsx.stdinterface.api.BatteryClient;
import cn.com.glsx.stdinterface.dto.DevicePowerDTO;
import cn.com.glsx.stdinterface.modules.service.BatteryService;
import com.glsx.plat.core.web.R;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* @author xiangyanlin
* @date 2022/4/12
*/
@RestController
@RequestMapping("/battery")
public class BatteryController implements BatteryClient {
@Resource
private BatteryService batteryService;
@PostMapping("/save")
@Override
public R saveBatteryInfo(@RequestBody DevicePowerDTO devicePowerDTO) {
batteryService.saveBatteryInfo(devicePowerDTO);
return R.ok();
}
}