huangzhiguo 2 лет назад
Родитель
Сommit
b1af61ea79

+ 3 - 0
src/main/java/com/caimei/modules/user/dao/CmBehaviorRecordDao.java

@@ -4,6 +4,7 @@ import com.caimei.modules.user.entity.CmBehaviorRecord;
 import com.caimei.modules.user.entity.CmPageType;
 import com.thinkgem.jeesite.common.persistence.CrudDao;
 import com.thinkgem.jeesite.common.persistence.annotation.MyBatisDao;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
@@ -51,4 +52,6 @@ public interface CmBehaviorRecordDao extends CrudDao<CmBehaviorRecord> {
 
 
     List<CmBehaviorRecord> behaviorAgency(CmBehaviorRecord cmBehaviorRecord);
+
+    List<CmBehaviorRecord> selRegion(@Param("IP") String IP, @Param("pageType") String pageType, @Param("accessTime") String accessTime);
 }

+ 13 - 0
src/main/java/com/caimei/modules/user/service/CmBehaviorRecordService.java

@@ -142,6 +142,19 @@ public class CmBehaviorRecordService extends CrudService<CmBehaviorRecordDao, Cm
                 e.printStackTrace();
             }
             record.setPagePath(decode);
+            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm");
+            String s = null;
+            try {
+                s = simpleDateFormat.format(simpleDateFormat.parse(record.getAccessTime()));
+            } catch (ParseException e) {
+                e.printStackTrace();
+            }
+            List<CmBehaviorRecord> region = cmBehaviorRecordDao.selRegion(record.getIP(), record.getPageType(), s);
+            if (region.size() != 0) {
+                for (CmBehaviorRecord behaviorRecord : region) {
+                    record.setAccessSource(behaviorRecord.getAccessSource());
+                }
+            }
         }
         page.setList(cmBehaviorRecordList);
         return page;

+ 2 - 1
src/main/resources/mappings/modules/order/OrderMapper.xml

@@ -1034,7 +1034,8 @@
           AND co.organizeID = 0
           AND co.orderType != 2
           AND co.refundType != 2
-          AND p.splitCode != 'E1807059160'
+          -- AND p.splitCode != 'E1807059160'
+          AND co.orderID NOT IN (SELECT orderID FROM cm_order_product cops LEFT JOIN product ps ON cops.productID = ps.productID WHERE ps.splitCode = 'E1807059160' AND cops.orderID = cop.orderID)
     </select>
 
     <select id="getOnlineBalance" resultType="com.caimei.modules.order.entity.OrderReceiptRelationPo">

+ 4 - 2
src/main/resources/mappings/modules/order/ShopOrderMapper.xml

@@ -1147,7 +1147,8 @@
           AND cror.mbOrderId IS NOT NULL
           AND cror.splitStatus = 0
           AND a.receiptStatus=3
-          AND p.splitCode != 'E1807059160'
+          -- AND p.splitCode != 'E1807059160'
+          AND co.orderID NOT IN (SELECT orderID FROM cm_order_product cops LEFT JOIN product ps ON cops.productID = ps.productID WHERE ps.splitCode = 'E1807059160' AND cops.orderID = cop.orderID)
           AND co.orderID NOT IN (
             SELECT orderID
             FROM cm_order_product
@@ -1291,7 +1292,8 @@
           AND cror.delFlag = 0
           AND cror.mbOrderId IS NOT NULL
           AND cror.splitStatus = 1
-          AND p.splitCode != 'E1807059160'
+          -- AND p.splitCode != 'E1807059160'
+          AND co.orderID NOT IN (SELECT orderID FROM cm_order_product cops LEFT JOIN product ps ON cops.productID = ps.productID WHERE ps.splitCode = 'E1807059160' AND cops.orderID = cop.orderID)
         <if test="startTime != null and startTime != ''">
             AND (a.orderTime &gt; #{startTime} OR a.orderTime = #{startTime})
         </if>

+ 3 - 0
src/main/resources/mappings/modules/user/CmBehaviorRecordMapper.xml

@@ -278,4 +278,7 @@
         GROUP BY b.pageLabel
         ORDER BY accessTime DESC
     </select>
+    <select id="selRegion" resultType="com.caimei.modules.user.entity.CmBehaviorRecord">
+        SELECT * FROM cm_behavior_record_ref WHERE IP = #{IP} AND pageType = #{pageType} AND accessTime like concat('%', #{accessTime} ,'%')
+    </select>
 </mapper>

+ 1 - 4
src/main/webapp/WEB-INF/views/modules/user/behaviorRecordDetailsList.jsp

@@ -76,7 +76,7 @@
                 </c:if>
             </td>
             <td>
-                <c:if test="${cmBehaviorRecord.accessSource == '0'}">
+                <c:if test="${cmBehaviorRecord.accessSource == '0' || cmBehaviorRecord.accessSource == '7'}">
                     直接访问
                 </c:if>
                 <c:if test="${cmBehaviorRecord.accessSource == '1'}">
@@ -97,9 +97,6 @@
                 <c:if test="${cmBehaviorRecord.accessSource == '6'}">
                     搜狗搜索
                 </c:if>
-                <c:if test="${cmBehaviorRecord.accessSource == '7'}">
-                    直接访问
-                </c:if>
             </td>
             <td>
                 <c:if test="${cmBehaviorRecord.accessClient == '0'}">