parent
48588b12fc
commit
2fb38aa62c
@ -0,0 +1,35 @@
|
||||
package cn.teammodel.controller.admin.controller;
|
||||
|
||||
import cn.teammodel.common.R;
|
||||
import cn.teammodel.model.dto.admin.weekduty.AdminFindDutyRecordDto;
|
||||
import cn.teammodel.model.dto.weekDuty.FindDutyRecordDto;
|
||||
import cn.teammodel.model.vo.weekDuty.DutyRecordVo;
|
||||
import cn.teammodel.service.DutyService;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author winter
|
||||
* @create 2024-01-09 17:59
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("admin/duty")
|
||||
public class AdminDutyController {
|
||||
@Resource
|
||||
private DutyService dutyService;
|
||||
|
||||
@PostMapping("records")
|
||||
public R<List<DutyRecordVo>> findRecords(@Valid @RequestBody AdminFindDutyRecordDto adminFindDutyRecordDto) {
|
||||
List<DutyRecordVo> res = dutyService.findAdminRecords(adminFindDutyRecordDto);
|
||||
return R.success(res);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package cn.teammodel.model.dto.admin;
|
||||
package cn.teammodel.model.dto.admin.appraise;
|
||||
|
||||
import lombok.Data;
|
||||
import javax.validation.constraints.NotNull;
|
@ -1,4 +1,4 @@
|
||||
package cn.teammodel.model.dto.admin;
|
||||
package cn.teammodel.model.dto.admin.appraise;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
@ -0,0 +1,29 @@
|
||||
package cn.teammodel.model.dto.admin.weekduty;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author winter
|
||||
* @create 2024-01-15 10:30
|
||||
*/
|
||||
@Data
|
||||
public class AdminFindDutyRecordDto {
|
||||
@ApiModelProperty("老师 id")
|
||||
private String teacherId;
|
||||
@ApiModelProperty("学生 id")
|
||||
private String studentId;
|
||||
@ApiModelProperty(value = "班级 id", notes = "若不携带默认不指定某个班级")
|
||||
private String classId;
|
||||
@ApiModelProperty(required = true)
|
||||
@NotNull(message = "academicYearid 不能为空")
|
||||
private String academicYearId;
|
||||
@ApiModelProperty(value = "是否加分", notes = "若不携带默认为全部")
|
||||
private Boolean positive;
|
||||
@ApiModelProperty(value = "起始时间", notes = "若不携带默认为当前周")
|
||||
private Long startTime;
|
||||
@ApiModelProperty(value = "结束时间", notes = "若不携带默认为当前周")
|
||||
private Long endTime;
|
||||
}
|
Loading…
Reference in new issue