Commit cc288b3d authored by 陈炎's avatar 陈炎

🎨 去除频控,加上300ms定时

parent c01056b5
......@@ -80,10 +80,6 @@ public class FawOpenController extends BaseController {
if (!type.equals(quarter) && !type.equals(monthly)) {
return error("90001", "type传参异常,未开放数据类型");
}
BaseResponse check = baseService.baseValidator(request,client, dataType, limit, limitPeriod);
if (check != null) {
return check;
}
return success(fawOpenService.awemes(publishDateStart, publishDateEnd, type, pageNum, pageSize));
}
......@@ -109,10 +105,6 @@ public class FawOpenController extends BaseController {
if (!type.equals(quarter) && !type.equals(monthly)) {
return error("90001", "type传参异常,未开放数据类型!");
}
BaseResponse check = baseService.baseValidator(request, client, dataType, limit, limitPeriod);
if (check != null) {
return check;
}
return success(fawOpenService.lives(publishDateStart, publishDateEnd, type, pageNum, pageSize));
}
......
......@@ -23,6 +23,7 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import java.util.concurrent.TimeUnit;
/**
* @author chin
......@@ -49,6 +50,10 @@ public class FawOpenService {
static String quarter = "quarter";
public BasePageVO<HongqiAwemeIncentiveVO> awemes(Date publishDateStart, Date publishDateEnd, String type, Integer pageNum, Integer pageSize) {
try {
TimeUnit.MILLISECONDS.sleep(300L);
} catch (InterruptedException ignored) {
}
PageHelper.orderBy(" publish_time DESC ");
if (monthly.equals(type)) {
IPage<HongqiAwemeIncentiveMonthly> page = new Page<>(pageNum, pageSize);
......@@ -72,6 +77,10 @@ public class FawOpenService {
}
public BasePageVO<HongqiLiveIncentiveVO> lives(Date publishDateStart, Date publishDateEnd, String type, Integer pageNum, Integer pageSize) {
try {
TimeUnit.MILLISECONDS.sleep(300L);
} catch (InterruptedException ignored) {
}
PageHelper.orderBy(" publish_time DESC ");
if (monthly.equals(type)) {
IPage<HongqiLiveIncentiveMonthly> page = new Page<>(pageNum, pageSize);
......
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