| | |
| | | <?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"> |
| | | * |
| | |
| | | <sql id="where"> |
| | | <where> |
| | | <!--查询条件自行添加--> |
| | | p.is_del=0 |
| | | is_del=0 |
| | | <if test="p.id != null and p.id !=''"> |
| | | and id = #{p.id} |
| | | </if> |
| | |
| | | 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} |
| | |
| | | </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> |