移风店镇项目初始化
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.
 
 
 
 
 

34 lines
1.2 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.DimDateDao">
<select id="selectDimDate" resultType="com.epmet.dto.stats.DimDateDTO">
SELECT
*
FROM
`dim_date`
WHERE
del_flag = '0'
<if test="createdTime != null and createdTime.trim() != ''">
AND DATE_FORMAT(created_time, "%Y-%m-%d") = #{createdTime}
</if>
ORDER BY created_time DESC
</select>
<!--最新的按日维度-->
<select id="getLatestDimDate" resultType="com.epmet.dto.stats.DimDateDTO">
SELECT *
FROM dim_date
WHERE DEL_FLAG = 0
ORDER BY ID DESC
LIMIT 1
</select>
<insert id="insertOne" parameterType="com.epmet.entity.stats.DimDateEntity">
INSERT INTO dim_date
(ID, DATE_NAME, DAY_OF_WEEK, DAY_OF_WEEK_NAME, WEEK_ID, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME)
VALUES
(#{id}, #{dateName}, #{dayOfWeek}, #{dayOfWeekName}, #{weekId}, #{delFlag}, #{revision}, #{createdBy}, #{createdTime}, #{updatedBy}, #{updatedTime})
</insert>
</mapper>