Merge remote-tracking branch 'origin/cc_partner_init' into cc_partner_init
This commit is contained in:
@@ -24,7 +24,6 @@ public enum WorkflowSubStageStatusEnum {
|
|||||||
FIRST_INTERVIEWS_40(40,"一审未通过"),
|
FIRST_INTERVIEWS_40(40,"一审未通过"),
|
||||||
FIRST_INTERVIEWS_42(42,"一审重新预约"),
|
FIRST_INTERVIEWS_42(42,"一审重新预约"),
|
||||||
|
|
||||||
|
|
||||||
//缴纳意向金
|
//缴纳意向金
|
||||||
PAY_DEPOSIT_45(45,"待缴费"),
|
PAY_DEPOSIT_45(45,"待缴费"),
|
||||||
PAY_DEPOSIT_50(50,"已缴费"),
|
PAY_DEPOSIT_50(50,"已缴费"),
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package com.cool.store.request;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2024/4/7 10:39
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class AddLineRequest {
|
||||||
|
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
private String mobile;
|
||||||
|
|
||||||
|
private Long wantShopAreaId;
|
||||||
|
|
||||||
|
private String investmentManagerUserId;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -72,4 +72,11 @@ public interface LineService {
|
|||||||
*/
|
*/
|
||||||
IntendProcessTotalVO getIntendProcessTotal(Long lineId);
|
IntendProcessTotalVO getIntendProcessTotal(Long lineId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加线索
|
||||||
|
* @param addLineRequest
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean addLine(AddLineRequest addLineRequest) ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import com.cool.store.request.*;
|
|||||||
import com.cool.store.service.*;
|
import com.cool.store.service.*;
|
||||||
import com.cool.store.utils.CoolDateUtils;
|
import com.cool.store.utils.CoolDateUtils;
|
||||||
import com.cool.store.utils.StringUtil;
|
import com.cool.store.utils.StringUtil;
|
||||||
|
import com.cool.store.utils.UUIDUtils;
|
||||||
import com.cool.store.utils.poi.DateUtils;
|
import com.cool.store.utils.poi.DateUtils;
|
||||||
import com.cool.store.vo.*;
|
import com.cool.store.vo.*;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
@@ -38,6 +39,10 @@ public class LineServiceImpl implements LineService {
|
|||||||
@Resource
|
@Resource
|
||||||
LineInfoDAO lineInfoDAO;
|
LineInfoDAO lineInfoDAO;
|
||||||
@Resource
|
@Resource
|
||||||
|
HyPartnerUserInfoDAO hyPartnerUserInfoDAO;
|
||||||
|
@Resource
|
||||||
|
private RegionAreaConfigDao regionAreaConfigDao;
|
||||||
|
@Resource
|
||||||
HyOpenAreaInfoDAO hyOpenAreaInfoDAO;
|
HyOpenAreaInfoDAO hyOpenAreaInfoDAO;
|
||||||
@Resource
|
@Resource
|
||||||
DeskService deskService;
|
DeskService deskService;
|
||||||
@@ -349,6 +354,44 @@ public class LineServiceImpl implements LineService {
|
|||||||
return intendProcessTotalVO;
|
return intendProcessTotalVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean addLine(AddLineRequest addLineRequest) {
|
||||||
|
//必填参数
|
||||||
|
if (!StringUtil.isNoneBlank(addLineRequest.getMobile(),addLineRequest.getUserName())){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
|
}
|
||||||
|
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByMobile(addLineRequest.getMobile());
|
||||||
|
if (hyPartnerUserInfoDO!=null){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.MOBILE_EXIST);
|
||||||
|
}
|
||||||
|
hyPartnerUserInfoDO = new HyPartnerUserInfoDO();
|
||||||
|
hyPartnerUserInfoDO.setMobile(addLineRequest.getMobile());
|
||||||
|
hyPartnerUserInfoDO.setPartnerId(UUIDUtils.get32UUID());
|
||||||
|
hyPartnerUserInfoDAO.insertSelective(hyPartnerUserInfoDO);
|
||||||
|
LineInfoDO lineInfoDO = new LineInfoDO();
|
||||||
|
lineInfoDO.setLineStatus(LineStatusEnum.PRIVATE_SEAS.getCode());
|
||||||
|
lineInfoDO.setWorkflowSubStage(WorkflowSubStageEnum.INTEND.getCode());
|
||||||
|
lineInfoDO.setMobile(addLineRequest.getMobile());
|
||||||
|
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.INTENT_0.getCode());
|
||||||
|
lineInfoDO.setWantShopAreaId(addLineRequest.getWantShopAreaId());
|
||||||
|
lineInfoDO.setUsername(addLineRequest.getUserName());
|
||||||
|
lineInfoDO.setPartnerId(hyPartnerUserInfoDO.getPartnerId());
|
||||||
|
String userId = null;
|
||||||
|
if (addLineRequest.getInvestmentManagerUserId()!=null){
|
||||||
|
userId = addLineRequest.getInvestmentManagerUserId();
|
||||||
|
}else {
|
||||||
|
EnterpriseUserDO user = userAuthMappingService.getUserByRoleNameAndAreaId(UserRoleEnum.INVESTMENT_MANAGER.getDesc(), addLineRequest.getWantShopAreaId());
|
||||||
|
userId = user.getUserId();
|
||||||
|
}
|
||||||
|
Long regionId = regionAreaConfigDao.getByWantShopAreaId(addLineRequest.getWantShopAreaId());
|
||||||
|
lineInfoDO.setRegionId(regionId);
|
||||||
|
lineInfoDO.setInvestmentManager(userId);
|
||||||
|
lineInfoDAO.insertOrUpdate(lineInfoDO);
|
||||||
|
return Boolean.TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 计算预期时间
|
* 计算预期时间
|
||||||
* @param startTime
|
* @param startTime
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ import io.swagger.annotations.ApiImplicitParam;
|
|||||||
import io.swagger.annotations.ApiImplicitParams;
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
@@ -124,7 +123,6 @@ public class LineInfoController {
|
|||||||
return ResponseResult.success(linePayService.getLinePayInfo(lineId));
|
return ResponseResult.success(linePayService.getLinePayInfo(lineId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation("线索流程进度")
|
@ApiOperation("线索流程进度")
|
||||||
@GetMapping("/getIntendProcess")
|
@GetMapping("/getIntendProcess")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@@ -134,5 +132,10 @@ public class LineInfoController {
|
|||||||
return ResponseResult.success(lineService.getIntendProcessTotal(lineId));
|
return ResponseResult.success(lineService.getIntendProcessTotal(lineId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("新建线索")
|
||||||
|
@PostMapping("/addLine")
|
||||||
|
public ResponseResult<Boolean> addLine(@RequestBody AddLineRequest addLineRequest) {
|
||||||
|
return ResponseResult.success(lineService.addLine(addLineRequest));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user