<?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.zbkj.service.dao.HelpDao">

    <select id="getListHelp" resultType="com.zbkj.common.model.system.SystemHelpProblem">
        SELECT
            h.id,
            h.cid,
            c.`name`,
            h.title,
            h.synopsis,
            h.content,
            h.image,
            h.jump_url jumpUrl,
            h.share_title shareTitle,
            h.share_synopsis shareSynopsis,
            h.share_image shareImage,
            h.useful_num usefulNum,
            h.useless_num uselessNum,
            h.status,
            h.sort,
            h.create_time createTime
        FROM eb_system_help_problem h INNER JOIN eb_category c on h.cid = c.id and c.type = 9
        <if test="cid != null and cid != ''"> and c.id = #{cid} </if>
    </select>

</mapper>
