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

This commit is contained in:
pserimal
2023-06-25 11:14:04 +08:00
4 changed files with 21 additions and 4 deletions

View File

@@ -1,5 +1,7 @@
package com.cool.store.utils;
import cn.hutool.core.date.DateUtil;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
@@ -39,6 +41,21 @@ public class CoolDateUtils {
return now.getTime();
}
/**
* n天后 的最小时间 20230613 2天后最小时间---->2023-06-15 00:00:00
* @param day
* @return
*/
public static Date getDateFormatDayMinTime(int day){
LocalDate today = LocalDate.now();
LocalDate thirdDay = today.plusDays(day);
LocalDateTime thirdDayMidnight = LocalDateTime.of(thirdDay, LocalTime.MIDNIGHT);
LocalDateTime thirdDay235959 = thirdDayMidnight.with(LocalTime.MIN);
ZonedDateTime zonedDateTime = ZonedDateTime.of(thirdDay235959, ZoneId.systemDefault());
return Date.from(zonedDateTime.toInstant());
}
/**
* n天后 的最大时间 20230613 2天后最大时间---->2023-06-15 23:59:59

View File

@@ -140,7 +140,7 @@
from hy_intend_developement_mapping a inner join hy_intend_dev_zone_info b on a.mapping_id = b.id
<where>
<if test="type!=null and type !=''">
and type = #{type}
and a.type = #{type}
</if>
<if test="openAreaMappingIdList!=null and openAreaMappingIdList.size>0">
<foreach collection="openAreaMappingIdList" open="and a.open_area_mapping_id in (" close=")" separator="," item="mappingId">

View File

@@ -270,7 +270,7 @@
<select id="getInterviewCount" resultType="com.cool.store.dto.partner.SpecialDateRangeInterviewCountDTO">
select
ifnull(sum(if(interview_date=#{currentDate},1,0)),0) as currentDayInterviewCount,
ifnull(sum(if(start_time>#{startTime} and #{endTime},1,0)),0) as lastSevenDayInterviewCount
ifnull(sum(if(start_time>#{startTime} and end_time <![CDATA[<]]> #{endTime},1,0)),0) as lastSevenDayInterviewCount
FROM hy_partner_interview_plan
where interviewer = #{userId}
and application_approved = 0

View File

@@ -65,8 +65,8 @@ public class DeskServiceImpl implements DeskService {
//查询面试数量
String currentDate = DateUtil.format(dateTime, CoolDateUtils.DATE_FORMAT_DAY);
String startTime = DateUtil.format(dateTime, CoolDateUtils.DATE_FORMAT_SEC);
String endTime = DateUtil.format(CoolDateUtils.getDateBefore(dateTime, 7), CoolDateUtils.DATE_FORMAT_SEC);
String startTime = DateUtil.format(CoolDateUtils.getDateFormatDayMinTime(1), CoolDateUtils.DATE_FORMAT_SEC);
String endTime = DateUtil.format(CoolDateUtils.getDateFormatDay(7), CoolDateUtils.DATE_FORMAT_SEC);
SpecialDateRangeInterviewCountDTO interviewCount = hyPartnerInterviewPlanDAO.getInterviewCount(userId, currentDate, startTime, endTime);
interviewScheduleInfoVO.setCurrentDayInterviewCount(interviewCount.getCurrentDayInterviewCount());