Quellcode durchsuchen

目的地添加里程

jz.kai vor 2 Jahren
Ursprung
Commit
1fc1047c14

+ 2 - 0
common/src/main/java/com/jpsoft/prices/modules/base/entity/Destination.java

@@ -25,6 +25,8 @@ public class Destination {
     private String parentFullName;
         @ApiModelProperty(value = "名称")
     private String name;
+        @ApiModelProperty(value = "里程(公里)")
+    private String mileage;
         @ApiModelProperty(value = "是否删除")
     private Boolean delFlag;
         @DateTimeFormat(pattern="yyyy-MM-dd HH:mm")

+ 9 - 4
common/src/main/resources/mapper/base/Destination.xml

@@ -8,6 +8,7 @@
 		<result property="parentId" column="parent_id" />
 		<result property="code" column="code_" />
 		<result property="name" column="name_" />
+		<result property="mileage" column="mileage_" />
 		<result property="delFlag" column="del_flag" />
 		<result property="createTime" column="create_time" />
 		<result property="createBy" column="create_by" />
@@ -22,13 +23,14 @@
 	-->
 	<![CDATA[
 		insert into base_destination
-	    (id_,parent_id,code_,name_,del_flag,create_time,create_by,update_time,update_by)
+	    (id_,parent_id,code_,name_,mileage_,del_flag,create_time,create_by,update_time,update_by)
 		values
 		(
 #{id,jdbcType=VARCHAR}
 ,#{parentId,jdbcType=VARCHAR}
 ,#{code,jdbcType=VARCHAR}
 ,#{name,jdbcType=VARCHAR}
+,#{mileage,jdbcType= NUMERIC }
 ,#{delFlag,jdbcType= NUMERIC }
 ,#{createTime,jdbcType= TIMESTAMP }
 ,#{createBy,jdbcType=VARCHAR}
@@ -52,9 +54,12 @@
 				<if test="name!=null">
 		name_=#{name,jdbcType=VARCHAR},
 		</if>
-				<if test="delFlag!=null">
-		del_flag=#{delFlag,jdbcType= NUMERIC },
+				<if test="mileage!=null">
+		mileage_=#{mileage,jdbcType= NUMERIC },
 		</if>
+			<if test="delFlag!=null">
+				del_flag=#{delFlag,jdbcType= NUMERIC },
+			</if>
 				<if test="createTime!=null">
 		create_time=#{createTime,jdbcType= TIMESTAMP },
 		</if>
@@ -72,7 +77,7 @@
 	</update>
 	<select id="get" parameterType="string" resultMap="DestinationMap">
 		select 
-id_,parent_id,code_,name_,del_flag,create_time,create_by,update_time,update_by		from base_destination where id_=#{0}
+id_,parent_id,code_,name_,mileage_,del_flag,create_time,create_by,update_time,update_by		from base_destination where id_=#{0}
 	</select>
 	<select id="exist" parameterType="string" resultType="int">
 		select count(*) from base_destination where id_=#{0}