<?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.chinaweal.aiccs.aiccs.punishment.mapper.TolockentlistMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.chinaweal.aiccs.aiccs.punishment.entity.Tolockentlist">
        <id column="tolockId" property="tolockId" />
        <result column="pripid" property="pripid" />
        <result column="uniscid" property="uniscid" />
        <result column="entName" property="entName" />
        <result column="regno" property="regno" />
        <result column="punishFrom" property="punishFrom" />
        <result column="regstate" property="regstate" />
        <result column="regstateCn" property="regstateCn" />
        <result column="punishInfoId" property="punishInfoId" />
        <result column="state" property="state" />
        <result column="insertTime" property="insertTime" />
        <result column="laupTime" property="laupTime" />
        <result column="department" property="department" />
        <result column="regorg" property="regorg" />
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        tolockId, pripid, uniscid, entName, regno, punishFrom, regstate, regstateCn, punishInfoId, state, insertTime, laupTime, department, regorg
    </sql>

    <select id="selectTolockentlistList" resultMap="BaseResultMap">
        select * from tolockentlist where state = '0'
    </select>

    <update id="updateByTolockId">
        update tolockentlist set state = '0' where tolockId = #{tolockId}
    </update>
</mapper>
