Prechádzať zdrojové kódy

客户设置增加油品名称

MS-QJVSRANLTYEO\Administrator 4 rokov pred
rodič
commit
e1eb7fc0e2

+ 43 - 1
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/domain/CustomerGradeSetting.java

@@ -11,7 +11,7 @@ import com.yijia.common.core.domain.BaseEntity;
  * 客户优惠等级设置对象 customer_grade_setting
  * 
  * @author yijia
- * @date 2021-01-12
+ * @date 2021-01-23
  */
 public class CustomerGradeSetting extends BaseEntity
 {
@@ -81,6 +81,18 @@ public class CustomerGradeSetting extends BaseEntity
     @Excel(name = "会员条件")
     private String memberCondit;
 
+    /** 油站id */
+    @Excel(name = "油站id")
+    private Long stationId;
+
+    /** 油站名称 */
+    @Excel(name = "油站名称")
+    private String stationName;
+
+    /** 油品名称 */
+    @Excel(name = "油品名称")
+    private String oilName;
+
     public void setId(Long id) 
     {
         this.id = id;
@@ -225,6 +237,33 @@ public class CustomerGradeSetting extends BaseEntity
     {
         return memberCondit;
     }
+    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;
+    }
+    public void setOilName(String oilName) 
+    {
+        this.oilName = oilName;
+    }
+
+    public String getOilName() 
+    {
+        return oilName;
+    }
 
     @Override
     public String toString() {
@@ -245,6 +284,9 @@ public class CustomerGradeSetting extends BaseEntity
             .append("date", getDate())
             .append("deductionGrowthValue", getDeductionGrowthValue())
             .append("memberCondit", getMemberCondit())
+            .append("stationId", getStationId())
+            .append("stationName", getStationName())
+            .append("oilName", getOilName())
             .toString();
     }
 }

+ 16 - 1
Yijia-SaaS/yijia-customer/src/main/resources/mapper/customer/CustomerGradeSettingMapper.xml

@@ -21,10 +21,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="date"    column="date"    />
         <result property="deductionGrowthValue"    column="deduction_growth_value"    />
         <result property="memberCondit"    column="member_condit"    />
+        <result property="stationId"    column="station_id"    />
+        <result property="stationName"    column="station_name"    />
+        <result property="oilName"    column="oil_name"    />
     </resultMap>
 
     <sql id="selectCustomerGradeSettingVo">
-        select id, grade, discount_way, gasoil_discount_litre, dieseloil_discount_litre, grade_type, gasoil_consume, gasoil_growth_value, dieseloil_consume, dieseloil_growth_value, member_recharge, member_growth_value, growth_value, date, deduction_growth_value, member_condit from customer_grade_setting
+        select id, grade, discount_way, gasoil_discount_litre, dieseloil_discount_litre, grade_type, gasoil_consume, gasoil_growth_value, dieseloil_consume, dieseloil_growth_value, member_recharge, member_growth_value, growth_value, date, deduction_growth_value, member_condit, station_id, station_name, oil_name from customer_grade_setting
     </sql>
 
     <select id="selectCustomerGradeSettingList" parameterType="CustomerGradeSetting" resultMap="CustomerGradeSettingResult">
@@ -45,6 +48,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="date != null "> and date = #{date}</if>
             <if test="deductionGrowthValue != null  and deductionGrowthValue != ''"> and deduction_growth_value = #{deductionGrowthValue}</if>
             <if test="memberCondit != null  and memberCondit != ''"> and member_condit = #{memberCondit}</if>
+            <if test="stationId != null "> and station_id = #{stationId}</if>
+            <if test="stationName != null  and stationName != ''"> and station_name like concat('%', #{stationName}, '%')</if>
+            <if test="oilName != null  and oilName != ''"> and oil_name like concat('%', #{oilName}, '%')</if>
         </where>
     </select>
     
@@ -71,6 +77,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="date != null">date,</if>
             <if test="deductionGrowthValue != null">deduction_growth_value,</if>
             <if test="memberCondit != null">member_condit,</if>
+            <if test="stationId != null">station_id,</if>
+            <if test="stationName != null">station_name,</if>
+            <if test="oilName != null">oil_name,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="grade != null">#{grade},</if>
@@ -88,6 +97,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="date != null">#{date},</if>
             <if test="deductionGrowthValue != null">#{deductionGrowthValue},</if>
             <if test="memberCondit != null">#{memberCondit},</if>
+            <if test="stationId != null">#{stationId},</if>
+            <if test="stationName != null">#{stationName},</if>
+            <if test="oilName != null">#{oilName},</if>
          </trim>
     </insert>
 
@@ -109,6 +121,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="date != null">date = #{date},</if>
             <if test="deductionGrowthValue != null">deduction_growth_value = #{deductionGrowthValue},</if>
             <if test="memberCondit != null">member_condit = #{memberCondit},</if>
+            <if test="stationId != null">station_id = #{stationId},</if>
+            <if test="stationName != null">station_name = #{stationName},</if>
+            <if test="oilName != null">oil_name = #{oilName},</if>
         </trim>
         where id = #{id}
     </update>