记得上下班打卡 | git大法好,push需谨慎

Commit 562c7764 authored by 胡佳晨's avatar 胡佳晨

Merge remote-tracking branch 'origin/dev' into dev

parents 124fb8ae ab75caa9
...@@ -2,7 +2,6 @@ package com.liquidnet.service.kylin.controller; ...@@ -2,7 +2,6 @@ package com.liquidnet.service.kylin.controller;
import com.liquidnet.service.base.ResponseDto; import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.kylin.dto.vo.KylinBannersVo;
import com.liquidnet.service.kylin.entity.KylinBanners; import com.liquidnet.service.kylin.entity.KylinBanners;
import com.liquidnet.service.kylin.service.impl.BannersServiceImpl; import com.liquidnet.service.kylin.service.impl.BannersServiceImpl;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
...@@ -12,6 +11,7 @@ import io.swagger.annotations.ApiOperation; ...@@ -12,6 +11,7 @@ import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
...@@ -41,9 +41,12 @@ public class KylinBannersController { ...@@ -41,9 +41,12 @@ public class KylinBannersController {
@RequestParam() String position, @RequestParam() String position,
@RequestParam(defaultValue = "") String provinceName @RequestParam(defaultValue = "") String provinceName
) { ) {
List<KylinBanners> result = bannersServiceImpl.blist(position, provinceName); try {
List<KylinBanners> result = bannersServiceImpl.blist(position, provinceName);
return ResponseDto.success(result); return ResponseDto.success(result);
} catch (Exception e) {
return ResponseDto.success(new ArrayList<>());
}
} }
} }
...@@ -11,11 +11,8 @@ import com.liquidnet.service.kylin.utils.ObjectUtil; ...@@ -11,11 +11,8 @@ import com.liquidnet.service.kylin.utils.ObjectUtil;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.mongodb.core.MongoTemplate; import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
...@@ -56,9 +53,11 @@ public class BannersServiceImpl implements IKylinBannersService { ...@@ -56,9 +53,11 @@ public class BannersServiceImpl implements IKylinBannersService {
if (null != StartTime && null != endTime && !StartTime.isEmpty() && !endTime.isEmpty()) { if (null != StartTime && null != endTime && !StartTime.isEmpty() && !endTime.isEmpty()) {
if (DateUtil.compareStrDay(nowTime, StartTime) < 0) { // 当前时间小雨开始时间 还未开始呢 if (DateUtil.compareStrDay(nowTime, StartTime) < 0) { // 当前时间小雨开始时间 还未开始呢
itBannerList.remove(); itBannerList.remove();
continue;
} }
if (DateUtil.compareStrDay(endTime, nowTime) < 0) { // 解释时间大于当前时间 已过期 if (DateUtil.compareStrDay(endTime, nowTime) < 0) { // 解释时间大于当前时间 已过期
itBannerList.remove(); itBannerList.remove();
continue;
} }
} }
...@@ -74,6 +73,7 @@ public class BannersServiceImpl implements IKylinBannersService { ...@@ -74,6 +73,7 @@ public class BannersServiceImpl implements IKylinBannersService {
} }
if (!pis || null == pList) { if (!pis || null == pList) {
itBannerList.remove(); itBannerList.remove();
continue;
} }
if (bannerInfo.getPromotionType() != 1) { if (bannerInfo.getPromotionType() != 1) {
...@@ -88,6 +88,7 @@ public class BannersServiceImpl implements IKylinBannersService { ...@@ -88,6 +88,7 @@ public class BannersServiceImpl implements IKylinBannersService {
} }
if (!prois || null == proList) { if (!prois || null == proList) {
itBannerList.remove(); itBannerList.remove();
continue;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment