forked from kidgrow-microservices-platform

er
2020-04-02 d8de5f3b6433c5a00b54b5b88db7c67aa8058ea5
kidgrow-business/kidgrow-opration-center/kidgrow-opration-center-biz/src/main/resources/mapper/DataNeedMapper.xml
@@ -1,7 +1,7 @@
<?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.kidgrow.usercenter.mapper.DataNeedMapper">
<mapper namespace="com.kidgrow.oprationcenter.mapper.DataNeedMapper">
    <!--定义查询列-->
    <sql id="Column_List">
      *
@@ -11,7 +11,7 @@
    <sql id="where">
        <where>
            <!--查询条件自行添加-->
            p.is_del=0
            is_del=0
                                    <if test="p.id != null and p.id !=''">
                and  id =  #{p.id}
            </if>
@@ -22,7 +22,7 @@
                and  doctor_id =  #{p.doctorId}
            </if>
                                                <if test="p.doctorName != null and p.doctorName !=''">
                and  doctor_name =  #{p.doctorName}
                and doctor_name like '%${p.doctorName}%'
            </if>
                                                <if test="p.hospitalName != null and p.hospitalName !=''">
                and  hospital_name =  #{p.hospitalName}
@@ -76,17 +76,20 @@
    </sql>
    <!--定义根据-DataNeed当作查询条件返回对象-->
    <select id="findByObject"  resultType="com.kidgrow.usercenter.model.DataNeed">
        select <include refid="Column_List"/>
    <select id="findByObject" resultType="com.kidgrow.oprationcenter.model.DataNeed">
        select
        <include refid="Column_List"/>
        from data_need
        <include refid="where"/>
        order by id desc
    </select>
    <!--定义根据-DataNeed当作查询条件返回对象集合-->
    <select id="findList" resultType="com.kidgrow.usercenter.model.DataNeed">
        select <include refid="Column_List"/>
    <select id="findList" resultType="com.kidgrow.oprationcenter.model.DataNeed">
        select
        <include refid="Column_List"/>
        from data_need
        <include refid="where"/>
        order by id desc
    </select>
</mapper>