<?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.cyksj.mapper.InformationCategoryMapper">


    <select id="getInformationCategory" resultType="com.cyksj.model.entity.InformationCategory">
        select ic.* from information_category ic, information i where JSON_CONTAINS(i.category_ids, CONCAT('"',ic.id,'"')) = 1 GROUP BY id,sort_by order by sort_by
    </select>

</mapper>