Merge remote-tracking branch 'origin/cc_20230520_partner' into cc_20230520_partner
# Conflicts: # coolstore-partner-dao/src/main/java/com/cool/store/mapper/HyPartnerInterviewPlanMapper.java # coolstore-partner-dao/src/main/resources/mapper/HyPartnerInterviewPlanMapper.xml
This commit is contained in:
@@ -98,6 +98,12 @@
|
||||
<artifactId>openpdf</artifactId>
|
||||
<version>1.3.30</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.icepdf.os/icepdf-core -->
|
||||
<dependency>
|
||||
<groupId>org.icepdf.os</groupId>
|
||||
<artifactId>icepdf-core</artifactId>
|
||||
<version>6.1.2</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -10,6 +10,8 @@ public class CommonConstants {
|
||||
|
||||
public static final String REQUEST_ID = "requestId";
|
||||
|
||||
public static final String MESSAGE_ID = "messageId";
|
||||
|
||||
public static final String ACCESS_TOKEN_KEY = "access_token";
|
||||
|
||||
public static final String REFRESH_TOKEN_KEY = "refresh_token";
|
||||
|
||||
@@ -189,6 +189,11 @@ public class RedisConstant {
|
||||
|
||||
public static final String STOREWORK_NOTICE_KEY = "storeWorkNoticeCache:{0}:{1}:{2}:{3}";
|
||||
|
||||
/**
|
||||
* 冷静期内是否首次登录 冷静期首次登录 是-true 否-false
|
||||
*/
|
||||
public static final String COOLINGPERIOD_FIRSTLOGIN_KEY = "coolingPeriodFirstLoginCache:{0}";
|
||||
|
||||
/**
|
||||
* 七天
|
||||
*/
|
||||
|
||||
@@ -48,6 +48,7 @@ public enum ErrorCodeEnum {
|
||||
IDENTITY_CARD_PARSE_FAIL(1021080, "身份证解析失败", null),
|
||||
PARAMS_REQUIRED(400002, "参数缺失!", null),
|
||||
DATA_CONVERT_ERROR(400002, "日期转换异常!", null),
|
||||
PARENT_NODE_NOT_EXIST(400002, "父节点不存在", null),
|
||||
|
||||
|
||||
LINE_ID_IS_NOT_EXIST(500001, "线索ID不存在!", null),
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.cool.store.enums;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: IDCardSideEnum
|
||||
* @Description: 身份证正反面类型
|
||||
* @date 2023-06-16 16:49
|
||||
*/
|
||||
public enum IDCardSideEnum {
|
||||
|
||||
FACE("face", "正面"),
|
||||
BACK("back", "反面")
|
||||
;
|
||||
|
||||
private String code;
|
||||
|
||||
private String message;
|
||||
|
||||
IDCardSideEnum(String code, String message) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
}
|
||||
@@ -5,10 +5,16 @@ import com.lowagie.text.Font;
|
||||
import com.lowagie.text.Image;
|
||||
import com.lowagie.text.Paragraph;
|
||||
import com.lowagie.text.pdf.*;
|
||||
import org.icepdf.core.exceptions.PDFException;
|
||||
import org.icepdf.core.exceptions.PDFSecurityException;
|
||||
import org.icepdf.core.pobjects.Page;
|
||||
import org.icepdf.core.util.GraphicsRenderingHints;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import java.awt.*;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.awt.image.RenderedImage;
|
||||
import java.io.*;
|
||||
|
||||
/**
|
||||
* 使用 OpenPDF 封装的 pdf 工具类
|
||||
@@ -120,7 +126,46 @@ public class PDFUtils {
|
||||
throw new RuntimeException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* PDF 转图片
|
||||
* @param inputStream pdf 输入流
|
||||
* @param scale 缩放比例
|
||||
*/
|
||||
public static ByteArrayOutputStream pdf2Img(InputStream inputStream, float scale) {
|
||||
org.icepdf.core.pobjects.Document document = new org.icepdf.core.pobjects.Document();
|
||||
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
|
||||
try {
|
||||
document.setInputStream(inputStream, "");
|
||||
|
||||
float rotation = 0f;// 旋转角度
|
||||
for (int i = 0; i < document.getNumberOfPages(); i++) {
|
||||
BufferedImage image = (BufferedImage) document.getPageImage(i,
|
||||
GraphicsRenderingHints.SCREEN, Page.BOUNDARY_CROPBOX,
|
||||
rotation, scale);
|
||||
RenderedImage rendImage = image;
|
||||
try {
|
||||
ImageIO.write(rendImage, "png", outputStream);
|
||||
//例子中是pdf转png格式的,也可以将上面两行改成jpg,转出jpg格式的,
|
||||
//但是从转换效果来看png的清晰度会相对较高。有个小技巧是第一行行改成jpg,
|
||||
//但第二行使用png,也就是转换成jpg格式但有png清晰度的图片。
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
image.flush();
|
||||
document.dispose();
|
||||
return outputStream;
|
||||
}
|
||||
} catch (PDFException | PDFSecurityException | IOException e1) {
|
||||
e1.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
outputStream.close();
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
return outputStream;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import com.lowagie.text.Document;
|
||||
import com.lowagie.text.Image;
|
||||
import com.lowagie.text.pdf.BaseFont;
|
||||
import com.lowagie.text.pdf.PdfReader;
|
||||
import com.lowagie.text.pdf.PdfWriter;
|
||||
|
||||
@@ -41,15 +42,16 @@ public class PassLetterUtils {
|
||||
document.close();
|
||||
|
||||
//3. 填写通过函模板信息
|
||||
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);
|
||||
addContentToPdf(outputStream, partnerName + " 先生/女士", 122, 638);
|
||||
addContentToPdf(outputStream, passCode, 122, 557);
|
||||
addContentToPdf(outputStream, verifyCity, 155, 492);
|
||||
addContentToPdf(outputStream, "60天", 135, 448);
|
||||
addContentToPdf(outputStream, passTimeStr, 385, 152);
|
||||
return outputStream;
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
} finally {
|
||||
}
|
||||
finally {
|
||||
try {
|
||||
document.close();
|
||||
outputStream.close();
|
||||
@@ -73,8 +75,10 @@ public class PassLetterUtils {
|
||||
try {
|
||||
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) {
|
||||
String fontFamilyPath = PassLetterUtils.class.getResource("/static/Alibaba-PuHuiTi-Regular.ttf").getPath();
|
||||
BaseFont font = BaseFont.createFont(fontFamilyPath, BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
|
||||
PDFUtils.putParagraphAbsolutely(pdfReader, outputStream, x, y, content, font, 19, 1, new Color(255, 82,25));
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,4 +45,10 @@ public class HyPartnerBaseInfoDAO {
|
||||
return hyPartnerBaseInfoMapper.getByPartnerIdAndLineId(partnerId, partnerLineId);
|
||||
}
|
||||
|
||||
public Long getLineIdByIdCard(String idCard){
|
||||
if (StringUtils.isEmpty(idCard)){
|
||||
return null;
|
||||
}
|
||||
return hyPartnerBaseInfoMapper.getLineIdByIdCard(idCard);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.collections4.ListUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -61,4 +62,16 @@ public class RegionDAO {
|
||||
return ListUtils.emptyIfNull(regionList).stream().collect(Collectors.toMap(RegionDO::getRegionId, RegionDO::getName));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取区域
|
||||
* @param regionId
|
||||
* @return
|
||||
*/
|
||||
public RegionDO getRegionInfoByRegionId(String regionId){
|
||||
if(StringUtils.isBlank(regionId)){
|
||||
return null;
|
||||
}
|
||||
return regionMapper.getRegionInfoByRegionId(regionId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -36,4 +36,6 @@ public interface HyPartnerBaseInfoMapper {
|
||||
|
||||
HyPartnerBaseInfoDO getByPartnerIdAndLineId(@Param("partnerId") String partnerId, @Param("partnerLineId") Long partnerLineId);
|
||||
|
||||
Long getLineIdByIdCard(@Param("idCard") String idCard);
|
||||
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.entity.HyPartnerInterviewDO;
|
||||
import com.cool.store.vo.EnterInterviewVO;
|
||||
import com.cool.store.vo.EnterpriseUserBaseInfoVO;
|
||||
import com.cool.store.vo.PartnerInterviewInfoVO;
|
||||
import com.cool.store.vo.PartnerPassLetterDetailVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@@ -37,13 +38,13 @@ public interface HyPartnerInterviewMapper {
|
||||
* 修改面试状态
|
||||
* 预约状态 0 待预约;1待面试;2已开始;3待审核;4审批中;5审批通过;6拒绝
|
||||
*/
|
||||
int updateInterviewStatus(@Param("interviewId") String interviewId, @Param("status") Integer status);
|
||||
int updateInterviewStatus(@Param("interviewPlanId") String interviewPlanId, @Param("status") Integer status);
|
||||
|
||||
/**
|
||||
* 修改面试实际开始时间
|
||||
* @param dateTime "yyyy-MM-dd HH:mm:ss"
|
||||
*/
|
||||
int updateActualStartTime(@Param("interviewId") String interviewId, @Param("dateTime") String dateTime);
|
||||
int updateActualStartTime(@Param("interviewPlanId") String interviewPlanId, @Param("dateTime") String dateTime);
|
||||
|
||||
/**
|
||||
* 修改加盟商或面试官进入面试时间
|
||||
@@ -51,28 +52,28 @@ public interface HyPartnerInterviewMapper {
|
||||
* @param dateTime "yyyy-MM-dd HH:mm:ss"
|
||||
* @return
|
||||
*/
|
||||
int updateEnterTime(@Param("interviewId") String interviewId, @Param("userType") Integer userType, @Param("dateTime") String dateTime);
|
||||
int updateEnterTime(@Param("interviewPlanId") String interviewPlanId, @Param("userType") Integer userType, @Param("dateTime") String dateTime);
|
||||
|
||||
/**
|
||||
* 将加盟商是否参会修改为参会
|
||||
* 0未参加,1参加
|
||||
*/
|
||||
int updateWhetherPartnerEnter(@Param("interviewId") String interviewId);
|
||||
int updateWhetherPartnerEnter(@Param("interviewPlanId") String interviewPlanId);
|
||||
|
||||
/**
|
||||
* 根据会议 id 查询面试官 id
|
||||
*/
|
||||
EnterInterviewVO getInterviewerByInterviewId(@Param("interviewId") String interviewId);
|
||||
EnterInterviewVO getInterviewerByInterviewPlanId(@Param("interviewPlanId") String interviewPlanId);
|
||||
|
||||
/**
|
||||
* 获取通知函详情
|
||||
*/
|
||||
PartnerPassLetterDetailVO getPassLetterDetail(@Param("interviewId") String interviewId);
|
||||
PartnerPassLetterDetailVO getPassLetterDetail(@Param("interviewPlanId") String interviewPlanId);
|
||||
|
||||
/**
|
||||
* 生成通过函 pdf 后修改
|
||||
*/
|
||||
int updatePassLetterInfo(@Param("passCode") String passCode, @Param("passFileUrl") String passFileUrl, @Param("expiryDate") String expiryDate, @Param("interviewId") String interviewId);
|
||||
int updatePassLetterInfo(@Param("passCode") String passCode, @Param("passPdfUrl") String passPdfUrl, @Param("passImageUrl") String passImageUrl, @Param("expiryDate") String expiryDate, @Param("interviewId") String interviewId);
|
||||
|
||||
/**
|
||||
* 根据面试 id 查询面试信息
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.cool.store.dto.partner.PartnerInterviewInfoDTO;
|
||||
import com.cool.store.dto.partner.SpecialDateRangeInterviewCountDTO;
|
||||
import com.cool.store.entity.HyPartnerInterviewPlanDO;
|
||||
import com.cool.store.request.GetInterviewListReq;
|
||||
import com.cool.store.vo.EnterpriseUserBaseInfoVO;
|
||||
import com.cool.store.vo.interview.InterviewVO;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@@ -88,6 +89,11 @@ public interface HyPartnerInterviewPlanMapper {
|
||||
*/
|
||||
InterviewVO getInterviewInfo(String interviewId);
|
||||
|
||||
/**
|
||||
* 查询用户基本信息
|
||||
*/
|
||||
EnterpriseUserBaseInfoVO getEnterpriseUserBaseInfo(@Param("userId") String userId);
|
||||
|
||||
/**
|
||||
* 根据条件字段查询面试安排信息
|
||||
* @param record
|
||||
|
||||
@@ -51,4 +51,11 @@ public interface RegionMapper {
|
||||
* @return
|
||||
*/
|
||||
List<RegionDO> getRegionBaseInfoList();
|
||||
|
||||
/**
|
||||
* 获取区域信息
|
||||
* @param regionId
|
||||
* @return
|
||||
*/
|
||||
RegionDO getRegionInfoByRegionId(@Param("regionId") String regionId);
|
||||
}
|
||||
@@ -224,4 +224,11 @@
|
||||
where partner_id = #{partnerId} and partner_line_id = #{partnerLineId}
|
||||
</select>
|
||||
|
||||
<select id="getLineIdByIdCard" resultType="java.lang.Long">
|
||||
select
|
||||
partner_line_id
|
||||
from hy_partner_base_info
|
||||
where id_card = #{idCard}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -28,7 +28,7 @@
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="PartnerInterviewInfoVO" type="com.cool.store.vo.PartnerInterviewInfoVO">
|
||||
<id column="interviewId" property="interviewId"/>
|
||||
<id column="interviewId" property="interviewPlanId"/>
|
||||
<result column="partnerId" property="partnerId"/>
|
||||
<result column="interviewerId" property="interviewerId"/>
|
||||
<association property="partnerName" column="partnerId" select="queryPartnerName" javaType="string"/>
|
||||
@@ -259,7 +259,7 @@
|
||||
|
||||
<!-- 根据加盟商id查询面试信息 -->
|
||||
<select id="queryByPartnerId" resultMap="PartnerInterviewInfoVO">
|
||||
SELECT t1.id interviewId, `status`, start_time, end_time, room_id, t1.partner_id partnerId, t1.interviewer interviewerId
|
||||
SELECT t1.id interviewId, t1.id interview_id, t1.interview_plan_id, `status`, start_time, end_time, room_id, t1.partner_id partnerId, t1.interviewer interviewerId
|
||||
FROM hy_partner_interview t1
|
||||
LEFT JOIN hy_partner_interview_plan t2 ON t1.interview_plan_id = t2.id
|
||||
WHERE t1.partner_id = #{partnerId}
|
||||
@@ -280,18 +280,14 @@
|
||||
<update id="updateInterviewStatus">
|
||||
UPDATE hy_partner_interview
|
||||
SET `status` = #{status}
|
||||
WHERE id = #{interviewId}
|
||||
WHERE interview_plan_id = #{interviewPlanId}
|
||||
</update>
|
||||
|
||||
<!-- 修改面试实际开始时间 -->
|
||||
<update id="updateActualStartTime">
|
||||
UPDATE hy_partner_interview_plan
|
||||
SET actual_start_time = IF(actual_start_time IS NULL, #{dateTime}, actual_start_time)
|
||||
WHERE id = (
|
||||
SELECT interview_plan_id
|
||||
FROM hy_partner_interview
|
||||
WHERE id = #{interviewId}
|
||||
)
|
||||
WHERE id = #{interviewPlanId}
|
||||
</update>
|
||||
|
||||
<!-- 修改面试官或加盟商入会时间 -->
|
||||
@@ -305,32 +301,28 @@
|
||||
partner_enter_time = IF(partner_enter_time IS NULL, #{dateTime}, partner_enter_time)
|
||||
</if>
|
||||
</set>
|
||||
WHERE id = 1
|
||||
WHERE interview_plan_id = #{interviewPlanId}
|
||||
</update>
|
||||
|
||||
<!-- 修改加盟商参会状态为参加 -->
|
||||
<update id="updateWhetherPartnerEnter">
|
||||
UPDATE hy_partner_interview_plan
|
||||
SET is_partner_interview = 1
|
||||
WHERE id = (
|
||||
SELECT interview_plan_id
|
||||
FROM hy_partner_interview
|
||||
WHERE id = #{interviewId}
|
||||
)
|
||||
WHERE id = #{interviewPlanId}
|
||||
</update>
|
||||
|
||||
<!-- 根据会议 id 获取面试官 id -->
|
||||
<select id="getInterviewerByInterviewId" resultMap="partnerEnterInterviewVO">
|
||||
<select id="getInterviewerByInterviewPlanId" resultMap="partnerEnterInterviewVO">
|
||||
SELECT interviewer, interviewer interviewer_id, partner_id
|
||||
FROM hy_partner_interview
|
||||
WHERE id = #{interviewId}
|
||||
WHERE interview_plan_id = #{interviewPlanId}
|
||||
</select>
|
||||
|
||||
<!-- 获取通知函详情 -->
|
||||
<select id="getPassLetterDetail" resultMap="passLetterDetail">
|
||||
SELECT auth_code, pass_code, pass_file_url, expiry_date, partner_id
|
||||
SELECT auth_code, pass_code, pass_pdf_url, pass_image_url, expiry_date, partner_id
|
||||
FROM hy_partner_interview
|
||||
WHERE id = #{interviewId}
|
||||
WHERE interview_plan_id = #{interviewPlanId}
|
||||
</select>
|
||||
<!-- 获取意向开店区域 -->
|
||||
<select id="getVerifyCity" resultType="string">
|
||||
@@ -359,8 +351,11 @@
|
||||
<if test="passCode != null and passCode != ''">
|
||||
pass_code = #{passCode},
|
||||
</if>
|
||||
<if test="passFileUrl != null and passFileUrl != ''">
|
||||
pass_file_url = #{passFileUrl},
|
||||
<if test="passPdfUrl != null and passPdfUrl != ''">
|
||||
pass_pdf_url = #{passPdfUrl},
|
||||
</if>
|
||||
<if test="passImageUrl != null and passImageUrl != ''">
|
||||
pass_image_url = #{passImageUrl},
|
||||
</if>
|
||||
<if test="expiryDate != null and expiryDate != ''">
|
||||
expiry_date = #{expiryDate}
|
||||
|
||||
@@ -252,28 +252,28 @@
|
||||
left join hy_partner_line_info hpll on hpip.partner_line_id = hpll.id
|
||||
left join hy_partner_user_info hpui on hpui.partner_id = hpip.partner_id
|
||||
<where>
|
||||
<if test="record.partnerName !=null and partnerName!=''">
|
||||
<if test="record.partnerName !=null and record.partnerName!=''">
|
||||
hpui.username like concat('%',#{record.partnerName},'%')
|
||||
</if>
|
||||
<if test="record.partnerMobile !=null and partnerMobile!=''">
|
||||
<if test="record.partnerMobile !=null and record.partnerMobile!=''">
|
||||
hpui.mobile like concat('%',#{record.partnerMobile},'%')
|
||||
</if>
|
||||
<if test="record.roomId !=null and roomId!=''">
|
||||
<if test="record.roomId !=null and record.roomId!=''">
|
||||
hpip.room_id = #{record.roomId}
|
||||
</if>
|
||||
<if test="record.interviewerName !=null and interviewerName!=''">
|
||||
<if test="record.interviewerName !=null and record.interviewerName!=''">
|
||||
hpui.username like concat('%',#{record.interviewerName},'%')
|
||||
</if>
|
||||
<if test="record.interviewerMobile !=null and interviewerMobile!=''">
|
||||
<if test="record.interviewerMobile !=null and record.interviewerMobile!=''">
|
||||
hpui.mobile like concat('%',#{record.interviewerMobile},'%')
|
||||
</if>
|
||||
<if test="record.roomStatus !=null and roomStatus!=''">
|
||||
<if test="record.roomStatus !=null and record.roomStatus!=''">
|
||||
hpip.room_status = #{record.roomStatus}
|
||||
</if>
|
||||
<if test="record.startTime !=null and startTime!=''">
|
||||
<if test="record.startTime !=null and record.startTime!=''">
|
||||
hpip.start_time <= #{record.startTime}
|
||||
</if>
|
||||
<if test="record.endTime !=null and endTime!=''">
|
||||
<if test="record.endTime !=null and record.endTime!=''">
|
||||
hpip.end_time >= #{record.endTime}
|
||||
</if>
|
||||
</where>
|
||||
@@ -281,6 +281,17 @@
|
||||
</select>
|
||||
<select id="getInterviewInfo" resultType="com.cool.store.vo.interview.InterviewVO">
|
||||
select hpip.id as interviewId,
|
||||
hpi.qualify_verify_id as qualifyVerifyId,
|
||||
hpi.pass_time as passTime,
|
||||
hpi.pass_reason as passReason,
|
||||
hpi.recorder as recorderId,
|
||||
hpi.record_time as recordTime,
|
||||
hpi.summary as summary,
|
||||
hpi.process_info as processInfo,
|
||||
hpi.auth_code as processInfo,
|
||||
hpi.expiry_date as expiryDate,
|
||||
hpi.pass_pdf_url as passPdfUrl,
|
||||
hpi.pass_image_url as passImageUrl,
|
||||
hpui.username as partnerName,
|
||||
hpui.mobile as partnerMobile,
|
||||
hpip.room_id as roomId,
|
||||
@@ -336,4 +347,11 @@
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
<!-- 查询用户基本信息 -->
|
||||
<select id="getEnterpriseUserBaseInfo" resultType="com.cool.store.vo.EnterpriseUserBaseInfoVO">
|
||||
select name, mobile
|
||||
from enterprise_user
|
||||
where user_id = #{userId}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -13,10 +13,16 @@
|
||||
<result column="is_write_partner_know" jdbcType="TINYINT" property="isWritePartnerKnow" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="shop_code" jdbcType="VARCHAR" property="shopCode" />
|
||||
<result column="shop_name" jdbcType="VARCHAR" property="shopName" />
|
||||
<result column="shop_id" jdbcType="VARCHAR" property="shopId" />
|
||||
<result column="recommend_partner_id" jdbcType="VARCHAR" property="recommendPartnerId" />
|
||||
<result column="recommend_partner_name" jdbcType="VARCHAR" property="recommendPartnerName" />
|
||||
<result column="recommend_partner_mobile" jdbcType="VARCHAR" property="recommendPartnerMobile" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, partner_id, mobile, username, live_area, want_shop_area, accept_adjust_type,
|
||||
invite_code, is_write_partner_know, create_time, update_time
|
||||
invite_code, is_write_partner_know, create_time, update_time, shop_code, shop_name, shop_id, recommend_partner_id, recommend_partner_name, recommend_partner_mobile
|
||||
</sql>
|
||||
<select id="selectByPartnerId" resultMap="BaseResultMap" >
|
||||
select
|
||||
|
||||
@@ -187,4 +187,13 @@
|
||||
where
|
||||
deleted = 0
|
||||
</select>
|
||||
|
||||
<select id="getRegionInfoByRegionId" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from
|
||||
region
|
||||
where
|
||||
deleted = 0 and region_id= #{regionId}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -227,4 +227,47 @@ public class SysDepartmentDTO {
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
|
||||
public static RegionDO convertRegionDO(SysDepartmentDTO dept, Multimap<String, String> leaderDeptMap, RegionDO parentRegion){
|
||||
RegionDO region = new RegionDO();
|
||||
region.setRegionId(dept.getId());
|
||||
region.setName(dept.getName());
|
||||
region.setParentId(dept.getParentId());
|
||||
region.setUnclassifiedFlag(CommonConstants.ZERO);
|
||||
region.setLeaderUserId(dept.getLeaderUserId());
|
||||
region.setOrderNum(dept.getDepartOrder());
|
||||
region.setThirdDeptId(dept.getId());
|
||||
region.setCreateTime(System.currentTimeMillis());
|
||||
region.setUpdateTime(System.currentTimeMillis());
|
||||
String regionPath = parentRegion.getRegionPath() + region.getRegionId() + CommonConstants.PATH_SPILT;
|
||||
region.setRegionPath(regionPath);
|
||||
region.setDeleted(Boolean.FALSE);
|
||||
if(CollectionUtils.isNotEmpty(dept.getDeptManagerUseridList())){
|
||||
for (String leader : dept.getDeptManagerUseridList()) {
|
||||
leaderDeptMap.put(leader, dept.getId());
|
||||
}
|
||||
}
|
||||
return region;
|
||||
}
|
||||
|
||||
public static RegionDO convertRegionDO(SysDepartmentDTO dept, Multimap<String, String> leaderDeptMap){
|
||||
RegionDO region = new RegionDO();
|
||||
region.setRegionId(dept.getId());
|
||||
region.setName(dept.getName());
|
||||
region.setParentId(dept.getParentId());
|
||||
region.setUnclassifiedFlag(CommonConstants.ZERO);
|
||||
region.setLeaderUserId(dept.getLeaderUserId());
|
||||
region.setOrderNum(dept.getDepartOrder());
|
||||
region.setThirdDeptId(dept.getId());
|
||||
region.setCreateTime(System.currentTimeMillis());
|
||||
region.setUpdateTime(System.currentTimeMillis());
|
||||
region.setDeleted(Boolean.FALSE);
|
||||
if(CollectionUtils.isNotEmpty(dept.getDeptManagerUseridList())){
|
||||
for (String leader : dept.getDeptManagerUseridList()) {
|
||||
leaderDeptMap.put(leader, dept.getId());
|
||||
}
|
||||
}
|
||||
return region;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@ import lombok.Data;
|
||||
@Data
|
||||
public class EnterInterviewDto {
|
||||
|
||||
@ApiModelProperty(value = "会议id", required = true)
|
||||
private String interviewId;
|
||||
@ApiModelProperty(value = "会议计划id", required = true)
|
||||
private String interviewPlanId;
|
||||
|
||||
@ApiModelProperty(value = "用户id", required = true)
|
||||
private String userId;
|
||||
|
||||
@@ -50,4 +50,22 @@ public class HyPartnerUserInfoDO implements Serializable {
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
@ApiModelProperty("店铺编码")
|
||||
private String shopCode;
|
||||
|
||||
@ApiModelProperty("店铺名称")
|
||||
private String shopName;
|
||||
|
||||
@ApiModelProperty("店铺ID")
|
||||
private String shopId;
|
||||
|
||||
@ApiModelProperty("推荐加盟商id")
|
||||
private String recommendPartnerId;
|
||||
|
||||
@ApiModelProperty("推荐加盟商姓名")
|
||||
private String recommendPartnerName;
|
||||
|
||||
@ApiModelProperty("推荐加盟商手机号")
|
||||
private String recommendPartnerMobile;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.cool.store.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 员工基本信息(名字 + 电话)
|
||||
*/
|
||||
@Data
|
||||
public class EnterpriseUserBaseInfoVO {
|
||||
|
||||
@ApiModelProperty("名字")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("电话")
|
||||
private String Mobile;
|
||||
|
||||
}
|
||||
@@ -15,6 +15,9 @@ import java.util.Date;
|
||||
@ApiModel
|
||||
public class PartnerInterviewInfoVO {
|
||||
|
||||
@ApiModelProperty("会议计划id")
|
||||
private Long interviewPlanId;
|
||||
|
||||
@ApiModelProperty("会议id")
|
||||
private Long interviewId;
|
||||
|
||||
|
||||
@@ -18,8 +18,11 @@ public class PartnerPassLetterDetailVO {
|
||||
@ApiModelProperty("审核城市")
|
||||
private String verifyCity;
|
||||
|
||||
@ApiModelProperty("函文件URL")
|
||||
private String passFileUrl;
|
||||
@ApiModelProperty("函文件图片URL")
|
||||
private String passImageUrl;
|
||||
|
||||
@ApiModelProperty("函文件pdfURL")
|
||||
private String passPdfUrl;
|
||||
|
||||
@ApiModelProperty("生成日期:YYYY-MM-DD")
|
||||
private String createTime;
|
||||
|
||||
@@ -1,19 +1,29 @@
|
||||
package com.cool.store.vo.interview;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author: young.yu
|
||||
* @Date: 2023-06-08 16:26
|
||||
* @Description:
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(description = "面试信息")
|
||||
public class InterviewVO {
|
||||
@ApiModelProperty(value = "会议id", required = true)
|
||||
private String interviewId;
|
||||
|
||||
@ApiModelProperty("资质审核流程id")
|
||||
private String qualifyVerifyId;
|
||||
|
||||
@ApiModelProperty("审核通过时间")
|
||||
private String passTime;
|
||||
|
||||
@ApiModelProperty("审核通过原因")
|
||||
private String passReason;
|
||||
|
||||
@ApiModelProperty(value = "加盟商用户编号")
|
||||
private String partnerId;
|
||||
|
||||
@@ -37,6 +47,22 @@ public class InterviewVO {
|
||||
|
||||
@ApiModelProperty(value = "面试官手机号", required = true)
|
||||
private String interviewerMobile;
|
||||
|
||||
@ApiModelProperty(value = "记录人id", required = true)
|
||||
private String recorderId;
|
||||
|
||||
@ApiModelProperty(value = "记录人姓名", required = true)
|
||||
private String recorderName;
|
||||
|
||||
@ApiModelProperty(value = "记录人电话", required = true)
|
||||
private String recorderMobile;
|
||||
|
||||
@ApiModelProperty(value = "记录时间", required = true)
|
||||
private String recordTime;
|
||||
|
||||
@ApiModelProperty(value = "面试总结", required = true)
|
||||
private String summary;
|
||||
|
||||
@ApiModelProperty(value = "房间状态(0待开放;1已开放;2已关闭)", required = true)
|
||||
private String roomStatus;
|
||||
|
||||
@@ -46,100 +72,19 @@ public class InterviewVO {
|
||||
@ApiModelProperty(value = "预约状态 0 待预约;1待面试;2已开始;3待审核;4审批中;5审批通过;6拒绝", required = true)
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "面试过程信息", required = false)
|
||||
private String processInfo;
|
||||
|
||||
public String getPartnerId() {
|
||||
return partnerId;
|
||||
}
|
||||
@ApiModelProperty("授权码")
|
||||
private String authCode;
|
||||
|
||||
public void setPartnerId(String partnerId) {
|
||||
this.partnerId = partnerId;
|
||||
}
|
||||
@ApiModelProperty("通过函有效期至")
|
||||
private String expiryDate;
|
||||
|
||||
public String getInterviewerId() {
|
||||
return interviewerId;
|
||||
}
|
||||
@ApiModelProperty("通过函PDF文件URL")
|
||||
private String passPdfUrl;
|
||||
|
||||
public void setInterviewerId(String interviewerId) {
|
||||
this.interviewerId = interviewerId;
|
||||
}
|
||||
@ApiModelProperty("通过函图片文件URL")
|
||||
private String passImageUrl;
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getInterviewId() {
|
||||
return interviewId;
|
||||
}
|
||||
|
||||
public void setInterviewId(String interviewId) {
|
||||
this.interviewId = interviewId;
|
||||
}
|
||||
|
||||
public String getPartnerName() {
|
||||
return partnerName;
|
||||
}
|
||||
|
||||
public void setPartnerName(String partnerName) {
|
||||
this.partnerName = partnerName;
|
||||
}
|
||||
|
||||
public String getPartnerMobile() {
|
||||
return partnerMobile;
|
||||
}
|
||||
|
||||
public void setPartnerMobile(String partnerMobile) {
|
||||
this.partnerMobile = partnerMobile;
|
||||
}
|
||||
|
||||
public String getRoomId() {
|
||||
return roomId;
|
||||
}
|
||||
|
||||
public void setRoomId(String roomId) {
|
||||
this.roomId = roomId;
|
||||
}
|
||||
|
||||
public String getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(String startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public String getInterviewerName() {
|
||||
return interviewerName;
|
||||
}
|
||||
|
||||
public void setInterviewerName(String interviewerName) {
|
||||
this.interviewerName = interviewerName;
|
||||
}
|
||||
|
||||
public String getInterviewerMobile() {
|
||||
return interviewerMobile;
|
||||
}
|
||||
|
||||
public void setInterviewerMobile(String interviewerMobile) {
|
||||
this.interviewerMobile = interviewerMobile;
|
||||
}
|
||||
|
||||
public String getRoomStatus() {
|
||||
return roomStatus;
|
||||
}
|
||||
|
||||
public void setRoomStatus(String roomStatus) {
|
||||
this.roomStatus = roomStatus;
|
||||
}
|
||||
|
||||
public String getEndTime() {
|
||||
return endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(String endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,26 @@
|
||||
package com.cool.store.handler;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.exception.ApiException;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.response.error.ErrorResponse;
|
||||
import com.cool.store.utils.UUIDUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.MDC;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: CustomExceptionHandler
|
||||
@@ -21,24 +32,41 @@ import org.springframework.web.bind.annotation.RestControllerAdvice;
|
||||
public class CustomExceptionHandler {
|
||||
|
||||
@ExceptionHandler(value = ServiceException.class)
|
||||
public ResponseEntity<ErrorResponse> handleCustomException(ServiceException e) {
|
||||
public void handleCustomException(ServiceException e, HttpServletResponse httpServletResponse) {
|
||||
log.error(e.getMessage(), e);
|
||||
ErrorResponse errorResponse = new ErrorResponse(e.getErrorCode(), e.getMessage());
|
||||
return new ResponseEntity<>(errorResponse, HttpStatus.BAD_REQUEST);
|
||||
ResponseResult responseResult = new ResponseResult(e.getErrorCode(), e.getMessage());
|
||||
responseResult(httpServletResponse, responseResult);
|
||||
}
|
||||
|
||||
@ExceptionHandler(value = ApiException.class)
|
||||
public ResponseEntity<ErrorResponse> handleCustomException(ApiException e) {
|
||||
public void handleCustomException(ApiException e, HttpServletResponse httpServletResponse) {
|
||||
log.error(e.getMessage(), e);
|
||||
ErrorResponse errorResponse = new ErrorResponse(e.getErrorCode(), e.getMessage());
|
||||
return new ResponseEntity<>(errorResponse, HttpStatus.BAD_REQUEST);
|
||||
ResponseResult responseResult = new ResponseResult(e.getErrorCode(), e.getMessage());
|
||||
responseResult(httpServletResponse, responseResult);
|
||||
}
|
||||
|
||||
@ExceptionHandler(value = Exception.class)
|
||||
public ResponseEntity<ErrorResponse> handleException(Exception e) {
|
||||
public void handleException(Exception e, HttpServletResponse httpServletResponse) {
|
||||
log.error(e.getMessage(), e);
|
||||
ErrorResponse errorResponse = new ErrorResponse(HttpStatus.INTERNAL_SERVER_ERROR.value(), e.getMessage());
|
||||
return new ResponseEntity<>(errorResponse, HttpStatus.INTERNAL_SERVER_ERROR);
|
||||
ResponseResult responseResult = new ResponseResult(HttpStatus.INTERNAL_SERVER_ERROR.value(), e.getMessage());
|
||||
responseResult(httpServletResponse, responseResult);
|
||||
}
|
||||
|
||||
|
||||
private void responseResult(HttpServletResponse response, ResponseResult result) {
|
||||
response.setCharacterEncoding("UTF-8");
|
||||
response.setHeader("Content-type", "application/json;charset=UTF-8");
|
||||
String requestId = MDC.get(CommonConstants.REQUEST_ID);
|
||||
if(StringUtils.isBlank(requestId)){
|
||||
requestId = UUIDUtils.get32UUID();
|
||||
}
|
||||
result.setRequestId(requestId);
|
||||
result.setData(null);
|
||||
try {
|
||||
response.getWriter().write(JSONObject.toJSONString(result, SerializerFeature.WriteNullStringAsEmpty));
|
||||
} catch (IOException ex) {
|
||||
log.error(ex.getMessage(),ex);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -125,6 +125,28 @@ public class ISVHttpRequest {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取部门详情
|
||||
* @param deptId
|
||||
* @return
|
||||
*/
|
||||
public SysDepartmentDTO getDepartmentDetail(String deptId){
|
||||
String url = isvDomain + "/corp/getDepartmentDetail";
|
||||
HashMap requestMap = new HashMap();
|
||||
requestMap.put("deptId", deptId);
|
||||
ResultDTO responseEntity = null;
|
||||
try {
|
||||
responseEntity = httpRestTemplateService.getForObject(url, ResultDTO.class, requestMap);
|
||||
log.info("url:{}, response:{}", url, JSONObject.toJSONString(responseEntity));
|
||||
if(Objects.nonNull(responseEntity.getData()) && responseEntity.isSuccess()){
|
||||
return JSONObject.parseObject(JSONObject.toJSONString(responseEntity.getData()), SysDepartmentDTO.class);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.info("调用isv出错{}", e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public AuthScopeDTO getAuthScope(){
|
||||
String url = isvDomain + "/corp/getAuthScope";
|
||||
HashMap requestMap = new HashMap();
|
||||
|
||||
@@ -45,10 +45,9 @@ public class RocketMqLogAspect {
|
||||
Object[] args = joinPoint.getArgs();
|
||||
Message message = (Message)args[0];
|
||||
String traceId = message.getMsgID() + Constants.TOPIC_PARTITION_SEPARATOR + message.getReconsumeTimes();
|
||||
Map<String, String> context = MDC.getCopyOfContextMap();
|
||||
if(Objects.isNull(context)){
|
||||
MDC.put(CommonConstants.REQUEST_ID, traceId);
|
||||
}
|
||||
String requestId = message.getUserProperties(CommonConstants.REQUEST_ID);
|
||||
MDC.put(CommonConstants.REQUEST_ID, requestId);
|
||||
MDC.put(CommonConstants.MESSAGE_ID, traceId);
|
||||
} catch (IllegalArgumentException e) {
|
||||
log.info("MDC mqBeforeLog", e);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.dto.partner.DescribePhoneNumberDTO;
|
||||
import com.cool.store.enums.IDCardSideEnum;
|
||||
import com.cool.store.exception.ApiException;
|
||||
import com.cool.store.vo.cuser.IdentityCardInfoVO;
|
||||
|
||||
@@ -24,6 +25,6 @@ public interface AliyunService {
|
||||
* @param faceImageUrl
|
||||
* @return
|
||||
*/
|
||||
IdentityCardInfoVO getIdentityCardInfo(String faceImageUrl) throws ApiException;
|
||||
IdentityCardInfoVO getIdentityCardInfo(String faceImageUrl, IDCardSideEnum sideEnum) throws ApiException;
|
||||
|
||||
}
|
||||
|
||||
@@ -22,4 +22,8 @@ public interface HyPartnerBaseInfoService {
|
||||
Boolean submitPartnerBaseInfo(PartnerBaseInfoRequest request);
|
||||
|
||||
PartnerBaseInfoVO queryPartnerBaseInfo(String partnerId, Long lineId);
|
||||
|
||||
Long getLineIdByIdCard(String idCard);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -104,5 +104,7 @@ public interface HyPartnerLineInfoService {
|
||||
*/
|
||||
PageInfo<PublicSeaLineListVo> publicSeaLineList(String userId,LineRequest lineRequest);
|
||||
|
||||
PartnerLineBaseInfoVO getPartnerLinBaseInfo(String partnerId);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -25,6 +25,6 @@ public interface PartnerInterviewService {
|
||||
/**
|
||||
* 获取通知函详情
|
||||
*/
|
||||
PartnerPassLetterDetailVO passLetterDetail(String interviewId);
|
||||
PartnerPassLetterDetailVO passLetterDetail(String interviewPlanId);
|
||||
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.aliyun.ocr20191230.models.RecognizeIdentityCardResponseBody;
|
||||
import com.aliyun.teaopenapi.models.Config;
|
||||
import com.cool.store.dto.partner.DescribePhoneNumberDTO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.IDCardSideEnum;
|
||||
import com.cool.store.exception.ApiException;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.service.AliyunService;
|
||||
@@ -23,6 +24,7 @@ import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
@@ -61,7 +63,7 @@ public class AliyunServiceImpl implements AliyunService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public IdentityCardInfoVO getIdentityCardInfo(String faceImageUrl) throws ApiException {
|
||||
public IdentityCardInfoVO getIdentityCardInfo(String faceImageUrl, IDCardSideEnum sideEnum) throws ApiException {
|
||||
//todo zcb ak sk替换
|
||||
com.aliyun.teaopenapi.models.Config config = new com.aliyun.teaopenapi.models.Config()
|
||||
.setAccessKeyId("LTAI5t9RaXvABZbHvoXjDFJ1")
|
||||
@@ -74,11 +76,12 @@ public class AliyunServiceImpl implements AliyunService {
|
||||
InputStream inputStream = url.openConnection().getInputStream();
|
||||
com.aliyun.ocr20191230.models.RecognizeIdentityCardAdvanceRequest recognizeIdentityCardAdvanceRequest = new com.aliyun.ocr20191230.models.RecognizeIdentityCardAdvanceRequest()
|
||||
.setImageURLObject(inputStream)
|
||||
.setSide("face");
|
||||
.setSide(sideEnum.getCode());
|
||||
com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();
|
||||
RecognizeIdentityCardResponse idCardResponse = client.recognizeIdentityCardAdvance(recognizeIdentityCardAdvanceRequest, runtime);
|
||||
log.info("身份证解析结果:{}", JSONObject.toJSONString(idCardResponse));
|
||||
RecognizeIdentityCardResponseBody.RecognizeIdentityCardResponseBodyDataFrontResult frontResult = Optional.ofNullable(idCardResponse).map(o -> o.getBody()).map(o -> o.data).map(o -> o.frontResult).orElse(null);
|
||||
if(Objects.nonNull(frontResult)){
|
||||
String username = frontResult.name;
|
||||
String liveAddress = frontResult.address;
|
||||
String birthdate = frontResult.birthDate;
|
||||
@@ -91,6 +94,8 @@ public class AliyunServiceImpl implements AliyunService {
|
||||
IdentityCardInfoVO result = new IdentityCardInfoVO(username, liveAddress, birthdate, sex, idCard, nation);
|
||||
log.info("身份证解析:{}", JSONObject.toJSONString(result));
|
||||
return result;
|
||||
}
|
||||
return null;
|
||||
} catch (com.aliyun.tea.TeaException e) {
|
||||
log.error("身份证解析报错TeaException:{}", e);
|
||||
throw new ApiException(e.getMessage());
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.dao.*;
|
||||
@@ -9,6 +10,8 @@ import com.cool.store.dto.dept.DepartmentEventDTO;
|
||||
import com.cool.store.dto.enterprise.*;
|
||||
import com.cool.store.entity.*;
|
||||
import com.cool.store.enums.DataSourceEnum;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.http.ISVHttpRequest;
|
||||
import com.cool.store.service.EnterpriseSyncService;
|
||||
import com.google.common.collect.ArrayListMultimap;
|
||||
@@ -209,16 +212,61 @@ public class EnterpriseSyncServiceImpl implements EnterpriseSyncService {
|
||||
|
||||
@Override
|
||||
public void deptUpdateEvent(DepartmentEventDTO param) {
|
||||
SysDepartmentDTO departmentDetail = isvHttpRequest.getDepartmentDetail(param.getDepartmentId());
|
||||
if(Objects.isNull(departmentDetail)){
|
||||
return;
|
||||
}
|
||||
log.info("部门变更:{}", JSONObject.toJSONString(param));
|
||||
switch (parseValue(param.getEventType())){
|
||||
case DEPARTMENT_CREATED:
|
||||
RegionDO parentRegionInfo = regionDAO.getRegionInfoByRegionId(departmentDetail.getParentId());
|
||||
if(Objects.isNull(parentRegionInfo)){
|
||||
throw new ServiceException(ErrorCodeEnum.PARENT_NODE_NOT_EXIST);
|
||||
}
|
||||
Multimap<String, String> leaderDeptMap = ArrayListMultimap.create();
|
||||
RegionDO region = SysDepartmentDTO.convertRegionDO(departmentDetail, leaderDeptMap, parentRegionInfo);
|
||||
regionDAO.batchInsertOrUpdate(Arrays.asList(region));
|
||||
dealUserLeaderDept(leaderDeptMap);
|
||||
break;
|
||||
case DEPARTMENT_UPDATED:
|
||||
if(param.getIsChangeParent()){
|
||||
syncAll();
|
||||
return;
|
||||
}
|
||||
Multimap<String, String> updateLeaderDeptMap = ArrayListMultimap.create();
|
||||
RegionDO updateRegion = SysDepartmentDTO.convertRegionDO(departmentDetail, updateLeaderDeptMap);
|
||||
regionDAO.batchInsertOrUpdate(Arrays.asList(updateRegion));
|
||||
dealUserLeaderDept(updateLeaderDeptMap);
|
||||
break;
|
||||
case DEPARTMENT_DELETED:
|
||||
syncAll();
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
public void dealUserLeaderDept(Multimap<String, String> leaderDeptMap){
|
||||
if(leaderDeptMap.isEmpty()){
|
||||
return;
|
||||
}
|
||||
List<String> userIds = leaderDeptMap.keys().stream().collect(Collectors.toList());
|
||||
List<EnterpriseUserDO> userList = enterpriseUserDAO.getUserInfoByUserIds(userIds);
|
||||
for (EnterpriseUserDO enterpriseUser : userList) {
|
||||
List<String> deptIds = leaderDeptMap.get(enterpriseUser.getUserId()).stream().collect(Collectors.toList());
|
||||
String leaderDeptIds = enterpriseUser.getLeaderDeptIds();
|
||||
if(StringUtils.isNotBlank(leaderDeptIds)){
|
||||
List<String> existDeptIds = JSONObject.parseArray(leaderDeptIds).stream().map(String::valueOf).collect(Collectors.toList());
|
||||
//取并集
|
||||
existDeptIds.addAll(deptIds);
|
||||
List<String> allDeptIds = existDeptIds.stream().distinct().collect(Collectors.toList());
|
||||
enterpriseUser.setLeaderDeptIds(JSONObject.toJSONString(allDeptIds));
|
||||
}else{
|
||||
enterpriseUser.setLeaderDeptIds(JSONObject.toJSONString(deptIds));
|
||||
}
|
||||
enterpriseUser.setIsLeader(Boolean.TRUE);
|
||||
}
|
||||
enterpriseUserDAO.batchInsertOrUpdate(userList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -67,6 +67,11 @@ public class HyPartnerBaseInfoServiceImpl implements HyPartnerBaseInfoService {
|
||||
return baseInfoVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getLineIdByIdCard(String idCard) {
|
||||
return hyPartnerBaseInfoDAO.getLineIdByIdCard(idCard);
|
||||
}
|
||||
|
||||
private void fillBaseInfo(HyPartnerBaseInfoDO baseInfoDO, PartnerBaseInfoRequest request) {
|
||||
baseInfoDO.setPartnerId(request.getPartnerId());
|
||||
baseInfoDO.setPartnerLineId(request.getPartnerLineId());
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.constants.RedisConstant;
|
||||
import com.cool.store.dao.EnterpriseUserDAO;
|
||||
import com.cool.store.dao.HyPartnerLineInfoDAO;
|
||||
import com.cool.store.dao.HyPartnerUserInfoDAO;
|
||||
@@ -17,19 +19,21 @@ 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.RedisUtilPool;
|
||||
import com.cool.store.utils.StringUtil;
|
||||
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.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -49,6 +53,8 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
||||
EnterpriseUserDAO enterpriseUserDAO;
|
||||
@Resource
|
||||
UserRegionMappingDAO userRegionMappingDAO;
|
||||
@Resource
|
||||
private RedisUtilPool redisUtilPool;
|
||||
|
||||
@Override
|
||||
public StageCountVO selectStagePendingCount(String userId) {
|
||||
@@ -291,6 +297,18 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
||||
return publicSeaLineList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PartnerLineBaseInfoVO getPartnerLinBaseInfo(String partnerId) {
|
||||
PartnerLineBaseInfoVO lineBaseInfoVO = new PartnerLineBaseInfoVO();
|
||||
// todo wxp 需要加条件
|
||||
HyPartnerLineInfoDO lineInfoDO = hyPartnerLineInfoDAO.getByPartnerId(partnerId);
|
||||
BeanUtil.copyProperties(lineInfoDO, lineBaseInfoVO);
|
||||
String coolingPeriodFirstLoginCacheKey = MessageFormat.format(RedisConstant.COOLINGPERIOD_FIRSTLOGIN_KEY, partnerId);
|
||||
String value = redisUtilPool.getString(coolingPeriodFirstLoginCacheKey);
|
||||
lineBaseInfoVO.setCoolDownFirstLoginFlag(StringUtils.isNotBlank(value));
|
||||
return lineBaseInfoVO;
|
||||
}
|
||||
|
||||
/**
|
||||
* convertPartnerBlackListDTOToVo
|
||||
* @param partnerBlackListDTO
|
||||
|
||||
@@ -16,6 +16,7 @@ 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.EnterpriseUserBaseInfoVO;
|
||||
import com.cool.store.vo.interview.InterviewVO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -57,7 +58,15 @@ public class InterviewServiceImpl implements InterviewService {
|
||||
|
||||
@Override
|
||||
public InterviewVO getInterviewInfo(String interviewId) {
|
||||
return hyPartnerInterviewPlanMapper.getInterviewInfo(interviewId);
|
||||
InterviewVO vo = hyPartnerInterviewPlanMapper.getInterviewInfo(interviewId);
|
||||
//查询面试官和记录人信息
|
||||
EnterpriseUserBaseInfoVO interviewerInfo = hyPartnerInterviewPlanMapper.getEnterpriseUserBaseInfo(vo.getInterviewerId());
|
||||
vo.setInterviewerName(interviewerInfo.getName());
|
||||
vo.setInterviewerMobile(interviewerInfo.getMobile());
|
||||
EnterpriseUserBaseInfoVO recorderInfo = hyPartnerInterviewPlanMapper.getEnterpriseUserBaseInfo(vo.getRecorderId());
|
||||
vo.setRecorderName(recorderInfo.getName());
|
||||
vo.setRecorderMobile(recorderInfo.getMobile());
|
||||
return vo;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -125,15 +134,15 @@ public class InterviewServiceImpl implements InterviewService {
|
||||
public EnterInterviewVO enterInterviewRoom(EnterInterviewDto dto) {
|
||||
try {
|
||||
//1. 将面试状态改为 --> 2已开始
|
||||
interviewMapper.updateInterviewStatus(dto.getInterviewId(), 2);
|
||||
interviewMapper.updateInterviewStatus(dto.getInterviewPlanId(), 2);
|
||||
//3. 修改面试实际开始时间,以第一个人进来的时间为准,后续不再修改
|
||||
interviewMapper.updateActualStartTime(dto.getInterviewId(), DateUtil.now());
|
||||
interviewMapper.updateActualStartTime(dto.getInterviewPlanId(), DateUtil.now());
|
||||
//4. 修改加盟商或面试官进入面试时间
|
||||
interviewMapper.updateEnterTime(dto.getInterviewId(), dto.getUserType(), DateUtil.now());
|
||||
interviewMapper.updateEnterTime(dto.getInterviewPlanId(), dto.getUserType(), DateUtil.now());
|
||||
//5. 加盟商如果进入了,就修改面试计划表 is_partner_interview 字段
|
||||
interviewMapper.updateWhetherPartnerEnter(dto.getInterviewId());
|
||||
interviewMapper.updateWhetherPartnerEnter(dto.getInterviewPlanId());
|
||||
//6. 查询对应的面试官id、姓名及加盟商姓名
|
||||
EnterInterviewVO vo = interviewMapper.getInterviewerByInterviewId(dto.getInterviewId());
|
||||
EnterInterviewVO vo = interviewMapper.getInterviewerByInterviewPlanId(dto.getInterviewPlanId());
|
||||
//生成 userSign
|
||||
String userSig = TRTCUtils.genUserSig(sdkAppId, key, dto.getUserId());
|
||||
vo.setUserSign(userSig);
|
||||
|
||||
@@ -9,6 +9,7 @@ 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.EnterInterviewVO;
|
||||
@@ -21,6 +22,8 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.io.*;
|
||||
|
||||
import static com.cool.store.utils.PDFUtils.pdf2Img;
|
||||
|
||||
@Service
|
||||
public class PartnerInterviewServiceImpl implements PartnerInterviewService {
|
||||
|
||||
@@ -59,15 +62,15 @@ public class PartnerInterviewServiceImpl implements PartnerInterviewService {
|
||||
public EnterInterviewVO enterInterviewRoom(EnterInterviewDto dto) {
|
||||
try {
|
||||
//1. 将面试状态改为 --> 2已开始
|
||||
interviewMapper.updateInterviewStatus(dto.getInterviewId(), 2);
|
||||
interviewMapper.updateInterviewStatus(dto.getInterviewPlanId(), 2);
|
||||
//3. 修改面试实际开始时间,以第一个人进来的时间为准,后续不再修改
|
||||
interviewMapper.updateActualStartTime(dto.getInterviewId(), DateUtil.now());
|
||||
interviewMapper.updateActualStartTime(dto.getInterviewPlanId(), DateUtil.now());
|
||||
//4. 修改加盟商或面试官进入面试时间
|
||||
interviewMapper.updateEnterTime(dto.getInterviewId(), dto.getUserType(), DateUtil.now());
|
||||
interviewMapper.updateEnterTime(dto.getInterviewPlanId(), dto.getUserType(), DateUtil.now());
|
||||
//5. 加盟商如果进入了,就修改面试计划表 is_partner_interview 字段
|
||||
interviewMapper.updateWhetherPartnerEnter(dto.getInterviewId());
|
||||
interviewMapper.updateWhetherPartnerEnter(dto.getInterviewPlanId());
|
||||
//6. 查询对应的面试官id、姓名及加盟商姓名
|
||||
EnterInterviewVO vo = interviewMapper.getInterviewerByInterviewId(dto.getInterviewId());
|
||||
EnterInterviewVO vo = interviewMapper.getInterviewerByInterviewPlanId(dto.getInterviewPlanId());
|
||||
//生成 userSign
|
||||
String userSig = TRTCUtils.genUserSig(sdkAppId, key, dto.getUserId());
|
||||
vo.setUserSign(userSig);
|
||||
@@ -79,11 +82,10 @@ public class PartnerInterviewServiceImpl implements PartnerInterviewService {
|
||||
|
||||
/**
|
||||
* 获取通知函详情
|
||||
* TODO 暂时将生成通过函文件的功能放在这里方便测试和联调,审批通过的回调方法完成后应该放到该方法中
|
||||
*/
|
||||
@Override
|
||||
public PartnerPassLetterDetailVO passLetterDetail(String interviewId) {
|
||||
PartnerPassLetterDetailVO vo = interviewMapper.getPassLetterDetail(interviewId);
|
||||
public PartnerPassLetterDetailVO passLetterDetail(String interviewPlanId) {
|
||||
PartnerPassLetterDetailVO vo = interviewMapper.getPassLetterDetail(interviewPlanId);
|
||||
//解析意向开店区域为市级行政区
|
||||
String verifyCity = vo.getVerifyCity();
|
||||
String[] split = verifyCity.split("/");
|
||||
@@ -97,33 +99,48 @@ public class PartnerInterviewServiceImpl implements PartnerInterviewService {
|
||||
} else {
|
||||
System.out.println("wrong");
|
||||
}
|
||||
// TODO 调用生成通过函和修改数据库数据的方法
|
||||
String passCode = genPassLetterAndUpdateDB(vo, interviewId);
|
||||
verifyCity = vo.getVerifyCity();
|
||||
// 调用生成通过函和修改数据库数据的方法
|
||||
String passCode = genPassLetterAndUpdateDB(vo, interviewPlanId);
|
||||
//再查一次 vo
|
||||
vo = interviewMapper.getPassLetterDetail(interviewId);
|
||||
vo = interviewMapper.getPassLetterDetail(interviewPlanId);
|
||||
//有效期为审批通过次日起第 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"));
|
||||
vo.setVerifyCity((verifyCity));
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO 暂时将生成 passLetter 并上传 OSS 和修改数据库对应信息的方法放在这里,实际应该在 800 的回调方法中
|
||||
* 生成通知函上传 OSS 和修改数据库相应数据
|
||||
* @return passCode
|
||||
*/
|
||||
private String genPassLetterAndUpdateDB(PartnerPassLetterDetailVO passLetterDetail, String interviewId) {
|
||||
//已经有 passCode 的话就不要再生成了,默认上游全部数据都正确
|
||||
if (ObjectUtil.isEmpty(passLetterDetail.getPassCode())) {
|
||||
//已经有文件 URL 的话就不要再生成了,默认上游全部数据都正确
|
||||
if (ObjectUtil.isEmpty(passLetterDetail.getPassPdfUrl()) || ObjectUtil.isEmpty(passLetterDetail.getPassImageUrl())) {
|
||||
try {
|
||||
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");
|
||||
//计算有效期截至日期
|
||||
//生成的 pdf 通过函内存输出流
|
||||
ByteArrayOutputStream pdfOut = PassLetterUtils.genPassLetter(passLetterDetail.getPartnerName(), code, passLetterDetail.getVerifyCity(), createTime);
|
||||
//生成的 pdf 通过函内存输入流
|
||||
ByteArrayInputStream inputStream = new ByteArrayInputStream(pdfOut.toByteArray());
|
||||
String passPdfUrl = ossServer.uploadFileServer(inputStream, "partner/passLetter/" + code + ".pdf");
|
||||
//转换为图片
|
||||
inputStream.reset();
|
||||
ByteArrayOutputStream imageOut = PDFUtils.pdf2Img(inputStream, 2.0f);
|
||||
inputStream = new ByteArrayInputStream(imageOut.toByteArray());
|
||||
//上传 OSS
|
||||
String passImageUrl = ossServer.uploadFileServer(inputStream, "partner/passLetter/" + code + ".png");
|
||||
//计算有效期截止日期
|
||||
DateTime expiryDate = DateUtil.offsetDay(createTime, 60);
|
||||
String expiryDateStr = DateUtil.format(expiryDate, "yyyy-MM-dd") + " 23:59:59";
|
||||
interviewMapper.updatePassLetterInfo(code, passFileUrl, expiryDateStr, interviewId);
|
||||
interviewMapper.updatePassLetterInfo(code, passPdfUrl, passImageUrl, expiryDateStr, interviewId);
|
||||
inputStream.close();
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
return passLetterDetail.getPassCode();
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ import com.cool.store.entity.HyOpenAreaInfoDO;
|
||||
|
||||
import com.cool.store.entity.EnterpriseUserDO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.IDCardSideEnum;
|
||||
import com.cool.store.exception.ApiException;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mapper.HyOpenAreaInfoMapper;
|
||||
@@ -205,7 +206,7 @@ public class TestController {
|
||||
@ApiOperation("根据身份证正面解析获取数据")
|
||||
public ResponseResult<IdentityCardInfoVO> getIdentityCardInfo(@RequestParam(value = "faceImageUrl")String faceImageUrl){
|
||||
try {
|
||||
IdentityCardInfoVO identityCardInfo = aliyunService.getIdentityCardInfo(faceImageUrl);
|
||||
IdentityCardInfoVO identityCardInfo = aliyunService.getIdentityCardInfo(faceImageUrl, IDCardSideEnum.FACE);
|
||||
return ResponseResult.success(identityCardInfo);
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException(ErrorCodeEnum.IDENTITY_CARD_PARSE_FAIL);
|
||||
|
||||
@@ -33,8 +33,8 @@ public class InterviewController {
|
||||
|
||||
@PostMapping("/passLetter/detail")
|
||||
@ApiOperation("通过函详情")
|
||||
public ResponseResult<PartnerPassLetterDetailVO> passLetterDetail(@RequestParam String interviewId) {
|
||||
return ResponseResult.success(interviewService.passLetterDetail(interviewId));
|
||||
public ResponseResult<PartnerPassLetterDetailVO> passLetterDetail(@RequestParam String interviewPlanId) {
|
||||
return ResponseResult.success(interviewService.passLetterDetail(interviewPlanId));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,18 +1,17 @@
|
||||
package com.cool.store.controller;
|
||||
|
||||
import com.cool.store.constants.RedisConstant;
|
||||
import com.cool.store.context.PartnerUserHolder;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.IDCardSideEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.request.BaseUserInfoRequest;
|
||||
import com.cool.store.request.PartnerBaseInfoRequest;
|
||||
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.service.*;
|
||||
import com.cool.store.utils.RedisUtilPool;
|
||||
import com.cool.store.vo.*;
|
||||
import com.cool.store.vo.cuser.IdentityCardInfoVO;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -23,6 +22,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -38,18 +38,18 @@ public class PartnerController {
|
||||
|
||||
@Resource
|
||||
private PartnerUserInfoService partnerUserInfoService;
|
||||
|
||||
@Resource
|
||||
private HyPartnerIntentInfoService hyPartnerIntentInfoService;
|
||||
|
||||
@Resource
|
||||
private AliyunService aliyunService;
|
||||
|
||||
@Resource
|
||||
private HyPartnerBaseInfoService hyPartnerBaseInfoService;
|
||||
@Resource
|
||||
private HyPartnerClerkService hyPartnerClerkService;
|
||||
|
||||
@Resource
|
||||
private HyPartnerLineInfoService hyPartnerLineInfoService;
|
||||
@Resource
|
||||
private RedisUtilPool redisUtilPool;
|
||||
|
||||
|
||||
|
||||
@@ -76,8 +76,8 @@ public class PartnerController {
|
||||
})
|
||||
public ResponseResult<Boolean> getLineByIdCard(@RequestParam(value = "idCard",required = false)String idCard){
|
||||
|
||||
|
||||
return ResponseResult.success();
|
||||
Long lineId = hyPartnerBaseInfoService.getLineIdByIdCard(idCard);
|
||||
return ResponseResult.success(lineId != null);
|
||||
}
|
||||
|
||||
|
||||
@@ -133,18 +133,21 @@ public class PartnerController {
|
||||
return ResponseResult.success(hyPartnerIntentInfoService.submitPartnerIntentInfo(partnerIntentInfoRequest));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@GetMapping(path = "/getPartnerLineBaseInfo")
|
||||
@ApiOperation("查询加盟商线索详情(适用全部流程) 包括冷静期是否首次登录")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "partnerId", value = "C端用户基本信息ID", required = false),
|
||||
})
|
||||
public ResponseResult<PartnerLineBaseInfoVO> getPartnerLinBaseInfo(@RequestParam(value = "partnerId",required = false)Long partnerId){
|
||||
public ResponseResult<PartnerLineBaseInfoVO> getPartnerLinBaseInfo(@RequestParam(value = "partnerId",required = false)String partnerId){
|
||||
return ResponseResult.success(hyPartnerLineInfoService.getPartnerLinBaseInfo(partnerId));
|
||||
}
|
||||
|
||||
|
||||
return ResponseResult.success();
|
||||
@PostMapping(path = "/delCoolDownFirstLoginFlag")
|
||||
@ApiOperation("删除冷静期是否首次登录缓存")
|
||||
public ResponseResult<Boolean> delCoolDownFirstLoginFlag(@RequestParam(value = "partnerId",required = true)String partnerId){
|
||||
String coolingPeriodFirstLoginCacheKey = MessageFormat.format(RedisConstant.COOLINGPERIOD_FIRSTLOGIN_KEY, partnerId);
|
||||
redisUtilPool.delKey(coolingPeriodFirstLoginCacheKey);
|
||||
return ResponseResult.success(true);
|
||||
}
|
||||
|
||||
|
||||
@@ -208,9 +211,9 @@ public class PartnerController {
|
||||
|
||||
@GetMapping(path = "/getIdentityCardInfo")
|
||||
@ApiOperation("根据身份证正面解析获取数据")
|
||||
public ResponseResult<IdentityCardInfoVO> getIdentityCardInfo(@RequestParam(value = "faceImageUrl")String faceImageUrl){
|
||||
public ResponseResult<IdentityCardInfoVO> getIdentityCardInfo(@RequestParam(value = "faceImageUrl")String faceImageUrl, @RequestParam("side")IDCardSideEnum sideEnum){
|
||||
try {
|
||||
IdentityCardInfoVO identityCardInfo = aliyunService.getIdentityCardInfo(faceImageUrl);
|
||||
IdentityCardInfoVO identityCardInfo = aliyunService.getIdentityCardInfo(faceImageUrl, sideEnum);
|
||||
return ResponseResult.success(identityCardInfo);
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException(ErrorCodeEnum.IDENTITY_CARD_PARSE_FAIL);
|
||||
|
||||
Binary file not shown.
BIN
coolstore-partner-webc/src/main/resources/static/simsun.ttc
Normal file
BIN
coolstore-partner-webc/src/main/resources/static/simsun.ttc
Normal file
Binary file not shown.
Reference in New Issue
Block a user