xiao547607 4 年 前
コミット
4309aec784
1 ファイル変更8 行追加142 行削除
  1. 8 142
      common/src/main/resources/mapper/bus/VehicleInfo.xml

+ 8 - 142
common/src/main/resources/mapper/bus/VehicleInfo.xml

@@ -1,41 +1,8 @@
 <?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">
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <!-- namespace必须指向DAO接口 -->
 <mapper namespace="com.jpsoft.bus.modules.bus.dao.VehicleInfoDAO">
-	<resultMap id="VehicleInfoMap" type="com.jpsoft.bus.modules.bus.entity.VehicleInfo">
-		<id property="id" column="id_" />
-			<result property="routeId" column="route_id" />
-			<result property="licensePlateNumber" column="license_plate_number" />
-			<result property="activationCode" column="activation_code"/>
-			<result property="gpsDeviceNo" column="gps_device_no" />
-			<result property="deviceNo" column="device_no" />
-			<result property="picture" column="picture_" />
-			<result property="loadNumber" column="load_number" />
-			<result property="longitude" column="longitude_" />
-			<result property="latitude" column="latitude_" />
-			<result property="status" column="status_" />
-			<result property="createBy" column="create_by" />
-			<result property="createTime" column="create_time" />
-			<result property="updateBy" column="update_by" />
-			<result property="updateTime" column="update_time" />
-			<result property="delFlag" column="del_flag" />
-			<result property="companyId" column="company_id" />
-			<result property="running" column="running_" />
-			<result property="acc" column="acc_" />
-			<result property="online" column="online_" />
-			<result property="latestAddress" column="latest_address" />
-			<result property="routeName" column="route_name" />
-			<result property="accountId" column="account_id" />
-			<result property="accountName" column="account_name" />
-			</resultMap>
-	<insert id="insert" parameterType="com.jpsoft.bus.modules.bus.entity.VehicleInfo">
-	<!--
-	<selectKey resultType="java.lang.String" order="BEFORE" keyProperty="id">
-		select sys_guid() from dual
-	</selectKey>
-	-->
-	<![CDATA[
     <resultMap id="VehicleInfoMap" type="com.jpsoft.bus.modules.bus.entity.VehicleInfo">
         <id property="id" column="id_"/>
         <result property="routeId" column="route_id"/>
@@ -60,6 +27,8 @@
         <result property="latestAddress" column="latest_address"/>
         <result property="routeName" column="route_name"/>
         <result property="trailInterval" column="trail_interval"/>
+        <result property="accountId" column="account_id" />
+        <result property="accountName" column="account_name" />
     </resultMap>
     <insert id="insert" parameterType="com.jpsoft.bus.modules.bus.entity.VehicleInfo">
         <!--
@@ -71,33 +40,10 @@
 		insert into bus_vehicle_info
 	    (id_,route_id,license_plate_number,activation_code,gps_device_no,device_no,picture_,
 	    load_number,longitude_,latitude_,status_,create_by,create_time,update_by,
-	    update_time,del_flag,company_id,running_,acc_,online_,latest_address,trail_interval)
-	    (id_,route_id,license_plate_number,activation_code,gps_device_no,device_no,picture_,load_number,longitude_,latitude_,status_,create_by,create_time,update_by,update_time,del_flag,company_id,running_,acc_,online_,latest_address,
+	    update_time,del_flag,company_id,running_,acc_,online_,latest_address,trail_interval,
 	    account_id)
 		values
 		(
-#{id,jdbcType=VARCHAR}
-,#{routeId,jdbcType=VARCHAR}
-,#{licensePlateNumber,jdbcType=VARCHAR}
-,#{activationCode,jdbcType=VARCHAR}
-,#{gpsDeviceNo,jdbcType=VARCHAR}
-,#{deviceNo,jdbcType=VARCHAR}
-,#{picture,jdbcType=VARCHAR}
-,#{loadNumber,jdbcType= NUMERIC }
-,#{longitude,jdbcType=VARCHAR}
-,#{latitude,jdbcType=VARCHAR}
-,#{status,jdbcType=VARCHAR}
-,#{createBy,jdbcType=VARCHAR}
-,#{createTime,jdbcType= TIMESTAMP }
-,#{updateBy,jdbcType=VARCHAR}
-,#{updateTime,jdbcType= TIMESTAMP }
-,#{delFlag,jdbcType= NUMERIC }
-,#{companyId,jdbcType=VARCHAR}
-,#{running,jdbcType= NUMERIC }
-,#{acc,jdbcType= NUMERIC }
-,#{online,jdbcType= NUMERIC }
-,#{latestAddress,jdbcType=VARCHAR}
-,#{accountId,jdbcType=VARCHAR}
 			#{id,jdbcType=VARCHAR}
 			,#{routeId,jdbcType=VARCHAR}
 			,#{licensePlateNumber,jdbcType=VARCHAR}
@@ -120,92 +66,9 @@
 			,#{online,jdbcType= NUMERIC }
 			,#{latestAddress,jdbcType=VARCHAR}
 			,#{trailInterval,jdbcType= NUMERIC}
+			,#{accountId,jdbcType=VARCHAR}
 		)
 	]]>
