You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

39 lines
1.4 KiB

<?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.epmet.dao.stats.DimYearDao">
<resultMap type="com.epmet.entity.stats.DimYearEntity" id="dimYearMap">
<result property="id" column="ID"/>
<result property="yearName" column="YEAR_NAME"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
<insert id="insertOne">
INSERT INTO dim_year
(ID, YEAR_NAME, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME)
VALUES
(#{id}, #{yearName}, #{delFlag}, #{revision}, #{createdBy}, #{createdTime}, #{updatedBy}, #{updatedTime})
</insert>
<select id="getLatestDimEntity" resultType="com.epmet.entity.stats.DimYearEntity">
SELECT id,
year_name,
del_flag,
revision,
created_by,
created_time,
updated_by,
updated_time
FROM dim_year
ORDER BY CREATED_TIME DESC
LIMIT 1
</select>
</mapper>