Bläddra i källkod

用户行为优化1.0.2

huangzhiguo 1 år sedan
förälder
incheckning
060008159c

+ 4 - 4
src/main/java/com/caimei365/user/service/impl/SellerServiceImpl.java

@@ -295,14 +295,14 @@ public class SellerServiceImpl implements SellerService {
             total = activeNumber + unActiveNumber;
             // 机构活跃
             PortraitMap portrait = new PortraitMap();
-            String per = MathUtil.div(activeNumber, total, 2).toString();
+            String per = MathUtil.mul(MathUtil.div(activeNumber, total, 2), 100).toString();
             portrait.setName("活跃机构");
             portrait.setValue(activeNumber);
             portrait.setPer(per);
             portraitMap.add(portrait);
             // 机构不活跃
             portrait = new PortraitMap();
-            per = MathUtil.div(unActiveNumber, total, 2).toString();
+            per = MathUtil.mul(MathUtil.div(unActiveNumber, total, 2), 100).toString();
             portrait.setName("不活跃机构");
             portrait.setValue(unActiveNumber);
             portrait.setPer(per);
@@ -320,14 +320,14 @@ public class SellerServiceImpl implements SellerService {
             // 有咨询记录
             ArrayList<PortraitMap> portraitMap = new ArrayList<>();
             PortraitMap portrait = new PortraitMap();
-            String per = MathUtil.div(isHaveClub, allclub, 2).toString();
+            String per = MathUtil.mul(MathUtil.div(isHaveClub, allclub, 2), 100).toString();
             portrait.setName("已填写机构");
             portrait.setValue(isHaveClub);
             portrait.setPer(per);
             portraitMap.add(portrait);
             // 机构不活跃
             portrait = new PortraitMap();
-            per = MathUtil.div(number, allclub, 2).toString();
+            per = MathUtil.mul(MathUtil.div(number, allclub, 2), 100).toString();
             portrait.setName("未填写机构");
             portrait.setValue(number);
             portrait.setPer(per);

+ 9 - 9
src/main/resources/mapper/SellerMapper.xml

@@ -185,19 +185,19 @@
             AND covs.customerValue like concat('%', #{customerValue}, '%')
         </if>
         <if test="status != null">
-            <if test="status == 90">
+            <if test="90 == status and 4 == type and 5 == type">
                 and c.status = 90 and u.userIdentity = 4
             </if>
-            <if test="status == 1">
+            <if test="1 == status and 4 == type and 5 == type">
                 and c.status = 1 and u.userIdentity = 4
             </if>
-            <if test="status == 92">
+            <if test="92 == status and 4 == type and 5 == type">
                 and c.status = 92 and u.userIdentity = 4
             </if>
-            <if test="status != 90 and status != 1 and status != 92 and status != 66">
+            <if test="4 != type and 5 != type and 66 != status">
                 AND c.status = #{status}
             </if>
-            <if test="status == 66">
+            <if test="4 != type and 5 != type and 66 == status">
                 AND c.status IN (1,90,92,93)
             </if>
         </if>
@@ -275,8 +275,8 @@
                 ccr.customerGender,
                 ccr.groupAddition,
                 ccr.customerAge,
-                ccr.trendsKeyword,
-                ccr.stateKeyword,
+                ifnull(ccr.trendsKeyword, "") as trendsKeyword,
+                ifnull(ccr.stateKeyword, "") as stateKeyword,
                 (SELECT NAME FROM serviceprovider s WHERE s.serviceProviderID= csr.leaderId) AS leaderName,
                 (SELECT linkMan FROM serviceprovider s WHERE s.serviceProviderID = ccr.createServiceProviderId) AS recordName,
                 cmc.status AS STATUS
@@ -318,8 +318,8 @@
                 ccr.customerGender,
                 ccr.groupAddition,
                 ccr.customerAge,
-                ccr.trendsKeyword,
-                ccr.stateKeyword,
+                ifnull(ccr.trendsKeyword, "") as trendsKeyword,
+                ifnull(ccr.stateKeyword, "") as stateKeyword,
                 (SELECT NAME FROM serviceprovider s WHERE s.serviceProviderID = csr.leaderId) AS leaderName,
                 (SELECT linkMan FROM serviceprovider s WHERE s.serviceProviderID = ccr.serviceProviderId) AS recordName,
                 cmc.status AS STATUS