<!-- 导出所有数据 -->
    <select id="exportAll" resultMap="map">
        SELECT t1.MEDICAL_ID AS medicalId,
        ADDRESS AS address,
        DATE_START AS dateStart,
        DATE_END AS dateEnd,
        TIME_START AS timeStart,
        TIME_END AS timeEnd,
        AMBULANCE_NUM AS ambulanceNum,
        NAME AS name,
        PHONE AS phone
        FROM PM.T_MEETING_MEDICAL t1,PM.T_MEETING_MEDICAL_DOCTOR t2
        <where>
            t1.MEDICAL_ID = t2.MEDICAL_ID
            <if test="address != null and address !='' ">
                AND ADDRESS = #{address}
            </if>
            <if test="dateStart != null and dateStart !='' ">
                AND DATE_START = #{dateStart}
            </if>
            <if test="dateEnd != null and dateEnd !='' ">
                AND DATE_END = #{dateEnd}
            </if>
            <if test="meetingId != null and meetingId !='' ">
                AND MEETING_ID = #{meetingId}
            </if>
        </where>
        ORDER BY t1.ADDRESS,t1.DATE_START
    </select>
  public List<Map<String, Object>> exportAll(MeetingMedicalVo meetingMedicalVo);

//接口

<resultMap type="map" id="timeStampMap">
<result property="beginTime" column="beginTime" javaType="date"/>
<result property="endTime" column="endTime" javaType="date"/>
<result property="stayTime" column="stayTime" javaType="date"/>
<result property="leaveTime" column="leaveTime" javaType="date"/>
</resultMap>

MyBatis 返回Map<String,Object>类型的更多相关文章

  1. mybatis使用Map<String,Object>映射mysql结果集,关于字段的问题

    --mysql常用字段类型如图 --mybatis使用Map<String,Object>映射,会将tinyint映射成Integer类型.decimal映射成BigDecimal类型 所 ...

  2. mybatis foreach Map(String,List)类型

    <select id="queryList" resultType="com.performancetest.modules.ptest.entity.Stress ...

  3. Mybatis 遍历 List<Map<String,Object>>

    在上一篇博客中总结了MyBatis Plus 实现多表分页模糊查询(链接在最后).返回类型是编写一个专门的vo类.这次是返回List < Map > 前言 ​ 编写一个专门的vo返回类,主 ...

  4. 使用 JDBC 和 JavaTemplate 查询SQL语句返回 List<Map<String,Object>>

    使用JDBC执行sql语句返回List 类型: public class JdbcUtil { private static Log log = LogFactory.getLog(JdbcUtil. ...

  5. oracle 连接数据库并查询,返回List<Map<String, Object>> 数据

    package JDBC; import java.sql.Clob; import java.sql.Connection; import java.sql.DriverManager; impor ...

  6. mybatis返回map类型数据空值字段不显示的解决方法

    在日常开发中,查询数据返回类型为map,数据库中有些自动值为null,则返回的结果中没有值为空的字段,则如何显示值为空的字段呢? Spring boot + MyBatis返回map中null值默认不 ...

  7. Map<String,Object>接收参数,Long类型降级为Integer,报类型转换异常

    前言 今天看群里小伙伴问了一个非常有意思的问题: 使用 Map<String,Object> 对象接收前端传递的参数,在后端取参时,因为接口文档中明确该字段类型为 Long ,所以对接收的 ...

  8. jpa返回List<Map<String, Object>>相当于jdbctemplate的queryForlist

    public class Test(){ @PersistenceContext(unitName = "manageFactory") protected EntityManag ...

  9. Mybatis,返回Map的时候,将Map内的Key转换为驼峰的命名

    每次使用mybatis的时候,简单的连表查询,用Map接收的时候,都是像DB定义的字段一样,类似以下 student_name,student_id,没有转换为驼峰,但是又不能因为这一个定义一个jav ...

随机推荐

  1. 执行linux脚本出现问题

    1. 权限不够: 使用 chmod +x XXX.sh 提升权限 2. 出现:/bin/bash^M: bad interpreter: No such file or directory 原因:文件 ...

  2. CodeForces 923C Perfect Security

    C. Perfect Security time limit per test3.5 seconds memory limit per test512 megabytes inputstandard ...

  3. DFS和BFS模板

    DFS: 该DFS框架以2D坐标范围为例,来体现DFS算法的实现思想 #include<cstdio> #include<cstring> #include<cstdli ...

  4. CoreText的使用方法

    - (void)draw { CGContextRef context = UIGraphicsGetCurrentContext(); NSMutableAttributedString *attr ...

  5. 473 Matchsticks to Square 火柴拼正方形

    还记得童话<卖火柴的小女孩>吗?现在,你知道小女孩有多少根火柴,请找出一种能使用所有火柴拼成一个正方形的方法.不能折断火柴,可以把火柴连接起来,并且每根火柴都要用到.输入为小女孩拥有火柴的 ...

  6. ubu下编译安装php7

    第一步: 安装依赖库zlib.libpng.freetype.jpegsrc.libxml2.libgd.freetds.mhash.libmcrypt.mcrypt(依赖于mhash和libmcry ...

  7. 一个页面通过iframe,获取另一个页面的form

    document.getElementsByTagName("iframe")[0].contentWindow.document.forms[0].submit(); var z ...

  8. android开发学习 ------- 【转】Gradle相关

    一直在用AndroidStudio,但是对于其Gradle了解的很少. 推荐 http://www.jianshu.com/p/9df3c3b6067a  觉得说的很棒!

  9. 三种将list转换为map的方法(传统方法、jdk8 Stream流、guava)

    三种将list转换为map的方法 - jackyrong - ITeye博客:http://jackyrong.iteye.com/blog/2158009

  10. Objective-C 里面的类对象复用小结

    OC 提供了单继承 (Inheritance), Category, Extension, Protocol 这几种基本的类与对象层面的复用机制,作一小结. 在这几个机制中,继承提供了纵向的复用,可以 ...