<?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.vci.ubcs.system.mapper.CombinationMapper">
|
|
<resultMap type="com.vci.ubcs.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>
|
|
<select id="queryRegex" resultType="java.lang.String">
|
SELECT REPLACE(listagg(psc.REGEX,'],') within group ( order by psc.REGEX) || ']','],[','') FROM PL_SYS_COMBINATION psc
|
WHERE psc.ID IN (
|
<foreach collection="combinationIds" item="id" separator=",">
|
#{id}
|
</foreach>
|
)
|
</select>
|
|
<select id="queryRegexList" resultType="java.lang.String">
|
SELECT concat(psc.REGEX,']{1,}') from PL_SYS_COMBINATION psc
|
WHERE psc.ID IN (
|
<foreach collection="combinationIds" item="id" separator=",">
|
#{id}
|
</foreach>
|
)
|
</select>
|
|
</mapper>
|