Browse Source

添加油枪类型

jk-GitHub-coder 4 năm trước cách đây
mục cha
commit
1493ba588e

+ 11 - 1
YijiaRestful/src/main/java/com/platform/yijia/pojo/StationOilGun.java

@@ -76,6 +76,16 @@ public class StationOilGun {
      */
     private String status;
 
+    private String oilGunType;
+
+    public String getOilGunType() {
+        return oilGunType;
+    }
+
+    public void setOilGunType(String oilGunType) {
+        this.oilGunType = oilGunType;
+    }
+
     /**
      * This method was generated by MyBatis Generator.
      * This method returns the value of the database column station_oil_gun.oil_gun_id
@@ -267,4 +277,4 @@ public class StationOilGun {
     public void setStatus(String status) {
         this.status = status == null ? null : status.trim();
     }
-}
+}

+ 6 - 1
YijiaRestful/src/main/java/com/platform/yijia/pojo/StationOilGunExample.java

@@ -715,6 +715,11 @@ public class StationOilGunExample {
             addCriterion("status not between", value1, value2, "status");
             return (Criteria) this;
         }
+
+        public Criteria andOilGunTypeEqualTo(String value) {
+            addCriterion("oil_gun_type =", value, "oilGunType");
+            return (Criteria) this;
+        }
     }
 
     /**
@@ -821,4 +826,4 @@ public class StationOilGunExample {
             this(condition, value, secondValue, null);
         }
     }
-}
+}

+ 20 - 5
YijiaRestful/src/main/resources/mapper/StationOilGunMapper.xml

@@ -14,6 +14,7 @@
     <result column="station_name" jdbcType="VARCHAR" property="stationName" />
     <result column="date" jdbcType="TIMESTAMP" property="date" />
     <result column="status" jdbcType="VARCHAR" property="status" />
+    <result column="oil_gun_type" jdbcType="VARCHAR" property="oilGunType" />
   </resultMap>
   <sql id="Example_Where_Clause">
     <!--
@@ -86,7 +87,7 @@
       WARNING - @mbg.generated
       This element is automatically generated by MyBatis Generator, do not modify.
     -->
-    oil_gun_id, oil_gun_no, oil_name, oil_price, station_id, station_name, date, status
+    oil_gun_id, oil_gun_no, oil_name, oil_price, station_id, station_name, date, status, oil_gun_type
   </sql>
   <select id="selectByExample" parameterType="com.platform.yijia.pojo.StationOilGunExample" resultMap="BaseResultMap">
     <!--
@@ -140,10 +141,10 @@
       This element is automatically generated by MyBatis Generator, do not modify.
     -->
     insert into station_oil_gun (oil_gun_id, oil_gun_no, oil_name,
-      oil_price, station_id, station_name,
+      oil_price, station_id, station_name, oil_gun_type,
       date, status)
     values (#{oilGunId,jdbcType=INTEGER}, #{oilGunNo,jdbcType=VARCHAR}, #{oilName,jdbcType=VARCHAR},
-      #{oilPrice,jdbcType=DECIMAL}, #{stationId,jdbcType=INTEGER}, #{stationName,jdbcType=VARCHAR},
+      #{oilPrice,jdbcType=DECIMAL}, #{stationId,jdbcType=INTEGER}, #{stationName,jdbcType=VARCHAR}, #{oilGunType,jdbcType=VARCHAR},
       #{date,jdbcType=TIMESTAMP}, #{status,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.platform.yijia.pojo.StationOilGun">
@@ -177,6 +178,9 @@
       <if test="status != null">
         status,
       </if>
+      <if test="oilGunType != null">
+        oil_gun_type,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="oilGunId != null">
@@ -203,6 +207,9 @@
       <if test="status != null">
         #{status,jdbcType=VARCHAR},
       </if>
+      <if test="oilGunType != null">
+        #{oilGunType,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <select id="countByExample" parameterType="com.platform.yijia.pojo.StationOilGunExample" resultType="java.lang.Long">
@@ -246,6 +253,9 @@
       <if test="record.status != null">
         status = #{record.status,jdbcType=VARCHAR},
       </if>
+      <if test="record.oilGunType != null">
+        oil_gun_type = #{record.oilGunType,jdbcType=VARCHAR},
+      </if>
     </set>
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -264,7 +274,8 @@
       station_id = #{record.stationId,jdbcType=INTEGER},
       station_name = #{record.stationName,jdbcType=VARCHAR},
       date = #{record.date,jdbcType=TIMESTAMP},
-      status = #{record.status,jdbcType=VARCHAR}
+      status = #{record.status,jdbcType=VARCHAR},
+     oil_gun_type = #{record.oilGunType,jdbcType=VARCHAR}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -297,6 +308,9 @@
       <if test="status != null">
         status = #{status,jdbcType=VARCHAR},
       </if>
+      <if test="oilGunType != null">
+        oil_gun_type = #{oilGunType,jdbcType=VARCHAR},
+      </if>
     </set>
     where oil_gun_id = #{oilGunId,jdbcType=INTEGER}
   </update>
@@ -312,7 +326,8 @@
       station_id = #{stationId,jdbcType=INTEGER},
       station_name = #{stationName,jdbcType=VARCHAR},
       date = #{date,jdbcType=TIMESTAMP},
-      status = #{status,jdbcType=VARCHAR}
+      status = #{status,jdbcType=VARCHAR},
+    oil_gun_type = #{oilGunType,jdbcType=VARCHAR}
     where oil_gun_id = #{oilGunId,jdbcType=INTEGER}
   </update>