Commit a14f40f4 authored by 陈炎's avatar 陈炎

🎨 更改时间请求格式

parent dd9d7d9d
package com.afanticar.afantiopenapi.controller; package com.afanticar.afantiopenapi.controller;
import cn.hutool.core.date.DateUtil;
import com.afanticar.afantiopenapi.model.BaseResponse; import com.afanticar.afantiopenapi.model.BaseResponse;
import com.afanticar.afantiopenapi.model.vo.BasePageVO; import com.afanticar.afantiopenapi.model.vo.BasePageVO;
import com.afanticar.afantiopenapi.model.vo.HongqiAwemeIncentiveVO; import com.afanticar.afantiopenapi.model.vo.HongqiAwemeIncentiveVO;
...@@ -70,6 +71,7 @@ public class FawOpenController extends BaseController { ...@@ -70,6 +71,7 @@ public class FawOpenController extends BaseController {
@NotNull(message = "type不能为空") @RequestParam(name = "type", required = false) String type) { @NotNull(message = "type不能为空") @RequestParam(name = "type", required = false) String type) {
log.info("AAAAAAAAA:" + limit); log.info("AAAAAAAAA:" + limit);
BaseResponse check = baseService.baseValidator(request,client, dataType, limit, limitPeriod); BaseResponse check = baseService.baseValidator(request,client, dataType, limit, limitPeriod);
publishDateEnd = endTime(publishDateEnd);
if (check != null) { if (check != null) {
return check; return check;
} }
...@@ -87,14 +89,19 @@ public class FawOpenController extends BaseController { ...@@ -87,14 +89,19 @@ public class FawOpenController extends BaseController {
@GetMapping("/live") @GetMapping("/live")
public BaseResponse<BasePageVO<HongqiLiveIncentiveVO>> getLiveData(HttpServletRequest request, @Max(value = 500,message = "单页数据page_size过大") @RequestParam(name = "page_size", defaultValue = "100", required = false) Integer pageSize, public BaseResponse<BasePageVO<HongqiLiveIncentiveVO>> getLiveData(HttpServletRequest request, @Max(value = 500,message = "单页数据page_size过大") @RequestParam(name = "page_size", defaultValue = "100", required = false) Integer pageSize,
@RequestParam(name = "current_page", defaultValue = "1", required = false) Integer pageNum, @RequestParam(name = "current_page", defaultValue = "1", required = false) Integer pageNum,
@NotNull(message = "publish_date_start不能为空") @RequestParam(name = "publish_date_start", required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date publishDateStart, @NotNull(message = "publish_date_start不能为空") @RequestParam(name = "publish_date_start", required = false) @DateTimeFormat(pattern = "yyyy-MM-dd") Date publishDateStart,
@NotNull(message = "publish_date_end不能为空") @RequestParam(name = "publish_date_end", required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date publishDateEnd, @NotNull(message = "publish_date_end不能为空") @RequestParam(name = "publish_date_end", required = false) @DateTimeFormat(pattern = "yyyy-MM-dd") Date publishDateEnd,
@NotNull(message = "type不能为空") @RequestParam(name = "type", required = false) String type) { @NotNull(message = "type不能为空") @RequestParam(name = "type", required = false) String type) {
BaseResponse check = baseService.baseValidator(request, client, dataType, limit, limitPeriod); BaseResponse check = baseService.baseValidator(request, client, dataType, limit, limitPeriod);
publishDateEnd = endTime(publishDateEnd);
if (check != null) { if (check != null) {
return check; return check;
} }
return success(fawOpenService.lives(publishDateStart, publishDateEnd, type, pageNum, pageSize)); return success(fawOpenService.lives(publishDateStart, publishDateEnd, type, pageNum, pageSize));
} }
private Date endTime(Date endDate) {
return DateUtil.endOfDay(endDate);
}
} }
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