Ver código fonte

机构画像

huangzhiguo 1 ano atrás
pai
commit
92444c1583

+ 5 - 1
src/main/java/com/caimei/modules/newhome/web/NewPageHomeimageController.java

@@ -72,7 +72,11 @@ public class NewPageHomeimageController extends BaseController {
         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());
-                homeimage.setCount(collect.size());
+                if (collect.size() > 0) {
+                    homeimage.setCount(collect.get(0).getCount());
+                } else {
+                    homeimage.setCount(0);
+                }
             }
         }
         model.addAttribute("page", page);

+ 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));
     }
-}
+}

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

@@ -49,7 +49,7 @@ public class ClubStatistics extends DataEntity<ClubStatistics> {
     private String town;
 
     private Integer sex;    //性别
-    private Integer age;    // 年龄
+    private String age;    // 年龄
     private String name;    // 机构名称
     private String linkMan; //联系人
     private String contractMobile;  //联系手机
@@ -308,11 +308,11 @@ public class ClubStatistics extends DataEntity<ClubStatistics> {
         this.sex = sex;
     }
 
-    public Integer getAge() {
+    public String getAge() {
         return age;
     }
 
-    public void setAge(Integer age) {
+    public void setAge(String age) {
         this.age = age;
     }
 

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

@@ -37,7 +37,7 @@ public class ClubPortraitService {
     }
 
     public ClubStatistics clubData(Integer clubID) {
-        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
         ClubStatistics clubStatistics = cmPortraitDao.selClubData(clubID);
         if (clubStatistics != null) {
             String type = "";
@@ -63,7 +63,7 @@ public class ClubPortraitService {
                     clubStatistics.setWxReach(0);
                 }
                 clubStatistics.setSex(clubRemarksInfo.getCustomerGender() != null ? clubRemarksInfo.getGroupAddition() : null);
-                clubStatistics.setAge(clubRemarksInfo.getCustomerGender() != null ? clubRemarksInfo.getGroupAddition() : null);
+                clubStatistics.setAge(StringUtils.isNotBlank(clubRemarksInfo.getCustomerAge()) ? clubRemarksInfo.getCustomerAge() : null);
                 clubStatistics.setFillTime(dateFormat.format(clubRemarksInfo.getAddTime()));
             }
         }
@@ -119,12 +119,12 @@ public class ClubPortraitService {
                 if (clubRemark.contains(",")) {
                     String[] split = clubRemark.split(",");
                     for (String s : split) {
-                        if (demandList.size() <= 10 && StringUtils.isNotBlank(s)) {
+                        if (demandList.size() < 10 && StringUtils.isNotBlank(s)) {
                             demandList.add(s);
                         }
                     }
                 } else {
-                    if (demandList.size() <= 10 && StringUtils.isNotBlank(clubRemark)) {
+                    if (demandList.size() < 10 && StringUtils.isNotBlank(clubRemark)) {
                         demandList.add(clubRemark);
                     }
                 }
@@ -137,12 +137,12 @@ public class ClubPortraitService {
                 if (clubBehavior.contains(",")) {
                     String[] split = clubBehavior.split(",");
                     for (String s : split) {
-                        if (demandList.size() <= 10 && StringUtils.isNotBlank(s)) {
+                        if (demandList.size() < 10 && StringUtils.isNotBlank(s)) {
                             demandList.add(s);
                         }
                     }
                 } else {
-                    if (demandList.size() <= 10 && StringUtils.isNotBlank(clubBehavior)) {
+                    if (demandList.size() < 10 && StringUtils.isNotBlank(clubBehavior)) {
                         demandList.add(clubBehavior);
                     }
                 }

+ 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>

+ 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;}

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

@@ -120,7 +120,17 @@
                 </div>
                 <div class="flex-header-tb">
                     <div class="flex-header-td">${statistics.name}</div>
-                    <div class="flex-header-td">${statistics.clubRank}</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}">
@@ -149,7 +159,9 @@
                             ---
                         </c:if>
                     </div>
-                    <div class="flex-header-td last">${statistics.address}</div>
+                    <div class="flex-header-td last">
+                        ${statistics.province}${statistics.city}${statistics.town}
+                    </div>
                 </div>
             </div>
         </div>
@@ -291,8 +303,8 @@
                     <H4 class="H_tag">访问记录</H4>
                 </div>
                 <div class="box-title">
-                    <span>所有:<a class="line visitNum" 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 class="visitNum" href="javascript:void(0);"></a></span>
+                    <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">
@@ -328,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>

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

@@ -65,12 +65,4 @@ $(function(){
         });
     });
 
-    // 前往新后台
-    $('.visitNum').click(function () {
-        var link = "";
-        $.get("${ctx}/jump/link", function (data) {
-            link = "https://manager.caimei365.com/#/user/record-list?token=" + data;
-            window.open(link, "_blank");
-        });
-    })
 })