|
@ -28,6 +28,7 @@ import com.epmet.service.evaluationindex.screen.ScreenPartyUserRankDataService; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
import org.springframework.util.CollectionUtils; |
|
|
|
|
|
|
|
|
import java.util.List; |
|
|
import java.util.List; |
|
|
|
|
|
|
|
@ -55,10 +56,12 @@ public class ScreenPartyUserRankDataServiceImpl extends BaseServiceImpl<ScreenPa |
|
|
@Override |
|
|
@Override |
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
public void dataClean(List<ScreenPartyUserRankDataEntity> dataList, String customerId, String dateId) { |
|
|
public void dataClean(List<ScreenPartyUserRankDataEntity> dataList, String customerId, String dateId) { |
|
|
|
|
|
if(!CollectionUtils.isEmpty(dataList)) { |
|
|
int affectedRows; |
|
|
int affectedRows; |
|
|
do{ |
|
|
do { |
|
|
affectedRows = baseDao.deleteBatchByCustomerIdAndDateId(customerId,dateId); |
|
|
affectedRows = baseDao.deleteBatchByCustomerIdAndDateId(customerId, dateId); |
|
|
}while (affectedRows > NumConstant.ZERO); |
|
|
} while (affectedRows > NumConstant.ZERO); |
|
|
baseDao.insertBatch(dataList); |
|
|
baseDao.insertBatch(dataList); |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |