Selaa lähdekoodia

Merge remote-tracking branch 'origin/developerD' into developer

huangzhiguo 1 vuosi sitten
vanhempi
commit
c92bc8b60f
22 muutettua tiedostoa jossa 1001 lisäystä ja 113 poistoa
  1. 6 1
      src/main/java/com/caimei/modules/newhome/dao/NewPageHomeimageDao.java
  2. 10 1
      src/main/java/com/caimei/modules/newhome/entity/NewPageHomeimage.java
  3. 72 0
      src/main/java/com/caimei/modules/newhome/entity/cmStatisticsType.java
  4. 18 0
      src/main/java/com/caimei/modules/newhome/web/NewPageHomeimageController.java
  5. 6 3
      src/main/java/com/caimei/modules/serviceteam/service/CmServiceteamRoleService.java
  6. 6 0
      src/main/java/com/caimei/modules/user/dao/CmPortraitDao.java
  7. 92 0
      src/main/java/com/caimei/modules/user/entity/ClubStatistics.java
  8. 60 0
      src/main/java/com/caimei/modules/user/entity/CmClubRemarks.java
  9. 20 0
      src/main/java/com/caimei/modules/user/entity/CmPortrait.java
  10. 160 4
      src/main/java/com/caimei/modules/user/service/ClubPortraitService.java
  11. 22 0
      src/main/java/com/caimei/modules/user/web/newUser/AgencyController.java
  12. 4 1
      src/main/resources/mappings/modules/newhome/NewPageHomeimageMapper.xml
  13. 13 13
      src/main/resources/mappings/modules/serviceteam/CmServiceteamRoleMapper.xml
  14. 55 8
      src/main/resources/mappings/modules/user/CmPortraitMapper.xml
  15. 2 0
      src/main/webapp/WEB-INF/views/modules/newhome/newPageHomeimageList.jsp
  16. 8 8
      src/main/webapp/WEB-INF/views/modules/order/cmPayShopOtherCheck.jsp
  17. 183 22
      src/main/webapp/WEB-INF/views/modules/userNew/cmClubPortrait.jsp
  18. 27 17
      src/main/webapp/WEB-INF/views/modules/userNew/cmRegistRemarksList.jsp
  19. 12 2
      src/main/webapp/WEB-INF/views/modules/userNew/cmVisitList.jsp
  20. 66 0
      src/main/webapp/static/modules/cmClubPortrait/cmClubEacths.js
  21. 146 33
      src/main/webapp/static/modules/cmClubPortrait/cmClubPortrait.css
  22. 13 0
      src/main/webapp/static/modules/cmClubPortrait/cmClubPortrait.js

+ 6 - 1
src/main/java/com/caimei/modules/newhome/dao/NewPageHomeimageDao.java

@@ -1,10 +1,13 @@
 package com.caimei.modules.newhome.dao;
 
+import com.caimei.modules.newhome.entity.cmStatisticsType;
 import com.thinkgem.jeesite.common.persistence.CrudDao;
 import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
 import com.caimei.modules.newhome.entity.NewPageHomeimage;
 import org.apache.ibatis.annotations.Param;
 
+import java.util.List;
+
 /**
  * 新首页轮播图DAO接口
  * @author ye.qin
@@ -17,5 +20,7 @@ public interface NewPageHomeimageDao extends CrudDao<NewPageHomeimage> {
 
     void updateSort(@Param("id") String id, @Param("sort") String sort);
 
+    List<cmStatisticsType> getBannerStatistics();
+
     String findBigSort();
-}
+}

+ 10 - 1
src/main/java/com/caimei/modules/newhome/entity/NewPageHomeimage.java

@@ -21,6 +21,7 @@ public class NewPageHomeimage extends DataEntity<NewPageHomeimage> {
 	private String sort;		// 排序
 	private String wwwEnabledStatus;		// www端状态 0停用 1启用
 	private String crmEnabledStatus;		// CRM端状态 0停用 1启用
+	private Integer count;	// 点击次数
 
 	public NewPageHomeimage() {
 		super();
@@ -106,4 +107,12 @@ public class NewPageHomeimage extends DataEntity<NewPageHomeimage> {
 	public void setCrmTitle(String crmTitle) {
 		this.crmTitle = crmTitle;
 	}
-}
+
+	public Integer getCount() {
+		return count;
+	}
+
+	public void setCount(Integer count) {
+		this.count = count;
+	}
+}

+ 72 - 0
src/main/java/com/caimei/modules/newhome/entity/cmStatisticsType.java

@@ -0,0 +1,72 @@
+package com.caimei.modules.newhome.entity;
+
+import java.util.Date;
+
+/**
+ * Description
+ *
+ * @author : Charles
+ * @date : 2023/9/4
+ */
+public class cmStatisticsType {
+    /**
+     * Id
+     */
+    private Integer statisticsId;
+    /**
+     * 类型{ 1:首页banner;2:直播模块;3:最新活动;4:热门文章;5:新品橱窗;6:活动列表 }
+     */
+    private Integer typeId;
+    /**
+     * bannerId
+     */
+    private Integer bannerId;
+    /**
+     * 点击时间
+     */
+    private Date clickTime;
+    /**
+     * 次数
+     */
+    private Integer count;
+
+    public Integer getStatisticsId() {
+        return statisticsId;
+    }
+
+    public void setStatisticsId(Integer statisticsId) {
+        this.statisticsId = statisticsId;
+    }
+
+    public Integer getTypeId() {
+        return typeId;
+    }
+
+    public void setTypeId(Integer typeId) {
+        this.typeId = typeId;
+    }
+
+    public Integer getBannerId() {
+        return bannerId;
+    }
+
+    public void setBannerId(Integer bannerId) {
+        this.bannerId = bannerId;
+    }
+
+    public Date getClickTime() {
+        return clickTime;
+    }
+
+    public void setClickTime(Date clickTime) {
+        this.clickTime = clickTime;
+    }
+
+    public Integer getCount() {
+        return count;
+    }
+
+    public void setCount(Integer count) {
+        this.count = count;
+    }
+}

+ 18 - 0
src/main/java/com/caimei/modules/newhome/web/NewPageHomeimageController.java

@@ -1,7 +1,9 @@
 package com.caimei.modules.newhome.web;
 
 import com.caimei.constants.common.RedisKeyUtil;
+import com.caimei.modules.newhome.dao.NewPageHomeimageDao;
 import com.caimei.modules.newhome.entity.NewPageHomeimage;
+import com.caimei.modules.newhome.entity.cmStatisticsType;
 import com.caimei.modules.newhome.service.NewPageHomeimageService;
 import com.caimei.modules.opensearch.GenerateUtils;
 import com.caimei.redis.RedisService;
@@ -24,7 +26,9 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import java.util.List;
 import java.util.Map;
