B端 部分接口
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package com.cool.store.Service;
|
||||
|
||||
import com.cool.store.request.LineRequest;
|
||||
import com.cool.store.vo.BlackListVO;
|
||||
import com.cool.store.vo.PartnerLineInfoAndBaseInfoVO;
|
||||
import com.cool.store.vo.PartnerLineInfoVO;
|
||||
import com.cool.store.vo.StageCountVO;
|
||||
@@ -63,5 +65,30 @@ public interface HyPartnerLineInfoService {
|
||||
Boolean allocationInvestmentManager(String userId, List<Long> lineIdList);
|
||||
|
||||
|
||||
/**
|
||||
* 黑名单列表
|
||||
* @param LineRequest LineRequest
|
||||
* @return
|
||||
*/
|
||||
PageInfo<BlackListVO> getBlackList(LineRequest LineRequest);
|
||||
|
||||
/**
|
||||
* 加入或者移除 黑名单
|
||||
* @param lineId
|
||||
* @param status
|
||||
* @param joinReason
|
||||
* @return
|
||||
*/
|
||||
Boolean joinBlackList( Long lineId, Integer status, String joinReason);
|
||||
|
||||
/**
|
||||
* 移除黑名单
|
||||
* @param lineId
|
||||
* @param status
|
||||
* @param removeReason
|
||||
* @return
|
||||
*/
|
||||
Boolean removeBlackList( Long lineId, Integer status, String removeReason);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -4,16 +4,20 @@ import cn.hutool.core.date.DateUtil;
|
||||
import com.cool.store.Service.HyPartnerLineInfoService;
|
||||
import com.cool.store.dao.HyPartnerLineInfoDAO;
|
||||
import com.cool.store.dao.HyPartnerUserInfoDAO;
|
||||
import com.cool.store.dto.partner.PartnerBlackListDTO;
|
||||
import com.cool.store.dto.partner.PartnerLineInfoAndBaseInfoDTO;
|
||||
import com.cool.store.dto.partner.StageCountDTO;
|
||||
import com.cool.store.entity.HyPartnerLineInfoDO;
|
||||
import com.cool.store.entity.HyPartnerUserInfoDO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.LineStatusEnum;
|
||||
import com.cool.store.enums.WorkflowStageEnum;
|
||||
import com.cool.store.enums.WorkflowStatusEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.request.LineRequest;
|
||||
import com.cool.store.utils.CoolDateUtils;
|
||||
import com.cool.store.utils.StringUtil;
|
||||
import com.cool.store.vo.BlackListVO;
|
||||
import com.cool.store.vo.PartnerLineInfoAndBaseInfoVO;
|
||||
import com.cool.store.vo.PartnerLineInfoVO;
|
||||
import com.cool.store.vo.StageCountVO;
|
||||
@@ -129,6 +133,82 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageInfo<BlackListVO> getBlackList(LineRequest LineRequest) {
|
||||
PageHelper.startPage(LineRequest.getPageNum(),LineRequest.getPageSize());
|
||||
PageInfo blackListDTOPageInfo = hyPartnerLineInfoDAO.getBlackList(LineRequest.getKeyWord(), LineRequest.getIntentArea(), LineRequest.getAcceptAdjustType());
|
||||
List<PartnerBlackListDTO> list = blackListDTOPageInfo.getList();
|
||||
List<BlackListVO> result = new ArrayList<>();
|
||||
list.stream().forEach(x->{
|
||||
BlackListVO blackListVO = convertPartnerBlackListDTOToVo(x);
|
||||
//todo su 员工名称手机号 手机号归属地
|
||||
result.add(blackListVO);
|
||||
});
|
||||
blackListDTOPageInfo.setList(result);
|
||||
return blackListDTOPageInfo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean joinBlackList(Long lineId, Integer status, String joinReason) {
|
||||
if (lineId==null){
|
||||
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||
}
|
||||
//加入黑名单 阶段回到第一步待提交状态
|
||||
HyPartnerLineInfoDO hyPartnerLineInfoDO = new HyPartnerLineInfoDO();
|
||||
hyPartnerLineInfoDO.setId(lineId);
|
||||
hyPartnerLineInfoDO.setLineStatus(status);
|
||||
hyPartnerLineInfoDO.setJoinBlackReason(joinReason);
|
||||
hyPartnerLineInfoDO.setWorkflowStage(WorkflowStageEnum.INTENT.getCode());
|
||||
hyPartnerLineInfoDO.setWorkflowStatus(WorkflowStatusEnum.INTENT_0.getCode());
|
||||
|
||||
hyPartnerLineInfoDAO.updateByPrimaryKeySelective(hyPartnerLineInfoDO);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean removeBlackList(Long lineId, Integer status, String removeReason) {
|
||||
//移除黑名单 黑名单线索置为删除状态 新增一条线索
|
||||
if (lineId==null){
|
||||
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||
}
|
||||
HyPartnerLineInfoDO hyPartnerLineInfoDO = new HyPartnerLineInfoDO();
|
||||
hyPartnerLineInfoDO.setId(lineId);
|
||||
hyPartnerLineInfoDO.setLineStatus(status);
|
||||
hyPartnerLineInfoDO.setRemoveBlackReason(removeReason);
|
||||
hyPartnerLineInfoDO.setDeleted(Boolean.TRUE);
|
||||
hyPartnerLineInfoDAO.updateByPrimaryKeySelective(hyPartnerLineInfoDO);
|
||||
|
||||
|
||||
HyPartnerLineInfoDO newHyPartnerLineInfoDO = new HyPartnerLineInfoDO();
|
||||
hyPartnerLineInfoDO.setPartnerId(hyPartnerLineInfoDO.getPartnerId());
|
||||
hyPartnerLineInfoDO.setWorkflowStage(WorkflowStageEnum.INTENT.getCode());
|
||||
hyPartnerLineInfoDO.setWorkflowStatus(WorkflowStatusEnum.INTENT_0.getCode());
|
||||
hyPartnerLineInfoDO.setLineStatus(0);
|
||||
hyPartnerLineInfoDAO.batchInsert(Arrays.asList(newHyPartnerLineInfoDO));
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* convertPartnerBlackListDTOToVo
|
||||
* @param partnerBlackListDTO
|
||||
* @return
|
||||
*/
|
||||
public BlackListVO convertPartnerBlackListDTOToVo(PartnerBlackListDTO partnerBlackListDTO){
|
||||
BlackListVO blackListVO = new BlackListVO();
|
||||
blackListVO.setId(partnerBlackListDTO.getLineId());
|
||||
blackListVO.setPartnerUserId(partnerBlackListDTO.getPartnerId());
|
||||
blackListVO.setPartnerUserName(partnerBlackListDTO.getPartnerUserName());
|
||||
blackListVO.setPartnerUserPhone(partnerBlackListDTO.getMobile());
|
||||
blackListVO.setCreateTime(partnerBlackListDTO.getCreateTime());
|
||||
blackListVO.setCloseTime(partnerBlackListDTO.getCloseTime());
|
||||
blackListVO.setJoinBlackReason(partnerBlackListDTO.getJoinBlackReason());
|
||||
blackListVO.setCloseUserId(partnerBlackListDTO.getCloseUserId());
|
||||
return blackListVO;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* convertPartnerLineInfoAndBaseInfoDTOToVo
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.cool.store.Service.DeskService;
|
||||
import com.cool.store.Service.HyPartnerIntentInfoService;
|
||||
import com.cool.store.Service.HyPartnerInterviewPlanService;
|
||||
import com.cool.store.Service.HyPartnerLineInfoService;
|
||||
import com.cool.store.enums.LineStatusEnum;
|
||||
import com.cool.store.request.*;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.vo.*;
|
||||
@@ -200,7 +201,7 @@ public class DeskController {
|
||||
@ApiOperation("黑名单列表")
|
||||
public ResponseResult<PageInfo<BlackListVO>> queryBlackList(@RequestBody LineRequest LineRequest){
|
||||
|
||||
return ResponseResult.success();
|
||||
return ResponseResult.success(hyPartnerLineInfoService.getBlackList(LineRequest));
|
||||
}
|
||||
|
||||
|
||||
@@ -208,16 +209,14 @@ public class DeskController {
|
||||
@ApiOperation("移出黑名单")
|
||||
public ResponseResult<Boolean> removeBlackList(@RequestBody LineBlackListRequest lineBlackListRequest){
|
||||
|
||||
|
||||
return ResponseResult.success();
|
||||
return ResponseResult.success(hyPartnerLineInfoService.removeBlackList(lineBlackListRequest.getLineId(), LineStatusEnum.PUBLIC_SEAS.getCode(),lineBlackListRequest.getCause()));
|
||||
}
|
||||
|
||||
@PostMapping(path = "/joinBlackList")
|
||||
@ApiOperation("加入黑名单")
|
||||
public ResponseResult<Boolean> joinBlackList(@RequestBody LineBlackListRequest lineBlackListRequest){
|
||||
|
||||
|
||||
return ResponseResult.success();
|
||||
return ResponseResult.success(hyPartnerLineInfoService.joinBlackList(lineBlackListRequest.getLineId(),LineStatusEnum.BLACKLIST.getCode(),lineBlackListRequest.getCause()));
|
||||
}
|
||||
|
||||
|
||||
@@ -244,15 +243,17 @@ public class DeskController {
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
@GetMapping(path = "/queryPartnerIntentApplyInfo")
|
||||
@ApiOperation("查看意向审核信息")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "lineId", value = "线索ID", required = false),
|
||||
})
|
||||
public ResponseResult<PartnerSummaryInfoVO> queryPartnerIntentApplyInfo(@RequestParam(value = "lineId",required = false)Long lineId){
|
||||
|
||||
return ResponseResult.success();
|
||||
}
|
||||
// TODO: 2023/6/13 添加根据线索查询店员接口列表接口
|
||||
// @GetMapping(path = "/queryPartnerIntentApplyInfo")
|
||||
// @ApiOperation("查看意向审核信息")
|
||||
// @ApiImplicitParams({
|
||||
// @ApiImplicitParam(name = "lineId", value = "线索ID", required = false),
|
||||
// })
|
||||
// public ResponseResult<PartnerSummaryInfoVO> queryPartnerIntentApplyInfo(@RequestParam(value = "lineId",required = false)Long lineId){
|
||||
//
|
||||
// return ResponseResult.success();
|
||||
// }
|
||||
|
||||
|
||||
|
||||
@@ -293,14 +294,12 @@ public class DeskController {
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@GetMapping(path = "/getZoneList")
|
||||
@ApiOperation("战区列表")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "type", value = "意向区域-intent 开发区域=dev", required = false),
|
||||
})
|
||||
public ResponseResult<List<OpenAreaVO>> getZoneList(@RequestParam(value = "type",required = false)String type,
|
||||
public ResponseResult<PageInfo<ZoneVO>> getZoneList(@RequestParam(value = "type",required = false)String type,
|
||||
@RequestParam(value = "pageNumber",required = false,defaultValue = "1")Integer pageNumber,
|
||||
@RequestParam(value = "pageSize",required = false,defaultValue = "10")Integer pageSize){
|
||||
return ResponseResult.success();
|
||||
@@ -312,7 +311,7 @@ public class DeskController {
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "type", value = "意向区域-intent 开发区域=dev", required = false),
|
||||
})
|
||||
public ResponseResult<List<OpenAreaVO>> deletedZoneList(@RequestParam(value = "id",required = false)Long id){
|
||||
public ResponseResult<Boolean> deletedZoneList(@RequestParam(value = "id",required = false)Long id){
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user