| | |
| | | package com.iailab.module.data.point.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.baomidou.dynamic.datasource.annotation.DSTransactional; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.iailab.framework.common.pojo.PageResult; |
| | |
| | | import com.iailab.module.data.point.vo.DaPointPageReqVO; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @DSTransactional(rollbackFor = Exception.class) |
| | | public void add(DaPointDTO dataPoint) { |
| | | DaPointEntity daPointEntity = ConvertUtils.sourceToTarget(dataPoint, DaPointEntity.class); |
| | | daPointEntity.setId(UUID.randomUUID().toString()); |
| | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @DSTransactional(rollbackFor = Exception.class) |
| | | public void update(DaPointDTO dataPoint) { |
| | | DaPointEntity daPointEntity = ConvertUtils.sourceToTarget(dataPoint, DaPointEntity.class); |
| | | daPointEntity.setUpdateTime(new Date()); |
| | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @DSTransactional(rollbackFor = Exception.class) |
| | | public void delete(String[] ids) { |
| | | daPointDao.deleteBatchIds(Arrays.asList(ids)); |
| | | daMeasurePointService.deleteByPoint(ids); |