Commit f18a7fc6 authored by hanbing's avatar hanbing

[add] 快速特勤,删除特勤

parent b2599efc
...@@ -79,6 +79,17 @@ public class SpecialServiceController { ...@@ -79,6 +79,17 @@ public class SpecialServiceController {
return JsonViewObject.newInstance().success(listSpecialServicesVOList); return JsonViewObject.newInstance().success(listSpecialServicesVOList);
} }
@AspectLog(description = "删除特勤", operationType = BaseEnum.OperationTypeEnum.DELETE)
@ApiOperation(value = "删除特勤", notes = "删除特勤", response = JsonViewObject.class,
produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON)
@PostMapping(value = "/deleteSpecialService",
produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON)
public JsonViewObject deleteSpecialService(@RequestBody DeleteSpecialServiceBO deleteSpecialServiceBO) {
Integer id = deleteSpecialServiceBO.getId();
specialServiceService.deleteSpecialService(id);
return JsonViewObject.newInstance().success();
}
@AspectLog(description = "编辑特勤", operationType = BaseEnum.OperationTypeEnum.UPDATE) @AspectLog(description = "编辑特勤", operationType = BaseEnum.OperationTypeEnum.UPDATE)
@ApiOperation(value = "编辑特勤", notes = "编辑特勤", response = JsonViewObject.class, @ApiOperation(value = "编辑特勤", notes = "编辑特勤", response = JsonViewObject.class,
produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON) produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON)
...@@ -91,19 +102,6 @@ public class SpecialServiceController { ...@@ -91,19 +102,6 @@ public class SpecialServiceController {
return jsonViewObject.success(); return jsonViewObject.success();
} }
@AspectLog(description = "删除特勤", operationType = BaseEnum.OperationTypeEnum.DELETE)
@ApiOperation(value = "删除特勤", notes = "删除特勤", response = JsonViewObject.class,
produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON)
@PostMapping(value = "/deleteSpecialService",
produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON)
public JsonViewObject deleteSpecialService(@RequestBody DeleteSpecialServiceInVO deleteSpecialServiceInVO) {
Integer id = deleteSpecialServiceInVO.getId();
specialServiceService.deleteSpecialService(id);
JsonViewObject jsonViewObject = JsonViewObject.newInstance();
return jsonViewObject.success();
}
@AspectLog(description = "更新路口", operationType = BaseEnum.OperationTypeEnum.UPDATE) @AspectLog(description = "更新路口", operationType = BaseEnum.OperationTypeEnum.UPDATE)
@ApiOperation(value = "更新路口", notes = "更新路口", response = JsonViewObject.class, @ApiOperation(value = "更新路口", notes = "更新路口", response = JsonViewObject.class,
produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON) produces = MediaType.APPLICATION_JSON, consumes = MediaType.APPLICATION_JSON)
......
...@@ -45,8 +45,8 @@ public class ConsumerHandler implements KafkaListenerErrorHandler { ...@@ -45,8 +45,8 @@ public class ConsumerHandler implements KafkaListenerErrorHandler {
@KafkaListener(topics = {"CSMatchResultMiniData_0"}) @KafkaListener(topics = {"CSMatchResultMiniData_0"})
public void receiveCarInfoData(ConsumerRecord<Object, Object> record, Acknowledgment acknowledgment) { public void receiveCarInfoData(ConsumerRecord<Object, Object> record, Acknowledgment acknowledgment) {
try { try {
log.info("收到kafka消息,消息主题:" + record.topic()); log.debug("收到kafka消息,消息主题:" + record.topic());
log.info("收到kafka消息,消息内容:" + record.value()); log.debug("收到kafka消息,消息内容:" + record.value());
JNMatchResultMiniData jnMatchResultMiniData = JSONObject.parseObject((String)record.value(), JNMatchResultMiniData.class); JNMatchResultMiniData jnMatchResultMiniData = JSONObject.parseObject((String)record.value(), JNMatchResultMiniData.class);
carInfoMap.put(record.topic(), jnMatchResultMiniData); carInfoMap.put(record.topic(), jnMatchResultMiniData);
acknowledgment.acknowledge(); acknowledgment.acknowledge();
......
...@@ -169,6 +169,7 @@ public class SpecialServiceServiceImpl implements SpecialServiceService { ...@@ -169,6 +169,7 @@ public class SpecialServiceServiceImpl implements SpecialServiceService {
List<SpecialServicePO> specialServicePOList = specialServiceMapper.selectAll(); List<SpecialServicePO> specialServicePOList = specialServiceMapper.selectAll();
for (SpecialServicePO specialServicePO : specialServicePOList) { for (SpecialServicePO specialServicePO : specialServicePOList) {
ListSpecialServicesVO listSpecialServicesVO = new ListSpecialServicesVO(); ListSpecialServicesVO listSpecialServicesVO = new ListSpecialServicesVO();
listSpecialServicesVO.setId(specialServicePO.getId());
listSpecialServicesVO.setName(specialServicePO.getName()); listSpecialServicesVO.setName(specialServicePO.getName());
listSpecialServicesVO.setStatus(specialServicePO.getStatus()); listSpecialServicesVO.setStatus(specialServicePO.getStatus());
listSpecialServicesVO.setGmtModified(specialServicePO.getGmtModified()); listSpecialServicesVO.setGmtModified(specialServicePO.getGmtModified());
......
...@@ -9,8 +9,8 @@ import lombok.Data; ...@@ -9,8 +9,8 @@ import lombok.Data;
* @date 2022/11/8 13:18 * @date 2022/11/8 13:18
*/ */
@Data @Data
@ApiModel(value = "DeleteSpecialServiceInVO", description = "快速特勤-删除特勤输入参数") @ApiModel(value = "DeleteSpecialServiceBO", description = "快速特勤-删除特勤输入参数")
public class DeleteSpecialServiceInVO { public class DeleteSpecialServiceBO {
@ApiModelProperty(value = "特勤ID") @ApiModelProperty(value = "特勤ID")
Integer id; Integer id;
} }
...@@ -14,6 +14,8 @@ import java.util.Date; ...@@ -14,6 +14,8 @@ import java.util.Date;
@Data @Data
@ApiModel(value = "ListSpecialServicesVO", description = "查询快速特勤-特勤列表返回值") @ApiModel(value = "ListSpecialServicesVO", description = "查询快速特勤-特勤列表返回值")
public class ListSpecialServicesVO { public class ListSpecialServicesVO {
@ApiModelProperty(value = "特勤ID",notes = "")
private Integer id ;
@ApiModelProperty(value = "特勤名称",notes = "") @ApiModelProperty(value = "特勤名称",notes = "")
private String name ; private String name ;
@ApiModelProperty(value = "特勤状态:1执行;0未执行",notes = "") @ApiModelProperty(value = "特勤状态:1执行;0未执行",notes = "")
......
...@@ -42,8 +42,7 @@ ...@@ -42,8 +42,7 @@
</update> </update>
<update id="deleteSpecialService"> <update id="deleteSpecialService">
update t_special_service_info delete from t_special_service_info
set is_del = 1, length = 0, status = 0
where id = #{id} where id = #{id}
</update> </update>
...@@ -82,6 +81,7 @@ ...@@ -82,6 +81,7 @@
<select id="selectAll" resultType="net.wanji.web.po.SpecialServicePO"> <select id="selectAll" resultType="net.wanji.web.po.SpecialServicePO">
select <include refid="Base_Column_List"></include> select <include refid="Base_Column_List"></include>
from t_special_service_info from t_special_service_info
order by gmt_modified desc
</select> </select>
</mapper> </mapper>
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