ReleaseNotes优化Searcheq|乐鱼登录
作者:    发布于:2021-05-02    文字:【】【】【
本文摘要:乐鱼网页版,乐鱼登录,乐鱼体育登录,ReleaseNotes优化Searcheq,Searchne主要参数为NULL情况下解决为isnull,isnotnullUseGeneratedKeys注解适用多主要参数提升如何查询BaseQueryMapperlistListkeys,BaseQueryMapperlistPrimarayKey[]keys优化Jdbc3KeyGen完成,提升共享资源自变量优化SqlSessionFactory提高,仅有发觉SupperMapper派生类,才做提高查看、升级适用骆驼峰文件格式属性名,变换为下横线字段名健全单元测试卷编码简单化,优化TigonMyBatis介绍TigonMyBatis为Spring工程项目中MyBatis的Mapper出示提高,关键有下列特性编码又少又壮,决不做不必要的事儿仅需Mapper承继插口,完成增删,无附加配备,爽到没女友用完即走,-,能够在源码中寻找更详尽的单元测试卷。

04

升级

ReleaseNotes优化Searcheq,Searchne主要参数为NULL情况下解决为isnull,isnotnullUseGeneratedKeys注解适用多主要参数提升如何查询BaseQueryMapperlistListkeys,BaseQueryMapperlistPrimarayKey[]keys优化Jdbc3KeyGen完成,提升共享资源自变量优化SqlSessionFactory提高,仅有发觉SupperMapper派生类,才做提高查看、升级适用骆驼峰文件格式属性名,变换为下横线字段名健全单元测试卷编码简单化,优化TigonMyBatis介绍TigonMyBatis为Spring工程项目中MyBatis的Mapper出示提高,关键有下列特性编码又少又壮,决不做不必要的事儿仅需Mapper承继插口,完成增删,无附加配备,爽到没女友用完即走,-,能够在源码中寻找更详尽的单元测试卷。Talkischeep,.;importlombok.Getter;importlombok.Setter;;importlombok.ToString;;.mybatis.Table;.mybatis.NotUpdate;GetterSetterToStringTable"tb_user"publicclassUserimplementsSerializable{privatestaticfinallongserialVersionUID=1L;privateIntegerid;NotUpdateprivateStringaccount;privateStringmobile;privateStringname;privateGendergender;privateStringpassword;privateDatebirthDate;privateStringcity;privateStringavatar;privateBooleanactive;privateStringremark;privateStringcreatedBy;privateDatecreatedAt;privateStringupdatedBy;privateDateupdatedAt;publicenumGender{MALE,FEMALE}}.mybatis.mapper;;.mybatis.BaseMapper;.annotations.Mapper;.;MapperpublicinterfaceUserMapperextendsBaseMapper{}引入Mapper对象AutowiredprivateUserMappermapper;I.插进finalUseruser=newUser;user.setName"Donghuang";user.setAccount"donghuang";user.setMobile"137647788xx";user.setPasswordRandomStringUtils.randomAlphanumeric16;user.setGender;user.setBirthDateDateUtils.parseDate"1994-04-04";user.setCity"Shanghai";user.setActivetrue;user.setRemark"UncleDonghuang";user.setCreatedBy"donghuang";user.setCreatedAtnewDate;//singleinsertmapper.insertuser;finalUseruser1=newUser;user1.setName"Gemily";user1.setAccount"gemily";user1.setMobile"15770780xxx";user1.setPasswordRandomStringUtils.randomAlphanumeric16;user1.setGender;user1.setBirthDateDateUtils.parseDate"1990-06-06";user1.setCity"Hangzhou";user1.setActivetrue;user1.setCreatedBy"donghuang";user1.setCreatedAtnewDate;finalUseruser2=newUser;user2.setName"Luffy";user2.setAccount"luffy";user2.setMobile"137647799xx";user2.setPasswordRandomStringUtils.randomAlphanumeric16;user2.setGender;user2.setBirthDateDateUtils.parseDate"1997-07-07";user2.setCity"Eastsea";user2.setActivetrue;user2.setRemark"Luffy";user2.setCreatedBy"donghuang";user2.setCreatedAtnewDate;//batchinsertmapper.insertArrays.asListuser1,user2;II.查看依据ID查看单独对象finalIntegerid=1154;finalUseruser=mapper.findid;依据属性查看单独对象finalUseruser=mapper.findnewSearch"account","donghuang".eq"mobile","137647788xx";依据属性查看目录finalListusers=mapper.listnewSearch.between"birth_date",DateUtils.parseDate"1982-04-04",DateUtils.parseDate"1994-04-04".eq"gender",.asc"birth_date".limit42;Search对象适用的APIandAndanotherSearchascOrderASCbetweenBetweentwovaluesbuildBuildquerycriterioncontainsValuecontainsstringdescOrderDSCendsWithValueendswithstringeqEqaulsgtGreaterthangteEqaulsorgreaterthaninInvaluesisNullValueisnulllikeValuelikelimitReturnrowslimitltLessthanlteEqaulsorlessthanneNotequalsnotInNotinvaluesnotNullValueisnotnulloffsetReturnrowsoffsetorOranotherSearchorderByOrderbystartsWithValuestartswithstringIII.升级根据Entity依据ID升级finalUseruser=mapper.find1;user.setName"东皇大爷";user.setUpdatedBy"SYS";user.setUpdatedAtnewDate;mapper.updateuser;根据Map升级finalMapupdate=newHashMap6;update.put"name","东皇大爷";update.put"updatedBy","SYS";update.put"updatedAt",newDate;mapper.updateupdate,1;//OR//mapper.updateupdate,newSearch"id",1;//mapper.updateupdate,newSearch1;升级列入NULL//UpdateremarktoNULLofid274228mapper.setNull"remark",274229;//UpdateremarktoNULLofid1154Lmapper.setNull"remark",newSearch"id",1154;//UpdateallremarkstoNULL.BECAREFUL!!!mapper.setNull"remark",newSearch;1;根据Search对象删掉数据信息mapper.deletenewSearch"id",1;V.杂类除开上边说到的一些基本增删实际操作,也有一些基本功能,如TransientUseGeneratedKeysNoPrimaryKeyNotUpdateWhenNullRawValue等注解,插进、升级前回调函数,及其适用拓展自定的方式等。配备表明SpringBoot新项目,不用别的实际操作,引进依靠就可以Spring新项目,..,BaseQuery,Insert,Update,DeleteMapper基本原理TigonMyBatis并不更改MyBatis有关作用,所做的仅仅在程序流程运行期内检验业务流程Mapper插口,假如承继了有关BaseMapper.java,则引入有关方式MappedStatement,实际逻辑性参照源代码,超简单,超孩子气。

升级

配备

升级

别的在前面应用Search的事例中,大家必须一些User的属性变量定义字符串数组,例如finalUseruser=mapper.findnewSearch"account","donghuang";能够将这种变量定义界定在User类中,如publicstaticfinalStringACCOUNT="account";应用全过程中能够应用属性变量定义,如finalUseruser=mapper.findnewSearchUser.ACCOUNT,"donghuang";还可以应用Lombok的FieldNameConstants注解转化成,仅仅这一注解还处在实验环节,有一定不稳定风险性。

升级


本文关键词:乐鱼体育登录,04,注解,引入

本文来源:乐鱼网页版-www.societyandlifestyle.com

上一篇:腾讯官方WeLearning智能教育解决方法发布_乐鱼网页版
下一篇:ObjectiveSQL第一个宣布版本出示了自动生成编码的特:乐鱼登录
脚注信息

地址: 香港特别行政区香港市香港区文算大楼30号    电话: 0751-768244308    传真: 071-25287042
乐鱼网页版,乐鱼登录,乐鱼体育登录    E-mail: admin@societyandlifestyle.com    备案号:港ICP备86475890号-5