| | |
| | | package com.whyc.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.whyc.mapper.FBOTestDataInfMapper; |
| | | import com.whyc.mapper.FBOTestDataMapper; |
| | | import com.whyc.pojo.FBOTestDataInf; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.sql.Wrapper; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class FBOTestDataInfService { |
| | |
| | | @Resource |
| | | private FBOTestDataInfMapper mapper; |
| | | |
| | | @Resource |
| | | private FBOTestDataInfMapper dataInfMapper; |
| | | |
| | | @Resource |
| | | private FBOTestDataMapper dataMapper; |
| | | |
| | | @Autowired |
| | | private SubTablePageInfoService subService; |
| | | |
| | | public List<FBOTestDataInf> getList(Integer battGroupId) { |
| | | QueryWrapper<FBOTestDataInf> wrapper = Wrappers.query(); |
| | | wrapper.eq("BattGroupId",battGroupId).orderByAsc("test_starttime"); |
| | | return mapper.selectList(wrapper); |
| | | } |
| | | |
| | | @Transactional |
| | | public void delete(Integer battGroupId, Integer testRecordCount) { |
| | | //删除testdata_inf数据 |
| | | UpdateWrapper<FBOTestDataInf> wrapper = Wrappers.update(); |
| | | wrapper.eq("BattGroupId",battGroupId).eq("test_record_count",testRecordCount); |
| | | dataInfMapper.delete(wrapper); |
| | | //删除data表数据 |
| | | //dataMapper.delete(battGroupId,testRecordCount); |
| | | subService.delete(battGroupId,testRecordCount); |
| | | } |
| | | } |