Merge remote-tracking branch 'origin/cc_20230520_partner' into cc_20230520_partner
This commit is contained in:
@@ -454,7 +454,7 @@
|
||||
</select>
|
||||
|
||||
<select id="selectInterviewIdByLineId" resultType="java.lang.Long">
|
||||
select id from hy_partner_interview_plan where partner_line_id = #{lineId}
|
||||
select id from hy_partner_interview_plan where partner_line_id = #{lineId} and deleted = '0'
|
||||
</select>
|
||||
|
||||
<!-- 查询用户基本信息 -->
|
||||
|
||||
@@ -34,11 +34,11 @@ public class PartnerLineBaseInfoVO {
|
||||
private String workflowStatus;
|
||||
|
||||
@ApiModelProperty("当前阶段截止时间")
|
||||
@JsonFormat(pattern = "yyyy.MM.dd HH:mm", timezone = "GMT+8")
|
||||
@JsonFormat(pattern = "yyyy.MM.dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date deadline;
|
||||
|
||||
@ApiModelProperty("结束跟进时间 冷静期使用 计算15天还剩多少天")
|
||||
@JsonFormat(pattern = "yyyy.MM.dd HH:mm", timezone = "GMT+8")
|
||||
@JsonFormat(pattern = "yyyy.MM.dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date closeTime;
|
||||
|
||||
@ApiModelProperty("冷静期首次登录标识 true-是首次")
|
||||
|
||||
@@ -45,7 +45,7 @@ public interface HyPartnerIntentInfoService {
|
||||
|
||||
String submitWantShopInfo(PartnerWantShopInfoRequest request);
|
||||
|
||||
String submitIndustryCognitionInfo(IndustryCognitionInfoRequest request);
|
||||
Boolean submitIndustryCognitionInfo(IndustryCognitionInfoRequest request);
|
||||
|
||||
PartnerIntentInfoVO queryPartnerIntentInfo(PartnerUserInfoVO userInfoVO, Long lineId);
|
||||
|
||||
|
||||
@@ -195,7 +195,7 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic
|
||||
}
|
||||
|
||||
@Override
|
||||
public String submitIndustryCognitionInfo(IndustryCognitionInfoRequest request) {
|
||||
public Boolean submitIndustryCognitionInfo(IndustryCognitionInfoRequest request) {
|
||||
log.info("HyPartnerClerkServiceImpl#submitPartnerIntentInfo request:{}", JSONObject.toJSONString(request));
|
||||
if (StringUtil.isBlank(request.getPartnerId()) || Objects.isNull(request.getPartnerLineId())){
|
||||
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||
@@ -204,7 +204,7 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic
|
||||
if(!request.getSubmitFlag()){
|
||||
// 自动保存时
|
||||
redisUtilPool.setString(cacheKey, JSONObject.toJSONString(request), RedisConstant.ONE_DAY_SECONDS);
|
||||
return "";
|
||||
return true;
|
||||
}
|
||||
HyPartnerIntentInfoDO intentInfoDO = hyPartnerIntentInfoDAO.getByPartnerIdAndLineId(request.getPartnerId(), request.getPartnerLineId());
|
||||
if(intentInfoDO == null){
|
||||
@@ -216,7 +216,7 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic
|
||||
hyPartnerIntentInfoDAO.updateByPrimaryKeySelective(intentInfoDO);
|
||||
}
|
||||
redisUtilPool.delKey(cacheKey);
|
||||
return null;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -24,6 +24,7 @@ import com.cool.store.vo.*;
|
||||
import com.cool.store.vo.interview.InterviewVO;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -41,6 +42,7 @@ import java.util.stream.Collectors;
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
||||
|
||||
@Resource
|
||||
@@ -566,8 +568,10 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
||||
public Long checkGenerateNewLineId(Long lineId) {
|
||||
HyPartnerLineInfoDO hyPartnerLineInfoDO = hyPartnerLineInfoDAO.selectByPrimaryKeySelective(lineId);
|
||||
// 15天之后可以继续填写意向信息,把之前的线索删除
|
||||
log.info("截止时间:{},截止时间:{}", DateUtil.offsetSecond(hyPartnerLineInfoDO.getDeadline(), -3), new Date());
|
||||
log.info("比较:{}", DateUtil.offsetSecond(hyPartnerLineInfoDO.getDeadline(), -3).before(new Date()));
|
||||
if(hyPartnerLineInfoDO != null && hyPartnerLineInfoDO.getDeadline() != null &&
|
||||
hyPartnerLineInfoDO.getDeadline().before(new Date())){
|
||||
DateUtil.offsetSecond(hyPartnerLineInfoDO.getDeadline(), -3).before(new Date())){
|
||||
//将老的线索置为删除状态
|
||||
hyPartnerLineInfoDAO.batchDeleted(Collections.singletonList(hyPartnerLineInfoDO.getId()));
|
||||
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByPartnerId(hyPartnerLineInfoDO.getPartnerId());
|
||||
|
||||
@@ -27,7 +27,7 @@ public class CorsFilter implements Filter {
|
||||
response.setHeader("Access-Control-Allow-Credentials", "true");
|
||||
response.setHeader("Access-Control-Allow-Methods", "POST, OPTIONS, GET, DELETE, PUT");
|
||||
response.setHeader("Access-Control-Max-Age", "36000");
|
||||
response.setHeader("Access-Control-Allow-Headers", "x-requested-with, Origin, Authorization, content-type, XMLHttpRequest, Authorization, User-Agent, Cookie, accessToken");
|
||||
response.setHeader("Access-Control-Allow-Headers", "*");
|
||||
if (reqs.getMethod().equals("OPTIONS") || reqs.getMethod().equals("HEAD")) {
|
||||
response.setStatus(HttpStatus.HTTP_OK);
|
||||
return;
|
||||
|
||||
@@ -118,7 +118,7 @@ public class PartnerController {
|
||||
|
||||
@PostMapping(path = "/submitIndustryCognitionInfo")
|
||||
@ApiOperation("提意向书行业认知")
|
||||
public ResponseResult<String> submitIndustryCognitionInfo(@RequestBody IndustryCognitionInfoRequest request){
|
||||
public ResponseResult<Boolean> submitIndustryCognitionInfo(@RequestBody IndustryCognitionInfoRequest request){
|
||||
return ResponseResult.success(hyPartnerIntentInfoService.submitIndustryCognitionInfo(request));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user