This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
galaxy-k18-galaxy-service/src/main/java/com/nis/web/dao/DfKeyMailAddDao.xml

45 lines
1.6 KiB
XML
Raw Normal View History

2017-12-19 14:55:52 +08:00
<?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.nis.web.dao.DfKeyMailAddDao">
<!-- DF_KEY_MAIL_ADDR -->
<sql id="dfKeyMailAddProperty">
ID,KEY_ID,MAIL_ADDR,OP_TIME
</sql>
<resultMap id="DfKeyMailAddMap" type="com.nis.domain.restful.DfKeyMailAdd">
<result column="id" jdbcType="INTEGER" property="id" />
<result column="key_id" jdbcType="INTEGER" property="keyId" />
<result column="mail_addr" jdbcType="VARCHAR" property="mailAddr" />
<result column="op_time" jdbcType="TIMESTAMP" property="opTime" />
</resultMap>
<select id="findDfKeyMailAddPage" parameterType="com.nis.domain.restful.DfKeyMailAdd"
resultMap="DfKeyMailAddMap">
SELECT
<choose>
<when test="page !=null and page.fields != null and page.fields != ''">
${page.fields}
</when>
<otherwise>
<include refid="dfKeyMailAddProperty"/>
</otherwise>
</choose>
FROM DF_KEY_MAIL_ADDR
<where>
<if test="optStartTime != null and optStartTime !=''">
<![CDATA[AND OP_TIME >= to_date(#{optStartTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="optEndTime != null and optEndTime !=''">
<![CDATA[AND OP_TIME < to_date(#{optEndTime},'yyyy-MM-dd HH24:mi:ss')]]>
</if>
<if test="searchId != null and searchId !=''">
AND id > ${searchId}
</if>
</where>
<choose>
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
</choose>
</select>
</mapper>