mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-08 18:36:51 +08:00
Compare commits
3 Commits
test1031
...
20251029-1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
55dac06e5f | ||
|
|
a72a042636 | ||
|
|
4110d0632f |
@@ -10,6 +10,7 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import com.xboe.api.ThirdApi;
|
||||
import com.xboe.module.course.dto.CourseParam;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@@ -321,6 +322,7 @@ public class CourseAuditApi extends ApiBaseController{
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/hrbp-submit-audit")
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public JsonResponse<Boolean> hrbpAudit(String auditId,String courseId,String title,Boolean pass,String remark, HttpServletRequest request){
|
||||
if(StringUtils.isBlank(auditId)){
|
||||
return badRequest("参数错误");
|
||||
@@ -350,7 +352,6 @@ public class CourseAuditApi extends ApiBaseController{
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
CurrentUser cu=getCurrent();
|
||||
service.hrbpSubmitAudit(auditId, courseId,open, pass,cu.getAccountId(),cu.getName(), remark);
|
||||
|
||||
@@ -359,13 +360,11 @@ public class CourseAuditApi extends ApiBaseController{
|
||||
String token = request.getHeader("Xboe-Access-Token");
|
||||
CourseParam param = new CourseParam();
|
||||
param.setId(courseId);
|
||||
thirdApi.updateOnLineStatua(param,token);
|
||||
param.setOrgId(c.getOrgId());
|
||||
param.setOrgName(c.getOrgName());
|
||||
thirdApi.updateOrSaveCourse(param,token);
|
||||
}
|
||||
return success(true);
|
||||
} catch (Exception e) {
|
||||
log.error("HRBP审核提交处理错误",e);
|
||||
return error("审核处理失败",e.getMessage(),false);
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping("/last-audit-list")
|
||||
@@ -390,6 +389,7 @@ public class CourseAuditApi extends ApiBaseController{
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@PostMapping("/submit-publish")
|
||||
@AutoLog(module = "课程",action = "默认管理员提交发布",info = "")
|
||||
public JsonResponse<Boolean> submitAndPublish(@RequestBody CourseFullDto dto, HttpServletRequest request){
|
||||
@@ -423,7 +423,6 @@ public class CourseAuditApi extends ApiBaseController{
|
||||
dto.getCourse().setStatus(Course.STATUS_AUDIT_FINISH);//设置为审核通过状态
|
||||
dto.getCourse().setEnabled(true);//设置启用状态问题
|
||||
dto.getCourse().setPublished(false);//重新提交审核设置为未发布状态
|
||||
try {
|
||||
|
||||
courseService.submitAndPublish(dto,cuser.getAccountId(),cuser.getName());
|
||||
log.info("---------------在线课开始同步到讲师管理 ------- token = " + token);
|
||||
@@ -434,12 +433,6 @@ public class CourseAuditApi extends ApiBaseController{
|
||||
thirdApi.updateOrSaveCourse(param,token);
|
||||
log.info("---------------在线课同步到讲师管理完毕 -------");
|
||||
return success(true);
|
||||
} catch (Exception e) {
|
||||
log.error("默认管理员提交直接发布处理失败",e);
|
||||
e.printStackTrace();
|
||||
return error("发布课程失败",e.getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ import com.xboe.api.ThirdApi;
|
||||
import com.xboe.module.course.dto.*;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
@@ -300,6 +301,7 @@ public class CourseManageApi extends ApiBaseController{
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@AutoLog(module = "课程",action = "保存课程基本信息",info = "")
|
||||
public JsonResponse<CourseFullDto> saveCourseFull(@RequestBody CourseFullDto dto, HttpServletRequest request){
|
||||
if(dto.getCourse()==null){
|
||||
@@ -321,7 +323,6 @@ public class CourseManageApi extends ApiBaseController{
|
||||
}
|
||||
|
||||
//填充必要的信息
|
||||
try {
|
||||
if(StringUtils.isBlank(dto.getCourse().getId())) {
|
||||
//只有在第一次添加保存时才会这样
|
||||
fillCourseData(dto.getCourse());
|
||||
@@ -341,10 +342,6 @@ public class CourseManageApi extends ApiBaseController{
|
||||
thirdApi.updateOrSaveCourse(param,token);
|
||||
log.info("---------------在线课同步到讲师管理完毕 -------");
|
||||
return success(dto);
|
||||
} catch (Exception e) {
|
||||
log.error("整体保存课程信息错误",e);
|
||||
return error("保存失败",e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/***
|
||||
@@ -443,6 +440,7 @@ public class CourseManageApi extends ApiBaseController{
|
||||
|
||||
|
||||
@PostMapping("/submit")
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@AutoLog(module = "课程",action = "提交课程",info = "")
|
||||
public JsonResponse<CourseFullDto> submitCourseFull(@RequestBody CourseFullDto dto){
|
||||
if(dto.getCourse()==null){
|
||||
@@ -520,7 +518,6 @@ public class CourseManageApi extends ApiBaseController{
|
||||
//检查课程内容的完整性
|
||||
//填充必要的信息
|
||||
//fillCourseData(dto.getCourse());
|
||||
try {
|
||||
CourseHRBPAudit hrbpAudit = hrbpAuditService.hasAuditing(dto.getCourse().getId());
|
||||
if(hrbpAudit!=null) {
|
||||
return badRequest("此课程中已有审核,不能再提交审核,如修改请先撤回");
|
||||
@@ -578,10 +575,6 @@ public class CourseManageApi extends ApiBaseController{
|
||||
return error("课程已提交,但邮件发送失败",ex.getMessage());
|
||||
}
|
||||
return success(dto);
|
||||
} catch (Exception e) {
|
||||
log.error("提交保存课程信息错误",e);
|
||||
return error("提交课程处理失败",e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
private String createEmailHtml(String name,String orgId, String orgName,String createBy,String courseName) throws Exception {
|
||||
@@ -615,6 +608,7 @@ public class CourseManageApi extends ApiBaseController{
|
||||
}
|
||||
|
||||
@PostMapping("/sumbits")
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public JsonResponse<Boolean> sumbitId(HttpServletRequest request,CourseHRBPAudit audit,String ucode,String ukid,String email,String orgName){
|
||||
if(StringUtils.isBlank(audit.getCourseId())){
|
||||
return badRequest("参数错误");
|
||||
@@ -637,7 +631,6 @@ public class CourseManageApi extends ApiBaseController{
|
||||
return badRequest(error);
|
||||
}
|
||||
|
||||
try {
|
||||
CourseHRBPAudit hrbpAudit = hrbpAuditService.hasAuditing(audit.getCourseId());
|
||||
if(hrbpAudit!=null) {
|
||||
return badRequest("此课程中已有审核,不能再提交审核,如修改请先撤回");
|
||||
@@ -703,10 +696,6 @@ public class CourseManageApi extends ApiBaseController{
|
||||
}
|
||||
|
||||
return success(true);
|
||||
}catch(Exception e) {
|
||||
log.error("提交保存课程信息错误",e);
|
||||
return error("提交课程处理失败",e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping("/revoke")
|
||||
|
||||
@@ -161,14 +161,14 @@ public interface ICourseService {
|
||||
* 课程信息的整体更新,用于对课程的编辑处理
|
||||
* @param full
|
||||
*/
|
||||
void update(CourseFullDto full)throws Exception;
|
||||
void update(CourseFullDto full);
|
||||
|
||||
/**
|
||||
* 提交课程,提交进入课程审核,独立的方法处理
|
||||
* @param full
|
||||
* @throws Exception
|
||||
*/
|
||||
void submit(CourseFullDto full)throws Exception;
|
||||
void submit(CourseFullDto full);
|
||||
|
||||
/**
|
||||
* 用于默认管理员,直接提交发布,不走审核流程
|
||||
@@ -177,14 +177,14 @@ public interface ICourseService {
|
||||
* @param aname 姓名
|
||||
* @throws Exception
|
||||
*/
|
||||
void submitAndPublish(CourseFullDto full,String aid,String aname)throws Exception;
|
||||
void submitAndPublish(CourseFullDto full,String aid,String aname);
|
||||
|
||||
/**
|
||||
* 提交一个课程
|
||||
* @param audit
|
||||
* @throws Exception
|
||||
*/
|
||||
void submit(CourseHRBPAudit audit) throws Exception;
|
||||
void submit(CourseHRBPAudit audit);
|
||||
|
||||
/**
|
||||
* update 传一个id直接改值
|
||||
|
||||
@@ -976,7 +976,7 @@ public class CourseServiceImpl implements ICourseService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(CourseFullDto full) throws Exception {
|
||||
public void update(CourseFullDto full) {
|
||||
|
||||
Course c = full.getCourse();//当前的课程信息
|
||||
Course nowCourse = courseDao.get(c.getId());//修改之前的课程信息
|
||||
@@ -1028,7 +1028,7 @@ public class CourseServiceImpl implements ICourseService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void submit(CourseFullDto full) throws Exception {
|
||||
public void submit(CourseFullDto full) {
|
||||
|
||||
Course c = full.getCourse();//当前的课程信息
|
||||
if (c.getVisible() == null) {
|
||||
@@ -1084,7 +1084,7 @@ public class CourseServiceImpl implements ICourseService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void submitAndPublish(CourseFullDto full, String aid, String aname) throws Exception {
|
||||
public void submitAndPublish(CourseFullDto full, String aid, String aname) {
|
||||
|
||||
Course c = full.getCourse();//当前的课程信息
|
||||
c.setPublished(true);
|
||||
@@ -1131,7 +1131,7 @@ public class CourseServiceImpl implements ICourseService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void submit(CourseHRBPAudit hrbpAudit) throws Exception {
|
||||
public void submit(CourseHRBPAudit hrbpAudit) {
|
||||
|
||||
courseDao.updateMultiFieldById(hrbpAudit.getCourseId(), UpdateBuilder.create("status", Course.STATUS_SUBMIT),
|
||||
UpdateBuilder.create("published", false), UpdateBuilder.create("publishTime", LocalDateTime.now()));
|
||||
|
||||
Reference in New Issue
Block a user