Your ROOT_URL in app.ini is http://git.zky.com/ but you are visiting http://61.178.84.89:8998/luoluo/ry_zhky/commit/4cdb6bdb33205ec2347fbfef6c9775e50e43a984?style=unified&whitespace=ignore-change
You should set ROOT_URL correctly, otherwise the web may not work correctly.
4 changed files with
7 additions and
5 deletions
@ -78,7 +78,7 @@ public class ExamController extends BaseController {
@Log ( title = "考试" , businessType = BusinessType . INSERT )
@PostMapping ( "/add" )
@ResponseBody
public AjaxResult addSave ( @ Validated ExamSaveReqDTO reqDTO ) {
public AjaxResult addSave ( @ RequestBody @ Validated ExamSaveReqDTO reqDTO ) {
return toAjax ( examManager . saveOrUpdate ( reqDTO ) ) ;
}
@ -96,7 +96,7 @@ public class ExamController extends BaseController {
@Log ( title = "考试" , businessType = BusinessType . UPDATE )
@PostMapping ( "/edit" )
@ResponseBody
public AjaxResult editSave ( @ Validated ExamSaveReqDTO reqDTO ) {
public AjaxResult editSave ( @ RequestBody @ Validated ExamSaveReqDTO reqDTO ) {
return toAjax ( examManager . saveOrUpdate ( reqDTO ) ) ;
}
@ -96,7 +96,7 @@ public class QuController extends BaseController {
@Log ( title = "试题" , businessType = BusinessType . UPDATE )
@PostMapping ( "/edit" )
@ResponseBody
public AjaxResult editSave ( @ Validated QuDetailDTO reqDTO ) {
public AjaxResult editSave ( @ RequestBody @ Validated QuDetailDTO reqDTO ) {
return toAjax ( quManager . saveOrUpdate ( reqDTO ) ) ;
}
@ -82,6 +82,7 @@ public class ExamManager {
} else {
elExam . setCreateTime ( new Date ( ) ) ;
}
elExamService . saveOrUpdate ( elExam ) ;
if ( CollUtil . isNotEmpty ( reqDTO . getRepoList ( ) ) ) {
List < ElExamRepo > examRepos = Convert . toList ( ElExamRepo . class , reqDTO . getRepoList ( ) ) ;
examRepos . forEach ( elExamRepo - > elExamRepo . setExamId ( elExam . getId ( ) ) ) ;
@ -97,7 +98,7 @@ public class ExamManager {
} ) ;
elExamDepartService . saveBatch ( list ) ;
}
return elExamService . saveOrUpdate ( elExam ) ;
return true ;
}
@ -83,6 +83,7 @@ public class QuManager {
} else {
qu . setCreateTime ( new Date ( ) ) ;
}
quService . saveOrUpdate ( qu ) ;
if ( CollUtil . isNotEmpty ( reqDTO . getAnswerList ( ) ) ) {
List < ElQuAnswer > answerList = Convert . toList ( ElQuAnswer . class , reqDTO . getAnswerList ( ) ) ;
answerList . forEach ( elQuAnswer - > elQuAnswer . setQuId ( qu . getId ( ) ) ) ;
@ -100,7 +101,7 @@ public class QuManager {
quRepoService . saveBatch ( list ) ;
reqDTO . getRepoIds ( ) . forEach ( this : : sortRepo ) ;
}
return quService . saveOrUpdate ( qu ) ;
return true ;
}