mappers.SysParameterMapper.xml Maven / Gradle / Ivy
<?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.lframework.starter.mybatis.mappers.system.SysParameterMapper"> <resultMap id="SysParameter" type="com.lframework.starter.mybatis.entity.SysParameter"> <id column="id" property="id"/> <result column="pm_key" property="pmKey"/> <result column="pm_value" property="pmValue"/> <result column="description" property="description"/> <result column="create_by" property="createBy"/> <result column="create_time" property="createTime"/> <result column="update_by" property="updateBy"/> <result column="update_time" property="updateTime"/> </resultMap> <select id="query" resultMap="SysParameter"> <include refid="SysParameter_sql"/> <where> <if test="vo.pmKey != null and vo.pmKey != ''"> AND tb.pm_key = #{vo.pmKey} </if> <if test="vo.createTimeStart != null"> AND tb.create_time >= #{vo.createTimeStart} </if> <if test="vo.createTimeEnd != null"> <![CDATA[ AND tb.create_time <= #{vo.createTimeEnd} ]]> </if> </where> ORDER BY tb.create_time ASC </select> <sql id="SysParameter_sql"> SELECT tb.id, tb.pm_key, tb.pm_value, tb.description, tb.create_by, tb.create_time, tb.update_by, tb.update_time FROM sys_parameter AS tb </sql> </mapper>