<?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.StrategyMapper">
|
|
<resultMap type="org.springblade.system.entity.Strategy" id="StrategyMap">
|
<result property="id" column="ID" jdbcType="VARCHAR"/>
|
<result property="strategyName" column="STRATEGY_NAME" jdbcType="VARCHAR"/>
|
<result property="minPwdLen" column="MIN_PWD_LEN" jdbcType="VARCHAR"/>
|
<result property="maxPwdLen" column="MAX_PWD_LEN" jdbcType="VARCHAR"/>
|
<result property="combinationIds" column="COMBINATION " jdbcType="VARCHAR"/>
|
<result property="requiredType" column="REQUIRED_TYPE" jdbcType="VARCHAR"/>
|
<result property="expirationTime" column="EXPIRATION_TIME" jdbcType="TIMESTAMP"/>
|
<result property="reminderTime" column="REMINDER_TIME" jdbcType="TIMESTAMP"/>
|
<result property="lockingNum" column="LOCKING_NUM" jdbcType="VARCHAR"/>
|
<result property="lockingTime" column="LOCKING_TIME" jdbcType="TIMESTAMP"/>
|
<result property="desc" column="DESC" jdbcType="VARCHAR"/>
|
<result property="isDefault" column="IS_DEFAULT" jdbcType="VARCHAR"/>
|
<result property="createTime" column="CREATE_TIME" jdbcType="TIMESTAMP"/>
|
<result property="createUser" column="CREATE_USER" jdbcType="TIMESTAMP"/>
|
<result property="updateTime" column="UPDATE_TIME" jdbcType="TIMESTAMP"/>
|
<result property="updateUser" column="UPDATE_USER" jdbcType="TIMESTAMP"/>
|
<result property="combinationNames" column="COMBINATIONNAMES"/>
|
</resultMap>
|
|
<!--查询单个-->
|
<select id="queryById" resultMap="StrategyMap">
|
select
|
ID, STRATEGY_NAME, MIN_PWD_LEN, MAX_PWD_LEN, COMBINATION , REQUIRED_TYPE, EXPIRATION_TIME, REMINDER_TIME, LOCKING_NUM, LOCKING_TIME, DESC, IS_DEFAULT, CREATE_DATE, CREATE_USER, UPDATE_DATE, UPDATE_USER
|
from PL_SYS_STRATEGY
|
where ID = #{id}
|
</select>
|
|
<!--查询指定行数据-->
|
<select id="queryAllByPage" resultMap="StrategyMap">
|
select pss.*,
|
(select WM_CONCAT(psc.NAME)
|
from PL_SYS_COMBINATION psc
|
where instr(pss.COMBINATION_IDS,psc.ID) > 0) COMBINATIONNAMES
|
from PL_SYS_STRATEGY pss
|
</select>
|
|
<!--统计总行数-->
|
<select id="count" resultType="java.lang.Long">
|
select count(1)
|
from PL_SYS_STRATEGY
|
<where>
|
<if test="id != null and id != ''">
|
and ID = #{id}
|
</if>
|
<if test="strategyName != null and strategyName != ''">
|
and STRATEGY_NAME = #{strategyName}
|
</if>
|
<if test="minPwdLen != null and minPwdLen != ''">
|
and MIN_PWD_LEN = #{minPwdLen}
|
</if>
|
<if test="maxPwdLen != null and maxPwdLen != ''">
|
and MAX_PWD_LEN = #{maxPwdLen}
|
</if>
|
<if test="combination != null and combination != ''">
|
and COMBINATION = #{combination }
|
</if>
|
<if test="requiredType != null and requiredType != ''">
|
and REQUIRED_TYPE = #{requiredType}
|
</if>
|
<if test="expirationTime != null">
|
and EXPIRATION_TIME = #{expirationTime}
|
</if>
|
<if test="reminderTime != null">
|
and REMINDER_TIME = #{reminderTime}
|
</if>
|
<if test="lockingNum != null and lockingNum != ''">
|
and LOCKING_NUM = #{lockingNum}
|
</if>
|
<if test="lockingTime != null">
|
and LOCKING_TIME = #{lockingTime}
|
</if>
|
<if test="desc != null and desc != ''">
|
and DESC = #{desc}
|
</if>
|
<if test="isDefault != null and isDefault != ''">
|
and IS_DEFAULT = #{isDefault}
|
</if>
|
<if test="createDate != null">
|
and CREATE_DATE = #{createDate}
|
</if>
|
<if test="createUser != null">
|
and CREATE_USER = #{createUser}
|
</if>
|
<if test="updateDate != null">
|
and UPDATE_DATE = #{updateDate}
|
</if>
|
<if test="updateUser != null">
|
and UPDATE_USER = #{updateUser}
|
</if>
|
</where>
|
</select>
|
|
<!--通过主键修改数据-->
|
<!--<update id="update">
|
update PL_SYS_STRATEGY
|
<set>
|
<if test="strategyName != null and strategyName != ''">
|
STRATEGY_NAME = #{strategyName},
|
</if>
|
<if test="minPwdLen != null and minPwdLen != ''">
|
MIN_PWD_LEN = #{minPwdLen},
|
</if>
|
<if test="maxPwdLen != null and maxPwdLen != ''">
|
MAX_PWD_LEN = #{maxPwdLen},
|
</if>
|
<if test="combination != null and combination != ''">
|
COMBINATION = #{combination },
|
</if>
|
<if test="requiredType != null and requiredType != ''">
|
REQUIRED_TYPE = #{requiredType},
|
</if>
|
<if test="expirationTime != null">
|
EXPIRATION_TIME = #{expirationTime},
|
</if>
|
<if test="reminderTime != null">
|
REMINDER_TIME = #{reminderTime},
|
</if>
|
<if test="lockingNum != null and lockingNum != ''">
|
LOCKING_NUM = #{lockingNum},
|
</if>
|
<if test="lockingTime != null">
|
LOCKING_TIME = #{lockingTime},
|
</if>
|
<if test="desc != null and desc != ''">
|
DESC = #{desc},
|
</if>
|
<if test="isDefault != null and isDefault != ''">
|
IS_DEFAULT = #{isDefault},
|
</if>
|
<if test="createDate != null">
|
CREATE_DATE = #{createDate},
|
</if>
|
<if test="createUser != null">
|
CREATE_USER = #{createUser},
|
</if>
|
<if test="updateDate != null">
|
UPDATE_DATE = #{updateDate},
|
</if>
|
<if test="updateUser != null">
|
UPDATE_USER = #{updateUser},
|
</if>
|
</set>
|
where ID = #{id}
|
</update>
|
|
<!–通过主键删除–>
|
<delete id="deleteById">
|
delete from PL_SYS_STRATEGY where ID = #{id}
|
</delete>-->
|
|
</mapper>
|