| | |
| | | @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)); |
| | | } |
| | | |
| | |
| | | @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); |
| | | } |