|
@@ -1,7 +1,15 @@
|
1
|
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
2
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
3
|
3
|
<mapper namespace="com.mapper.AccountMapper">
|
4
|
|
- <select id="findAll" resultType="com.pojo.entity.AccountEntity">
|
5
|
|
- select id,user_name,balance from account
|
|
4
|
+ <select id="findAll" resultType="com.pojo.entity.AccountEntity"
|
|
5
|
+ parameterType="java.lang.Integer"
|
|
6
|
+ >
|
|
7
|
+ select id,user_name,balance from account where id= #{id}
|
6
|
8
|
</select>
|
|
9
|
+ <update id="updateOne" parameterType="com.pojo.entity.AccountEntity">
|
|
10
|
+ update account set user_name = #{user_name} where id = #{id}
|
|
11
|
+ </update>
|
|
12
|
+ <insert id="insertOne" parameterType="com.pojo.entity.AccountEntity">
|
|
13
|
+ insert into account(user_name,balance) value (#{user_name},#{balance})
|
|
14
|
+ </insert>
|
7
|
15
|
</mapper>
|