mybatis xml 写法解析

This commit is contained in:
qiurunze 2018-09-27 22:23:19 +08:00
parent d053fbcf6c
commit 55fbc8d08d
7 changed files with 86 additions and 75 deletions

View File

@ -2,46 +2,9 @@
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="59bd24de-7908-4982-927f-6d236db7e416" name="Default Changelist" comment=""> <list default="true" id="59bd24de-7908-4982-927f-6d236db7e416" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/gitignore" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/main/java/com/geekq/miaosha/common/ResponseCode.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/main/java/com/geekq/miaosha/common/ServerResponse.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/main/java/com/geekq/miaosha/controller/UserController.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/main/java/com/geekq/miaosha/dao/UserMapper.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/main/java/com/geekq/miaosha/service/IUserService.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/main/resources/mybatis/config.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/main/resources/mybatis/mapper/UserMapper.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/target/classes/com/geekq/miaosha/common/ResponseCode.class" afterDir="false" />
<change afterPath="$PROJECT_DIR$/target/classes/com/geekq/miaosha/common/ServerResponse.class" afterDir="false" />
<change afterPath="$PROJECT_DIR$/target/classes/com/geekq/miaosha/controller/UserController.class" afterDir="false" />
<change afterPath="$PROJECT_DIR$/target/classes/com/geekq/miaosha/service/IUserService.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/compiler.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/compiler.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/encodings.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/encodings.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/README.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/miaosha.iml" beforeDir="false" afterPath="$PROJECT_DIR$/miaosha.iml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/pom.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/geekq/miaosha/Test.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/geekq/miaosha/Test.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/geekq/miaosha/controller/LoginController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/geekq/miaosha/controller/LoginController.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/main/java/com/geekq/miaosha/controller/LoginController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/geekq/miaosha/controller/LoginController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/geekq/miaosha/dao/MiaoShaUserDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/geekq/miaosha/dao/MiaoShaUserDao.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/main/java/com/geekq/miaosha/dao/UserMapper.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/geekq/miaosha/dao/UserMapper.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/geekq/miaosha/dao/MiaoshaUserDao.java" beforeDir="false" /> <change beforePath="$PROJECT_DIR$/src/main/resources/mybatis/mapper/UserMapper.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mybatis/mapper/UserMapper.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/geekq/miaosha/domain/MiaoshaUser.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/geekq/miaosha/domain/MiaoshaUser.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/geekq/miaosha/result/CodeMsg.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/geekq/miaosha/result/CodeMsg.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/geekq/miaosha/result/Result.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/geekq/miaosha/result/Result.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/geekq/miaosha/service/MiaoShaUserService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/geekq/miaosha/service/MiaoShaUserService.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/geekq/miaosha/eekQMainApplication.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/geekq/miaosha/eekQMainApplication.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/resources/application.properties" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/application.properties" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/resources/templates/login.html" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/templates/login.html" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/application.properties" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/application.properties" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/geekq/miaosha/Test.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/geekq/miaosha/Test.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/geekq/miaosha/controller/LoginController.class" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/geekq/miaosha/dao/MiaoShaUserDao.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/geekq/miaosha/dao/MiaoShaUserDao.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/geekq/miaosha/dao/MiaoshaUserDao.class" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/geekq/miaosha/domain/MiaoshaUser.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/geekq/miaosha/domain/MiaoshaUser.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/geekq/miaosha/result/CodeMsg.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/geekq/miaosha/result/CodeMsg.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/geekq/miaosha/result/Result.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/geekq/miaosha/result/Result.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/geekq/miaosha/service/MiaoShaUserService.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/geekq/miaosha/service/MiaoShaUserService.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/com/geekq/miaosha/eekQMainApplication.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/com/geekq/miaosha/eekQMainApplication.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/target/classes/templates/login.html" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/templates/login.html" afterDir="false" />
</list> </list>
<ignored path="$PROJECT_DIR$/target/" /> <ignored path="$PROJECT_DIR$/target/" />
<ignored path="$PROJECT_DIR$/springcloud-server/target/" /> <ignored path="$PROJECT_DIR$/springcloud-server/target/" />
@ -134,25 +97,25 @@
<entry key="gitignore" value="2" /> <entry key="gitignore" value="2" />
<entry key="htm" value="1" /> <entry key="htm" value="1" />
<entry key="html" value="24" /> <entry key="html" value="24" />
<entry key="java" value="10231" /> <entry key="java" value="10313" />
<entry key="md" value="667" /> <entry key="md" value="667" />
<entry key="properties" value="95" /> <entry key="properties" value="95" />
<entry key="regexp" value="11" /> <entry key="regexp" value="11" />
<entry key="txt" value="615" /> <entry key="txt" value="615" />
<entry key="xml" value="980" /> <entry key="xml" value="1004" />
</counts> </counts>
</usages-collector> </usages-collector>
<usages-collector id="statistics.file.types.edit"> <usages-collector id="statistics.file.types.edit">
<counts> <counts>
<entry key="CLASS" value="1" /> <entry key="CLASS" value="1" />
<entry key="HTML" value="25" /> <entry key="HTML" value="25" />
<entry key="JAVA" value="10231" /> <entry key="JAVA" value="10313" />
<entry key="Markdown" value="667" /> <entry key="Markdown" value="667" />
<entry key="PLAIN_TEXT" value="653" /> <entry key="PLAIN_TEXT" value="653" />
<entry key="Properties" value="95" /> <entry key="Properties" value="95" />
<entry key="RegExp" value="11" /> <entry key="RegExp" value="11" />
<entry key="SQL" value="12" /> <entry key="SQL" value="13" />
<entry key="XML" value="968" /> <entry key="XML" value="991" />
</counts> </counts>
</usages-collector> </usages-collector>
</session> </session>
@ -162,8 +125,8 @@
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/resources/mybatis/mapper/UserMapper.xml"> <entry file="file://$PROJECT_DIR$/src/main/resources/mybatis/mapper/UserMapper.xml">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="276"> <state relative-caret-position="408">
<caret line="36" column="33" selection-start-line="36" selection-start-column="16" selection-end-line="36" selection-end-column="33" /> <caret line="28" column="39" selection-start-line="28" selection-start-column="16" selection-end-line="28" selection-end-column="39" />
</state> </state>
</provider> </provider>
</entry> </entry>
@ -180,8 +143,8 @@
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/com/geekq/miaosha/dao/UserMapper.java"> <entry file="file://$PROJECT_DIR$/src/main/java/com/geekq/miaosha/dao/UserMapper.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="386"> <state relative-caret-position="414">
<caret line="28" column="35" selection-start-line="28" selection-start-column="35" selection-end-line="28" selection-end-column="35" /> <caret line="23" column="32" selection-start-line="23" selection-start-column="9" selection-end-line="23" selection-end-column="32" />
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="true" />
</folding> </folding>
@ -192,11 +155,12 @@
<file pinned="false" current-in-tab="true"> <file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/main/java/com/geekq/miaosha/controller/LoginController.java"> <entry file="file://$PROJECT_DIR$/src/main/java/com/geekq/miaosha/controller/LoginController.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="320"> <state relative-caret-position="414">
<caret line="70" column="63" selection-start-line="70" selection-start-column="63" selection-end-line="70" selection-end-column="63" /> <caret line="79" column="53" selection-start-line="79" selection-start-column="53" selection-end-line="79" selection-end-column="53" />
<folding> <folding>
<element signature="e#1495#1496#0" expanded="true" /> <element signature="e#1495#1496#0" expanded="true" />
<element signature="e#1553#1554#0" expanded="true" /> <element signature="e#1553#1554#0" expanded="true" />
<element signature="e#2479#2492#0" expanded="true" />
</folding> </folding>
</state> </state>
</provider> </provider>
@ -214,8 +178,8 @@
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/com/geekq/miaosha/dao/MiaoShaUserDao.java"> <entry file="file://$PROJECT_DIR$/src/main/java/com/geekq/miaosha/dao/MiaoShaUserDao.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="198"> <state relative-caret-position="352">
<caret line="13" column="47" selection-start-line="13" selection-start-column="47" selection-end-line="13" selection-end-column="47" /> <caret line="17" column="59" lean-forward="true" selection-start-line="17" selection-start-column="59" selection-end-line="17" selection-end-column="59" />
</state> </state>
</provider> </provider>
</entry> </entry>
@ -446,7 +410,7 @@
<property name="RequestMappingsPanelWidth2" value="75" /> <property name="RequestMappingsPanelWidth2" value="75" />
<property name="WebServerToolWindowFactoryState" value="false" /> <property name="WebServerToolWindowFactoryState" value="false" />
<property name="aspect.path.notification.shown" value="true" /> <property name="aspect.path.notification.shown" value="true" />
<property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1538057366147" /> <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1538058142261" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/../project/we-p2p" /> <property name="last_opened_file_path" value="$PROJECT_DIR$/../project/we-p2p" />
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" /> <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
<property name="nodejs_npm_path_reset_for_default_project" value="true" /> <property name="nodejs_npm_path_reset_for_default_project" value="true" />
@ -616,12 +580,12 @@
<workItem from="1537947897813" duration="3356000" /> <workItem from="1537947897813" duration="3356000" />
<workItem from="1537969313502" duration="4411000" /> <workItem from="1537969313502" duration="4411000" />
<workItem from="1538041783822" duration="770000" /> <workItem from="1538041783822" duration="770000" />
<workItem from="1538052217986" duration="5104000" /> <workItem from="1538052217986" duration="5794000" />
</task> </task>
<servers /> <servers />
</component> </component>
<component name="TimeTrackingManager"> <component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="164965000" /> <option name="totallyTimeSpent" value="165655000" />
</component> </component>
<component name="TodoView"> <component name="TodoView">
<todo-panel id="selected-file"> <todo-panel id="selected-file">
@ -647,7 +611,7 @@
<window_info anchor="bottom" id="Message" order="0" /> <window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Find" order="1" sideWeight="0.6996805" weight="0.26815644" /> <window_info anchor="bottom" id="Find" order="1" sideWeight="0.6996805" weight="0.26815644" />
<window_info anchor="bottom" id="Run" order="2" sideWeight="0.8945687" weight="0.42234638" /> <window_info anchor="bottom" id="Run" order="2" sideWeight="0.8945687" weight="0.42234638" />
<window_info active="true" anchor="bottom" id="Debug" order="3" sideWeight="0.78541" visible="true" weight="0.46368715" /> <window_info active="true" anchor="bottom" id="Debug" order="3" sideWeight="0.78541" visible="true" weight="0.16201118" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" /> <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" /> <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<window_info anchor="bottom" id="TODO" order="6" weight="0.32960895" /> <window_info anchor="bottom" id="TODO" order="6" weight="0.32960895" />
@ -775,10 +739,16 @@
</line-breakpoint> </line-breakpoint>
<line-breakpoint enabled="true" type="java-line"> <line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/src/main/java/com/geekq/miaosha/controller/LoginController.java</url> <url>file://$PROJECT_DIR$/src/main/java/com/geekq/miaosha/controller/LoginController.java</url>
<line>65</line> <line>67</line>
<properties /> <properties />
<option name="timeStamp" value="29" /> <option name="timeStamp" value="29" />
</line-breakpoint> </line-breakpoint>
<line-breakpoint enabled="true" type="java-line">
<url>file://$PROJECT_DIR$/src/main/java/com/geekq/miaosha/controller/LoginController.java</url>
<line>74</line>
<properties />
<option name="timeStamp" value="30" />
</line-breakpoint>
</breakpoints> </breakpoints>
<breakpoints-dialog> <breakpoints-dialog>
<breakpoints-dialog /> <breakpoints-dialog />
@ -1098,16 +1068,6 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/main/java/com/geekq/miaosha/dao/UserMapper.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="386">
<caret line="28" column="35" selection-start-line="28" selection-start-column="35" selection-end-line="28" selection-end-column="35" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/com/geekq/miaosha/domain/MiaoshaUser.java"> <entry file="file://$PROJECT_DIR$/src/main/java/com/geekq/miaosha/domain/MiaoshaUser.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state> <state>
@ -1117,25 +1077,36 @@
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/main/resources/mybatis/mapper/UserMapper.xml"> <entry file="file://$PROJECT_DIR$/src/main/resources/mybatis/mapper/UserMapper.xml">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="276"> <state relative-caret-position="408">
<caret line="36" column="33" selection-start-line="36" selection-start-column="16" selection-end-line="36" selection-end-column="33" /> <caret line="28" column="39" selection-start-line="28" selection-start-column="16" selection-end-line="28" selection-end-column="39" />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/main/java/com/geekq/miaosha/dao/MiaoShaUserDao.java"> <entry file="file://$PROJECT_DIR$/src/main/java/com/geekq/miaosha/dao/MiaoShaUserDao.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="198"> <state relative-caret-position="352">
<caret line="13" column="47" selection-start-line="13" selection-start-column="47" selection-end-line="13" selection-end-column="47" /> <caret line="17" column="59" lean-forward="true" selection-start-line="17" selection-start-column="59" selection-end-line="17" selection-end-column="59" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/com/geekq/miaosha/dao/UserMapper.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="414">
<caret line="23" column="32" selection-start-line="23" selection-start-column="9" selection-end-line="23" selection-end-column="32" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/main/java/com/geekq/miaosha/controller/LoginController.java"> <entry file="file://$PROJECT_DIR$/src/main/java/com/geekq/miaosha/controller/LoginController.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="320"> <state relative-caret-position="414">
<caret line="70" column="63" selection-start-line="70" selection-start-column="63" selection-end-line="70" selection-end-column="63" /> <caret line="79" column="53" selection-start-line="79" selection-start-column="53" selection-end-line="79" selection-end-column="53" />
<folding> <folding>
<element signature="e#1495#1496#0" expanded="true" /> <element signature="e#1495#1496#0" expanded="true" />
<element signature="e#1553#1554#0" expanded="true" /> <element signature="e#1553#1554#0" expanded="true" />
<element signature="e#2479#2492#0" expanded="true" />
</folding> </folding>
</state> </state>
</provider> </provider>

