wlzboy
2026-01-24 2f09efc660bf2cc94cbc5291ad25ca06fc9bdadf
ruoyi-system/src/main/resources/mapper/system/TbHospDataMapper.xml
@@ -21,6 +21,7 @@
        <result property="hospIntroducerId"    column="hosp_introducer_id"   />
        <result property="hospIntroducerDate"  column="hosp_introducer_date" />
        <result property="hospLevel"           column="hosp_level"           />
        <result property="hospKeywords"        column="hosp_keywords"        />
        <result property="status"              column="status"               />
        <result property="remark"              column="remark"               />
        <result property="createBy"            column="create_by"            />
@@ -33,7 +34,7 @@
        select hosp_id, legacy_hosp_id, hosp_name, hosp_city_id, hosp_short, 
               hops_province, hops_city, hops_area, hosp_address, hosp_tel, 
               hosp_unit_id, hosp_state, hosp_oa_id, hosp_introducer_id, 
               hosp_introducer_date, hosp_level, status, remark,
               hosp_introducer_date, hosp_level, hosp_keywords, status, remark,
               create_by, create_time, update_by, update_time
        from tb_hosp_data
    </sql>
@@ -90,6 +91,7 @@
            <if test="hospIntroducerId != null">hosp_introducer_id,</if>
            <if test="hospIntroducerDate != null">hosp_introducer_date,</if>
            <if test="hospLevel != null">hosp_level,</if>
            <if test="hospKeywords != null">hosp_keywords,</if>
            <if test="status != null">status,</if>
            <if test="remark != null">remark,</if>
            <if test="createBy != null and createBy != ''">create_by,</if>
@@ -110,6 +112,7 @@
            <if test="hospIntroducerId != null">#{hospIntroducerId},</if>
            <if test="hospIntroducerDate != null">#{hospIntroducerDate},</if>
            <if test="hospLevel != null">#{hospLevel},</if>
            <if test="hospKeywords != null">#{hospKeywords},</if>
            <if test="status != null">#{status},</if>
            <if test="remark != null">#{remark},</if>
            <if test="createBy != null and createBy != ''">#{createBy},</if>
@@ -135,6 +138,7 @@
            <if test="hospIntroducerId != null">hosp_introducer_id = #{hospIntroducerId},</if>
            <if test="hospIntroducerDate != null">hosp_introducer_date = #{hospIntroducerDate},</if>
            <if test="hospLevel != null">hosp_level = #{hospLevel},</if>
            <if test="hospKeywords != null">hosp_keywords = #{hospKeywords},</if>
            <if test="status != null">status = #{status},</if>
            <if test="remark != null">remark = #{remark},</if>
            <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
@@ -154,4 +158,22 @@
        </foreach>
    </delete>
    <!-- 根据分词关键词预过滤医院数据 -->
    <select id="selectTbHospDataByKeywords" resultMap="TbHospDataResult">
        <include refid="selectTbHospDataVo"/>
        <where>
            <if test="status != null and status != ''">
                and status = #{status}
            </if>
            <if test="keywords != null and keywords.size() > 0">
                and (
                    <foreach collection="keywords" item="keyword" separator="OR">
                        hosp_keywords like concat('%', #{keyword}, '%')
                    </foreach>
                )
            </if>
        </where>
        order by hosp_id desc
    </select>
</mapper>