<?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.citygis.web.dataEncrypt.mapper.JiaMiMapper">


    <select id="handleEncryption" resultType="com.citygis.web.dataEncrypt.domain.ColumnInfo">
        select ${idColumn} as id, ${column} as value from ${tableName} where ${column} is not null and IS_ENCRYPT is null
    </select>


    <update id="updateEncryption">
        update ${tableName} set ${column} = #{encryString} , IS_ENCRYPT = 1 where ${idColumn} = #{id}
    </update>

    <select id="getData" parameterType="String" resultType="java.util.LinkedHashMap">
        select * from ${tableName} where HAMC_CODE is null or HAMC_CODE = ''
    </select>

    <update id="updateData" parameterType="string">
        update ${tableName} set HAMC_CODE = #{hmacText} where ${idColumn} = #{id}
    </update>

    <select id="getVerifyData" parameterType="String" resultType="java.util.LinkedHashMap">
        select * from ${tableName} where HAMC_CODE is not null
    </select>

</mapper>

