| | |
| | | |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.exam.common.api.CommonPage; |
| | |
| | | } |
| | | |
| | | private void checkPer(){ |
| | | boolean admin = SecurityUtils.adminUser(); |
| | | boolean admin = SecurityUtils.isAdmin(SecurityUtils.getUserId()); |
| | | if (!admin) { |
| | | throw new ApiException("非管理员不可操作"); |
| | | } |
| | |
| | | } |
| | | return CommonResult.success(map); |
| | | } |
| | | |
| | | @Override |
| | | public CommonResult topStandardizedTemplate(Integer id) { |
| | | StandardizedTemplate standardizedTemplate = new StandardizedTemplate(); |
| | | standardizedTemplate.setId(id); |
| | | standardizedTemplate.setTopTime(LocalDateTime.now()); |
| | | standardizedTemplateMapper.updateById(standardizedTemplate); |
| | | return CommonResult.success(); |
| | | } |
| | | } |