映射配置
This commit is contained in:
parent
02612ac95b
commit
b9a7fa2a7f
@ -26,23 +26,19 @@ public interface ExcelInfoMapper {
|
||||
/**
|
||||
* @return 返回全部的文件名称(去重)
|
||||
*/
|
||||
@Select("SELECT t1.* FROM excel_file_handling.excel_info t1 LEFT JOIN excel_file_handling.excel_info t2 ON t1.file_name = t2.file_name AND t1.id < t2.id WHERE t2.id")
|
||||
@Select("SELECT t1.* FROM excel_file_handling.excel_info t1 LEFT JOIN excel_file_handling.excel_info t2 ON t1.file_name = t2.file_name AND t1.id > t2.id WHERE t2.id IS NULL")
|
||||
List<ExcelInfoEntity> getAllExcelFilesName();
|
||||
|
||||
/**
|
||||
* @return 返回全部的文件名称(不去重)
|
||||
*/
|
||||
@Select("SELECT * FROM excel_file_handling.excel_info WHERE file_name = #{fileName}")
|
||||
List<ExcelInfoEntity> getAllExcelFilesNameNoRepetition(String fileName);
|
||||
|
||||
/**
|
||||
* @param id 主键
|
||||
* @param parentId 父级 ID
|
||||
* @param fileName 文件名称
|
||||
* @param sheetName sheet 名称
|
||||
* @param tableName 表名称
|
||||
* @param type 类型
|
||||
* @param createBy 创建者
|
||||
* @param createTime 创建时间
|
||||
* @param updateBy 更新者
|
||||
* @param updateTime 更新时间
|
||||
* @param excelInfoEntity excel
|
||||
* @return 是否插入成功
|
||||
*/
|
||||
@Insert("INSERT INTO excel_file_handling.excel_info (`id`,`parent_id`,`file_name`,`sheet_name`,`table_name`,`type`,`create_by`,`create_time`,`update_by`,`update_time`) VALUES (#{id}, #{parentId},#{fileName},#{sheetName},#{tableName},#{type},#{createBy}, #{createTime},#{updateBy},#{updateTime})")
|
||||
boolean insertExcelInfo(int id, int parentId, String fileName, String sheetName, String tableName, int type, String createBy, String createTime, String updateBy, String updateTime);
|
||||
@Insert("INSERT INTO excel_file_handling.excel_info (`parent_id`,`file_name`,`sheet_name`,`table_name`,`type`,`create_by`,`create_time`,`update_by`,`update_time`) VALUES (#{parentId}, #{fileName}, #{sheetName}, #{tableName}, #{type}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime})")
|
||||
boolean insertExcelInfo(ExcelInfoEntity excelInfoEntity);
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.wxjw.dal.pojo.entity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
/**
|
||||
@ -9,15 +10,25 @@ import org.springframework.lang.Nullable;
|
||||
* @author 筱锋xiao_lfeng
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class ExcelInfoEntity {
|
||||
private int id;
|
||||
private int parentId;
|
||||
@Nullable private String fileName;
|
||||
@Nullable private String sheetName;
|
||||
@Nullable private String tableName;
|
||||
@Nullable
|
||||
private Integer id;
|
||||
@Nullable
|
||||
private Integer parentId;
|
||||
@Nullable
|
||||
private String fileName;
|
||||
@Nullable
|
||||
private String sheetName;
|
||||
@Nullable
|
||||
private String tableName;
|
||||
private int type;
|
||||
@Nullable private String createBy;
|
||||
@Nullable private String createTime;
|
||||
@Nullable private String updateBy;
|
||||
@Nullable private String updateTime;
|
||||
@Nullable
|
||||
private String createBy;
|
||||
@Nullable
|
||||
private String createTime;
|
||||
@Nullable
|
||||
private String updateBy;
|
||||
@Nullable
|
||||
private String updateTime;
|
||||
}
|
||||
|
Reference in New Issue
Block a user