zoukankan      html  css  js  c++  java
  • columnPropertyUnsame

    <mapper namespace="com.abc.dao.IStudentDao">
        <insert id="insertStudent">
            insert into student(tname,tage,score) values(#{name}, #{age}, #{score})
        </insert>
        
        <delete id="deleteById">
            delete from student where tid=#{xxx}
        </delete>
        
        <update id="updateStudent">
            update student set tname=#{name}, tage=#{age}, score=#{score} where tid=#{id}
        </update>
        
        <select id="selectStudentById" resultType="Student">
            <!-- 给与属性名称不同的字段别名,让别名与属性名称相同 -->
            select tid id,tname name,tage age,score from student where tid=#{ooo}
        </select>
        
    </mapper>
    <mapper namespace="com.abc.dao.IStudentDao">
        <insert id="insertStudent">
            insert into student(tname,tage,score) values(#{name}, #{age}, #{score})
        </insert>
        
        <delete id="deleteById">
            delete from student where tid=#{xxx}
        </delete>
        
        <update id="updateStudent">
            update student set tname=#{name}, tage=#{age}, score=#{score} where tid=#{id}
        </update>
        
        <resultMap type="Student" id="studentMap">
            <id column="tid" property="id"/>
            <result column="tname" property="name"/>
            <result column="tage" property="age"/>
        </resultMap>
        
        <select id="selectStudentById" resultMap="studentMap">
            select tid,tname,tage,score from student where tid=#{ooo}
        </select>
        
    </mapper>
  • 相关阅读:
    SELFJOIN
    lLinux编程大全
    一个基础但是隐晦的c++语法问题
    cocos2dx内存优化
    iOS和android游戏纹理优化和内存优化(cocos2dx)
    STL学习小结
    C++11
    游戏资源打包
    C++ '__FILE__' and '__LINE__
    Cocos2dx纹理优化的一些方案
  • 原文地址:https://www.cnblogs.com/csslcww/p/9912392.html
Copyright © 2011-2022 走看看