<?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="org.springblade.system.mapper.CombinationMapper">
|
|
<resultMap type="org.springblade.system.entity.Combination" id="CombinationMap">
|
<result property="id" column="ID" jdbcType="VARCHAR"/>
|
<result property="name" column="NAME" jdbcType="VARCHAR"/>
|
<result property="desc" column="DESC" jdbcType="VARCHAR"/>
|
<result property="createtime" column="CREATETIME" jdbcType="TIMESTAMP"/>
|
<result property="createuser" column="CREATEUSER" jdbcType="VARCHAR"/>
|
<result property="updatetime" column="UPDATETIME" jdbcType="TIMESTAMP"/>
|
<result property="updateuser" column="UPDATEUSER" jdbcType="VARCHAR"/>
|
<result property="licensors" column="LICENSORS" jdbcType="VARCHAR"/>
|
</resultMap>
|
|
<!--查询单个-->
|
<select id="queryById" resultMap="CombinationMap">
|
select ID,
|
NAME, DESC, CREATETIME, CREATEUSER, UPDATETIME, UPDATEUSER, LICENSORS
|
from PL_SYS_COMBINATION
|
where ID = #{id}
|
</select>
|
|
<!--统计总行数-->
|
<select id="count" resultType="java.lang.Long">
|
select count(1)
|
from PL_SYS_COMBINATION
|
<where>
|
<if test="id != null and id != ''">
|
and ID = #{id}
|
</if>
|
<if test="name != null and name != ''">
|
and NAME = #{name}
|
</if>
|
<if test="desc != null and desc != ''">
|
and DESC = #{desc}
|
</if>
|
<if test="createtime != null">
|
and CREATETIME = #{createtime}
|
</if>
|
<if test="createuser != null and createuser != ''">
|
and CREATEUSER = #{createuser}
|
</if>
|
<if test="updatetime != null">
|
and UPDATETIME = #{updatetime}
|
</if>
|
<if test="updateuser != null and updateuser != ''">
|
and UPDATEUSER = #{updateuser}
|
</if>
|
<if test="licensors != null and licensors != ''">
|
and LICENSORS = #{licensors}
|
</if>
|
</where>
|
</select>
|
|
<!--分页查询-->
|
<select id="selectCombinationPage" resultMap="CombinationMap">
|
select
|
ID, NAME, DESC, CREATETIME, CREATEUSER, UPDATETIME, UPDATEUSER, LICENSORS
|
from PL_SYS_COMBINATION
|
<where>
|
<if test="id != null and id != ''">
|
and ID = #{id}
|
</if>
|
<if test="name != null and name != ''">
|
and NAME = #{name}
|
</if>
|
<if test="desc != null and desc != ''">
|
and DESC = #{desc}
|
</if>
|
<if test="createtime != null">
|
and CREATETIME = #{createtime}
|
</if>
|
<if test="createuser != null and createuser != ''">
|
and CREATEUSER = #{createuser}
|
</if>
|
<if test="updatetime != null">
|
and UPDATETIME = #{updatetime}
|
</if>
|
<if test="updateuser != null and updateuser != ''">
|
and UPDATEUSER = #{updateuser}
|
</if>
|
<if test="licensors != null and licensors != ''">
|
and LICENSORS = #{licensors}
|
</if>
|
</where>
|
limit #{pageable.offset}, #{pageable.pageSize}
|
</select>
|
|
</mapper>
|