Ver código fonte

客戶設置

MS-QJVSRANLTYEO\Administrator 4 anos atrás
pai
commit
2e42caea58

+ 226 - 29
Yijia-SaaS/yijia-customer/src/main/java/com/yijia/customer/domain/CustomerManage.java

@@ -1,5 +1,6 @@
 package com.yijia.customer.domain;
 
+import java.math.BigDecimal;
 import java.util.Date;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import org.apache.commons.lang3.builder.ToStringBuilder;
@@ -11,7 +12,7 @@ import com.yijia.common.core.domain.BaseEntity;
  * 客户管理对象 customer_manage
  * 
  * @author yijia
- * @date 2020-12-21
+ * @date 2021-01-22
  */
 public class CustomerManage extends BaseEntity
 {
@@ -20,8 +21,8 @@ public class CustomerManage extends BaseEntity
     /** $column.columnComment */
     private Long id;
 
-    /** 会员id */
-    @Excel(name = "会员id")
+    /** 会员id */
+    @Excel(name = "会员id")
     private String memberId;
 
     /** 客户姓名 */
@@ -44,17 +45,13 @@ public class CustomerManage extends BaseEntity
     @Excel(name = "车牌号")
     private String carNumber;
 
-    /** 油品 */
-    @Excel(name = "油品")
-    private String oils;
-
     /** 余额 */
     @Excel(name = "余额")
-    private String balance;
+    private BigDecimal balance;
 
     /** 积分 */
     @Excel(name = "积分")
-    private String integral;
+    private Long integral;
 
     /** 专车类型 */
     @Excel(name = "专车类型")
@@ -71,7 +68,67 @@ public class CustomerManage extends BaseEntity
 
     /** 油站名称 */
     @Excel(name = "油站名称")
-    private String stationNam;
+    private String stationName;
+
+    /** 柴油等级 */
+    @Excel(name = "柴油等级")
+    private String cyGrade;
+
+    /** 汽油等级 */
+    @Excel(name = "汽油等级")
+    private String qyGrade;
+
+    /** 柴油加油总升数 */
+    @Excel(name = "柴油加油总升数")
+    private BigDecimal cyLiters;
+
+    /** 汽油加油总升数 */
+    @Excel(name = "汽油加油总升数")
+    private BigDecimal qyLiters;
+
+    /** 柴油加油消费总金额 */
+    @Excel(name = "柴油加油消费总金额")
+    private BigDecimal cyAmt;
+
+    /** 汽油加油消费总金额 */
+    @Excel(name = "汽油加油消费总金额")
+    private BigDecimal qyAmt;
+
+    /** 公众号openid */
+    @Excel(name = "公众号openid")
+    private String blogOpenid;
+
+    /** 小程序openid */
+    @Excel(name = "小程序openid")
+    private String minaOpenid;
+
+    /** 公众号userid */
+    @Excel(name = "公众号userid")
+    private Long blogUserId;
+
+    /** 小程序的userid */
+    @Excel(name = "小程序的userid")
+    private Long minaUserId;
+
+    /** 油品名称 */
+    @Excel(name = "油品名称")
+    private String oilName;
+
+    /** 等级 */
+    @Excel(name = "等级")
+    private String grade;
+
+    /** 总升数 */
+    @Excel(name = "总升数")
+    private BigDecimal liters;
+
+    /** 总金额 */
+    @Excel(name = "总金额")
+    private BigDecimal amt;
+
+    /** 微信UnionID */
+    @Excel(name = "微信UnionID")
+    private String unionId;
 
     public void setId(Long id) 
     {
@@ -136,30 +193,21 @@ public class CustomerManage extends BaseEntity
     {
         return carNumber;
     }
-    public void setOils(String oils) 
-    {
-        this.oils = oils;
-    }
-
-    public String getOils() 
-    {
-        return oils;
-    }
-    public void setBalance(String balance) 
+    public void setBalance(BigDecimal balance) 
     {
         this.balance = balance;
     }
 
-    public String getBalance() 
+    public BigDecimal getBalance() 
     {
         return balance;
     }
-    public void setIntegral(String integral) 
+    public void setIntegral(Long integral) 
     {
         this.integral = integral;
     }
 
-    public String getIntegral() 
+    public Long getIntegral() 
     {
         return integral;
     }
@@ -190,14 +238,149 @@ public class CustomerManage extends BaseEntity
     {
         return stationId;
     }
-    public void setStationNam(String stationNam) 
+    public void setStationName(String stationName) 
+    {
+        this.stationName = stationName;
+    }
+
+    public String getStationName() 
+    {
+        return stationName;
+    }
+    public void setCyGrade(String cyGrade) 
+    {
+        this.cyGrade = cyGrade;
+    }
+
+    public String getCyGrade() 
+    {
+        return cyGrade;
+    }
+    public void setQyGrade(String qyGrade) 
+    {
+        this.qyGrade = qyGrade;
+    }
+
+    public String getQyGrade() 
+    {
+        return qyGrade;
+    }
+    public void setCyLiters(BigDecimal cyLiters) 
+    {
+        this.cyLiters = cyLiters;
+    }
+
+    public BigDecimal getCyLiters() 
+    {
+        return cyLiters;
+    }
+    public void setQyLiters(BigDecimal qyLiters) 
+    {
+        this.qyLiters = qyLiters;
+    }
+
+    public BigDecimal getQyLiters() 
+    {
+        return qyLiters;
+    }
+    public void setCyAmt(BigDecimal cyAmt) 
+    {
+        this.cyAmt = cyAmt;
+    }
+
+    public BigDecimal getCyAmt() 
+    {
+        return cyAmt;
+    }
+    public void setQyAmt(BigDecimal qyAmt) 
+    {
+        this.qyAmt = qyAmt;
+    }
+
+    public BigDecimal getQyAmt() 
+    {
+        return qyAmt;
+    }
+    public void setBlogOpenid(String blogOpenid) 
+    {
+        this.blogOpenid = blogOpenid;
+    }
+
+    public String getBlogOpenid() 
+    {
+        return blogOpenid;
+    }
+    public void setMinaOpenid(String minaOpenid) 
+    {
+        this.minaOpenid = minaOpenid;
+    }
+
+    public String getMinaOpenid() 
+    {
+        return minaOpenid;
+    }
+    public void setBlogUserId(Long blogUserId) 
+    {
+        this.blogUserId = blogUserId;
+    }
+
+    public Long getBlogUserId() 
+    {
+        return blogUserId;
+    }
+    public void setMinaUserId(Long minaUserId) 
+    {
+        this.minaUserId = minaUserId;
+    }
+
+    public Long getMinaUserId() 
+    {
+        return minaUserId;
+    }
+    public void setOilName(String oilName) 
+    {
+        this.oilName = oilName;
+    }
+
+    public String getOilName() 
+    {
+        return oilName;
+    }
+    public void setGrade(String grade) 
+    {
+        this.grade = grade;
+    }
+
+    public String getGrade() 
+    {
+        return grade;
+    }
+    public void setLiters(BigDecimal liters) 
+    {
+        this.liters = liters;
+    }
+
+    public BigDecimal getLiters() 
+    {
+        return liters;
+    }
+    public void setAmt(BigDecimal amt) 
+    {
+        this.amt = amt;
+    }
+
+    public BigDecimal getAmt() 
+    {
+        return amt;
+    }
+    public void setUnionId(String unionId) 
     {
-        this.stationNam = stationNam;
+        this.unionId = unionId;
     }
 
-    public String getStationNam() 
+    public String getUnionId() 
     {
-        return stationNam;
+        return unionId;
     }
 
     @Override
@@ -210,13 +393,27 @@ public class CustomerManage extends BaseEntity
             .append("memberGrade", getMemberGrade())
             .append("phoneNumber", getPhoneNumber())
             .append("carNumber", getCarNumber())
-            .append("oils", getOils())
             .append("balance", getBalance())
             .append("integral", getIntegral())
             .append("specialCarType", getSpecialCarType())
             .append("regtime", getRegtime())
             .append("stationId", getStationId())
-            .append("stationNam", getStationNam())
+            .append("stationName", getStationName())
+            .append("cyGrade", getCyGrade())
+            .append("qyGrade", getQyGrade())
+            .append("cyLiters", getCyLiters())
+            .append("qyLiters", getQyLiters())
+            .append("cyAmt", getCyAmt())
+            .append("qyAmt", getQyAmt())
+            .append("blogOpenid", getBlogOpenid())
+            .append("minaOpenid", getMinaOpenid())
+            .append("blogUserId", getBlogUserId())
+            .append("minaUserId", getMinaUserId())
+            .append("oilName", getOilName())
+            .append("grade", getGrade())
+            .append("liters", getLiters())
+            .append("amt", getAmt())
+            .append("unionId", getUnionId())
             .toString();
     }
 }

+ 84 - 16
Yijia-SaaS/yijia-customer/src/main/resources/mapper/customer/CustomerManageMapper.xml

@@ -12,17 +12,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="memberGrade"    column="member_grade"    />
         <result property="phoneNumber"    column="phone_number"    />
         <result property="carNumber"    column="car_number"    />
-        <result property="oils"    column="oils"    />
         <result property="balance"    column="balance"    />
         <result property="integral"    column="integral"    />
         <result property="specialCarType"    column="special_car_type"    />
         <result property="regtime"    column="regtime"    />
         <result property="stationId"    column="station_id"    />
-        <result property="stationNam"    column="station_nam"    />
+        <result property="stationName"    column="station_name"    />
+        <result property="cyGrade"    column="cy_grade"    />
+        <result property="qyGrade"    column="qy_grade"    />
+        <result property="cyLiters"    column="cy_liters"    />
+        <result property="qyLiters"    column="qy_liters"    />
+        <result property="cyAmt"    column="cy_amt"    />
+        <result property="qyAmt"    column="qy_amt"    />
+        <result property="blogOpenid"    column="blog_openid"    />
+        <result property="minaOpenid"    column="mina_openid"    />
+        <result property="blogUserId"    column="blog_user_id"    />
+        <result property="minaUserId"    column="mina_user_id"    />
+        <result property="oilName"    column="oil_name"    />
+        <result property="grade"    column="grade"    />
+        <result property="liters"    column="liters"    />
+        <result property="amt"    column="amt"    />
+        <result property="unionId"    column="union_id"    />
     </resultMap>
 
     <sql id="selectCustomerManageVo">
-        select id, member_id, customer_name, commend_man, member_grade, phone_number, car_number, oils, balance, integral, special_car_type, regtime, station_id, station_nam from customer_manage
+        select id, member_id, customer_name, commend_man, member_grade, phone_number, car_number, balance, integral, special_car_type, regtime, station_id, station_name, cy_grade, qy_grade, cy_liters, qy_liters, cy_amt, qy_amt, blog_openid, mina_openid, blog_user_id, mina_user_id, oil_name, grade, liters, amt, union_id from customer_manage
     </sql>
 
     <select id="selectCustomerManageList" parameterType="CustomerManage" resultMap="CustomerManageResult">
@@ -34,13 +48,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="memberGrade != null  and memberGrade != ''"> and member_grade = #{memberGrade}</if>
             <if test="phoneNumber != null  and phoneNumber != ''"> and phone_number = #{phoneNumber}</if>
             <if test="carNumber != null  and carNumber != ''"> and car_number = #{carNumber}</if>
-            <if test="oils != null  and oils != ''"> and oils = #{oils}</if>
-            <if test="balance != null  and balance != ''"> and balance = #{balance}</if>
-            <if test="integral != null  and integral != ''"> and integral = #{integral}</if>
+            <if test="balance != null "> and balance = #{balance}</if>
+            <if test="integral != null "> and integral = #{integral}</if>
             <if test="specialCarType != null  and specialCarType != ''"> and special_car_type = #{specialCarType}</if>
             <if test="regtime != null "> and regtime = #{regtime}</if>
             <if test="stationId != null "> and station_id = #{stationId}</if>
-            <if test="stationNam != null  and stationNam != ''"> and station_nam = #{stationNam}</if>
+            <if test="stationName != null  and stationName != ''"> and station_name like concat('%', #{stationName}, '%')</if>
+            <if test="cyGrade != null  and cyGrade != ''"> and cy_grade = #{cyGrade}</if>
+            <if test="qyGrade != null  and qyGrade != ''"> and qy_grade = #{qyGrade}</if>
+            <if test="cyLiters != null "> and cy_liters = #{cyLiters}</if>
+            <if test="qyLiters != null "> and qy_liters = #{qyLiters}</if>
+            <if test="cyAmt != null "> and cy_amt = #{cyAmt}</if>
+            <if test="qyAmt != null "> and qy_amt = #{qyAmt}</if>
+            <if test="blogOpenid != null  and blogOpenid != ''"> and blog_openid = #{blogOpenid}</if>
+            <if test="minaOpenid != null  and minaOpenid != ''"> and mina_openid = #{minaOpenid}</if>
+            <if test="blogUserId != null "> and blog_user_id = #{blogUserId}</if>
+            <if test="minaUserId != null "> and mina_user_id = #{minaUserId}</if>
+            <if test="oilName != null  and oilName != ''"> and oil_name like concat('%', #{oilName}, '%')</if>
+            <if test="grade != null  and grade != ''"> and grade = #{grade}</if>
+            <if test="liters != null "> and liters = #{liters}</if>
+            <if test="amt != null "> and amt = #{amt}</if>
+            <if test="unionId != null  and unionId != ''"> and union_id = #{unionId}</if>
         </where>
     </select>
     
@@ -49,39 +77,65 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where id = #{id}
     </select>
         
-    <insert id="insertCustomerManage" parameterType="CustomerManage">
+    <insert id="insertCustomerManage" parameterType="CustomerManage" useGeneratedKeys="true" keyProperty="id">
         insert into customer_manage
         <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="id != null">id,</if>
             <if test="memberId != null">member_id,</if>
             <if test="customerName != null">customer_name,</if>
             <if test="commendMan != null">commend_man,</if>
             <if test="memberGrade != null">member_grade,</if>
             <if test="phoneNumber != null">phone_number,</if>
             <if test="carNumber != null">car_number,</if>
-            <if test="oils != null">oils,</if>
             <if test="balance != null">balance,</if>
             <if test="integral != null">integral,</if>
             <if test="specialCarType != null">special_car_type,</if>
             <if test="regtime != null">regtime,</if>
             <if test="stationId != null">station_id,</if>
-            <if test="stationNam != null">station_nam,</if>
+            <if test="stationName != null">station_name,</if>
+            <if test="cyGrade != null">cy_grade,</if>
+            <if test="qyGrade != null">qy_grade,</if>
+            <if test="cyLiters != null">cy_liters,</if>
+            <if test="qyLiters != null">qy_liters,</if>
+            <if test="cyAmt != null">cy_amt,</if>
+            <if test="qyAmt != null">qy_amt,</if>
+            <if test="blogOpenid != null">blog_openid,</if>
+            <if test="minaOpenid != null">mina_openid,</if>
+            <if test="blogUserId != null">blog_user_id,</if>
+            <if test="minaUserId != null">mina_user_id,</if>
+            <if test="oilName != null">oil_name,</if>
+            <if test="grade != null">grade,</if>
+            <if test="liters != null">liters,</if>
+            <if test="amt != null">amt,</if>
+            <if test="unionId != null">union_id,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="id != null">#{id},</if>
             <if test="memberId != null">#{memberId},</if>
             <if test="customerName != null">#{customerName},</if>
             <if test="commendMan != null">#{commendMan},</if>
             <if test="memberGrade != null">#{memberGrade},</if>
             <if test="phoneNumber != null">#{phoneNumber},</if>
             <if test="carNumber != null">#{carNumber},</if>
-            <if test="oils != null">#{oils},</if>
             <if test="balance != null">#{balance},</if>
             <if test="integral != null">#{integral},</if>
             <if test="specialCarType != null">#{specialCarType},</if>
             <if test="regtime != null">#{regtime},</if>
             <if test="stationId != null">#{stationId},</if>
-            <if test="stationNam != null">#{stationNam},</if>
+            <if test="stationName != null">#{stationName},</if>
+            <if test="cyGrade != null">#{cyGrade},</if>
+            <if test="qyGrade != null">#{qyGrade},</if>
+            <if test="cyLiters != null">#{cyLiters},</if>
+            <if test="qyLiters != null">#{qyLiters},</if>
+            <if test="cyAmt != null">#{cyAmt},</if>
+            <if test="qyAmt != null">#{qyAmt},</if>
+            <if test="blogOpenid != null">#{blogOpenid},</if>
+            <if test="minaOpenid != null">#{minaOpenid},</if>
+            <if test="blogUserId != null">#{blogUserId},</if>
+            <if test="minaUserId != null">#{minaUserId},</if>
+            <if test="oilName != null">#{oilName},</if>
+            <if test="grade != null">#{grade},</if>
+            <if test="liters != null">#{liters},</if>
+            <if test="amt != null">#{amt},</if>
+            <if test="unionId != null">#{unionId},</if>
          </trim>
     </insert>
 
@@ -94,13 +148,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="memberGrade != null">member_grade = #{memberGrade},</if>
             <if test="phoneNumber != null">phone_number = #{phoneNumber},</if>
             <if test="carNumber != null">car_number = #{carNumber},</if>
-            <if test="oils != null">oils = #{oils},</if>
             <if test="balance != null">balance = #{balance},</if>
             <if test="integral != null">integral = #{integral},</if>
             <if test="specialCarType != null">special_car_type = #{specialCarType},</if>
             <if test="regtime != null">regtime = #{regtime},</if>
             <if test="stationId != null">station_id = #{stationId},</if>
-            <if test="stationNam != null">station_nam = #{stationNam},</if>
+            <if test="stationName != null">station_name = #{stationName},</if>
+            <if test="cyGrade != null">cy_grade = #{cyGrade},</if>
+            <if test="qyGrade != null">qy_grade = #{qyGrade},</if>
+            <if test="cyLiters != null">cy_liters = #{cyLiters},</if>
+            <if test="qyLiters != null">qy_liters = #{qyLiters},</if>
+            <if test="cyAmt != null">cy_amt = #{cyAmt},</if>
+            <if test="qyAmt != null">qy_amt = #{qyAmt},</if>
+            <if test="blogOpenid != null">blog_openid = #{blogOpenid},</if>
+            <if test="minaOpenid != null">mina_openid = #{minaOpenid},</if>
+            <if test="blogUserId != null">blog_user_id = #{blogUserId},</if>
+            <if test="minaUserId != null">mina_user_id = #{minaUserId},</if>
+            <if test="oilName != null">oil_name = #{oilName},</if>
+            <if test="grade != null">grade = #{grade},</if>
+            <if test="liters != null">liters = #{liters},</if>
+            <if test="amt != null">amt = #{amt},</if>
+            <if test="unionId != null">union_id = #{unionId},</if>
         </trim>
         where id = #{id}
     </update>