Merge branch 'cc_partner_init' of http://gitlab.coolcollege.cn/hangzhou/java/custom_xfsg into cc_partner_init
This commit is contained in:
@@ -88,4 +88,8 @@ public class LineInfoDAO {
|
||||
List<LineInfoDO> lineInfo = lineInfoMapper.lineList(lineListRequest,userId,wantShopAreaIds);
|
||||
return lineInfo;
|
||||
}
|
||||
|
||||
public void insertOrUpdate(LineInfoDO lineInfoParam){
|
||||
lineInfoMapper.insertOrUpdate(lineInfoParam);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,6 +51,16 @@
|
||||
<if test="entity.experienceStatus != null">#{entity.experienceStatus},</if>
|
||||
<if test="entity.abandonCause != null">#{entity.abandonCause},</if>
|
||||
</trim>
|
||||
ON DUPLICATE KEY UPDATE
|
||||
<trim suffixOverrides=",">
|
||||
<if test="entity.partnerId != null">partner_id = #{entity.partnerId},</if>
|
||||
<if test="entity.storeName != null">store_name = #{entity.storeName},</if>
|
||||
<if test="entity.storeId != null">store_id = #{entity.storeId},</if>
|
||||
<if test="entity.experienceStartTime != null">experience_start_time = #{entity.experienceStartTime},</if>
|
||||
<if test="entity.experienceEndTime != null">experience_end_time = #{entity.experienceEndTime},</if>
|
||||
<if test="entity.experienceStatus != null">experience_status = #{entity.experienceStatus},</if>
|
||||
<if test="entity.abandonCause != null">abandon_cause = #{entity.abandonCause},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateStatus">
|
||||
update
|
||||
|
||||
@@ -124,7 +124,7 @@ public class LineInfoDO {
|
||||
* 是否是加盟商:0.否 1.是
|
||||
*/
|
||||
@Column(name = "join_status")
|
||||
private Boolean joinStatus;
|
||||
private Integer joinStatus;
|
||||
|
||||
/**
|
||||
* 0.公海 1.私海 2黑名单
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2023/5/31 11:19
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
public class AddTagsRequest {
|
||||
|
||||
@ApiModelProperty("加盟申请线索ID")
|
||||
private Long lineId;
|
||||
@ApiModelProperty("标签列表")
|
||||
private List<Long> tags;
|
||||
}
|
||||
@@ -17,7 +17,7 @@ public class BaseInfoVO {
|
||||
private Long lineId;
|
||||
|
||||
@ApiModelProperty("partnerId")
|
||||
private Integer partnerId;
|
||||
private String partnerId;
|
||||
|
||||
@ApiModelProperty("线索名称")
|
||||
private String username;
|
||||
|
||||
@@ -8,6 +8,7 @@ import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
@@ -28,8 +29,18 @@ public class LineInfoVO {
|
||||
private String partnerId;
|
||||
|
||||
@Column(name = "region_id")
|
||||
@ApiModelProperty("战区Id")
|
||||
private Long regionId;
|
||||
|
||||
@ApiModelProperty("战区名称")
|
||||
private String regionName;
|
||||
|
||||
@ApiModelProperty("大区ID")
|
||||
private Long largeRegionId;
|
||||
|
||||
@ApiModelProperty("大区ID名称")
|
||||
private String largeRegionName;
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
@@ -54,6 +65,8 @@ public class LineInfoVO {
|
||||
@Column(name = "want_shop_area_id")
|
||||
@ApiModelProperty("意向开店区域")
|
||||
private Long wantShopAreaId;
|
||||
@ApiModelProperty("意向开店区域名称")
|
||||
private String wantShopAreaName;
|
||||
|
||||
/**
|
||||
* 居住地址
|
||||
@@ -111,13 +124,21 @@ public class LineInfoVO {
|
||||
@ApiModelProperty("线索来源")
|
||||
private Integer lineSource;
|
||||
|
||||
@ApiModelProperty("线索来源")
|
||||
private String lineSourceName;
|
||||
|
||||
/**
|
||||
* 招商经理
|
||||
*/
|
||||
@Column(name = "investment_manager")
|
||||
@ApiModelProperty("招商经理")
|
||||
private String investmentManager;
|
||||
|
||||
@ApiModelProperty("招商经理名称")
|
||||
private String investmentManagerName;
|
||||
|
||||
@ApiModelProperty("招商经理手机号")
|
||||
private String investmentManagerMobile;
|
||||
|
||||
/**
|
||||
* 拓展经理
|
||||
*/
|
||||
@@ -144,14 +165,14 @@ public class LineInfoVO {
|
||||
*/
|
||||
@Column(name = "user_portrait")
|
||||
@ApiModelProperty("用户画像")
|
||||
private String userPortrait;
|
||||
private List<LabelBaseInfoVO> userPortraitList;
|
||||
|
||||
/**
|
||||
* 是否是加盟商:0.否 1.是
|
||||
*/
|
||||
@Column(name = "join_status")
|
||||
@ApiModelProperty("0-线索 1-蓄水池 2-加盟商")
|
||||
private Boolean joinStatus;
|
||||
private Integer joinStatus;
|
||||
|
||||
/**
|
||||
* 0.公海 1.私海 2黑名单
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.cool.store.vo.oss;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: OssUploadConfigVO
|
||||
* @Description: oss 上传config
|
||||
* @date 2023-06-01 13:46
|
||||
*/
|
||||
@Data
|
||||
public class OssUploadConfigVO {
|
||||
|
||||
@ApiModelProperty("域名")
|
||||
private String accessKeyId;
|
||||
|
||||
@ApiModelProperty("策略 Base64编过")
|
||||
private String policy;
|
||||
|
||||
@ApiModelProperty("对Policy签名后的字符串")
|
||||
private String signature;
|
||||
|
||||
@ApiModelProperty("上传目录")
|
||||
private String dir;
|
||||
|
||||
@ApiModelProperty("域名")
|
||||
private String host;
|
||||
|
||||
@ApiModelProperty("上传策略Policy失效时间")
|
||||
private String expire;
|
||||
|
||||
@ApiModelProperty("cdn地址")
|
||||
private String cdnUrl;
|
||||
|
||||
public OssUploadConfigVO(String accessKeyId, String policy, String signature, String dir, String host, String expire, String cdnUrl) {
|
||||
this.accessKeyId = accessKeyId;
|
||||
this.policy = policy;
|
||||
this.signature = signature;
|
||||
this.dir = dir;
|
||||
this.host = host;
|
||||
this.expire = expire;
|
||||
this.cdnUrl = cdnUrl;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.request.AddTagsRequest;
|
||||
import com.cool.store.request.LineListRequest;
|
||||
import com.cool.store.vo.LineInfoVO;
|
||||
import com.cool.store.vo.LineListVO;
|
||||
@@ -31,4 +32,12 @@ public interface LineService {
|
||||
PageInfo<LineListVO> getLineList(LineListRequest lineListRequest, LoginUserInfo loginUserInfo,Boolean teamFlag);
|
||||
|
||||
|
||||
/**
|
||||
* 添加标签
|
||||
* @param userInfo
|
||||
* @param addTagsRequest
|
||||
* @return
|
||||
*/
|
||||
Boolean addTags(LoginUserInfo userInfo, AddTagsRequest addTagsRequest);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.vo.oss.OssUploadConfigVO;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2024/3/28 14:27
|
||||
* @Version 1.0
|
||||
*/
|
||||
public interface OSSService {
|
||||
/**
|
||||
* 上传文件
|
||||
* @return
|
||||
*/
|
||||
OssUploadConfigVO getUploadFileConfig();
|
||||
}
|
||||
@@ -55,7 +55,7 @@ public class IntentAgreementServiceImpl implements IntentAgreementService {
|
||||
if (Objects.isNull(lineInfoDO)){
|
||||
throw new ServiceException(ErrorCodeEnum.INTERVIEW_PARTNER_NOT_EXIST);
|
||||
}
|
||||
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_60.getCode());
|
||||
lineInfoDO.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_63.getCode());
|
||||
lineInfoMapper.updateByPrimaryKeySelective(lineInfoDO);
|
||||
return Boolean.TRUE;
|
||||
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import com.cool.store.dao.HyOpenAreaInfoDAO;
|
||||
import com.cool.store.dao.LineInfoDAO;
|
||||
import com.cool.store.entity.HyOpenAreaInfoDO;
|
||||
import com.cool.store.entity.LineInfoDO;
|
||||
import com.cool.store.entity.MemberQuestionDO;
|
||||
import com.cool.store.entity.PartnerBaseInfoDO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.WorkflowStageEnum;
|
||||
import com.cool.store.enums.WorkflowSubStageEnum;
|
||||
import com.cool.store.enums.WorkflowSubStageStatusEnum;
|
||||
import com.cool.store.enums.*;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mapper.HyOpenAreaInfoMapper;
|
||||
import com.cool.store.mapper.JoinIntentionMapper;
|
||||
@@ -39,7 +37,7 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
|
||||
JoinIntentionMapper joinIntentionMapper;
|
||||
|
||||
@Resource
|
||||
LineInfoMapper lineInfoMapper;
|
||||
LineInfoDAO lineInfoDAO;
|
||||
|
||||
@Resource
|
||||
HyOpenAreaInfoMapper openAreaInfoMapper;
|
||||
@@ -60,7 +58,7 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
|
||||
}
|
||||
//todo 目前写死为进入私海
|
||||
lineInfoParam.setLineStatus(1);
|
||||
lineInfoMapper.insertOrUpdate(lineInfoParam);
|
||||
lineInfoDAO.insertOrUpdate(lineInfoParam);
|
||||
|
||||
MemberQuestionDO memberQuestionDO = request.toMemberQuestionDO();
|
||||
memberQuestionDO.setLineId(lineInfoParam.getId());
|
||||
@@ -78,24 +76,31 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
|
||||
protected Boolean auditPass(Long auditId, LineInfoDO lineInfo) {
|
||||
WorkflowSubStageEnum workflowSubStageEnum = WorkflowSubStageEnum.getWorkflowSubStageEnum(lineInfo.getWorkflowSubStage());
|
||||
WorkflowSubStageEnum nextStage = workflowSubStageEnum.getNextStage();
|
||||
Integer nextStageInitStatus = nextStage.getInitStatus().getCode();
|
||||
return null;
|
||||
lineInfo.setWorkflowSubStage(nextStage.getCode());
|
||||
lineInfo.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.INVITING_INTERVIEWS_10.getCode());
|
||||
lineInfoDAO.updateLineInfo(lineInfo);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Boolean auditReject(Long auditId, LineInfoDO lineInfo) {
|
||||
return null;
|
||||
lineInfo.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.INTENT_7.getCode());
|
||||
lineInfoDAO.updateLineInfo(lineInfo);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected Boolean auditClose(Long auditId, LineInfoDO lineInfo) {
|
||||
return null;
|
||||
lineInfo.setLineStatus(LineStatusEnum.PUBLIC_SEAS.getCode());
|
||||
lineInfoDAO.updateLineInfo(lineInfo);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PartnerBaseInfoVO getByLineId(Long lineId) {
|
||||
MemberQuestionDO result = joinIntentionMapper.getByLineId(lineId);
|
||||
LineInfoDO byLineId = lineInfoMapper.getByLineId(lineId);
|
||||
LineInfoDO byLineId = lineInfoDAO.getLineInfo(lineId);
|
||||
if (Objects.isNull(result)) {
|
||||
throw new ServiceException(LINE_ID_IS_NOT_EXIST);
|
||||
}
|
||||
|
||||
@@ -1,32 +1,38 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.dao.EnterpriseUserDAO;
|
||||
import com.cool.store.dao.HyOpenAreaInfoDAO;
|
||||
import com.cool.store.dao.HyPartnerUserChannelDAO;
|
||||
import com.cool.store.dao.LineInfoDAO;
|
||||
import com.cool.store.dao.*;
|
||||
import com.cool.store.entity.EnterpriseUserDO;
|
||||
import com.cool.store.entity.HyOpenAreaInfoDO;
|
||||
import com.cool.store.entity.HyPartnerLabelDO;
|
||||
import com.cool.store.entity.LineInfoDO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.OperateTypeEnum;
|
||||
import com.cool.store.enums.WorkflowStageEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mapper.RegionMapper;
|
||||
import com.cool.store.request.AddTagsRequest;
|
||||
import com.cool.store.request.LineListRequest;
|
||||
import com.cool.store.service.DeskService;
|
||||
import com.cool.store.service.LineService;
|
||||
import com.cool.store.service.RegionService;
|
||||
import com.cool.store.utils.CoolDateUtils;
|
||||
import com.cool.store.utils.StringUtil;
|
||||
import com.cool.store.utils.poi.DateUtils;
|
||||
import com.cool.store.vo.BaseInfoVO;
|
||||
import com.cool.store.vo.LineInfoVO;
|
||||
import com.cool.store.vo.LineListVO;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -47,6 +53,10 @@ public class LineServiceImpl implements LineService {
|
||||
HyPartnerUserChannelDAO hyPartnerUserChannelDAO;
|
||||
@Resource
|
||||
EnterpriseUserDAO enterpriseUserDAO;
|
||||
@Resource
|
||||
RegionService regionService;
|
||||
@Resource
|
||||
RegionDao regionDao;
|
||||
|
||||
@Override
|
||||
public LineInfoVO getLineInfo(Long lineId) {
|
||||
@@ -56,6 +66,28 @@ public class LineServiceImpl implements LineService {
|
||||
if (lineInfo==null){
|
||||
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
|
||||
}
|
||||
if (lineInfo.getLineSource()!=null){
|
||||
Map<Integer, String> channelMapByIds = hyPartnerUserChannelDAO.getChannelMapByIds(Arrays.asList(lineInfo.getLineSource()));
|
||||
result.setLineSourceName(channelMapByIds.get(lineInfo.getLineSource()));
|
||||
}
|
||||
if (StringUtil.isNotEmpty(lineInfo.getInvestmentManager())){
|
||||
EnterpriseUserDO user = enterpriseUserDAO.getUserInfoById(lineInfo.getInvestmentManager());
|
||||
result.setInvestmentManagerName(user.getName());
|
||||
result.setInvestmentManagerMobile(user.getMobile());
|
||||
}
|
||||
if(lineInfo.getRegionId()!=null){
|
||||
Long bigRegionIdByAreaId = regionService.getBigRegionIdByAreaId(lineInfo.getWantShopAreaId());
|
||||
Map<Long, String> regionNameMap = regionDao.getRegionNameMap(Arrays.asList(bigRegionIdByAreaId, lineInfo.getRegionId()));
|
||||
result.setRegionId(lineInfo.getRegionId());
|
||||
result.setRegionName(regionNameMap.get(lineInfo.getRegionId()));
|
||||
result.setLargeRegionId(bigRegionIdByAreaId);
|
||||
result.setLargeRegionName(regionNameMap.get(bigRegionIdByAreaId));
|
||||
}
|
||||
Map<Long, HyPartnerLabelDO> userPortraitMap = deskService.getUserPortraitMap(Arrays.asList(lineInfo));
|
||||
Map<Long, String> wantShopAreaMap = hyOpenAreaInfoDAO.selectNameMapByIds(Arrays.asList(lineInfo.getWantShopAreaId()));
|
||||
BaseInfoVO baseInfoVO = deskService.convertToBaseInfoVO(lineInfo, userPortraitMap, wantShopAreaMap);
|
||||
result.setWantShopAreaName(baseInfoVO.getWantShopAreaName());
|
||||
result.setUserPortraitList(baseInfoVO.getUserPortraitList());
|
||||
BeanUtil.copyProperties(lineInfo,result);
|
||||
return result;
|
||||
}
|
||||
@@ -90,4 +122,18 @@ public class LineServiceImpl implements LineService {
|
||||
page.setList(result);
|
||||
return page;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean addTags(LoginUserInfo user, AddTagsRequest addTagsRequest) {
|
||||
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(addTagsRequest.getLineId());
|
||||
if (lineInfo==null){
|
||||
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
|
||||
}
|
||||
|
||||
lineInfo.setUserPortrait(CollectionUtils.isNotEmpty(addTagsRequest.getTags())?
|
||||
addTagsRequest.getTags().stream().map(Object::toString).collect(Collectors.joining(CommonConstants.COMMA, CommonConstants.COMMA, CommonConstants.COMMA)):"");
|
||||
lineInfoDAO.updateLineInfo(lineInfo);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import com.aliyun.oss.OSS;
|
||||
import com.aliyun.oss.OSSClientBuilder;
|
||||
import com.aliyun.oss.common.utils.BinaryUtil;
|
||||
import com.aliyun.oss.model.MatchMode;
|
||||
import com.aliyun.oss.model.PolicyConditions;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.OSSService;
|
||||
import com.cool.store.vo.oss.OssUploadConfigVO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2024/3/28 14:29
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class OSSServiceImpl implements OSSService {
|
||||
|
||||
@Value("${oss.accessKeyId:null}")
|
||||
private String accessKeyId;
|
||||
@Value("${oss.accessKeySecret:null}")
|
||||
private String accessKeySecret;
|
||||
@Value("${oss.endpoint:null}")
|
||||
private String endpoint;
|
||||
@Value("${oss.bucket:null}")
|
||||
private String bucket;
|
||||
@Value("${cdn.url:null}")
|
||||
private String cdnUrl;
|
||||
@Value("${oss.file.dir:null}")
|
||||
private String dir;
|
||||
|
||||
@Override
|
||||
public OssUploadConfigVO getUploadFileConfig() {
|
||||
// host的格式为 bucketname.endpoint
|
||||
String host = "https://" + bucket + "." + endpoint;
|
||||
OSS client = null;
|
||||
try {
|
||||
client = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);
|
||||
long expireTime = 300;
|
||||
long expireEndTime = System.currentTimeMillis() + expireTime * 1000;
|
||||
Date expiration = new Date(expireEndTime);
|
||||
PolicyConditions policyConds = new PolicyConditions();
|
||||
policyConds.addConditionItem(PolicyConditions.COND_CONTENT_LENGTH_RANGE, 0, 1048576000);
|
||||
policyConds.addConditionItem(MatchMode.StartWith, PolicyConditions.COND_KEY, dir);
|
||||
String postPolicy = client.generatePostPolicy(expiration, policyConds);
|
||||
byte[] binaryData = postPolicy.getBytes("utf-8");
|
||||
String encodedPolicy = BinaryUtil.toBase64String(binaryData);
|
||||
String signature = client.calculatePostSignature(postPolicy);
|
||||
OssUploadConfigVO result = new OssUploadConfigVO(accessKeyId, encodedPolicy, signature, dir, host, String.valueOf(expireEndTime / 1000), cdnUrl);
|
||||
return result;
|
||||
}catch (Exception e){
|
||||
log.info("exception", e);
|
||||
throw new ServiceException(ErrorCodeEnum.GET_INFO_ERROR);
|
||||
}finally {
|
||||
if(Objects.nonNull(client)){
|
||||
client.shutdown();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import com.cool.store.entity.LeaseBaseInfoDO;
|
||||
import com.cool.store.entity.LineInfoDO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.ExperienceStatusEnum;
|
||||
import com.cool.store.enums.WorkflowSubStageEnum;
|
||||
import com.cool.store.enums.WorkflowSubStageStatusEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mapper.LineInfoMapper;
|
||||
@@ -31,6 +32,7 @@ public class TrainingExperienceServiceImpl implements TrainingExperienceService
|
||||
LineInfoMapper lineInfoMapper;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean distribution(TrainingExperienceDistributionRequest request) {
|
||||
if (Objects.isNull(request)) {
|
||||
return Boolean.FALSE;
|
||||
@@ -38,7 +40,12 @@ public class TrainingExperienceServiceImpl implements TrainingExperienceService
|
||||
if (Objects.isNull(request.getLineId())) {
|
||||
throw new ServiceException(INTERVIEW_LINE_ID_IS_NULL);
|
||||
}
|
||||
trainingExperienceMapper.insert(request.toLeaseBaseInfoDO());
|
||||
LeaseBaseInfoDO leaseBaseInfoDO = request.toLeaseBaseInfoDO();
|
||||
trainingExperienceMapper.insert(leaseBaseInfoDO);
|
||||
LineInfoDO lineInfoDO = new LineInfoDO();
|
||||
lineInfoDO.setWorkflowSubStage(WorkflowSubStageEnum.SIGN_INTENT_AGREEMENT.getCode());
|
||||
lineInfoDO.setId(request.getLineId());
|
||||
lineInfoMapper.updateByPrimaryKey(lineInfoDO);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.cool.store.controller.webb;
|
||||
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.request.AddTagsRequest;
|
||||
import com.cool.store.request.LineListRequest;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.LineService;
|
||||
@@ -58,6 +59,12 @@ public class LineInfoController {
|
||||
return ResponseResult.success(lineService.getLineList(lineListRequest,user,Boolean.TRUE));
|
||||
}
|
||||
|
||||
@PostMapping(path = "/addTags")
|
||||
@ApiOperation("添加标签接口")
|
||||
public ResponseResult<Boolean> addTags(@RequestBody AddTagsRequest addTagsRequest){
|
||||
return ResponseResult.success(lineService.addTags(CurrentUserHolder.getUser(),addTagsRequest));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.cool.store.controller.webb;
|
||||
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.OSSService;
|
||||
import io.swagger.annotations.Api;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2024/3/28 14:25
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Api(tags ="PC OSS配置")
|
||||
@RestController
|
||||
@RequestMapping({"/pc/oss"})
|
||||
@Slf4j
|
||||
public class OssClientController {
|
||||
|
||||
@Resource
|
||||
OSSService ossService;
|
||||
|
||||
@GetMapping("/getUploadFileConfig")
|
||||
public ResponseResult getUploadFileConfig(){
|
||||
return ResponseResult.success(ossService.getUploadFileConfig());
|
||||
}
|
||||
}
|
||||
@@ -8,17 +8,22 @@ import com.cool.store.request.LineInterviewPageRequest;
|
||||
import com.cool.store.request.ModifyInterviewerRequest;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.LineInterviewService;
|
||||
import com.cool.store.vo.interview.AppointmentTimeVO;
|
||||
import com.cool.store.vo.interview.EnterInterviewVO;
|
||||
import com.cool.store.vo.interview.InterviewDetailVO;
|
||||
import com.cool.store.vo.interview.LineInterviewPageVO;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -36,6 +41,19 @@ public class PCLineInterviewController {
|
||||
@Resource
|
||||
private LineInterviewService lineInterviewService;
|
||||
|
||||
@ApiOperation("获取面试/面谈 预约时间")
|
||||
@GetMapping("/appointment/time")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "lineId", value = "线索id", required = true),
|
||||
@ApiImplicitParam(name = "interviewType", value = "面试类型:0面谈;1面试", required = true),
|
||||
@ApiImplicitParam(name = "appointmentDate", value = "预约日期 yyyy-MM-dd", required = true)
|
||||
})
|
||||
public ResponseResult<List<AppointmentTimeVO>> getAppointmentTime(@RequestParam("lineId")Long lineId,
|
||||
@RequestParam("interviewType")Integer interviewType,
|
||||
@RequestParam("appointmentDate") @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate appointmentDate) {
|
||||
return ResponseResult.success(lineInterviewService.getAppointmentTime(lineId, interviewType, appointmentDate));
|
||||
}
|
||||
|
||||
@ApiOperation("修改面审时间")
|
||||
@PostMapping("/appointment/time/modify")
|
||||
public ResponseResult<Boolean> modifyAppointmentTime(@RequestBody @Validated AppointmentTimeRequest request) {
|
||||
|
||||
@@ -23,7 +23,7 @@ public class PCTrainingExperienceController {
|
||||
@Resource
|
||||
TrainingExperienceService trainingExperienceService;
|
||||
|
||||
@ApiOperation("实训体验分配")
|
||||
@ApiOperation("实训体验分配或更新")
|
||||
@PostMapping("/distribution")
|
||||
public ResponseResult<Boolean> distribution(@RequestBody TrainingExperienceDistributionRequest request) {
|
||||
return ResponseResult.success(trainingExperienceService.distribution(request));
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.cool.store.controller.webc;
|
||||
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.OSSService;
|
||||
import io.swagger.annotations.Api;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2024/3/28 14:25
|
||||
* @Version 1.0
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags ="小程序OSS配置")
|
||||
@RequestMapping({"/mini/oss"})
|
||||
@Slf4j
|
||||
public class MiniOssClientController {
|
||||
|
||||
@Resource
|
||||
OSSService ossService;
|
||||
|
||||
@GetMapping("/getUploadFileConfig")
|
||||
public ResponseResult getUploadFileConfig(){
|
||||
return ResponseResult.success(ossService.getUploadFileConfig());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user