zoukankan      html  css  js  c++  java
  • 简单分析下mybatis中mapper文件中小知识

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
    <mapper namespace="*.mapper.IEInvoiceNumPoolMapper" > //namespace中对应的是dao层接口,具体到接口名
    <resultMap id="BaseResultMap" type="*.EInvoice.EINumPoolDTO" > //resultMmap中对应的是实体类,具体到实体类名
    <id column="EINUMPOOLID" property="EINUMPOOLID" jdbcType="VARCHAR" />
    <result column="ADMDIVID" property="ADMDIVID" jdbcType="BIGINT" />
    <result column="BillTypeID" property="BillTypeID" jdbcType="BIGINT" />
    <result column="YEAR" property="YEAR" jdbcType="VARCHAR" />
    <result column="STARTEINUM" property="STARTEINUM" jdbcType="VARCHAR" />
    <result column="ENDEINUM" property="ENDEINUM" jdbcType="VARCHAR" />
    <result column="CurrentlyNum" property="CurrentlyNum" jdbcType="VARCHAR" />
    </resultMap>
    <sql id="Base_Column_List" >
    EINUMPOOLID, ADMDIVID, BillTypeID,YEAR,STARTEINUM,ENDEINUM,CurrentlyNum
    </sql>
    <select id="selectByYear" resultMap="BaseResultMap" parameterType="java.lang.String" > //id对应的就是dao层接口里的方法名,必须一一对应
    select
    <include refid="Base_Column_List" />
    from t_fseinumpool
    where YEAR= #{year}
    </select>
    简单写一下,防止以后遗忘
  • 相关阅读:
    Storm—Storm集群搭建
    fis3工程化中的模块化开发
    rem、px、em(手机端h5页面屏幕适配的几种方法)
    最完整的React+Redux+router兼容ie8 修改!!!!
    移动端常见的一些兼容性问题
    移动端常见问题及解决方案
    EditorConfig 介绍
    当当主页
    JD主页
    react 项目的一个ie8兼容性问题
  • 原文地址:https://www.cnblogs.com/lovefaner/p/9687463.html
Copyright © 2011-2022 走看看