1. 添加 kgPolicy表
parent
55eee1978d
commit
77697fc854
@ -0,0 +1,18 @@
|
||||
package com.supervision.mapper;
|
||||
|
||||
import com.supervision.model.KgPolicy;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @author Administrator
|
||||
* @description 针对表【kg_policy(政策法规表)】的数据库操作Mapper
|
||||
* @createDate 2024-04-16 13:05:24
|
||||
* @Entity com.supervision.model.KgPolicy
|
||||
*/
|
||||
public interface KgPolicyMapper extends BaseMapper<KgPolicy> {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,157 @@
|
||||
package com.supervision.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 政策法规表
|
||||
* @TableName kg_policy
|
||||
*/
|
||||
@TableName(value ="kg_policy")
|
||||
@Data
|
||||
public class KgPolicy implements Serializable {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 内容(带格式的富文本)
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 文件状态(1现行有效)
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 文号
|
||||
*/
|
||||
private String docNumber;
|
||||
|
||||
/**
|
||||
* 政策层级(1国家级;2省级;3市级;4县级)
|
||||
*/
|
||||
private Integer level;
|
||||
|
||||
/**
|
||||
* 主题(1养老退休;2人事人才;3就业创业;4社会保障;5劳动关系)
|
||||
*/
|
||||
private Integer subject;
|
||||
|
||||
/**
|
||||
* 政策类型(1意见;2方案;3通知;4规章;5政策解读)
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 浏览次数
|
||||
*/
|
||||
private Integer readCount;
|
||||
|
||||
/**
|
||||
* 收藏次数
|
||||
*/
|
||||
private Integer markCount;
|
||||
|
||||
/**
|
||||
* 发布日期
|
||||
*/
|
||||
private Date publishTime;
|
||||
|
||||
/**
|
||||
* 成文日期
|
||||
*/
|
||||
private Date writeTime;
|
||||
|
||||
/**
|
||||
* 发文机构
|
||||
*/
|
||||
private String publishDept;
|
||||
|
||||
@TableField(exist = false)
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (this == that) {
|
||||
return true;
|
||||
}
|
||||
if (that == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != that.getClass()) {
|
||||
return false;
|
||||
}
|
||||
KgPolicy other = (KgPolicy) that;
|
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
||||
&& (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle()))
|
||||
&& (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent()))
|
||||
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
|
||||
&& (this.getDocNumber() == null ? other.getDocNumber() == null : this.getDocNumber().equals(other.getDocNumber()))
|
||||
&& (this.getLevel() == null ? other.getLevel() == null : this.getLevel().equals(other.getLevel()))
|
||||
&& (this.getSubject() == null ? other.getSubject() == null : this.getSubject().equals(other.getSubject()))
|
||||
&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
|
||||
&& (this.getReadCount() == null ? other.getReadCount() == null : this.getReadCount().equals(other.getReadCount()))
|
||||
&& (this.getMarkCount() == null ? other.getMarkCount() == null : this.getMarkCount().equals(other.getMarkCount()))
|
||||
&& (this.getPublishTime() == null ? other.getPublishTime() == null : this.getPublishTime().equals(other.getPublishTime()))
|
||||
&& (this.getWriteTime() == null ? other.getWriteTime() == null : this.getWriteTime().equals(other.getWriteTime()))
|
||||
&& (this.getPublishDept() == null ? other.getPublishDept() == null : this.getPublishDept().equals(other.getPublishDept()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
|
||||
result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode());
|
||||
result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode());
|
||||
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
|
||||
result = prime * result + ((getDocNumber() == null) ? 0 : getDocNumber().hashCode());
|
||||
result = prime * result + ((getLevel() == null) ? 0 : getLevel().hashCode());
|
||||
result = prime * result + ((getSubject() == null) ? 0 : getSubject().hashCode());
|
||||
result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
|
||||
result = prime * result + ((getReadCount() == null) ? 0 : getReadCount().hashCode());
|
||||
result = prime * result + ((getMarkCount() == null) ? 0 : getMarkCount().hashCode());
|
||||
result = prime * result + ((getPublishTime() == null) ? 0 : getPublishTime().hashCode());
|
||||
result = prime * result + ((getWriteTime() == null) ? 0 : getWriteTime().hashCode());
|
||||
result = prime * result + ((getPublishDept() == null) ? 0 : getPublishDept().hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", id=").append(id);
|
||||
sb.append(", title=").append(title);
|
||||
sb.append(", content=").append(content);
|
||||
sb.append(", status=").append(status);
|
||||
sb.append(", docNumber=").append(docNumber);
|
||||
sb.append(", level=").append(level);
|
||||
sb.append(", subject=").append(subject);
|
||||
sb.append(", type=").append(type);
|
||||
sb.append(", readCount=").append(readCount);
|
||||
sb.append(", markCount=").append(markCount);
|
||||
sb.append(", publishTime=").append(publishTime);
|
||||
sb.append(", writeTime=").append(writeTime);
|
||||
sb.append(", publishDept=").append(publishDept);
|
||||
sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.supervision.service;
|
||||
|
||||
import com.supervision.model.KgPolicy;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @author Administrator
|
||||
* @description 针对表【kg_policy(政策法规表)】的数据库操作Service
|
||||
* @createDate 2024-04-16 13:05:24
|
||||
*/
|
||||
public interface KgPolicyService extends IService<KgPolicy> {
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.supervision.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.supervision.model.KgPolicy;
|
||||
import com.supervision.service.KgPolicyService;
|
||||
import com.supervision.mapper.KgPolicyMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author Administrator
|
||||
* @description 针对表【kg_policy(政策法规表)】的数据库操作Service实现
|
||||
* @createDate 2024-04-16 13:05:24
|
||||
*/
|
||||
@Service
|
||||
public class KgPolicyServiceImpl extends ServiceImpl<KgPolicyMapper, KgPolicy>
|
||||
implements KgPolicyService{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.supervision.mapper.KgPolicyMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.supervision.model.KgPolicy">
|
||||
<id property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="title" column="title" jdbcType="VARCHAR"/>
|
||||
<result property="content" column="content" jdbcType="VARCHAR"/>
|
||||
<result property="status" column="status" jdbcType="INTEGER"/>
|
||||
<result property="docNumber" column="doc_number" jdbcType="VARCHAR"/>
|
||||
<result property="level" column="level" jdbcType="INTEGER"/>
|
||||
<result property="subject" column="subject" jdbcType="INTEGER"/>
|
||||
<result property="type" column="type" jdbcType="INTEGER"/>
|
||||
<result property="readCount" column="read_count" jdbcType="INTEGER"/>
|
||||
<result property="markCount" column="mark_count" jdbcType="INTEGER"/>
|
||||
<result property="publishTime" column="publish_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="writeTime" column="write_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="publishDept" column="publish_dept" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,title,content,
|
||||
status,doc_number,level,
|
||||
subject,type,read_count,
|
||||
mark_count,publish_time,write_time,
|
||||
publish_dept
|
||||
</sql>
|
||||
</mapper>
|
Loading…
Reference in New Issue