赞
踩
/**
* @Description: TODO
* @Author: CL
* @CreateTime: 2023-11-07 15:13
* @Version: 1.0
*/
@Service
@Slf4j
public class ExamConfirmServiceImpl extends ServiceImpl<ExamConfirmMapper, ExamConfirm> implements ExamConfirmService {
@Autowired
private ExamConfirmMapper examConfirmMapper;
@Override
public void insert(ExamConfirm examConfirm) {
examConfirmMapper.insert(examConfirm);
}
@Override
public void update(ExamConfirm examConfirm) {
examConfirmMapper.updateById(examConfirm);
}
@Override
public void del(String id) {
examConfirmMapper.deleteById(id);
}
@Override
public ExamConfirm getInfo(String id) {
ExamConfirm examConfirm = examConfirmMapper.selectById(id);
return examConfirm;
}
@Override
public HashMap<String, Object> getList(Page page, QueryExam query) {
QueryWrapper<ExamConfirm> qw = new QueryWrapper();
if (StringUtils.isNotBlank(query.getFactoryId())) {
qw.eq("factory_id", query.getFactoryId());
}
if (StringUtils.isNotBlank(query.getStatus())) {
qw.eq("status", query.getStatus());
}
if (StringUtils.isNotBlank(query.getExamTitle())) {
qw.like("exam_title", query.getExamTitle());
}
if (StringUtils.isNotBlank(query.getWorkerId())) {
qw.like("worker_id", query.getWorkerId());
}
qw.orderByDesc("create_time");
IPage iPage = this.baseMapper.selectPage(page, qw);
List<Factory> list = iPage.getRecords();
HashMap<String, Object> pageMap = new HashMap<>();
HashMap<String, Object> result = new HashMap<>();
pageMap.put("totalRows", iPage.getTotal());
pageMap.put("pageSize", iPage.getSize());
pageMap.put("current", iPage.getCurrent());
result.put("pagination", pageMap);
result.put("data", list);
return result;
}
}
public R convert(@RequestBody String base64) {
MultipartFile file = BASE64DecodedMultipartFile.base64ToMultipart(base64);
upload(file);
}
本文参考与:https://cloud.tencent.com/developer/article/2242674?from=15425
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。