
MyBatis
zcl_love_wx
真正的爱情,就像花朵,开放的地方越贫瘠,越是美丽动人!
-
原创 mybatis中传入String类型参数的问题
1. 出现的问题需求是想写一个按公司名字查询公司列表的功能,最开始的代码如下 Dao层接口如下:@MyBatisDaopublic interface OfficeDao extends TreeDao<Office> { List<Office> findCompanyNameList(String name);}mybatis的xml代码:<select id="findCompa2017-11-22 11:38:0033865
1
-
原创 Mybatis中 Integer 值为0时,默认为空字符串的解决办法
问题需求是查询级别为0的用户 User对象里的level字段的值为0,查询时居然没有查到为level为0的用户。<select id="selectSelective" parameterType="com.agri.entity.User" resultMap="map"> select * from sys_user where del_flag = 1 <if test=2017-12-14 10:30:075111
0