|
|
|
|
@@ -6,14 +6,14 @@ import cn.hutool.core.date.DateUtil;
|
|
|
|
|
import com.cool.store.constants.RedisConstant;
|
|
|
|
|
import com.cool.store.context.PartnerUserHolder;
|
|
|
|
|
import com.cool.store.dao.EnterpriseUserDAO;
|
|
|
|
|
import com.cool.store.dao.HyExhibitionDAO;
|
|
|
|
|
import com.cool.store.dao.HyInterviewDAO;
|
|
|
|
|
import com.cool.store.dao.HyPartnerExhibitionDAO;
|
|
|
|
|
import com.cool.store.dto.log.LogBasicDTO;
|
|
|
|
|
import com.cool.store.dto.log.ModifyInterviewTimeDTO;
|
|
|
|
|
import com.cool.store.dto.partner.EnterInterviewDto;
|
|
|
|
|
import com.cool.store.dto.partner.LineQueryInterviewDto;
|
|
|
|
|
import com.cool.store.entity.HyPartnerInterviewDO;
|
|
|
|
|
import com.cool.store.entity.HyPartnerInterviewPlanDO;
|
|
|
|
|
import com.cool.store.entity.HyPartnerLineInfoDO;
|
|
|
|
|
import com.cool.store.entity.*;
|
|
|
|
|
import com.cool.store.enums.*;
|
|
|
|
|
import com.cool.store.exception.ApiException;
|
|
|
|
|
import com.cool.store.exception.ServiceException;
|
|
|
|
|
@@ -27,7 +27,6 @@ import com.cool.store.request.ModifyInterviewTimeReq;
|
|
|
|
|
import com.cool.store.service.InterviewService;
|
|
|
|
|
import com.cool.store.service.LogService;
|
|
|
|
|
import com.cool.store.service.PartnerInterviewService;
|
|
|
|
|
import com.cool.store.utils.CoolDateUtils;
|
|
|
|
|
import com.cool.store.utils.RedisUtilPool;
|
|
|
|
|
import com.cool.store.utils.StringUtil;
|
|
|
|
|
import com.cool.store.utils.TRTCUtils;
|
|
|
|
|
@@ -51,6 +50,9 @@ import org.springframework.transaction.support.TransactionSynchronizationManager
|
|
|
|
|
import java.text.MessageFormat;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
|
|
|
|
|
import static com.cool.store.utils.CoolDateUtils.DATE_FORMAT_DAY;
|
|
|
|
|
import static com.cool.store.utils.CoolDateUtils.DATE_FORMAT_SEC;
|
|
|
|
|
|
|
|
|
|
@Service
|
|
|
|
|
@Slf4j
|
|
|
|
|
public class PartnerInterviewServiceImpl implements PartnerInterviewService {
|
|
|
|
|
@@ -88,6 +90,12 @@ public class PartnerInterviewServiceImpl implements PartnerInterviewService {
|
|
|
|
|
@Autowired
|
|
|
|
|
private RedisUtilPool redisUtilPool;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private HyPartnerExhibitionDAO partnerExhibitionDAO;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private HyExhibitionDAO exhibitionDAO;
|
|
|
|
|
|
|
|
|
|
@Value("${trtc.sdkAppId}")
|
|
|
|
|
private Long sdkAppId;
|
|
|
|
|
|
|
|
|
|
@@ -107,7 +115,22 @@ public class PartnerInterviewServiceImpl implements PartnerInterviewService {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public PartnerInterviewInfoVO queryByPartnerLineId(LineQueryInterviewDto request) throws ApiException {
|
|
|
|
|
return interviewMapper.queryByPartnerLineId(request.getPartnerLineId());
|
|
|
|
|
PartnerInterviewInfoVO partnerInterviewInfo = interviewMapper.queryByPartnerLineId(request.getPartnerLineId());
|
|
|
|
|
//是否是会销面试
|
|
|
|
|
HyPartnerExhibitionDO partnerExhibitionQuery = new HyPartnerExhibitionDO();
|
|
|
|
|
partnerExhibitionQuery.setInterviewPlanId(partnerInterviewInfo.getInterviewPlanId());
|
|
|
|
|
partnerExhibitionQuery.setPartnerLineId(Long.parseLong(request.getPartnerLineId()));
|
|
|
|
|
partnerExhibitionQuery.setDeleted(Boolean.FALSE);
|
|
|
|
|
HyPartnerExhibitionDO partnerExhibitionRes = partnerExhibitionDAO.querySelective(partnerExhibitionQuery);
|
|
|
|
|
//会销日期
|
|
|
|
|
if (partnerExhibitionRes.getInterviewPlanId() != null) {
|
|
|
|
|
partnerInterviewInfo.setWhetherExhibitionInterview(Boolean.TRUE);
|
|
|
|
|
HyExhibitionDO exhibitionQuery = new HyExhibitionDO();
|
|
|
|
|
exhibitionQuery.setId(partnerExhibitionRes.getExhibitionId());
|
|
|
|
|
List<HyExhibitionDO> exhibitionDOS = exhibitionDAO.querySelective(exhibitionQuery);
|
|
|
|
|
partnerInterviewInfo.setExhibitionDate(DateUtil.format(exhibitionDOS.get(0).getStartDate(), DATE_FORMAT_DAY));
|
|
|
|
|
}
|
|
|
|
|
return partnerInterviewInfo;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
@@ -235,7 +258,7 @@ public class PartnerInterviewServiceImpl implements PartnerInterviewService {
|
|
|
|
|
//记录日志
|
|
|
|
|
PartnerUserInfoVO operator = PartnerUserHolder.getUser();
|
|
|
|
|
ModifyInterviewTimeDTO log = ModifyInterviewTimeDTO.builder().mobile(operator.getMobile()).operateUserId(operator.getPartnerId()).operateUsername(operator.getUsername())
|
|
|
|
|
.operateTime(DateUtil.format(new Date(), CoolDateUtils.DATE_FORMAT_SEC))
|
|
|
|
|
.operateTime(DateUtil.format(new Date(), DATE_FORMAT_SEC))
|
|
|
|
|
.beforeInterviewTime(interviewInfo.getStartTime()).afterInterviewTime(request.getNewStartBookingTime()).build();
|
|
|
|
|
logService.recordPartnerBizLog(operator,interviewInfo.getPartnerLineId(), OperateTypeEnum.MODIFY_INTERVIEW_TIME,log);
|
|
|
|
|
}
|
|
|
|
|
@@ -343,7 +366,7 @@ public class PartnerInterviewServiceImpl implements PartnerInterviewService {
|
|
|
|
|
|
|
|
|
|
//记录日志
|
|
|
|
|
PartnerUserInfoVO operator = PartnerUserHolder.getUser();
|
|
|
|
|
LogBasicDTO log = LogBasicDTO.builder().mobile(operator.getMobile()).operateUserId(operator.getPartnerId()).operateUsername(operator.getUsername()).operateTime(DateUtil.format(new Date(), CoolDateUtils.DATE_FORMAT_SEC)).mobile(operator.getMobile()).build();
|
|
|
|
|
LogBasicDTO log = LogBasicDTO.builder().mobile(operator.getMobile()).operateUserId(operator.getPartnerId()).operateUsername(operator.getUsername()).operateTime(DateUtil.format(new Date(), DATE_FORMAT_SEC)).mobile(operator.getMobile()).build();
|
|
|
|
|
logService.recordPartnerBizLog(operator,interviewVO.getPartnerLineId(),OperateTypeEnum.INTERVIEW_APPOINTMENT,log);
|
|
|
|
|
|
|
|
|
|
return vo;
|
|
|
|
|
|