View File

@ -16,6 +16,8 @@ import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid; import javax.validation.Valid;
import java.util.ArrayList;
import java.util.List;
@Controller @Controller
@RequestMapping("/login") @RequestMapping("/login")
@ -63,12 +65,24 @@ public class LoginController {
// miaoshaUser.setNickname("test"); // miaoshaUser.setNickname("test");
// Long num = userMapper.insertMiaoShaUser(miaoshaUser); // Long num = userMapper.insertMiaoShaUser(miaoshaUser);
// MiaoshaUser upmiaoshaUser =new MiaoshaUser();
// upmiaoshaUser.setId(Long.valueOf("1234569879"));
// upmiaoshaUser.setNickname("test1");
// userMapper.updateMiaoShaUser(upmiaoshaUser);
//
// userMapper.deleteMiaoShaUser(Long.valueOf("1234569879"));
List<MiaoshaUser> lists = new ArrayList<MiaoshaUser>();
MiaoshaUser upmiaoshaUser =new MiaoshaUser(); MiaoshaUser upmiaoshaUser =new MiaoshaUser();
upmiaoshaUser.setId(Long.valueOf("1234569879")); upmiaoshaUser.setId(Long.valueOf("1234569879"));
upmiaoshaUser.setNickname("test1"); upmiaoshaUser.setNickname("test1");
userMapper.updateMiaoShaUser(upmiaoshaUser); MiaoshaUser upmiaoshaUser1 =new MiaoshaUser();
upmiaoshaUser1.setId(Long.valueOf("1234569872"));
upmiaoshaUser1.setNickname("test1");
lists.add(upmiaoshaUser);
lists.add(upmiaoshaUser1);
userMapper.deleteMiaoShaUser(Long.valueOf("1234569879")); userMapper.insertMiaoShaUserValues(lists);
} }
} }

View File

@ -21,6 +21,8 @@ public interface UserMapper {
public Long insertMiaoShaUser(MiaoshaUser user); public Long insertMiaoShaUser(MiaoshaUser user);
void insertMiaoShaUserValues(List<MiaoshaUser> miaoshaUsers);
//更改表数据 //更改表数据
void updateMiaoShaUser(MiaoshaUser user) ; void updateMiaoShaUser(MiaoshaUser user) ;

View File

@ -25,6 +25,18 @@
) )
</insert> </insert>
<!--批量插入-->
<insert id="insertMiaoShaUserValues" useGeneratedKeys="true"
keyProperty="id">
insert into miaosha_user (id, nickname, salt, register_date,last_login_date,login_Count ) values
<foreach item="item" collection="list" separator=",">
(#{item.id,jdbcType=BIGINT},#{item.nickname,jdbcType=VARCHAR},
#{item.salt,jdbcType=VARCHAR},#{item.registerDate,jdbcType=DATE},#{item.lastLoginDate,jdbcType=DATE},
#{item.loginCount,jdbcType=INTEGER}
)
</foreach>
</insert>
<!--更新一条数据--> <!--更新一条数据-->
<update id="updateMiaoShaUser" > <update id="updateMiaoShaUser" >

View File

@ -25,6 +25,18 @@
) )
</insert> </insert>
<!--批量插入-->
<insert id="insertMiaoShaUserValues" useGeneratedKeys="true"
keyProperty="id">
insert into miaosha_user (id, nickname, salt, register_date,last_login_date,login_Count ) values
<foreach item="item" collection="list" separator=",">
(#{item.id,jdbcType=BIGINT},#{item.nickname,jdbcType=VARCHAR},
#{item.salt,jdbcType=VARCHAR},#{item.registerDate,jdbcType=DATE},#{item.lastLoginDate,jdbcType=DATE},
#{item.loginCount,jdbcType=INTEGER}
)
</foreach>
</insert>
<!--更新一条数据--> <!--更新一条数据-->
<update id="updateMiaoShaUser" > <update id="updateMiaoShaUser" >