提交 4f080599 authored 作者: linzhenjie's avatar linzhenjie

车门钥匙bug修复

上级 e928e6ba
...@@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.*; ...@@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.*;
import tech.glinfo.enbao.common.annotation.ApiLog; import tech.glinfo.enbao.common.annotation.ApiLog;
import tech.glinfo.enbao.common.annotation.Login; import tech.glinfo.enbao.common.annotation.Login;
import tech.glinfo.enbao.common.utils.MapUtils;
import tech.glinfo.enbao.common.validator.ValidatorUtils; import tech.glinfo.enbao.common.validator.ValidatorUtils;
import tech.glinfo.enbao.modules.sh.entity.ShCarLockEntity; import tech.glinfo.enbao.modules.sh.entity.ShCarLockEntity;
import tech.glinfo.enbao.modules.sh.form.ShCarLockForm; import tech.glinfo.enbao.modules.sh.form.ShCarLockForm;
...@@ -73,8 +74,10 @@ public class ShCarLockController { ...@@ -73,8 +74,10 @@ public class ShCarLockController {
@ApiLog("删除") @ApiLog("删除")
public R delete(@RequestBody Map<String, Object> params){ public R delete(@RequestBody Map<String, Object> params){
Integer id = (Integer) params.get("id"); Integer id = (Integer) params.get("id");
boolean flag = shCarLockService.removeById(id); Integer deviceId = (Integer) params.get("deviceId");
MapUtils map = new MapUtils().put("id", id).put("device_id", deviceId);
boolean flag = shCarLockService.removeByMap(map);
// boolean flag = shCarLockService.removeById(id);
return flag ? R.ok() : R.error("删除失败"); return flag ? R.ok() : R.error("删除失败");
} }
} }
...@@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModelProperty; ...@@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
/** /**
* @author lyt * @author lyt
...@@ -13,7 +14,7 @@ import javax.validation.constraints.NotBlank; ...@@ -13,7 +14,7 @@ import javax.validation.constraints.NotBlank;
public class ShCarLockForm { public class ShCarLockForm {
@ApiModelProperty(value = "设备ID") @ApiModelProperty(value = "设备ID")
@NotBlank(message="设备不能为空") @NotNull(message="设备不能为空")
private Integer deviceId; private Integer deviceId;
@ApiModelProperty(value = "名称") @ApiModelProperty(value = "名称")
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论