|
@@ -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>
|