| | |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.security.core.context.SecurityContextHolder; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.time.Duration; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<BaseCase> selectPage(Page<BaseCase> page, String number, Integer communityId, Integer categories, String startTime, String endTime, String site) { |
| | | public Page<BaseCase> selectPage(Page<BaseCase> page, String number, Integer communityId, Integer categories, String startTime, String endTime, String site) { |
| | | return baseCaseMapper.selectBaseCasePage(page, number, communityId, categories, startTime, endTime, site); |
| | | } |
| | | |
| | |
| | | .setSize(queryForViolationParam.getPageSize()) |
| | | .setCurrent(queryForViolationParam.getCurrent()), queryForViolationParam); |
| | | } |
| | | |
| | | @Override |
| | | public List<QueryForViolationVO> selectViolationList(QueryForViolationParam queryForViolationParam) { |
| | | return baseCaseMapper.selectViolationPage(queryForViolationParam); |
| | | } |
| | | |
| | | @Override |
| | | public Page<BaseCaseVO> selectVideoInspection(Integer current) { |
| | | return baseCaseMapper.selectVideoInspection(new Page<>(current, 1)); |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> selectCount() { |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | Long review = baseCaseMapper.selectCount(new LambdaQueryWrapper<BaseCase>().eq(BaseCase::getState, 1)); |
| | | map.put("review", review); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Boolean updateCase(ViolationParam violationParam) { |
| | | BaseCase baseCase = new BaseCase(); |
| | | BeanUtils.copyProperties(violationParam, baseCase); |
| | | baseCase.setId(violationParam.getBaseId()); |
| | | baseCaseMapper.updateById(baseCase); |
| | | Violations violations = new Violations(); |
| | | BeanUtils.copyProperties(violationParam, violations); |
| | | violations.setId(violations.getId()); |
| | | return violationsMapper.updateById(violations) == 1 ? true : false; |
| | | } |
| | | } |