kaiyu
2021-09-14 0aed1c0e6a91207c15fa34f49a7dfa9b6e2b64c5
screen-manage/src/main/java/com/moral/api/controller/DeviceController.java
@@ -6,6 +6,7 @@
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@@ -54,7 +55,7 @@
        String mac = device.getMac();
        Integer monitorPointId = device.getMonitorPointId();
        Integer versionId = device.getDeviceVersionId();
        if (name == null || mac == null || monitorPointId == null || versionId == null) {
        if (ObjectUtils.isEmpty(name) || ObjectUtils.isEmpty(mac) || ObjectUtils.isEmpty(monitorPointId) || ObjectUtils.isEmpty(versionId)) {
            return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(),
                    ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg());
        }