当前位置: 首页> 游戏> 手游 > 浙江住建局官方网站_中国贸易服务网_关键词排名推广怎么做_企业管理8大系统

浙江住建局官方网站_中国贸易服务网_关键词排名推广怎么做_企业管理8大系统

时间:2025/7/9 14:10:50来源:https://blog.csdn.net/qq_45089709/article/details/144721009 浏览次数:1次
浙江住建局官方网站_中国贸易服务网_关键词排名推广怎么做_企业管理8大系统

MyBatis中XML文件的模板

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapperPUBLIC "-//mybatis.org//DTD Mapper 3.0//EN""http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="generator.mapper.UsersMapper"><resultMap id="BaseResultMap" type="generator.domain.Users"><id property="id" column="id" jdbcType="INTEGER"/><result property="username" column="username" jdbcType="VARCHAR"/><result property="password" column="password" jdbcType="VARCHAR"/><result property="email" column="email" jdbcType="VARCHAR"/></resultMap><sql id="Base_Column_List">id,username,password,email</sql><select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">select<include refid="Base_Column_List" />from userswhere  id = #{id,jdbcType=INTEGER} </select><delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from userswhere  id = #{id,jdbcType=INTEGER} </delete><insert id="insert" keyColumn="id" keyProperty="id" parameterType="generator.domain.Users" useGeneratedKeys="true">insert into users( id,username,password,email)values (#{id,jdbcType=INTEGER},#{username,jdbcType=VARCHAR},#{password,jdbcType=VARCHAR},#{email,jdbcType=VARCHAR})</insert><insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="generator.domain.Users" useGeneratedKeys="true">insert into users<trim prefix="(" suffix=")" suffixOverrides=","><if test="id != null">id,</if><if test="username != null">username,</if><if test="password != null">password,</if><if test="email != null">email,</if></trim><trim prefix="values (" suffix=")" suffixOverrides=","><if test="id != null">#{id,jdbcType=INTEGER},</if><if test="username != null">#{username,jdbcType=VARCHAR},</if><if test="password != null">#{password,jdbcType=VARCHAR},</if><if test="email != null">#{email,jdbcType=VARCHAR},</if></trim></insert><update id="updateByPrimaryKeySelective" parameterType="generator.domain.Users">update users<set><if test="username != null">username = #{username,jdbcType=VARCHAR},</if><if test="password != null">password = #{password,jdbcType=VARCHAR},</if><if test="email != null">email = #{email,jdbcType=VARCHAR},</if></set>where   id = #{id,jdbcType=INTEGER} </update><update id="updateByPrimaryKey" parameterType="generator.domain.Users">update usersset username =  #{username,jdbcType=VARCHAR},password =  #{password,jdbcType=VARCHAR},email =  #{email,jdbcType=VARCHAR}where   id = #{id,jdbcType=INTEGER} </update>
</mapper>
关键字:浙江住建局官方网站_中国贸易服务网_关键词排名推广怎么做_企业管理8大系统

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: