1. 将预报名和首页工作台查询下拉框的接口单独写, 不再使用菜单里面的表单查询接口, 会有权限问题
2. 解决教师信息编辑时, ID没有传递给后端导致报错的问题 3. 将时间控制管理器的所有接口取消权限控制, 防止给角色分配完权限后, 因为没有这个权限而报错
This commit is contained in:
parent
80722947ff
commit
afb0d32683
|
|
@ -1,10 +1,15 @@
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
// 专业列表
|
// 专业列表(管理后台用,带权限控制)
|
||||||
export function majorLists(params?: Record<string, any>) {
|
export function majorLists(params?: Record<string, any>) {
|
||||||
return request.get({ url: '/major/list', params })
|
return request.get({ url: '/major/list', params })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 专业下拉选项列表(仅id和名称,免权限)
|
||||||
|
export function majorOptionLists(params?: Record<string, any>) {
|
||||||
|
return request.get({ url: '/major/options', params })
|
||||||
|
}
|
||||||
|
|
||||||
// 专业详情
|
// 专业详情
|
||||||
export function majorDetail(params: Record<string, any>) {
|
export function majorDetail(params: Record<string, any>) {
|
||||||
return request.get({ url: '/major/detail', params })
|
return request.get({ url: '/major/detail', params })
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,15 @@
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
// 教师信息扩展列表
|
// 教师信息扩展列表(管理后台用,带权限控制)
|
||||||
export function teacherLists(params?: Record<string, any>) {
|
export function teacherLists(params?: Record<string, any>) {
|
||||||
return request.get({ url: '/teacher/list', params })
|
return request.get({ url: '/teacher/list', params })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 教师下拉选项列表(仅id和姓名,免权限)
|
||||||
|
export function teacherOptionLists(params?: Record<string, any>) {
|
||||||
|
return request.get({ url: '/teacher/options', params })
|
||||||
|
}
|
||||||
|
|
||||||
// 教师信息扩展详情
|
// 教师信息扩展详情
|
||||||
export function teacherDetail(params: Record<string, any>) {
|
export function teacherDetail(params: Record<string, any>) {
|
||||||
return request.get({ url: '/teacher/detail', params })
|
return request.get({ url: '/teacher/detail', params })
|
||||||
|
|
|
||||||
|
|
@ -124,8 +124,8 @@
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup name="info">
|
<script lang="ts" setup name="info">
|
||||||
import { infoLists, infoDetail, infoEdit } from '@/api/info/info'
|
import { infoLists, infoDetail, infoEdit } from '@/api/info/info'
|
||||||
import { majorLists } from '@/api/major'
|
import { majorOptionLists } from '@/api/major'
|
||||||
import { teacherLists } from '@/api/teacher'
|
import { teacherOptionLists } from '@/api/teacher'
|
||||||
import { usePaging } from '@/hooks/usePaging'
|
import { usePaging } from '@/hooks/usePaging'
|
||||||
import feedback from '@/utils/feedback'
|
import feedback from '@/utils/feedback'
|
||||||
import { snakeToCamel } from '@/utils/format'
|
import { snakeToCamel } from '@/utils/format'
|
||||||
|
|
@ -171,8 +171,8 @@ const formatRecruitmentTeacher = (row: any, column: any, cellValue: any) => {
|
||||||
|
|
||||||
const fetchMajorOptions = async () => {
|
const fetchMajorOptions = async () => {
|
||||||
try {
|
try {
|
||||||
const res = await majorLists()
|
const res = await majorOptionLists()
|
||||||
majorOptions.value = res.lists || []
|
majorOptions.value = res || []
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
feedback.msgError('获取专业列表失败')
|
feedback.msgError('获取专业列表失败')
|
||||||
}
|
}
|
||||||
|
|
@ -180,8 +180,8 @@ const fetchMajorOptions = async () => {
|
||||||
|
|
||||||
const fetchTeacherOptions = async () => {
|
const fetchTeacherOptions = async () => {
|
||||||
try {
|
try {
|
||||||
const res = await teacherLists()
|
const res = await teacherOptionLists()
|
||||||
teacherOptions.value = res.lists || []
|
teacherOptions.value = res || []
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
feedback.msgError('获取教师列表失败')
|
feedback.msgError('获取教师列表失败')
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,7 @@ import Popup from '@/components/popup/index.vue'
|
||||||
import { useDictOptions } from '@/hooks/useDictOptions'
|
import { useDictOptions } from '@/hooks/useDictOptions'
|
||||||
import feedback from '@/utils/feedback'
|
import feedback from '@/utils/feedback'
|
||||||
import { snakeToCamel } from '@/utils/format'
|
import { snakeToCamel } from '@/utils/format'
|
||||||
|
|
||||||
defineProps({
|
defineProps({
|
||||||
dictData: {
|
dictData: {
|
||||||
type: Object as PropType<Record<string, any[]>>,
|
type: Object as PropType<Record<string, any[]>>,
|
||||||
|
|
@ -91,6 +92,7 @@ const { optionsData } = useDictOptions<{
|
||||||
|
|
||||||
const formData = reactive({
|
const formData = reactive({
|
||||||
id: '',
|
id: '',
|
||||||
|
teacherId: '',
|
||||||
name: '',
|
name: '',
|
||||||
roleId: [],
|
roleId: [],
|
||||||
adminId: '',
|
adminId: '',
|
||||||
|
|
@ -148,6 +150,9 @@ const formRules = {
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
await formRef.value?.validate()
|
await formRef.value?.validate()
|
||||||
const data: any = { ...formData }
|
const data: any = { ...formData }
|
||||||
|
if (mode.value == 'add') {
|
||||||
|
delete data.teacherId
|
||||||
|
}
|
||||||
mode.value == 'edit' ? await teacherEdit(data) : await teacherAdd(data)
|
mode.value == 'edit' ? await teacherEdit(data) : await teacherAdd(data)
|
||||||
popupRef.value?.close()
|
popupRef.value?.close()
|
||||||
feedback.msgSuccess('操作成功')
|
feedback.msgSuccess('操作成功')
|
||||||
|
|
|
||||||
|
|
@ -1,36 +1,36 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="workbench">
|
<div class="workbench">
|
||||||
<div class="lg:flex">
|
<div class="lg:flex">
|
||||||
<el-card class="!border-none mb-4 lg:mr-4 lg:w-[350px]" shadow="never">
|
<!-- <el-card class="!border-none mb-4 lg:mr-4 lg:w-[350px]" shadow="never">-->
|
||||||
<template #header>
|
<!-- <template #header>-->
|
||||||
<span class="card-title">版本信息</span>
|
<!-- <span class="card-title">版本信息</span>-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
<div>
|
<!-- <div>-->
|
||||||
<div class="flex leading-9">
|
<!-- <div class="flex leading-9">-->
|
||||||
<div class="w-20">平台名称</div>
|
<!-- <div class="w-20">平台名称</div>-->
|
||||||
<span> {{ workbenchData.version.name }}</span>
|
<!-- <span> {{ workbenchData.version.name }}</span>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div class="flex leading-9">
|
<!-- <div class="flex leading-9">-->
|
||||||
<div class="w-20">当前版本</div>
|
<!-- <div class="w-20">当前版本</div>-->
|
||||||
<span> {{ workbenchData.version.version }}</span>
|
<!-- <span> {{ workbenchData.version.version }}</span>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div class="flex leading-9">
|
<!-- <div class="flex leading-9">-->
|
||||||
<div class="w-20">获取渠道</div>
|
<!-- <div class="w-20">获取渠道</div>-->
|
||||||
<div>
|
<!-- <div>-->
|
||||||
<a :href="workbenchData.version.channel.website" target="_blank">
|
<!-- <a :href="workbenchData.version.channel.website" target="_blank">-->
|
||||||
<el-button type="success" size="small">官网</el-button>
|
<!-- <el-button type="success" size="small">官网</el-button>-->
|
||||||
</a>
|
<!-- </a>-->
|
||||||
<a
|
<!-- <a-->
|
||||||
class="ml-3"
|
<!-- class="ml-3"-->
|
||||||
href="http://localhost:8082/doc.html#/home"
|
<!-- href="http://localhost:8082/doc.html#/home"-->
|
||||||
target="_blank"
|
<!-- target="_blank"-->
|
||||||
>
|
<!-- >-->
|
||||||
<el-button type="danger" size="small">后端文档</el-button>
|
<!-- <el-button type="danger" size="small">后端文档</el-button>-->
|
||||||
</a>
|
<!-- </a>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</el-card>
|
<!-- </el-card>-->
|
||||||
<el-card class="!border-none mb-4 flex-1" shadow="never">
|
<el-card class="!border-none mb-4 flex-1" shadow="never">
|
||||||
<template #header>
|
<template #header>
|
||||||
<div>
|
<div>
|
||||||
|
|
@ -149,7 +149,7 @@
|
||||||
import vCharts from 'vue-echarts'
|
import vCharts from 'vue-echarts'
|
||||||
|
|
||||||
import { getWorkbench } from '@/api/app'
|
import { getWorkbench } from '@/api/app'
|
||||||
import { teacherLists } from '@/api/teacher'
|
import { teacherOptionLists } from '@/api/teacher'
|
||||||
|
|
||||||
// 表单数据
|
// 表单数据
|
||||||
const workbenchData: any = reactive({
|
const workbenchData: any = reactive({
|
||||||
|
|
@ -201,8 +201,8 @@ const teacherOptions = ref<Array<{ id: number; name: string }>>([])
|
||||||
|
|
||||||
const fetchTeacherOptions = async () => {
|
const fetchTeacherOptions = async () => {
|
||||||
try {
|
try {
|
||||||
const res: any = await teacherLists()
|
const res: any = await teacherOptionLists()
|
||||||
teacherOptions.value = res.lists || []
|
teacherOptions.value = res || []
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// 静默处理,工作台不因下拉失败报错中断
|
// 静默处理,工作台不因下拉失败报错中断
|
||||||
console.error('获取招生老师列表失败', e)
|
console.error('获取招生老师列表失败', e)
|
||||||
|
|
|
||||||
|
|
@ -9,9 +9,11 @@ import com.mdd.admin.validate.major.MajorSearchValidate;
|
||||||
import com.mdd.admin.validate.commons.PageValidate;
|
import com.mdd.admin.validate.commons.PageValidate;
|
||||||
import com.mdd.admin.vo.major.MajorListedVo;
|
import com.mdd.admin.vo.major.MajorListedVo;
|
||||||
import com.mdd.admin.vo.major.MajorDetailVo;
|
import com.mdd.admin.vo.major.MajorDetailVo;
|
||||||
|
import com.mdd.admin.vo.major.MajorOptionVo;
|
||||||
import com.mdd.common.core.AjaxResult;
|
import com.mdd.common.core.AjaxResult;
|
||||||
import com.mdd.common.core.PageResult;
|
import com.mdd.common.core.PageResult;
|
||||||
import com.mdd.common.validator.annotation.IDMust;
|
import com.mdd.common.validator.annotation.IDMust;
|
||||||
|
import com.mdd.common.aop.NotPower;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
@ -28,15 +30,15 @@ public class MajorController {
|
||||||
IMajorService iMajorService;
|
IMajorService iMajorService;
|
||||||
|
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@ApiOperation(value="专业列表")
|
@ApiOperation(value = "专业列表")
|
||||||
public AjaxResult<PageResult<MajorListedVo>> list(@Validated PageValidate pageValidate,
|
public AjaxResult<PageResult<MajorListedVo>> list(@Validated PageValidate pageValidate,
|
||||||
@Validated MajorSearchValidate searchValidate) {
|
@Validated MajorSearchValidate searchValidate) {
|
||||||
PageResult<MajorListedVo> list = iMajorService.list(pageValidate, searchValidate);
|
PageResult<MajorListedVo> list = iMajorService.list(pageValidate, searchValidate);
|
||||||
return AjaxResult.success(list);
|
return AjaxResult.success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/detail")
|
@GetMapping("/detail")
|
||||||
@ApiOperation(value="专业详情")
|
@ApiOperation(value = "专业详情")
|
||||||
public AjaxResult<MajorDetailVo> detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
public AjaxResult<MajorDetailVo> detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||||
MajorDetailVo detail = iMajorService.detail(id);
|
MajorDetailVo detail = iMajorService.detail(id);
|
||||||
return AjaxResult.success(detail);
|
return AjaxResult.success(detail);
|
||||||
|
|
@ -44,7 +46,7 @@ public class MajorController {
|
||||||
|
|
||||||
@Log(title = "专业新增")
|
@Log(title = "专业新增")
|
||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
@ApiOperation(value="专业新增")
|
@ApiOperation(value = "专业新增")
|
||||||
public AjaxResult<Object> add(@Validated @RequestBody MajorCreateValidate createValidate) {
|
public AjaxResult<Object> add(@Validated @RequestBody MajorCreateValidate createValidate) {
|
||||||
iMajorService.add(createValidate);
|
iMajorService.add(createValidate);
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
|
|
@ -52,7 +54,7 @@ public class MajorController {
|
||||||
|
|
||||||
@Log(title = "专业编辑")
|
@Log(title = "专业编辑")
|
||||||
@PostMapping("/edit")
|
@PostMapping("/edit")
|
||||||
@ApiOperation(value="专业编辑")
|
@ApiOperation(value = "专业编辑")
|
||||||
public AjaxResult<Object> edit(@Validated @RequestBody MajorUpdateValidate updateValidate) {
|
public AjaxResult<Object> edit(@Validated @RequestBody MajorUpdateValidate updateValidate) {
|
||||||
iMajorService.edit(updateValidate);
|
iMajorService.edit(updateValidate);
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
|
|
@ -60,10 +62,17 @@ public class MajorController {
|
||||||
|
|
||||||
@Log(title = "专业删除")
|
@Log(title = "专业删除")
|
||||||
@PostMapping("/del")
|
@PostMapping("/del")
|
||||||
@ApiOperation(value="专业删除")
|
@ApiOperation(value = "专业删除")
|
||||||
public AjaxResult<Object> del(@Validated @RequestBody IdValidate idValidate) {
|
public AjaxResult<Object> del(@Validated @RequestBody IdValidate idValidate) {
|
||||||
iMajorService.del(idValidate.getId());
|
iMajorService.del(idValidate.getId());
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/options")
|
||||||
|
@NotPower
|
||||||
|
@ApiOperation(value = "专业下拉选项列表")
|
||||||
|
public AjaxResult<java.util.List<MajorOptionVo>> options() {
|
||||||
|
return AjaxResult.success(iMajorService.optionList());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,9 @@ import com.mdd.admin.vo.teacher.TeacherListedVo;
|
||||||
import com.mdd.admin.vo.teacher.TeacherDetailVo;
|
import com.mdd.admin.vo.teacher.TeacherDetailVo;
|
||||||
import com.mdd.common.core.AjaxResult;
|
import com.mdd.common.core.AjaxResult;
|
||||||
import com.mdd.common.core.PageResult;
|
import com.mdd.common.core.PageResult;
|
||||||
|
import com.mdd.common.aop.NotPower;
|
||||||
import com.mdd.common.entity.system.SystemRole;
|
import com.mdd.common.entity.system.SystemRole;
|
||||||
|
import com.mdd.admin.vo.teacher.TeacherOptionVo;
|
||||||
import com.mdd.common.validator.annotation.IDMust;
|
import com.mdd.common.validator.annotation.IDMust;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
|
@ -21,7 +23,6 @@ import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.management.relation.Role;
|
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("adminapi/teacher")
|
@RequestMapping("adminapi/teacher")
|
||||||
|
|
@ -91,6 +92,13 @@ public class TeacherController {
|
||||||
return iTeacherService.generateInvitationCode(idValidate.getId());
|
return iTeacherService.generateInvitationCode(idValidate.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/options")
|
||||||
|
@NotPower
|
||||||
|
@ApiOperation(value = "教师下拉选项列表")
|
||||||
|
public AjaxResult<java.util.List<TeacherOptionVo>> options() {
|
||||||
|
return AjaxResult.success(iTeacherService.optionList());
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("/qrcode")
|
@GetMapping("/qrcode")
|
||||||
@ApiOperation(value = "获取二维码图片URL", notes = "获取指定教师的二维码图片访问地址")
|
@ApiOperation(value = "获取二维码图片URL", notes = "获取指定教师的二维码图片访问地址")
|
||||||
public AjaxResult<Object> getQrCodeUrl(@Validated @IDMust() @RequestParam("id") Integer id) {
|
public AjaxResult<Object> getQrCodeUrl(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import com.mdd.admin.vo.time.CurrentDateVo;
|
||||||
import com.mdd.admin.vo.time.SemesterVo;
|
import com.mdd.admin.vo.time.SemesterVo;
|
||||||
import com.mdd.admin.vo.time.AcademicYearVo;
|
import com.mdd.admin.vo.time.AcademicYearVo;
|
||||||
import com.mdd.common.core.AjaxResult;
|
import com.mdd.common.core.AjaxResult;
|
||||||
|
import com.mdd.common.aop.NotPower;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
@ -26,7 +27,8 @@ public class TimeController {
|
||||||
ITimeServer iTimeServer;
|
ITimeServer iTimeServer;
|
||||||
|
|
||||||
@GetMapping("/currentDate")
|
@GetMapping("/currentDate")
|
||||||
@ApiOperation(value="获取当前日期时间")
|
@NotPower
|
||||||
|
@ApiOperation(value = "获取当前日期时间")
|
||||||
public AjaxResult<CurrentDateVo> currentDate() {
|
public AjaxResult<CurrentDateVo> currentDate() {
|
||||||
CurrentDateVo vo = iTimeServer.getCurrentDate();
|
CurrentDateVo vo = iTimeServer.getCurrentDate();
|
||||||
return AjaxResult.success(vo);
|
return AjaxResult.success(vo);
|
||||||
|
|
@ -34,35 +36,39 @@ public class TimeController {
|
||||||
|
|
||||||
@Log(title = "手动刷新当前学期")
|
@Log(title = "手动刷新当前学期")
|
||||||
@PostMapping("/refreshSemester")
|
@PostMapping("/refreshSemester")
|
||||||
@ApiOperation(value="手动刷新当前学期")
|
@ApiOperation(value = "手动刷新当前学期")
|
||||||
public AjaxResult<Object> refreshSemester(@Validated @RequestBody SemesterRefreshValidate validate) {
|
public AjaxResult<Object> refreshSemester(@Validated @RequestBody SemesterRefreshValidate validate) {
|
||||||
iTimeServer.refreshCurrentSemester(validate);
|
iTimeServer.refreshCurrentSemester(validate);
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/currentSemester")
|
@GetMapping("/currentSemester")
|
||||||
@ApiOperation(value="获取当前学期信息")
|
@NotPower
|
||||||
|
@ApiOperation(value = "获取当前学期信息")
|
||||||
public AjaxResult<SemesterVo> currentSemester() {
|
public AjaxResult<SemesterVo> currentSemester() {
|
||||||
SemesterVo vo = iTimeServer.getCurrentSemester();
|
SemesterVo vo = iTimeServer.getCurrentSemester();
|
||||||
return AjaxResult.success(vo);
|
return AjaxResult.success(vo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/nextSemester")
|
@GetMapping("/nextSemester")
|
||||||
@ApiOperation(value="获取下一学期信息")
|
@NotPower
|
||||||
|
@ApiOperation(value = "获取下一学期信息")
|
||||||
public AjaxResult<SemesterVo> nextSemester() {
|
public AjaxResult<SemesterVo> nextSemester() {
|
||||||
SemesterVo vo = iTimeServer.getNextSemester();
|
SemesterVo vo = iTimeServer.getNextSemester();
|
||||||
return AjaxResult.success(vo);
|
return AjaxResult.success(vo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/newSemester")
|
@GetMapping("/newSemester")
|
||||||
@ApiOperation(value="获取最新配置的学期信息")
|
@NotPower
|
||||||
|
@ApiOperation(value = "获取最新配置的学期信息")
|
||||||
public AjaxResult<SemesterVo> newSemester() {
|
public AjaxResult<SemesterVo> newSemester() {
|
||||||
SemesterVo vo = iTimeServer.getNewSemester();
|
SemesterVo vo = iTimeServer.getNewSemester();
|
||||||
return AjaxResult.success(vo);
|
return AjaxResult.success(vo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/academicYear")
|
@GetMapping("/academicYear")
|
||||||
@ApiOperation(value="获取当前学年信息")
|
@NotPower
|
||||||
|
@ApiOperation(value = "获取当前学年信息")
|
||||||
public AjaxResult<AcademicYearVo> academicYear() {
|
public AjaxResult<AcademicYearVo> academicYear() {
|
||||||
AcademicYearVo vo = iTimeServer.getCurrentAcademicYearDates();
|
AcademicYearVo vo = iTimeServer.getCurrentAcademicYearDates();
|
||||||
return AjaxResult.success(vo);
|
return AjaxResult.success(vo);
|
||||||
|
|
@ -70,7 +76,7 @@ public class TimeController {
|
||||||
|
|
||||||
@Log(title = "设置系统基准时间")
|
@Log(title = "设置系统基准时间")
|
||||||
@PostMapping("/setSystemTime")
|
@PostMapping("/setSystemTime")
|
||||||
@ApiOperation(value="设置系统基准时间")
|
@ApiOperation(value = "设置系统基准时间")
|
||||||
public AjaxResult<Object> setSystemTime(@Validated @RequestBody SystemTimeValidate validate) {
|
public AjaxResult<Object> setSystemTime(@Validated @RequestBody SystemTimeValidate validate) {
|
||||||
iTimeServer.setSystemBaseTime(validate);
|
iTimeServer.setSystemBaseTime(validate);
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
|
|
@ -78,14 +84,15 @@ public class TimeController {
|
||||||
|
|
||||||
@Log(title = "重置系统时间")
|
@Log(title = "重置系统时间")
|
||||||
@PostMapping("/resetSystemTime")
|
@PostMapping("/resetSystemTime")
|
||||||
@ApiOperation(value="重置系统时间为服务器时间")
|
@ApiOperation(value = "重置系统时间为服务器时间")
|
||||||
public AjaxResult<Object> resetSystemTime() {
|
public AjaxResult<Object> resetSystemTime() {
|
||||||
iTimeServer.resetSystemTime();
|
iTimeServer.resetSystemTime();
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/refreshConfig")
|
@GetMapping("/refreshConfig")
|
||||||
@ApiOperation(value="获取刷新配置")
|
@NotPower
|
||||||
|
@ApiOperation(value = "获取刷新配置")
|
||||||
public AjaxResult<Map<String, Object>> refreshConfig() {
|
public AjaxResult<Map<String, Object>> refreshConfig() {
|
||||||
String cron = iTimeServer.getRefreshCron();
|
String cron = iTimeServer.getRefreshCron();
|
||||||
Boolean enabled = iTimeServer.isAutoRefreshEnabled();
|
Boolean enabled = iTimeServer.isAutoRefreshEnabled();
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,12 @@ import com.mdd.admin.validate.major.MajorUpdateValidate;
|
||||||
import com.mdd.admin.validate.major.MajorSearchValidate;
|
import com.mdd.admin.validate.major.MajorSearchValidate;
|
||||||
import com.mdd.admin.vo.major.MajorListedVo;
|
import com.mdd.admin.vo.major.MajorListedVo;
|
||||||
import com.mdd.admin.vo.major.MajorDetailVo;
|
import com.mdd.admin.vo.major.MajorDetailVo;
|
||||||
|
import com.mdd.admin.vo.major.MajorOptionVo;
|
||||||
import com.mdd.common.core.PageResult;
|
import com.mdd.common.core.PageResult;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 专业服务接口类
|
* 专业服务接口类
|
||||||
|
*
|
||||||
* @author LikeAdmin
|
* @author LikeAdmin
|
||||||
*/
|
*/
|
||||||
public interface IMajorService {
|
public interface IMajorService {
|
||||||
|
|
@ -17,44 +19,49 @@ public interface IMajorService {
|
||||||
/**
|
/**
|
||||||
* 专业列表
|
* 专业列表
|
||||||
*
|
*
|
||||||
* @author LikeAdmin
|
* @param pageValidate 分页参数
|
||||||
* @param pageValidate 分页参数
|
|
||||||
* @param searchValidate 搜索参数
|
* @param searchValidate 搜索参数
|
||||||
* @return PageResult<MajorListedVo>
|
* @return PageResult<MajorListedVo>
|
||||||
|
* @author LikeAdmin
|
||||||
*/
|
*/
|
||||||
PageResult<MajorListedVo> list(PageValidate pageValidate, MajorSearchValidate searchValidate);
|
PageResult<MajorListedVo> list(PageValidate pageValidate, MajorSearchValidate searchValidate);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 专业详情
|
* 专业详情
|
||||||
*
|
*
|
||||||
* @author LikeAdmin
|
|
||||||
* @param id 主键ID
|
* @param id 主键ID
|
||||||
* @return MajorDetailVo
|
* @return MajorDetailVo
|
||||||
|
* @author LikeAdmin
|
||||||
*/
|
*/
|
||||||
MajorDetailVo detail(Integer id);
|
MajorDetailVo detail(Integer id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 专业新增
|
* 专业新增
|
||||||
*
|
*
|
||||||
* @author LikeAdmin
|
|
||||||
* @param createValidate 参数
|
* @param createValidate 参数
|
||||||
|
* @author LikeAdmin
|
||||||
*/
|
*/
|
||||||
void add(MajorCreateValidate createValidate);
|
void add(MajorCreateValidate createValidate);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 专业编辑
|
* 专业编辑
|
||||||
*
|
*
|
||||||
* @author LikeAdmin
|
|
||||||
* @param updateValidate 参数
|
* @param updateValidate 参数
|
||||||
|
* @author LikeAdmin
|
||||||
*/
|
*/
|
||||||
void edit(MajorUpdateValidate updateValidate);
|
void edit(MajorUpdateValidate updateValidate);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 专业删除
|
* 专业删除
|
||||||
*
|
*
|
||||||
* @author LikeAdmin
|
|
||||||
* @param id 主键ID
|
* @param id 主键ID
|
||||||
|
* @author LikeAdmin
|
||||||
*/
|
*/
|
||||||
void del(Integer id);
|
void del(Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 专业下拉选项列表(仅id和名称)
|
||||||
|
*/
|
||||||
|
java.util.List<MajorOptionVo> optionList();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,12 +6,14 @@ import com.mdd.admin.validate.teacher.TeacherUpdateValidate;
|
||||||
import com.mdd.admin.validate.teacher.TeacherSearchValidate;
|
import com.mdd.admin.validate.teacher.TeacherSearchValidate;
|
||||||
import com.mdd.admin.vo.teacher.TeacherListedVo;
|
import com.mdd.admin.vo.teacher.TeacherListedVo;
|
||||||
import com.mdd.admin.vo.teacher.TeacherDetailVo;
|
import com.mdd.admin.vo.teacher.TeacherDetailVo;
|
||||||
|
import com.mdd.admin.vo.teacher.TeacherOptionVo;
|
||||||
import com.mdd.common.core.AjaxResult;
|
import com.mdd.common.core.AjaxResult;
|
||||||
import com.mdd.common.core.PageResult;
|
import com.mdd.common.core.PageResult;
|
||||||
import com.mdd.common.entity.system.SystemRole;
|
import com.mdd.common.entity.system.SystemRole;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 教师信息扩展服务接口类
|
* 教师信息扩展服务接口类
|
||||||
|
*
|
||||||
* @author gyp
|
* @author gyp
|
||||||
*/
|
*/
|
||||||
public interface ITeacherService {
|
public interface ITeacherService {
|
||||||
|
|
@ -19,43 +21,43 @@ public interface ITeacherService {
|
||||||
/**
|
/**
|
||||||
* 教师信息扩展列表
|
* 教师信息扩展列表
|
||||||
*
|
*
|
||||||
* @author gyp
|
* @param pageValidate 分页参数
|
||||||
* @param pageValidate 分页参数
|
|
||||||
* @param searchValidate 搜索参数
|
* @param searchValidate 搜索参数
|
||||||
* @return PageResult<TeacherListedVo>
|
* @return PageResult<TeacherListedVo>
|
||||||
|
* @author gyp
|
||||||
*/
|
*/
|
||||||
PageResult<TeacherListedVo> list(PageValidate pageValidate, TeacherSearchValidate searchValidate);
|
PageResult<TeacherListedVo> list(PageValidate pageValidate, TeacherSearchValidate searchValidate);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 教师信息扩展详情
|
* 教师信息扩展详情
|
||||||
*
|
*
|
||||||
* @author gyp
|
|
||||||
* @param id 主键ID
|
* @param id 主键ID
|
||||||
* @return TeacherDetailVo
|
* @return TeacherDetailVo
|
||||||
|
* @author gyp
|
||||||
*/
|
*/
|
||||||
TeacherDetailVo detail(Integer id);
|
TeacherDetailVo detail(Integer id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 教师信息扩展新增
|
* 教师信息扩展新增
|
||||||
*
|
*
|
||||||
* @author gyp
|
|
||||||
* @param createValidate 参数
|
* @param createValidate 参数
|
||||||
|
* @author gyp
|
||||||
*/
|
*/
|
||||||
AjaxResult<Object> add(TeacherCreateValidate createValidate);
|
AjaxResult<Object> add(TeacherCreateValidate createValidate);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 教师信息扩展编辑
|
* 教师信息扩展编辑
|
||||||
*
|
*
|
||||||
* @author gyp
|
|
||||||
* @param updateValidate 参数
|
* @param updateValidate 参数
|
||||||
|
* @author gyp
|
||||||
*/
|
*/
|
||||||
void edit(TeacherUpdateValidate updateValidate);
|
void edit(TeacherUpdateValidate updateValidate);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 教师信息扩展删除
|
* 教师信息扩展删除
|
||||||
*
|
*
|
||||||
* @author gyp
|
|
||||||
* @param id 主键ID
|
* @param id 主键ID
|
||||||
|
* @author gyp
|
||||||
*/
|
*/
|
||||||
void del(Integer id);
|
void del(Integer id);
|
||||||
|
|
||||||
|
|
@ -75,9 +77,9 @@ public interface ITeacherService {
|
||||||
/**
|
/**
|
||||||
* 获取二维码图片URL
|
* 获取二维码图片URL
|
||||||
*
|
*
|
||||||
* @author gyp
|
|
||||||
* @param teacherId 教师ID
|
* @param teacherId 教师ID
|
||||||
* @return AjaxResult<String> 返回二维码图片的绝对URL
|
* @return AjaxResult<String> 返回二维码图片的绝对URL
|
||||||
|
* @author gyp
|
||||||
*/
|
*/
|
||||||
AjaxResult<Object> getQrCodeUrl(Integer teacherId);
|
AjaxResult<Object> getQrCodeUrl(Integer teacherId);
|
||||||
|
|
||||||
|
|
@ -88,4 +90,9 @@ public interface ITeacherService {
|
||||||
* @return 图片字节数组,不存在时返回 null
|
* @return 图片字节数组,不存在时返回 null
|
||||||
*/
|
*/
|
||||||
byte[] getQrCodeImageBytes(Integer teacherId);
|
byte[] getQrCodeImageBytes(Integer teacherId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 教师下拉选项列表(仅id和姓名)
|
||||||
|
*/
|
||||||
|
java.util.List<TeacherOptionVo> optionList();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import com.mdd.admin.validate.major.MajorUpdateValidate;
|
||||||
import com.mdd.admin.validate.major.MajorSearchValidate;
|
import com.mdd.admin.validate.major.MajorSearchValidate;
|
||||||
import com.mdd.admin.vo.major.MajorListedVo;
|
import com.mdd.admin.vo.major.MajorListedVo;
|
||||||
import com.mdd.admin.vo.major.MajorDetailVo;
|
import com.mdd.admin.vo.major.MajorDetailVo;
|
||||||
|
import com.mdd.admin.vo.major.MajorOptionVo;
|
||||||
import com.mdd.common.core.PageResult;
|
import com.mdd.common.core.PageResult;
|
||||||
import com.mdd.common.entity.College;
|
import com.mdd.common.entity.College;
|
||||||
import com.mdd.common.entity.Major;
|
import com.mdd.common.entity.Major;
|
||||||
|
|
@ -182,4 +183,25 @@ public class MajorServiceImpl implements IMajorService {
|
||||||
majorMapper.delete(new QueryWrapper<Major>().eq("id", id));
|
majorMapper.delete(new QueryWrapper<Major>().eq("id", id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 专业下拉选项列表(仅返回正常且未删除的专业ID和名称)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public java.util.List<MajorOptionVo> optionList() {
|
||||||
|
QueryWrapper<Major> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq("major_status", 1)
|
||||||
|
.isNull("delete_time")
|
||||||
|
.orderByAsc("major_name");
|
||||||
|
|
||||||
|
java.util.List<Major> majors = majorMapper.selectList(queryWrapper);
|
||||||
|
java.util.List<MajorOptionVo> list = new java.util.ArrayList<>();
|
||||||
|
for (Major major : majors) {
|
||||||
|
MajorOptionVo vo = new MajorOptionVo();
|
||||||
|
vo.setId(major.getId());
|
||||||
|
vo.setMajorName(major.getMajorName());
|
||||||
|
list.add(vo);
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ import com.mdd.admin.validate.teacher.TeacherUpdateValidate;
|
||||||
import com.mdd.admin.validate.teacher.TeacherSearchValidate;
|
import com.mdd.admin.validate.teacher.TeacherSearchValidate;
|
||||||
import com.mdd.admin.vo.teacher.TeacherListedVo;
|
import com.mdd.admin.vo.teacher.TeacherListedVo;
|
||||||
import com.mdd.admin.vo.teacher.TeacherDetailVo;
|
import com.mdd.admin.vo.teacher.TeacherDetailVo;
|
||||||
|
import com.mdd.admin.vo.teacher.TeacherOptionVo;
|
||||||
import com.mdd.common.core.AjaxResult;
|
import com.mdd.common.core.AjaxResult;
|
||||||
import com.mdd.common.core.PageResult;
|
import com.mdd.common.core.PageResult;
|
||||||
import com.mdd.common.entity.College;
|
import com.mdd.common.entity.College;
|
||||||
|
|
@ -309,6 +310,27 @@ public class TeacherServiceImpl implements ITeacherService {
|
||||||
return AjaxResult.success(role);
|
return AjaxResult.success(role);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 教师下拉选项列表(仅返回在职且未删除教师的ID和姓名)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public java.util.List<TeacherOptionVo> optionList() {
|
||||||
|
QueryWrapper<Teacher> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq("teacher_status", 1)
|
||||||
|
.isNull("delete_time")
|
||||||
|
.orderByAsc("teacher_name");
|
||||||
|
|
||||||
|
java.util.List<Teacher> teachers = teacherMapper.selectList(queryWrapper);
|
||||||
|
java.util.List<TeacherOptionVo> list = new java.util.ArrayList<>();
|
||||||
|
for (Teacher teacher : teachers) {
|
||||||
|
TeacherOptionVo vo = new TeacherOptionVo();
|
||||||
|
vo.setId(teacher.getTeacherId());
|
||||||
|
vo.setName(teacher.getTeacherName());
|
||||||
|
list.add(vo);
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生成唯一教师工号:T + 时间戳秒 + 3位随机数
|
* 生成唯一教师工号:T + 时间戳秒 + 3位随机数
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue