<?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.UserPwdstrategyMapper">
|
|
<resultMap type="org.springblade.system.entity.UserPwdstrategy" id="UserPwdstrategyMap">
|
<result property="id" column="ID" jdbcType="INTEGER"/>
|
<result property="userId" column="USER_ID" jdbcType="INTEGER"/>
|
<result property="pwdstrategyId" column="PWDSTRATEGY_ID" jdbcType="INTEGER"/>
|
</resultMap>
|
|
<!--查询单个-->
|
<select id="queryById" resultMap="UserPwdstrategyMap">
|
select ID,
|
USER_ID,
|
PWDSTRATEGY_ID
|
from PL_SYS_USER_PWDSTRATEGY
|
where ID = #{id}
|
</select>
|
|
<!--统计总行数-->
|
<select id="count" resultType="java.lang.Long">
|
select count(1)
|
from PL_SYS_USER_PWDSTRATEGY
|
<where>
|
<if test="id != null">
|
and ID = #{id}
|
</if>
|
<if test="userId != null">
|
and USER_ID = #{userId}
|
</if>
|
<if test="pwdstrategyId != null">
|
and PWDSTRATEGY_ID = #{pwdstrategyId}
|
</if>
|
</where>
|
</select>
|
|
<!--通过主键修改数据-->
|
<update id="update">
|
update PL_SYS_USER_PWDSTRATEGY
|
<set>
|
<if test="userId != null">
|
USER_ID = #{userId},
|
</if>
|
<if test="pwdstrategyId != null">
|
PWDSTRATEGY_ID = #{pwdstrategyId},
|
</if>
|
</set>
|
where ID = #{id}
|
</update>
|
|
<!--通过主键删除-->
|
<delete id="deleteById">
|
delete
|
from PL_SYS_USER_PWDSTRATEGY
|
where ID = #{id}
|
</delete>
|
|
</mapper>
|