Ver código fonte

customerType

duyj 3 anos atrás
pai
commit
00c20d60b9

+ 31 - 1
suishenbang-order/src/main/java/com/dgtly/order/domain/CustomersStart.java

@@ -26,9 +26,15 @@ public class CustomersStart extends BaseEntity
     private String customersName;
 
     /** 经销商名称 */
-    @Excel(name = "经销商名称")
+    @Excel(name = "上线日期")
     private Date onlineTime;
 
+    /** 上线事业部 DIY/厨卫/ALL*/
+    private Integer customerType;
+
+    @Excel(name = "上线事业部")
+    private String customerTypeFormat;
+
     public void setCustomersCode(String customersCode) 
     {
         this.customersCode = customersCode;
@@ -56,6 +62,30 @@ public class CustomersStart extends BaseEntity
         this.onlineTime = onlineTime;
     }
 
+    public Integer getCustomerType() {
+        return customerType;
+    }
+
+    public void setCustomerType(Integer customerType) {
+        this.customerType = customerType;
+    }
+
+    public String getCustomerTypeFormat() {
+        return customerTypeFormat;
+    }
+
+    public void setCustomerTypeFormat() {
+        if (customerType != null && customerType == 1) {
+            this.customerTypeFormat = "DIY";
+        } else if (customerType != null && customerType == 2) {
+            this.customerTypeFormat = "厨卫";
+        } else if (customerType != null && customerType == 3) {
+            this.customerTypeFormat = "DIY+厨卫";
+        } else {
+            this.customerTypeFormat = "";
+        }
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 6 - 3
suishenbang-order/src/main/java/com/dgtly/order/service/impl/CustomersStartServiceImpl.java

@@ -45,9 +45,12 @@ public class CustomersStartServiceImpl implements ICustomersStartService
      * @return 经销商启用
      */
     @Override
-    public List<CustomersStart> selectCustomersStartList(CustomersStart customersStart)
-    {
-        return customersStartMapper.selectCustomersStartList(customersStart);
+    public List<CustomersStart> selectCustomersStartList(CustomersStart customersStart) {
+        List<CustomersStart> list = customersStartMapper.selectCustomersStartList(customersStart);
+        for (CustomersStart start : list) {
+            start.setCustomerTypeFormat();
+        }
+        return list;
     }
 
     /**

+ 2 - 1
suishenbang-order/src/main/resources/mapper/order/CustomersStartMapper.xml

@@ -8,10 +8,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="customersCode"    column="customers_code"    />
         <result property="customersName"    column="customers_name"    />
         <result property="onlineTime"    column="online_time"    />
+        <result property="customerType"    column="customer_type"    />
     </resultMap>
 
     <sql id="selectCustomersStartVo">
-        select customers_code, customers_name,online_time from customers_start
+        select customers_code, customers_name,online_time,customer_type from customers_start
     </sql>
 
     <select id="selectCustomersStartList" parameterType="com.dgtly.order.domain.CustomersStart" resultMap="CustomersStartResult">

+ 4 - 0
suishenbang-order/src/main/resources/templates/order/customersStart/customersStart.html

@@ -72,6 +72,10 @@
                     field : 'onlineTime',
                     title : '上线日期'
                 },
+                {
+                    field : 'customerTypeFormat',
+                    title : '上线事业部'
+                },
                 {
                     title: '操作',
                     align: 'center',