Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
J
jy_jfb
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Administrator
jy_jfb
Commits
a27c5895
提交
a27c5895
authored
10月 23, 2025
作者:
wangmenglong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改员工状态
上级
5395bcf1
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
105 行增加
和
6 行删除
+105
-6
SignRecord.java
jfb-lib/src/main/java/data/recruit/SignRecord.java
+12
-0
ApiAliController.java
...java/com/jfb/recruit/controller/api/ApiAliController.java
+71
-2
SignRecordService.java
.../main/java/com/jfb/recruit/service/SignRecordService.java
+2
-1
SignRecordServiceImpl.java
...a/com/jfb/recruit/service/impl/SignRecordServiceImpl.java
+20
-3
没有找到文件。
jfb-lib/src/main/java/data/recruit/SignRecord.java
浏览文件 @
a27c5895
...
...
@@ -27,4 +27,16 @@ public class SignRecord extends IdentityObj {
@TableField
(
"recruit_id"
)
private
String
recruitId
;
/**
* state =
* 面试中: INTERVIEW
* 未录取: APPLY_FAILED
* 已录取: APPLY_SUCCESS
* 已入职: ON_BOARDING
* 邀请面试: INVITING_INTERVIEW
* 已投递:APPLYING
**/
@TableField
(
"state"
)
private
String
state
;
}
jfb-recruit/src/main/java/com/jfb/recruit/controller/api/ApiAliController.java
浏览文件 @
a27c5895
...
...
@@ -9,12 +9,15 @@ import com.alipay.api.AlipayApiException;
import
com.alipay.api.AlipayClient
;
import
com.alipay.api.AlipayConfig
;
import
com.alipay.api.DefaultAlipayClient
;
import
com.alipay.api.domain.AlipayEbppIndustryJobApplyinfoSyncModel
;
import
com.alipay.api.domain.AlipayEbppIndustryJobResumeauthlogininfoGetModel
;
import
com.alipay.api.internal.util.AlipayEncrypt
;
import
com.alipay.api.internal.util.AlipaySignature
;
import
com.alipay.api.internal.util.StringUtils
;
import
com.alipay.api.request.AlipayEbppIndustryJobApplyinfoSyncRequest
;
import
com.alipay.api.request.AlipayEbppIndustryJobResumeauthlogininfoGetRequest
;
import
com.alipay.api.request.AlipaySystemOauthTokenRequest
;
import
com.alipay.api.response.AlipayEbppIndustryJobApplyinfoSyncResponse
;
import
com.alipay.api.response.AlipayEbppIndustryJobResumeauthlogininfoGetResponse
;
import
com.alipay.api.response.AlipaySystemOauthTokenResponse
;
import
com.jfb.recruit.service.*
;
...
...
@@ -26,6 +29,7 @@ import org.springframework.web.bind.annotation.*;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
/**
...
...
@@ -157,6 +161,70 @@ public class ApiAliController extends BaseController {
return
BaseResult
.
success
(
plainData
);
}
/**
* @description: 修改应聘状态
* @author: wangmenglong
* @date; 2023/12/7 10:07
* @param: [req]
* @return: com.github.pagehelper.PageInfo
**/
@PostMapping
(
"/update/state"
)
public
BaseResult
updateState
(
@RequestBody
JSONObject
jsonObject
)
throws
Exception
{
String
recruitId
=
jsonObject
.
getString
(
"recruitId"
);
String
state
=
jsonObject
.
getString
(
"state"
);
String
recordId
=
jsonObject
.
getString
(
"recordId"
);
String
openId
=
jsonObject
.
getString
(
"openId"
);
// 初始化SDK
AlipayClient
alipayClient
=
new
DefaultAlipayClient
(
getAlipayConfig
());
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
sdf
.
setTimeZone
(
TimeZone
.
getTimeZone
(
"GMT+8"
));
// 构造请求参数以调用接口
AlipayEbppIndustryJobApplyinfoSyncRequest
request
=
new
AlipayEbppIndustryJobApplyinfoSyncRequest
();
AlipayEbppIndustryJobApplyinfoSyncModel
model
=
new
AlipayEbppIndustryJobApplyinfoSyncModel
();
// uid参数未来计划废弃,存量商户可继续使用,新商户请使用openid。请根据应用-开发配置-openid配置选择支持的字段。
// model.setUserId("20xxxxx");
// 设置用户open_id
model
.
setOpenId
(
openId
);
// 设置外部应聘编号
model
.
setOutApplyId
(
recordId
);
// 设置外部岗位id
model
.
setOutJobId
(
recruitId
);
// 设置应聘状态
model
.
setApplyStatus
(
state
);
// 设置应聘时间
model
.
setApplyTime
(
new
Date
());
// 设置应聘状态更新时间
model
.
setApplyChangeTime
(
new
Date
());
// 设置岗位应聘详情页地址
model
.
setApplyInfoUrl
(
"alipays://platformapi/startapp?appId=2021005184646262&page=pages/home/jobDetails?id="
+
recordId
);
request
.
setBizModel
(
model
);
// 第三方代调用模式下请设置app_auth_token
// request.putOtherTextParam("app_auth_token", "<-- 请填写应用授权令牌 -->");
AlipayEbppIndustryJobApplyinfoSyncResponse
response
=
alipayClient
.
execute
(
request
);
System
.
out
.
println
(
response
.
getBody
());
if
(
response
.
isSuccess
())
{
System
.
out
.
println
(
"调用成功"
);
signRecordService
.
update
(
recordId
,
state
);
}
else
{
System
.
out
.
println
(
"调用失败"
);
}
return
BaseResult
.
success
(
response
.
getBody
());
}
/**
* @description: 获取安心工作证
...
...
@@ -218,6 +286,7 @@ public class ApiAliController extends BaseController {
System
.
out
.
println
(
"Key: "
+
entry
.
getKey
()
+
", Value: "
+
entry
.
getValue
());
}
String
recordId
=
""
;
//获取人员信息(自我评价)
Person
person
=
personService
.
getDetailsByLoginOpenId
(
params
.
get
(
"open_id"
));
...
...
@@ -404,7 +473,7 @@ public class ApiAliController extends BaseController {
if
(
signRecordService
.
isHave
(
signRecord
.
getRecruitId
(),
signRecord
.
getPersonId
())){
signRecordService
.
del
(
signRecord
.
getRecruitId
(),
signRecord
.
getPersonId
());
}
else
{
signRecordService
.
create
(
signRecord
);
recordId
=
signRecordService
.
create
(
signRecord
);
}
personService
.
update
(
person
);
...
...
@@ -416,7 +485,7 @@ public class ApiAliController extends BaseController {
// 2、验签成功:处理业务逻辑,并构造业务处理结果
response
.
put
(
"code"
,
"10000"
);
response
.
put
(
"msg"
,
"Success"
);
response
.
put
(
"out_apply_id"
,
snowFlakeFactory
.
nextId
()
);
response
.
put
(
"out_apply_id"
,
recordId
);
}
else
{
// 3、验签失败:构造错误码
response
.
put
(
"code"
,
"40004"
);
...
...
jfb-recruit/src/main/java/com/jfb/recruit/service/SignRecordService.java
浏览文件 @
a27c5895
...
...
@@ -12,10 +12,11 @@ import java.util.List;
*/
public
interface
SignRecordService
{
boolean
create
(
SignRecord
signRecord
);
String
create
(
SignRecord
signRecord
);
boolean
del
(
String
recruitId
,
String
personId
);
boolean
isHave
(
String
openId
,
String
id
);
boolean
update
(
String
recordId
,
String
state
);
}
jfb-recruit/src/main/java/com/jfb/recruit/service/impl/SignRecordServiceImpl.java
浏览文件 @
a27c5895
...
...
@@ -39,13 +39,14 @@ public class SignRecordServiceImpl extends ServiceImpl<SignRecordMapper, SignRec
* @return: boolean
**/
@Override
public
boolean
create
(
SignRecord
signRecord
)
{
public
String
create
(
SignRecord
signRecord
)
{
signRecord
.
setId
(
snowFlakeFactory
.
nextId
());
signRecord
.
setDel
(
false
);
signRecord
.
setCreateTime
(
DateUtil
.
now
());
return
super
.
save
(
signRecord
);
signRecord
.
setState
(
"APPLYING"
);
super
.
save
(
signRecord
);
return
signRecord
.
getId
();
}
...
...
@@ -86,4 +87,20 @@ public class SignRecordServiceImpl extends ServiceImpl<SignRecordMapper, SignRec
return
super
.
count
(
qw
)>
0
;
}
/**
* @author: wangmenglong
* @date; 2024/1/2 14:30
* @description: 修改状态
* @param: [account, id]
* @return: boolean
**/
@Override
public
boolean
update
(
String
recordId
,
String
state
)
{
LambdaUpdateWrapper
<
SignRecord
>
qw
=
new
LambdaUpdateWrapper
<>();
qw
.
eq
(
SignRecord:
:
getDel
,
false
)
.
eq
(
SignRecord:
:
getId
,
recordId
)
.
set
(
SignRecord:
:
getState
,
state
);
return
super
.
count
(
qw
)>
0
;
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论