| | |
| | | |
| | | 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; |
| | |
| | | |
| | | @Override |
| | | public CommonResult insertStandardizedTemplate(StandardizedTemplate standardizedTemplate) { |
| | | checkPer(); |
| | | // checkPer(); |
| | | LoginUserDetails loginUser = SecurityUtils.getLoginUser(); |
| | | |
| | | SysCompany sysCompany = sysCompanyService.selectCompanyById(standardizedTemplate.getCompanyId().longValue()); |
| | |
| | | |
| | | @Override |
| | | public CommonResult updateStandardizedTemplate(StandardizedTemplate standardizedTemplate) { |
| | | checkPer(); |
| | | // checkPer(); |
| | | LoginUserDetails loginUser = SecurityUtils.getLoginUser(); |
| | | SysCompany sysCompany = sysCompanyService.selectCompanyById(standardizedTemplate.getCompanyId().longValue()); |
| | | standardizedTemplate.setCompanyName(sysCompany.getName()); |
| | |
| | | |
| | | @Override |
| | | public CommonResult deletedStandardizedTemplate(Integer standardizedTemplateId) { |
| | | checkPer(); |
| | | // checkPer(); |
| | | StandardizedTemplate standardizedTemplate = new StandardizedTemplate(); |
| | | LoginUserDetails loginUser = SecurityUtils.getLoginUser(); |
| | | standardizedTemplate.setUpdateBy(loginUser.getUsername()); |
| | |
| | | } |
| | | 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(); |
| | | } |
| | | } |