You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
860 B
27 lines
860 B
<?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">
|
|
<!-- namespace 用来找唯一的 Mapper 文件,一般是 domain 的全路径名 + Mapper -->
|
|
<mapper namespace="com.dims.mapper.DoctorMapper">
|
|
<!-- 登录 -->
|
|
<select id="login" parameterType="User" resultType="Doctor">
|
|
SELECT Dno, Dname, Dsex, Dage, Dpwd
|
|
FROM Doctor
|
|
WHERE Dno = #{no} AND Dpwd = #{pwd};
|
|
</select>
|
|
|
|
<!-- 查看药品库存列表 -->
|
|
<select id="queryAllDrugs" resultType="Drug">
|
|
SELECT d.PDno, d.PDname, d.PDlife, SUM(i.PDnum) AS PDnum
|
|
FROM Drug d, InventoryDrug i
|
|
WHERE d.PDno = i.PDno
|
|
GROUP BY d.PDno, d.PDname, d.PDlife;
|
|
</select>
|
|
|
|
<!-- 修改登陆密码 -->
|
|
<update id="changeDpwd">
|
|
UPDATE Doctor
|
|
SET Dpwd = #{arg0}
|
|
WHERE Dno = #{arg1};
|
|
</update>
|
|
</mapper>
|