fix
This commit is contained in:
@@ -3,6 +3,8 @@ package com.cool.store.dao;
|
|||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.aliyun.openservices.shade.org.apache.commons.lang3.StringUtils;
|
import com.aliyun.openservices.shade.org.apache.commons.lang3.StringUtils;
|
||||||
import com.cool.store.entity.LineCalendarsEventDO;
|
import com.cool.store.entity.LineCalendarsEventDO;
|
||||||
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
|
import com.cool.store.exception.ServiceException;
|
||||||
import com.cool.store.mapper.LineCalendarsEventMapper;
|
import com.cool.store.mapper.LineCalendarsEventMapper;
|
||||||
import com.cool.store.utils.StringUtil;
|
import com.cool.store.utils.StringUtil;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -59,8 +61,9 @@ public class LineCalendarsEventDAO {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Long addCalendarsEvent(LineCalendarsEventDO param){
|
public Long addCalendarsEvent(LineCalendarsEventDO param){
|
||||||
if(Objects.nonNull(param.getRegionId()) || Objects.nonNull(param.getLineId()) || Objects.nonNull(param.getPartnerId()) || Objects.nonNull(param.getStartTime()) || Objects.nonNull(param.getEndTime())){
|
if(Objects.isNull(param.getRegionId()) || Objects.isNull(param.getLineId()) || Objects.isNull(param.getPartnerId()) || Objects.isNull(param.getStartTime()) || Objects.isNull(param.getEndTime())){
|
||||||
log.error("新增日历事件失败:{}",JSONObject.toJSONString(param));
|
log.error("新增日历事件失败:{}",JSONObject.toJSONString(param));
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
}
|
}
|
||||||
lineCalendarsEventMapper.insertSelective(param);
|
lineCalendarsEventMapper.insertSelective(param);
|
||||||
return param.getId();
|
return param.getId();
|
||||||
|
|||||||
@@ -101,7 +101,7 @@
|
|||||||
select
|
select
|
||||||
<include refid="allColumn"/>
|
<include refid="allColumn"/>
|
||||||
from xfsg_point_info
|
from xfsg_point_info
|
||||||
where deleted = 0 and point_status in (4,5) and development_manager = #{request.developmentManager}
|
where deleted = 0 and point_status in (4,5) and development_manager = #{request.developmentManager}
|
||||||
<if test="request.pointStatus != null and request.pointStatus != ''">
|
<if test="request.pointStatus != null and request.pointStatus != ''">
|
||||||
and point_status = #{request.pointStatus}
|
and point_status = #{request.pointStatus}
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import javax.validation.constraints.NotNull;
|
|||||||
@Data
|
@Data
|
||||||
public class AppointmentTimeRequest {
|
public class AppointmentTimeRequest {
|
||||||
|
|
||||||
|
@NotNull
|
||||||
@ApiModelProperty("线索id")
|
@ApiModelProperty("线索id")
|
||||||
private Long lineId;
|
private Long lineId;
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import java.util.stream.Collectors;
|
|||||||
* @date 2024-04-08 16:50
|
* @date 2024-04-08 16:50
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class RecommendPointRequest {
|
public class LineRecommendPointRequest {
|
||||||
|
|
||||||
@ApiModelProperty("线索id")
|
@ApiModelProperty("线索id")
|
||||||
private Long lineId;
|
private Long lineId;
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
package com.cool.store.request;
|
||||||
|
|
||||||
|
import com.cool.store.entity.PointRecommendDO;
|
||||||
|
import com.cool.store.enums.point.PointRecommendStatus;
|
||||||
|
import com.google.common.collect.Lists;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zhangchenbiao
|
||||||
|
* @FileName: RecommendPointRequest
|
||||||
|
* @Description:
|
||||||
|
* @date 2024-04-08 16:50
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PointRecommendLineRequest {
|
||||||
|
|
||||||
|
@ApiModelProperty("线索ids")
|
||||||
|
private List<Long> lineIds;
|
||||||
|
|
||||||
|
@ApiModelProperty("铺位id")
|
||||||
|
private Long pointId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "拓展经理", hidden = true)
|
||||||
|
private String developmentManager;
|
||||||
|
|
||||||
|
public List<PointRecommendDO> convertList(){
|
||||||
|
if(Objects.isNull(this.lineIds) || CollectionUtils.isEmpty(this.lineIds) || Objects.isNull(pointId)){
|
||||||
|
return Lists.newArrayList();
|
||||||
|
}
|
||||||
|
return this.lineIds.stream().map(lineId -> {
|
||||||
|
PointRecommendDO pointRecommendDO = new PointRecommendDO();
|
||||||
|
pointRecommendDO.setLineId(lineId);
|
||||||
|
pointRecommendDO.setDevelopmentManager(this.developmentManager);
|
||||||
|
pointRecommendDO.setPointId(pointId);
|
||||||
|
pointRecommendDO.setStatus(PointRecommendStatus.POINT_RECOMMEND_STATUS_1.getCode());
|
||||||
|
return pointRecommendDO;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -159,11 +159,18 @@ public interface ShopPointService {
|
|||||||
PageInfo<PointPageVO> getRecommendPointList(RecommendPointPageRequest request);
|
PageInfo<PointPageVO> getRecommendPointList(RecommendPointPageRequest request);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 推送铺位
|
* 加盟商推荐铺位
|
||||||
* @param request
|
* @param request
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Integer recommendPoint(RecommendPointRequest request);
|
Integer lineRecommendPoint(LineRecommendPointRequest request);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 铺位推荐加盟商
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Integer pointRecommendLine(PointRecommendLineRequest request);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 选址人员转让加盟商
|
* 选址人员转让加盟商
|
||||||
|
|||||||
@@ -267,10 +267,10 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
|
|||||||
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
|
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
|
||||||
}
|
}
|
||||||
Integer joinInterviewStatus = JoinInterviewStatusEnum.getJoinInterviewStatus(interviewInfo.getJoinInterviewStatus(), userType);
|
Integer joinInterviewStatus = JoinInterviewStatusEnum.getJoinInterviewStatus(interviewInfo.getJoinInterviewStatus(), userType);
|
||||||
if(!joinInterviewStatus.equals(interviewInfo.getJoinInterviewStatus()) && JoinInterviewStatusEnum.JOIN.getCode().equals(joinInterviewStatus)){
|
if(Objects.isNull(interviewInfo.getActualStartTime())){
|
||||||
interviewInfo.setActualStartTime(new Date());
|
interviewInfo.setActualStartTime(new Date());
|
||||||
interviewInfo.setRoomStatus(RoomStatus.OPEN.getCode());
|
|
||||||
}
|
}
|
||||||
|
interviewInfo.setRoomStatus(RoomStatus.OPEN.getCode());
|
||||||
interviewInfo.setJoinInterviewStatus(joinInterviewStatus);
|
interviewInfo.setJoinInterviewStatus(joinInterviewStatus);
|
||||||
lineInterviewDAO.updateInterviewInfo(interviewInfo);
|
lineInterviewDAO.updateInterviewInfo(interviewInfo);
|
||||||
String userSig = TRTCUtils.genUserSig(sdkAppId, key, interviewUserId);
|
String userSig = TRTCUtils.genUserSig(sdkAppId, key, interviewUserId);
|
||||||
@@ -395,6 +395,8 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
|
|||||||
String developmentManager = Optional.ofNullable(enterpriseUser).map(EnterpriseUserDO::getUserId).orElse(null);
|
String developmentManager = Optional.ofNullable(enterpriseUser).map(EnterpriseUserDO::getUserId).orElse(null);
|
||||||
updateLine.setDevelopmentManager(developmentManager);
|
updateLine.setDevelopmentManager(developmentManager);
|
||||||
lineInfoDAO.updateLineInfo(updateLine);
|
lineInfoDAO.updateLineInfo(updateLine);
|
||||||
|
//初始化店铺
|
||||||
|
|
||||||
}
|
}
|
||||||
return lineInterviewDAO.updateInterviewInfo(updateInterviewInfo) > 0;
|
return lineInterviewDAO.updateInterviewInfo(updateInterviewInfo) > 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ package com.cool.store.service.impl;
|
|||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.cool.store.constants.CommonConstants;
|
import com.cool.store.constants.CommonConstants;
|
||||||
import com.cool.store.dao.*;
|
import com.cool.store.dao.*;
|
||||||
import com.cool.store.dto.interview.LineInterviewPageDTO;
|
|
||||||
import com.cool.store.dto.point.AuditNodeDTO;
|
import com.cool.store.dto.point.AuditNodeDTO;
|
||||||
import com.cool.store.entity.*;
|
import com.cool.store.entity.*;
|
||||||
import com.cool.store.enums.AuditStatusEnum;
|
import com.cool.store.enums.AuditStatusEnum;
|
||||||
@@ -306,8 +305,7 @@ public class ShopPointServiceImpl implements ShopPointService {
|
|||||||
updatePoint.setPointStatus(PointStatusEnum.POINT_STATUS_4.getCode());
|
updatePoint.setPointStatus(PointStatusEnum.POINT_STATUS_4.getCode());
|
||||||
}else{
|
}else{
|
||||||
//没有下一节点 审批通过
|
//没有下一节点 审批通过
|
||||||
Integer pointStatus = SelectStatusEnum.SELECT_STATUS_1.getCode().equals(pointInfo.getSelectStatus()) ? PointStatusEnum.POINT_STATUS_6.getCode() : PointStatusEnum.POINT_STATUS_5.getCode();
|
updatePoint.setPointStatus(PointStatusEnum.POINT_STATUS_5.getCode());
|
||||||
updatePoint.setPointStatus(pointStatus);
|
|
||||||
}
|
}
|
||||||
return pointInfoDAO.updatePointInfo(updatePoint);
|
return pointInfoDAO.updatePointInfo(updatePoint);
|
||||||
}
|
}
|
||||||
@@ -362,8 +360,7 @@ public class ShopPointServiceImpl implements ShopPointService {
|
|||||||
}
|
}
|
||||||
PointInfoDO pointInfoUpdate = new PointInfoDO();
|
PointInfoDO pointInfoUpdate = new PointInfoDO();
|
||||||
pointInfoUpdate.setId(pointId);
|
pointInfoUpdate.setId(pointId);
|
||||||
Integer pointStatus = SelectStatusEnum.SELECT_STATUS_1.getCode().equals(pointInfo.getSelectStatus()) ? PointStatusEnum.POINT_STATUS_6.getCode() : PointStatusEnum.POINT_STATUS_5.getCode();
|
pointInfoUpdate.setPointStatus(PointStatusEnum.POINT_STATUS_5.getCode());
|
||||||
pointInfoUpdate.setPointStatus(pointStatus);
|
|
||||||
return pointInfoDAO.updatePointInfo(pointInfoUpdate);
|
return pointInfoDAO.updatePointInfo(pointInfoUpdate);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -462,7 +459,13 @@ public class ShopPointServiceImpl implements ShopPointService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer recommendPoint(RecommendPointRequest request) {
|
public Integer lineRecommendPoint(LineRecommendPointRequest request) {
|
||||||
|
List<PointRecommendDO> recommendList = request.convertList();
|
||||||
|
return pointRecommendDAO.addRecommendPoint(recommendList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer pointRecommendLine(PointRecommendLineRequest request) {
|
||||||
List<PointRecommendDO> recommendList = request.convertList();
|
List<PointRecommendDO> recommendList = request.convertList();
|
||||||
return pointRecommendDAO.addRecommendPoint(recommendList);
|
return pointRecommendDAO.addRecommendPoint(recommendList);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -152,11 +152,18 @@ public class ShopPointController {
|
|||||||
return ResponseResult.success(shopPointService.getRecommendPointList(request));
|
return ResponseResult.success(shopPointService.getRecommendPointList(request));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("铺位推送")
|
@ApiOperation("加盟商详情推送铺位")
|
||||||
@PostMapping("/recommendPoint")
|
@PostMapping("/lineRecommendPoint")
|
||||||
public ResponseResult<Integer> recommendPoint(@RequestBody @Validated RecommendPointRequest request) {
|
public ResponseResult<Integer> lineRecommendPoint(@RequestBody @Validated LineRecommendPointRequest request) {
|
||||||
request.setDevelopmentManager(CurrentUserHolder.getUserId());
|
request.setDevelopmentManager(CurrentUserHolder.getUserId());
|
||||||
return ResponseResult.success(shopPointService.recommendPoint(request));
|
return ResponseResult.success(shopPointService.lineRecommendPoint(request));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("铺位详情推送加盟商")
|
||||||
|
@PostMapping("/pointRecommendLine")
|
||||||
|
public ResponseResult<Integer> pointRecommendLine(@RequestBody @Validated PointRecommendLineRequest request) {
|
||||||
|
request.setDevelopmentManager(CurrentUserHolder.getUserId());
|
||||||
|
return ResponseResult.success(shopPointService.pointRecommendLine(request));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("选址人员转让加盟商")
|
@ApiOperation("选址人员转让加盟商")
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ public class LineInterviewController {
|
|||||||
@GetMapping("/appointment/time")
|
@GetMapping("/appointment/time")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = "lineId", value = "线索id", required = true),
|
@ApiImplicitParam(name = "lineId", value = "线索id", required = true),
|
||||||
@ApiImplicitParam(name = "interviewType", value = "面试类型:0面谈;1面试", required = true),
|
@ApiImplicitParam(name = "interviewType", value = "面试类型:0面谈;1一审;2二审", required = true),
|
||||||
@ApiImplicitParam(name = "appointmentDate", value = "预约日期 yyyy-MM-dd", required = true)
|
@ApiImplicitParam(name = "appointmentDate", value = "预约日期 yyyy-MM-dd", required = true)
|
||||||
})
|
})
|
||||||
public ResponseResult<List<AppointmentTimeVO>> getAppointmentTime(@RequestParam("lineId")Long lineId,
|
public ResponseResult<List<AppointmentTimeVO>> getAppointmentTime(@RequestParam("lineId")Long lineId,
|
||||||
|
|||||||
Reference in New Issue
Block a user