Merge remote-tracking branch 'origin/cc_20230520_partner' into cc_20230520_partner
# Conflicts: # coolstore-partner-webc/src/main/java/com/cool/store/controller/PartnerController.java
This commit is contained in:
@@ -114,4 +114,8 @@ public class CommonConstants {
|
||||
public static final String FOLLOW = "follow";
|
||||
public static final String PENDING = "pending";
|
||||
|
||||
public static final String ALLOCATION = "allocation";
|
||||
|
||||
public static final String TRANSFER = "transfer";
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.cool.store.enums;
|
||||
|
||||
/**
|
||||
* 动态栏目枚举类
|
||||
*/
|
||||
public enum ContentSubjectEnum {
|
||||
HY_CULTURE("沪姨文化"),
|
||||
PARTNER_SAYS("加盟商说"),
|
||||
BRAND_NEWS("品牌动态")
|
||||
;
|
||||
|
||||
private String subjectName;
|
||||
|
||||
ContentSubjectEnum(String subjectName) {
|
||||
this.subjectName = subjectName;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.cool.store.enums;
|
||||
|
||||
/**
|
||||
* 动态类型(图文/视频)
|
||||
*/
|
||||
public enum ContentTypeEnum {
|
||||
VIDEO("视频"),
|
||||
IMAGE("图文")
|
||||
;
|
||||
|
||||
private String type;
|
||||
|
||||
ContentTypeEnum(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
}
|
||||
@@ -54,6 +54,8 @@ public enum ErrorCodeEnum {
|
||||
WORK_FLOW_STAGE_PASS_ERROR(500002, "通过错误,非对应阶段!", null),
|
||||
PARTNER_USER_NOT_EXIST(500003, "加盟商用户信息不存在!", null),
|
||||
ZONE_NOT_EXIST(500004, "战区不存在!", null),
|
||||
PARTNER_BASEINFO_NOT_EXIST(500005, "基本信息不存在!", null),
|
||||
INTENT_INFO_NOT_EXIST(500006, "意向信息不存在!", null),
|
||||
|
||||
INTERVIEW_ENTER_FAIL(1021101, "进入面试间失败", null),
|
||||
|
||||
|
||||
@@ -94,10 +94,11 @@ public class PDFUtils {
|
||||
* @param color 字体颜色
|
||||
*/
|
||||
private static void addContent(PdfReader reader, OutputStream outputStream, String content, float x, float y, BaseFont baseFont, float fontSize, int fontStyle, Color color) {
|
||||
PdfStamper stamper = null;
|
||||
try {
|
||||
//生成 paragraph 并放在正确位置
|
||||
//抠模板
|
||||
PdfStamper stamper = new PdfStamper(reader, outputStream);
|
||||
stamper = new PdfStamper(reader, outputStream);
|
||||
PdfContentByte over = stamper.getOverContent(1);
|
||||
Font font = new Font(baseFont, fontSize, fontStyle, color);
|
||||
Paragraph insertContent = new Paragraph(content, font);
|
||||
@@ -110,6 +111,14 @@ public class PDFUtils {
|
||||
stamper.close();
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
} finally {
|
||||
try {
|
||||
if (stamper != null) {
|
||||
stamper.close();
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
throw new RuntimeException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -22,19 +22,16 @@ public class PassLetterUtils {
|
||||
* 返回通过函编码
|
||||
* @param partnerName 加盟商姓名
|
||||
* @param verifyCity 审批城市
|
||||
* @param passCode 通过函编码
|
||||
* @param passTime 审批通过时间
|
||||
*/
|
||||
public static String genPassLetter(String partnerName, String passCode, String verifyCity, DateTime passTime) {
|
||||
String randomNum = RandomUtil.randomNumbers(5);
|
||||
if (ObjectUtil.isEmpty(passCode)) {
|
||||
passCode = "HSAY" + DateUtil.format(passTime, "yyMMdd") + "-" + randomNum;
|
||||
}
|
||||
public static ByteArrayOutputStream genPassLetter(String partnerName, String passCode, String verifyCity, DateTime passTime) {
|
||||
String passTimeStr = DateUtil.format(passTime, "yyyy年MM月dd日");
|
||||
Document document = new Document();
|
||||
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
|
||||
try {
|
||||
//1. 创建 pdf document
|
||||
// ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
|
||||
FileOutputStream outputStream = new FileOutputStream("passLetter.pdf");
|
||||
// FileOutputStream outputStream = new FileOutputStream("passLetter.pdf");
|
||||
PdfWriter.getInstance(document, outputStream);
|
||||
document.open();
|
||||
|
||||
@@ -44,21 +41,38 @@ public class PassLetterUtils {
|
||||
document.close();
|
||||
|
||||
//3. 填写通过函模板信息
|
||||
addContentToPdf(partnerName + " 先生/女士", 122, 640);
|
||||
addContentToPdf(passCode, 122, 558);
|
||||
addContentToPdf(verifyCity, 155, 494);
|
||||
addContentToPdf("60天", 135, 450);
|
||||
addContentToPdf(passTimeStr, 393, 152);
|
||||
return passCode;
|
||||
addContentToPdf(outputStream, partnerName + " 先生/女士", 122, 640);
|
||||
addContentToPdf(outputStream, passCode, 122, 558);
|
||||
addContentToPdf(outputStream, verifyCity, 155, 494);
|
||||
addContentToPdf(outputStream, "60天", 135, 450);
|
||||
addContentToPdf(outputStream, passTimeStr, 393, 152);
|
||||
return outputStream;
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
} finally {
|
||||
try {
|
||||
document.close();
|
||||
outputStream.close();
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void addContentToPdf(String content, float x, float y) {
|
||||
/**
|
||||
* 生成 passCode 的方法,拆分出来方便单独获取 passCode
|
||||
* @return
|
||||
*/
|
||||
public static String genPassCode(DateTime passTime) {
|
||||
String randomNum = RandomUtil.randomNumbers(5);
|
||||
String passCode = "HSAY" + DateUtil.format(passTime, "yyMMdd") + "-" + randomNum;
|
||||
return passCode;
|
||||
}
|
||||
|
||||
private static void addContentToPdf(ByteArrayOutputStream outputStream, String content, float x, float y) {
|
||||
try {
|
||||
PdfReader pdfReader = new PdfReader(Files.newInputStream(Paths.get("passLetter.pdf")));
|
||||
OutputStream outputStream = Files.newOutputStream(Paths.get("passLetter.pdf"));
|
||||
ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray());
|
||||
PdfReader pdfReader = new PdfReader(inputStream);
|
||||
PDFUtils.putParagraphAbsolutely(pdfReader, outputStream, x, y, content, 20, new Color(255, 82,25));
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
|
||||
@@ -46,5 +46,4 @@ public class HyIntendDevZoneInfoDAO {
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.entity.HyPartnerBaseInfoDO;
|
||||
import com.cool.store.mapper.HyPartnerBaseInfoMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -38,4 +38,11 @@ public class HyPartnerBaseInfoDAO {
|
||||
return hyPartnerBaseInfoMapper.updateByPartnerId(userName,mobile,partnerId);
|
||||
}
|
||||
|
||||
public HyPartnerBaseInfoDO getByPartnerIdAndLineId(String partnerId, Long partnerLineId){
|
||||
if (StringUtils.isEmpty(partnerId) || partnerLineId == null){
|
||||
return null;
|
||||
}
|
||||
return hyPartnerBaseInfoMapper.getByPartnerIdAndLineId(partnerId, partnerLineId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,11 +2,14 @@ package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.entity.HyPartnerClerkDO;
|
||||
import com.cool.store.mapper.HyPartnerClerkMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
@@ -31,4 +34,25 @@ public class HyPartnerClerkDAO {
|
||||
return hyPartnerClerkMapper.getHyPartnerClerkList(lineId);
|
||||
}
|
||||
|
||||
public int batchInsert(List<HyPartnerClerkDO> hyPartnerClerkDOList){
|
||||
if (CollectionUtils.isEmpty(hyPartnerClerkDOList)){
|
||||
return -1;
|
||||
}
|
||||
return hyPartnerClerkMapper.batchInsert(hyPartnerClerkDOList);
|
||||
}
|
||||
|
||||
public void deleteByPartnerIdAndLineId(String partnerId, Long partnerLineId){
|
||||
if (StringUtils.isEmpty(partnerId) || Objects.isNull(partnerLineId)){
|
||||
return;
|
||||
}
|
||||
hyPartnerClerkMapper.deleteByPartnerIdAndLineId(partnerId, partnerLineId);
|
||||
}
|
||||
|
||||
public List<HyPartnerClerkDO> listByPartnerIdAndLineId(String partnerId, Long partnerLineId){
|
||||
if (StringUtils.isEmpty(partnerId) || Objects.isNull(partnerLineId)){
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return hyPartnerClerkMapper.listByPartnerIdAndLineId(partnerId, partnerLineId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,13 +4,11 @@ import com.cool.store.dto.partner.PartnerIntentApplyInfoDTO;
|
||||
import com.cool.store.entity.HyPartnerIntentInfoDO;
|
||||
import com.cool.store.mapper.HyPartnerIntentInfoMapper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
@@ -48,12 +46,19 @@ public class HyPartnerIntentInfoDAO {
|
||||
}
|
||||
|
||||
|
||||
public PartnerIntentApplyInfoDTO selectByLineId(Long lineId){
|
||||
public HyPartnerIntentInfoDO selectByLineId(Long lineId){
|
||||
if (lineId==null){
|
||||
return null;
|
||||
}
|
||||
return hyPartnerIntentInfoMapper.selectByLineId(lineId);
|
||||
}
|
||||
|
||||
public HyPartnerIntentInfoDO getByPartnerIdAndLineId(String partnerId, Long partnerLineId){
|
||||
if (StringUtils.isEmpty(partnerId) || Objects.isNull(partnerLineId)){
|
||||
return null;
|
||||
}
|
||||
return hyPartnerIntentInfoMapper.getByPartnerIdAndLineId(partnerId, partnerLineId);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,19 +1,20 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.dto.partner.PartnerBlackListDTO;
|
||||
import com.cool.store.dto.partner.PartnerIntentApplyInfoDTO;
|
||||
import com.cool.store.dto.partner.PartnerLineInfoAndBaseInfoDTO;
|
||||
import com.cool.store.dto.partner.StageCountDTO;
|
||||
import com.cool.store.dto.partner.*;
|
||||
import com.cool.store.entity.HyPartnerLineInfoDO;
|
||||
import com.cool.store.mapper.HyPartnerLineInfoMapper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -113,8 +114,8 @@ public class HyPartnerLineInfoDAO {
|
||||
}
|
||||
|
||||
|
||||
public PageInfo<PartnerBlackListDTO> getBlackList( String keyWord, String intentArea , Integer acceptAdjustType){
|
||||
return hyPartnerLineInfoMapper.getBlackList(keyWord,intentArea,acceptAdjustType);
|
||||
public PageInfo<PartnerBlackListDTO> getBlackList( String userNameKeyword,String phoneKeyword, String intentArea , Integer acceptAdjustType){
|
||||
return hyPartnerLineInfoMapper.getBlackList(userNameKeyword,phoneKeyword,intentArea,acceptAdjustType);
|
||||
}
|
||||
|
||||
|
||||
@@ -125,7 +126,30 @@ public class HyPartnerLineInfoDAO {
|
||||
return hyPartnerLineInfoMapper.joinAndRemoveBlack(lineId,status,joinReason,removeReason);
|
||||
}
|
||||
|
||||
public PageInfo<PublicSeaLineDTO> getPublicSeaLineList( String userNameKeyword, String phoneKeyword, String intentArea, Integer acceptAdjustType, Date updateStartTime, Date updateEndTime, List<String> userIdList){
|
||||
return hyPartnerLineInfoMapper.getPublicSeaLineList(userNameKeyword,phoneKeyword,intentArea,acceptAdjustType,updateStartTime,updateEndTime,userIdList);
|
||||
}
|
||||
|
||||
|
||||
public List<HyPartnerLineInfoDO> getPartnerLastLine(List<String> partnerIdList){
|
||||
if (CollectionUtils.isEmpty(partnerIdList)){
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return hyPartnerLineInfoMapper.getPartnerLastLine(partnerIdList);
|
||||
}
|
||||
public HyPartnerLineInfoDO getByPartnerId(String partnerId){
|
||||
if (StringUtils.isEmpty(partnerId)){
|
||||
return null;
|
||||
}
|
||||
return hyPartnerLineInfoMapper.getByPartnerId(partnerId);
|
||||
}
|
||||
|
||||
|
||||
public List<LineCountDTO> getFollowCountList( List<String> partnerIdList){
|
||||
if (CollectionUtils.isEmpty(partnerIdList)){
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return hyPartnerLineInfoMapper.getFollowCountList(partnerIdList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -68,5 +68,12 @@ public class HyPartnerUserInfoDAO {
|
||||
return hyPartnerUserInfoMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
public int updateJoinKnowById(Integer isWritePartnerKnow, Long id){
|
||||
if (id == null || isWritePartnerKnow == null){
|
||||
return 0;
|
||||
}
|
||||
return hyPartnerUserInfoMapper.updateJoinKnowById(isWritePartnerKnow, id);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -33,4 +33,7 @@ public interface HyPartnerBaseInfoMapper {
|
||||
int updateByPartnerId(@Param("userName") String userName,
|
||||
@Param("mobile") String mobile,
|
||||
@Param("partnerId") String partnerId);
|
||||
|
||||
HyPartnerBaseInfoDO getByPartnerIdAndLineId(@Param("partnerId") String partnerId, @Param("partnerLineId") Long partnerLineId);
|
||||
|
||||
}
|
||||
@@ -27,4 +27,17 @@ public interface HyPartnerClerkMapper {
|
||||
|
||||
List<HyPartnerClerkDO> getHyPartnerClerkList(@Param("lineId") Long lineId);
|
||||
|
||||
|
||||
int batchInsert(@Param("recordList") List<HyPartnerClerkDO> recordList);
|
||||
|
||||
void deleteByPartnerIdAndLineId(@Param("partnerId") String partnerId, @Param("partnerLineId") Long partnerLineId);
|
||||
|
||||
/**
|
||||
* 查询店员信息
|
||||
* @return
|
||||
*/
|
||||
List<HyPartnerClerkDO> listByPartnerIdAndLineId(@Param("partnerId") String partnerId,
|
||||
@Param("partnerLineId") Long partnerLineId);
|
||||
|
||||
|
||||
}
|
||||
@@ -46,5 +46,7 @@ public interface HyPartnerIntentInfoMapper {
|
||||
* @param lineId
|
||||
* @return
|
||||
*/
|
||||
PartnerIntentApplyInfoDTO selectByLineId(@Param("lineId") Long lineId);
|
||||
HyPartnerIntentInfoDO selectByLineId(@Param("lineId") Long lineId);
|
||||
|
||||
HyPartnerIntentInfoDO getByPartnerIdAndLineId(@Param("partnerId") String partnerId, @Param("partnerLineId") Long partnerLineId);
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.entity.HyPartnerInterviewDO;
|
||||
import com.cool.store.vo.EnterInterviewVO;
|
||||
import com.cool.store.vo.PartnerInterviewInfoVO;
|
||||
import com.cool.store.vo.PartnerPassLetterDetailVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@@ -61,11 +62,16 @@ public interface HyPartnerInterviewMapper {
|
||||
/**
|
||||
* 根据会议 id 查询面试官 id
|
||||
*/
|
||||
String getInterviewerByInterviewId(@Param("interviewId") String interviewId);
|
||||
EnterInterviewVO getInterviewerByInterviewId(@Param("interviewId") String interviewId);
|
||||
|
||||
/**
|
||||
* 获取通知函详情
|
||||
*/
|
||||
PartnerPassLetterDetailVO getPassLetterDetail(@Param("interviewId") String interviewId);
|
||||
|
||||
/**
|
||||
* 生成通过函 pdf 后修改
|
||||
*/
|
||||
int updatePassLetterInfo(@Param("passCode") String passCode, @Param("passFileUrl") String passFileUrl, @Param("expiryDate") String expiryDate, @Param("interviewId") String interviewId);
|
||||
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.dto.partner.*;
|
||||
import com.cool.store.dto.partner.PartnerBlackListDTO;
|
||||
import com.cool.store.dto.partner.PartnerIntentApplyInfoDTO;
|
||||
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.HyPartnerLineInfoDO;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -109,12 +109,14 @@ public interface HyPartnerLineInfoMapper {
|
||||
|
||||
/**
|
||||
* 查询黑名单列表
|
||||
* @param keyWord
|
||||
* @param userNameKeyword
|
||||
* @param phoneKeyword
|
||||
* @param intentArea
|
||||
* @param acceptAdjustType
|
||||
* @return
|
||||
*/
|
||||
PageInfo<PartnerBlackListDTO> getBlackList(@Param("keyWord") String keyWord,
|
||||
PageInfo<PartnerBlackListDTO> getBlackList(@Param("userNameKeyword") String userNameKeyword,
|
||||
@Param("phoneKeyword") String phoneKeyword,
|
||||
@Param("intentArea") String intentArea ,
|
||||
@Param("acceptAdjustType") Integer acceptAdjustType);
|
||||
|
||||
@@ -132,4 +134,40 @@ public interface HyPartnerLineInfoMapper {
|
||||
@Param("joinReason") String joinReason,
|
||||
@Param("removeReason") String removeReason);
|
||||
|
||||
HyPartnerLineInfoDO getByPartnerId(@Param("partnerId") String partnerId);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查询公海线索
|
||||
* @param userNameKeyword
|
||||
* @param phoneKeyword
|
||||
* @param intentArea
|
||||
* @param acceptAdjustType
|
||||
* @param updateStartTime
|
||||
* @param updateEndTime
|
||||
* @param userIdList
|
||||
* @return
|
||||
*/
|
||||
PageInfo<PublicSeaLineDTO> getPublicSeaLineList(@Param("userNameKeyword") String userNameKeyword,
|
||||
@Param("phoneKeyword") String phoneKeyword,
|
||||
@Param("intentArea") String intentArea,
|
||||
@Param("acceptAdjustType") Integer acceptAdjustType,
|
||||
@Param("updateStartTime") Date updateStartTime,
|
||||
@Param("updateEndTime") Date updateEndTime,
|
||||
@Param("userIdList") List<String> userIdList);
|
||||
|
||||
/**
|
||||
* 查询对应的加盟商最近线索
|
||||
* @param partnerIdList
|
||||
* @return
|
||||
*/
|
||||
List<HyPartnerLineInfoDO> getPartnerLastLine(@Param("partnerIdList") List<String> partnerIdList);
|
||||
|
||||
/**
|
||||
* 加盟商跟进次数
|
||||
* @param partnerIdList
|
||||
* @return
|
||||
*/
|
||||
List<LineCountDTO> getFollowCountList(@Param("partnerIdList") List<String> partnerIdList);
|
||||
}
|
||||
@@ -40,4 +40,7 @@ public interface HyPartnerUserInfoMapper {
|
||||
* @return
|
||||
*/
|
||||
List<HyPartnerUserInfoDO> selectByPartnerIds(@Param("partnerIdList") List<String> partnerIdList);
|
||||
|
||||
int updateJoinKnowById(@Param("isWritePartnerKnow")Integer isWritePartnerKnow, @Param("id")Long id);
|
||||
|
||||
}
|
||||
@@ -106,10 +106,10 @@
|
||||
<if test="record.contentTitle != null and record.contentTitle != ''">
|
||||
content_title = #{record.contentTitle},
|
||||
</if>
|
||||
<if test="record.subject != null and record.subject != ''">
|
||||
<if test="record.subject != null">
|
||||
subject = #{record.subject},
|
||||
</if>
|
||||
<if test="record.contentType != null and record.contentType != ''">
|
||||
<if test="record.contentType != null">
|
||||
content_type = #{record.contentType},
|
||||
</if>
|
||||
<if test="record.cover != null and record.cover != ''">
|
||||
@@ -153,10 +153,10 @@
|
||||
<if test="contentTitle != null and contentTitle != ''">
|
||||
and content_title like concat('%', #{contentTitle}, '%')
|
||||
</if>
|
||||
<if test="subject != null and subject != ''">
|
||||
<if test="subject != null">
|
||||
and subject = #{subject}
|
||||
</if>
|
||||
<if test="contentType != null and contentType != ''">
|
||||
<if test="contentType != null">
|
||||
and content_type = #{contentType}
|
||||
</if>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
|
||||
@@ -216,4 +216,12 @@
|
||||
where partner_id = #{partnerId}
|
||||
</set>
|
||||
</update>
|
||||
|
||||
<select id="getByPartnerIdAndLineId" resultMap="BaseResultMap" >
|
||||
select
|
||||
<include refid="Base_Column_List"></include>
|
||||
from hy_partner_base_info
|
||||
where partner_id = #{partnerId} and partner_line_id = #{partnerLineId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -108,4 +108,37 @@
|
||||
from hy_partner_clerk
|
||||
where partner_line_id = #{lineId}
|
||||
</select>
|
||||
|
||||
<insert id="batchInsert">
|
||||
insert into
|
||||
hy_partner_clerk
|
||||
(
|
||||
partner_line_id,
|
||||
partner_id,
|
||||
username,
|
||||
relationship,
|
||||
age,
|
||||
choose_reason
|
||||
)
|
||||
values
|
||||
<foreach collection="recordList" item="record" separator=",">
|
||||
(#{record.partnerLineId},
|
||||
#{record.partnerId},
|
||||
#{record.username},
|
||||
#{record.relationship},
|
||||
#{record.age},
|
||||
#{record.chooseReason})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<delete id="deleteByPartnerIdAndLineId">
|
||||
delete from hy_partner_clerk where partner_id = #{partnerId} and partner_line_id = #{partnerLineId}
|
||||
</delete>
|
||||
|
||||
<select id="listByPartnerIdAndLineId" resultMap="BaseResultMap">
|
||||
select <include refid="Base_Column_List"></include> from
|
||||
hy_partner_clerk
|
||||
where partner_id = #{partnerId} and partner_line_id = #{partnerLineId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -279,7 +279,7 @@
|
||||
order by b.create_time
|
||||
</select>
|
||||
|
||||
<select id="selectByLineId" resultType="com.cool.store.dto.partner.PartnerIntentApplyInfoDTO">
|
||||
<select id="selectByLineId" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"></include>
|
||||
from hy_partner_intent_info
|
||||
@@ -288,4 +288,11 @@
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getByPartnerIdAndLineId" resultMap="BaseResultMap" >
|
||||
select
|
||||
<include refid="Base_Column_List"></include>
|
||||
from hy_partner_intent_info
|
||||
where partner_id = #{partnerId} and partner_line_id = #{partnerLineId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -34,6 +34,11 @@
|
||||
<association property="interviewerName" column="interviewerId" select="queryInterviewerName" javaType="string"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="partnerEnterInterviewVO" type="com.cool.store.vo.EnterInterviewVO">
|
||||
<association property="partnerName" column="partner_id" select="queryPartnerName"></association>
|
||||
<association property="interviewerName" column="interviewer" select="queryInterviewerName"></association>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="passLetterDetail" type="com.cool.store.vo.PartnerPassLetterDetailVO">
|
||||
<association property="partnerName" column="partner_id" select="queryPartnerName"></association>
|
||||
<association property="verifyCity" column="partner_id" select="getVerifyCity"></association>
|
||||
@@ -311,23 +316,44 @@
|
||||
</update>
|
||||
|
||||
<!-- 根据会议 id 获取面试官 id -->
|
||||
<select id="getInterviewerByInterviewId" resultType="java.lang.String">
|
||||
SELECT interviewer
|
||||
<select id="getInterviewerByInterviewId" resultMap="partnerEnterInterviewVO">
|
||||
SELECT interviewer, interviewer interviewer_id, partner_id
|
||||
FROM hy_partner_interview
|
||||
WHERE id = #{interviewId}
|
||||
</select>
|
||||
|
||||
<!-- 获取通知函详情 -->
|
||||
<select id="getPassLetterDetail" resultMap="passLetterDetail">
|
||||
SELECT pass_code, pass_file_url, expiry_date, partner_id
|
||||
SELECT auth_code, pass_code, pass_file_url, expiry_date, partner_id
|
||||
FROM hy_partner_interview
|
||||
WHERE id = #{interviewId}
|
||||
</select>
|
||||
<!-- 获取意向开店区域 -->
|
||||
<select id="getVerifyCity" resultType="string">
|
||||
SELECT want_shop_area
|
||||
FROM hy_partner_intent_info
|
||||
WHERE partner_id = #{partner_id}
|
||||
SELECT area_path
|
||||
FROM hy_open_area_info
|
||||
WHERE id = (
|
||||
SELECT want_shop_area
|
||||
FROM hy_partner_intent_info
|
||||
WHERE partner_id = #{partner_id}
|
||||
)
|
||||
</select>
|
||||
|
||||
<!-- 生成通过函 pdf 后修改 -->
|
||||
<update id="updatePassLetterInfo">
|
||||
UPDATE hy_partner_interview
|
||||
<set>
|
||||
<if test="passCode != null and passCode != ''">
|
||||
pass_code = #{passCode},
|
||||
</if>
|
||||
<if test="passFileUrl != null and passFileUrl != ''">
|
||||
pass_file_url = #{passFileUrl},
|
||||
</if>
|
||||
<if test="expiryDate != null and expiryDate != ''">
|
||||
expiry_date = #{expiryDate}
|
||||
</if>
|
||||
</set>
|
||||
WHERE id = #{interviewId}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -357,8 +357,11 @@
|
||||
from hy_partner_line_info a inner join hy_partner_user_info b where a.partner_id = b.partner_id
|
||||
where deleted = 0
|
||||
and line_status = 3
|
||||
<if test="keyWord!=null and keyWord !=''">
|
||||
and (b.username like concat('%', #{keyWord}, '%') or b.mobile like concat('%', #{keyWord}, '%'))
|
||||
<if test="userNameKeyword!=null and userNameKeyword !=''">
|
||||
and b.username like concat('%', #{userNameKeyword}, '%')
|
||||
</if>
|
||||
<if test="phoneKeyword!=null and phoneKeyword !=''">
|
||||
and b.mobile like concat('%', #{phoneKeyword}, '%')
|
||||
</if>
|
||||
<if test="intentArea!=null and intentArea!=''">
|
||||
and b.want_shop_area = #{intentArea}
|
||||
@@ -384,4 +387,67 @@
|
||||
where id = #{lineId}
|
||||
</update>
|
||||
|
||||
<select id="getByPartnerId" resultMap="BaseResultMap" >
|
||||
select
|
||||
<include refid="Base_Column_List"></include>
|
||||
from hy_partner_line_info
|
||||
where partner_id = #{partnerId}
|
||||
</select>
|
||||
|
||||
<select id="getPublicSeaLineList" resultType="com.cool.store.dto.partner.PublicSeaLineDTO">
|
||||
select
|
||||
a.create_time as createTime,
|
||||
b.partner_id as partner_id,
|
||||
b.mobile as mobile,
|
||||
b.username as userName,
|
||||
b.want_shop_area as wantShopArea,
|
||||
b.accept_adjust_type as acceptAdjustType
|
||||
FROM hy_partner_line_info a inner JOIN hy_partner_user_info b on a.partner_id = b.partner_id
|
||||
where a.line_status = 1
|
||||
<if test="userNameKeyword!=null and userNameKeyword!=''">
|
||||
and b.username like concat('%',#{userNameKeyword},'%')
|
||||
</if>
|
||||
<if test="phoneKeyword!=null and phoneKeyword!=''">
|
||||
and b.mobile like concat('%',#{phoneKeyword},'%')
|
||||
</if>
|
||||
<if test="intentArea!=null and intentArea!=''">
|
||||
and b.want_shop_area = #{intentArea}
|
||||
</if>
|
||||
<if test="acceptAdjustType!=null">
|
||||
and b.accept_adjust_type = #{acceptAdjustType}
|
||||
</if>
|
||||
<if test="updateStartTime!=null and updateEndTime!=''">
|
||||
and a.update_time BETWEEN #{updateStartTime} and #{updateEndTime}
|
||||
</if>
|
||||
<if test="userIdList!=null and userIdList.size>0">
|
||||
<foreach collection="userIdList" item="userId" open="and a.investment_manager in (" close=")" separator=",">
|
||||
#{userId}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getPartnerLastLine" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="Base_Column_List"></include>
|
||||
FROM hy_partner_line_info h1
|
||||
WHERE h1.create_time = (
|
||||
SELECT MAX(h2.create_time)
|
||||
FROM hy_partner_line_info h2
|
||||
WHERE h1.partner_id = h2.partner_id
|
||||
<if test="partnerIdList!=null and partnerIdList.size>0">
|
||||
<foreach collection="partnerIdList" item="partnerId" open="and h1.partner_id in (" close=")" separator=",">
|
||||
#{partnerId}
|
||||
</foreach>
|
||||
</if>
|
||||
)
|
||||
</select>
|
||||
|
||||
<select id="getFollowCountList" resultType="com.cool.store.dto.partner.LineCountDTO">
|
||||
SELECT partner_id, COUNT(1) AS num_of_leads
|
||||
FROM hy_partner_line_info
|
||||
GROUP BY partner_id;
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -147,4 +147,11 @@
|
||||
</set>
|
||||
where id = #{record.id}
|
||||
</update>
|
||||
|
||||
<update id="updateJoinKnowById">
|
||||
update hy_partner_user_info
|
||||
set `is_write_partner_know`=#{isWritePartnerKnow,jdbcType=INTEGER}
|
||||
where id=#{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.cool.store.dto.content;
|
||||
|
||||
import com.cool.store.enums.ContentSubjectEnum;
|
||||
import com.cool.store.enums.ContentTypeEnum;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -13,10 +15,10 @@ public class ContentAddDto {
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty(value = "栏目code", required = true)
|
||||
private String subject;
|
||||
private ContentSubjectEnum subject;
|
||||
|
||||
@ApiModelProperty(value = "类型", required = true)
|
||||
private String contentType;
|
||||
private ContentTypeEnum contentType;
|
||||
|
||||
@ApiModelProperty(value = "封面地址", required = true)
|
||||
private String cover;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.cool.store.dto.content;
|
||||
|
||||
import com.cool.store.common.PageBasicInfo;
|
||||
import com.cool.store.enums.ContentSubjectEnum;
|
||||
import com.cool.store.enums.ContentTypeEnum;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
@@ -13,10 +15,10 @@ public class ContentQueryListDto extends PageBasicInfo {
|
||||
private String contentTitle;
|
||||
|
||||
@ApiModelProperty("栏目Code")
|
||||
private String subject;
|
||||
private ContentSubjectEnum subject;
|
||||
|
||||
@ApiModelProperty("类型,默认选中全部时不传值")
|
||||
private String contentType;
|
||||
private ContentTypeEnum contentType;
|
||||
|
||||
@ApiModelProperty("筛选开始时间")
|
||||
private String startTime;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.cool.store.dto.content;
|
||||
|
||||
import com.cool.store.enums.ContentSubjectEnum;
|
||||
import com.cool.store.enums.ContentTypeEnum;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -16,10 +18,10 @@ public class ContentUpdateDto {
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty("栏目code")
|
||||
private String subject;
|
||||
private ContentSubjectEnum subject;
|
||||
|
||||
@ApiModelProperty("类型")
|
||||
private String contentType;
|
||||
private ContentTypeEnum contentType;
|
||||
|
||||
@ApiModelProperty("封面地址")
|
||||
private String cover;
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.cool.store.dto.partner;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2023/6/15 21:19
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class LineCountDTO {
|
||||
|
||||
private String partnerId;
|
||||
|
||||
private Integer followCount;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.cool.store.dto.partner;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2023/6/15 20:21
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class PublicSeaLineDTO {
|
||||
|
||||
private Date createTime;
|
||||
|
||||
private Long lineId;
|
||||
|
||||
private String partnerId;
|
||||
|
||||
private String userName;
|
||||
|
||||
private String mobile;
|
||||
|
||||
private String wantShopArea;
|
||||
|
||||
private String acceptAdjustType;
|
||||
}
|
||||
@@ -1,8 +1,10 @@
|
||||
package com.cool.store.entity;
|
||||
|
||||
import com.cool.store.enums.ContentSubjectEnum;
|
||||
import com.cool.store.enums.ContentTypeEnum;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
@@ -25,10 +27,10 @@ public class HyContentInfoDO implements Serializable {
|
||||
private String contentTitle;
|
||||
|
||||
@ApiModelProperty("栏目CODE")
|
||||
private String subject;
|
||||
private ContentSubjectEnum subject;
|
||||
|
||||
@ApiModelProperty("类型 image-图文 video-视频")
|
||||
private String contentType;
|
||||
private ContentTypeEnum contentType;
|
||||
|
||||
@ApiModelProperty("封面URL")
|
||||
private String cover;
|
||||
|
||||
@@ -17,8 +17,11 @@ import java.util.Date;
|
||||
public class LineRequest extends PageInfoRequest{
|
||||
|
||||
|
||||
@ApiModelProperty("关键字")
|
||||
private String keyWord;
|
||||
@ApiModelProperty("用户名关键字")
|
||||
private String userNameKeyword;
|
||||
|
||||
@ApiModelProperty("手机号关键字")
|
||||
private String phoneKeyword;
|
||||
|
||||
@ApiModelProperty("意向区域")
|
||||
private String intentArea;
|
||||
@@ -26,8 +29,11 @@ public class LineRequest extends PageInfoRequest{
|
||||
@ApiModelProperty("调剂类型")
|
||||
private Integer acceptAdjustType;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private Date updateTime;
|
||||
@ApiModelProperty("更新开始时间")
|
||||
private Date updateStartTime;
|
||||
|
||||
@ApiModelProperty("更新结束时间")
|
||||
private Date updateEndTime;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -18,6 +18,12 @@ public class PartnerIntentInfoRequest {
|
||||
@ApiModelProperty("")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("线索表ID")
|
||||
private Long partnerLineId;
|
||||
|
||||
@ApiModelProperty("加盟商C端用户表ID partnerId ")
|
||||
private String partnerId;
|
||||
|
||||
@ApiModelProperty("常驻区域")
|
||||
private String liveArea;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class PartnerEnterInterviewVO {
|
||||
public class EnterInterviewVO {
|
||||
|
||||
@ApiModelProperty("userSig 进入会议需要的用户签名")
|
||||
private String userSign;
|
||||
@@ -12,4 +12,10 @@ public class PartnerEnterInterviewVO {
|
||||
@ApiModelProperty("面试官id")
|
||||
private String interviewerId;
|
||||
|
||||
@ApiModelProperty("面试官姓名")
|
||||
private String interviewerName;
|
||||
|
||||
@ApiModelProperty("加盟商姓名")
|
||||
private String partnerName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.cool.store.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2023/6/15 14:31
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class EnterpriseUserSingleInfoVO {
|
||||
|
||||
private String userId;
|
||||
|
||||
private String userName;
|
||||
|
||||
private String mobile;
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.cool.store.vo;
|
||||
|
||||
import com.cool.store.enums.ContentSubjectEnum;
|
||||
import com.cool.store.enums.ContentTypeEnum;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -13,10 +15,10 @@ public class HyContentInfoVO {
|
||||
private String contentTitle;
|
||||
|
||||
@ApiModelProperty("栏目CODE")
|
||||
private String subject;
|
||||
private ContentSubjectEnum subject;
|
||||
|
||||
@ApiModelProperty("类型 image-图文 video-视频")
|
||||
private String contentType;
|
||||
private ContentTypeEnum contentType;
|
||||
|
||||
@ApiModelProperty("封面URL")
|
||||
private String cover;
|
||||
|
||||
@@ -22,6 +22,12 @@ public class PartnerIntentInfoVO {
|
||||
@ApiModelProperty("hy_partner_user_info.partner_id")
|
||||
private String partnerId;
|
||||
|
||||
@ApiModelProperty("加盟商姓名")
|
||||
private String partnerUserName;
|
||||
|
||||
@ApiModelProperty("加盟商手机号")
|
||||
private String partnerUserPhone;
|
||||
|
||||
@ApiModelProperty("hy_partner_line_info.id")
|
||||
private Long partnerLineId;
|
||||
|
||||
|
||||
@@ -9,7 +9,10 @@ public class PartnerPassLetterDetailVO {
|
||||
@ApiModelProperty("加盟商姓名")
|
||||
private String partnerName;
|
||||
|
||||
@ApiModelProperty("编码")
|
||||
@ApiModelProperty("授权码")
|
||||
private String authCode;
|
||||
|
||||
@ApiModelProperty("通过函编码")
|
||||
private String passCode;
|
||||
|
||||
@ApiModelProperty("审核城市")
|
||||
|
||||
@@ -55,8 +55,22 @@ public class PrivateSeaLineListVo {
|
||||
@ApiModelProperty("0不接受调剂、1全国调剂、2省内调剂、3市内调剂")
|
||||
private Integer acceptAdjustType;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
@ApiModelProperty("门店编码")
|
||||
private String storeCode;
|
||||
|
||||
@ApiModelProperty("门店名称")
|
||||
private String storeName;
|
||||
|
||||
@ApiModelProperty("线索状态")
|
||||
private Integer lineStatus;
|
||||
|
||||
@ApiModelProperty("推荐加盟商ID")
|
||||
private String recommendPartnerId;
|
||||
|
||||
@ApiModelProperty("推荐加盟商名称")
|
||||
private String recommendPartnerName;
|
||||
|
||||
}
|
||||
|
||||
@@ -59,5 +59,9 @@ public class PublicSeaLineListVo {
|
||||
|
||||
@ApiModelProperty("跟进次数")
|
||||
private Integer followCount;
|
||||
@ApiModelProperty("意向开店区域ID")
|
||||
private String wantShopArea;
|
||||
|
||||
private String acceptAdjustType;
|
||||
|
||||
}
|
||||
|
||||
@@ -41,6 +41,11 @@
|
||||
<groupId>com.aliyun</groupId>
|
||||
<artifactId>ons20190214</artifactId>
|
||||
</dependency>
|
||||
<!-- OSS -->
|
||||
<dependency>
|
||||
<groupId>com.aliyun.oss</groupId>
|
||||
<artifactId>aliyun-sdk-oss</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.pagehelper</groupId>
|
||||
<artifactId>pagehelper</artifactId>
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.cool.store.oss;
|
||||
|
||||
import com.aliyun.oss.ClientException;
|
||||
import com.aliyun.oss.OSS;
|
||||
import com.aliyun.oss.OSSClientBuilder;
|
||||
import com.aliyun.oss.OSSException;
|
||||
import com.aliyun.oss.model.PutObjectRequest;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
@Component
|
||||
@Slf4j
|
||||
public class OSSServer {
|
||||
|
||||
@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("${corp.id:null}")
|
||||
private String corpId;
|
||||
|
||||
/**
|
||||
* 服务端上传文件的方法
|
||||
* ObjectName 为文件存放位置 + 名字,不可包含 bucket
|
||||
*/
|
||||
public String uploadFileServer(InputStream inputStream, String objectName) {
|
||||
// 创建OSSClient实例。
|
||||
OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);
|
||||
try {
|
||||
// 创建PutObjectRequest对象。
|
||||
PutObjectRequest putObjectRequest = new PutObjectRequest(bucket, objectName, inputStream);
|
||||
// 创建PutObject请求。
|
||||
ossClient.putObject(putObjectRequest);
|
||||
return "http://" + bucket + "." + endpoint + "/" + objectName;
|
||||
} catch (OSSException oe) {
|
||||
log.error("Caught an OSSException, which means your request made it to OSS, "
|
||||
+ "but was rejected with an error response for some reason.");
|
||||
log.error("Error Message:" + oe.getErrorMessage());
|
||||
log.error("Error Code:" + oe.getErrorCode());
|
||||
log.error("Request ID:" + oe.getRequestId());
|
||||
log.error("Host ID:" + oe.getHostId());
|
||||
} catch (ClientException ce) {
|
||||
log.error("Caught an ClientException, which means the client encountered "
|
||||
+ "a serious internal problem while trying to communicate with OSS, "
|
||||
+ "such as not being able to access the network.");
|
||||
log.error("Error Message:" + ce.getMessage());
|
||||
} catch (RuntimeException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
finally {
|
||||
if (ossClient != null) {
|
||||
ossClient.shutdown();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.cool.store.service;
|
||||
import com.cool.store.entity.EnterpriseUserDO;
|
||||
import com.cool.store.request.EnterpriseUserRequest;
|
||||
import com.cool.store.vo.EnterpriseUserSingleInfoVO;
|
||||
import com.cool.store.vo.buser.EnterpriseUserPageVO;
|
||||
|
||||
import java.util.List;
|
||||
@@ -16,4 +17,12 @@ public interface EnterpriseUserService {
|
||||
|
||||
EnterpriseUserDO getUserInfoByUserId(String userId);
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
List<EnterpriseUserSingleInfoVO> getInvestmentManagerList(String type,String userId,String keyword);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.request.AddTagsRequest;
|
||||
import com.cool.store.request.PartnerBaseInfoRequest;
|
||||
import com.cool.store.vo.PartnerBaseInfoVO;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
@@ -16,4 +18,8 @@ public interface HyPartnerBaseInfoService {
|
||||
* @return
|
||||
*/
|
||||
Boolean addTags(AddTagsRequest addTagsRequest);
|
||||
|
||||
Boolean submitPartnerBaseInfo(PartnerBaseInfoRequest request);
|
||||
|
||||
PartnerBaseInfoVO queryPartnerBaseInfo(String partnerId, Long lineId);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.request.PartnerClerkInfoRequest;
|
||||
import com.cool.store.vo.PartnerClerkVO;
|
||||
|
||||
import java.util.List;
|
||||
@@ -19,6 +20,10 @@ public interface HyPartnerClerkService {
|
||||
*/
|
||||
List<PartnerClerkVO> getPartnerClerkList(Long lineId);
|
||||
|
||||
Boolean submitPartnerClerkInfo(PartnerClerkInfoRequest request);
|
||||
|
||||
List<PartnerClerkVO> queryPartnerClerkInfo(String partnerId, Long lineId);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.request.BaseUserInfoRequest;
|
||||
import com.cool.store.request.PartnerIntentInfoRequest;
|
||||
import com.cool.store.vo.PartnerIntentApplyInfoVO;
|
||||
import com.cool.store.vo.PartnerIntentInfoVO;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
|
||||
/**
|
||||
@@ -27,7 +29,7 @@ public interface HyPartnerIntentInfoService {
|
||||
* @param lineId
|
||||
* @return
|
||||
*/
|
||||
PartnerIntentApplyInfoVO getPartnerIntentApplyInfo(Long lineId);
|
||||
PartnerIntentInfoVO getPartnerIntentApplyDetail(Long lineId);
|
||||
|
||||
/**
|
||||
* 员工端 修改加盟商意向信息
|
||||
@@ -36,4 +38,8 @@ public interface HyPartnerIntentInfoService {
|
||||
*/
|
||||
Boolean updatePartnerIntentInfo(BaseUserInfoRequest baseUserInfoRequest);
|
||||
|
||||
Boolean submitPartnerIntentInfo(PartnerIntentInfoRequest partnerIntentInfoRequest);
|
||||
|
||||
PartnerIntentInfoVO queryPartnerIntentInfo(String partnerId, Long lineId);
|
||||
|
||||
}
|
||||
|
||||
@@ -2,10 +2,7 @@ package com.cool.store.service;
|
||||
|
||||
import com.cool.store.request.CloseFollowRequest;
|
||||
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;
|
||||
import com.cool.store.vo.*;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
|
||||
import java.util.List;
|
||||
@@ -99,5 +96,13 @@ public interface HyPartnerLineInfoService {
|
||||
*/
|
||||
Boolean closeOrPassFollow(String userId,CloseFollowRequest closeFollowRequest);
|
||||
|
||||
/**
|
||||
* 公海线索
|
||||
* @param userId
|
||||
* @param lineRequest
|
||||
* @return
|
||||
*/
|
||||
PageInfo<PublicSeaLineListVo> publicSeaLineList(String userId,LineRequest lineRequest);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.dto.partner.EnterInterviewDto;
|
||||
import com.cool.store.request.EntrustOthersReq;
|
||||
import com.cool.store.request.FinishInterviewReq;
|
||||
import com.cool.store.request.GetInterviewListReq;
|
||||
import com.cool.store.request.ModifyInterviewTimeReq;
|
||||
import com.cool.store.vo.EnterInterviewVO;
|
||||
import com.cool.store.vo.interview.InterviewVO;
|
||||
|
||||
import java.util.List;
|
||||
@@ -39,4 +41,13 @@ public interface InterviewService {
|
||||
* @param request
|
||||
*/
|
||||
void finishInterview(FinishInterviewReq request);
|
||||
|
||||
/**
|
||||
* 进入面试间的方法
|
||||
* 修改一些面试状态
|
||||
* 最后返回 userSign 用于进入腾讯云音视频房间
|
||||
* @return userSign 进入视频所需签名
|
||||
*/
|
||||
EnterInterviewVO enterInterviewRoom(EnterInterviewDto dto);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.dto.partner.EnterInterviewDto;
|
||||
import com.cool.store.vo.PartnerEnterInterviewVO;
|
||||
import com.cool.store.vo.EnterInterviewVO;
|
||||
import com.cool.store.vo.PartnerInterviewInfoVO;
|
||||
import com.cool.store.vo.PartnerPassLetterDetailVO;
|
||||
|
||||
@@ -20,7 +20,7 @@ public interface PartnerInterviewService {
|
||||
* 最后返回 userSign 用于进入腾讯云音视频房间
|
||||
* @return userSign 进入视频所需签名
|
||||
*/
|
||||
PartnerEnterInterviewVO enterInterviewRoom(EnterInterviewDto dto);
|
||||
EnterInterviewVO enterInterviewRoom(EnterInterviewDto dto);
|
||||
|
||||
/**
|
||||
* 获取通知函详情
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.entity.HyPartnerUserInfoDO;
|
||||
|
||||
public interface PartnerUserInfoService {
|
||||
|
||||
HyPartnerUserInfoDO selectByPartnerId(String partnerId);
|
||||
|
||||
Boolean queryJoinNotice(String partnerId);
|
||||
|
||||
Boolean completeJoinNotice(String partnerId);
|
||||
}
|
||||
|
||||
@@ -61,6 +61,12 @@ public interface ZoneService {
|
||||
*/
|
||||
List<ZoneCheckVO> checkZone(IntentAreaSettingRequest intentAreaSettingRequest);
|
||||
|
||||
/**
|
||||
* 查询所有绑定战区的组织机构
|
||||
* @return
|
||||
*/
|
||||
List<String> queryAllBingZoneRegionList(String type);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,11 +1,19 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.dao.*;
|
||||
import com.cool.store.entity.*;
|
||||
import com.cool.store.service.EnterpriseUserService;
|
||||
import com.cool.store.service.ZoneService;
|
||||
import com.cool.store.vo.EnterpriseUserSingleInfoVO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
@@ -22,10 +30,61 @@ public class EnterpriseUserServiceImpl implements EnterpriseUserService {
|
||||
private EnterpriseUserDAO enterpriseUserDAO;
|
||||
@Resource
|
||||
private EnterpriseUserRoleDAO enterpriseUserRoleDAO;
|
||||
@Resource
|
||||
ZoneService zoneService;
|
||||
@Resource
|
||||
RegionDAO regionDAO;
|
||||
@Resource
|
||||
UserRegionMappingDAO userRegionMappingDAO;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public EnterpriseUserDO getUserInfoByUserId(String userId) {
|
||||
return enterpriseUserDAO.getUserInfoById(userId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<EnterpriseUserSingleInfoVO> getInvestmentManagerList(String type,String userId, String keyword) {
|
||||
//查询当前人员信息
|
||||
EnterpriseUserDO userInfo = enterpriseUserDAO.getUserInfoById(userId);
|
||||
|
||||
//当前登录人所在组织机构
|
||||
List<String> regionIds = userRegionMappingDAO.getRegionIdsByUserId(userId);
|
||||
|
||||
//所有绑定了战区的组织机构
|
||||
List<String> list = zoneService.queryAllBingZoneRegionList("intend");
|
||||
HashSet<String> regionList = new HashSet<>();
|
||||
regionIds.forEach(x->{
|
||||
if (list.contains(x)){
|
||||
regionList.add(x);
|
||||
}
|
||||
});
|
||||
//分配
|
||||
//如果是招商经理 只能分配给自己
|
||||
//如果是负责人 分配给负责人所在战区人员
|
||||
List<EnterpriseUserDO> enterpriseUserDOS = new ArrayList<>();
|
||||
if (CommonConstants.ALLOCATION.equals(type)){
|
||||
if (userInfo.getIsLeader()){
|
||||
enterpriseUserDOS = enterpriseUserDAO.searchUserByRegionIdsAndKeyword(new ArrayList<>(regionList), keyword, Boolean.TRUE);
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(regionList)){
|
||||
//只有招商经理本人
|
||||
enterpriseUserDOS.add(userInfo);
|
||||
}
|
||||
}
|
||||
//转交 所有的招商经理
|
||||
if (CommonConstants.TRANSFER.equals(type)){
|
||||
enterpriseUserDOS = enterpriseUserDAO.searchUserByRegionIdsAndKeyword(new ArrayList<>(regionList), keyword, Boolean.TRUE);
|
||||
}
|
||||
List<EnterpriseUserSingleInfoVO> enterpriseUserSingleInfoVOS = new ArrayList<>();
|
||||
enterpriseUserDOS.forEach(x->{
|
||||
EnterpriseUserSingleInfoVO enterpriseUserSingleInfoVO = new EnterpriseUserSingleInfoVO();
|
||||
enterpriseUserSingleInfoVO.setUserId(x.getUserId());
|
||||
enterpriseUserSingleInfoVO.setUserName(x.getName());
|
||||
enterpriseUserSingleInfoVO.setMobile(x.getMobile());
|
||||
enterpriseUserSingleInfoVOS.add(enterpriseUserSingleInfoVO);
|
||||
});
|
||||
return enterpriseUserSingleInfoVOS;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.dao.HyPartnerBaseInfoDAO;
|
||||
import com.cool.store.dao.HyPartnerLineInfoDAO;
|
||||
import com.cool.store.entity.HyPartnerBaseInfoDO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.request.AddTagsRequest;
|
||||
import com.cool.store.request.PartnerBaseInfoRequest;
|
||||
import com.cool.store.service.HyPartnerBaseInfoService;
|
||||
import com.cool.store.vo.PartnerBaseInfoVO;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -29,4 +35,49 @@ public class HyPartnerBaseInfoServiceImpl implements HyPartnerBaseInfoService {
|
||||
hyPartnerBaseInfoDAO.updateByPrimaryKeySelective(hyPartnerBaseInfoDO);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* //前提 未提交加盟申请
|
||||
* //成功 意向区域变更成功 失败 您已进入意向申请流程,当前不可变更意向区域
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Boolean submitPartnerBaseInfo(PartnerBaseInfoRequest request) {
|
||||
HyPartnerBaseInfoDO baseInfoDO = hyPartnerBaseInfoDAO.getByPartnerIdAndLineId(request.getPartnerId(), request.getPartnerLineId());
|
||||
if(baseInfoDO == null){
|
||||
baseInfoDO = new HyPartnerBaseInfoDO();
|
||||
fillBaseInfo(baseInfoDO, request);
|
||||
hyPartnerBaseInfoDAO.insertSelective(baseInfoDO);
|
||||
}else {
|
||||
fillBaseInfo(baseInfoDO, request);
|
||||
hyPartnerBaseInfoDAO.updateByPrimaryKeySelective(baseInfoDO);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PartnerBaseInfoVO queryPartnerBaseInfo(String partnerId, Long lineId) {
|
||||
HyPartnerBaseInfoDO hyPartnerBaseInfoDO = hyPartnerBaseInfoDAO.getByPartnerIdAndLineId(partnerId, lineId);
|
||||
if (hyPartnerBaseInfoDO == null){
|
||||
throw new ServiceException(ErrorCodeEnum.PARTNER_BASEINFO_NOT_EXIST);
|
||||
}
|
||||
PartnerBaseInfoVO baseInfoVO = new PartnerBaseInfoVO();
|
||||
BeanUtil.copyProperties(hyPartnerBaseInfoDO, baseInfoVO);
|
||||
return baseInfoVO;
|
||||
}
|
||||
|
||||
private void fillBaseInfo(HyPartnerBaseInfoDO baseInfoDO, PartnerBaseInfoRequest request) {
|
||||
baseInfoDO.setPartnerId(request.getPartnerId());
|
||||
baseInfoDO.setPartnerLineId(request.getPartnerLineId());
|
||||
baseInfoDO.setMobile(request.getMobile());
|
||||
baseInfoDO.setUsername(request.getUsername());
|
||||
baseInfoDO.setSex(request.getSex());
|
||||
baseInfoDO.setNation(request.getNation());
|
||||
baseInfoDO.setBirthdate(request.getBirthdate());
|
||||
baseInfoDO.setIdCard(request.getIdCard());
|
||||
baseInfoDO.setIdCardPhotoFront(request.getIdCardPhotoFront());
|
||||
baseInfoDO.setIdCardPhotoBlack(request.getIdCardPhotoBlack());
|
||||
baseInfoDO.setLiveAddress(request.getLiveAddress());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import com.cool.store.dao.HyPartnerClerkDAO;
|
||||
import com.cool.store.entity.HyPartnerClerkDO;
|
||||
import com.cool.store.service.HyPartnerClerkService;
|
||||
import com.cool.store.vo.PartnerClerkVO;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2023/6/15 11:05
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Service
|
||||
public class HyPartnerClerkImpl implements HyPartnerClerkService {
|
||||
|
||||
@Resource
|
||||
HyPartnerClerkDAO hyPartnerClerkDAO;
|
||||
|
||||
|
||||
@Override
|
||||
public List<PartnerClerkVO> getPartnerClerkList(Long lineId) {
|
||||
List<HyPartnerClerkDO> hyPartnerClerkList = hyPartnerClerkDAO.getHyPartnerClerkList(lineId);
|
||||
List<PartnerClerkVO> result= new ArrayList<>();
|
||||
hyPartnerClerkList.forEach(x->{
|
||||
PartnerClerkVO partnerClerkVO = new PartnerClerkVO();
|
||||
partnerClerkVO.setPartnerId(x.getPartnerId());
|
||||
partnerClerkVO.setPartnerLineId(x.getPartnerLineId());
|
||||
partnerClerkVO.setAge(x.getAge());
|
||||
partnerClerkVO.setChooseReason(x.getChooseReason());
|
||||
partnerClerkVO.setUsername(x.getUsername());
|
||||
partnerClerkVO.setRelationship(x.getRelationship());
|
||||
result.add(partnerClerkVO);
|
||||
});
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.cool.store.dao.HyPartnerClerkDAO;
|
||||
import com.cool.store.entity.HyPartnerClerkDO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.request.PartnerClerkInfoRequest;
|
||||
import com.cool.store.service.HyPartnerClerkService;
|
||||
import com.cool.store.utils.StringUtil;
|
||||
import com.cool.store.vo.PartnerClerkVO;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.collections4.ListUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Author wxp
|
||||
* @Date 2023/6/14 21:37
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Service
|
||||
public class HyPartnerClerkServiceImpl implements HyPartnerClerkService {
|
||||
|
||||
@Resource
|
||||
HyPartnerClerkDAO hyPartnerClerkDAO;
|
||||
|
||||
@Override
|
||||
public List<PartnerClerkVO> getPartnerClerkList(Long lineId) {
|
||||
List<HyPartnerClerkDO> hyPartnerClerkList = hyPartnerClerkDAO.getHyPartnerClerkList(lineId);
|
||||
List<PartnerClerkVO> result= new ArrayList<>();
|
||||
hyPartnerClerkList.forEach(x->{
|
||||
PartnerClerkVO partnerClerkVO = new PartnerClerkVO();
|
||||
partnerClerkVO.setPartnerId(x.getPartnerId());
|
||||
partnerClerkVO.setPartnerLineId(x.getPartnerLineId());
|
||||
partnerClerkVO.setAge(x.getAge());
|
||||
partnerClerkVO.setChooseReason(x.getChooseReason());
|
||||
partnerClerkVO.setUsername(x.getUsername());
|
||||
partnerClerkVO.setRelationship(x.getRelationship());
|
||||
result.add(partnerClerkVO);
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean submitPartnerClerkInfo(PartnerClerkInfoRequest request) {
|
||||
if (StringUtil.isBlank(request.getPartnerId()) || Objects.isNull(request.getPartnerLineId()) || CollectionUtils.isEmpty(request.getPartnerClerkRequestList())){
|
||||
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||
}
|
||||
hyPartnerClerkDAO.deleteByPartnerIdAndLineId(request.getPartnerId(), request.getPartnerLineId());
|
||||
List<HyPartnerClerkDO> clerkDOList = new ArrayList<>();
|
||||
request.getPartnerClerkRequestList().stream().forEach(x->{
|
||||
HyPartnerClerkDO clerkDO = new HyPartnerClerkDO();
|
||||
clerkDO.setPartnerLineId(request.getPartnerLineId());
|
||||
clerkDO.setPartnerId(request.getPartnerId());
|
||||
clerkDO.setUsername(x.getUsername());
|
||||
clerkDO.setRelationship(x.getRelationship());
|
||||
clerkDO.setAge(x.getAge());
|
||||
clerkDO.setChooseReason(x.getChooseReason());
|
||||
clerkDOList.add(clerkDO);
|
||||
});
|
||||
hyPartnerClerkDAO.batchInsert(clerkDOList);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PartnerClerkVO> queryPartnerClerkInfo(String partnerId, Long lineId) {
|
||||
List<HyPartnerClerkDO> clerkDOList = hyPartnerClerkDAO.listByPartnerIdAndLineId(partnerId, lineId);
|
||||
List<PartnerClerkVO> clerkVOList = ListUtils.emptyIfNull(clerkDOList).stream().map(clerkDO -> {
|
||||
PartnerClerkVO clerkVO = new PartnerClerkVO();
|
||||
BeanUtil.copyProperties(clerkDO, clerkVO);
|
||||
return clerkVO;
|
||||
}).collect(Collectors.toList());
|
||||
return clerkVOList;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,27 +1,35 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.dao.HyPartnerBaseInfoDAO;
|
||||
import com.cool.store.dao.HyPartnerIntentInfoDAO;
|
||||
import com.cool.store.dao.HyPartnerLineInfoDAO;
|
||||
import com.cool.store.dao.HyPartnerUserInfoDAO;
|
||||
import com.cool.store.dto.partner.PartnerIntentApplyInfoDTO;
|
||||
import com.cool.store.entity.HyPartnerIntentInfoDO;
|
||||
import com.cool.store.entity.HyPartnerUserInfoDO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.WorkflowStageEnum;
|
||||
import com.cool.store.enums.WorkflowStatusEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.request.BaseUserInfoRequest;
|
||||
import com.cool.store.request.PartnerIntentInfoRequest;
|
||||
import com.cool.store.service.HyPartnerIntentInfoService;
|
||||
import com.cool.store.utils.StringUtil;
|
||||
import com.cool.store.vo.PartnerIntentApplyInfoVO;
|
||||
import com.cool.store.vo.PartnerIntentInfoVO;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -73,17 +81,6 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic
|
||||
return partnerIntentApplyInfo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PartnerIntentApplyInfoVO getPartnerIntentApplyInfo(Long lineId) {
|
||||
PartnerIntentApplyInfoDTO partnerIntentApplyInfoDTO= hyPartnerIntentInfoDAO.selectByLineId(lineId);
|
||||
PartnerIntentApplyInfoVO partnerIntentApplyInfoVO = partnerIntentApplyInfoDTOToVo(partnerIntentApplyInfoDTO);
|
||||
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByPartnerId(partnerIntentApplyInfoDTO.getPartnerId());
|
||||
partnerIntentApplyInfoVO.setPartnerUserName(hyPartnerUserInfoDO.getUsername());
|
||||
partnerIntentApplyInfoVO.setPartnerUserPhone(hyPartnerUserInfoDO.getMobile());
|
||||
//todo su 手机号归属地 意向申请区域名称
|
||||
return partnerIntentApplyInfoVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean updatePartnerIntentInfo(BaseUserInfoRequest baseUserInfoRequest) {
|
||||
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByPartnerId(String.valueOf(baseUserInfoRequest.getPartnerId()));
|
||||
@@ -102,6 +99,68 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PartnerIntentInfoVO getPartnerIntentApplyDetail(Long lineId) {
|
||||
HyPartnerIntentInfoDO hyPartnerIntentInfoDO= hyPartnerIntentInfoDAO.selectByLineId(lineId);
|
||||
PartnerIntentInfoVO partnerIntentInfoVO = convertPartnerIntentApplyInfoDOToVO(hyPartnerIntentInfoDO);
|
||||
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByPartnerId(hyPartnerIntentInfoDO.getPartnerId());
|
||||
partnerIntentInfoVO.setPartnerUserName(hyPartnerUserInfoDO.getUsername());
|
||||
partnerIntentInfoVO.setPartnerUserPhone(hyPartnerUserInfoDO.getMobile());
|
||||
//todo su 手机号归属地 意向申请区域名称
|
||||
return partnerIntentInfoVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean submitPartnerIntentInfo(PartnerIntentInfoRequest request) {
|
||||
if (StringUtil.isBlank(request.getPartnerId()) || Objects.isNull(request.getPartnerLineId())){
|
||||
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||
}
|
||||
HyPartnerIntentInfoDO intentInfoDO = hyPartnerIntentInfoDAO.getByPartnerIdAndLineId(request.getPartnerId(), request.getPartnerLineId());
|
||||
if(intentInfoDO == null){
|
||||
intentInfoDO = new HyPartnerIntentInfoDO();
|
||||
fillIntentInfo(intentInfoDO, request);
|
||||
hyPartnerIntentInfoDAO.insertSelective(intentInfoDO);
|
||||
}else {
|
||||
fillIntentInfo(intentInfoDO, request);
|
||||
hyPartnerIntentInfoDAO.updateByPrimaryKeySelective(intentInfoDO);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PartnerIntentInfoVO queryPartnerIntentInfo(String partnerId, Long lineId) {
|
||||
HyPartnerIntentInfoDO intentInfoDO = hyPartnerIntentInfoDAO.getByPartnerIdAndLineId(partnerId, lineId);
|
||||
if (intentInfoDO == null){
|
||||
throw new ServiceException(ErrorCodeEnum.INTENT_INFO_NOT_EXIST);
|
||||
}
|
||||
PartnerIntentInfoVO intentInfoVO = new PartnerIntentInfoVO();
|
||||
BeanUtil.copyProperties(intentInfoDO, intentInfoVO);
|
||||
return intentInfoVO;
|
||||
}
|
||||
|
||||
private void fillIntentInfo(HyPartnerIntentInfoDO intentInfoDO, PartnerIntentInfoRequest request) {
|
||||
intentInfoDO.setPartnerId(request.getPartnerId());
|
||||
intentInfoDO.setPartnerLineId(request.getPartnerLineId());
|
||||
intentInfoDO.setLiveArea(request.getLiveArea());
|
||||
intentInfoDO.setWantShopArea(request.getWantShopArea());
|
||||
intentInfoDO.setAcceptAdjustType(request.getAcceptAdjustType());
|
||||
intentInfoDO.setIsHaveWantShop(request.getIsHaveWantShop());
|
||||
intentInfoDO.setWantShopInfo(request.getWantShopInfo());
|
||||
intentInfoDO.setMaxBudget(request.getMaxBudget());
|
||||
intentInfoDO.setMoneySource(request.getMoneySource());
|
||||
intentInfoDO.setMoneyProve(String.join(",", request.getMoneyProve()));
|
||||
intentInfoDO.setEducation(request.getEducation());
|
||||
intentInfoDO.setWorkYear(request.getWorkYear());
|
||||
intentInfoDO.setIsHaveWorkExp(request.getIsHaveWorkExp());
|
||||
intentInfoDO.setWorkExp(request.getWorkExp());
|
||||
intentInfoDO.setIsConsumer(request.getIsConsumer());
|
||||
intentInfoDO.setOtherBand(request.getOtherBand());
|
||||
intentInfoDO.setBrandStrength(request.getBrandStrength());
|
||||
intentInfoDO.setNeedImprove(request.getNeedImprove());
|
||||
intentInfoDO.setStrength(request.getStrength());
|
||||
intentInfoDO.setWeakness(request.getWeakness());
|
||||
}
|
||||
|
||||
/**
|
||||
* partnerIntentApplyInfoDTOToVo
|
||||
* @param partnerIntentApplyInfoDTO
|
||||
@@ -121,4 +180,37 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param hyPartnerIntentInfoDO
|
||||
* @return
|
||||
*/
|
||||
private PartnerIntentInfoVO convertPartnerIntentApplyInfoDOToVO(HyPartnerIntentInfoDO hyPartnerIntentInfoDO){
|
||||
PartnerIntentInfoVO partnerIntentInfoVO = new PartnerIntentInfoVO();
|
||||
partnerIntentInfoVO.setId(hyPartnerIntentInfoDO.getId());
|
||||
partnerIntentInfoVO.setPartnerId(hyPartnerIntentInfoDO.getPartnerId());
|
||||
partnerIntentInfoVO.setPartnerLineId(hyPartnerIntentInfoDO.getPartnerLineId());
|
||||
partnerIntentInfoVO.setAcceptAdjustType(hyPartnerIntentInfoDO.getAcceptAdjustType());
|
||||
partnerIntentInfoVO.setLiveArea(hyPartnerIntentInfoDO.getLiveArea());
|
||||
partnerIntentInfoVO.setWantShopArea(hyPartnerIntentInfoDO.getWantShopArea());
|
||||
partnerIntentInfoVO.setEducation(hyPartnerIntentInfoDO.getEducation());
|
||||
partnerIntentInfoVO.setMaxBudget(hyPartnerIntentInfoDO.getMaxBudget());
|
||||
partnerIntentInfoVO.setBrandStrength(hyPartnerIntentInfoDO.getBrandStrength());
|
||||
partnerIntentInfoVO.setIsConsumer(hyPartnerIntentInfoDO.getIsConsumer());
|
||||
partnerIntentInfoVO.setIsHaveWantShop(hyPartnerIntentInfoDO.getIsHaveWantShop());
|
||||
partnerIntentInfoVO.setIsHaveWorkExp(hyPartnerIntentInfoDO.getIsHaveWorkExp());
|
||||
partnerIntentInfoVO.setMoneyProve(StringUtil.isEmpty(hyPartnerIntentInfoDO.getMoneyProve())?
|
||||
Lists.newArrayList(): JSONObject.parseArray(hyPartnerIntentInfoDO.getMoneyProve(),String.class));
|
||||
partnerIntentInfoVO.setMoneySource(hyPartnerIntentInfoDO.getMoneySource());
|
||||
partnerIntentInfoVO.setWorkYear(hyPartnerIntentInfoDO.getWorkYear());
|
||||
partnerIntentInfoVO.setWeakness(hyPartnerIntentInfoDO.getWeakness());
|
||||
partnerIntentInfoVO.setCreateTime(hyPartnerIntentInfoDO.getCreateTime());
|
||||
partnerIntentInfoVO.setOtherBand(hyPartnerIntentInfoDO.getOtherBand());
|
||||
partnerIntentInfoVO.setStrength(hyPartnerIntentInfoDO.getStrength());
|
||||
partnerIntentInfoVO.setNeedImprove(hyPartnerIntentInfoDO.getNeedImprove());
|
||||
return partnerIntentInfoVO;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -2,11 +2,12 @@ package com.cool.store.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.dao.EnterpriseUserDAO;
|
||||
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.dao.UserRegionMappingDAO;
|
||||
import com.cool.store.dto.partner.*;
|
||||
import com.cool.store.entity.EnterpriseUserDO;
|
||||
import com.cool.store.entity.HyPartnerLineInfoDO;
|
||||
import com.cool.store.entity.HyPartnerUserInfoDO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
@@ -16,24 +17,20 @@ import com.cool.store.enums.WorkflowStatusEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.request.CloseFollowRequest;
|
||||
import com.cool.store.request.LineRequest;
|
||||
import com.cool.store.service.EnterpriseUserService;
|
||||
import com.cool.store.service.HyPartnerLineInfoService;
|
||||
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;
|
||||
import com.cool.store.vo.*;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -48,6 +45,10 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
||||
HyPartnerLineInfoDAO hyPartnerLineInfoDAO;
|
||||
@Resource
|
||||
HyPartnerUserInfoDAO hyPartnerUserInfoDAO;
|
||||
@Resource
|
||||
EnterpriseUserDAO enterpriseUserDAO;
|
||||
@Resource
|
||||
UserRegionMappingDAO userRegionMappingDAO;
|
||||
|
||||
@Override
|
||||
public StageCountVO selectStagePendingCount(String userId) {
|
||||
@@ -138,7 +139,7 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
||||
@Override
|
||||
public PageInfo<BlackListVO> getBlackList(LineRequest LineRequest) {
|
||||
PageHelper.startPage(LineRequest.getPageNum(),LineRequest.getPageSize());
|
||||
PageInfo blackListDTOPageInfo = hyPartnerLineInfoDAO.getBlackList(LineRequest.getKeyWord(), LineRequest.getIntentArea(), LineRequest.getAcceptAdjustType());
|
||||
PageInfo blackListDTOPageInfo = hyPartnerLineInfoDAO.getBlackList(LineRequest.getUserNameKeyword(), LineRequest.getPhoneKeyword(),LineRequest.getIntentArea(), LineRequest.getAcceptAdjustType());
|
||||
List<PartnerBlackListDTO> list = blackListDTOPageInfo.getList();
|
||||
List<BlackListVO> result = new ArrayList<>();
|
||||
list.stream().forEach(x->{
|
||||
@@ -228,6 +229,68 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
||||
hyPartnerLineInfoDAO.updateByPrimaryKeySelective(hyPartnerLineInfoDO);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageInfo<PublicSeaLineListVo> publicSeaLineList(String userId, LineRequest lineRequest) {
|
||||
//确认是招商经理还是部门负责人
|
||||
EnterpriseUserDO userInfo = enterpriseUserDAO.getUserInfoById(userId);
|
||||
List<String> userIds = new ArrayList<>();
|
||||
if (userInfo.getIsLeader()){
|
||||
if (StringUtil.isNotEmpty(userInfo.getLeaderDeptIds())){
|
||||
List<String> regionIds = JSONObject.parseArray(userInfo.getLeaderDeptIds(), String.class);
|
||||
List<EnterpriseUserDO> enterpriseUserDOS = enterpriseUserDAO.searchUserByRegionIdsAndKeyword(regionIds, null, true);
|
||||
userIds =enterpriseUserDOS.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
||||
}
|
||||
}else {
|
||||
userIds = Arrays.asList(userId);
|
||||
}
|
||||
PageHelper.startPage(lineRequest.getPageNum(),lineRequest.getPageSize());
|
||||
PageInfo publicSeaLineList = hyPartnerLineInfoDAO.getPublicSeaLineList(lineRequest.getUserNameKeyword(), lineRequest.getPhoneKeyword(),
|
||||
lineRequest.getIntentArea(), lineRequest.getAcceptAdjustType(), lineRequest.getUpdateStartTime(), lineRequest.getUpdateEndTime(), userIds);
|
||||
|
||||
List<PublicSeaLineDTO> list = publicSeaLineList.getList();
|
||||
if (CollectionUtils.isEmpty(list)){
|
||||
return new PageInfo<>();
|
||||
}
|
||||
//上一次结束的线索
|
||||
List<String> partnerIdList = list.stream().map(PublicSeaLineDTO::getPartnerId).collect(Collectors.toList());
|
||||
List<HyPartnerLineInfoDO> partnerLastLine = hyPartnerLineInfoDAO.getPartnerLastLine(partnerIdList);
|
||||
List<String> investmentManagerIds = partnerLastLine.stream().map(HyPartnerLineInfoDO::getInvestmentManager).collect(Collectors.toList());
|
||||
List<EnterpriseUserDO> userInfoList = enterpriseUserDAO.getUserInfoByUserIds(investmentManagerIds);
|
||||
Map<String, String> mobileMap = userInfoList.stream().filter(x ->
|
||||
StringUtil.isNotEmpty(x.getMobile())).collect(Collectors.toMap(EnterpriseUserDO::getUserId, EnterpriseUserDO::getMobile));
|
||||
Map<String, HyPartnerLineInfoDO> hyPartnerLineInfoDOMap = partnerLastLine.stream().collect(Collectors.toMap(HyPartnerLineInfoDO::getPartnerId, data -> data));
|
||||
|
||||
List<LineCountDTO> followCountList = hyPartnerLineInfoDAO.getFollowCountList(partnerIdList);
|
||||
Map<String, Integer> countMap = followCountList.stream().collect(Collectors.toMap(LineCountDTO::getPartnerId, LineCountDTO::getFollowCount));
|
||||
|
||||
List<PublicSeaLineListVo> result = new ArrayList<>();
|
||||
list.forEach(x->{
|
||||
PublicSeaLineListVo publicSeaLineListVo = new PublicSeaLineListVo();
|
||||
|
||||
publicSeaLineListVo.setPartnerId(x.getPartnerId());
|
||||
publicSeaLineListVo.setCreateTime(x.getCreateTime());
|
||||
publicSeaLineListVo.setPartnerUserName(x.getUserName());
|
||||
publicSeaLineListVo.setPartnerUserPhone(x.getMobile());
|
||||
// TODO: 2023/6/15 手机号归属地
|
||||
publicSeaLineListVo.setPhoneAddress("");
|
||||
publicSeaLineListVo.setWantShopArea(x.getWantShopArea());
|
||||
publicSeaLineListVo.setId(x.getLineId());
|
||||
publicSeaLineListVo.setAcceptAdjustType(x.getAcceptAdjustType());
|
||||
publicSeaLineListVo.setFollowCount(countMap.getOrDefault(x.getPartnerId(),0));
|
||||
|
||||
HyPartnerLineInfoDO hy = hyPartnerLineInfoDOMap.getOrDefault(x.getPartnerId(), new HyPartnerLineInfoDO());
|
||||
publicSeaLineListVo.setRejectPublicReason(hy.getRejectPublicReason());
|
||||
publicSeaLineListVo.setRejectRealReason(hy.getRejectRealReason());
|
||||
publicSeaLineListVo.setLastCloseDate(hy.getCloseTime());
|
||||
publicSeaLineListVo.setLastInvestmentManager(hy.getInvestmentManager());
|
||||
publicSeaLineListVo.setPartnerUserPhone(mobileMap.get(hy.getInvestmentManager()));
|
||||
result.add(publicSeaLineListVo);
|
||||
});
|
||||
publicSeaLineList.setList(result);
|
||||
return publicSeaLineList;
|
||||
}
|
||||
|
||||
/**
|
||||
* convertPartnerBlackListDTOToVo
|
||||
* @param partnerBlackListDTO
|
||||
|
||||
@@ -2,8 +2,11 @@ package com.cool.store.service.impl;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.cool.store.dto.partner.EnterInterviewDto;
|
||||
import com.cool.store.entity.HyPartnerInterviewDO;
|
||||
import com.cool.store.entity.HyPartnerInterviewPlanDO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mapper.HyPartnerInterviewMapper;
|
||||
import com.cool.store.mapper.HyPartnerInterviewPlanMapper;
|
||||
import com.cool.store.request.EntrustOthersReq;
|
||||
@@ -11,10 +14,14 @@ import com.cool.store.request.FinishInterviewReq;
|
||||
import com.cool.store.request.GetInterviewListReq;
|
||||
import com.cool.store.request.ModifyInterviewTimeReq;
|
||||
import com.cool.store.service.InterviewService;
|
||||
import com.cool.store.utils.TRTCUtils;
|
||||
import com.cool.store.vo.EnterInterviewVO;
|
||||
import com.cool.store.vo.interview.InterviewVO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@@ -28,9 +35,18 @@ import java.util.List;
|
||||
@Service
|
||||
public class InterviewServiceImpl implements InterviewService {
|
||||
|
||||
@Value("${trtc.sdkAppId}")
|
||||
private Long sdkAppId;
|
||||
|
||||
@Value("${trtc.secretKey}")
|
||||
private String key;
|
||||
|
||||
@Autowired
|
||||
private HyPartnerInterviewPlanMapper hyPartnerInterviewPlanMapper;
|
||||
|
||||
@Autowired
|
||||
private HyPartnerInterviewMapper interviewMapper;
|
||||
|
||||
@Autowired
|
||||
private HyPartnerInterviewMapper hyPartnerInterviewMapper;
|
||||
@Override
|
||||
@@ -97,6 +113,35 @@ public class InterviewServiceImpl implements InterviewService {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 进入面试间的方法
|
||||
* 修改一些面试状态
|
||||
* 最后返回 userSign 用于进入腾讯云音视频房间
|
||||
*
|
||||
* @return userSign 进入视频所需签名
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public EnterInterviewVO enterInterviewRoom(EnterInterviewDto dto) {
|
||||
try {
|
||||
//1. 将面试状态改为 --> 2已开始
|
||||
interviewMapper.updateInterviewStatus(dto.getInterviewId(), 2);
|
||||
//3. 修改面试实际开始时间,以第一个人进来的时间为准,后续不再修改
|
||||
interviewMapper.updateActualStartTime(dto.getInterviewId(), DateUtil.now());
|
||||
//4. 修改加盟商或面试官进入面试时间
|
||||
interviewMapper.updateEnterTime(dto.getInterviewId(), dto.getUserType(), DateUtil.now());
|
||||
//5. 加盟商如果进入了,就修改面试计划表 is_partner_interview 字段
|
||||
interviewMapper.updateWhetherPartnerEnter(dto.getInterviewId());
|
||||
//6. 查询对应的面试官id、姓名及加盟商姓名
|
||||
EnterInterviewVO vo = interviewMapper.getInterviewerByInterviewId(dto.getInterviewId());
|
||||
//生成 userSign
|
||||
String userSig = TRTCUtils.genUserSig(sdkAppId, key, dto.getUserId());
|
||||
vo.setUserSign(userSig);
|
||||
return vo;
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException(ErrorCodeEnum.INTERVIEW_ENTER_FAIL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -2,16 +2,16 @@ package com.cool.store.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.cool.store.dto.partner.EnterInterviewDto;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mapper.HyPartnerInterviewMapper;
|
||||
import com.cool.store.oss.OSSServer;
|
||||
import com.cool.store.service.PartnerInterviewService;
|
||||
import com.cool.store.utils.PDFUtils;
|
||||
import com.cool.store.utils.PassLetterUtils;
|
||||
import com.cool.store.utils.TRTCUtils;
|
||||
import com.cool.store.vo.PartnerEnterInterviewVO;
|
||||
import com.cool.store.vo.EnterInterviewVO;
|
||||
import com.cool.store.vo.PartnerInterviewInfoVO;
|
||||
import com.cool.store.vo.PartnerPassLetterDetailVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -19,8 +19,7 @@ import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.io.*;
|
||||
|
||||
@Service
|
||||
public class PartnerInterviewServiceImpl implements PartnerInterviewService {
|
||||
@@ -28,6 +27,9 @@ public class PartnerInterviewServiceImpl implements PartnerInterviewService {
|
||||
@Autowired
|
||||
private HyPartnerInterviewMapper interviewMapper;
|
||||
|
||||
@Autowired
|
||||
private OSSServer ossServer;
|
||||
|
||||
@Value("${trtc.sdkAppId}")
|
||||
private Long sdkAppId;
|
||||
|
||||
@@ -54,7 +56,7 @@ public class PartnerInterviewServiceImpl implements PartnerInterviewService {
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public PartnerEnterInterviewVO enterInterviewRoom(EnterInterviewDto dto) {
|
||||
public EnterInterviewVO enterInterviewRoom(EnterInterviewDto dto) {
|
||||
try {
|
||||
//1. 将面试状态改为 --> 2已开始
|
||||
interviewMapper.updateInterviewStatus(dto.getInterviewId(), 2);
|
||||
@@ -64,13 +66,11 @@ public class PartnerInterviewServiceImpl implements PartnerInterviewService {
|
||||
interviewMapper.updateEnterTime(dto.getInterviewId(), dto.getUserType(), DateUtil.now());
|
||||
//5. 加盟商如果进入了,就修改面试计划表 is_partner_interview 字段
|
||||
interviewMapper.updateWhetherPartnerEnter(dto.getInterviewId());
|
||||
//6. 查询对应的面试官id
|
||||
String interviewId = interviewMapper.getInterviewerByInterviewId(dto.getInterviewId());
|
||||
//6. 查询对应的面试官id、姓名及加盟商姓名
|
||||
EnterInterviewVO vo = interviewMapper.getInterviewerByInterviewId(dto.getInterviewId());
|
||||
//生成 userSign
|
||||
String userSig = TRTCUtils.genUserSig(sdkAppId, key, dto.getUserId());
|
||||
PartnerEnterInterviewVO vo = new PartnerEnterInterviewVO();
|
||||
vo.setUserSign(userSig);
|
||||
vo.setInterviewerId(interviewId);
|
||||
return vo;
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException(ErrorCodeEnum.INTERVIEW_ENTER_FAIL);
|
||||
@@ -84,17 +84,8 @@ public class PartnerInterviewServiceImpl implements PartnerInterviewService {
|
||||
@Override
|
||||
public PartnerPassLetterDetailVO passLetterDetail(String interviewId) {
|
||||
PartnerPassLetterDetailVO vo = interviewMapper.getPassLetterDetail(interviewId);
|
||||
//有效期为审批通过次日起第 60 天的 23:59:59,由此倒推 createTime
|
||||
DateTime expiryDate = DateUtil.parseDate(vo.getExpiryDate());
|
||||
DateTime createTime = DateUtil.offsetDay(expiryDate, -61);
|
||||
vo.setCreateTime(DateUtil.format(createTime, "yyyy-MM-dd"));
|
||||
//解析意向开店区域为市级行政区
|
||||
String verifyCity = vo.getVerifyCity();
|
||||
if (verifyCity == null) {
|
||||
String passCode = PassLetterUtils.genPassLetter(vo.getPartnerName(), verifyCity, vo.getPassCode(), createTime);
|
||||
vo.setPassCode(passCode);
|
||||
return vo;
|
||||
}
|
||||
String[] split = verifyCity.split("/");
|
||||
//根据长度来取市级行政区域
|
||||
if (split.length == 2) {
|
||||
@@ -106,9 +97,35 @@ public class PartnerInterviewServiceImpl implements PartnerInterviewService {
|
||||
} else {
|
||||
System.out.println("wrong");
|
||||
}
|
||||
String passCode = PassLetterUtils.genPassLetter(vo.getPartnerName(), verifyCity, vo.getPassCode(), createTime);
|
||||
vo.setPassCode(passCode);
|
||||
// TODO 调用生成通过函和修改数据库数据的方法
|
||||
String passCode = genPassLetterAndUpdateDB(vo, interviewId);
|
||||
//再查一次 vo
|
||||
vo = interviewMapper.getPassLetterDetail(interviewId);
|
||||
//有效期为审批通过次日起第 60 天的 23:59:59,由此倒推 createTime
|
||||
DateTime expiryDate = DateUtil.parseDate(vo.getExpiryDate());
|
||||
DateTime createTime = DateUtil.offsetDay(expiryDate, -60);
|
||||
vo.setCreateTime(DateUtil.format(createTime, "yyyy-MM-dd"));
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO 暂时将生成 passLetter 并上传 OSS 和修改数据库对应信息的方法放在这里,实际应该在 800 的回调方法中
|
||||
* @return passCode
|
||||
*/
|
||||
private String genPassLetterAndUpdateDB(PartnerPassLetterDetailVO passLetterDetail, String interviewId) {
|
||||
//已经有 passCode 的话就不要再生成了,默认上游全部数据都正确
|
||||
if (ObjectUtil.isEmpty(passLetterDetail.getPassCode())) {
|
||||
DateTime createTime = DateUtil.date();
|
||||
String code = passLetterDetail.getPassCode() == null ? PassLetterUtils.genPassCode(createTime) : passLetterDetail.getPassCode();
|
||||
ByteArrayOutputStream outputStream = PassLetterUtils.genPassLetter(passLetterDetail.getPartnerName(), code, passLetterDetail.getVerifyCity(), createTime);
|
||||
ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray());
|
||||
String passFileUrl = ossServer.uploadFileServer(inputStream, "partner/passLetter/" + code + ".pdf");
|
||||
//计算有效期截至日期
|
||||
DateTime expiryDate = DateUtil.offsetDay(createTime, 60);
|
||||
String expiryDateStr = DateUtil.format(expiryDate, "yyyy-MM-dd") + " 23:59:59";
|
||||
interviewMapper.updatePassLetterInfo(code, passFileUrl, expiryDateStr, interviewId);
|
||||
}
|
||||
return passLetterDetail.getPassCode();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.dao.HyPartnerUserInfoDAO;
|
||||
import com.cool.store.entity.HyPartnerUserInfoDO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.service.PartnerUserInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -11,4 +15,27 @@ public class PartnerUserInfoServiceImpl implements PartnerUserInfoService {
|
||||
@Autowired
|
||||
private HyPartnerUserInfoDAO hyPartnerUserInfoDAO;
|
||||
|
||||
@Override
|
||||
public HyPartnerUserInfoDO selectByPartnerId(String partnerId) {
|
||||
return hyPartnerUserInfoDAO.selectByPartnerId(partnerId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean queryJoinNotice(String partnerId) {
|
||||
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByPartnerId(partnerId);
|
||||
if (hyPartnerUserInfoDO==null){
|
||||
throw new ServiceException(ErrorCodeEnum.PARTNER_USER_NOT_EXIST);
|
||||
}
|
||||
return hyPartnerUserInfoDO.getIsWritePartnerKnow() == 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean completeJoinNotice(String partnerId) {
|
||||
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByPartnerId(partnerId);
|
||||
if (hyPartnerUserInfoDO == null){
|
||||
throw new ServiceException(ErrorCodeEnum.PARTNER_USER_NOT_EXIST);
|
||||
}
|
||||
hyPartnerUserInfoDAO.updateJoinKnowById(CommonConstants.ONE, hyPartnerUserInfoDO.getId());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -201,13 +201,26 @@ public class ZoneServiceImpl implements ZoneService {
|
||||
List<Long> openAreaIdList = list.stream().map(ZoneCheckDTO::getOpenAreaMappingId).collect(Collectors.toList());
|
||||
List<HyOpenAreaInfoDO> hyOpenAreaInfoDOList = openAreaInfoDAO.selectByIds(openAreaIdList);
|
||||
Map<Long, String> areaNameMap = hyOpenAreaInfoDOList.stream().collect(Collectors.toMap(HyOpenAreaInfoDO::getId, HyOpenAreaInfoDO::getAreaName));
|
||||
List<ZoneCheckVO> reslut = new ArrayList<>();
|
||||
List<ZoneCheckVO> result = new ArrayList<>();
|
||||
list.forEach(x->{
|
||||
ZoneCheckVO zoneCheckVO = new ZoneCheckVO();
|
||||
zoneCheckVO.setZoneName(x.getZoneName());
|
||||
String areaName = areaNameMap.get(x.getOpenAreaMappingId());
|
||||
zoneCheckVO.setAreaName(areaName);
|
||||
result.add(zoneCheckVO);
|
||||
});
|
||||
return reslut;
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> queryAllBingZoneRegionList(String type) {
|
||||
PageInfo<HyIntendDevZoneInfoDO> intend = hyIntendDevZoneInfoDAO.getHyIntendDevZoneInfoList(type);
|
||||
List<HyIntendDevZoneInfoDO> list = intend.getList();
|
||||
List<String> resultList = list.stream().filter(x->StringUtil.isNotEmpty(x.getAssociatedRegionId()))
|
||||
.flatMap(HyIntendDevZoneInfoDO -> JSONObject.parseArray(HyIntendDevZoneInfoDO.getAssociatedRegionId(), String.class).stream())
|
||||
.collect(Collectors.toList());
|
||||
return resultList;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -32,14 +32,16 @@ public class ContentController {
|
||||
|
||||
@PostMapping("/delete")
|
||||
@ApiOperation("删除动态")
|
||||
public void deleteContent(@RequestParam(value = "contentId") String contentId) {
|
||||
public ResponseResult deleteContent(@RequestParam(value = "contentId") String contentId) {
|
||||
contentService.deleteContent(contentId);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
@PostMapping("/modify")
|
||||
@ApiOperation("修改动态")
|
||||
public void updateContent(@RequestBody ContentUpdateDto dto) {
|
||||
public ResponseResult updateContent(@RequestBody ContentUpdateDto dto) {
|
||||
contentService.updateContent(dto);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
@PostMapping("/queryContentList")
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
package com.cool.store.controller;
|
||||
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.dto.calendar.UserCalendarsEventDTO;
|
||||
import com.cool.store.enums.LineStatusEnum;
|
||||
import com.cool.store.exception.ApiException;
|
||||
import com.cool.store.http.ISVHttpRequest;
|
||||
import com.cool.store.request.*;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.*;
|
||||
@@ -36,7 +39,10 @@ public class DeskController {
|
||||
HyPartnerLineInfoService hyPartnerLineInfoService;
|
||||
@Resource
|
||||
HyPartnerBaseInfoService hyPartnerBaseInfoService;
|
||||
|
||||
@Resource
|
||||
private ISVHttpRequest isvHttpRequest;
|
||||
@Resource
|
||||
EnterpriseUserService enterpriseUserService;
|
||||
|
||||
|
||||
@GetMapping(path = "/interviewSchedule")
|
||||
@@ -48,14 +54,35 @@ public class DeskController {
|
||||
}
|
||||
|
||||
|
||||
@GetMapping(path = "/getInvestmentManagerList")
|
||||
@ApiOperation("招商经理")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "type", value = "allocation-招商经理 transfer", required = false),
|
||||
@ApiImplicitParam(name = "keyword", value = "keyword", required = false),
|
||||
})
|
||||
public ResponseResult<List<EnterpriseUserSingleInfoVO>> getInvestmentManagerList(String type,String keyword){
|
||||
return ResponseResult.success(enterpriseUserService.getInvestmentManagerList(type,CurrentUserHolder.getUserId(),keyword));
|
||||
}
|
||||
|
||||
|
||||
@GetMapping(path = "/getUserCalendarsEvents")
|
||||
@ApiOperation("飞书日程信息")
|
||||
public ResponseResult<List<UserCalendarsEventDTO>> getUserCalendarsEvents(@RequestParam(value = "startTime",required = true) Long startTime,
|
||||
@RequestParam(value = "endTime",required = true) Long endTime) throws ApiException {
|
||||
|
||||
String userId = CurrentUserHolder.getUserId();
|
||||
return ResponseResult.success(isvHttpRequest.getUserCalendarsEvents(userId,startTime,endTime));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@GetMapping(path = "/queryStageCount")
|
||||
@ApiOperation("招商经理视角====各阶段待处理待跟进数量")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "type", value = "类型 待处理-Pending 待跟进-follow", required = false),
|
||||
})
|
||||
public ResponseResult<StageCountVO> queryStageCount(@RequestParam(value = "type",required = false)String type){
|
||||
String userId = "";
|
||||
return ResponseResult.success(deskService.getStageCountByType(userId,type));
|
||||
return ResponseResult.success(deskService.getStageCountByType(CurrentUserHolder.getUserId(),type));
|
||||
}
|
||||
|
||||
@GetMapping(path = "/queryInterviewPlan")
|
||||
@@ -118,8 +145,8 @@ public class DeskController {
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "lineId", value = "线索ID", required = false),
|
||||
})
|
||||
public ResponseResult<PartnerIntentApplyInfoVO> getPartnerIntentInfo(@RequestParam(value = "lineId",required = false)Long lineId){
|
||||
return ResponseResult.success(hyPartnerIntentInfoService.getPartnerIntentApplyInfo(lineId));
|
||||
public ResponseResult<PartnerIntentInfoVO> getPartnerIntentInfo(@RequestParam(value = "lineId",required = false)Long lineId){
|
||||
return ResponseResult.success(hyPartnerIntentInfoService.getPartnerIntentApplyDetail(lineId));
|
||||
}
|
||||
|
||||
|
||||
@@ -176,7 +203,6 @@ public class DeskController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
@PostMapping(path = "/queryPublicSeqLineList")
|
||||
@ApiOperation("公海列表")
|
||||
public ResponseResult<PageInfo<PublicSeaLineListVo>> queryPublicSeaLineList(@RequestBody LineRequest LineRequest){
|
||||
@@ -185,8 +211,6 @@ public class DeskController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@PostMapping(path = "/queryPrivateSeaLineList")
|
||||
@ApiOperation("私海列表")
|
||||
public ResponseResult<PageInfo<PrivateSeaLineListVo>> queryPrivateSeqLineList(@RequestBody PrivateSeaLineListRequest privateSeaLineListRequest){
|
||||
@@ -194,8 +218,6 @@ public class DeskController {
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@PostMapping(path = "/queryBlackList")
|
||||
@ApiOperation("黑名单列表")
|
||||
public ResponseResult<PageInfo<BlackListVO>> queryBlackList(@RequestBody LineRequest LineRequest){
|
||||
@@ -222,9 +244,7 @@ public class DeskController {
|
||||
@PostMapping(path = "/closeOrPassFollow")
|
||||
@ApiOperation("意向申请审核 结束跟进/通过流程")
|
||||
public ResponseResult<Boolean> closeOrPassFollow(@RequestBody CloseFollowRequest closeFollowRequest){
|
||||
|
||||
String userId = "";
|
||||
return ResponseResult.success(hyPartnerLineInfoService.closeOrPassFollow(userId,closeFollowRequest));
|
||||
return ResponseResult.success(hyPartnerLineInfoService.closeOrPassFollow(CurrentUserHolder.getUserId(),closeFollowRequest));
|
||||
}
|
||||
|
||||
@PostMapping(path = "/changeIntentInfo")
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
package com.cool.store.controller;
|
||||
|
||||
import com.cool.store.dto.partner.EnterInterviewDto;
|
||||
import com.cool.store.request.*;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.InterviewService;
|
||||
import com.cool.store.vo.EnterInterviewVO;
|
||||
import com.cool.store.vo.interview.InterviewVO;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
@@ -65,6 +67,10 @@ public class InterviewController {
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/enter")
|
||||
@ApiOperation("进入面试间")
|
||||
public ResponseResult<EnterInterviewVO> enterInterviewRoom(@RequestBody EnterInterviewDto dto) {
|
||||
return ResponseResult.success(interviewService.enterInterviewRoom(dto));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,11 +2,16 @@ package com.cool.store.controller;
|
||||
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.RegionService;
|
||||
import com.cool.store.service.ZoneService;
|
||||
import com.cool.store.vo.region.RegionBaseInfoVO;
|
||||
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.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -28,6 +33,8 @@ public class RegionController {
|
||||
|
||||
@Resource
|
||||
private RegionService regionService;
|
||||
@Resource
|
||||
ZoneService zoneService;
|
||||
|
||||
@GetMapping("/getRegionList")
|
||||
public ResponseResult<List<RegionBaseInfoVO>> getRegionBaseInfoList(){
|
||||
@@ -36,4 +43,13 @@ public class RegionController {
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("查询所有被绑定战区的组织机构")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "type", value = "intent-意向区域 development 开发区域", required = false)
|
||||
})
|
||||
@GetMapping("/queryAllBingZoneRegionList")
|
||||
public ResponseResult<List<String>> queryAllBingZoneRegionList(@RequestParam(value = "type",required = false)String type){
|
||||
return ResponseResult.success(zoneService.queryAllBingZoneRegionList(type));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.request.IntentAreaSettingRequest;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.ZoneService;
|
||||
import com.cool.store.vo.ZoneCheckVO;
|
||||
import com.cool.store.vo.ZoneVO;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
@@ -13,6 +14,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
@@ -32,6 +34,12 @@ public class ZoneController {
|
||||
return ResponseResult.success(zoneService.addZone( CurrentUserHolder.getUserId(),intentAreaSettingRequest));
|
||||
}
|
||||
|
||||
@PostMapping(path = "/checkZone")
|
||||
@ApiOperation("校验战区")
|
||||
public ResponseResult<List<ZoneCheckVO>> checkZone(@RequestBody IntentAreaSettingRequest intentAreaSettingRequest){
|
||||
return ResponseResult.success(zoneService.checkZone(intentAreaSettingRequest));
|
||||
}
|
||||
|
||||
@PostMapping(path = "/updateZone")
|
||||
@ApiOperation("编辑意向战区/开发战区")
|
||||
public ResponseResult<Boolean> updateZone(@RequestBody IntentAreaSettingRequest intentAreaSettingRequest){
|
||||
|
||||
@@ -3,25 +3,14 @@ package com.cool.store.controller;
|
||||
import com.cool.store.dto.partner.EnterInterviewDto;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.PartnerInterviewService;
|
||||
import com.cool.store.utils.PDFUtils;
|
||||
import com.cool.store.vo.PartnerEnterInterviewVO;
|
||||
import com.cool.store.vo.EnterInterviewVO;
|
||||
import com.cool.store.vo.PartnerInterviewInfoVO;
|
||||
import com.cool.store.vo.PartnerPassLetterDetailVO;
|
||||
import com.lowagie.text.Document;
|
||||
import com.lowagie.text.Image;
|
||||
import com.lowagie.text.pdf.PdfWriter;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.tomcat.util.http.fileupload.IOUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.ServletOutputStream;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.*;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
@Api(tags = "加盟商资格面试")
|
||||
@RestController
|
||||
@RequestMapping("interview")
|
||||
@@ -38,7 +27,7 @@ public class InterviewController {
|
||||
|
||||
@PostMapping("/enter")
|
||||
@ApiOperation("进入面试间")
|
||||
public ResponseResult<PartnerEnterInterviewVO> enterInterviewRoom(@RequestBody EnterInterviewDto dto) {
|
||||
public ResponseResult<EnterInterviewVO> enterInterviewRoom(@RequestBody EnterInterviewDto dto) {
|
||||
return ResponseResult.success(interviewService.enterInterviewRoom(dto));
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.cool.store.controller;
|
||||
|
||||
import com.cool.store.context.PartnerUserHolder;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.request.BaseUserInfoRequest;
|
||||
@@ -8,11 +9,12 @@ import com.cool.store.request.PartnerClerkInfoRequest;
|
||||
import com.cool.store.request.PartnerIntentInfoRequest;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.AliyunService;
|
||||
import com.cool.store.service.HyPartnerBaseInfoService;
|
||||
import com.cool.store.service.HyPartnerClerkService;
|
||||
import com.cool.store.service.HyPartnerIntentInfoService;
|
||||
import com.cool.store.service.PartnerUserInfoService;
|
||||
import com.cool.store.vo.*;
|
||||
import com.cool.store.vo.cuser.IdentityCardInfoVO;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
@@ -43,6 +45,14 @@ public class PartnerController {
|
||||
@Resource
|
||||
private AliyunService aliyunService;
|
||||
|
||||
@Resource
|
||||
private HyPartnerBaseInfoService hyPartnerBaseInfoService;
|
||||
@Resource
|
||||
private HyPartnerClerkService hyPartnerClerkService;
|
||||
|
||||
|
||||
|
||||
|
||||
@PostMapping(path = "/applyBaseInfo")
|
||||
@ApiOperation("提交基本信息")
|
||||
public ResponseResult<Boolean> applyBaseInfo(@RequestBody BaseUserInfoRequest baseUserInfoRequest){
|
||||
@@ -86,26 +96,24 @@ public class PartnerController {
|
||||
|
||||
@PostMapping(path = "/submitPartnerBaseInfo")
|
||||
@ApiOperation("提交加盟商基本信息")
|
||||
public ResponseResult<Boolean> submitPartnerBaseInfo(@RequestBody PartnerBaseInfoRequest PartnerBaseInfoRequest){
|
||||
|
||||
public ResponseResult<Boolean> submitPartnerBaseInfo(@RequestBody PartnerBaseInfoRequest baseInfoRequest){
|
||||
//前提 未提交加盟申请
|
||||
//成功 意向区域变更成功 失败 您已进入意向申请流程,当前不可变更意向区域
|
||||
return ResponseResult.success();
|
||||
return ResponseResult.success(hyPartnerBaseInfoService.submitPartnerBaseInfo(baseInfoRequest));
|
||||
}
|
||||
|
||||
@PostMapping(path = "/submitPartnerClerkInfo")
|
||||
@ApiOperation("提交加盟商店员信息")
|
||||
public ResponseResult<Boolean> submitPartnerClerkInfo(@RequestBody PartnerClerkInfoRequest partnerClerkInfoRequest){
|
||||
|
||||
return ResponseResult.success();
|
||||
return ResponseResult.success(hyPartnerClerkService.submitPartnerClerkInfo(partnerClerkInfoRequest));
|
||||
}
|
||||
|
||||
|
||||
@PostMapping(path = "/submitPartnerIntentInfo")
|
||||
@ApiOperation("提交加盟商意向信息/行业认知")
|
||||
public ResponseResult<Boolean> submitPartnerIntentInfo(@RequestBody PartnerIntentInfoRequest partnerIntentInfoRequest){
|
||||
|
||||
return ResponseResult.success();
|
||||
return ResponseResult.success(hyPartnerIntentInfoService.submitPartnerIntentInfo(partnerIntentInfoRequest));
|
||||
}
|
||||
|
||||
|
||||
@@ -114,7 +122,7 @@ public class PartnerController {
|
||||
@ApiOperation("修改加盟商店员信息")
|
||||
public ResponseResult<Boolean> changePartnerClerkInfo(@RequestBody PartnerClerkInfoRequest partnerClerkInfoRequest){
|
||||
|
||||
return ResponseResult.success();
|
||||
return ResponseResult.success(hyPartnerClerkService.submitPartnerClerkInfo(partnerClerkInfoRequest));
|
||||
}
|
||||
|
||||
|
||||
@@ -122,7 +130,7 @@ public class PartnerController {
|
||||
@ApiOperation("修改加盟商意向信息/行业认知")
|
||||
public ResponseResult<Boolean> changePartnerIntentInfo(@RequestBody PartnerIntentInfoRequest partnerIntentInfoRequest){
|
||||
|
||||
return ResponseResult.success();
|
||||
return ResponseResult.success(hyPartnerIntentInfoService.submitPartnerIntentInfo(partnerIntentInfoRequest));
|
||||
}
|
||||
|
||||
|
||||
@@ -147,9 +155,8 @@ public class PartnerController {
|
||||
@ApiImplicitParam(name = "lineId", value = "线索ID", required = false),
|
||||
})
|
||||
public ResponseResult<PartnerBaseInfoVO> queryPartnerBaseInfo(@RequestParam(value = "lineId",required = false)Long lineId){
|
||||
|
||||
|
||||
return ResponseResult.success();
|
||||
PartnerUserInfoVO userInfoVO = PartnerUserHolder.getUser();
|
||||
return ResponseResult.success(hyPartnerBaseInfoService.queryPartnerBaseInfo(userInfoVO.getPartnerId(), lineId));
|
||||
}
|
||||
|
||||
|
||||
@@ -160,8 +167,8 @@ public class PartnerController {
|
||||
})
|
||||
public ResponseResult<List<PartnerClerkVO>> queryPartnerClerkInfo(@RequestParam(value = "lineId",required = false)Long lineId){
|
||||
|
||||
|
||||
return ResponseResult.success();
|
||||
PartnerUserInfoVO userInfoVO = PartnerUserHolder.getUser();
|
||||
return ResponseResult.success(hyPartnerClerkService.queryPartnerClerkInfo(userInfoVO.getPartnerId(), lineId));
|
||||
}
|
||||
|
||||
|
||||
@@ -172,8 +179,8 @@ public class PartnerController {
|
||||
})
|
||||
public ResponseResult<PartnerIntentInfoVO> queryPartnerIntentInfo(@RequestParam(value = "lineId",required = false)Long lineId){
|
||||
|
||||
|
||||
return ResponseResult.success();
|
||||
PartnerUserInfoVO userInfoVO = PartnerUserHolder.getUser();
|
||||
return ResponseResult.success(hyPartnerIntentInfoService.queryPartnerIntentInfo(userInfoVO.getPartnerId(), lineId));
|
||||
}
|
||||
|
||||
|
||||
@@ -184,10 +191,8 @@ public class PartnerController {
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "partnerId", value = "加盟商ID", required = false),
|
||||
})
|
||||
public ResponseResult<Boolean> completeJoinNotice(@RequestParam(value = "partnerId",required = false)Long partnerId){
|
||||
|
||||
|
||||
return ResponseResult.success();
|
||||
public ResponseResult<Boolean> completeJoinNotice(@RequestParam(value = "partnerId",required = false)String partnerId){
|
||||
return ResponseResult.success(partnerUserInfoService.completeJoinNotice(partnerId));
|
||||
}
|
||||
|
||||
|
||||
@@ -196,10 +201,8 @@ public class PartnerController {
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "partnerId", value = "加盟商ID", required = false),
|
||||
})
|
||||
public ResponseResult<Boolean> queryJoinNotice(@RequestParam(value = "partnerId",required = false)Long partnerId){
|
||||
|
||||
|
||||
return ResponseResult.success();
|
||||
public ResponseResult<Boolean> queryJoinNotice(@RequestParam(value = "partnerId",required = false)String partnerId){
|
||||
return ResponseResult.success(partnerUserInfoService.queryJoinNotice(partnerId));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user