| | |
| | | import com.thhy.secure.modules.biz.regionWarranty.service.TRegionWarrantyService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | |
| | | private TRegionWarrantyMapper tRegionWarrantyMapper; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public BasicResult insert(TRegionWarrantyEntity tRegionWarrantyEntity) { |
| | | String id = UUIDUtils.create();// |
| | | String id = UUIDUtils.create(); |
| | | tRegionWarrantyEntity.setId(id); |
| | | tRegionWarrantyMapper.insert(tRegionWarrantyEntity); |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public BasicResult delete(String id) { |
| | | tRegionWarrantyMapper.delete(id); |
| | | tRegionWarrantyMapper.deleteMiddleTable(id); |
| | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public BasicResult update(TRegionWarrantyEntity tRegionWarrantyEntity) { |
| | | tRegionWarrantyMapper.deleteMiddleTable(tRegionWarrantyEntity.getId()); |
| | | //领导 |
| | |
| | | tRegionWarrantyMapper.insertMiddleTable(t); |
| | | }); |
| | | tRegionWarrantyMapper.update(tRegionWarrantyEntity); |
| | | return null; |
| | | return BasicResult.success(); |
| | | } |
| | | |
| | | @Override |