Commit 9be09c22 authored by 陈炎's avatar 陈炎

Merge branch 'dev-8.9.0' into 'uat'

Dev 8.9.0

See merge request !33
parents 66040839 cc288b3d
......@@ -24,7 +24,6 @@ import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;
import java.text.ParseException;
import java.util.Date;
/**
......@@ -81,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));
}
......@@ -110,18 +105,14 @@ 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));
}
private static Date parseDate(String publishDateStr) {
Date publishDate = null;
try {
publishDate = org.apache.commons.lang3.time.DateUtils.parseDate(publishDateStr, "yyyy-MM-dd");
} catch (DateException | ParseException ignore) {
publishDate = DateUtil.parse(publishDateStr, "yyyy-MM-dd");
} catch (DateException ignore) {
}
return publishDate;
}
......
......@@ -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