mybatis 使用总结
mybatis使用总结
1.传入的参数可以是map,引用是直接写属性
parameterType="map"
2.传入的参数可以是map,引用是直接写属性
parameterType="com.oceano.organization.param.OrganizationQueryParam"
如:
ANDo.base_is_group_org=#{baseIsGroupOrg}
不用写成,会报错
ANDo.base_is_group_org=#{OrganizationQueryParam.baseIsGroupOrg}
3.resultMap="BaseResultMap",表时返回的map转换成那个bean
4.如果不想返回bean,或只返回一部分的属性,可以以MAP的型式返回
resultType="java.util.Map"
服务层:
List<Map<String,Object>>list=mapper.searchOrgTreeByCondition(map);
相关推荐
xiuyangsong 2020-11-16
Nishinoshou 2020-11-09
jimgreatly 2020-09-01
dongxurr 2020-08-18
Dullonjiang 2020-08-15
Dullonjiang 2020-08-11
Dullonjiang 2020-08-09
dongxurr 2020-08-08
yunzhonmghe 2020-08-07
jimgreatly 2020-08-03
Dullonjiang 2020-07-30
jimgreatly 2020-07-27
liqiancao 2020-07-26
xiuyangsong 2020-07-26
dongxurr 2020-07-26
mcvsyy 2020-07-26
helloxusir 2020-07-25
牧场SZShepherd 2020-07-20