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