日照智慧社区接口服务
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.
 
 
 
 
 

58 lines
2.0 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.MemoDifficultyDao">
<select id="getPage" resultType="com.epmet.dto.MemoDifficultyDTO">
SELECT
md.id,
md.customer_id,
md.content,
md.resolve_way,
md.remark,
md.scheduled_time,
md.created_time,
ma.remind_time
FROM
memo_difficulty md
INNER JOIN memo_attr ma ON md.id = ma.id and ma.del_flag = '0'
WHERE
md.del_flag = '0'
AND md.created_by = #{userId}
<if test='null != content and "" != content'>
AND md.content LIKE concat('%', #{content}, '%')
</if>
<if test='null != scheduledStartTime and "" != scheduledStartTime'>
AND DATE_FORMAT(md.scheduled_time, "%Y-%m-%d") &gt;= #{scheduledStartTime}
</if>
<if test='null != scheduledEndTime and "" != scheduledEndTime'>
AND DATE_FORMAT(md.scheduled_time, "%Y-%m-%d") &lt;= #{scheduledEndTime}
</if>
<if test='null != startTime and "" != startTime'>
AND DATE_FORMAT(md.created_time, "%Y-%m-%d") &gt;= #{startTime}
</if>
<if test='null != endTime and "" != endTime'>
AND DATE_FORMAT(md.created_time, "%Y-%m-%d") &lt;= #{endTime}
</if>
ORDER BY md.created_time DESC
</select>
<select id="selectByDifficutyId" resultType="com.epmet.dto.form.AddMemoDifficultyFromDTO">
SELECT
md.id,
md.customer_id,
md.content,
md.resolve_way,
md.remark,
md.scheduled_time,
md.created_time,
ma.remind_time
FROM
memo_difficulty md
INNER JOIN memo_attr ma ON md.id = ma.id and ma.del_flag = '0'
WHERE
md.del_flag = '0'
AND md.id = #{id}
</select>
</mapper>