2017.04.18.错误小结

来源:互联网 发布:labview编程详解书 编辑:程序博客网 时间:2024/05/21 06:43

1、Mapper.xml文件中namespace为Mapper.java;

     例如:SongMapper.xml

                <mapper namespace="com.yonyougov.fcfa.repository.music.SongMapper" >

2、Mapper.xml文件中resultMap为实体类;

     例如:SongMapper.xml

               <resultMap id="BaseResultMap" type="com.yonyougov.fcfa.entity.music.Song" >
                   <id column="ID" property="id" jdbcType="VARCHAR" />
                   <result column="USER_ID" property="userId" jdbcType="VARCHAR" />
                   <result column="SHEET_NAME" property="sheetName" jdbcType="VARCHAR" />
                   <result column="CREATION_DATE" property="creationDate" jdbcType="DATE" />
              </resultMap>

3、catch中打印异常信息;

      catch (Exception e) {
        e.printStackTrace();

      }

4、ajax中分页查询返回result中有result.data.cotent;

      普通查询直接result.data即可获得数据的返回结果;

      data为result中put的数据;

      List<Sheet> data = sheetServiceI.getUserSheet(userId, songId);
      result.put("data", data);

0 0
原创粉丝点击