智慧保安后台管理-外网
Administrator
2021-08-24 031d8b7e3e033ea2da7ae10c56cb0ac354c1d651
src/main/java/org/springblade/modules/exam/controller/ExamPaperController.java
@@ -117,6 +117,11 @@
   @ApiOperationSupport(order = 5)
   @ApiOperation(value = "修改", notes = "传入exam")
   public R update(@RequestBody ExamPaper exam) {
      String s1 =
         "update ksxt_exam set exam_name = " + "'" + exam.getExamName() + "'" +
            ",start_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(exam.getStartTime()) + "'" +
            " " +"where id = " + "'" + exam.getId() + "'";
      FtpUtil.sqlFileUpload(s1);
      return R.status(examPaperService.updateById(exam));
   }
@@ -137,6 +142,13 @@
   @ApiOperationSupport(order = 7)
   @ApiOperation(value = "逻辑删除", notes = "传入exam")
   public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) {
      //内网删除
      List<Long> list = Func.toLongList(ids);
      list.forEach(id ->{
         //内网同步
         String s1 = "delete from ksxt_exam where id = " + "'" + id + "'";
         FtpUtil.sqlFileUpload(s1);
      });
      boolean temp = examPaperService.removeByIds(Func.toLongList(ids));
      return R.status(temp);
   }