增加报表标签关系表

This commit is contained in:
2023-04-19 15:50:12 +08:00
parent d283eb00ac
commit 6c76b8d576
4 changed files with 68 additions and 21 deletions
@@ -0,0 +1,18 @@
package com.adc.da.report.dao.mysql;
import com.adc.da.report.eo.ReportLabelEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @author ThinkBook
* @description 针对表【ts_report_label】的数据库操作Mapper
* @createDate 2023-04-19 11:28:48
* @Entity com.adc.da.report.eo.ReportLabelEntity
*/
public interface ReportLabelDao extends BaseMapper<ReportLabelEntity> {
}
@@ -0,0 +1,37 @@
package com.adc.da.report.eo;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
/**
* @author Caihaohan
* @TableName ts_report_label
*/
@TableName(value ="ts_report_label")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class ReportLabelEntity implements Serializable {
/**
*
*/
@TableId
private String reportId;
/**
*
*/
private String labelId;
@TableField(exist = false)
private static final long serialVersionUID = 1L;
}
@@ -0,0 +1,13 @@
package com.adc.da.report.service;
import com.adc.da.report.eo.ReportLabelEntity;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @author ThinkBook
* @description 针对表【ts_report_label】的数据库操作Service
* @createDate 2023-04-19 11:28:48
*/
public interface IReportLabelService extends IService<ReportLabelEntity> {
}
@@ -1,21 +0,0 @@
<?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.adc.da.report.dao.mysql.TreeLabelDao">
<resultMap id="BaseResultMap" type="com.adc.da.report.eo.TreeLabelEntity">
<id property="id" column="id" jdbcType="VARCHAR"/>
<result property="name" column="name" jdbcType="VARCHAR"/>
<result property="parentid" column="parentId" jdbcType="VARCHAR"/>
<result property="createdate" column="createDate" jdbcType="TIMESTAMP"/>
<result property="ordernum" column="orderNum" jdbcType="INTEGER"/>
<result property="delFlag" column="del_flag" jdbcType="TINYINT"/>
</resultMap>
<select id="getMaxNum" parameterType="string" resultType="int">
select max(t.orderNum)
from TS_TREE_LABEL t
where parentid = #{parentId}
</select>
</mapper>