kaick 1 год назад
Родитель
Сommit
4b2756ab87
1 измененных файлов с 5 добавлено и 2 удалено
  1. 5 2
      src/main/resources/mapper/SellerMapper.xml

+ 5 - 2
src/main/resources/mapper/SellerMapper.xml

@@ -554,7 +554,8 @@
             b.accessClient,
             b.isReckon,
             b.region,
-            c.name,c.linkMan,c.contractMobile,c.clubId,u.image
+            ifnull(c.name,b.IP),
+            c.linkMan,c.contractMobile,c.clubId,u.image
         FROM cm_behavior_record b
         LEFT JOIN club c ON b.userID = c.userID
         LEFT JOIN user u ON u.userID = c.userID
@@ -562,7 +563,9 @@
         WHERE  sp.status=90 and sp.serviceProviderID=#{spId}
           and b.pageType in (69,70,71)
           and b.accessTime between DATE_SUB(#{accessTime}, INTERVAL 5 Minute) and  #{accessTime}
-        and c.clubId=#{clubId}
+        <if test="clubId != null">
+            AND c.clubId =#{clubId}
+        </if>
     </select>
     <select id="getBehaviorRecordYesterdayClub" resultType="com.caimei365.user.model.vo.CmBehaviorRecordVo">
         SELECT b.recordID,