查询忙闲信息接口调整

This commit is contained in:
俞扬
2023-06-18 17:58:07 +08:00
parent a3c94a6543
commit 439684a85d
4 changed files with 46 additions and 17 deletions

View File

@@ -39,7 +39,8 @@ public class FeiShuServiceImpl implements FeiShuService {
@Override
public GetFreeBusyListVO getFreeBusyList(GetFreeBusyListReq request) throws ApiException {
GetFreeBusyListVO freeBusyListVO = new GetFreeBusyListVO();
String queryDate = request.getQueryDate();//查询日期
String startDate = request.getStartDate();//开始日期
String endDate = request.getEndDate();//结束日期
String partnerId = request.getPartnerId();//加盟商用户ID
String interviewerId = request.getInterviewerId();//面试官ID
//如果加盟商用户ID为空且面试官ID为空返回错误信息
@@ -63,13 +64,9 @@ public class FeiShuServiceImpl implements FeiShuService {
DateTime startDateTime = null;
DateTime endDateTime = null;
//如果查询时间为空,取明天
if (StringUtils.isEmpty(queryDate)) {
startDateTime = DateUtil.beginOfDay(DateUtil.tomorrow());
endDateTime = DateUtil.endOfDay(DateUtil.tomorrow());
} else {
startDateTime = DateUtil.beginOfDay(DateUtil.parse(queryDate));
endDateTime = DateUtil.endOfDay(DateUtil.parse(queryDate));
if (!StringUtils.isEmpty(startDate)&&!StringUtils.isEmpty(endDate)) {
startDateTime = DateUtil.beginOfDay(DateUtil.parse(startDate));
endDateTime = DateUtil.endOfDay(DateUtil.parse(endDate));
}
if (startDateTime.isAfter(endDateTime)) {
throw new ServiceException(ErrorCodeEnum.DATE_PARAMS_IS_ERROR);