<?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="cn.com.ctop.kuaishou.modules.live.mapper.LiveDataAccountsMapper">

    <update id="updateAdState">
        UPDATE ctop_live_data_ad
        SET state = 0
        WHERE account_id = #{accountId}
    </update>

    <update id="updateAgeState">
        UPDATE ctop_live_data_age
        SET state = 0
        WHERE account_id = #{accountId}
    </update>

    <update id="updateGenderState">
        UPDATE ctop_live_data_gender
        SET state = 0
        WHERE account_id = #{accountId}
    </update>

    <update id="updateMaterialState">
        UPDATE ctop_live_data_material
        SET state = 0
        WHERE account_id = #{accountId}
    </update>

    <update id="updatePriceState">
        UPDATE ctop_live_data_price
        SET state = 0
        WHERE account_id = #{accountId}
    </update>

    <update id="updateProvinceState">
        UPDATE ctop_live_data_province
        SET state = 0
        WHERE account_id = #{accountId}
    </update>

    <update id="updateTouchState">
        UPDATE ctop_live_data_touch
        SET state = 0
        WHERE account_id = #{accountId}
    </update>

    <select id="getTypeList" resultType="com.alibaba.fastjson.JSONObject">
        select type_code as 'code',type_name as 'name' from ctop_live_data_accounts_type where state = 1
    </select>
</mapper>