-	</insert>
-	<delete id="delete" parameterType="string">
-		delete from bus_vehicle_info where id_=#{id,jdbcType=VARCHAR}
-	</delete>
-	<update id="update" parameterType="com.jpsoft.bus.modules.bus.entity.VehicleInfo">
-		update bus_vehicle_info
-		<set>
-				<if test="routeId!=null">
-		route_id=#{routeId,jdbcType=VARCHAR},
-		</if>
-				<if test="licensePlateNumber!=null">
-		license_plate_number=#{licensePlateNumber,jdbcType=VARCHAR},
-		</if>
-			<if test="activationCode!=null">
-				activation_code=#{activationCode,jdbcType=VARCHAR},
-			</if>
-				<if test="gpsDeviceNo!=null">
-		gps_device_no=#{gpsDeviceNo,jdbcType=VARCHAR},
-		</if>
-				<if test="deviceNo!=null">
-		device_no=#{deviceNo,jdbcType=VARCHAR},
-		</if>
-				<if test="picture!=null">
-		picture_=#{picture,jdbcType=VARCHAR},
-		</if>
-				<if test="loadNumber!=null">
-		load_number=#{loadNumber,jdbcType= NUMERIC },
-		</if>
-				<if test="longitude!=null">
-		longitude_=#{longitude,jdbcType=VARCHAR},
-		</if>
-				<if test="latitude!=null">
-		latitude_=#{latitude,jdbcType=VARCHAR},
-		</if>
-				<if test="status!=null">
-		status_=#{status,jdbcType=VARCHAR},
-		</if>
-				<if test="createBy!=null">
-		create_by=#{createBy,jdbcType=VARCHAR},
-		</if>
-				<if test="createTime!=null">
-		create_time=#{createTime,jdbcType= TIMESTAMP },
-		</if>
-				<if test="updateBy!=null">
-		update_by=#{updateBy,jdbcType=VARCHAR},
-		</if>
-				<if test="updateTime!=null">
-		update_time=#{updateTime,jdbcType= TIMESTAMP },
-		</if>
-				<if test="delFlag!=null">
-		del_flag=#{delFlag,jdbcType= NUMERIC },
-		</if>
-				<if test="companyId!=null">
-		company_id=#{companyId,jdbcType=VARCHAR},
-		</if>
-				<if test="running!=null">
-		running_=#{running,jdbcType= NUMERIC },
-		</if>
-				<if test="acc!=null">
-		acc_=#{acc,jdbcType= NUMERIC },
-		</if>
-				<if test="online!=null">
-		online_=#{online,jdbcType= NUMERIC },
-		</if>
-				<if test="latestAddress!=null">
-		latest_address=#{latestAddress,jdbcType=VARCHAR},
-		</if>
-			<if test="accountId!=null">
-				account_id=#{accountId,jdbcType=VARCHAR},
-			</if>
-		</set>
-	where id_=#{id}
-	</update>
-	<select id="get" parameterType="string" resultMap="VehicleInfoMap">
-		select * from bus_vehicle_info where id_=#{0}
-	</select>
-	<select id="exist" parameterType="string" resultType="int">
-		select count(*) from bus_vehicle_info where id_=#{0}
-	</select>
-	<select id="list" resultMap="VehicleInfoMap">
-		select * from bus_vehicle_info
-	</select>
-	<select id="search" parameterType="hashmap" resultMap="VehicleInfoMap">
-		<![CDATA[
     </insert>
     <delete id="delete" parameterType="string">
         delete from bus_vehicle_info where id_=#{id,jdbcType=VARCHAR}
@@ -276,6 +139,9 @@
             <if test="trailInterval!=null">
                 trail_interval=#{trailInterval,jdbcType=VARCHAR},
             </if>
+            <if test="accountId!=null">
+                account_id=#{accountId,jdbcType=VARCHAR},
+            </if>
         </set>
         where id_=#{id}
     </update>