Browse Source

协销展示机构画像

huangzhiguo 2 years ago
parent
commit
6087f25929

+ 3 - 5
src/main/java/com/caimei365/user/service/impl/ClubServiceImpl.java

@@ -2130,11 +2130,10 @@ public class ClubServiceImpl implements ClubService {
         if (expty) {
             Date start = null;
             String startTime = "";
-            String format = dateFormat.format(date);
             cmPortrait.setEndTime(endTime);
             // 日期参数为    日
             if (0 ==  cmPortrait.getDateType() || 1 == cmPortrait.getDateType()) {
-                cmPortrait.setAccessDate(endTime);
+//                cmPortrait.setAccessDate(endTime);
                 cmPortrait.setStartTime(endTime);
 //                cmPortrait.setEndTime(endTime);
             }
@@ -2217,8 +2216,8 @@ public class ClubServiceImpl implements ClubService {
                         orderScopeTotalFee += order.getPayTotalFee();
                     }
                 }
-                /*cmPortrait.setOrderTotal(length);
-                cmPortrait.setOrderTotalAmount(new BigDecimal(orderList.get(0).getTotalMoney()));*/
+                cmPortrait.setOrderTotal(length);
+                /*cmPortrait.setOrderTotalAmount(new BigDecimal(orderList.get(0).getTotalMoney()));*/
                 // 当前单位订单总额
                 cmPortrait.setOrderScopeTotalFee(Double.valueOf(String.format("%.2f", orderScopeTotalFee)));
 
@@ -2281,7 +2280,6 @@ public class ClubServiceImpl implements ClubService {
                     orderPortrait.setPer("0");
                 }
                 orderPortraits.add(orderPortrait);
-
                 cmPortrait.setOrderPortrait(orderPortraits);
             } else {
                 cmPortrait.setOrderTotalAmount(BigDecimal.ZERO);

+ 0 - 14
src/main/resources/mapper/ClubMapper.xml

@@ -1049,8 +1049,6 @@
         SELECT
         (SELECT COUNT(orderID) FROM cm_order WHERE clubID = #{clubId}) as numbers,
         (SELECT SUM(payTotalFee) FROM cm_order WHERE clubID = #{clubId}) as totalMoney,
-        (SELECT COUNT(orderID) FROM cm_order WHERE clubID = #{clubId} AND orderTime <![CDATA[ < ]]> now()) AS orderTotal,
-        (SELECT SUM(payTotalFee) FROM cm_order WHERE clubID = #{clubId} AND orderTime <![CDATA[ < ]]> now()) AS orderTotalAmount,
         clubID,
         secondHandOrderFlag,
         rebateFlag,
@@ -1061,9 +1059,6 @@
         FROM cm_order
         <where>
             clubID = #{clubId}
-            <if test="accessDate != null and accessDate != ''">
-                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}
             </if>
@@ -1078,9 +1073,6 @@
         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.pageLabel IS NOT NULL AND cbr.pageLabel != ''
-            <if test="accessDate != null and accessDate != ''">
-                AND cbr.accessDate = #{accessDate}
-            </if>
             <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
                 AND cbr.accessDate <![CDATA[ >= ]]> #{startTime} AND cbr.accessDate <![CDATA[ <= ]]> #{endTime}
             </if>
@@ -1106,9 +1098,6 @@
         FROM cm_club_remarks
         <where>
             clubID = #{clubId}
-            <if test="accessDate != null and accessDate != ''">
-                AND addTime like concat('%', #{accessDate},'%')
-            </if>
             <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
                 AND addTime <![CDATA[ >= ]]> #{startTime} AND addTime <![CDATA[ <= ]]> #{endTime}
             </if>
@@ -1125,9 +1114,6 @@
         LEFT JOIN club c ON cbr.userID = c.userID
         <where>
             c.clubID = #{clubId}
-            <if test="accessDate != null and accessDate != ''">
-                AND cbr.accessDate like concat('%', #{accessDate},'%')
-            </if>
             <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
                 AND cbr.accessDate <![CDATA[ >= ]]> #{startTime} AND cbr.accessDate <![CDATA[ <= ]]> #{endTime}
             </if>