123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <?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.mapper.TAdminMapper">
- <select id="findTAdminList"
- resultType="TAdmin">
- select * from admin
- </select>
-
- <select id="query" parameterType="java.util.Map" resultType="TAdmin">
- select * from admin
- <where>
- <if test="userid!=null and userid!=0">
- and userid= #{userid}
- </if>
- <if test="username!=null and username!=''">
- and username= #{username}
- </if>
- <if test="userpw!=null and userpw!=''">
- and userpw=#{userpw}
- </if>
- </where>
- </select>
-
-
- <select id="queryTAdminById" parameterType="int" resultType="TAdmin">
- select * from admin where userId=${value}
- </select>
-
- <insert id="insertTAdmin" useGeneratedKeys="true" keyProperty="id" parameterType="TAdmin">
- insert into admin
- (userName,userPw)
- values
- (#{username},#{userpw});
- </insert>
-
-
-
-
-
- <update id="updateTAdmin" parameterType="TAdmin" >
- update admin set
- userName=#{username},userPw=#{userpw}
- where
- userid=#{userid}
- </update>
-
-
- <delete id="deleteTAdmin" parameterType="int">
- delete from admin where userid=${value}
- </delete>
- </mapper>
-
|