|
|
|
@ -5,6 +5,7 @@ import com.baiyee.adcallback.repository.TbIDFAEntityRepository;
|
|
|
|
|
import com.baiyee.adcallback.repository.entity.TbIDFAEntity;
|
|
|
|
|
import com.baiyee.adcallback.service.IdfaService;
|
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
@ -12,6 +13,7 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
* @author Enzo
|
|
|
|
|
* @date : 2023/2/28
|
|
|
|
|
*/
|
|
|
|
|
@Slf4j
|
|
|
|
|
@Service
|
|
|
|
|
@RequiredArgsConstructor
|
|
|
|
|
public class IdfaServiceImpl implements IdfaService {
|
|
|
|
@ -21,10 +23,14 @@ public class IdfaServiceImpl implements IdfaService {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void saveData(String idfa, String tag, String type) {
|
|
|
|
|
TbIDFAEntity entity = new TbIDFAEntity();
|
|
|
|
|
entity.setIdfa(idfa);
|
|
|
|
|
entity.setTag(StringUtils.isNotBlank(tag) ? tag : CharSequenceUtil.EMPTY);
|
|
|
|
|
entity.setDataSource(type);
|
|
|
|
|
tbIDFAEntityRepository.save(entity);
|
|
|
|
|
try {
|
|
|
|
|
TbIDFAEntity entity = new TbIDFAEntity();
|
|
|
|
|
entity.setIdfa(idfa);
|
|
|
|
|
entity.setTag(StringUtils.isNotBlank(tag) ? tag : CharSequenceUtil.EMPTY);
|
|
|
|
|
entity.setDataSource(type);
|
|
|
|
|
tbIDFAEntityRepository.save(entity);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
log.error("============= save tag {} error the idfa as {} =============", tag, idfa);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|