+import java.util.stream.Collectors;
 
 /**
  * 新首页轮播图Controller
@@ -41,6 +45,8 @@ public class NewPageHomeimageController extends BaseController {
     @Resource
     private NewPageHomeimageService newPageHomeimageService;
     @Resource
+    private NewPageHomeimageDao newPageHomeimageDao;
+    @Resource
     private GenerateUtils generateUtils;
 
 
@@ -61,6 +67,18 @@ public class NewPageHomeimageController extends BaseController {
     @RequestMapping(value = {"list", ""})
     public String list(NewPageHomeimage newPageHomeimage, HttpServletRequest request, HttpServletResponse response, Model model) {
         Page<NewPageHomeimage> page = newPageHomeimageService.findPage(new Page<NewPageHomeimage>(request, response), newPageHomeimage);
+        // 点击次数
+        List<cmStatisticsType> bannerStatistics = newPageHomeimageDao.getBannerStatistics();
+        if (bannerStatistics.size() > 0) {
+            for (NewPageHomeimage homeimage : page.getList()) {
+                List<cmStatisticsType> collect = bannerStatistics.stream().filter(b -> homeimage.getId().equals(b.getBannerId().toString())).collect(Collectors.toList());
+                if (collect.size() > 0) {
+                    homeimage.setCount(collect.get(0).getCount());
+                } else {
+                    homeimage.setCount(0);
+                }
+            }
+        }
         model.addAttribute("page", page);
         return "modules/newhome/newPageHomeimageList";
     }

+ 6 - 3
src/main/java/com/caimei/modules/serviceteam/service/CmServiceteamRoleService.java

@@ -77,13 +77,16 @@ public class CmServiceteamRoleService extends CrudService<CmServiceteamRoleDao,
 
     @Transactional(readOnly = false)
     public void saveGroup(List<String> ids, CmServiceteamRole cmServiceteamRole) {
-        if (null != cmServiceteamRole.getTeamId()) {
+        if (StringUtils.isNotBlank(cmServiceteamRole.getTeamId())) {
             //如果小组存在,先修改原小组组长,删除组员,再保存现小组组员
             //修改组长id,不修改小组创建时间影响排序
             dao.updateLeadr(cmServiceteamRole);
             //删组员
             dao.deleteAll(cmServiceteamRole.getTeamId());
+        } else {
+            // 协销小组不存在, 先添加协销小组
+            dao.save(cmServiceteamRole);
         }
-        ids.forEach(i->dao.saveGroup(cmServiceteamRole.getTeamId(),i));
+        ids.forEach(i->dao.saveGroup(cmServiceteamRole.getId(),i));
     }
-}
+}

+ 6 - 0
src/main/java/com/caimei/modules/user/dao/CmPortraitDao.java

@@ -22,8 +22,14 @@ public interface CmPortraitDao extends CrudDao<CmPortrait> {
 
     CmPortrait selTotal(CmPortrait cmPortrait);
 
+    List<String> getClubRemarks(@Param("clubId") Integer clubId,@Param("startTime") String startTime,@Param("endTime") String endTime);
+
+    List<String> getClubBehavior(@Param("clubId") Integer clubId,@Param("startTime") String startTime,@Param("endTime") String endTime);
+
     ClubStatistics selClubData(@Param("clubID") Integer ClubID);
 
+    CmClubRemarks getClubRemarksInfo(@Param("clubID") Integer ClubID);
+
     List<NewOrder> selOrderList(CmPortrait cmPortrait);
 
     List<CmBehaviorRecord> selBehaviorList(CmPortrait cmPortrait);

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

@@ -4,6 +4,8 @@ import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
 import com.alibaba.excel.annotation.ExcelProperty;
 import com.thinkgem.jeesite.common.persistence.DataEntity;
 
+import java.util.List;
+
 /**
  * Description
  *
@@ -46,6 +48,8 @@ public class ClubStatistics extends DataEntity<ClubStatistics> {
     private String city;
     private String town;
 
+    private Integer sex;    //性别
+    private String age;    // 年龄
     private String name;    // 机构名称
     private String linkMan; //联系人
     private String contractMobile;  //联系手机
@@ -78,6 +82,14 @@ public class ClubStatistics extends DataEntity<ClubStatistics> {
     private String payTotal;  // 总购买额
     private String pageLabel;   //最常搜索词
     private String lastOrderTime;  // 最近下单时间
+    private String activeState;     // 活跃状态
+    private String customerValues;   // 客户价值
+    private String registerTime;    // 注册时间
+    private Integer customerSource;    // 客户来源 0 公众号 1 小红书 2 微博 3 搜狐 4 其他
+    private Integer groupAddition;    // 入群状态 0 以加群 1 未加群
+    private Integer wxReach;        // 微信触达 0 触达 1 未触达
+    private Integer mobileReach;    // 电话触达 0 触达 1 未触达
+    private String fillTime;    // 填写时间
 
 
     public Integer getUserID() {
@@ -288,6 +300,22 @@ public class ClubStatistics extends DataEntity<ClubStatistics> {
         this.name = name;
     }
 
+    public Integer getSex() {
+        return sex;
+    }
+
+    public void setSex(Integer sex) {
+        this.sex = sex;
+    }
+
+    public String getAge() {
+        return age;
+    }
+
+    public void setAge(String age) {
+        this.age = age;
+    }
+
     public String getLinkMan() {
         return linkMan;
     }
@@ -535,4 +563,68 @@ public class ClubStatistics extends DataEntity<ClubStatistics> {
     public void setLastOrderTime(String lastOrderTime) {
         this.lastOrderTime = lastOrderTime;
     }
+
+    public String getActiveState() {
+        return activeState;
+    }
+
+    public void setActiveState(String activeState) {
+        this.activeState = activeState;
+    }
+
+    public String getCustomerValues() {
+        return customerValues;
+    }
+
+    public void setCustomerValues(String customerValues) {
+        this.customerValues = customerValues;
+    }
+
+    public String getRegisterTime() {
+        return registerTime;
+    }
+
+    public void setRegisterTime(String registerTime) {
+        this.registerTime = registerTime;
+    }
+
+    public Integer getCustomerSource() {
+        return customerSource;
+    }
+
+    public void setCustomerSource(Integer customerSource) {
+        this.customerSource = customerSource;
+    }
+
+    public Integer getGroupAddition() {
+        return groupAddition;
+    }
+
+    public void setGroupAddition(Integer groupAddition) {
+        this.groupAddition = groupAddition;
+    }
+
+    public Integer getWxReach() {
+        return wxReach;
+    }
+
+    public void setWxReach(Integer wxReach) {
+        this.wxReach = wxReach;
+    }
+
+    public Integer getMobileReach() {
+        return mobileReach;
+    }
+
+    public void setMobileReach(Integer mobileReach) {
+        this.mobileReach = mobileReach;
+    }
+
+    public String getFillTime() {
+        return fillTime;
+    }
+
+    public void setFillTime(String fillTime) {
+        this.fillTime = fillTime;
+    }
 }

+ 60 - 0
src/main/java/com/caimei/modules/user/entity/CmClubRemarks.java

@@ -151,6 +151,18 @@ public class CmClubRemarks extends DataEntity<CmClubRemarks> {
     private Integer number;
 
     private Integer numbers;
+    // 沟通情况 0 已沟通 1联系不上
+    private Integer communicationSituation;
+    // 沟通方式 0:电话,微信 1:电话 2:微信
+    private String communicationMethods;
+    // 客户来源 0 公众号 1 小红书 2 微博 3 搜狐 4 其他
+    private Integer customerSource;
+    // 客户性别 0 男 1 女
+    private Integer customerGender;
+    // 客户年龄
+    private String customerAge;
+    // 加群情况 0 以加群 1 未加群
+    private Integer groupAddition;
 
 
     public Integer getReportID() {
@@ -458,4 +470,52 @@ public class CmClubRemarks extends DataEntity<CmClubRemarks> {
     public void setNumbers(Integer numbers) {
         this.numbers = numbers;
     }
+
+    public Integer getCommunicationSituation() {
+        return communicationSituation;
+    }
+
+    public void setCommunicationSituation(Integer communicationSituation) {
+        this.communicationSituation = communicationSituation;
+    }
+
+    public String getCommunicationMethods() {
+        return communicationMethods;
+    }
+
+    public void setCommunicationMethods(String communicationMethods) {
+        this.communicationMethods = communicationMethods;
+    }
+
+    public Integer getCustomerSource() {
+        return customerSource;
+    }
+
+    public void setCustomerSource(Integer customerSource) {
+        this.customerSource = customerSource;
+    }
+
+    public Integer getCustomerGender() {
+        return customerGender;
+    }
+
+    public void setCustomerGender(Integer customerGender) {
+        this.customerGender = customerGender;
+    }
+
+    public String getCustomerAge() {
+        return customerAge;
+    }
+
+    public void setCustomerAge(String customerAge) {
+        this.customerAge = customerAge;
+    }
+
+    public Integer getGroupAddition() {
+        return groupAddition;
+    }
+
+    public void setGroupAddition(Integer groupAddition) {
+        this.groupAddition = groupAddition;
+    }
 }

+ 20 - 0
src/main/java/com/caimei/modules/user/entity/CmPortrait.java

@@ -50,6 +50,10 @@ public class CmPortrait extends DataEntity<CmPortrait> {
     private Integer remarksTotal;
     // 当前咨询记录范围总量
     private Integer remarksScopeNum;
+    // 访问记录总量
+    private Integer visitTotal;
+    // 当前访问记录总量
+    private Integer visitNum;
     // 咨询记录数
     private ArrayList<Integer> remarksValue;
     // 咨询记录关键词
@@ -203,6 +207,22 @@ public class CmPortrait extends DataEntity<CmPortrait> {
         this.remarksScopeNum = remarksScopeNum;
     }
 
+    public Integer getVisitTotal() {
+        return visitTotal;
+    }
+
+    public void setVisitTotal(Integer visitTotal) {
+        this.visitTotal = visitTotal;
+    }
+
+    public Integer getVisitNum() {
+        return visitNum;
+    }
+
+    public void setVisitNum(Integer visitNum) {
+        this.visitNum = visitNum;
+    }
+
     public ArrayList<Integer> getRemarksValue() {
         return remarksValue;
     }

+ 160 - 4
src/main/java/com/caimei/modules/user/service/ClubPortraitService.java

@@ -11,10 +11,7 @@ import org.springframework.stereotype.Service;
 import javax.annotation.Resource;
 import java.text.NumberFormat;
 import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.List;
+import java.util.*;
 
 /**
  * Description
@@ -40,6 +37,7 @@ public class ClubPortraitService {
     }
 
     public ClubStatistics clubData(Integer clubID) {
+        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
         ClubStatistics clubStatistics = cmPortraitDao.selClubData(clubID);
         if (clubStatistics != null) {
             String type = "";
@@ -50,10 +48,112 @@ public class ClubPortraitService {
                 type += "-" + clubStatistics.getClassify();
             }
             clubStatistics.setClubType(type);
+            setClubNum(clubStatistics);
+            // 设置机构信息
+            CmClubRemarks clubRemarksInfo = cmPortraitDao.getClubRemarksInfo(clubID);
+            if (null != clubRemarksInfo) {
+                clubStatistics.setCustomerSource(clubRemarksInfo.getCustomerSource() != null ? clubRemarksInfo.getCustomerSource() : 4);
+                clubStatistics.setGroupAddition(clubRemarksInfo.getGroupAddition() != null ? clubRemarksInfo.getGroupAddition() : 1);
+                clubStatistics.setMobileReach(1);
+                if (null != clubRemarksInfo.getCommunicationMethods() && clubRemarksInfo.getCommunicationMethods().contains("1")) {
+                    clubStatistics.setMobileReach(0);
+                }
+                clubStatistics.setWxReach(1);
+                if (null != clubRemarksInfo.getCommunicationMethods() && clubRemarksInfo.getCommunicationMethods().contains("2")) {
+                    clubStatistics.setWxReach(0);
+                }
+                clubStatistics.setSex(clubRemarksInfo.getCustomerGender() != null ? clubRemarksInfo.getGroupAddition() : null);
+                clubStatistics.setAge(StringUtils.isNotBlank(clubRemarksInfo.getCustomerAge()) ? clubRemarksInfo.getCustomerAge() : null);
+                clubStatistics.setFillTime(dateFormat.format(clubRemarksInfo.getAddTime()));
+            }
         }
         return clubStatistics;
     }
 
+    public Map<String, Object> getDemand(Integer clubId, Integer dataType, String demandStart, String demandEnd) {
+        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
+        Date date = new Date();
+        String endTime = "";
+        Calendar calendar = Calendar.getInstance();
+        calendar.setTime(date);
+        calendar.add(Calendar.DAY_OF_MONTH, -1);
+        Date time = calendar.getTime();
+        calendar.setTime(time);
+        boolean expty = ObjectUtils.isEmpty(demandStart) && ObjectUtils.isEmpty(demandEnd);
+        if (expty) {
+            endTime = dateFormat.format(time);
+            Date start = null;
+            String startTime = "";
+            demandEnd = endTime;
+            // 日期参数为    日
+            if (1 == dataType) {
+                demandStart = endTime;
+            }
+            if (2 == dataType) {
+                calendar.setTime(time);
+                calendar.add(Calendar.MONTH, -1);
+                start = calendar.getTime();
+                startTime = dateFormat.format(start);
+                demandStart = startTime;
+            }
+            if (3 == dataType) {
+                calendar.setTime(time);
+                calendar.add(Calendar.MONTH, -6);
+                start = calendar.getTime();
+                startTime = dateFormat.format(start);
+                demandStart = startTime;
+            }
+            if (4 == dataType) {
+                calendar.setTime(time);
+                calendar.add(Calendar.YEAR, -1);
+                start = calendar.getTime();
+                startTime = dateFormat.format(start);
+                demandStart = startTime;
+            }
+        }
+        List<String> demandList = new ArrayList<>();
+        // 咨询记录
+        List<String> clubRemarks = cmPortraitDao.getClubRemarks(clubId, demandStart, demandEnd);
+        if (clubRemarks.size() > 0) {
+            for (String clubRemark : clubRemarks) {
+                if (clubRemark.contains(",")) {
+                    String[] split = clubRemark.split(",");
+                    for (String s : split) {
+                        if (demandList.size() < 10 && StringUtils.isNotBlank(s)) {
+                            demandList.add(s);
+                        }
+                    }
+                } else {
+                    if (demandList.size() < 10 && StringUtils.isNotBlank(clubRemark)) {
+                        demandList.add(clubRemark);
+                    }
+                }
+            }
+        }
+        // 访问记录
+        List<String> clubBehaviors = cmPortraitDao.getClubBehavior(clubId, demandStart, demandEnd);
+        if (clubBehaviors.size() > 0) {
+            for (String clubBehavior : clubBehaviors) {
+                if (clubBehavior.contains(",")) {
+                    String[] split = clubBehavior.split(",");
+                    for (String s : split) {
+                        if (demandList.size() < 10 && StringUtils.isNotBlank(s)) {
+                            demandList.add(s);
+                        }
+                    }
+                } else {
+                    if (demandList.size() < 10 && StringUtils.isNotBlank(clubBehavior)) {
+                        demandList.add(clubBehavior);
+                    }
+                }
+            }
+        }
+        Map<String, Object> map = new HashMap<>();
+        map.put("startTime", demandStart);
+        map.put("endTime", demandEnd);
+        map.put("demandList", demandList);
+        return map;
+    }
     /**
      * 查询机构画像数据
      *
@@ -325,6 +425,7 @@ public class ClubPortraitService {
                 }
                 cmPortrait.setPageTypeValue(integers);
                 cmPortrait.setPageType(strings);
+                cmPortrait.setVisitNum(pageTypeList.size());
             }
         }
         if (!expty) {
@@ -336,4 +437,59 @@ public class ClubPortraitService {
         }
         return cmPortrait;
     }
+
+    /**
+     * 设置机构资料完整度
+     * @param clubStatistics
+     */
+    public void setClubNum(ClubStatistics clubStatistics) {
+        Integer number = 0;
+        if (null != clubStatistics) {
+            // 计算资料完整度
+            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 += 5;
+            }
+            if (StringUtils.isNotBlank(clubStatistics.getSocialCreditCode())) {
+                number += 5;
+            }
+            if (StringUtils.isNotBlank(clubStatistics.getInfo())) {
+                number += 5;
+            }
+        }
+        clubStatistics.setNumber(number);
+        clubStatistics.setClubDataIntegrity(number + "%");
+    }
 }

+ 22 - 0
src/main/java/com/caimei/modules/user/web/newUser/AgencyController.java

@@ -1696,6 +1696,12 @@ public class AgencyController extends BaseController {
         }
     }
 
+    /**
+     * 机构画像
+     * @param cmPortrait
+     * @param model
+     * @return
+     */
     @RequestMapping("/clubPortrait")
     public String clubPortrait(CmPortrait cmPortrait, Model model) {
         CmPortrait portrait = portraitService.dataTotal(cmPortrait);
@@ -1706,6 +1712,22 @@ public class AgencyController extends BaseController {
         return "modules/userNew/cmClubPortrait";
     }
 
+    /**
+     * 客户需求
+     * @param cmPortrait
+     * @return
+     */
+    @RequestMapping("/getDemandData")
+    @ResponseBody
+    public Map<String, Object> getDemandData(CmPortrait cmPortrait) {
+        return portraitService.getDemand(cmPortrait.getClubID(), cmPortrait.getDateType(), cmPortrait.getStartTime(), cmPortrait.getEndTime());
+    }
+
+    /**
+     * 机构画像图表数据
+     * @param cmPortrait
+     * @return
+     */
     @RequestMapping("/selPortraitData")
     @ResponseBody
     public Map<String, Object> selPortraitData(CmPortrait cmPortrait) {

+ 4 - 1
src/main/resources/mappings/modules/newhome/NewPageHomeimageMapper.xml

@@ -49,6 +49,9 @@
         </where>
         ORDER BY a.sort desc,a.createDate desc
     </select>
+    <select id="getBannerStatistics" resultType="com.caimei.modules.newhome.entity.cmStatisticsType">
+        SELECT COUNT(statisticsId) as count, ifnull(bannerId, 0) as bannerId  FROM cm_statistics_type WHERE typeId = 1 GROUP BY bannerId
+    </select>
 
     <select id="findAllList" resultType="NewPageHomeimage">
         SELECT
@@ -154,4 +157,4 @@
         set sort=#{sort}
         where id = #{id}
     </update>
-</mapper>
+</mapper>

+ 13 - 13
src/main/resources/mappings/modules/serviceteam/CmServiceteamRoleMapper.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.caimei.modules.serviceteam.dao.CmServiceteamRoleDao">
-    
+
 	<sql id="cmServiceteamRoleColumns">
 		a.id AS "id",
 		a.leaderId AS "leaderId",
@@ -9,25 +9,25 @@
 		a.createdTime AS "createdTime",
 		a.delflag AS "delflag"
 	</sql>
-	
+
 	<sql id="cmServiceteamRoleJoins">
 	</sql>
-    
+
 	<select id="get" resultType="CmServiceteamRole">
-		SELECT 
+		SELECT
 			<include refid="cmServiceteamRoleColumns"/>
 		FROM cm_serviceteam_role a
 		<include refid="cmServiceteamRoleJoins"/>
 		WHERE a.id = #{id}
 	</select>
-	
+
 	<select id="findList" resultType="CmServiceteamRole">
-		SELECT 
+		SELECT
 			<include refid="cmServiceteamRoleColumns"/>
 		FROM cm_serviceteam_role a
 		<include refid="cmServiceteamRoleJoins"/>
 		<where>
-			
+
 		</where>
 		<choose>
 			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
@@ -37,15 +37,15 @@
 			</otherwise>
 		</choose>
 	</select>
-	
+
 	<select id="findAllList" resultType="CmServiceteamRole">
-		SELECT 
+		SELECT
 			<include refid="cmServiceteamRoleColumns"/>
 		FROM cm_serviceteam_role a
 		<include refid="cmServiceteamRoleJoins"/>
 		<where>
-			
-		</where>		
+
+		</where>
 		<choose>
 			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
 				ORDER BY ${page.orderBy}
@@ -119,7 +119,7 @@
 		values (#{teamId},#{i})
 	</insert>
 	<update id="update">
-		UPDATE cm_serviceteam_role SET 	
+		UPDATE cm_serviceteam_role SET
 			leaderId = #{leaderId},
 			manager = #{manager},
 			createdTime = #{createdTime},
@@ -140,4 +140,4 @@
 		delete from cm_serviceteam_group
 		where teamId = #{teamId}
 	</delete>
-</mapper>
+</mapper>

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

@@ -7,14 +7,51 @@
                 (SELECT COUNT(shopOrderId) FROM cm_shop_order WHERE clubID = #{clubID} AND shopStatus != 4 AND shopStatus != 5 AND refundStatus != 2 AND orderTime <![CDATA[ < ]]> NOW()) AS orderTotal,
                 (SELECT IFNULL(SUM(totalAmount), 0) FROM cm_shop_order WHERE clubID = #{clubID} AND shopStatus != 4 AND shopStatus != 5 AND refundStatus != 2 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 COUNT(remarks) FROM cm_club_remarks WHERE clubID = #{clubID} AND addTime <![CDATA[ < ]]> now()) AS remarksTotal,
+                (SELECT COUNT(cbr.recordID) FROM cm_behavior_record cbr LEFT JOIN club c ON cbr.userID = c.userID WHERE c.clubID = #{clubID} AND cbr.accessDate <![CDATA[ < ]]> NOW()) AS visitTotal
+    </select>
+
+    <select id="getClubRemarks" resultType="java.lang.String">
+        select remarks from cm_club_remarks
+        where clubId = #{clubId}
+        <if test="startTime != null and startTime != ''">
+            and addTime > #{startTime}
+        </if>
+        <if test="endTime != null and endTime != ''">
+            and addTime <![CDATA[ < ]]> #{endTime}
+        </if>
+        GROUP BY remarks ORDER BY COUNT(remarks) DESC
+    </select>
+
+    <select id="getClubBehavior" resultType="java.lang.String">
+        SELECT cbr.pageLabel FROM cm_behavior_record cbr LEFT JOIN club c ON c.userID = cbr.userId
+        WHERE pageType IN (6, 8, 9, 11, 14) AND c.clubId = #{clubId}
+        <if test="startTime != null and startTime != ''">
+            and cbr.accessTime > #{startTime}
+        </if>
+        <if test="endTime != null and endTime != ''">
+            and cbr.accessTime <![CDATA[ < ]]> #{endTime}
+        </if>
+        GROUP BY cbr.pageLabel ORDER BY COUNT(cbr.pageLabel) DESC
     </select>
 
     <select id="selClubData" resultType="com.caimei.modules.user.entity.ClubStatistics">
         select
-        c.name,
-        c.linkMan,
-        c.contractMobile,
+            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 '运营'
@@ -37,12 +74,22 @@
               WHEN c.secondClubType=6 THEN '养生馆'
               WHEN c.secondClubType=7 THEN '其他'
             END) AS classify,
+            u.registerTime as registerTime,
+            covs.activeState as activeState,
+            covs.customerValue as customerValues,
         c.addTime AS addTime
         FROM club c
-                 LEFT JOIN town b ON b.townID=c.townID
-                 LEFT JOIN city ct ON ct.cityID=c.cityID
-                 LEFT JOIN province d ON d.provinceID=c.provinceID
-        where clubID = #{clubID}
+         LEFT JOIN USER u ON u.userID = c.userID
+         LEFT JOIN town b ON b.townID=c.townID
+         LEFT JOIN city ct ON ct.cityID=c.cityID
+         LEFT JOIN province d ON d.provinceID=c.provinceID
+         LEFT JOIN (SELECT userID, activeState, customerValue FROM cm_organ_value_system WHERE stage = 0 AND delType = 1) AS covs ON covs.userID = c.userID
+        where c.clubID = #{clubID}
+    </select>
+
+    <select id="getClubRemarksInfo" resultType="com.caimei.modules.user.entity.CmClubRemarks">
+        SELECT id, communicationSituation, communicationMethods, customerSource, customerGender, customerAge, groupAddition,addTime
+        FROM cm_club_remarks WHERE clubId = #{clubID} ORDER BY ADDTIME DESC LIMIT 1
     </select>
 
     <select id="selOrderList" resultType="com.caimei.modules.order.entity.NewOrder">

+ 2 - 0
src/main/webapp/WEB-INF/views/modules/newhome/newPageHomeimageList.jsp

@@ -150,6 +150,7 @@
         <th>图片</th>
         <th>链接</th>
         <th>排序</th>
+        <th>点击量</th>
         <th>小程序端状态</th>
         <th>PC端状态</th>
         <th>创建时间</th>
@@ -171,6 +172,7 @@
                        value="${newPageHomeimage.sort}" onkeyup="onlynum(this)"
                        onchange="changeSort(${newPageHomeimage.id})"/>
             </td>
+            <td>${newPageHomeimage.count}</td>
             <td><shiro:hasPermission name="newhome:newPageHomeimage:edit">
                 <c:if test="${newPageHomeimage.crmEnabledStatus eq 1 }">
                     <a href="javascript:void(0);" onclick="updateCrmEnabledStatusByIds('0','${newPageHomeimage.id}');">

+ 8 - 8
src/main/webapp/WEB-INF/views/modules/order/cmPayShopOtherCheck.jsp

@@ -30,7 +30,7 @@
 <%--        .check-btn{width:96%;margin-left:2%;text-align:center;height:60px;line-height:60px;margin-top:30px}--%>
 <%--        .check-btn button{width:100px;height:35px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;border:none;border:1px slid #ddd}--%>
 <%--        .mask{width:100%;height:100%;position:fixed;top:0;background:rgba(0,0,0,0.7);display:none}--%>
-<%--        .tips-popup-content{width:40%;height:auto;padding-bottom:30px;background:#fff;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;position:abslute;top:50%;left:50%;transform:translate(-50%,-50%)}--%>
+<%--        .tips-popup-content{width:40%;height:auto;padding-bottom:30px;background:#fff;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}--%>
 <%--        .tips-popup-content div{width:100%;text-align:center}--%>
 <%--        .tips-popup-content{width:30%}--%>
 <%--        .tips-popup-content p{text-align:center;padding:80px;font-size:20px}--%>
@@ -39,11 +39,11 @@
 <%--        .refuse-btn{margin-left:50px}--%>
 <%--        .return-btn,.tips-cancel-btn,.check-grey-btn{background:#fff;color:#555;margin-left:50px}--%>
 <%--        .tips-cancel-btn,.check-grey-btn{border:1px slid #ddd;margin-left:20px;display:none}--%>
-<%--        #close-btn1{top:8px;right:10px;width:18px;position:abslute;cursr:pointer}--%>
+<%--        #close-btn1{top:8px;right:10px;width:18px;position:absolute;cursr:pointer}--%>
 <%--        .tips-popup-reasn .tips-popup-content{height:250px}--%>
-<%--        .tips-popup-reasn .tips-popup-content div{position:abslute;bottom:15px}--%>
+<%--        .tips-popup-reasn .tips-popup-content div{position:absolute;bottom:15px}--%>
 <%--        .tips-popup-reasn .check-grey-btn{display:inline-block}--%>
-<%--        #refuse-reasn{width:80%;height:48%;left:8%;position:abslute;resize:none}--%>
+<%--        #refuse-reasn{width:80%;height:48%;left:8%;position:absolute;resize:none}--%>
 <%--        .tips-popup-reasn h5{color:#555;padding-left:8%;margin-bottom:4px;margin-top:-12px}--%>
 <%--        .check-cfm-btn{background:#3daae9;color:#fff}--%>
 <%--    </style>--%>
@@ -285,7 +285,7 @@
         .check-cfm-btn{background:#3daae9;color:#fff}
         .cfm-btn:active,.return-btn:active{background:#ddd;color:#fff}
         .mask{width:100%;height:100%;position:fixed;top:0;background:rgba(0,0,0,0.7);display:none}
-        .tips-popup-content{width:40%;height:auto;padding-bottom:30px;background:#fff;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;position:abslute;top:50%;left:50%;transform:translate(-50%,-50%)}
+        .tips-popup-content{width:40%;height:auto;padding-bottom:30px;background:#fff;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}
         .tips-popup-content div{width:100%;text-align:center}
         .tips-popup-content{width:30%}
         .tips-popup-content p{text-align:center;padding:80px;font-size:20px}
@@ -294,11 +294,11 @@
         .refuse-btn{margin-left:50px}
         .return-btn,.tips-cancel-btn,.check-grey-btn{background:#fff;color:#555;margin-left:50px}
         .tips-cancel-btn,.check-grey-btn{border:1px slid #ddd;margin-left:20px;display:none}
-        #close-btn1{top:8px;right:10px;width:18px;position:abslute;cursr:pointer}
+        #close-btn1{top:8px;right:10px;width:18px;position:absolute;cursr:pointer}
         .tips-popup-reasn .tips-popup-content{height:250px}
-        .tips-popup-reasn .tips-popup-content div{position:abslute;bottom:15px}
+        .tips-popup-reasn .tips-popup-content div{position:absolute;bottom:15px}
         .tips-popup-reasn .check-grey-btn{display:inline-block}
-        #refuse-reasn{width:80%;height:48%;left:8%;position:abslute;resize:none}
+        #refuse-reasn{width:80%;height:48%;left:8%;position:absolute;resize:none}
         .tips-popup-reasn h5{color:#555;padding-left:8%;margin-bottom:4px;margin-top:-12px}
         .red{color:red;}
         .payment-form-bottom .wipeImgs{height:auto;padding:8px 0;}

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

@@ -15,6 +15,7 @@
 <div class="ul-form">
     <input type="hidden" id="clubId" value="${cmPortrait.clubID}">
     <input type="hidden" id="eachtsAjaxUrl" value="${ctx}/new/user/agency/selPortraitData">
+    <input type="hidden" id="demandUrl" value="${ctx}/new/user/agency/getDemandData">
     <ul class="nav nav-tabs">
         <li class="active"><a href="${ctx}/new/user/agency/clubPortrait?clubID=${cmPortrait.clubID}&clubName=${cmPortrait.clubName}&dateType=0&type=4">仪表盘</a></li>
         <li><a href="${ctx}/new/user/agency/clubData?clubID=${cmPortrait.clubID}">机构资料</a></li>
@@ -22,33 +23,179 @@
     <div class="main-content">
         <div class="flex-header">
             <div class="flex-header-main">
-                <c:if test="${statistics.name ne null and statistics.name ne ''}">
-                    <p><i class="icon i1"></i><span>${statistics.name}</span></p>
-                </c:if>
-                <c:if test="${statistics.linkMan ne null and statistics.linkMan ne ''}">
-                    <p><i class="icon i2"></i><span>${statistics.linkMan}</span></p>
-                </c:if>
-                <c:if test="${statistics.linkManStatus ne null and statistics.linkManStatus ne ''}">
-                    <p><i class="icon i3"></i><span>${statistics.linkManStatus}</span></p>
-                </c:if>
-                <c:if test="${statistics.contractMobile ne null and statistics.contractMobile ne ''}">
-                    <p><i class="icon i4"></i><span>${statistics.contractMobile}</span></p>
-                </c:if>
-                <c:if test="${statistics.clubType ne null and statistics.clubType ne ''}">
-                    <p><i class="icon i5"></i><span>${statistics.clubType}</span></p>
-                </c:if>
-                <c:if test="${statistics.province ne null and statistics.province ne ''}">
-                    <p><i class="icon i6"></i><span>${statistics.province}</span><span>${statistics.city}</span><span>${statistics.town}</span></p>
-                </c:if>
-                <c:if test="${statistics.addTime ne null and statistics.addTime ne ''}">
-                    <p><i class="icon i7"></i><span>${statistics.addTime}</span></p>
-                </c:if>
+                <div class="flex-header-tr">
+                    <div class="flex-header-th">机构Id</div>
+                    <div class="flex-header-th">联系人</div>
+                    <div class="flex-header-th">性别</div>
+                    <div class="flex-header-th">年龄</div>
+                    <div class="flex-header-th">手机号</div>
+                    <div class="flex-header-th">身份</div>
+                    <div class="flex-header-th">注册时间</div>
+                    <div class="flex-header-th">客户价值</div>
+                    <div class="flex-header-th">活跃状态</div>
+                    <div class="flex-header-th">资料完整度</div>
+                    <div class="flex-header-th">客户来源</div>
+                </div>
+                <div class="flex-header-tb">
+                    <div class="flex-header-td">${statistics.clubID}</div>
+                    <div class="flex-header-td">${statistics.linkMan}</div>
+                    <div class="flex-header-td">
+                        <c:if test="${not empty statistics.sex}">
+                            ${statistics.sex == '0' ? '男': '女'}
+                        </c:if>
+                        <c:if test="${empty statistics.sex}">
+                            ---
+                        </c:if>
+                    </div>
+                    <div class="flex-header-td">
+                        <c:if test="${not empty statistics.age}">
+                            ${statistics.age}
+                        </c:if>
+                        <c:if test="${empty statistics.age}">
+                            ---
+                        </c:if>
+                    </div>
+                    <div class="flex-header-td">
+                        <c:if test="${not empty statistics.contractMobile}">
+                            ${statistics.contractMobile}
+                        </c:if>
+                        <c:if test="${empty statistics.contractMobile}">
+                            ---
+                        </c:if>
+                    </div>
+                    <div class="flex-header-td">
+                        <c:if test="${not empty statistics.linkManStatus}">
+                            ${statistics.linkManStatus}
+                        </c:if>
+                        <c:if test="${empty statistics.linkManStatus}">
+                            ---
+                        </c:if>
+                    </div>
+                    <div class="flex-header-td">${statistics.registerTime}</div>
+                    <div class="flex-header-td">
+                        <c:if test="${not empty statistics.customerValues}">
+                            ${statistics.customerValues}
+                        </c:if>
+                        <c:if test="${empty statistics.customerValues}">
+                            ---
+                        </c:if>
+                    </div>
+                    <div class="flex-header-td">
+                        <c:if test="${not empty statistics.activeState}">
+                            ${statistics.activeState}
+                        </c:if>
+                        <c:if test="${empty statistics.activeState}">
+                            ---
+                        </c:if>
+                    </div>
+                    <div class="flex-header-td">
+                        <c:if test="${not empty statistics.clubDataIntegrity}">
+                            ${statistics.clubDataIntegrity}
+                        </c:if>
+                        <c:if test="${empty statistics.clubDataIntegrity}">
+                            ---
+                        </c:if>
+                    </div>
+                    <div class="flex-header-td">
+                        <c:if test="${empty statistics.customerSource}">
+                            ---
+                        </c:if>
+                        <c:if test="${not empty statistics.customerSource}">
+                            <c:if test="${statistics.customerSource == 0}">公众号</c:if>
+                            <c:if test="${statistics.customerSource == 1}">小红书</c:if>
+                            <c:if test="${statistics.customerSource == 2}">微博</c:if>
+                            <c:if test="${statistics.customerSource == 3}">搜狐</c:if>
+                            <c:if test="${statistics.customerSource == 4}">其他</c:if>
+                        </c:if>
+                    </div>
+                </div>
+                <div class="flex-header-tr">
+                    <div class="flex-header-th">机构名称</div>
+                    <div class="flex-header-th">机构级别</div>
+                    <div class="flex-header-th">机构类型</div>
+                    <div class="flex-header-th">入群状态</div>
+                    <div class="flex-header-th">微信触达</div>
+                    <div class="flex-header-th">电话触达</div>
+                    <div class="flex-header-th last">机构地址</div>
+                </div>
+                <div class="flex-header-tb">
+                    <div class="flex-header-td">${statistics.name}</div>
+                    <div class="flex-header-td">
+                        <c:if test="${4 == statistics.userIdentity}">
+                            个人机构
+                        </c:if>
+                        <c:if test="${2 == statistics.userIdentity}">
+                            资质机构
+                        </c:if>
+                        <c:if test="${2 != statistics.userIdentity and 4 != statistics.userIdentity}">
+                            其他
+                        </c:if>
+                    </div>
+                    <div class="flex-header-td">${statistics.clubType}</div>
+                    <div class="flex-header-td">
+                        <c:if test="${not empty statistics.groupAddition}">
+                            <c:if test="${statistics.groupAddition == 0}">已加群</c:if>
+                            <c:if test="${statistics.groupAddition == 1}">未加群(${statistics.fillTime})</c:if>
+                        </c:if>
+                        <c:if test="${empty statistics.groupAddition}">
+                            ---
+                        </c:if>
+                    </div>
+                    <div class="flex-header-td">
+                        <c:if test="${not empty statistics.wxReach}">
+                            <c:if test="${statistics.wxReach == 0}">触达</c:if>
+                            <c:if test="${statistics.wxReach == 1}">未触达(${statistics.fillTime})</c:if>
+                        </c:if>
+                        <c:if test="${empty statistics.wxReach}">
+                            ---
+                        </c:if>
+                    </div>
+                    <div class="flex-header-td">
+                        <c:if test="${not empty statistics.mobileReach}">
+                            <c:if test="${statistics.mobileReach == 0}">触达</c:if>
+                            <c:if test="${statistics.mobileReach == 1}">未触达(${statistics.fillTime})</c:if>
+                        </c:if>
+                        <c:if test="${empty statistics.mobileReach}">
+                            ---
+                        </c:if>
+                    </div>
+                    <div class="flex-header-td last">
+                        ${statistics.province}${statistics.city}${statistics.town}
+                    </div>
+                </div>
+            </div>
+        </div>
+        <div class="flex-content">
+            <div class="flex-box box1">
+                <div class="box-title">
+                    <h4 class="H_tag">客户需求</h4>
+                </div>
+                <div class="box-tabmain">
+                    <div class="box-tabs" id="customerDemand">
+                        <a class="box-tabs-li active" href="javascript: void(0);" data-type="4">全年</a>
+                        <a class="box-tabs-li" href="javascript: void(0);" data-type="3">半年</a>
+                        <a class="box-tabs-li" href="javascript: void(0);" data-type="2">月</a>
+                        <a class="box-tabs-li" href="javascript: void(0);" data-type="1">日</a>
+                    </div>
+                    <div class="box-time" id="customerDemandData">
+                        <div class="time-input">
+                            <input type="text" placeholder="开始时间" class="input start" id="demandStart">
+                        </div>
+                        <span class="line">至</span>
+                        <div class="time-input">
+                            <input type="text" placeholder="结束时间" class="input end" id="demandEnd">
+                        </div>
+                    </div>
+                </div>
+                <div class="box-eachts demand" id="demand">
+                <%--   用户需求展示  --%>
+                </div>
             </div>
         </div>
         <div class="flex-content">
             <div class="flex-box">
                 <div class="box-title">
-                    <H4 class="H_tag">订单</H4>
+                    <h4 class="H_tag">订单</h4>
                 </div>
                 <div class="box-title">
                     <span>所有:<a class="line" href="${ctx}/order/orderList?buyer=${cmPortrait.clubName}">¥<c:if test="${!empty portrait.orderTotalAmount}">${portrait.orderTotalAmount}</c:if> <c:if test="${empty portrait.orderTotalAmount}">0</c:if>&nbsp;&nbsp;(<c:if test="${!empty portrait.orderTotal}">${portrait.orderTotal}</c:if><c:if test="${empty portrait.orderTotal}">0</c:if>个)</a></span>
@@ -155,6 +302,10 @@
                 <div class="box-title">
                     <H4 class="H_tag">访问记录</H4>
                 </div>
+                <div class="box-title">
+                    <span>所有:<a class="line visit" href="javascript:void(0);"><c:if test="${!empty portrait.visitTotal}">${portrait.visitTotal}</c:if><c:if test="${empty portrait.visitTotal}">0</c:if> 条</a></span>
+                    <span class="right_span">当前范围:<a id="visitNum" class="visit" href="javascript:void(0);"></a></span>
+                </div>
                 <div class="box-tabmain">
                     <div class="box-tabs" id="visitTabs">
                         <a class="box-tabs-li active" href="javascript: void(0);" data-type="4">全年</a>
@@ -189,5 +340,15 @@
 <script type="text/javascript" src="${ctxStatic}/echarts/echarts.min.js"></script>
 <script type="text/javascript" src="${ctxStatic}/modules/cmClubPortrait/cmClubEacths.js"></script>
 <script type="text/javascript" src="${ctxStatic}/modules/cmClubPortrait/cmClubPortrait.js"></script>
+<script>
+    // 前往新后台
+    $('.visit').click(function () {
+        var link = "";
+        $.get("${ctx}/jump/link", function (data) {
+            link = "https://manager.caimei365.com/#/user/record-list?token=" + data;
+            window.open(link, "_blank");
+        });
+    })
+</script>
 </body>
 </html>

+ 27 - 17
src/main/webapp/WEB-INF/views/modules/userNew/cmRegistRemarksList.jsp

@@ -60,6 +60,13 @@
             $("#searchForm").submit();
             return false;
         }
+        function getNewManager() {
+            var link = "";
+            $.get("${ctx}/jump/link", function (data) {
+                link = "https://manager.caimei365.com/#/user/consult/list?token=" + data;
+                window.open(link, "_blank");
+            });
+        }
     </script>
     <style>
         .table th {
@@ -72,7 +79,10 @@
     </style>
 </head>
 <body>
-<ul class="nav nav-tabs">
+<h1>
+    <input type="button" onclick="getNewManager()" value="点此前往新后台"></input>
+</h1>
+<%--<ul class="nav nav-tabs">
     <shiro:hasPermission name="user:agency:regist">
         <li class="active"><a href="${ctx}/new/user/agency/regist">已注册用户咨询记录</a></li>
     </shiro:hasPermission>
@@ -85,9 +95,9 @@
     <shiro:hasPermission name="user:agency:cmConsulttype">
         <li><a href="${ctx}/consult/type/cmConsulttype/">咨询类别设置</a></li>
     </shiro:hasPermission>
-<%--    <shiro:hasPermission name="user:agency:cmrenaksList">
+&lt;%&ndash;    <shiro:hasPermission name="user:agency:cmrenaksList">
         <li><a href="${ctx}/new/user/agency/cmrenaksList">咨询关键词库</a></li>
-    </shiro:hasPermission>--%>
+    </shiro:hasPermission>&ndash;%&gt;
 </ul>
 <br/>
 <form:form id="searchForm" modelAttribute="cmClubRemarks" action="${ctx}/new/user/agency/regist" method="post"
@@ -141,14 +151,14 @@
                         value="${cmClubRemarks.endAddTime}" cssStyle="width: 130px"
                         onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
         </div>
-        <%--<div class="item">
+        &lt;%&ndash;<div class="item">
             <label>新分配机构:</label>
             <form:select path="newDeal" class="input-medium">
                 <form:option value="" label="请选择"/>
                 <form:option value="1">是</form:option>
                 <form:option value="2">否</form:option>
             </form:select>
-        </div>--%>
+        </div>&ndash;%&gt;
         <div class="item">
             &nbsp;&nbsp;&nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
         </div>
@@ -161,12 +171,12 @@
             <c:forEach items="${page.list}" var="clubRemarks" varStatus="remark">
                 <div class="td clear" style="dashed:#0066CC;">
                     <div style="font-weight: bold;width: 100%;float: left;">
-                            <%--                        <c:if test="${not empty clubRemarks.oldName}">--%>
-                            <%--                            <span style="float: left;">${clubRemarks.oldName}</span>--%>
-                            <%--                        </c:if>--%>
-                            <%--                        <c:if test="${empty clubRemarks.oldName}">--%>
-                            <%--                            <span style="float: left;">${clubRemarks.spName}</span>--%>
-                            <%--                        </c:if>--%>
+                            &lt;%&ndash;                        <c:if test="${not empty clubRemarks.oldName}">&ndash;%&gt;
+                            &lt;%&ndash;                            <span style="float: left;">${clubRemarks.oldName}</span>&ndash;%&gt;
+                            &lt;%&ndash;                        </c:if>&ndash;%&gt;
+                            &lt;%&ndash;                        <c:if test="${empty clubRemarks.oldName}">&ndash;%&gt;
+                            &lt;%&ndash;                            <span style="float: left;">${clubRemarks.spName}</span>&ndash;%&gt;
+                            &lt;%&ndash;                        </c:if>&ndash;%&gt;
                         <span style="float: left;">${clubRemarks.spName}</span>
                         <span style="float: left;margin-left:20px;"><fmt:formatDate value="${clubRemarks.addTime}"
                                                                                     pattern="yyyy-MM-dd HH:mm"/></span>
@@ -184,7 +194,7 @@
                         <div style="width: 100px;font-weight: bold;margin: 10px 0;float: left;text-align: right;margin-right: 10px;">
                             机构名称:
                         </div>
-                        <div style="width: 150px;float: left;margin: 10px 0;">${clubRemarks.clubName}<%--<c:if test="${clubRemarks.newDeal eq 1}"><span style="color: red">(新分配)</span></c:if>--%></div>
+                        <div style="width: 150px;float: left;margin: 10px 0;">${clubRemarks.clubName}&lt;%&ndash;<c:if test="${clubRemarks.newDeal eq 1}"><span style="color: red">(新分配)</span></c:if>&ndash;%&gt;</div>
                         <c:if test="${not empty clubRemarks.clubType}">
                             <div style="width: 100px;font-weight: bold;margin: 10px 0;float: left;text-align: right;margin-right: 10px;">
                                 机构类型:
@@ -209,7 +219,7 @@
                                 供应商名称:${clubRemarks.shopName}
 
                             </div>
-                            <%--                            <span style="width: 300px;float: left;margin: 10px 0;">${clubRemarks.shopName}</span>--%>
+                            &lt;%&ndash;                            <span style="width: 300px;float: left;margin: 10px 0;">${clubRemarks.shopName}</span>&ndash;%&gt;
                         </c:if>
                     </div>
                     <c:if test="${not empty clubRemarks.proName}">
@@ -344,9 +354,9 @@
         </div>
         <div class="pagination">${page}</div>
     </c:if>
-    <%--    <c:if test="${empty page.list}">--%>
-    <%--        <font size="3" style="text-align: center;display: block;line-height: 80px;" color="#0066CC">暂无任何备注..</font>--%>
-    <%--    </c:if>--%>
-</form:form>
+    &lt;%&ndash;    <c:if test="${empty page.list}">&ndash;%&gt;
+    &lt;%&ndash;        <font size="3" style="text-align: center;display: block;line-height: 80px;" color="#0066CC">暂无任何备注..</font>&ndash;%&gt;
+    &lt;%&ndash;    </c:if>&ndash;%&gt;
+</form:form>--%>
 </body>
 </html>

+ 12 - 2
src/main/webapp/WEB-INF/views/modules/userNew/cmVisitList.jsp

@@ -254,10 +254,20 @@
             $("#searchForm").submit();
             return false;
         }
+        function getNewManager() {
+            var link = "";
+            $.get("${ctx}/jump/link", function (data) {
+                link = "https://manager.caimei365.com/#/user/consult/unreg-list?token=" + data;
+                window.open(link, "_blank");
+            });
+        }
     </script>
 </head>
 <body>
-<ul class="nav nav-tabs">
+<h1>
+    <input type="button" onclick="getNewManager()" value="点此前往新后台"></input>
+</h1>
+<%--<ul class="nav nav-tabs">
     <li class="active"><a href="${ctx}/new/user/visit/">未注册用户咨询记录</a></li>
 </ul>
 <form:form id="searchForm" modelAttribute="visitRemark" action="${ctx}/new/user/visit/remark" method="post"
@@ -338,6 +348,6 @@
     </c:forEach>
     </tbody>
 </table>
-<div class="pagination">${page}</div>
+<div class="pagination">${page}</div>--%>
 </body>
 </html>

+ 66 - 0
src/main/webapp/static/modules/cmClubPortrait/cmClubEacths.js

@@ -18,9 +18,45 @@ const defaultParams = {
     endTime:'',//   结束时间
     type:0//  统计类别 0订单 1搜索关键词 2咨询记录 3访问记录 4初始状态
 }
+//默认参数
+const defaultDemand = {
+    clubID:$('#clubId').val()*1,//  机构id
+    dateType:0,//   日期类别 0日 1月 2半年 3全年
+    startTime:'',//   开始时间
+    endTime:'',//   结束时间
+}
 // 默认时间
 const startDate = getDateStr(new Date(), -365),
       endDate = getDateStr(new Date(), 0);
+// 初始化客户需求选择时间控件
+const getInfoDemandDate = function () {
+    $('#customerDemandData').dateRangePicker({
+        language: 'cn',
+        startDate: startDate,
+        endDate: endDate,
+        format: 'YYYY-MM-DD',
+        showShortcuts: false,
+        autoClose: isPC,
+        isNowrap: false,
+        getValue: function () {
+            if (defaultParams.startTime && defaultParams.endTime) {
+                return defaultParams.startTime + ' to ' + defaultParams.endTime;
+            } else {
+                return '';
+            }
+        },
+        setValue: function (s, s1, s2) {
+            defaultParams.startTime = s1;
+            defaultParams.endTime = s2;
+            $('#demandStart').val(s1);
+            $('#demandEnd').val(s2);
+            if (defaultParams.startTime && defaultParams.endTime) {
+                $('#customerDemand').find('a').removeClass('active');
+                getDemandData(0)
+            }
+        }
+    });
+}
 // 初始化订单选择时间控件
 const getInfoOrderDate = function () {
     $('#orderDate').dateRangePicker({
@@ -137,6 +173,34 @@ const getInfoVisitDate = function () {
         }
     });
 }
+const getDemandData = function (dateType) {
+    console.log('客户客户');
+    console.log('url', $('#demandUrl').val(),);
+    defaultDemand.dateType = dateType;
+    $.ajax({
+        url: $('#demandUrl').val(),
+        type: "GET",
+        data: defaultDemand,
+        contentType : 'application/json;charset=UTF-8',
+        success: function (data) {
+            $('#demandStart').val(data.startTime);
+            $('#demandEnd').val(data.endTime);
+            if (data.demandList.length > 0) {
+                $('#demandEnd').val(data.endTime);
+                $('#demandStart').val(data.startTime);
+                $('#demand').empty();
+                data.demandList.forEach((item) => {
+                    console.log(item)
+                    $('#demand').append('<span class="span_tab">'+ item +'</span>')
+                    // $('.span_tab').append(item)
+                    // $('#demand').append(text)
+                })
+            } else {
+                $('#demand').html('<div class="empty">暂无数据</div>')
+            }
+        }
+    })
+}
 // 数据接口请求
 const  getClubEacthsData = function (type,dateType) {
     defaultParams.type = type;
@@ -189,6 +253,7 @@ const  getClubEacthsData = function (type,dateType) {
                             $('#visitEacths').hide();
                             $('#visitTimeEnd').val(data.portrait.endTime);
                             $('#visitTimeStart').val(data.portrait.startTime);
+                            $('#visitNum').text(`0(个)`);
                         }else{
                             setOtherData(type,data)
                         }
@@ -329,6 +394,7 @@ const setOtherData = function (type,data) {
                 $('#visitEacthsNone').hide();
                 $('#visitTimeEnd').val(data.pageType.endTime);
                 $('#visitTimeStart').val(data.pageType.startTime);
+                $('#visitNum').text(`${data.portrait.visitNum}(个)`);
             },
             id:'visitEacths',
             series:{

+ 146 - 33
src/main/webapp/static/modules/cmClubPortrait/cmClubPortrait.css

@@ -12,9 +12,9 @@
 }
 .flex-header{
     width: 1446px;
-    height: 40px;
+    height: 200px;
     box-sizing: border-box;
-    padding: 0 15px;
+    padding: 15px;
 }
 .flex-header-main{
     width: 100%;
@@ -24,48 +24,126 @@
     border-radius: 8px;
     padding: 10px 15px;
 }
-.flex-header-main p{
-    float: left;
+.flex-header-main .flex-header-tr{
+    width: 100%;
+    height: 40px;
+    background: rgba(255,255,255,0.3);
+    border-radius: 8px;
+}
+.flex-header-main .flex-header-th{
+    width: 9%;
+    height: 100%;
+    line-height: 40px;
     font-size: 14px;
-    line-height: 20px;
     color: #FFFFFF;
-    margin: 0;
-    margin-right: 20px;
+    float: left;
+    font-weight: bold;
+    text-align: center;
+}
+.flex-header-main .flex-header-th.last{
+    width: 36%;
+    text-align: left;
+    padding-left: 20px;
+    box-sizing: border-box;
+}
+.flex-header-main .flex-header-tb{
+    width: 100%;
+    height: 40px;
+    border-radius: 8px;
 }
-.flex-header-main p .icon{
-    display: block;
-    width: 20px;
-    height: 20px;
+.flex-header-main .flex-header-td{
+    width: 9%;
+    height: 100%;
+    line-height: 40px;
+    font-size: 12px;
+    color: #FFFFFF;
     float: left;
-    margin-right: 4px;
+    text-align: center;
 }
-.flex-header-main p .icon.i1{
-    background: url("./icon/icon-1.png");
-    background-size: cover;
+.flex-header-main .flex-header-td.last{
+    width: 36%;
+    text-align: left;
+    padding-left: 20px;
+    box-sizing: border-box;
 }
-.flex-header-main p .icon.i2{
-    background: url("./icon/icon-2.png");
-    background-size: cover;
+.header-content{
+    width: 100%;
+    height: 250px;
+    display: flex;
 }
-.flex-header-main p .icon.i3{
-    background: url("./icon/icon-3.png");
-    background-size: cover;
+.header-content .header-box{
+    width: 100%;
+    height: 100%;
+    border:1px solid rgba(192,192,192,0.4);
+    margin-left: 15px;
+    margin-top: 15px;
+    box-shadow: 0px 3px 6px 0px rgb(0,0,0,0.07);
+    padding: 10px;
+    box-sizing: border-box;
+    border-radius: 10px;
 }
-.flex-header-main p .icon.i4{
-    background: url("./icon/icon-4.png");
-    background-size: cover;
+.header-box .header-title{
+    width: 100%;
+    height: 24px;
+    float: left;
+    line-height: 24px;
+    box-sizing: border-box;
+    padding-left: 5px;
 }
-.flex-header-main p .icon.i5{
-    background: url("./icon/icon-5.png");
-    background-size: cover;
+.header-box .header-tabmain{
+    width: 100%;
+    height: 40px;
+    float: left;
+    line-height: 40px;
 }
-.flex-header-main p .icon.i6{
-    background: url("./icon/icon-6.png");
-    background-size: cover;
+.header-box .header-tabmain .header-tabs{
+    float: left;
+    color: #FFFFFF;
 }
-.flex-header-main p .icon.i7{
-    background: url("./icon/icon-7.png");
-    background-size: cover;
+.header-box .header-tabmain .header-tabs .box-tabs-li{
+    margin: 0 5px;
+    color: #FFFFFF;
+}
+.header-box .header-tabmain .box-tabs-li.active{
+    color: #40E0D0;
+}
+.header-box .header-tabmain .header-time{
+    width: 320px;
+    height: 40px;
+    float: right;
+    box-sizing: border-box;
+    padding: 5px 0;
+}
+.header-box .header-tabmain .header-time .time-input{
+    width: 148px;
+    box-sizing: border-box;
+    float: left;
+    position: relative;
+    border-radius: 2px;
+    height: 100%;
+}
+.header-box .header-tabmain .header-time .time-input .input{
+    width: 100%;
+    height: 100%;
+    padding: 0 10px;
+    font-size: 12px;
+    line-height: 30px;
+    border-radius: 2px;
+    cursor: pointer;
+    margin-bottom: 0;
+    box-sizing: border-box;
+    float: left;
+    background: rgba(192,192,192,0.3);
+    border: none;
+    color: #FFFFFF;
+}
+.header-box .header-tabmain .header-time .line{
+    line-height: 30px;
+    font-size: 12px;
+    color: #FFFFFF;
+    margin: 0 5px;
+    display: inline-block;
+    float: left;
 }
 .flex-content{
     width: 100%;
@@ -83,6 +161,11 @@
     box-sizing: border-box;
     border-radius: 10px;
 }
+.flex-content .flex-box.box1{
+    width: 1415px;
+    height: 150px;
+    margin-top: 0;
+}
 .flex-box .box-title{
     width: 100%;
     height: 24px;
@@ -126,6 +209,10 @@
 .flex-box .box-tabmain .box-tabs-li.active{
     color: #40E0D0;
 }
+.flex-box.box1  .box-tabmain .box-time{
+    float: left;
+    margin-left: 30px;
+}
 .flex-box .box-tabmain .box-time{
     width: 320px;
     height: 40px;
@@ -178,6 +265,32 @@
     float: left;
     position: relative;
 }
+.flex-box .box-eachts.demand{
+    width: 100%;
+    height: auto;
+    box-sizing: border-box;
+    padding: 10px 0;
+}
+.flex-box .box-eachts.demand .empty{
+    font-size: 15px;
+    color: #FFFFFF;
+    text-align: left;
+    box-sizing: border-box;
+    padding-left:10px ;
+    font-weight: bold;
+    line-height: 40px;
+}
+.flex-box .box-eachts.demand .span_tab {
+    display: inline-block;
+    padding: 0 10px;
+    line-height: 28px;
+    font-size: 14px;
+    color: #FFFFFF;
+    background-color:rgba(64,224,208,0.5);
+    border-radius:6px;
+    text-align: center;
+    margin: 8px;
+}
 .flex-box .box-eachts .eachts-total{
     color: #FFFFFF;
     width: 50%;

+ 13 - 0
src/main/webapp/static/modules/cmClubPortrait/cmClubPortrait.js

@@ -2,6 +2,8 @@
  * Created 机构画像 by zjy on 2023/02/10.
  */
 $(function(){
+    // 机构客户需求初始化时间
+    getInfoDemandDate()
     // 机构订单初始化时间
     getInfoOrderDate();
     // 机构搜索关键词初始化时间
@@ -11,10 +13,21 @@ $(function(){
     // 机构访问记录初始化时间
     getInfoVisitDate();
     // 第一次执行查所有
+    getDemandData(4);
     getClubEacthsData(0,4);
     getClubEacthsData(1,4);
     getClubEacthsData(2,4);
     getClubEacthsData(3,4);
+    // 点击筛选客户需求数据
+    $('#customerDemand').children("a").each(function (index) {
+        $(this).click(function () {
+            console.log('客户需求筛选')
+            //alert(index);
+            $(this).addClass('active').siblings('a').removeClass('active');
+            let dateType = $(this).attr('data-type');
+            getDemandData(dateType)
+        });
+    });
     // 点击筛选机构订单数据
     $('#orderTabs').children("a").each(function (index) {
         $(this).click(function () {