JiangChongBo 2 anos atrás
pai
commit
e8d0570b23

+ 7 - 1
src/main/java/com/caimei/service/auth/impl/AuthServiceImpl.java

@@ -2163,7 +2163,13 @@ public class AuthServiceImpl implements AuthService {
         //获取活动时间内的机构列表信息
         ChallengeActivityVo activityTime = authMapper.getActivityTime(authUserId);
         PageHelper.startPage(pageNum, pageSize);
-        List<RossChallengeRoundVo> authInfo = authMapper.getAuthInfo(mobile,authUserId,activityTime.getStartTime(),activityTime.getEndTime(),authenticationStatus);
+        List<RossChallengeRoundVo> authInfo=null;
+        //判断是否是第一次设置活动时间
+        if(null!=activityTime){
+            authInfo = authMapper.getAuthInfo(mobile,authUserId,activityTime.getStartTime(),activityTime.getEndTime(),authenticationStatus);
+        }else{
+            authInfo = authMapper.getAuthInfo(mobile,authUserId,null,null,authenticationStatus);
+        }
         PageInfo<RossChallengeRoundVo> pageData = new PageInfo<>(authInfo);
         if(null!=authInfo&&authInfo.size()>0){
             for (RossChallengeRoundVo search:authInfo) {

+ 3 - 1
src/main/resources/mapper/AuthMapper.xml

@@ -888,7 +888,9 @@
         select cr.*,cba.authParty from cm_ross_challenge_round cr
         left join cm_brand_auth cba on cr.authId=cba.id
         where cr.authUserId=#{authUserId}
-          and cr.contestTime &gt; #{StartTime} and cr.contestTime &lt; #{endTime}
+        <if test="null!=StartTime and StartTime !='' and null!=endTime and endTime !=''">
+            and cr.contestTime &gt; #{StartTime} and cr.contestTime &lt; #{endTime}
+        </if>
         <if test="null!=mobile and mobile !=''">
             and  cr.userName like concat('%', #{mobile})
         </if>