日程排序
This commit is contained in:
@@ -262,12 +262,7 @@
|
|||||||
<if test="currentDate!=null and currentDate!=''">
|
<if test="currentDate!=null and currentDate!=''">
|
||||||
and deadline = #{currentDate}
|
and deadline = #{currentDate}
|
||||||
</if>
|
</if>
|
||||||
and
|
and (workflow_stage = 2 and workflow_status = 0)
|
||||||
(
|
|
||||||
(workflow_stage = 1 and workflow_status = 0) or
|
|
||||||
(workflow_stage = 2 and workflow_status = 0) or
|
|
||||||
(workflow_stage = 3 and workflow_status = 4)
|
|
||||||
)
|
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import lombok.Data;
|
|||||||
* @date 2023-06-13 11:18
|
* @date 2023-06-13 11:18
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class UserCalendarsEventDTO {
|
public class UserCalendarsEventDTO implements Comparable<UserCalendarsEventDTO>{
|
||||||
|
|
||||||
@ApiModelProperty("日历id")
|
@ApiModelProperty("日历id")
|
||||||
private String calendarId;
|
private String calendarId;
|
||||||
@@ -34,4 +34,9 @@ public class UserCalendarsEventDTO {
|
|||||||
this.startTime = startTime;
|
this.startTime = startTime;
|
||||||
this.endTime = endTime;
|
this.endTime = endTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int compareTo(UserCalendarsEventDTO other) {
|
||||||
|
return this.startTime.compareTo(other.getStartTime());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ public class InviteCodeDetailVO {
|
|||||||
private String partnerPhone;
|
private String partnerPhone;
|
||||||
@ApiModelProperty("邀请码")
|
@ApiModelProperty("邀请码")
|
||||||
private String inviteCode;
|
private String inviteCode;
|
||||||
|
@ApiModelProperty("门店编码")
|
||||||
|
private String storeCode;
|
||||||
@ApiModelProperty("门店名称")
|
@ApiModelProperty("门店名称")
|
||||||
private String storeName;
|
private String storeName;
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
package com.cool.store.service;
|
package com.cool.store.service;
|
||||||
|
|
||||||
|
import com.cool.store.dto.calendar.UserCalendarsEventDTO;
|
||||||
|
import com.cool.store.exception.ApiException;
|
||||||
import com.cool.store.vo.InterviewPlanVO;
|
import com.cool.store.vo.InterviewPlanVO;
|
||||||
import com.cool.store.vo.InterviewScheduleInfoVO;
|
import com.cool.store.vo.InterviewScheduleInfoVO;
|
||||||
import com.cool.store.vo.StageCountVO;
|
import com.cool.store.vo.StageCountVO;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author suzhuhong
|
* @Author suzhuhong
|
||||||
@@ -38,6 +41,15 @@ public interface DeskService {
|
|||||||
*/
|
*/
|
||||||
StageCountVO getStageCountByType(String userId,String type);
|
StageCountVO getStageCountByType(String userId,String type);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* String userId, long startTime, long endTime
|
||||||
|
* @param userId
|
||||||
|
* @param startTime
|
||||||
|
* @param endTime
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<UserCalendarsEventDTO> getUserCalendarsEvents(String userId, long startTime, long endTime) throws ApiException;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,9 +5,12 @@ import cn.hutool.core.date.DateUtil;
|
|||||||
import com.cool.store.constants.CommonConstants;
|
import com.cool.store.constants.CommonConstants;
|
||||||
import com.cool.store.dao.HyPartnerInterviewPlanDAO;
|
import com.cool.store.dao.HyPartnerInterviewPlanDAO;
|
||||||
import com.cool.store.dao.HyPartnerLineInfoDAO;
|
import com.cool.store.dao.HyPartnerLineInfoDAO;
|
||||||
|
import com.cool.store.dto.calendar.UserCalendarsEventDTO;
|
||||||
import com.cool.store.dto.partner.SpecialDateRangeInterviewCountDTO;
|
import com.cool.store.dto.partner.SpecialDateRangeInterviewCountDTO;
|
||||||
import com.cool.store.enums.ErrorCodeEnum;
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
|
import com.cool.store.exception.ApiException;
|
||||||
import com.cool.store.exception.ServiceException;
|
import com.cool.store.exception.ServiceException;
|
||||||
|
import com.cool.store.http.ISVHttpRequest;
|
||||||
import com.cool.store.service.DeskService;
|
import com.cool.store.service.DeskService;
|
||||||
import com.cool.store.service.HyPartnerInterviewPlanService;
|
import com.cool.store.service.HyPartnerInterviewPlanService;
|
||||||
import com.cool.store.service.HyPartnerLineInfoService;
|
import com.cool.store.service.HyPartnerLineInfoService;
|
||||||
@@ -21,6 +24,7 @@ import org.apache.http.client.utils.DateUtils;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -40,6 +44,8 @@ public class DeskServiceImpl implements DeskService {
|
|||||||
HyPartnerInterviewPlanService hyPartnerInterviewPlanService;
|
HyPartnerInterviewPlanService hyPartnerInterviewPlanService;
|
||||||
@Resource
|
@Resource
|
||||||
HyPartnerLineInfoService hyPartnerLineInfoService;
|
HyPartnerLineInfoService hyPartnerLineInfoService;
|
||||||
|
@Resource
|
||||||
|
private ISVHttpRequest isvHttpRequest;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public InterviewPlanVO getInterviewPlan(String userId) {
|
public InterviewPlanVO getInterviewPlan(String userId) {
|
||||||
@@ -91,5 +97,11 @@ public class DeskServiceImpl implements DeskService {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<UserCalendarsEventDTO> getUserCalendarsEvents(String userId, long startTime, long endTime) throws ApiException {
|
||||||
|
List<UserCalendarsEventDTO> userCalendarsEvents = isvHttpRequest.getUserCalendarsEvents(userId, startTime, endTime);
|
||||||
|
Collections.sort(userCalendarsEvents);
|
||||||
|
return userCalendarsEvents;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,6 +88,7 @@ public class PartnerUserInfoServiceImpl implements PartnerUserInfoService {
|
|||||||
InviteCodeDetailVO inviteCodeDetailVO = new InviteCodeDetailVO();
|
InviteCodeDetailVO inviteCodeDetailVO = new InviteCodeDetailVO();
|
||||||
inviteCodeDetailVO.setInviteCode(hyPartnerUserInfoDO.getInviteCode());
|
inviteCodeDetailVO.setInviteCode(hyPartnerUserInfoDO.getInviteCode());
|
||||||
inviteCodeDetailVO.setStoreName(hyPartnerUserInfoDO.getRecommendPartnerName());
|
inviteCodeDetailVO.setStoreName(hyPartnerUserInfoDO.getRecommendPartnerName());
|
||||||
|
inviteCodeDetailVO.setStoreCode(hyPartnerUserInfoDO.getShopCode());
|
||||||
inviteCodeDetailVO.setPartnerPhone(hyPartnerUserInfoDO.getRecommendPartnerMobile());
|
inviteCodeDetailVO.setPartnerPhone(hyPartnerUserInfoDO.getRecommendPartnerMobile());
|
||||||
inviteCodeDetailVO.setPartnerName(hyPartnerUserInfoDO.getShopName());
|
inviteCodeDetailVO.setPartnerName(hyPartnerUserInfoDO.getShopName());
|
||||||
return inviteCodeDetailVO;
|
return inviteCodeDetailVO;
|
||||||
|
|||||||
@@ -43,8 +43,6 @@ public class DeskController {
|
|||||||
@Resource
|
@Resource
|
||||||
HyPartnerBaseInfoService hyPartnerBaseInfoService;
|
HyPartnerBaseInfoService hyPartnerBaseInfoService;
|
||||||
@Resource
|
@Resource
|
||||||
private ISVHttpRequest isvHttpRequest;
|
|
||||||
@Resource
|
|
||||||
EnterpriseUserService enterpriseUserService;
|
EnterpriseUserService enterpriseUserService;
|
||||||
@Resource
|
@Resource
|
||||||
PartnerUserInfoService partnerUserInfoService;
|
PartnerUserInfoService partnerUserInfoService;
|
||||||
@@ -78,7 +76,7 @@ public class DeskController {
|
|||||||
public ResponseResult<List<UserCalendarsEventDTO>> getUserCalendarsEvents(@RequestParam(value = "startTime") Long startTime,
|
public ResponseResult<List<UserCalendarsEventDTO>> getUserCalendarsEvents(@RequestParam(value = "startTime") Long startTime,
|
||||||
@RequestParam(value = "endTime") Long endTime) throws ApiException {
|
@RequestParam(value = "endTime") Long endTime) throws ApiException {
|
||||||
String userId = CurrentUserHolder.getUserId();
|
String userId = CurrentUserHolder.getUserId();
|
||||||
return ResponseResult.success(isvHttpRequest.getUserCalendarsEvents(userId,startTime,endTime));
|
return ResponseResult.success(deskService.getUserCalendarsEvents(userId,startTime,endTime));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user