| | |
| | | package com.ycl.jxkg.controller.admin; |
| | | |
| | | import com.ycl.jxkg.base.BaseApiController; |
| | | import com.ycl.jxkg.base.Result; |
| | | import com.ycl.jxkg.domain.form.ExamCheatForm; |
| | | import com.ycl.jxkg.domain.query.ExamCheatQuery; |
| | |
| | | import com.ycl.jxkg.service.ExamCheatService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.undertow.util.DateUtils; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.apache.poi.ss.usermodel.DateUtil; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.constraints.NotEmpty; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @Api(value = "考试作弊记录", tags = "考试作弊记录管理") |
| | | @RestController |
| | | @RequestMapping("/api/admin/cheat") |
| | | public class ExamCheatController { |
| | | public class ExamCheatController extends BaseApiController { |
| | | |
| | | private final ExamCheatService examCheatService; |
| | | |
| | |
| | | @ApiOperation(value = "添加", notes = "添加") |
| | | @PreAuthorize("hasAuthority('examCheat:add')") |
| | | public Result add(@RequestBody @Validated(Add.class) ExamCheatForm form) { |
| | | form.setCreateUser(getCurrentUser().getId()); |
| | | form.setCreateTime(new Date()); |
| | | return examCheatService.add(form); |
| | | } |
| | | |