<?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.xxfc.platform.im.mapper.ImCommentMapper">
  <resultMap id="BaseResultMap" type="com.xxfc.platform.im.entity.ImComment">
    <!--
      WARNING - @mbg.generated
    -->
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="question_id" jdbcType="BIGINT" property="questionId" />
    <result column="content" jdbcType="VARCHAR" property="content" />
    <result column="time" jdbcType="BIGINT" property="time" />
    <result column="user_id" jdbcType="BIGINT" property="userId" />
    <result column="visible" jdbcType="INTEGER" property="visible" />
    <result column="visible_own" jdbcType="INTEGER" property="visibleOwn" />
    <result column="state" jdbcType="INTEGER" property="state" />
    <result column="is_del" jdbcType="BIT" property="isDel" />
  </resultMap>

  <select id="selectByQuestionId" resultType="com.xxfc.platform.im.entity.ImComment" parameterType="java.lang.Long">
        select * from im_comment
        where question_id = #{questionId} and is_del = 0
        order by time DESC
  </select>

</mapper>