MS-QJVSRANLTYEO\Administrator пре 4 година
родитељ
комит
7fd6398995

+ 43 - 1
Yijia-SaaS/yijia-market/src/main/java/com/yijia/market/domain/MarkertPlan.java

@@ -9,7 +9,7 @@ import com.yijia.common.core.domain.BaseEntity;
  * 营销方案对象 markert_plan
  * 
  * @author yijia
- * @date 2020-12-22
+ * @date 2021-01-23
  */
 public class MarkertPlan extends BaseEntity
 {
@@ -50,6 +50,18 @@ public class MarkertPlan extends BaseEntity
     @Excel(name = "优惠方案类型", readConverterExp = "1=满减方案,2,立减方案")
     private String discountPlanType;
 
+    /** 油品名称 */
+    @Excel(name = "油品名称")
+    private String oilName;
+
+    /** 油站id */
+    @Excel(name = "油站id")
+    private Long stationId;
+
+    /** 油站名称 */
+    @Excel(name = "油站名称")
+    private String stationName;
+
     public void setId(Long id) 
     {
         this.id = id;
@@ -131,6 +143,33 @@ public class MarkertPlan extends BaseEntity
     {
         return discountPlanType;
     }
+    public void setOilName(String oilName) 
+    {
+        this.oilName = oilName;
+    }
+
+    public String getOilName() 
+    {
+        return oilName;
+    }
+    public void setStationId(Long stationId) 
+    {
+        this.stationId = stationId;
+    }
+
+    public Long getStationId() 
+    {
+        return stationId;
+    }
+    public void setStationName(String stationName) 
+    {
+        this.stationName = stationName;
+    }
+
+    public String getStationName() 
+    {
+        return stationName;
+    }
 
     @Override
     public String toString() {
@@ -144,6 +183,9 @@ public class MarkertPlan extends BaseEntity
             .append("vipDiscountyPlus", getVipDiscountyPlus())
             .append("couponPlus", getCouponPlus())
             .append("discountPlanType", getDiscountPlanType())
+            .append("oilName", getOilName())
+            .append("stationId", getStationId())
+            .append("stationName", getStationName())
             .toString();
     }
 }

+ 16 - 1
Yijia-SaaS/yijia-market/src/main/resources/mapper/market/MarkertPlanMapper.xml

@@ -14,10 +14,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="vipDiscountyPlus"    column="vip_discounty_plus"    />
         <result property="couponPlus"    column="coupon_plus"    />
         <result property="discountPlanType"    column="discount_plan_type"    />
+        <result property="oilName"    column="oil_name"    />
+        <result property="stationId"    column="station_id"    />
+        <result property="stationName"    column="station_name"    />
     </resultMap>
 
     <sql id="selectMarkertPlanVo">
-        select id, grade, discount_term, discount_amt, gasoil_discount_amt, dieseloil_discount_amt, vip_discounty_plus, coupon_plus, discount_plan_type from markert_plan
+        select id, grade, discount_term, discount_amt, gasoil_discount_amt, dieseloil_discount_amt, vip_discounty_plus, coupon_plus, discount_plan_type, oil_name, station_id, station_name from markert_plan
     </sql>
 
     <select id="selectMarkertPlanList" parameterType="MarkertPlan" resultMap="MarkertPlanResult">
@@ -31,6 +34,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="vipDiscountyPlus != null  and vipDiscountyPlus != ''"> and vip_discounty_plus = #{vipDiscountyPlus}</if>
             <if test="couponPlus != null  and couponPlus != ''"> and coupon_plus = #{couponPlus}</if>
             <if test="discountPlanType != null  and discountPlanType != ''"> and discount_plan_type = #{discountPlanType}</if>
+            <if test="oilName != null  and oilName != ''"> and oil_name like concat('%', #{oilName}, '%')</if>
+            <if test="stationId != null "> and station_id = #{stationId}</if>
+            <if test="stationName != null  and stationName != ''"> and station_name like concat('%', #{stationName}, '%')</if>
         </where>
     </select>
     
@@ -50,6 +56,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="vipDiscountyPlus != null">vip_discounty_plus,</if>
             <if test="couponPlus != null">coupon_plus,</if>
             <if test="discountPlanType != null">discount_plan_type,</if>
+            <if test="oilName != null">oil_name,</if>
+            <if test="stationId != null">station_id,</if>
+            <if test="stationName != null">station_name,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="grade != null">#{grade},</if>
@@ -60,6 +69,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="vipDiscountyPlus != null">#{vipDiscountyPlus},</if>
             <if test="couponPlus != null">#{couponPlus},</if>
             <if test="discountPlanType != null">#{discountPlanType},</if>
+            <if test="oilName != null">#{oilName},</if>
+            <if test="stationId != null">#{stationId},</if>
+            <if test="stationName != null">#{stationName},</if>
          </trim>
     </insert>
 
@@ -74,6 +86,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="vipDiscountyPlus != null">vip_discounty_plus = #{vipDiscountyPlus},</if>
             <if test="couponPlus != null">coupon_plus = #{couponPlus},</if>
             <if test="discountPlanType != null">discount_plan_type = #{discountPlanType},</if>
+            <if test="oilName != null">oil_name = #{oilName},</if>
+            <if test="stationId != null">station_id = #{stationId},</if>
+            <if test="stationName != null">station_name = #{stationName},</if>
         </trim>
         where id = #{id}
     </update>