mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-09 02:46:50 +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.api.ThirdApi;
|
||||||
import com.xboe.module.course.dto.CourseParam;
|
import com.xboe.module.course.dto.CourseParam;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
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.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
@@ -321,6 +322,7 @@ public class CourseAuditApi extends ApiBaseController{
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("/hrbp-submit-audit")
|
@PostMapping("/hrbp-submit-audit")
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public JsonResponse<Boolean> hrbpAudit(String auditId,String courseId,String title,Boolean pass,String remark, HttpServletRequest request){
|
public JsonResponse<Boolean> hrbpAudit(String auditId,String courseId,String title,Boolean pass,String remark, HttpServletRequest request){
|
||||||
if(StringUtils.isBlank(auditId)){
|
if(StringUtils.isBlank(auditId)){
|
||||||
return badRequest("参数错误");
|
return badRequest("参数错误");
|
||||||
@@ -350,22 +352,19 @@ public class CourseAuditApi extends ApiBaseController{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
CurrentUser cu=getCurrent();
|
||||||
CurrentUser cu=getCurrent();
|
service.hrbpSubmitAudit(auditId, courseId,open, pass,cu.getAccountId(),cu.getName(), remark);
|
||||||
service.hrbpSubmitAudit(auditId, courseId,open, pass,cu.getAccountId(),cu.getName(), remark);
|
|
||||||
|
|
||||||
if (pass){
|
if (pass){
|
||||||
//修改在线课开课状态=已开课
|
//修改在线课开课状态=已开课
|
||||||
String token = request.getHeader("Xboe-Access-Token");
|
String token = request.getHeader("Xboe-Access-Token");
|
||||||
CourseParam param = new CourseParam();
|
CourseParam param = new CourseParam();
|
||||||
param.setId(courseId);
|
param.setId(courseId);
|
||||||
thirdApi.updateOnLineStatua(param,token);
|
param.setOrgId(c.getOrgId());
|
||||||
}
|
param.setOrgName(c.getOrgName());
|
||||||
return success(true);
|
thirdApi.updateOrSaveCourse(param,token);
|
||||||
} catch (Exception e) {
|
}
|
||||||
log.error("HRBP审核提交处理错误",e);
|
return success(true);
|
||||||
return error("审核处理失败",e.getMessage(),false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/last-audit-list")
|
@PostMapping("/last-audit-list")
|
||||||
@@ -390,6 +389,7 @@ public class CourseAuditApi extends ApiBaseController{
|
|||||||
* @param dto
|
* @param dto
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@PostMapping("/submit-publish")
|
@PostMapping("/submit-publish")
|
||||||
@AutoLog(module = "课程",action = "默认管理员提交发布",info = "")
|
@AutoLog(module = "课程",action = "默认管理员提交发布",info = "")
|
||||||
public JsonResponse<Boolean> submitAndPublish(@RequestBody CourseFullDto dto, HttpServletRequest request){
|
public JsonResponse<Boolean> submitAndPublish(@RequestBody CourseFullDto dto, HttpServletRequest request){
|
||||||
@@ -423,23 +423,16 @@ public class CourseAuditApi extends ApiBaseController{
|
|||||||
dto.getCourse().setStatus(Course.STATUS_AUDIT_FINISH);//设置为审核通过状态
|
dto.getCourse().setStatus(Course.STATUS_AUDIT_FINISH);//设置为审核通过状态
|
||||||
dto.getCourse().setEnabled(true);//设置启用状态问题
|
dto.getCourse().setEnabled(true);//设置启用状态问题
|
||||||
dto.getCourse().setPublished(false);//重新提交审核设置为未发布状态
|
dto.getCourse().setPublished(false);//重新提交审核设置为未发布状态
|
||||||
try {
|
|
||||||
|
|
||||||
courseService.submitAndPublish(dto,cuser.getAccountId(),cuser.getName());
|
courseService.submitAndPublish(dto,cuser.getAccountId(),cuser.getName());
|
||||||
log.info("---------------在线课开始同步到讲师管理 ------- token = " + token);
|
log.info("---------------在线课开始同步到讲师管理 ------- token = " + token);
|
||||||
CourseParam param = new CourseParam();
|
CourseParam param = new CourseParam();
|
||||||
param.setId(dto.getCourse().getId());
|
param.setId(dto.getCourse().getId());
|
||||||
param.setOrgId(dto.getCourse().getOrgId());
|
param.setOrgId(dto.getCourse().getOrgId());
|
||||||
param.setOrgName(dto.getCourse().getOrgName());
|
param.setOrgName(dto.getCourse().getOrgName());
|
||||||
thirdApi.updateOrSaveCourse(param,token);
|
thirdApi.updateOrSaveCourse(param,token);
|
||||||
log.info("---------------在线课同步到讲师管理完毕 -------");
|
log.info("---------------在线课同步到讲师管理完毕 -------");
|
||||||
return success(true);
|
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 com.xboe.module.course.dto.*;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
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.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
@@ -300,6 +301,7 @@ public class CourseManageApi extends ApiBaseController{
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("/save")
|
@PostMapping("/save")
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@AutoLog(module = "课程",action = "保存课程基本信息",info = "")
|
@AutoLog(module = "课程",action = "保存课程基本信息",info = "")
|
||||||
public JsonResponse<CourseFullDto> saveCourseFull(@RequestBody CourseFullDto dto, HttpServletRequest request){
|
public JsonResponse<CourseFullDto> saveCourseFull(@RequestBody CourseFullDto dto, HttpServletRequest request){
|
||||||
if(dto.getCourse()==null){
|
if(dto.getCourse()==null){
|
||||||
@@ -321,30 +323,25 @@ public class CourseManageApi extends ApiBaseController{
|
|||||||
}
|
}
|
||||||
|
|
||||||
//填充必要的信息
|
//填充必要的信息
|
||||||
try {
|
if(StringUtils.isBlank(dto.getCourse().getId())) {
|
||||||
if(StringUtils.isBlank(dto.getCourse().getId())) {
|
//只有在第一次添加保存时才会这样
|
||||||
//只有在第一次添加保存时才会这样
|
fillCourseData(dto.getCourse());
|
||||||
fillCourseData(dto.getCourse());
|
courseService.save(dto);
|
||||||
courseService.save(dto);
|
}else {
|
||||||
}else {
|
//修改后重置,重新提交审核,重新发布
|
||||||
//修改后重置,重新提交审核,重新发布
|
dto.getCourse().setPublished(false);
|
||||||
dto.getCourse().setPublished(false);
|
dto.getCourse().setStatus(Course.STATUS_NONE);
|
||||||
dto.getCourse().setStatus(Course.STATUS_NONE);
|
courseService.update(dto);
|
||||||
courseService.update(dto);
|
}
|
||||||
}
|
String token = request.getHeader("Xboe-Access-Token");
|
||||||
String token = request.getHeader("Xboe-Access-Token");
|
log.info("---------------在线课开始同步到讲师管理 ------- token = " + token);
|
||||||
log.info("---------------在线课开始同步到讲师管理 ------- token = " + token);
|
CourseParam param = new CourseParam();
|
||||||
CourseParam param = new CourseParam();
|
param.setId(dto.getCourse().getId());
|
||||||
param.setId(dto.getCourse().getId());
|
param.setOrgId(dto.getCourse().getOrgId());
|
||||||
param.setOrgId(dto.getCourse().getOrgId());
|
param.setOrgName(dto.getCourse().getOrgName());
|
||||||
param.setOrgName(dto.getCourse().getOrgName());
|
thirdApi.updateOrSaveCourse(param,token);
|
||||||
thirdApi.updateOrSaveCourse(param,token);
|
log.info("---------------在线课同步到讲师管理完毕 -------");
|
||||||
log.info("---------------在线课同步到讲师管理完毕 -------");
|
return success(dto);
|
||||||
return success(dto);
|
|
||||||
} catch (Exception e) {
|
|
||||||
log.error("整体保存课程信息错误",e);
|
|
||||||
return error("保存失败",e.getMessage());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***
|
/***
|
||||||
@@ -443,6 +440,7 @@ public class CourseManageApi extends ApiBaseController{
|
|||||||
|
|
||||||
|
|
||||||
@PostMapping("/submit")
|
@PostMapping("/submit")
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@AutoLog(module = "课程",action = "提交课程",info = "")
|
@AutoLog(module = "课程",action = "提交课程",info = "")
|
||||||
public JsonResponse<CourseFullDto> submitCourseFull(@RequestBody CourseFullDto dto){
|
public JsonResponse<CourseFullDto> submitCourseFull(@RequestBody CourseFullDto dto){
|
||||||
if(dto.getCourse()==null){
|
if(dto.getCourse()==null){
|
||||||
@@ -520,68 +518,63 @@ public class CourseManageApi extends ApiBaseController{
|
|||||||
//检查课程内容的完整性
|
//检查课程内容的完整性
|
||||||
//填充必要的信息
|
//填充必要的信息
|
||||||
//fillCourseData(dto.getCourse());
|
//fillCourseData(dto.getCourse());
|
||||||
try {
|
CourseHRBPAudit hrbpAudit = hrbpAuditService.hasAuditing(dto.getCourse().getId());
|
||||||
CourseHRBPAudit hrbpAudit = hrbpAuditService.hasAuditing(dto.getCourse().getId());
|
if(hrbpAudit!=null) {
|
||||||
if(hrbpAudit!=null) {
|
return badRequest("此课程中已有审核,不能再提交审核,如修改请先撤回");
|
||||||
return badRequest("此课程中已有审核,不能再提交审核,如修改请先撤回");
|
}
|
||||||
}
|
if(!isLocalDevelopment()) {
|
||||||
if(!isLocalDevelopment()) {
|
if(StringUtils.isBlank(dto.getAuditUser().getAid())) {
|
||||||
if(StringUtils.isBlank(dto.getAuditUser().getAid())) {
|
|
||||||
// if(StringUtils.isBlank(dto.getAuditUser().getKid())) {
|
// if(StringUtils.isBlank(dto.getAuditUser().getKid())) {
|
||||||
// return badRequest("HRBP审核信息人员错误");
|
// return badRequest("HRBP审核信息人员错误");
|
||||||
// }
|
// }
|
||||||
//转化用户id
|
//转化用户id
|
||||||
User u = userService.getByUserNo(dto.getAuditUser().getCode());
|
User u = userService.getByUserNo(dto.getAuditUser().getCode());
|
||||||
if(u==null) { //本地没有,需要同步、
|
if(u==null) { //本地没有,需要同步、
|
||||||
//20230815 直接返回错误,这个时候传的用户,在新系统中没有,需要用户登录一下,或着用户中心推送
|
//20230815 直接返回错误,这个时候传的用户,在新系统中没有,需要用户登录一下,或着用户中心推送
|
||||||
return badRequest("无关联HRBP审核人员,请先同步用户");
|
return badRequest("无关联HRBP审核人员,请先同步用户");
|
||||||
//Organization org = orgService.getBySysId(dto.getAuditUser().getOrgkid());
|
//Organization org = orgService.getBySysId(dto.getAuditUser().getOrgkid());
|
||||||
// UserVo fwUser = fwUserService.getById(dto.getAuditUser().getKid());
|
// UserVo fwUser = fwUserService.getById(dto.getAuditUser().getKid());
|
||||||
// Account a =userService.syncAccountUser(fwUser);
|
// Account a =userService.syncAccountUser(fwUser);
|
||||||
// dto.getAuditUser().setAid(a.getId());
|
// dto.getAuditUser().setAid(a.getId());
|
||||||
}else {
|
}else {
|
||||||
dto.getAuditUser().setAid(u.getId());
|
dto.getAuditUser().setAid(u.getId());
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
log.info("已获取过hrbp审核人id【"+dto.getAuditUser().getAid()+"】,不需要再转化");
|
log.info("已获取过hrbp审核人id【"+dto.getAuditUser().getAid()+"】,不需要再转化");
|
||||||
}
|
}
|
||||||
|
|
||||||
}else {
|
}else {
|
||||||
//弄成固定值,用于测试
|
//弄成固定值,用于测试
|
||||||
dto.getAuditUser().setAid(getCurrent().getAccountId());
|
dto.getAuditUser().setAid(getCurrent().getAccountId());
|
||||||
}
|
}
|
||||||
if(StringUtils.isBlank(dto.getAuditUser().getAid())) {
|
if(StringUtils.isBlank(dto.getAuditUser().getAid())) {
|
||||||
return badRequest("查询组织HRBP审核人员失败");
|
return badRequest("查询组织HRBP审核人员失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
//设置为提交状态
|
//设置为提交状态
|
||||||
dto.getCourse().setStatus(Course.STATUS_SUBMIT);
|
dto.getCourse().setStatus(Course.STATUS_SUBMIT);
|
||||||
dto.getCourse().setEnabled(true);//设置启用状态问题
|
dto.getCourse().setEnabled(true);//设置启用状态问题
|
||||||
dto.getCourse().setPublished(false);//重新提交审核设置为未发布状态
|
dto.getCourse().setPublished(false);//重新提交审核设置为未发布状态
|
||||||
courseService.submit(dto);
|
courseService.submit(dto);
|
||||||
//提交成功发邮件提醒
|
//提交成功发邮件提醒
|
||||||
try {
|
try {
|
||||||
String htmlEmail=createEmailHtml(dto.getAuditUser().getName(),dto.getCourse().getOrgId(),
|
String htmlEmail=createEmailHtml(dto.getAuditUser().getName(),dto.getCourse().getOrgId(),
|
||||||
dto.getCourse().getOrgName(),
|
dto.getCourse().getOrgName(),
|
||||||
dto.getCourse().getSysCreateBy(),dto.getCourse().getName());
|
dto.getCourse().getSysCreateBy(),dto.getCourse().getName());
|
||||||
//邮件发送
|
//邮件发送
|
||||||
String email=dto.getAuditUser().getEmail();
|
String email=dto.getAuditUser().getEmail();
|
||||||
if(!isLocalDevelopment()) {
|
if(!isLocalDevelopment()) {
|
||||||
//只是非开发模式下才可以发送
|
//只是非开发模式下才可以发送
|
||||||
service.sendMail(email,"《"+dto.getCourse().getName()+"》课程审核提醒", htmlEmail,"数字化学习平台");
|
service.sendMail(email,"《"+dto.getCourse().getName()+"》课程审核提醒", htmlEmail,"数字化学习平台");
|
||||||
}else {
|
}else {
|
||||||
//service.sendMail("daihaixing@bjxask.com","课程审核提醒", htmlEmail,"数字化学习平台");
|
//service.sendMail("daihaixing@bjxask.com","课程审核提醒", htmlEmail,"数字化学习平台");
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
log.error("邮件发送失败",ex);
|
log.error("邮件发送失败",ex);
|
||||||
return error("课程已提交,但邮件发送失败",ex.getMessage());
|
return error("课程已提交,但邮件发送失败",ex.getMessage());
|
||||||
}
|
}
|
||||||
return success(dto);
|
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 {
|
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")
|
@PostMapping("/sumbits")
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public JsonResponse<Boolean> sumbitId(HttpServletRequest request,CourseHRBPAudit audit,String ucode,String ukid,String email,String orgName){
|
public JsonResponse<Boolean> sumbitId(HttpServletRequest request,CourseHRBPAudit audit,String ucode,String ukid,String email,String orgName){
|
||||||
if(StringUtils.isBlank(audit.getCourseId())){
|
if(StringUtils.isBlank(audit.getCourseId())){
|
||||||
return badRequest("参数错误");
|
return badRequest("参数错误");
|
||||||
@@ -637,24 +631,23 @@ public class CourseManageApi extends ApiBaseController{
|
|||||||
return badRequest(error);
|
return badRequest(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
CourseHRBPAudit hrbpAudit = hrbpAuditService.hasAuditing(audit.getCourseId());
|
||||||
CourseHRBPAudit hrbpAudit = hrbpAuditService.hasAuditing(audit.getCourseId());
|
if(hrbpAudit!=null) {
|
||||||
if(hrbpAudit!=null) {
|
return badRequest("此课程中已有审核,不能再提交审核,如修改请先撤回");
|
||||||
return badRequest("此课程中已有审核,不能再提交审核,如修改请先撤回");
|
}
|
||||||
}
|
|
||||||
|
if(!isLocalDevelopment()) {
|
||||||
if(!isLocalDevelopment()) {
|
if(StringUtils.isBlank(audit.getAid())) {
|
||||||
if(StringUtils.isBlank(audit.getAid())) {
|
|
||||||
|
|
||||||
// if(StringUtils.isBlank(ukid)){
|
// if(StringUtils.isBlank(ukid)){
|
||||||
// return badRequest("未关联HRBP审核人员");
|
// return badRequest("未关联HRBP审核人员");
|
||||||
// }
|
// }
|
||||||
//转化用户id
|
//转化用户id
|
||||||
User u = userService.getByUserNo(ucode);
|
User u = userService.getByUserNo(ucode);
|
||||||
if(u==null) { //本地没有,需要同步
|
if(u==null) { //本地没有,需要同步
|
||||||
return badRequest("无关联HRBP审核人员,请先同步用户");
|
return badRequest("无关联HRBP审核人员,请先同步用户");
|
||||||
//Organization org = orgService.getBySysId(dto.getAuditUser().getOrgkid());
|
//Organization org = orgService.getBySysId(dto.getAuditUser().getOrgkid());
|
||||||
//20230815 已经不再使用直接查老系统,采用接口同步的方式
|
//20230815 已经不再使用直接查老系统,采用接口同步的方式
|
||||||
// UserVo fwUser = fwUserService.getById(ukid);
|
// UserVo fwUser = fwUserService.getById(ukid);
|
||||||
// Account a =userService.syncAccountUser(fwUser);
|
// Account a =userService.syncAccountUser(fwUser);
|
||||||
// audit.setAid(a.getId());
|
// audit.setAid(a.getId());
|
||||||
@@ -670,43 +663,39 @@ public class CourseManageApi extends ApiBaseController{
|
|||||||
// }catch(Exception exp) {
|
// }catch(Exception exp) {
|
||||||
// log.error("登录同步用户错误",exp);
|
// log.error("登录同步用户错误",exp);
|
||||||
// }
|
// }
|
||||||
}else {
|
}else {
|
||||||
audit.setAid(u.getId());
|
audit.setAid(u.getId());
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
log.info("已获取过hrbp审核人id【"+audit.getAid()+"】,不需要再转化");
|
log.info("已获取过hrbp审核人id【"+audit.getAid()+"】,不需要再转化");
|
||||||
}
|
}
|
||||||
|
|
||||||
}else {
|
}else {
|
||||||
//弄成固定值,用于测试
|
//弄成固定值,用于测试
|
||||||
audit.setAid(getCurrent().getAccountId());
|
audit.setAid(getCurrent().getAccountId());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(StringUtils.isBlank(audit.getAid())) {
|
if(StringUtils.isBlank(audit.getAid())) {
|
||||||
return badRequest("查询组织HRBP审核人员失败");
|
return badRequest("查询组织HRBP审核人员失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
courseService.submit(audit);
|
courseService.submit(audit);
|
||||||
|
|
||||||
//提交成功发邮件提醒
|
//提交成功发邮件提醒
|
||||||
try {
|
try {
|
||||||
String htmlEmail=createEmailHtml(audit.getAuditUser(),course.getOrgId(), orgName,audit.getCourseUser(),audit.getCourseName());
|
String htmlEmail=createEmailHtml(audit.getAuditUser(),course.getOrgId(), orgName,audit.getCourseUser(),audit.getCourseName());
|
||||||
//邮件发送
|
//邮件发送
|
||||||
if(!isLocalDevelopment()) {
|
if(!isLocalDevelopment()) {
|
||||||
//只是非高度环境上才会发送
|
//只是非高度环境上才会发送
|
||||||
service.sendMail(email,"《"+course.getName()+"》课程审核提醒",htmlEmail,"数字化学习平台");
|
service.sendMail(email,"《"+course.getName()+"》课程审核提醒",htmlEmail,"数字化学习平台");
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
log.error("邮件发送失败",ex);
|
log.error("邮件发送失败",ex);
|
||||||
return error("课程已提交,但邮件发送失败",ex.getMessage());
|
return error("课程已提交,但邮件发送失败",ex.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
return success(true);
|
return success(true);
|
||||||
}catch(Exception e) {
|
|
||||||
log.error("提交保存课程信息错误",e);
|
|
||||||
return error("提交课程处理失败",e.getMessage());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/revoke")
|
@PostMapping("/revoke")
|
||||||
|
|||||||
@@ -161,14 +161,14 @@ public interface ICourseService {
|
|||||||
* 课程信息的整体更新,用于对课程的编辑处理
|
* 课程信息的整体更新,用于对课程的编辑处理
|
||||||
* @param full
|
* @param full
|
||||||
*/
|
*/
|
||||||
void update(CourseFullDto full)throws Exception;
|
void update(CourseFullDto full);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 提交课程,提交进入课程审核,独立的方法处理
|
* 提交课程,提交进入课程审核,独立的方法处理
|
||||||
* @param full
|
* @param full
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
void submit(CourseFullDto full)throws Exception;
|
void submit(CourseFullDto full);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用于默认管理员,直接提交发布,不走审核流程
|
* 用于默认管理员,直接提交发布,不走审核流程
|
||||||
@@ -177,14 +177,14 @@ public interface ICourseService {
|
|||||||
* @param aname 姓名
|
* @param aname 姓名
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
void submitAndPublish(CourseFullDto full,String aid,String aname)throws Exception;
|
void submitAndPublish(CourseFullDto full,String aid,String aname);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 提交一个课程
|
* 提交一个课程
|
||||||
* @param audit
|
* @param audit
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
void submit(CourseHRBPAudit audit) throws Exception;
|
void submit(CourseHRBPAudit audit);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* update 传一个id直接改值
|
* update 传一个id直接改值
|
||||||
|
|||||||
@@ -976,7 +976,7 @@ public class CourseServiceImpl implements ICourseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void update(CourseFullDto full) throws Exception {
|
public void update(CourseFullDto full) {
|
||||||
|
|
||||||
Course c = full.getCourse();//当前的课程信息
|
Course c = full.getCourse();//当前的课程信息
|
||||||
Course nowCourse = courseDao.get(c.getId());//修改之前的课程信息
|
Course nowCourse = courseDao.get(c.getId());//修改之前的课程信息
|
||||||
@@ -1028,7 +1028,7 @@ public class CourseServiceImpl implements ICourseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void submit(CourseFullDto full) throws Exception {
|
public void submit(CourseFullDto full) {
|
||||||
|
|
||||||
Course c = full.getCourse();//当前的课程信息
|
Course c = full.getCourse();//当前的课程信息
|
||||||
if (c.getVisible() == null) {
|
if (c.getVisible() == null) {
|
||||||
@@ -1084,7 +1084,7 @@ public class CourseServiceImpl implements ICourseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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();//当前的课程信息
|
Course c = full.getCourse();//当前的课程信息
|
||||||
c.setPublished(true);
|
c.setPublished(true);
|
||||||
@@ -1131,7 +1131,7 @@ public class CourseServiceImpl implements ICourseService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void submit(CourseHRBPAudit hrbpAudit) throws Exception {
|
public void submit(CourseHRBPAudit hrbpAudit) {
|
||||||
|
|
||||||
courseDao.updateMultiFieldById(hrbpAudit.getCourseId(), UpdateBuilder.create("status", Course.STATUS_SUBMIT),
|
courseDao.updateMultiFieldById(hrbpAudit.getCourseId(), UpdateBuilder.create("status", Course.STATUS_SUBMIT),
|
||||||
UpdateBuilder.create("published", false), UpdateBuilder.create("publishTime", LocalDateTime.now()));
|
UpdateBuilder.create("published", false), UpdateBuilder.create("publishTime", LocalDateTime.now()));
|
||||||
|
|||||||
Reference in New Issue
Block a user