ServiceConfigService.xml 1.7 KB
<?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.ebaiyihui.family.doctor.server.mapper.PatientSignMapper">


    <select id="queryImInfoList" parameterType="com.ebaiyihui.family.doctor.common.dto.ImInfoListDocReqDTO"
            resultType="com.ebaiyihui.family.doctor.common.vo.ImInfoListResVo">
        select ps.adm_id admId,
               ps.create_time createTime,
               ps.update_time updateTime,
               ps.status status,
               ps.patient_name patientName,
               ps.cred_no credNo,
               ps.patient_id patientId
        from patient_sign ps
        where ps.doctor_id=#{doctorId}
          and ps.sign_status in(1,2)
        <if test="keyWord!=null and keyWord!=''">
            and ps.patient_name like concat('%',#{keyWord},'%')
        </if>
        <if test="appCode!=null and appCode!=''">
            and ps.app_code=#{appCode}
        </if>
        order by ps.create_time asc
        LIMIT #{pageNum}, #{pageSize}
    </select>


<!--    <select id="getImInfoTotal" parameterType="com.ebaiyihui.family.doctor.common.dto.ImInfoListDocReqDTO"-->
<!--            resultType="java.lang.Integer">-->
<!--        select count(*)-->
<!--        from patient_sign ps-->
<!--        where ps.doctor_id=#{doctorId}-->
<!--        and ps.sign_status in(1,2) and ps.status = 2-->
<!--        <if test="keyWord!=null and keyWord!=''">-->
<!--            and ps.patient_name like concat('%',#{keyWord},'%')-->
<!--        </if>-->
<!--        <if test="appCode!=null and appCode!=''">-->
<!--            and ps.app_code=#{appCode}-->
<!--        </if>-->
<!--    </select>-->

</mapper>