<?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="com.newfiber.api.pc.dao.EventsManage.BoundaryTabletDao" > <resultMap id="BaseResultMap" type="com.newfiber.api.pc.model.EventsManage.BoundaryTablet" > <id column="Serial" property="serial" jdbcType="BIGINT" /> <result column="DivisionNo" property="divisionno" jdbcType="VARCHAR" /> <result column="Tablet_No" property="tabletNo" jdbcType="VARCHAR" /> <result column="Manage_Department" property="manageDepartment" jdbcType="NVARCHAR" /> <result column="Height" property="height" jdbcType="NUMERIC" /> <result column="PointX" property="pointx" jdbcType="VARCHAR" /> <result column="PointY" property="pointy" jdbcType="VARCHAR" /> <result column="Relation_Name" property="relationName" jdbcType="NVARCHAR" /> <result column="Relation_Tel" property="relationTel" jdbcType="VARCHAR" /> <result column="Pic_No" property="picNo" jdbcType="VARCHAR" /> <result column="Create_User_No" property="createUserNo" jdbcType="VARCHAR" /> <result column="Create_User_Name" property="createUserName" jdbcType="VARCHAR" /> <result column="Create_Time" property="createTime" jdbcType="TIMESTAMP" /> <result column="Update_User_No" property="updateUserNo" jdbcType="VARCHAR" /> <result column="Update_User_Name" property="updateUserName" jdbcType="NVARCHAR" /> <result column="Update_Time" property="updateTime" jdbcType="TIMESTAMP" /> <result column="Tablet_Type" property="tabletType" jdbcType="INTEGER" /> <result column="Tablet_Type_Name" property="tabletTypeName" jdbcType="NVARCHAR" /> </resultMap> <sql id="Example_Where_Clause" > <where > <foreach collection="oredCriteria" item="criteria" separator="or" > <if test="criteria.valid" > <trim prefix="(" suffix=")" prefixOverrides="and" > <foreach collection="criteria.criteria" item="criterion" > <choose > <when test="criterion.noValue" > and ${criterion.condition} </when> <when test="criterion.singleValue" > and ${criterion.condition} #{criterion.value} </when> <when test="criterion.betweenValue" > and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} </when> <when test="criterion.listValue" > and ${criterion.condition} <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," > #{listItem} </foreach> </when> </choose> </foreach> </trim> </if> </foreach> </where> </sql> <sql id="Update_By_Example_Where_Clause" > <where > <foreach collection="example.oredCriteria" item="criteria" separator="or" > <if test="criteria.valid" > <trim prefix="(" suffix=")" prefixOverrides="and" > <foreach collection="criteria.criteria" item="criterion" > <choose > <when test="criterion.noValue" > and ${criterion.condition} </when> <when test="criterion.singleValue" > and ${criterion.condition} #{criterion.value} </when> <when test="criterion.betweenValue" > and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} </when> <when test="criterion.listValue" > and ${criterion.condition} <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," > #{listItem} </foreach> </when> </choose> </foreach> </trim> </if> </foreach> </where> </sql> <sql id="Base_Column_List" > <if test="fields == null" > Serial, DivisionNo, Tablet_No, Manage_Department, Height, PointX, PointY, Relation_Name, Relation_Tel, Pic_No, Create_User_No, Create_User_Name, Create_Time, Update_User_No, Update_User_Name, Update_Time, Tablet_Type, Tablet_Type_Name </if> <if test="fields != null" > ${fields} </if> </sql> <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.newfiber.api.pc.model.EventsManage.BoundaryTabletQuery" > select b.Serial, b.DivisionNo, b.Tablet_No, b.Manage_Department, b.Height, b.PointX, b.PointY, b.Relation_Name, b.Relation_Tel, b.Pic_No, b.Create_User_No, b.Create_User_Name, DATE_FORMAT(b.Create_Time,'%Y-%m-%d %T') formatTime, b.Update_User_No, b.Update_User_Name, b.Update_Time, b.Tablet_Type, b.Tablet_Type_Name, d.Division_Name divisionName from boundary_tablet b INNER JOIN administrative_division d ON b.DivisionNo = d.Division_No <if test="_parameter != null" > <include refid="Example_Where_Clause" /> </if> <if test="startRow != null" > ORDER BY b.Serial limit #{startRow},#{pageSize} </if> </select> <delete id="deleteByExample" parameterType="com.newfiber.api.pc.model.EventsManage.BoundaryTabletQuery" > delete from boundary_tablet <if test="_parameter != null" > <include refid="Example_Where_Clause" /> </if> </delete> <insert id="insertSelective" parameterType="com.newfiber.api.pc.model.EventsManage.BoundaryTablet" > insert into boundary_tablet <trim prefix="(" suffix=")" suffixOverrides="," > <if test="serial != null" > Serial, </if> <if test="divisionno != null" > DivisionNo, </if> <if test="tabletNo != null" > Tablet_No, </if> <if test="manageDepartment != null" > Manage_Department, </if> <if test="height != null" > Height, </if> <if test="pointx != null" > PointX, </if> <if test="pointy != null" > PointY, </if> <if test="relationName != null" > Relation_Name, </if> <if test="relationTel != null" > Relation_Tel, </if> <if test="picNo != null" > Pic_No, </if> <if test="createUserNo != null" > Create_User_No, </if> <if test="createUserName != null" > Create_User_Name, </if> <if test="createTime != null" > Create_Time, </if> <if test="updateUserNo != null" > Update_User_No, </if> <if test="updateUserName != null" > Update_User_Name, </if> <if test="updateTime != null" > Update_Time, </if> <if test="tabletType != null" > Tablet_Type, </if> <if test="tabletTypeName != null" > Tablet_Type_Name, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides="," > <if test="serial != null" > #{serial,jdbcType=BIGINT}, </if> <if test="divisionno != null" > #{divisionno,jdbcType=VARCHAR}, </if> <if test="tabletNo != null" > #{tabletNo,jdbcType=VARCHAR}, </if> <if test="manageDepartment != null" > #{manageDepartment,jdbcType=NVARCHAR}, </if> <if test="height != null" > #{height,jdbcType=NUMERIC}, </if> <if test="pointx != null" > #{pointx,jdbcType=VARCHAR}, </if> <if test="pointy != null" > #{pointy,jdbcType=VARCHAR}, </if> <if test="relationName != null" > #{relationName,jdbcType=NVARCHAR}, </if> <if test="relationTel != null" > #{relationTel,jdbcType=VARCHAR}, </if> <if test="picNo != null" > #{picNo,jdbcType=VARCHAR}, </if> <if test="createUserNo != null" > #{createUserNo,jdbcType=VARCHAR}, </if> <if test="createUserName != null" > #{createUserName,jdbcType=VARCHAR}, </if> <if test="createTime != null" > #{createTime,jdbcType=TIMESTAMP}, </if> <if test="updateUserNo != null" > #{updateUserNo,jdbcType=VARCHAR}, </if> <if test="updateUserName != null" > #{updateUserName,jdbcType=NVARCHAR}, </if> <if test="updateTime != null" > #{updateTime,jdbcType=TIMESTAMP}, </if> <if test="tabletType != null" > #{tabletType,jdbcType=INTEGER}, </if> <if test="tabletTypeName != null" > #{tabletTypeName,jdbcType=NVARCHAR}, </if> </trim> </insert> <select id="countByExample" parameterType="com.newfiber.api.pc.model.EventsManage.BoundaryTabletQuery" resultType="java.lang.Integer" > select count(*) from boundary_tablet <if test="_parameter != null" > <include refid="Example_Where_Clause" /> </if> </select> <update id="updateByExampleSelective" parameterType="map" > update boundary_tablet <set > <if test="record.serial != null" > Serial = #{record.serial,jdbcType=BIGINT}, </if> <if test="record.divisionno != null" > DivisionNo = #{record.divisionno,jdbcType=VARCHAR}, </if> <if test="record.tabletNo != null" > Tablet_No = #{record.tabletNo,jdbcType=VARCHAR}, </if> <if test="record.manageDepartment != null" > Manage_Department = #{record.manageDepartment,jdbcType=NVARCHAR}, </if> <if test="record.height != null" > Height = #{record.height,jdbcType=NUMERIC}, </if> <if test="record.pointx != null" > PointX = #{record.pointx,jdbcType=VARCHAR}, </if> <if test="record.pointy != null" > PointY = #{record.pointy,jdbcType=VARCHAR}, </if> <if test="record.relationName != null" > Relation_Name = #{record.relationName,jdbcType=NVARCHAR}, </if> <if test="record.relationTel != null" > Relation_Tel = #{record.relationTel,jdbcType=VARCHAR}, </if> <if test="record.picNo != null" > Pic_No = #{record.picNo,jdbcType=VARCHAR}, </if> <if test="record.createUserNo != null" > Create_User_No = #{record.createUserNo,jdbcType=VARCHAR}, </if> <if test="record.createUserName != null" > Create_User_Name = #{record.createUserName,jdbcType=VARCHAR}, </if> <if test="record.createTime != null" > Create_Time = #{record.createTime,jdbcType=TIMESTAMP}, </if> <if test="record.updateUserNo != null" > Update_User_No = #{record.updateUserNo,jdbcType=VARCHAR}, </if> <if test="record.updateUserName != null" > Update_User_Name = #{record.updateUserName,jdbcType=NVARCHAR}, </if> <if test="record.updateTime != null" > Update_Time = #{record.updateTime,jdbcType=TIMESTAMP}, </if> <if test="record.tabletType != null" > Tablet_Type = #{record.tabletType,jdbcType=INTEGER}, </if> <if test="record.tabletTypeName != null" > Tablet_Type_Name = #{record.tabletTypeName,jdbcType=NVARCHAR}, </if> </set> <if test="_parameter != null" > <include refid="Update_By_Example_Where_Clause" /> </if> </update> </mapper>