Browse Source

机构画像

huangzhiguo 2 years ago
parent
commit
ccc554a7cc

+ 2 - 2
src/main/java/com/caimei/modules/user/dao/CmBehaviorRecordDao.java

@@ -18,11 +18,11 @@ import java.util.List;
 public interface CmBehaviorRecordDao extends CrudDao<CmBehaviorRecord> {
 
     /**
-     * 查询当天以外的数据
+     * 查询符合条件数据 -- export
      * @param cmBehaviorRecord
      * @return
      */
-    List<CmBehaviorRecord> findListBefore(CmBehaviorRecord cmBehaviorRecord);
+    List<CmBehaviorRecord> exportList(CmBehaviorRecord cmBehaviorRecord);
     /**
      * 查询单条详情
      * @param cmBehaviorRecord

+ 19 - 0
src/main/java/com/caimei/modules/user/entity/ArrDate.java

@@ -16,6 +16,9 @@ public class ArrDate {
     private ArrayList<OrderPortrait> orderList;
     private Integer orderTotalNum;
 
+    private String startTime;
+    private String endTime;
+
     public ArrayList<String> getName() {
         return name;
     }
@@ -47,4 +50,20 @@ public class ArrDate {
     public void setOrderTotalNum(Integer orderTotalNum) {
         this.orderTotalNum = orderTotalNum;
     }
+
+    public String getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(String startTime) {
+        this.startTime = startTime;
+    }
+
+    public String getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(String endTime) {
+        this.endTime = endTime;
+    }
 }

+ 4 - 3
src/main/java/com/caimei/modules/user/entity/CmPortrait.java

@@ -2,6 +2,7 @@ package com.caimei.modules.user.entity;
 
 import com.thinkgem.jeesite.common.persistence.DataEntity;
 
+import java.math.BigDecimal;
 import java.util.ArrayList;
 
 /**
@@ -30,7 +31,7 @@ public class CmPortrait extends DataEntity<CmPortrait> {
     // 订单总量
     private Integer orderTotal;
     // 订单总金额
-    private Double orderTotalAmount;
+    private BigDecimal orderTotalAmount;
     // 订单类型值value  订单类型name
     private ArrayList<OrderPortrait> orderPortrait;
     // 搜索关键词总数
@@ -114,11 +115,11 @@ public class CmPortrait extends DataEntity<CmPortrait> {
         this.orderTotal = orderTotal;
     }
 
-    public Double getOrderTotalAmount() {
+    public BigDecimal getOrderTotalAmount() {
         return orderTotalAmount;
     }
 
-    public void setOrderTotalAmount(Double orderTotalAmount) {
+    public void setOrderTotalAmount(BigDecimal orderTotalAmount) {
         this.orderTotalAmount = orderTotalAmount;
     }
 

+ 50 - 13
src/main/java/com/caimei/modules/user/service/ClubPortraitService.java

@@ -44,20 +44,22 @@ public class ClubPortraitService {
      * @return
      */
     public CmPortrait dataList(CmPortrait cmPortrait) {
+        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
+        Date date = new Date();
         if (ObjectUtils.isEmpty(cmPortrait.getStartTime()) && ObjectUtils.isEmpty(cmPortrait.getEndTime())) {
-            SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
             Date start = null;
             String startTime = "";
             Calendar calendar = Calendar.getInstance();
-            calendar.setTime(new Date());
+            calendar.setTime(date);
             calendar.add(Calendar.DAY_OF_MONTH, -1);
             Date time = calendar.getTime();
             String endTime = dateFormat.format(time);
+            String format = dateFormat.format(date);
             // 日期参数为    日
-            if (cmPortrait.getDateType() == 0) {
+            if (0 ==  cmPortrait.getDateType() || 1 == cmPortrait.getDateType()) {
                 cmPortrait.setAccessDate(endTime);
             }
-            if (cmPortrait.getDateType() == 1) {
+            if (2 == cmPortrait.getDateType()) {
                 cmPortrait.setEndTime(endTime);
                 calendar.setTime(time);
                 calendar.add(Calendar.MONTH, -1);
@@ -65,7 +67,7 @@ public class ClubPortraitService {
                 startTime = dateFormat.format(start);
                 cmPortrait.setStartTime(startTime);
             }
-            if (cmPortrait.getDateType() == 2) {
+            if (3 == cmPortrait.getDateType()) {
                 cmPortrait.setEndTime(endTime);
                 calendar.setTime(time);
                 calendar.add(Calendar.MONTH, -6);
@@ -73,10 +75,10 @@ public class ClubPortraitService {
                 startTime = dateFormat.format(start);
                 cmPortrait.setStartTime(startTime);
             }
-            if (cmPortrait.getDateType() == 3) {
+            if (4 == cmPortrait.getDateType()) {
                 cmPortrait.setEndTime(endTime);
                 calendar.setTime(time);
-                calendar.add(Calendar.DAY_OF_YEAR, -1);
+                calendar.add(Calendar.YEAR, -1);
                 start = calendar.getTime();
                 startTime = dateFormat.format(start);
                 cmPortrait.setStartTime(startTime);
@@ -84,6 +86,9 @@ public class ClubPortraitService {
         }
         // 机构订单
         if (0 == cmPortrait.getType() || 4 == cmPortrait.getType()) {
+            if (0 !=  cmPortrait.getDateType() || 1 != cmPortrait.getDateType()) {
+                cmPortrait.setEndTime(dateFormat.format(date));
+            }
             int ordinary = 0, secondHand = 0, rebate = 0, partialRefund = 0, fullRefund = 0, closed = 0;
 
             ArrayList<OrderPortrait> orderPortraits = new ArrayList<>();
@@ -96,18 +101,18 @@ public class ClubPortraitService {
                 for (NewOrder order : orderList) {
                     // 普通订单
                     if (("0".equals(order.getSecondHandOrderFlag()) || StringUtils.isEmpty(order.getSecondHandOrderFlag()))
-                            && ("0".equals(order.getRebateFlag()) || "".equals(order.getRebateFlag()) || StringUtils.isEmpty(order.getRebateFlag()))
+                            && (!"1".equals(order.getRebateFlag()) || "".equals(order.getRebateFlag()) || StringUtils.isEmpty(order.getRebateFlag()))
                             && ((!"1".equals(order.getRefundType()) && !"2".equals(order.getRefundType())) || "".equals(order.getRefundType()) || StringUtils.isEmpty(order.getRefundType()))
                             && !"6".equals(order.getStatus())) {
                         ordinary++;
                     }
                     // 二手订单
-                    if ("1".equals(order.getSecondHandOrderFlag()) && "0".equals(order.getRebateFlag())
+                    if ("1".equals(order.getSecondHandOrderFlag()) && !"1".equals(order.getRebateFlag())
                             && (!"1".equals(order.getRefundType()) && !"2".equals(order.getRefundType())) && !"6".equals(order.getStatus())) {
                         secondHand++;
                     }
                     // 返佣订单
-                    if (!"0".equals(order.getRebateFlag()) &&
+                    if ("1".equals(order.getRebateFlag()) &&
                             (!"1".equals(order.getRefundType()) && !"2".equals(order.getRefundType()) || StringUtils.isEmpty(order.getRefundType())) && !"6".equals(order.getStatus())) {
                         rebate++;
                     }
@@ -178,6 +183,12 @@ public class ClubPortraitService {
 
                 cmPortrait.setOrderPortrait(orderPortraits);
             }
+            Calendar calendar = Calendar.getInstance();
+            calendar.setTime(date);
+            calendar.add(Calendar.DAY_OF_MONTH, -1);
+            Date time = calendar.getTime();
+            String endTime = dateFormat.format(time);
+            cmPortrait.setEndTime(endTime);
         }
         // 搜索关键词
         if (1 == cmPortrait.getType() || 4 == cmPortrait.getType()) {
@@ -200,22 +211,48 @@ public class ClubPortraitService {
         }
         // 咨询记录
         if (2 == cmPortrait.getType() || 4 == cmPortrait.getType()) {
+            if (0 !=  cmPortrait.getDateType() || 1 != cmPortrait.getDateType()) {
+                cmPortrait.setEndTime(dateFormat.format(date));
+            }
             List<CmClubRemarks> remarksList = cmPortraitDao.selRemarksList(cmPortrait);
             ArrayList<Integer> integers = new ArrayList<>();
             ArrayList<String> strings = new ArrayList<>();
+            ArrayList<String> strRemark = new ArrayList<>();
+            int number = 0;
             if (remarksList.size() != 0) {
                 for (CmClubRemarks remarks: remarksList) {
-                    integers.add(remarks.getNumber());
-                    if (!ObjectUtils.isEmpty(remarks.getRemarks())) {
-                        strings.add(remarks.getRemarks());
+                    String[] split = remarks.getRemarks().split(",");
+                    for (String str : split) {
+                        if (!strRemark.contains(str)) {
+                            strRemark.add(str);
+                        }
+                    }
+                }
+                for (String str : strRemark) {
+                    for (CmClubRemarks remarks: remarksList) {
+                        if (remarks.getRemarks().contains(str)) {
+                            number++;
+                        }
+                    }
+                    integers.add(number);
+                    if (!ObjectUtils.isEmpty(str)) {
+                        strings.add(str);
                     } else {
                         strings.add("未知");
                     }
+                    number = 0;
                 }
+
                 cmPortrait.setRemarksTotal(remarksList.get(0).getNumbers());
                 cmPortrait.setRemarksValue(integers);
                 cmPortrait.setRemarksType(strings);
             }
+            Calendar calendar = Calendar.getInstance();
+            calendar.setTime(date);
+            calendar.add(Calendar.DAY_OF_MONTH, -1);
+            Date time = calendar.getTime();
+            String endTime = dateFormat.format(time);
+            cmPortrait.setEndTime(endTime);
         }
         // 访问记录
         if (3 == cmPortrait.getType() || 4 == cmPortrait.getType()) {

+ 2 - 2
src/main/java/com/caimei/modules/user/service/CmBehaviorRecordService.java

@@ -41,7 +41,7 @@ public class CmBehaviorRecordService extends CrudService<CmBehaviorRecordDao, Cm
         return super.findPage(page,cmBehaviorRecord);
     }
 
-    public List<CmBehaviorRecord> behaviorList(CmBehaviorRecord cmBehaviorRecord) {
+    /*public List<CmBehaviorRecord> behaviorList(CmBehaviorRecord cmBehaviorRecord) {
         List<CmBehaviorRecord> list = new ArrayList<>();
         SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
         String format = dateFormat.format(new Date());
@@ -83,7 +83,7 @@ public class CmBehaviorRecordService extends CrudService<CmBehaviorRecordDao, Cm
             listDataMerge.clear();
         }
         return list;
-    }
+    }*/
     /**
      * 用户行为详情
      * @param page

+ 44 - 0
src/main/java/com/caimei/modules/user/web/CmUserBehaviorRecordController.java

@@ -1,5 +1,6 @@
 package com.caimei.modules.user.web;
 
+import com.caimei.modules.common.utils.ExcelUtil;
 import com.caimei.modules.order.entity.NewOrder;
 import com.caimei.modules.order.service.NewOrderService;
 import com.caimei.modules.user.dao.CmBehaviorRecordDao;
@@ -24,7 +25,9 @@ import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 /**
  * Description
@@ -239,4 +242,45 @@ public class CmUserBehaviorRecordController extends BaseController {
         return "modules/user/behaviorNewOrder";
     }
 
+    @RequestMapping(value = "/export")
+    public void exports(CmBehaviorRecord cmBehaviorRecord,HttpServletRequest request,HttpServletResponse response,RedirectAttributes redirectAttributes) {
+
+        String fileName = "ROSS行为记录.xls";
+        String template = Global.getConfig("export.template");
+        String templataFileName = template + "/ross_behavior.xls";
+        try {
+            Map data = new HashMap<String, Object>();
+            List<CmBehaviorRecord> exportList = null;
+            if ("1".equals(cmBehaviorRecord.getBehaviorType())) {
+                fileName = "用户行为记录.xls";
+                exportList = cmBehaviorRecordService.findPageList(new Page<>(request,response),cmBehaviorRecord).getList();
+            } else {
+                exportList = cmBehaviorRecordDao.exportList(cmBehaviorRecord);
+            }
+            for(CmBehaviorRecord record: exportList) {
+                // 计算访问时长
+                String time = cmBehaviorRecordService.calculationTime(record.getAccessDuration());
+                record.setAccessDuration(time);
+                if ("0".equals(record.getAccessClient())) {
+                    record.setAccessClient("网站");
+                } else {
+                    record.setAccessClient("小程序");
+                }
+                if ("1".equals(record.getCompanyType())) {
+                    record.setCompanyType("游客");
+                } else if ("2".equals(record.getCompanyType())) {
+                    record.setCompanyType("机构");
+                } else {
+                    record.setCompanyType("供应商");
+                }
+            }
+            data.put("list", exportList);
+            new ExcelUtil().createExcel(templataFileName, data, fileName, response);
+        } catch (Exception e) {
+            addMessage(redirectAttributes, "导出ROSS行为记录失败", e.getMessage());
+            logger.info(e.getMessage());
+            e.printStackTrace();
+        }
+
+    }
 }

+ 8 - 2
src/main/java/com/caimei/modules/user/web/newUser/AgencyController.java

@@ -1426,7 +1426,8 @@ public class AgencyController extends BaseController {
                 portrait.setOrderTotal(0);
             }
             order.setOrderTotalNum(portrait.getOrderTotal());
-
+            order.setStartTime(portrait.getStartTime());
+            order.setEndTime(portrait.getEndTime());
             if (order.getOrderTotalNum() == 0) {
                 map.put("order",null);
             } else {
@@ -1434,7 +1435,8 @@ public class AgencyController extends BaseController {
             }
             behavior.setName(portrait.getBehaviorType());
             behavior.setValue(portrait.getBehaviorValue());
-
+            behavior.setStartTime(portrait.getStartTime());
+            behavior.setEndTime(portrait.getEndTime());
             if (ObjectUtils.isEmpty(behavior.getValue())) {
                 map.put("behavior",null);
             } else {
@@ -1442,6 +1444,8 @@ public class AgencyController extends BaseController {
             }
             remarks.setName(portrait.getRemarksType());
             remarks.setValue(portrait.getRemarksValue());
+            remarks.setStartTime(portrait.getStartTime());
+            remarks.setEndTime(portrait.getEndTime());
             if (ObjectUtils.isEmpty(remarks.getValue())) {
                 map.put("remarks",null);
             } else {
@@ -1449,6 +1453,8 @@ public class AgencyController extends BaseController {
             }
             pageType.setName(portrait.getPageType());
             pageType.setValue(portrait.getPageTypeValue());
+            pageType.setStartTime(portrait.getStartTime());
+            pageType.setEndTime(portrait.getEndTime());
             if (ObjectUtils.isEmpty(pageType.getValue())) {
                 map.put("pageType",null);
             } else {

+ 1 - 1
src/main/resources/mappings/modules/order/OrderMapper.xml

@@ -116,7 +116,7 @@
         co.sendOutStatus AS sendOutStatus,
         co.receiptStatus AS receiptStatus,
         co.productCount AS productCount,
-        p.returnGoodsStutas as returnGoodsStutas,
+#         p.returnGoodsStutas as returnGoodsStutas,
         (SELECT IFNULL(sum(cop.shouldPayFee),0)
         FROM cm_order_product cop
         WHERE cop.orderId=co.orderID) AS

+ 38 - 45
src/main/resources/mappings/modules/user/CmBehaviorRecordMapper.xml

@@ -67,66 +67,59 @@
         ORDER BY accessTime DESC
     </select>
 
-    <select id="findListBefore" resultType="com.caimei.modules.user.entity.CmBehaviorRecord">
+    <select id="exportList" resultType="com.caimei.modules.user.entity.CmBehaviorRecord">
         SELECT
-        <include refid="behaviorRecord"/>
-        ,SUM(b.accessDuration) AS accessDuration,
-        u.userIdentity,
-        u.userName,
-        c.sname AS cSname,
-        c.name,
-        c.linkMan,
-        c.contractMobile,
-        s.name AS sname,
-        s.linkMan AS slinkMan,
-        s.contractMobile AS scontractMobile,
-        c.clubID as clubID,
-        s.shopID as shopID,
-        max(b.region) as region,
-        max(accessTime) AS lastAccessTime,
-        (SELECT CASE STATUS WHEN 91 THEN '采美默认协销经理(官方账号)' ELSE linkMan END FROM serviceprovider WHERE serviceProviderID = c.spID) AS spName,
-        (SELECT COUNT(IP) FROM cm_behavior_record WHERE b.IP != '106.55.202.118' AND accessDate= #{accessDate}  GROUP BY accessDate) as numbers
-        FROM cm_behavior_record b
-        LEFT JOIN USER u ON b.userID = u.userID
-        LEFT JOIN club c ON b.userID = c.userID
-        LEFT JOIN shop s ON b.userID = s.userID
-        LEFT JOIN serviceprovider sp on c.spID = sp.serviceProviderID
+        IP,
+        userID,
+        clubID,
+        lastAccessTime,
+        companyType,
+        corporateName,
+        contacts,
+        phoneNumber,
+        spName,
+        number as numbers,
+        consultName,
+        consultMobile,
+        behaviorType,
+        productID,
+        accessTime,
+        accessDuration,
+        accessDate,
+        accessClient,
+        region
+        FROM cm_behavior_record_index
         <where>
-                b.IP != '106.55.202.118' AND b.accessDate = #{accessDate}
+            delFlag = 0
             <if test="behaviorType == 2">
-                AND b.behaviorType = #{behaviorType}
+                AND behaviorType = #{behaviorType}
             </if>
             <if test="IP != null and IP != ''">
-                AND b.IP = #{IP}
+                AND IP = #{IP}
             </if>
-            <if test="name != null and name != ''">
-                AND c.sname = #{name} or s.name = #{name}
+            <if test="corporateName != null and corporateName != ''">
+                AND corporateName like concat('%',#{corporateName},'%')
             </if>
-            <if test="userIdentity != null and userIdentity != ''">
-                <if test="userIdentity == 2">
-                    AND u.userIdentity in (2, 4)
-                </if>
-                <if test="userIdentity == 3">
-                    AND u.userIdentity = 3
-                </if>
-                <if test="userIdentity == 1">
-                    AND  b.userID = 0
-                </if>
+            <if test="companyType != null and companyType != ''">
+                AND companyType = #{companyType}
             </if>
-            <if test="userName != null and userName != ''">
-                AND u.userName = #{userName}
+            <if test="accessClient != null and accessClient != ''">
+                AND accessClient =#{accessClient}
+            </if>
+            <if test="contacts != null and contacts != ''">
+                AND contacts = #{contacts}
             </if>
-            <if test="contractMobile != null and contractMobile != ''">
-                AND (c.contractMobile = #{contractMobile} or s.contractMobile = #{contractMobile})
+            <if test="phoneNumber != null and phoneNumber != ''">
+                AND phoneNumber = #{phoneNumber}
             </if>
             <if test="spName != null and spName != ''">
-                AND sp.name = #{spName}
+                AND spName = #{spName}
             </if>
             <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
-                AND b.accessDate between #{startTime} and #{endTime}
+                AND accessDate between #{startTime} and #{endTime}
             </if>
         </where>
-        GROUP BY b.userID ORDER BY b.userID DESC
+        ORDER BY accessTime DESC
     </select>
 
     <select id="recordList" resultType="com.caimei.modules.user.entity.CmBehaviorRecord">

+ 11 - 11
src/main/resources/mappings/modules/user/CmPortraitMapper.xml

@@ -3,15 +3,15 @@
 <mapper namespace="com.caimei.modules.user.dao.CmPortraitDao">
     <select id="selTotal" resultType="com.caimei.modules.user.entity.CmPortrait">
         SELECT
-                (SELECT COUNT(orderID) FROM cm_order WHERE clubID = #{clubID}) AS orderTotal,
-                (SELECT SUM(productTotalFee) FROM cm_order WHERE clubID = #{clubID}) AS orderTotalAmount,
-                (SELECT COUNT(cbr.recordID) FROM cm_behavior_record cbr LEFT JOIN club c ON cbr.userID = c.userID WHERE cbr.pageType IN (8, 9) AND c.clubID = #{clubID}) AS totalkeywords ,
-                (SELECT COUNT(remarks) FROM cm_club_remarks WHERE clubID = #{clubID} ) AS remarksTotal
+                (SELECT COUNT(orderID) FROM cm_order WHERE clubID = #{clubID} AND orderTime <![CDATA[ < ]]> now()) AS orderTotal,
+                (SELECT SUM(payTotalFee) FROM cm_order WHERE clubID = #{clubID} AND orderTime <![CDATA[ < ]]> now()) AS orderTotalAmount,
+                (SELECT COUNT(cbr.recordID) FROM cm_behavior_record cbr LEFT JOIN club c ON cbr.userID = c.userID WHERE cbr.pageType IN (8, 9) AND c.clubID = #{clubID} AND cbr.accessDate <![CDATA[ < ]]> now()) AS totalkeywords ,
+                (SELECT COUNT(remarks) FROM cm_club_remarks WHERE clubID = #{clubID} AND addTime <![CDATA[ < ]]> now()) AS remarksTotal
     </select>
     <select id="selOrderList" resultType="com.caimei.modules.order.entity.NewOrder">
         SELECT
                (SELECT COUNT(orderID) FROM cm_order WHERE clubID = #{clubID}) as numbers,
-               (SELECT SUM(productTotalFee) FROM cm_order WHERE clubID = #{clubID}) as totalMoney,
+                (SELECT SUM(payTotalFee) FROM cm_order WHERE clubID = #{clubID}) as totalMoney,
                clubID,
                secondHandOrderFlag,
                rebateFlag,
@@ -26,7 +26,7 @@
                  AND orderTime like concat('%',#{accessDate},'%')
              </if>
              <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
-                 AND orderTime between #{startTime} and #{endTime}
+                 AND orderTime <![CDATA[ >= ]]> #{startTime} AND orderTime <![CDATA[ < ]]> #{endTime}
              </if>
         </where>
     </select>
@@ -48,7 +48,7 @@
             </if>
         </where>
         GROUP BY cbr.pageLabel
-        ORDER BY COUNT(cbr.pageLabel) DESC LIMIT 10
+        ORDER BY COUNT(cbr.pageLabel) LIMIT 10
     </select>
 
     <select id="selRemarksList" resultType="com.caimei.modules.user.entity.CmClubRemarks">
@@ -68,7 +68,7 @@
                 AND addTime between #{startTime} and #{endTime}
             </if>
         </where>
-        GROUP BY remarks ORDER BY COUNT(remarks) DESC LIMIT 10
+        GROUP BY remarks ORDER BY COUNT(remarks) LIMIT 10
     </select>
 
     <select id="selBehaviorPageTypeList" resultType="com.caimei.modules.user.entity.CmBehaviorRecord">
@@ -81,14 +81,14 @@
         LEFT JOIN club c ON cbr.userID = c.userID
         LEFT JOIN cm_page_type cpt ON cbr.pageType = cpt.id
         <where>
-            c.clubID = #{clubID}
+                c.clubID = #{clubID}
             <if test="accessDate != null and accessDate != ''">
-                AND cbr.accessDate = #{accessDate}
+                AND cbr.accessDate like concat('%', #{accessDate},'%')
             </if>
             <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
                 AND cbr.accessDate between #{startTime} and #{endTime}
             </if>
         </where>
-        GROUP BY cbr.pageType, cbr.accessDate  ORDER BY COUNT(cbr.pageType) DESC LIMIT 10
+        GROUP BY cbr.pageType  ORDER BY COUNT(cbr.pageType) LIMIT 10
     </select>
 </mapper>

+ 7 - 0
src/main/webapp/WEB-INF/views/modules/user/behaviorRecordList.jsp

@@ -73,6 +73,7 @@
                    value="${cmBehaviorRecord.endTime}"
                    onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
             <input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
+            <input id="export" class="btn btn-primary" type="button" value="导出"/>
         </div>
         <div class="clearfix"></div>
     </div>
@@ -175,6 +176,12 @@
         $("#searchForm").submit();
         return false;
     }
+    $(function () {
+        $('#export').click(function () {
+            var formData = $('#searchForm').serialize();
+            window.location.href = "${ctx}/user/behavior/record/export?behaviorType=1&" + formData;
+        })
+    })
 </script>
 </body>
 

+ 7 - 0
src/main/webapp/WEB-INF/views/modules/user/behaviorRecordRossList.jsp

@@ -73,6 +73,7 @@
                    value="${cmBehaviorRecord.endTime}"
                    onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
             <input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
+            <input id="export" class="btn btn-primary" type="button" value="导出"/>
         </div>
         <div class="clearfix"></div>
     </div>
@@ -190,6 +191,12 @@
         $("#searchForm").submit();
         return false;
     }
+    $(function () {
+        $('#export').click(function () {
+            var formData = $('#searchForm').serialize();
+            window.location.href = "${ctx}/user/behavior/record/export?behaviorType=2&" + formData;
+        });
+    })
 </script>
 </body>
 

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/userNew/cmClubPortrait.jsp

@@ -55,7 +55,7 @@
             </div>
             <div class="flex-box">
                 <div class="box-title">
-                    <span>搜索关键词总数:<a href="${ctx}/user/behavior/record/list?behaviorType=1&corporateName=${cmPortrait.clubName}"><c:if test="${!empty portrait.totalkeywords}">${portrait.totalkeywords}</c:if><c:if test="${empty portrait.totalkeywords}">0</c:if> 条</a></span>
+                    <span>搜索关键词总数:<a href="javascript: void(0);"><c:if test="${!empty portrait.totalkeywords}">${portrait.totalkeywords}</c:if><c:if test="${empty portrait.totalkeywords}">0</c:if> 条</a></span>
                 </div>
                 <div class="box-tabmain">
                     <div class="box-tabs" id="keyWordTabs">