瀏覽代碼

Merge remote-tracking branch 'origin/developerH' into developerH

zhengjinyi 2 年之前
父節點
當前提交
03693681be

+ 12 - 0
src/main/java/com/caimei/modules/coupon/service/CmVipCouponService.java

@@ -47,6 +47,10 @@ public class CmVipCouponService extends CrudService<CmCouponVipDao, CmVipCoupon>
                 calendar.add(Calendar.MONTH,2);
                 Date time = calendar.getTime();
                 vipCoupon.setEndTime(simpleDateFormat.format(time));
+                Date newParse = simpleDateFormat.parse("2023-02");
+                if (parse.before(newParse)) {
+                    vipCoupon.setEndTime(vipCoupon.getUseTime());
+                }
             } catch (ParseException e) {
                 e.printStackTrace();
             }
@@ -76,6 +80,10 @@ public class CmVipCouponService extends CrudService<CmCouponVipDao, CmVipCoupon>
                 calendar.add(Calendar.MONTH,2);
                 Date time = calendar.getTime();
                 vipCoupon.setEndTime(simpleDateFormat.format(time));
+                Date newParse = simpleDateFormat.parse("2023-02");
+                if (parse.before(newParse)) {
+                    vipCoupon.setEndTime(vipCoupon.getUseTime());
+                }
             } catch (ParseException e) {
                 e.printStackTrace();
             }
@@ -108,6 +116,10 @@ public class CmVipCouponService extends CrudService<CmCouponVipDao, CmVipCoupon>
                     calendar.add(Calendar.MONTH,2);
                     Date time = calendar.getTime();
                     vipCoupon.setEndTime(simpleDateFormat.format(time));
+                    Date newParse = simpleDateFormat.parse("2023-02");
+                    if (parse.before(newParse)) {
+                        vipCoupon.setEndTime(vipCoupon.getUseTime());
+                    }
                 } catch (ParseException e) {
                     e.printStackTrace();
                 }

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

@@ -85,4 +85,6 @@ public interface NewCmClubDao extends CrudDao<NewCmClub> {
     String recordDescribe(Integer clubId);
 
     List<CmBehaviorRecord> selRegisterIP(Integer clubId);
+
+    List<ClubStatistics> selStatisticsList(ClubStatistics statistics);
 }

+ 421 - 0
src/main/java/com/caimei/modules/user/entity/ClubStatistics.java

@@ -0,0 +1,421 @@
+package com.caimei.modules.user.entity;
+
+import com.thinkgem.jeesite.common.persistence.DataEntity;
+
+/**
+ * Description
+ *
+ * @author : Charles
+ * @date : 2023/2/23
+ */
+public class ClubStatistics extends DataEntity<ClubStatistics> {
+
+    private Integer userID;
+    private Integer clubID;
+
+    private String registerStartTime;       //注册开始时间
+    private String registerEndTime;         //注册结束时间
+    private String searchStartTime;         //最近下单开始时间
+    private String searchEndTime;           //最近下单结束时间
+    private String customerValue;           //机构类型
+    private String searchUserIdentity;      //机构级别
+    private String searchStatus;            //状态
+    private String customStartTime;         //自定义统计开始时间
+    private String customEndTime;           //自定义统计结束时间
+    private String monthStartTime;         //近一个月开始时间
+    private String monthEndTime;           //近一个月结束时间
+    private String yearStartTime;         //近一个年开始时间
+    private String yearEndTime;           //近一个年结束时间
+
+    private String name;    // 机构名称
+    private String linkMan; //联系人
+    private String contractMobile;  //联系手机
+    private String linkManIdentity; //联系人身份:1老板,2采购,3运营,4其他
+    private String spName;      //协销人员
+    private String address;         //详细地址
+    private String businessLicenseImage;    //营业执照
+    private String userIdentity;    //用户身份
+    private String sname;   //机构简称
+    private String contractEmail;   //联系邮箱
+    private String contractPhone;   //联系电话
+    private String fax;     //传真
+    private String headpic;     //门头照
+    private String socialCreditCode;    //统一社会信用代码 --- 营业执照编号
+    private String info;    //公司简介
+    private String linkManStatus;   //联系人身份
+    private String clubStatus;  // 机构状态
+    private String clubRank;  // 机构级别
+    private String firstClubType;  // 机构一级分类
+    private String classify;  // 机构二级分类
+    private String clubDataIntegrity;  // 资料完整度
+    private String addTime;  // 注册时间
+    private String svipUserFlag;  // vip类别
+    private String payTotalMonth;  // 近一个月购买额
+    private String orderCountMonth;  // 近一个月订单数
+    private String payTotalYear;  // 近一个年购买额
+    private String orderCountYear;  // 近一个年订单数
+    private String payTotal;  // 总购买额
+    private String pageLabel;   //最常搜索词
+    private String lastOrderTime;  // 最近下单时间
+
+
+    public Integer getUserID() {
+        return userID;
+    }
+
+    public void setUserID(Integer userID) {
+        this.userID = userID;
+    }
+
+    public Integer getClubID() {
+        return clubID;
+    }
+
+    public void setClubID(Integer clubID) {
+        this.clubID = clubID;
+    }
+
+    public String getRegisterStartTime() {
+        return registerStartTime;
+    }
+
+    public void setRegisterStartTime(String registerStartTime) {
+        this.registerStartTime = registerStartTime;
+    }
+
+    public String getRegisterEndTime() {
+        return registerEndTime;
+    }
+
+    public void setRegisterEndTime(String registerEndTime) {
+        this.registerEndTime = registerEndTime;
+    }
+
+    public String getSearchStartTime() {
+        return searchStartTime;
+    }
+
+    public void setSearchStartTime(String searchStartTime) {
+        this.searchStartTime = searchStartTime;
+    }
+
+    public String getSearchEndTime() {
+        return searchEndTime;
+    }
+
+    public void setSearchEndTime(String searchEndTime) {
+        this.searchEndTime = searchEndTime;
+    }
+
+    public String getCustomerValue() {
+        return customerValue;
+    }
+
+    public void setCustomerValue(String customerValue) {
+        this.customerValue = customerValue;
+    }
+
+    public String getSearchUserIdentity() {
+        return searchUserIdentity;
+    }
+
+    public void setSearchUserIdentity(String searchUserIdentity) {
+        this.searchUserIdentity = searchUserIdentity;
+    }
+
+    public String getSearchStatus() {
+        return searchStatus;
+    }
+
+    public void setSearchStatus(String searchStatus) {
+        this.searchStatus = searchStatus;
+    }
+
+    public String getCustomStartTime() {
+        return customStartTime;
+    }
+
+    public void setCustomStartTime(String customStartTime) {
+        this.customStartTime = customStartTime;
+    }
+
+    public String getCustomEndTime() {
+        return customEndTime;
+    }
+
+    public void setCustomEndTime(String customEndTime) {
+        this.customEndTime = customEndTime;
+    }
+
+    public String getMonthStartTime() {
+        return monthStartTime;
+    }
+
+    public void setMonthStartTime(String monthStartTime) {
+        this.monthStartTime = monthStartTime;
+    }
+
+    public String getMonthEndTime() {
+        return monthEndTime;
+    }
+
+    public void setMonthEndTime(String monthEndTime) {
+        this.monthEndTime = monthEndTime;
+    }
+
+    public String getYearStartTime() {
+        return yearStartTime;
+    }
+
+    public void setYearStartTime(String yearStartTime) {
+        this.yearStartTime = yearStartTime;
+    }
+
+    public String getYearEndTime() {
+        return yearEndTime;
+    }
+
+    public void setYearEndTime(String yearEndTime) {
+        this.yearEndTime = yearEndTime;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getLinkMan() {
+        return linkMan;
+    }
+
+    public void setLinkMan(String linkMan) {
+        this.linkMan = linkMan;
+    }
+
+    public String getContractMobile() {
+        return contractMobile;
+    }
+
+    public void setContractMobile(String contractMobile) {
+        this.contractMobile = contractMobile;
+    }
+
+    public String getLinkManIdentity() {
+        return linkManIdentity;
+    }
+
+    public void setLinkManIdentity(String linkManIdentity) {
+        this.linkManIdentity = linkManIdentity;
+    }
+
+    public String getSpName() {
+        return spName;
+    }
+
+    public void setSpName(String spName) {
+        this.spName = spName;
+    }
+
+    public String getAddress() {
+        return address;
+    }
+
+    public void setAddress(String address) {
+        this.address = address;
+    }
+
+    public String getBusinessLicenseImage() {
+        return businessLicenseImage;
+    }
+
+    public void setBusinessLicenseImage(String businessLicenseImage) {
+        this.businessLicenseImage = businessLicenseImage;
+    }
+
+    public String getUserIdentity() {
+        return userIdentity;
+    }
+
+    public void setUserIdentity(String userIdentity) {
+        this.userIdentity = userIdentity;
+    }
+
+    public String getSname() {
+        return sname;
+    }
+
+    public void setSname(String sname) {
+        this.sname = sname;
+    }
+
+    public String getContractEmail() {
+        return contractEmail;
+    }
+
+    public void setContractEmail(String contractEmail) {
+        this.contractEmail = contractEmail;
+    }
+
+    public String getContractPhone() {
+        return contractPhone;
+    }
+
+    public void setContractPhone(String contractPhone) {
+        this.contractPhone = contractPhone;
+    }
+
+    public String getFax() {
+        return fax;
+    }
+
+    public void setFax(String fax) {
+        this.fax = fax;
+    }
+
+    public String getHeadpic() {
+        return headpic;
+    }
+
+    public void setHeadpic(String headpic) {
+        this.headpic = headpic;
+    }
+
+    public String getSocialCreditCode() {
+        return socialCreditCode;
+    }
+
+    public void setSocialCreditCode(String socialCreditCode) {
+        this.socialCreditCode = socialCreditCode;
+    }
+
+    public String getInfo() {
+        return info;
+    }
+
+    public void setInfo(String info) {
+        this.info = info;
+    }
+
+    public String getLinkManStatus() {
+        return linkManStatus;
+    }
+
+    public void setLinkManStatus(String linkManStatus) {
+        this.linkManStatus = linkManStatus;
+    }
+
+    public String getClubStatus() {
+        return clubStatus;
+    }
+
+    public void setClubStatus(String clubStatus) {
+        this.clubStatus = clubStatus;
+    }
+
+    public String getClubRank() {
+        return clubRank;
+    }
+
+    public void setClubRank(String clubRank) {
+        this.clubRank = clubRank;
+    }
+
+    public String getFirstClubType() {
+        return firstClubType;
+    }
+
+    public void setFirstClubType(String firstClubType) {
+        this.firstClubType = firstClubType;
+    }
+
+    public String getClassify() {
+        return classify;
+    }
+
+    public void setClassify(String classify) {
+        this.classify = classify;
+    }
+
+    public String getClubDataIntegrity() {
+        return clubDataIntegrity;
+    }
+
+    public void setClubDataIntegrity(String clubDataIntegrity) {
+        this.clubDataIntegrity = clubDataIntegrity;
+    }
+
+    public String getAddTime() {
+        return addTime;
+    }
+
+    public void setAddTime(String addTime) {
+        this.addTime = addTime;
+    }
+
+    public String getSvipUserFlag() {
+        return svipUserFlag;
+    }
+
+    public void setSvipUserFlag(String svipUserFlag) {
+        this.svipUserFlag = svipUserFlag;
+    }
+
+    public String getPayTotalMonth() {
+        return payTotalMonth;
+    }
+
+    public void setPayTotalMonth(String payTotalMonth) {
+        this.payTotalMonth = payTotalMonth;
+    }
+
+    public String getOrderCountMonth() {
+        return orderCountMonth;
+    }
+
+    public void setOrderCountMonth(String orderCountMonth) {
+        this.orderCountMonth = orderCountMonth;
+    }
+
+    public String getPayTotalYear() {
+        return payTotalYear;
+    }
+
+    public void setPayTotalYear(String payTotalYear) {
+        this.payTotalYear = payTotalYear;
+    }
+
+    public String getOrderCountYear() {
+        return orderCountYear;
+    }
+
+    public void setOrderCountYear(String orderCountYear) {
+        this.orderCountYear = orderCountYear;
+    }
+
+    public String getPayTotal() {
+        return payTotal;
+    }
+
+    public void setPayTotal(String payTotal) {
+        this.payTotal = payTotal;
+    }
+
+    public String getPageLabel() {
+        return pageLabel;
+    }
+
+    public void setPageLabel(String pageLabel) {
+        this.pageLabel = pageLabel;
+    }
+
+    public String getLastOrderTime() {
+        return lastOrderTime;
+    }
+
+    public void setLastOrderTime(String lastOrderTime) {
+        this.lastOrderTime = lastOrderTime;
+    }
+}

+ 62 - 26
src/main/java/com/caimei/modules/user/service/ClubPortraitService.java

@@ -46,21 +46,28 @@ public class ClubPortraitService {
     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())) {
+        String endTime = "";
+        Calendar calendar = Calendar.getInstance();
+        calendar.setTime(date);
+        calendar.add(Calendar.DAY_OF_MONTH, -1);
+        Date time = calendar.getTime();
+        endTime = dateFormat.format(time);
+        String time1 = "";
+        String time2 = "";
+        boolean expty = ObjectUtils.isEmpty(cmPortrait.getStartTime()) && ObjectUtils.isEmpty(cmPortrait.getEndTime());
+        if (expty) {
             Date start = null;
             String startTime = "";
-            Calendar calendar = Calendar.getInstance();
-            calendar.setTime(date);
-            calendar.add(Calendar.DAY_OF_MONTH, -1);
-            Date time = calendar.getTime();
-            String endTime = dateFormat.format(time);
             String format = dateFormat.format(date);
+            cmPortrait.setEndTime(endTime);
             // 日期参数为    日
             if (0 ==  cmPortrait.getDateType() || 1 == cmPortrait.getDateType()) {
                 cmPortrait.setAccessDate(endTime);
+                cmPortrait.setStartTime(endTime);
+//                cmPortrait.setEndTime(endTime);
             }
             if (2 == cmPortrait.getDateType()) {
-                cmPortrait.setEndTime(endTime);
+//                cmPortrait.setEndTime(endTime);
                 calendar.setTime(time);
                 calendar.add(Calendar.MONTH, -1);
                 start = calendar.getTime();
@@ -68,7 +75,7 @@ public class ClubPortraitService {
                 cmPortrait.setStartTime(startTime);
             }
             if (3 == cmPortrait.getDateType()) {
-                cmPortrait.setEndTime(endTime);
+//                cmPortrait.setEndTime(endTime);
                 calendar.setTime(time);
                 calendar.add(Calendar.MONTH, -6);
                 start = calendar.getTime();
@@ -76,17 +83,23 @@ public class ClubPortraitService {
                 cmPortrait.setStartTime(startTime);
             }
             if (4 == cmPortrait.getDateType()) {
-                cmPortrait.setEndTime(endTime);
+//                cmPortrait.setEndTime(endTime);
                 calendar.setTime(time);
                 calendar.add(Calendar.YEAR, -1);
                 start = calendar.getTime();
                 startTime = dateFormat.format(start);
                 cmPortrait.setStartTime(startTime);
             }
+        } else {
+            time1 = cmPortrait.getStartTime();
+            time2 = cmPortrait.getEndTime();
         }
         // 机构订单
         if (0 == cmPortrait.getType() || 4 == cmPortrait.getType()) {
-            if (0 !=  cmPortrait.getDateType() || 1 != cmPortrait.getDateType()) {
+            if ((0 ==  cmPortrait.getDateType() || 1 == cmPortrait.getDateType()) && expty) {
+                cmPortrait.setEndTime(dateFormat.format(date));
+            }
+            if (cmPortrait.getEndTime().equals(endTime)) {
                 cmPortrait.setEndTime(dateFormat.format(date));
             }
             int ordinary = 0, secondHand = 0, rebate = 0, partialRefund = 0, fullRefund = 0, closed = 0;
@@ -137,7 +150,7 @@ public class ClubPortraitService {
                 if (ordinary != 0) {
                     orderPortrait.setName("普通订单 【" + instance.format((float)ordinary / (float) length * 100) + "%】 【" + ordinary + "个】");
                 } else {
-                    orderPortrait.setName("普通订单 【 0 】 【" + ordinary + "个】");
+                    orderPortrait.setName("普通订单 【 0 %】 【" + ordinary + "个】");
                 }
                 orderPortraits.add(orderPortrait);
                 orderPortrait = new OrderPortrait();
@@ -145,7 +158,7 @@ public class ClubPortraitService {
                 if (secondHand != 0) {
                     orderPortrait.setName("二手订单 【" + instance.format((float)secondHand / (float) length * 100) + "%】 【" + secondHand + "个】");
                 } else {
-                    orderPortrait.setName("二手订单 【 0 】 【" + secondHand + "个】");
+                    orderPortrait.setName("二手订单 【 0 %】 【" + secondHand + "个】");
                 }
                 orderPortraits.add(orderPortrait);
                 orderPortrait = new OrderPortrait();
@@ -153,7 +166,7 @@ public class ClubPortraitService {
                 if (rebate != 0) {
                     orderPortrait.setName("返佣订单 【" + instance.format((float)rebate / (float) length * 100) + "%】 【" + rebate + "个】");
                 } else {
-                    orderPortrait.setName("返佣订单 【 0 】 【" + rebate + "个】");
+                    orderPortrait.setName("返佣订单 【 0 %】 【" + rebate + "个】");
                 }
                 orderPortraits.add(orderPortrait);
                 orderPortrait = new OrderPortrait();
@@ -161,7 +174,7 @@ public class ClubPortraitService {
                 if (partialRefund != 0) {
                     orderPortrait.setName("部分退款订单 【" + instance.format((float)partialRefund / (float) length * 100) + "%】 【" + partialRefund + "个】");
                 } else {
-                    orderPortrait.setName("部分退款订单 【 0 】 【" + partialRefund + "个】");
+                    orderPortrait.setName("部分退款订单 【 0 %】 【" + partialRefund + "个】");
                 }
                 orderPortraits.add(orderPortrait);
                 orderPortrait = new OrderPortrait();
@@ -169,7 +182,7 @@ public class ClubPortraitService {
                 if (fullRefund != 0) {
                     orderPortrait.setName("全部退款订单 【" + instance.format((float)fullRefund / (float) length * 100) + "%】 【" + fullRefund + "个】");
                 } else {
-                    orderPortrait.setName("全部退款订单 【 0 】 【" + fullRefund + "个】");
+                    orderPortrait.setName("全部退款订单 【 0 %】 【" + fullRefund + "个】");
                 }
                 orderPortraits.add(orderPortrait);
                 orderPortrait = new OrderPortrait();
@@ -177,17 +190,16 @@ public class ClubPortraitService {
                 if (closed != 0) {
                     orderPortrait.setName("已关闭订单 【" + instance.format((float)closed / (float) length * 100) + "%】 【" + closed + "个】");
                 } else {
-                    orderPortrait.setName("已关闭订单 【 0 】 【" + closed + "个】");
+                    orderPortrait.setName("已关闭订单 【 0 %】 【" + closed + "个】");
                 }
                 orderPortraits.add(orderPortrait);
 
                 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);
+            time = calendar.getTime();
+            endTime = dateFormat.format(time);
             cmPortrait.setEndTime(endTime);
         }
         // 搜索关键词
@@ -211,7 +223,10 @@ public class ClubPortraitService {
         }
         // 咨询记录
         if (2 == cmPortrait.getType() || 4 == cmPortrait.getType()) {
-            if (0 !=  cmPortrait.getDateType() || 1 != cmPortrait.getDateType()) {
+            if ((0 ==  cmPortrait.getDateType() || 1 == cmPortrait.getDateType()) && expty) {
+                cmPortrait.setEndTime(dateFormat.format(date));
+            }
+            if (cmPortrait.getEndTime().equals(endTime)) {
                 cmPortrait.setEndTime(dateFormat.format(date));
             }
             List<CmClubRemarks> remarksList = cmPortraitDao.selRemarksList(cmPortrait);
@@ -230,7 +245,7 @@ public class ClubPortraitService {
                 }
                 for (String str : strRemark) {
                     for (CmClubRemarks remarks: remarksList) {
-                        if (remarks.getRemarks().contains(str)) {
+                        if (str.equals(remarks.getRemarks())) {
                             number++;
                         }
                     }
@@ -242,16 +257,30 @@ public class ClubPortraitService {
                     }
                     number = 0;
                 }
+                // 数组根据出现次数排序
+                int temp = 0;
+                String strTemp = "";
+                for (int i = 0; i < integers.size() - 1; i++) {
+                    for (int k = 0; k < integers.size() - 1 - i; k++) {
+                        if (integers.get(k) > integers.get(k+1)) {
+                            temp = integers.get(k);
+                            integers.set(k,integers.get(k+1));
+                            integers.set(k+1,temp);
 
-                cmPortrait.setRemarksTotal(remarksList.get(0).getNumbers());
+                            strTemp = strings.get(k);
+                            strings.set(k,strings.get(k+1));
+                            strings.set(k+1,strTemp);
+                        }
+                    }
+                }
+//                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);
+            time = calendar.getTime();
+            endTime = dateFormat.format(time);
             cmPortrait.setEndTime(endTime);
         }
         // 访问记录
@@ -262,12 +291,19 @@ public class ClubPortraitService {
             if (pageTypeList.size() != 0) {
                 for(CmBehaviorRecord record : pageTypeList) {
                     integers.add(record.getNumbers());
-                    strings.add(record.getPageType());
+                    strings.add(record.getPageLabel());
                 }
                 cmPortrait.setPageTypeValue(integers);
                 cmPortrait.setPageType(strings);
             }
         }
+        if (!expty) {
+            cmPortrait.setStartTime(time1);
+            if ((0 ==  cmPortrait.getDateType() || 1 == cmPortrait.getDateType()) && ObjectUtils.isEmpty(cmPortrait.getStartTime())) {
+                cmPortrait.setStartTime(time2);
+            }
+            cmPortrait.setEndTime(time2);
+        }
         return cmPortrait;
     }
 }

+ 76 - 0
src/main/java/com/caimei/modules/user/service/NewCmClubService.java

@@ -1,7 +1,9 @@
 package com.caimei.modules.user.service;
 
 import java.io.IOException;
+import java.text.SimpleDateFormat;
 import java.util.Arrays;
+import java.util.Calendar;
 import java.util.Date;
 import java.util.List;
 
@@ -213,4 +215,78 @@ public class NewCmClubService extends CrudService<NewCmClubDao, NewCmClub> {
        return cmReports;
     }
 
+    public Page<ClubStatistics> statisticsList(Page<ClubStatistics> page, ClubStatistics statistics){
+        statistics.setPage(page);
+        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
+        Date date = new Date();
+        String monthStartTime = "";
+        String yearStartTime = "";
+        String endTime = "";
+        Calendar calendar = Calendar.getInstance();
+        calendar.setTime(date);
+        // 获取近一个月、近一年结束时间
+        calendar.add(Calendar.DAY_OF_MONTH, -1);
+        Date time = calendar.getTime();
+        endTime = dateFormat.format(time);
+        statistics.setMonthEndTime(endTime);
+        statistics.setYearEndTime(endTime);
+        // 近一个月开始时间
+        calendar.setTime(time);
+        calendar.add(Calendar.MONTH,-1);
+        statistics.setMonthStartTime(dateFormat.format(calendar.getTime()));
+        // 近一年开始时间
+        calendar.setTime(time);
+        calendar.add(Calendar.YEAR,-1);
+        statistics.setYearStartTime(dateFormat.format(calendar.getTime()));
+        List<ClubStatistics> selStatisticsList = newCmClubDao.selStatisticsList(statistics);
+        int number = 0;
+        for (ClubStatistics clubStatistics : selStatisticsList) {
+            if (StringUtils.isNotBlank(clubStatistics.getName())) {
+                number += 10;
+            }
+            if (StringUtils.isNotBlank(clubStatistics.getLinkMan())) {
+                number += 10;
+            }
+            if (StringUtils.isNotBlank(clubStatistics.getContractMobile())) {
+                number += 10;
+            }
+            if (StringUtils.isNotBlank(clubStatistics.getLinkManIdentity())) {
+                number += 10;
+            }
+            if (StringUtils.isNotBlank(clubStatistics.getAddress())) {
+                number += 10;
+            }
+            if (StringUtils.isNotBlank(clubStatistics.getBusinessLicenseImage())) {
+                number += 10;
+            }
+            if (StringUtils.isNotBlank(clubStatistics.getUserIdentity())) {
+                number += 10;
+            }
+            if (StringUtils.isNotBlank(clubStatistics.getSname())) {
+                number += 3;
+            }
+            if (StringUtils.isNotBlank(clubStatistics.getContractEmail())) {
+                number += 5;
+            }
+            if (StringUtils.isNotBlank(clubStatistics.getContractPhone())) {
+                number += 4;
+            }
+            if (StringUtils.isNotBlank(clubStatistics.getFax())) {
+                number += 3;
+            }
+            if (StringUtils.isNotBlank(clubStatistics.getHeadpic())) {
+                number += 6;
+            }
+            if (StringUtils.isNotBlank(clubStatistics.getSocialCreditCode())) {
+                number += 5;
+            }
+            if (StringUtils.isNotBlank(clubStatistics.getInfo())) {
+                number += 5;
+            }
+            clubStatistics.setClubDataIntegrity(number+"%");
+            number=0;
+        }
+        page.setList(selStatisticsList);
+        return page;
+    }
 }

+ 12 - 1
src/main/java/com/caimei/modules/user/web/newUser/AgencyController.java

@@ -1219,10 +1219,12 @@ public class AgencyController extends BaseController {
         }else {
             linkage="http://localhost:8081/clubinfo.html?clubId="+clubId;
         }
-        // 机构注册IP
+        // 机构注册IP,注册ip所在地
         List<CmBehaviorRecord> behaviorList = newCmClubDao.selRegisterIP(clubId);
         CmBehaviorRecord record = new CmBehaviorRecord();
         record.setClubID(clubId);
+        // 注册ip所在地
+        String ipAddress = behaviorList.get(0).getRegion();
         SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
         // 获取注册时间一周前时间
         Calendar calendar = Calendar.getInstance();
@@ -1262,6 +1264,7 @@ public class AgencyController extends BaseController {
         model.addAttribute("linkage",linkage);
         model.addAttribute("describe",describe);
         model.addAttribute("masBehavior",masBehavior);
+        model.addAttribute("ipAddress",ipAddress);
         model.addAttribute("clubId", clubId);
         return "modules/userNew/recordLinkageForm";
     }
@@ -1401,6 +1404,14 @@ public class AgencyController extends BaseController {
         return map;
     }
 
+    @RequestMapping(value = "/statisticsList")
+    public String statisticsList(ClubStatistics statistics, HttpServletRequest request, HttpServletResponse response, Model model) {
+        Page<ClubStatistics> page = newCmClubService.statisticsList(new Page<>(request, response), statistics);
+        model.addAttribute("statistics",statistics);
+        model.addAttribute("page",page);
+        return "modules/userNew/cmAgencyStatisticsList";
+    }
+
     @RequestMapping("/clubPortrait")
     public String clubPortrait(CmPortrait cmPortrait, Model model) {
         CmPortrait portrait = portraitService.dataTotal(cmPortrait);

+ 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

+ 1 - 1
src/main/resources/mappings/modules/product/ProductMapper.xml

@@ -579,7 +579,7 @@
             AND p.newvalidFlag = 1
             AND p.newProductType=1
             AND p.validFlag = 2
-            AND p.showFlag!=2
+#             AND p.showFlag!=2
 
         </where>
         # 在设置重点关注时给排序值1000为了让重点关注始终在列表前端

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

@@ -26,7 +26,7 @@
                  AND orderTime like concat('%',#{accessDate},'%')
              </if>
              <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
-                 AND orderTime <![CDATA[ >= ]]> #{startTime} AND orderTime <![CDATA[ < ]]> #{endTime}
+                 AND orderTime <![CDATA[ >= ]]> #{startTime} AND orderTime <![CDATA[ <= ]]> #{endTime}
              </if>
         </where>
     </select>
@@ -39,7 +39,7 @@
                cbr.accessDate
         FROM cm_behavior_record cbr LEFT JOIN club c ON cbr.userID = c.userID
         <where>
-            cbr.pageType IN (8, 9) AND c.clubID = #{clubID}
+            cbr.pageType IN (8, 9) AND c.clubID = #{clubID} AND cbr.pageLabel IS NOT NULL AND cbr.pageLabel != ''
             <if test="accessDate != null and accessDate != ''">
                 AND cbr.accessDate = #{accessDate}
             </if>
@@ -75,11 +75,10 @@
         SELECT
                c.clubID,
                COUNT(cbr.pageType) as numbers,
-               cpt.pageType,
+               cbr.pageLabel,
                cbr.accessDate
         FROM cm_behavior_record cbr
         LEFT JOIN club c ON cbr.userID = c.userID
-        LEFT JOIN cm_page_type cpt ON cbr.pageType = cpt.id
         <where>
                 c.clubID = #{clubID}
             <if test="accessDate != null and accessDate != ''">

+ 176 - 1
src/main/resources/mappings/modules/user/NewCmClubMapper.xml

@@ -716,6 +716,181 @@
         LIMIT 1
     </select>
     <select id="selRegisterIP" resultType="com.caimei.modules.user.entity.CmBehaviorRecord">
-        SELECT u.registerIP, u.registerTime FROM USER u LEFT JOIN club c ON u.userID = c.userID WHERE c.clubID = #{clubId}
+        SELECT u.registerIP,u.ipAddress AS region, u.registerTime FROM USER u LEFT JOIN club c ON u.userID = c.userID WHERE c.clubID = #{clubId}
+    </select>
+
+    <select id="selStatisticsList" resultType="com.caimei.modules.user.entity.ClubStatistics">
+        SELECT
+        u.userId,
+        c.clubID,
+        c.name,
+        c.linkMan,
+        c.contractMobile,
+        c.linkManIdentity,
+        c.address,
+        c.businessLicenseImage,
+        u.userIdentity,
+        c.sname,
+        c.contractEmail,
+        c.contractPhone,
+        c.fax,
+        c.headpic,
+        c.socialCreditCode,
+        c.info,
+        (CASE WHEN c.linkManIdentity=1 THEN '老板'
+        WHEN c.linkManIdentity=2 THEN '采购'
+        WHEN c.linkManIdentity=3 THEN '运营'
+        WHEN c.linkManIdentity=4 THEN '其他'
+        END) AS linkManStatus,
+        (CASE WHEN c.status = 1 THEN '待审核'
+        WHEN c.status=91 THEN '已下线'
+        WHEN c.status=90 THEN '已上线'
+        WHEN c.status=92 THEN '审核未通过'
+        WHEN c.status=93 THEN '已确认'
+        ELSE '已冻结' END) AS clubStatus,
+        (CASE WHEN u.userIdentity=2 THEN '资质机构'
+        ELSE '个人机构' END) AS clubRank,
+        (CASE WHEN c.firstClubType=1 THEN '医美'
+        WHEN c.firstClubType=2 THEN '生美'
+        WHEN c.firstClubType=3 THEN '项目公司'
+        WHEN c.firstClubType=4 THEN '个人'
+        ELSE '其他' END) AS firstClubType,
+        (CASE WHEN c.secondClubType=1 THEN '诊所'
+        WHEN c.secondClubType=2 THEN '门诊'
+        WHEN c.secondClubType=3 THEN '医院'
+        END) AS classify,
+        c.addTime AS addTime,
+        IF(csu.delFlag = '0' AND NOW() <![CDATA[ < ]]> csu.endTime,1,0) AS svipUserFlag,
+        case sp.status when 91 then '采美默认协销经理(官方账号)' else sp.linkMan end AS spName,
+        IFNULL(orderMonth.payTotalMonth,0) AS payTotalMonth,
+        IFNULL(orderMonth.orderCountMonth,0) AS orderCountMonth,
+        IFNULL(orderYesr.payTotalYesr,0) AS payTotalYear,
+        IFNULL(orderYesr.orderCountYesr,0) AS orderCountYear,
+        IFNULL(orderTotal.payTotal,0) AS payTotal,
+        pb.pageLabel,
+        MAX(cor.orderTime) AS lastOrderTime
+        FROM club c
+        LEFT JOIN cm_order cor ON c.userID = cor.userID
+        LEFT JOIN USER u ON u.userId=c.userId
+        LEFT JOIN cm_svip_user csu ON csu.userId = u.userID
+        LEFT JOIN serviceprovider sp ON sp.serviceProviderID = c.spID
+        LEFT JOIN
+        (SELECT userId,SUM(co.payTotalFee) AS payTotalMonth,
+        COUNT(co.orderid) AS orderCountMonth
+        FROM cm_order co
+        <where>
+            co.status NOT IN (0,6,7)
+            <if test="monthStartTime != null and monthStartTime != '' and monthEndTime != null and monthEndTime != ''">
+                AND co.orderTime BETWEEN #{monthStartTime} AND #{monthEndTime}
+            </if>
+        </where>
+        GROUP BY co.userid) AS orderMonth ON c.userId=orderMonth.userId
+
+        LEFT JOIN
+        (SELECT userId,SUM(co.payTotalFee) AS payTotalYesr,
+        COUNT(co.orderid) AS orderCountYesr
+        FROM cm_order co
+        <where>
+             co.status NOT IN (0,6,7)
+            <if test="yearStartTime != null and yearStartTime != '' and yearEndTime != null and yearEndTime != ''">
+                AND co.orderTime BETWEEN #{yearStartTime} AND #{yearEndTime}
+            </if>
+        </where>
+        GROUP BY co.userid) AS orderYesr ON c.userId=orderYesr.userId
+
+        LEFT JOIN
+        (SELECT userId,SUM(co.payTotalFee) AS payTotal,
+        COUNT(co.orderid) AS 21OrderCount
+        FROM cm_order co
+        <where>
+            co.status NOT IN (0,6,7)
+            <if test="customStartTime != null and customStartTime != ''">
+                AND (co.orderTime > #{customStartTime} or co.orderTime = #{customStartTime})
+            </if>
+            <if test="customEndTime != null and customEndTime != ''">
+                AND co.orderTime <![CDATA[ <= ]]> #{customEndTime}
+            </if>
+        </where>
+        GROUP BY co.userid) AS orderTotal ON c.userId=orderTotal.userId
+
+        LEFT JOIN
+        (
+        SELECT c.userID, COUNT(cbr.pageLabel), cbr.pageLabel
+        FROM cm_behavior_record cbr
+        LEFT JOIN club c ON cbr.userID = c.userID
+        <where> cbr.userID = c.userID</where>
+        GROUP BY cbr.pageLabel) AS pb ON c.userID = pb.userID
+        <where>
+            <if test="registerStartTime != null and registerStartTime != ''">
+                AND (c.addTime > #{registerStartTime} or c.addTime = #{registerStartTime} )
+            </if>
+           <if test="registerEndTime != null and registerEndTime != ''">
+               AND c.addTime <![CDATA[ <= ]]> #{registerEndTime}
+           </if>
+            <if test="searchStartTime != null and searchStartTime != ''">
+                AND (cor.orderTime > #{searchStartTime} or cor.orderTime = #{searchStartTime} )
+            </if>
+               <if test=" searchEndTime != null and searchEndTime != ''">
+                   AND cor.orderTime <![CDATA[ <= ]]> #{searchEndTime}
+               </if>
+            <if test="customerValue != null and customerValue != ''">
+                AND c.firstClubType = #{customerValue}
+            </if>
+            <if test="searchUserIdentity != null and searchUserIdentity != ''">
+                AND u.userIdentity = #{searchUserIdentity}
+            </if>
+            <if test="searchStatus != null and searchStatus != ''">
+                AND c.status = #{searchStatus}
+            </if>
+            <if test="linkManIdentity != null and linkManIdentity != ''">
+                AND c.linkManIdentity = #{linkManIdentity}
+            </if>
+            <if test="clubDataIntegrity != null and clubDataIntegrity != ''">
+                AND c.status = #{clubDataIntegrity}
+            </if>
+            <if test="payTotalMonth != null and payTotalMonth != ''">
+                <if test="payTotalMonth==1">
+                    AND orderMonth.payTotalMonth <![CDATA[ < ]]> 10000
+                </if>
+                <if test="payTotalMonth==2">
+                    AND orderMonth.payTotalMonth BETWEEN 10000 AND 100000
+                </if>
+                <if test="payTotalMonth==3">
+                    AND orderMonth.payTotalMonth BETWEEN 100000 AND 1000000
+                </if>
+                <if test="payTotalMonth==4">
+                    AND orderMonth.payTotalMonth <![CDATA[ > ]]> 1000000
+                </if>
+            </if>
+            <if test="payTotalYear != null and payTotalYear != ''">
+                <if test="payTotalYear==1">
+                    AND orderYesr.payTotalYesr <![CDATA[ < ]]> 10000
+                </if>
+                <if test="payTotalYear==2">
+                    AND orderYesr.payTotalYesr BETWEEN 10000 AND 100000
+                </if>
+                <if test="payTotalYear==3">
+                    AND orderYesr.payTotalYesr BETWEEN 100000 AND 1000000
+                </if>
+                <if test="payTotalYear==4">
+                    AND orderYesr.payTotalYesr <![CDATA[ > ]]> 1000000
+                </if>
+            </if>
+            <if test="payTotal != null and payTotal != ''">
+                <if test="payTotal==1">
+                    AND orderTotal.payTotal <![CDATA[ < ]]> 10000
+                </if>
+                <if test="payTotal==2">
+                    AND orderTotal.payTotal BETWEEN 10000 AND 100000
+                </if>
+                <if test="payTotal==3">
+                    AND orderTotal.payTotal BETWEEN 100000 AND 1000000
+                </if>
+                <if test="payTotal==4">
+                    AND orderTotal.payTotal <![CDATA[ > ]]> 1000000
+                </if>
+            </if>
+        </where>
+        GROUP BY c.userID
     </select>
 </mapper>

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

@@ -50,7 +50,8 @@
 </head>
 <body>
 <ul class="nav nav-tabs">
-    <li class="active"><a href="${ctx}/new/user/agency/">机构列表</a></li>
+    <li class="active"><a href="${ctx}/new/user/agency/">机构机构基本资料列表</a></li>
+    <li><a href="${ctx}/new/user/agency/statisticsList">机构分析统计列表</a></li>
     <li><a href="${ctx}/user/clubTemporary/">未确认机构</a></li>
     <li><a href="${ctx}/user/cmOperational/">操作日志</a></li>
 </ul>
@@ -59,6 +60,10 @@
     <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
     <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
     <div class="flex-wrap">
+        <div class="item">
+            <label>机构ID:</label>
+            <form:input path="clubID"  htmlEscape="false" maxlength="50" class="input-medium"/>
+        </div>
         <div class="item">
             <label>机构名称:</label>
             <form:input path="searchName"  htmlEscape="false" maxlength="50" class="input-medium"/>

+ 300 - 0
src/main/webapp/WEB-INF/views/modules/userNew/cmAgencyStatisticsList.jsp

@@ -0,0 +1,300 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
+<html>
+<head>
+    <title>机构列表</title>
+    <meta name="decorator" content="default"/>
+    <style type="text/css">
+        .reg-row .new-tag.active{border:1px solid #de5801}
+        .reg-row{margin-bottom:20px}
+        .reg-row .reg-label{display:inline-block;width:120px;text-align:right;font-size:13px}
+        .the-oradio{display:inline-block;vertical-align:top}
+        .the-oradio div{width:85px;display:inline-block;font-size:12px;color:#666}
+        .the-oradio div input[type="radio"]{width:17px;height:17px;margin-right:5px;vertical-align:text-top}
+        .med-option{display:block;margin:10px 0 0 125px}
+        .reg-row .business-license{position:relative;display:inline-block;width:166px;height:123px;border-radius:6px;margin:18px 0 0 125px}
+        #medicalPracticeLicenseImgPreview{display:inline-block}
+        .qualification{margin-top:20px}
+        .reg-row .tags-area{display:inline-block;width:420px}
+        .reg-row .new-tag{display:inline-block;width:70px;border:1px solid #e5e5e5;border-radius:6px;padding:5px;margin-right:14px;margin-bottom:14px;text-align:center;font-size:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}
+        .reg-row .tags-operate{margin-left:125px}
+        .reg-row .reg-input{width:336px;height:32px;padding:0 8px;margin-right:20px;border:1px solid #dcdcdc;border-radius:6px}
+        .reg-row .tags-operate .tag-input{width:159px;margin-right:13px;display:none;vertical-align:top}
+        .reg-row .tags-operate .tag-add{line-height:20px;vertical-align:middle;margin-bottom:0;vertical-align:top}
+        .reg-row .tags-area{vertical-align:top}
+        .tag-add{display:none}
+        .table th{text-align:center}
+        .table td{text-align:center}
+        .modal{width:700px;margin-left:-350px}
+        #myModal{display:none}
+        .modal-body{max-height:300px !important}
+        .modal.fade.in{top:0 !important}
+        #btnSubmit{margin-left:20px}
+        .flex-wrap .item{margin-right:20px}
+        #auditBox{padding:20px;line-height:30px}
+        #auditBox .bd-row{display:flex;margin-bottom:15px}
+        #auditBox .bd-row > span{display:inline-block;width:60px}
+        #auditBox .auditCheckBox{width:250px}
+        #auditBox .auditCheckBox label{margin:0 5px 5px 0}
+        #auditBox .auditCheckBox input{display:none}
+        #auditBox .auditCheckBox input + span{display:inline-block;line-height:24px;padding:0 12px;border:1px solid #666;border-radius:5px}
+        #auditBox .auditCheckBox input:checked + span{background-color:#E6633A}
+        #alertModal{width:300px;height:200px;border:1px solid #ebebeb;border-radius:10px;position:fixed;top:0;bottom:0;left:0;right:0;margin:auto;background:#FFFFFF;display:none}
+        #alertModal .title{height:50px;line-height:50px;font-size:14px;font-weight:bold;text-align:center;position:relative;border-bottom:1px solid #EBEBEB}
+        #alertModal .close{width:50px;height:50px;display:block;position:absolute;right:0;top:0;line-height:50px;color:#000;font-weight:bold;text-align:center;font-style:normal;font-size:18px}
+        #alertModal .alert-content{width:260px;height:60px;padding:20px}
+        #alertModal .alertModal-btn{width:260px;height:49px;padding:0 20px;border-top:1px solid #EBEBEB}
+        #alertModal .alertModal-btn button{float:right;margin:5px}
+        .acticer_span{display: inline-block;width: 14px;height: 14px;border-radius: 50%;box-sizing: border-box;border: 1px solid #999999;text-align: center;color: #333333;font-size: 12px;line-height: 14px;float: none;margin-left: 3px;}
+        /*#items{border-bottom: #0d0d0d 1px dashed}*/
+    </style>
+</head>
+<body>
+<ul class="nav nav-tabs">
+    <li><a href="${ctx}/new/user/agency/">机构机构基本资料列表</a></li>
+    <li class="active"><a href="${ctx}/new/user/agency/statisticsList">机构分析统计列表</a></li>
+    <li><a href="${ctx}/user/clubTemporary/">未确认机构</a></li>
+    <li><a href="${ctx}/user/cmOperational/">操作日志</a></li>
+</ul>
+<form:form id="searchForm" modelAttribute="statistics" action="${ctx}/new/user/agency/statisticsList" method="post"
+           class="breadcrumb form-search">
+    <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+    <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+    <div class="flex-wrap">
+        <div id="items" class="flex-wrap">
+            <div class="item">
+                <label>注册时间:</label>
+                <form:input path="registerStartTime" type="text" maxlength="20" class="input-mini Wdate" value="${registerStartTime}"
+                            onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+                -
+                <form:input path="registerEndTime" type="text" maxlength="20" class="input-mini Wdate" value="${registerEndTime}"
+                            onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+            </div>
+            <div class="item">
+                <label>最近下单时间:</label>
+                <form:input path="searchStartTime" type="text" maxlength="20" class="input-mini Wdate" value="${searchStartTime}"
+                            onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+                -
+                <form:input path="searchEndTime" type="text" maxlength="20" class="input-mini Wdate" value="${searchEndTime}"
+                            onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+            </div>
+            <label class="control-label">机构类型:</label>
+            <form:select path="customerValue" class="input-medium">
+                <form:option value="" label="请选择"/>
+                <form:option value="1" label="医美"/>
+                <form:option value="2" label="生美"/>
+                <form:option value="3" label="项目公司"/>
+                <form:option value="4" label="个人"/>
+                <form:option value="0" label="其他"/>
+            </form:select>
+            <div class="item">
+                <label>机构级别:</label>
+                <form:select path="searchUserIdentity" class="input-medium">
+                    <form:option value="" label="请选择"/>
+                    <form:option value="4" label="个人机构"/>
+                    <form:option value="2" label="资质机构"/>
+                    <form:option value="8" label="超级会员"/>
+                </form:select>
+            </div>
+            <div class="item">
+                <label> 状态:</label>
+                <form:select path="searchStatus" class="input-medium">
+                    <form:option value="" label="请选择"/>
+                    <form:options items="${fns:getDictList('club_status')}" itemLabel="label" itemValue="value"
+                                  htmlEscape="false"/>
+                </form:select>
+            </div>
+            <label class="control-label">联系人身份:</label>
+            <form:select path="linkManIdentity" class="input-medium">
+                <form:option value="" label="请选择"/>
+                <form:option value="1" label="老板"/>
+                <form:option value="2" label="采购"/>
+                <form:option value="3" label="运营"/>
+                <form:option value="4" label="其他"/>
+            </form:select>
+            <label class="control-label">资料完整度:</label>
+            <form:select path="clubDataIntegrity" class="input-medium">
+                <form:option value="" label="请选择"/>
+                <form:option value="1" label="20%至70%"/>
+                <form:option value="2" label="70%以上"/>
+            </form:select>
+        </div>
+<%--        <span style="width: 100%; height: 0; border: #0d0d0d 1px dashed;"/><br/>--%>
+        <div class="flex-wrap">
+            <label class="control-label">近一个月购买额:</label>
+            <form:select id="payTotalMonth" path="payTotalMonth" class="input-medium">
+                <form:option value="" label="请选择"/>
+                <form:option value="1" label="小于1万"/>
+                <form:option value="2" label="1万至10万"/>
+                <form:option value="3" label="10万至100万"/>
+                <form:option value="4" label="大于100万"/>
+            </form:select>
+            <label class="control-label">近一个年购买额:</label>
+            <form:select id ="payTotalYear" path="payTotalYear" class="input-medium">
+                <form:option value="" label="请选择"/>
+                <form:option value="1" label="小于1万"/>
+                <form:option value="2" label="1万至10万"/>
+                <form:option value="3" label="10万至100万"/>
+                <form:option value="4" label="大于100万"/>
+            </form:select>
+            <div class="item">
+                <label>自定义统计时间:</label>
+                <form:input id="customStartTime" path="customStartTime" type="text" maxlength="20" class="input-mini Wdate" value="${customStartTime}"
+                            onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+                -
+                <form:input id="customEndTime" path="customEndTime" type="text" maxlength="20" class="input-mini Wdate" value="${customEndTime}"
+                            onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
+            </div>
+            <label class="control-label">总购买额:</label>
+            <form:select id="payTotal" path="payTotal" class="input-medium">
+                <form:option value="" label="请选择"/>
+                <form:option value="1" label="小于1万"/>
+                <form:option value="2" label="1万至10万"/>
+                <form:option value="3" label="10万至100万"/>
+                <form:option value="4" label="大于100万"/>
+            </form:select>
+        </div>
+        <div class="item">
+            <input id="btnSubmit" class="btn btn-primary" type="submit" value="查询" onclick="subClick()"/>
+            <input id="export" class="btn btn-primary" type="button" value="导出"/>
+        </div>
+
+    </div>
+</form:form>
+<sys:message content="${message}"/>
+<table id="contentTable" class="table table-striped table-bordered table-condensed">
+    <thead>
+    <tr>
+        <th>机构ID</th>
+        <th>机构名称</th>
+        <th>联系人</th>
+        <th>联系人身份</th>
+        <th>手机号</th>
+        <th>协销人员</th>
+        <th>状态</th>
+        <th>机构类别</th>
+        <th>机构级别</th>
+        <th>资料完整度</th>
+        <th>注册时间</th>
+        <th>近一个月订单数</th>
+        <th>近一个年订单数</th>
+        <th>近一个月购买额</th>
+        <th>近一个年购买额</th>
+        <th>总购买额</th>
+        <th>最常搜索词</th>
+        <th>最近下单时间</th>
+        <th>操作</th>
+    </tr>
+    </thead>
+    <tbody>
+    <c:forEach items="${page.list}" var="clubList">
+        <tr>
+            <td>${clubList.clubID}</td>
+            <td>
+                ${clubList.name}
+            </td>
+            <td>
+                    ${clubList.linkMan}
+            </td>
+            <td>
+                <c:if test="${clubList.linkManStatus ne null}">
+                    ${clubList.linkManStatus}
+                </c:if>
+                <c:if test="${clubList.linkManStatus eq null}">
+                    ---
+                </c:if>
+            </td>
+            <td>
+                    ${clubList.contractMobile}
+            </td>
+            <td>
+                    ${clubList.spName}
+            </td>
+            <td>${clubList.clubStatus}</td>
+            <td>
+                <c:if test="${clubList.firstClubType != null || clubList.firstClubType != ''}">
+                    ${clubList.firstClubType}
+                </c:if>
+                <c:if test="${clubList.classify ne null}">
+                   - ${clubList.classify}
+                </c:if>
+                <c:if test="${clubList.firstClubType == null and clubList.firstClubType == '' and clubList.classify == null and clubList.classify == ''}">
+                    ---
+                </c:if>
+            </td>
+            <td>
+                <c:if test="${clubList.userIdentity eq 4}">
+                    个人机构
+                </c:if>
+                <c:if test="${clubList.userIdentity eq 2}">
+                    资质机构
+                </c:if>
+                <c:if test="${clubList.svipUserFlag eq 1}">
+                    <font color="red">(超级会员)</font>
+                </c:if>
+                <c:if test="${clubList.userIdentity eq 2 and clubList.svipUserFlag eq 0}">
+                    <font color="red">(普通会员)</font>
+                </c:if>
+            </td>
+            <td>${clubList.clubDataIntegrity}</td>
+            <td>
+                <c:if test="${clubList.addTime != null || clubList.addTime != '' || clubList.addTime ne null}">
+                    ${clubList.addTime}
+                    <%--<fmt:formatDate value="${clubList.addTime}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate>--%>
+                </c:if>
+                <c:if test="${clubList.addTime == null || clubList.addTime == '' || clubList.addTime eq null}">
+                    ---
+                </c:if>
+            </td>
+            <td>${clubList.orderCountMonth}</td>
+            <td>${clubList.orderCountYear}</td>
+            <td>${clubList.payTotalMonth}</td>
+            <td>${clubList.payTotalYear}</td>
+            <td>${clubList.payTotal}</td>
+            <td>
+                <c:if test="${clubList.pageLabel ne null}">
+                    ${clubList.pageLabel}
+                </c:if>
+                <c:if test="${clubList.pageLabel eq null}">
+                    ---
+                </c:if>
+            </td>
+            <td>${clubList.lastOrderTime}</td>
+            <td>
+                <a href="${ctx}/new/user/agency/clubPortrait?clubID=${clubList.clubID}&clubName=${clubList.name}&dateType=0&type=4">查看详情</a>
+            </td>
+        </tr>
+    </c:forEach>
+    </tbody>
+</table>
+<div class="pagination">${page}</div>nixuel
+<script type="text/javascript">
+function page(n,s) {
+    $('#pageNo').val(n);
+    $('#pageSize').val(s);
+    $('#searchForm').submit();
+    return false;
+}
+function subClick() {
+    const payTotalMonth = $('#payTotalMonth').val();
+    const payTotalYear = $('#payTotalYear').val();
+    const customStartTime = $('#customStartTime').val();
+    const customEndTime = $('#customEndTime').val();
+    const payTotal = $('#payTotal').val();
+    if ((customStartTime != null || customStartTime != '') && (customEndTime != null || customEndTime != '')) {
+        if (payTotalMonth != null || payTotalMonth != '') {
+            $.jBox.confirm("自定义统计时间不能与近一个月/近一年购买额联动查询", "提示");
+        }
+        if (payTotalYear != null || payTotalYear != '') {
+            $.jBox.confirm("自定义统计时间不能与近一个月/近一年购买额联动查询", "提示");
+        }
+        if (payTotal == null || payTotal == '') {
+            $.jBox.confirm("自定义统计时间需要与总购买额一起联动查询", "提示");
+        }
+    }
+    $('#searchForm').submit();
+    return false;
+}
+</script>
+</body>
+</html>

+ 6 - 5
src/main/webapp/WEB-INF/views/modules/userNew/cmClubData.jsp

@@ -213,9 +213,6 @@
     </table>
 </div>
 
-<input type="hidden" id="curProvince" name="curProvince" value="${newCmClub.province }" disabled="disabled">
-<input type="hidden" id="curCity" name="curCity" value="${newCmClub.city }" disabled="disabled">
-<input type="hidden" id="curTown" name="curTown" value="${newCmClub.town }" disabled="disabled">
 <sys:message content="${message}"/>
 <hr class="detailLine">
 <div>
@@ -224,7 +221,11 @@
             <td colspan="2">
                 <div class="control-group">
                     <label class="control-label"><b>地址:</b></label>
-                    <div class="controls">
+                    <span  id="curProvince" name="curProvince" >${newCmClub.province }</span>
+                    <span  id="curCity" name="curCity" >${newCmClub.province }</span>
+                    <span  id="curTown" name="curTown" >${newCmClub.town }</span>
+                        ${newCmClub.address}
+                    <%--<div class="controls">
                         <form:select path="provinceID" disabled="true" class="input-xlarge" id="province"
                                      onchange="loadCity()" style="width:100px;">
                             <form:option value="" label="省" provinceId=""/>
@@ -237,7 +238,7 @@
                             <form:option value="" label="区"/>
                         </form:select>
                             ${newCmClub.address}
-                    </div>
+                    </div>--%>
                 </div>
             </td>
         </tr>

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

@@ -125,12 +125,16 @@
 
 		<sys:message content="${message}"/>
 	<input type="hidden" id='clubId' name='clubId' value="${clubId}">
+		<div class="control-group">
+			<label class="control-label"><font color="red">*</font>注册地:</label>
+			<span>${ipAddress}</span>
+		</div>
 		<div class="control-group">
 			<label class="control-label"><font color="red">*</font>描述:</label>
             <textarea id='describe' <c:if test="${empty describe}">placeholder="请输入该用户的行为信息,例如查看了什么商品或者文章,以及任何需要销售人员注意的信息"</c:if>
 					  name='describe' rows='5' cols='12' style="width: 700px" maxlength="500"><c:if test="${not empty describe}">${describe}</c:if><c:if test="${masBehavior ne ''}">,${masBehavior}</c:if></textarea>
 			<textarea hidden id="masBehavior" path="masBehavior"  name="masBehavior" style="width: 700px; visibility: hidden" maxlength="200"><c:if test="${masBehavior ne ''}">,${masBehavior}</c:if></textarea>
-		</div><%--<c:if test="${masBehavior ne ''}">,${masBehavior}</c:if>--%>
+		</div>
 
 	<div class="control-label">链接:</div><span id='link' name='link'>${link}</span>
 		<div class="form-actions">