添加时间类型字典关联表

wushunjie
吴顺杰 10 months ago
parent 21a7b0c7e2
commit 91416135f7

@ -129,7 +129,7 @@ public class Event implements Serializable {
/**
*
*/
@ApiModelProperty(value = "事故类型")
@ApiModelProperty(value = "事故类型编码")
@Alias("AccidentType")
private String accidentType;
@ -140,6 +140,12 @@ public class Event implements Serializable {
@TableField(value = "ai_110_id")
private Long ai110Id;
/**
*
*/
@ApiModelProperty(value = "事故类型")
private String aiClass;
/**
*
*/

@ -0,0 +1,42 @@
package com.yingji.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* (AcceptClass)
*
* @author wu
* @since 2024-06-14 14:32:49
*/
@Data
@ApiModel("实体类")
@TableName(value = "event_class")
public class EventClass implements Serializable {
private static final long serialVersionUID = -34185186253758694L;
/**
* id
*/
@ApiModelProperty(value = "主键id")
private Long id;
/**
* AcceptType
*/
@ApiModelProperty(value = "事件类型编码")
private String acceptType;
/**
* ai_class
*/
@ApiModelProperty(value = "事件类型")
private String aiClass;
}

@ -0,0 +1,15 @@
package com.yingji.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yingji.entity.EventClass;
/**
* (AcceptClass)访
*
* @author wu
* @since 2024-06-14 14:32:49
*/
public interface EventClassMapper extends BaseMapper<EventClass> {
}

@ -0,0 +1,23 @@
package com.yingji.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yingji.entity.EventClass;
/**
* (AcceptClass)
*
* @author wu
* @since 2024-06-14 14:32:49
*/
public interface EventClassService extends IService<EventClass> {
/**
*
*
* @param accidentType
* @return
*/
EventClass findByAccidentType(String accidentType);
}

File diff suppressed because one or more lines are too long

@ -0,0 +1,32 @@
package com.yingji.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yingji.entity.EventClass;
import com.yingji.mapper.EventClassMapper;
import com.yingji.service.EventClassService;
import org.springframework.stereotype.Service;
/**
* (AcceptClass)
*
* @author wu
* @since 2024-06-14 14:32:49
*/
@Service("acceptClassService")
public class EventClassServiceImpl extends ServiceImpl<EventClassMapper, EventClass> implements EventClassService {
/**
*
*
* @param accidentType
* @return
*/
@Override
public EventClass findByAccidentType(String accidentType) {
QueryWrapper<EventClass> wrapper = new QueryWrapper<>();
wrapper.eq("accident_type", accidentType);
return baseMapper.selectOne(wrapper);
}
}
Loading…
Cancel
Save