<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//oos.juyouhx.com//DTD Mapper 3.0//EN" "http://oss.juyouhx.com/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.scpyun.platform.standard.jilinsscgsdp.doorplateOwner" name="房主信息">
<select id="getDoorplateOwnerInfo" parameterType="map" resultType="map">
    select owner_name,
           owner_phone,
           cast(AES_DECRYPT(FROM_BASE64(owner_cardno),'*#id#') as char) as owner_cardno
    from jl_grid_doorplate
    where id = #{id}
</select>
<update id="updateDoorplateOwnerInfo" parameterType="map">
update jl_grid_doorplate
set
    owner_name = #{owner_name},
    owner_phone = #{owner_phone},
    owner_cardno = TO_BASE64(AES_ENCRYPT(#{owner_cardno},'*#id#'))
where id = #{id}
</update>
</mapper>