mybatis 多条件查询

MyBatis传入多个参数的问题

mybatis 多参数 的使用   where set  html

参考数据库

接口mybatis

@Test
public void test() {
   TfReportUsers users = new TfReportUsers();
   users.setType("撒");
   HashMap<Object, Object> hashMap = new HashMap<>();

   hashMap.put("users",users);
   hashMap.put("dMin","2003-10-02");
   List<TfReportUsers> users1 = tfReportMapper.findUsers(hashMap);
List<TfReportUsers> findUsers(HashMap hashMap);
<select id="findUsers" resultType="com.icntv.cpms.entity.TfReportUsers" parameterType="hashmap">
    select  *  from tf_report_users
<where> 
    <if test="users.name!=null and users.name.trim()!=''"> 
        AND NAME = #{users.name}
    </if>
<where>

mybatis 在批量 执行  update 的时候  要在数据 url  加上配置 &allowMultiQueries=trueapp

让数据库支持批量更新url

http://blog.csdn.net/tolcf/article/details/39213217spa

 

mybatis 在传入多个参数时的解决方案.net

List<TfReportBase> queryHistoryData(@Param("i")String i ,@Param("x")String x);

基于注解的就不能够再使用 parameterTypehtm

mybatis传入多个参数