iot绑定异常
This commit is contained in:
parent
7fdd39a617
commit
94a8511f95
|
|
@ -11,6 +11,7 @@ import com.bonus.sgzb.material.service.IotMachineService;
|
|||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
|
@ -53,7 +54,7 @@ public class IotMachineController extends BaseController {
|
|||
@PostMapping("/addOrUpdate")
|
||||
public AjaxResult addOrUpdate(@Validated @RequestBody IotDto iotDto) {
|
||||
log.info("添加或者修改设备传参:{}", iotDto);
|
||||
if (iotDto.getIotId() != null) {
|
||||
if (!StringUtils.isEmpty(iotDto.getIotId())) {
|
||||
return iotMachineService.update(iotDto);
|
||||
}
|
||||
return iotMachineService.add(iotDto);
|
||||
|
|
|
|||
Loading…
Reference in New Issue