|
|
|
@ -3,7 +3,7 @@
|
|
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
<mapper namespace="com.ruoyi.system.mapper.TPatientMapper">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<resultMap type="TPatient" id="TPatientResult">
|
|
|
|
|
<result property="id" column="id" />
|
|
|
|
|
<result property="openId" column="open_id" />
|
|
|
|
@ -27,7 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
|
|
|
|
<select id="selectTPatientList" parameterType="TPatient" resultMap="TPatientResult">
|
|
|
|
|
<include refid="selectTPatientVo"/>
|
|
|
|
|
<where>
|
|
|
|
|
<where>
|
|
|
|
|
<if test="openId != null and openId != ''"> and open_id = #{openId}</if>
|
|
|
|
|
<if test="identifier != null and identifier != ''"> and identifier = #{identifier}</if>
|
|
|
|
|
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
|
|
|
@ -40,12 +40,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="disease != null and disease != ''"> and disease = #{disease}</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectTPatientById" parameterType="Long" resultMap="TPatientResult">
|
|
|
|
|
<include refid="selectTPatientVo"/>
|
|
|
|
|
where id = #{id}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="insertTPatient" parameterType="TPatient" useGeneratedKeys="true" keyProperty="id">
|
|
|
|
|
insert into t_patient
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
@ -105,7 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteTPatientByIds" parameterType="String">
|
|
|
|
|
delete from t_patient where id in
|
|
|
|
|
delete from t_patient where id in
|
|
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
|
|
#{id}
|
|
|
|
|
</foreach>
|
|
|
|
@ -152,4 +152,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
</where>
|
|
|
|
|
order by a.create_time desc
|
|
|
|
|
</select>
|
|
|
|
|
</mapper>
|
|
|
|
|
|
|
|
|
|
<select id="checkPhoneUnique" parameterType="String" resultType="int">
|
|
|
|
|
select count(1) from t_patient where phone = #{phone} limit 1
|
|
|
|
|
</select>
|
|
|
|
|
</mapper>
|
|
|
|
|