feat:回调接口(未完成功能,仅为空壳)

This commit is contained in:
yangxinyu
2025-12-12 16:34:08 +08:00
parent f43d52c210
commit 639ac253f1
2 changed files with 48 additions and 2 deletions

View File

@@ -694,7 +694,7 @@ public class CourseManageApi extends ApiBaseController{
/**
* 25.12.10新增提交审核到BPM
*暂无BPM接口
*
*非空判断需要加/日志
*/
@PostMapping("/bpm-submit")
@AutoLog(module = "课程",action = "提交审核到BPM",info = "")
@@ -708,7 +708,7 @@ public class CourseManageApi extends ApiBaseController{
String jsonRequestBody = courseManageService.prepareDisableAuditRequest(dto);
// TODO: 调用BPM接口
// BPMResponseDto bpmResponsedto= courseManageService.callBPMInterface(jsonRequestBody);
//BPMResponseDto bpmResponsedto= courseManageService.callBPMInterface(jsonRequestBody);
// 构造返回结果
//实际使用中返回的值从BPM接口返回的JSON中获取
@@ -762,6 +762,7 @@ public class CourseManageApi extends ApiBaseController{
return success(bpmResponsedto);
}
}
return success(response);
} catch (Exception e) {
@@ -769,6 +770,21 @@ public class CourseManageApi extends ApiBaseController{
return error("error");
}
}
/**
* 25.12.12新增,审核完成的回调接口
*/
@PostMapping("/audit/callback")
public JsonResponse<String> callbackBPM(@RequestBody BPMCallbackDto dto){
try {
return success("");
} catch (Exception e) {
log.error("回调错误",e);
return error("error");
}
}
private String createEmailHtml(String name,String orgId, String orgName,String createBy,String courseName) throws Exception {
StringBuffer htmlMsg=new StringBuffer("<div style=\"line-height:30px;border:2px solid #2990ca;padding:20px\">");

View File

@@ -0,0 +1,30 @@
package com.xboe.module.course.dto;
import lombok.Data;
/**
* 25.12.12新增BPM回调接口入参
*
*/
@Data
public class BPMCallbackDto {
/**
* 审批流程ID
*/
private String auditId;
/**
* 审核结果,可选值:`success` (通过), `reject` (驳回)
*/
private String auditResult;
/**
* 最终审核意见
* auditResult为reject时传最后驳回时的驳回意见
*/
private String auditComment;
/**
* 最终审核人
* auditResult为reject时传最后驳回的用户
*/
private String lastAuditUser;
}