Demo/target/classes/mappers/ZyUserDao.xml
2024-10-26 19:39:18 +08:00

35 lines
1.3 KiB
XML

<?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.example.demo.Dao.ZyUserDao">
<!-- <resultMap id="userMap" type="com.example.demo.Entity.ZyUser">-->
<!-- <id column="id" property="id"></id>-->
<!-- <result column="zname" property="zNAME"></result>-->
<!-- <result column="zpwd" property="zPwd"></result>-->
<!-- </resultMap>-->
<sql id="Base_Column_List">
zid, zname, zpwd
</sql>
<select id="selectByPrimaryKey" resultMap="com.example.demo.Entity.ZyUser" parameterType="java.lang.String">
select
<include refid="Base_Column_List"/>
from public.zy_user where zid = #{id}
</select>
<!-- <select id="getAllUsers" resultType="com.example.demo.Entity.ZyUser">-->
<!-- select zname as zName,zpwd as zPwd from public.zy_user where 1=1-->
<!--&lt;!&ndash; <if test="id!=null">&ndash;&gt;-->
<!--&lt;!&ndash; AND id like concat ('%',#{id},'%')&ndash;&gt;-->
<!--&lt;!&ndash; </if>&ndash;&gt;-->
<!-- &lt;!&ndash; <if test="energy!=null and energy !='' ">&ndash;&gt;-->
<!-- &lt;!&ndash; AND energy like concat ('%',#{energy},'%')&ndash;&gt;-->
<!-- &lt;!&ndash; </if>&ndash;&gt;-->
<!-- </select>-->
</mapper>