Merge remote-tracking branch 'origin/cc_20230520_partner' into cc_20230520_partner
This commit is contained in:
@@ -208,10 +208,10 @@
|
||||
update hy_partner_base_info
|
||||
<set>
|
||||
<if test="userName != null and userName!=''">
|
||||
username = #{record.username},
|
||||
username = #{userName},
|
||||
</if>
|
||||
<if test="mobile != null and mobile!=''">
|
||||
mobile = #{record.mobile},
|
||||
mobile = #{mobile},
|
||||
</if>
|
||||
where partner_id = #{partnerId}
|
||||
</set>
|
||||
|
||||
@@ -246,7 +246,7 @@
|
||||
</select>
|
||||
|
||||
<select id="getInterviewList" resultType="com.cool.store.vo.interview.InterviewVO">
|
||||
select hpip.id as interviewId,
|
||||
select hpip.id as interviewPlanId,
|
||||
hpui.username as partnerName,
|
||||
hpui.mobile as partnerMobile,
|
||||
hpip.room_id as roomId,
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.cool.store.request;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author: young.yu
|
||||
* @Date: 2023-06-19 15:31
|
||||
* @Description:
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel(description = "重新面试")
|
||||
public class ReInterviewReq {
|
||||
@ApiModelProperty(value = "会议安排ID", required = true, example = "12345")
|
||||
private String interviewPlanId;
|
||||
|
||||
@ApiModelProperty(value = "重新面试原因", required = true, example = "候选人前次面试未通过")
|
||||
private String reason;
|
||||
|
||||
@ApiModelProperty(value = "证明文件地址(多个文件英文逗号隔开)", example = "https://example.com/file1.pdf,https://example.com/file2.pdf")
|
||||
private String certifyFile;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@ApiModel(description = "拒绝面试")
|
||||
public class RejectInterviewReq {
|
||||
@ApiModelProperty(value = "会议安排ID", required = true, example = "12345")
|
||||
private String interviewPlanId;
|
||||
|
||||
@ApiModelProperty(value = "线索ID", required = true, example = "67890")
|
||||
private String lineId;
|
||||
|
||||
@ApiModelProperty(value = "会议ID", required = true, example = "54321")
|
||||
private String interviewId;
|
||||
|
||||
@ApiModelProperty(value = "公开拒绝原因", required = true, example = "候选人不符合岗位要求")
|
||||
private String rejectPublicReason;
|
||||
|
||||
@ApiModelProperty(value = "真实拒绝原因", required = true, example = "候选人技术能力不足")
|
||||
private String rejectRealReason;
|
||||
|
||||
@ApiModelProperty(value = "证明文件地址(多个文件英文逗号隔开)", example = "https://example.com/file1.pdf,https://example.com/file2.pdf")
|
||||
private String certifyFile;
|
||||
|
||||
}
|
||||
@@ -1,23 +1,18 @@
|
||||
package com.cool.store.http;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.dto.response.ResultDTO;
|
||||
import com.cool.store.dto.wx.CodeSessionDTO;
|
||||
import com.cool.store.dto.wx.PhoneInfoDTO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mq.util.HttpRestTemplateService;
|
||||
import com.cool.store.utils.RedisUtilPool;
|
||||
import com.cool.store.utils.RestTemplateUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
@@ -46,20 +41,19 @@ public class WechatRest {
|
||||
|
||||
|
||||
public CodeSessionDTO miniProgramJsCodeSession(String appId, String secret, String jsCode){
|
||||
log.info("WechatRest#miniProgramJsCodeSession, jsCode:{}", jsCode);
|
||||
String url = "https://api.weixin.qq.com/sns/jscode2session";
|
||||
HashMap requestMap = new HashMap();
|
||||
requestMap.put("appid", appId);
|
||||
requestMap.put("secret", secret);
|
||||
requestMap.put("js_code", jsCode);
|
||||
requestMap.put("grant_type","authorization_code");
|
||||
ResponseEntity<CodeSessionDTO> responseEntity = null;
|
||||
try {
|
||||
responseEntity = RestTemplateUtil.loadGet(url, CodeSessionDTO.class);
|
||||
log.info("WechatRest#miniProgramJsCodeSession, url:{}, response:{}", url, JSONObject.toJSONString(responseEntity));
|
||||
if(Objects.nonNull(responseEntity.getBody()) && responseEntity.getBody().isSuccess()){
|
||||
return responseEntity.getBody();
|
||||
String responseStr = httpRestTemplateService.getForObject(url, String.class ,requestMap);
|
||||
log.info("WechatRest#miniProgramJsCodeSession, url:{}, response:{}", url, responseStr);
|
||||
if(StringUtils.isNotBlank(responseStr)){
|
||||
return JSONObject.parseObject(responseStr, CodeSessionDTO.class);
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
log.info("调用微信服务异常{}", e);
|
||||
throw new ServiceException(ErrorCodeEnum.WX_SERVICE_ERROR);
|
||||
@@ -76,13 +70,12 @@ public class WechatRest {
|
||||
String reqUrl = String.format(ACCESS_TOKEN, appId, secret);
|
||||
JSONObject jsonObject = null;
|
||||
try {
|
||||
jsonObject = httpRestTemplateService.getForObject(reqUrl, JSONObject.class, null);
|
||||
jsonObject = httpRestTemplateService.getForObject(reqUrl, JSONObject.class, new HashMap());
|
||||
log.info("WechatRest#getAccessToken, reqUrl:{}, response:{}", reqUrl, JSONObject.toJSONString(jsonObject));
|
||||
String token = jsonObject.getString("access_token");
|
||||
if (StringUtils.isBlank(token)) {
|
||||
throw new ServiceException(ErrorCodeEnum.GET_ACCESSTOKEN_ERROR);
|
||||
}
|
||||
|
||||
redisUtilPool.setString(cacheAccessToken, token, 7000);
|
||||
accessToken = token;
|
||||
} catch (Exception e) {
|
||||
@@ -96,14 +89,17 @@ public class WechatRest {
|
||||
String reqUrl = String.format(GET_USERPHONENUMBER, accessToken);
|
||||
HashMap requestMap = new HashMap();
|
||||
requestMap.put("code", code);
|
||||
PhoneInfoDTO phoneInfoDTO = null;
|
||||
String responseStr = null;
|
||||
try {
|
||||
phoneInfoDTO = httpRestTemplateService.postForObject(reqUrl, requestMap, PhoneInfoDTO.class);
|
||||
log.info("WechatRest#getUserPhoneNumber, reqUrl:{}, response:{}", reqUrl, JSONObject.toJSONString(phoneInfoDTO));
|
||||
responseStr = httpRestTemplateService.postForObject(reqUrl, requestMap, String.class);
|
||||
log.info("WechatRest#getUserPhoneNumber, reqUrl:{}, response:{}", reqUrl, responseStr);
|
||||
if(StringUtils.isNotBlank(responseStr)){
|
||||
return JSONObject.parseObject(responseStr, PhoneInfoDTO.class);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("获取手机号异常", e);
|
||||
}
|
||||
return phoneInfoDTO;
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -62,4 +62,6 @@ public interface InterviewService {
|
||||
* @return
|
||||
*/
|
||||
void approveAppointment(ApproveAppointmentReq request) throws ApiException;
|
||||
void reInterview(ReInterviewReq request) throws ApiException;
|
||||
void rejectInterview(RejectInterviewReq request) throws ApiException;
|
||||
}
|
||||
|
||||
@@ -97,13 +97,9 @@ public class FeiShuServiceImpl implements FeiShuService {
|
||||
|
||||
for (UserFreeBusyInfoDTO userFreeBusyInfoDTO : UserFreeBusyInfoList) {
|
||||
//如果查询结果中的开始时间和结束时间在时间段内,则设置为忙碌
|
||||
if ((startTimeLong > userFreeBusyInfoDTO.getStartTime() && startTimeLong < userFreeBusyInfoDTO.getStartTime())
|
||||
|| (endTimeLong > userFreeBusyInfoDTO.getStartTime() && endTimeLong < userFreeBusyInfoDTO.getStartTime())) {
|
||||
if (( userFreeBusyInfoDTO.getStartTime()>startTimeLong && userFreeBusyInfoDTO.getStartTime() < endTimeLong)
|
||||
|| (userFreeBusyInfoDTO.getEndTime() > startTimeLong && userFreeBusyInfoDTO.getEndTime() < endTimeLong)) {
|
||||
freeBusyInfo.setFree(false);
|
||||
break;
|
||||
}
|
||||
if (endTimeLong <= userFreeBusyInfoDTO.getStartTime()) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -279,6 +279,16 @@ public class InterviewServiceImpl implements InterviewService {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reInterview(ReInterviewReq request) throws ApiException {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void rejectInterview(RejectInterviewReq request) throws ApiException {
|
||||
|
||||
}
|
||||
|
||||
public String generateFeiShuInterviewMsg(String partnerName, String partnerMobile, String interviewTime){
|
||||
//"您有一个【面试预约申请】待处理,预约人【姓名】手机号【13xxxxxxxxx】,预约面试时间【YYYY年MM月DD日 hh:mm】,请及时处理】"
|
||||
StringBuffer sb = new StringBuffer();
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.cool.store.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.aliyun.openservices.shade.org.apache.commons.lang3.StringUtils;
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.dao.HyPartnerLineInfoDAO;
|
||||
@@ -62,6 +63,7 @@ public class WechatMiniAppServiceImpl implements WechatMiniAppService {
|
||||
|
||||
@Override
|
||||
public PartnerUserInfoVO miniProgramLogin(MiniProgramLoginDTO param) {
|
||||
log.info("miniProgramLogin #param {}", JSONObject.toJSONString(param));
|
||||
PartnerUserInfoVO userInfoVO = new PartnerUserInfoVO();
|
||||
String jsCode = param.getJsCode();
|
||||
String lockKey = "codeSession:" + wxAppId + CommonConstants.MOSAICS + jsCode;
|
||||
@@ -76,12 +78,12 @@ public class WechatMiniAppServiceImpl implements WechatMiniAppService {
|
||||
String unionId = codeSession.getUnionId();
|
||||
log.info("小程序登录:{}", unionId);
|
||||
log.info("sessionKey {}", codeSession.getSessionKey());
|
||||
String decryptUser = AesUtil.decryptWechat(codeSession.getSessionKey(), param.getEncryptedData(), param.getIvStr());
|
||||
/* String decryptUser = AesUtil.decryptWechat(codeSession.getSessionKey(), param.getEncryptedData(), param.getIvStr());
|
||||
log.info("解密用户信息:{}", decryptUser);
|
||||
MiniProgramUserVO miniProgramUser = JSON.parseObject(decryptUser, MiniProgramUserVO.class);
|
||||
if (Objects.isNull(miniProgramUser)) {
|
||||
throw new ServiceException(ErrorCodeEnum.GET_WECHAT_USER_INFO_FAIL);
|
||||
}
|
||||
}*/
|
||||
// 获取小程序token
|
||||
String accessToken = wechatRest.getAccessToken(wxAppId, wxAppSecret);
|
||||
// 获取手机号码
|
||||
@@ -91,8 +93,10 @@ public class WechatMiniAppServiceImpl implements WechatMiniAppService {
|
||||
if(hyPartnerUserInfoDO == null){
|
||||
hyPartnerUserInfoDO = new HyPartnerUserInfoDO();
|
||||
hyPartnerUserInfoDO.setMobile(phoneInfoDTO.getPhoneInfo().getPhoneNumber());
|
||||
hyPartnerUserInfoDO.setUsername(miniProgramUser.getNickName());
|
||||
// hyPartnerUserInfoDO.setUsername(phoneInfoDTO.getPhoneInfo().getPhoneNumber());
|
||||
hyPartnerUserInfoDO.setPartnerId(UUIDUtils.get32UUID());
|
||||
hyPartnerUserInfoDO.setAcceptAdjustType(0);
|
||||
hyPartnerUserInfoDO.setIsWritePartnerKnow(0);
|
||||
hyPartnerUserInfoDAO.insertSelective(hyPartnerUserInfoDO);
|
||||
// 生成一条线索 也可在提交加盟信息时插入
|
||||
HyPartnerLineInfoDO hyPartnerLineInfoDO = new HyPartnerLineInfoDO();
|
||||
|
||||
@@ -29,4 +29,11 @@ public class FlowController {
|
||||
flowService.createQualifyVerify(request);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
@PostMapping("/qualificationReview/callback")
|
||||
@ApiOperation("流程信息回调接口")
|
||||
public ResponseResult qualificationCallback() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ public class InterviewController {
|
||||
}
|
||||
|
||||
@PostMapping("/finish")
|
||||
@ApiOperation("修改面试时间")
|
||||
@ApiOperation("结束面试")
|
||||
public ResponseResult finishInterview(@RequestBody FinishInterviewReq request) {
|
||||
interviewService.finishInterview(request);
|
||||
return ResponseResult.success();
|
||||
@@ -80,4 +80,18 @@ public class InterviewController {
|
||||
interviewService.approveAppointment(request);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
@PostMapping("/reInterview")
|
||||
@ApiOperation("重新面试")
|
||||
public ResponseResult reInterview(@RequestBody ReInterviewReq request) throws ApiException {
|
||||
interviewService.reInterview(request);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
@PostMapping("/reject")
|
||||
@ApiOperation("拒绝面试")
|
||||
public ResponseResult reInterview(@RequestBody RejectInterviewReq request) throws ApiException {
|
||||
interviewService.rejectInterview(request);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,6 @@ public class SignValidateFilter implements Filter {
|
||||
|
||||
private static List<String> patternList =
|
||||
Lists.newArrayList("/web/check/ok","/check/ok",
|
||||
"/partner/mini/program/v1/partnerManage/miniProgram/login",
|
||||
"/partner/mini/program/doc.html","/partner/mini/program/v2/api-docs","/**/test/**",
|
||||
"/partner/mini/program/oss/getUploadFileConfig",
|
||||
"/partner/mini/program/v1/partnerManage/partner/getIdentityCardInfo",
|
||||
@@ -87,7 +86,7 @@ public class SignValidateFilter implements Filter {
|
||||
String userStr = "";
|
||||
boolean isInWhiteList = excludePath(uri);
|
||||
log.info("url:{}", uri);
|
||||
if ( !isInWhiteList && !method.equals("OPTIONS")) {
|
||||
/* if ( !isInWhiteList && !method.equals("OPTIONS")) {
|
||||
Map<String, String[]> parameterMap = request.getParameterMap();
|
||||
String jsonStr = JSONObject.toJSONString(parameterMap);
|
||||
JSONObject obj = JSONObject.parseObject(jsonStr);
|
||||
@@ -116,7 +115,7 @@ public class SignValidateFilter implements Filter {
|
||||
userStr = JSONObject.toJSONString(partnerUserInfoVO);
|
||||
log.info("url:{}, userStr:{}", uri, userStr);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
try {
|
||||
PartnerUserHolder.setUser(userStr);
|
||||
filterChain.doFilter(servletRequest, servletResponse);
|
||||
|
||||
@@ -56,7 +56,7 @@ cdn.url=https://testhsaypic.coolstore.cn
|
||||
trtc.sdkAppId=1400811820
|
||||
trtc.secretKey=4854bab106c2ca2a2fda16a8c966933e28a078a34e458999d6227e8cd8ab8219
|
||||
|
||||
weixin.appId=wx6f984e535e571818
|
||||
weixin.appSecret=245a483747e6e9f8762d3e8539cf0318
|
||||
weixin.appId=wxb2a0addf956ad4b7
|
||||
weixin.appSecret=77abdcae754add92889566b543e5ad79
|
||||
|
||||
signKey=77fea013c3a6459685b83c21a2fc3411
|
||||
@@ -53,7 +53,7 @@ corp.id = 171cddee76471740
|
||||
trtc.sdkAppId=1400811820
|
||||
trtc.secretKey=4854bab106c2ca2a2fda16a8c966933e28a078a34e458999d6227e8cd8ab8219
|
||||
|
||||
weixin.appId=wx6f984e535e571818
|
||||
weixin.appSecret=245a483747e6e9f8762d3e8539cf0318
|
||||
weixin.appId=wxb2a0addf956ad4b7
|
||||
weixin.appSecret=77abdcae754add92889566b543e5ad79
|
||||
|
||||
signKey=77fea013c3a6459685b83c21a2fc3411
|
||||
@@ -51,7 +51,7 @@ corp.id = 171cddee76471740
|
||||
trtc.sdkAppId=1400811820
|
||||
trtc.secretKey=4854bab106c2ca2a2fda16a8c966933e28a078a34e458999d6227e8cd8ab8219
|
||||
|
||||
weixin.appId=wx6f984e535e571818
|
||||
weixin.appSecret=245a483747e6e9f8762d3e8539cf0318
|
||||
weixin.appId=wxb2a0addf956ad4b7
|
||||
weixin.appSecret=77abdcae754add92889566b543e5ad79
|
||||
|
||||
signKey=d851f2a9ac90474abecdc2fbb148d4d7
|
||||
@@ -60,7 +60,7 @@ cdn.url=https://testhsaypic.coolstore.cn
|
||||
trtc.sdkAppId=1400811820
|
||||
trtc.secretKey=4854bab106c2ca2a2fda16a8c966933e28a078a34e458999d6227e8cd8ab8219
|
||||
|
||||
weixin.appId=wx6f984e535e571818
|
||||
weixin.appSecret=245a483747e6e9f8762d3e8539cf0318
|
||||
weixin.appId=wxb2a0addf956ad4b7
|
||||
weixin.appSecret=77abdcae754add92889566b543e5ad79
|
||||
|
||||
signKey=77fea013c3a6459685b83c21a2fc3411
|
||||
@@ -51,7 +51,7 @@ corp.id = 171cddee76471740
|
||||
trtc.sdkAppId=1400811820
|
||||
trtc.secretKey=4854bab106c2ca2a2fda16a8c966933e28a078a34e458999d6227e8cd8ab8219
|
||||
|
||||
weixin.appId=wx6f984e535e571818
|
||||
weixin.appSecret=245a483747e6e9f8762d3e8539cf0318
|
||||
weixin.appId=wxb2a0addf956ad4b7
|
||||
weixin.appSecret=77abdcae754add92889566b543e5ad79
|
||||
|
||||
signKey=d851f2a9ac90474abecdc2fbb148d4d7
|
||||
@@ -51,7 +51,7 @@ corp.id = 171cddee76471740
|
||||
trtc.sdkAppId=1400811820
|
||||
trtc.secretKey=4854bab106c2ca2a2fda16a8c966933e28a078a34e458999d6227e8cd8ab8219
|
||||
|
||||
weixin.appId=wx6f984e535e571818
|
||||
weixin.appSecret=245a483747e6e9f8762d3e8539cf0318
|
||||
weixin.appId=wxb2a0addf956ad4b7
|
||||
weixin.appSecret=77abdcae754add92889566b543e5ad79
|
||||
|
||||
signKey=d851f2a9ac90474abecdc2fbb148d4d7
|
||||
@@ -51,7 +51,7 @@ corp.id = 171cddee76471740
|
||||
trtc.sdkAppId=1400811820
|
||||
trtc.secretKey=4854bab106c2ca2a2fda16a8c966933e28a078a34e458999d6227e8cd8ab8219
|
||||
|
||||
weixin.appId=wx6f984e535e571818
|
||||
weixin.appSecret=245a483747e6e9f8762d3e8539cf0318
|
||||
weixin.appId=wxb2a0addf956ad4b7
|
||||
weixin.appSecret=77abdcae754add92889566b543e5ad79
|
||||
|
||||
signKey=77fea013c3a6459685b83c21a2fc3411
|
||||
Binary file not shown.
Reference in New Issue
Block a user