Commit 10ef5484 authored by 李腾威's avatar 李腾威

关注电梯模块基本代码

parent 6d4b8777
...@@ -20,6 +20,9 @@ public class MaintainInfoDto extends BaseDto { ...@@ -20,6 +20,9 @@ public class MaintainInfoDto extends BaseDto {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "电梯id")
private String enevatorId;
@ApiModelProperty(value = "最新维保时间") @ApiModelProperty(value = "最新维保时间")
private Date maintainTime; private Date maintainTime;
......
...@@ -20,6 +20,8 @@ public class TestInfoDto extends BaseDto { ...@@ -20,6 +20,8 @@ public class TestInfoDto extends BaseDto {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "电梯id")
private String enevatorId;
@ApiModelProperty(value = "最新检验时间") @ApiModelProperty(value = "最新检验时间")
private Date testTime; private Date testTime;
......
...@@ -23,6 +23,12 @@ public class MaintainInfo extends BaseEntity { ...@@ -23,6 +23,12 @@ public class MaintainInfo extends BaseEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* 电梯id
*/
@TableField("enevator_id")
private String enevatorId;
/**
* 最新维保时间 * 最新维保时间
*/ */
@TableField("maintain_time") @TableField("maintain_time")
......
...@@ -23,6 +23,12 @@ public class TestInfo extends BaseEntity { ...@@ -23,6 +23,12 @@ public class TestInfo extends BaseEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* 电梯id
*/
@TableField("enevator_id")
private String enevatorId;
/**
* 最新检验时间 * 最新检验时间
*/ */
@TableField("test_time") @TableField("test_time")
......
...@@ -9,4 +9,6 @@ package com.yeejoin.amos.boot.module.tzs.api.service; ...@@ -9,4 +9,6 @@ package com.yeejoin.amos.boot.module.tzs.api.service;
*/ */
public interface IEnevatorRelationService { public interface IEnevatorRelationService {
} }
...@@ -11,7 +11,6 @@ import org.springframework.web.bind.annotation.DeleteMapping; ...@@ -11,7 +11,6 @@ import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
...@@ -52,29 +51,16 @@ public class EnevatorRelationController extends BaseController { ...@@ -52,29 +51,16 @@ public class EnevatorRelationController extends BaseController {
} }
/** /**
* 根据sequenceNbr更新 * 根据sequenceNbr删除 -- 取消关注
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PutMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新关注电梯关系表", notes = "根据sequenceNbr更新关注电梯关系表")
public ResponseModel<EnevatorRelationDto> updateBySequenceNbrEnevatorRelation(@RequestBody EnevatorRelationDto model,@PathVariable(value = "sequenceNbr") Long sequenceNbr) {
model.setSequenceNbr(sequenceNbr);
return ResponseHelper.buildResponse(enevatorRelationServiceImpl.updateWithModel(model));
}
/**
* 根据sequenceNbr删除
* *
* @param sequenceNbr 主键 * @param sequenceNbr 主键
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@DeleteMapping(value = "/{sequenceNbr}") @DeleteMapping(value = "/{openId}/{enevatorId}")
@ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除关注电梯关系表", notes = "根据sequenceNbr删除关注电梯关系表") @ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除关注电梯关系表", notes = "根据sequenceNbr删除关注电梯关系表")
public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request, @PathVariable(value = "sequenceNbr") Long sequenceNbr){ public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request, @PathVariable(value = "openId") Long openId,
@PathVariable(value = "enevatorId") String sequenceNbr){
return ResponseHelper.buildResponse(enevatorRelationServiceImpl.removeById(sequenceNbr)); return ResponseHelper.buildResponse(enevatorRelationServiceImpl.removeById(sequenceNbr));
} }
......
...@@ -30,4 +30,5 @@ public class EnevatorRelationServiceImpl extends BaseService<EnevatorRelationDto ...@@ -30,4 +30,5 @@ public class EnevatorRelationServiceImpl extends BaseService<EnevatorRelationDto
public List<EnevatorRelationDto> queryForEnevatorRelationList() { public List<EnevatorRelationDto> queryForEnevatorRelationList() {
return this.queryForList("" , false); return this.queryForList("" , false);
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment