Browse Source

qxm-立邦导购接口停用,经销商启用模块增加上线时间

qxm 3 years ago
parent
commit
45d83590ef

+ 14 - 0
suishenbang-order/src/main/java/com/dgtly/order/domain/CustomersStart.java

@@ -5,6 +5,8 @@ import org.apache.commons.lang3.builder.ToStringStyle;
 import com.dgtly.common.annotation.Excel;
 import com.dgtly.common.core.domain.BaseEntity;
 
+import java.util.Date;
+
 /**
  * 经销商启用对象 customers_start
  * 
@@ -23,6 +25,10 @@ public class CustomersStart extends BaseEntity
     @Excel(name = "经销商名称")
     private String customersName;
 
+    /** 经销商名称 */
+    @Excel(name = "经销商名称")
+    private Date onlineTime;
+
     public void setCustomersCode(String customersCode) 
     {
         this.customersCode = customersCode;
@@ -42,6 +48,14 @@ public class CustomersStart extends BaseEntity
         return customersName;
     }
 
+    public Date getOnlineTime() {
+        return onlineTime;
+    }
+
+    public void setOnlineTime(Date onlineTime) {
+        this.onlineTime = onlineTime;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 2 - 0
suishenbang-order/src/main/java/com/dgtly/order/service/impl/CustomersStartServiceImpl.java

@@ -1,5 +1,6 @@
 package com.dgtly.order.service.impl;
 
+import java.util.Date;
 import java.util.List;
 
 import com.dgtly.common.utils.StringUtils;
@@ -132,6 +133,7 @@ public class CustomersStartServiceImpl implements ICustomersStartService
                     customersStart = new CustomersStart();
                     customersStart.setCustomersCode(chainsCode);
                     customersStart.setCustomersName(chainsName);
+                    customersStart.setOnlineTime(new Date());
                     state = customersStartMapper.insertCustomersStart(customersStart);
                 }
                 continue;

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

@@ -7,10 +7,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <resultMap type="com.dgtly.order.domain.CustomersStart" id="CustomersStartResult">
         <result property="customersCode"    column="customers_code"    />
         <result property="customersName"    column="customers_name"    />
+        <result property="onlineTime"    column="online_time"    />
     </resultMap>
 
     <sql id="selectCustomersStartVo">
-        select customers_code, customers_name from customers_start
+        select customers_code, customers_name,online_time from customers_start
     </sql>
 
     <select id="selectCustomersStartList" parameterType="com.dgtly.order.domain.CustomersStart" resultMap="CustomersStartResult">
@@ -18,7 +19,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <where>  
             <if test="customersCode != null  and customersCode != ''"> and customers_code like concat('%', #{customersCode}, '%')</if>
             <if test="customersName != null  and customersName != ''"> and customers_name like concat('%', #{customersName}, '%')</if>
+            <if test="onlineTime != null"> and online_time = #{onlineTime}</if>
         </where>
+        order by online_time desc
     </select>
     
     <select id="selectCustomersStartByCustomersCode" parameterType="String" resultMap="CustomersStartResult">
@@ -52,10 +55,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="customersCode != null  and customersCode != ''">customers_code,</if>
             <if test="customersName != null  and customersName != ''">customers_name,</if>
+            <if test="onlineTime != null">online_time,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="customersCode != null  and customersCode != ''">#{customersCode},</if>
             <if test="customersName != null  and customersName != ''">#{customersName},</if>
+            <if test="onlineTime != null">#{onlineTime},</if>
          </trim>
     </insert>
 

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

@@ -68,6 +68,10 @@
                     field : 'customersName', 
                     title : '经销商名称'
                 },
+                {
+                    field : 'onlineTime',
+                    title : '上线日期'
+                },
                 {
                     title: '操作',
                     align: 'center',

+ 2 - 2
suishenbang-sync/suishenbang-sync-common/src/main/java/com/dgtly/sync/service/AnalysisDiyCustomerComponent.java

@@ -102,7 +102,7 @@ public class AnalysisDiyCustomerComponent {
 
 
 
-        String guideJson ="";
+        /*String guideJson ="";
         try{
             guideJson = HttpUtils.sendSSLGet(customerAccessTokenUtil.getUrl(UrlType.STOREGUIDE,null));
         }catch (Exception e){
@@ -116,7 +116,7 @@ public class AnalysisDiyCustomerComponent {
         if(code==0){
             success+=buildSysUser(gjson,loginNameSet,0,failDetails,packageId,codeMap);
             total+=gjson.getJSONArray("userlist").size();
-        }
+        }*/
 
         String financeJson ="";
         try{