| | |
| | | import com.doumee.dao.admin.response.ProblemDTO; |
| | | import com.doumee.dao.business.ProblemsMapper; |
| | | import com.doumee.dao.business.model.Problems; |
| | | import com.doumee.dao.web.response.ProblemsVO; |
| | | import com.doumee.service.business.ProblemsService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | |
| | | return collect; |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取题目信息 |
| | | * @param useType |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<ProblemsVO> getProblemsVO(Integer useType){ |
| | | List<Problems> problemsList = problemsMapper.selectList(new QueryWrapper<Problems>().lambda().eq(Problems::getUseType,useType) |
| | | .eq(Problems::getIsdeleted, Constants.ZERO).orderByAsc(Problems::getSortnu)); |
| | | List<ProblemsVO> problemsVOList = new ArrayList<>(); |
| | | for (Problems problems:problemsList) { |
| | | ProblemsVO problemsVO = new ProblemsVO(); |
| | | BeanUtils.copyProperties(problems,problemsVO); |
| | | problemsVOList.add(problemsVO); |
| | | } |
| | | return problemsVOList; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |