[新增功能](master): 新增接口

1. 新增广点通平台监控API接口代码,并完成测试
master
土豆兄弟 3 years ago
parent d793f70910
commit 0ada926f73

@ -7,4 +7,9 @@
## 快手
https://developers.e.kuaishou.com/docs?docType=DSP&documentId=1942
## vivo
https://ad.vivo.com.cn/help?id=353
## 汇川
## 投放时间表
- ps 要避开系统正常运行的时间点,然后进行更新代码
百度 巨量7:00-21:00

@ -5,6 +5,7 @@ import cn.hutool.core.util.StrUtil;
import com.baiyee.adcallback.api.common.CommonResponse;
import com.baiyee.adcallback.api.common.ResponseCode;
import com.baiyee.adcallback.api.vo.JuliangMobileMonitorCallbackRequestVO;
import com.baiyee.adcallback.api.vo.MobileMonitorCallbackRequestBase;
import com.baiyee.adcallback.config.pojo.JlBackdataDTO;
import com.baiyee.adcallback.config.pojo.convert.JlBackdataConvert;
import com.baiyee.adcallback.service.AdOriginalityManageService;
@ -75,7 +76,8 @@ public class JuliangMobileMonitorCallbackAPI {
@RequestParam(value = "TIMESTAMP", defaultValue = "") Long ts,
@RequestParam(value = "callback_url", defaultValue = "") String callbackUrl,
@RequestParam(value = "model", defaultValue = "") String model,
@RequestParam(value = "caid1", defaultValue = "") String caid12
@RequestParam(value = "caid1", defaultValue = "") String caid12,
@RequestParam(value = "tag", defaultValue = "") String tag
) {
JuliangMobileMonitorCallbackRequestVO vo = new JuliangMobileMonitorCallbackRequestVO(
@ -91,7 +93,7 @@ public class JuliangMobileMonitorCallbackAPI {
log.error("================================= [not right imei data ,{} ] =================================",vo);
return CommonResponse.createBySuccess();
}
setTag(tag,vo);
log.info("================================= [one request comming, JuliangMobileMonitorCallbackAPI|julaingMonitorUrlCallbackReqUrl, vo is {} ] =================================", vo);
@ -122,6 +124,21 @@ public class JuliangMobileMonitorCallbackAPI {
}
/**
*
*
* @param tag
* @param base
*/
private void setTag(String tag , MobileMonitorCallbackRequestBase base) {
if (StrUtil.isNotBlank(tag)) {
base.setTag(tag);
}else {
base.setTag("");
}
}
// https://xx.tuoz.net/login?redirect=%2Fdashboard%3Fstate%3Dyour_custom_params&auth_code=3819efd33fcaba807c0f65ac252b5b58495e5223

@ -85,7 +85,7 @@ public class MobileMonitorCallbackAPI {
log.error("================================= [not right imei data ,{} ] =================================", vo);
return CommonResponse.createBySuccess();
}
setTag(tag,vo);
setTag(tag, vo);
log.info("================================= [one request comming, julaingMonitorUrlCallbackReqUrl|MobileMonitorCallbackAPI, vo is {} ] =================================", vo);
JlBackdataDTO jlBackdataDTO = new JlBackdataDTO();
JlBackdataConvert.voCovertToDTO(vo, jlBackdataDTO);
@ -153,7 +153,7 @@ public class MobileMonitorCallbackAPI {
log.error("================================= [not right imei data ,{} ] =================================", vo);
return CommonResponse.createBySuccess();
}
setTag(tag,vo);
setTag(tag, vo);
log.info("================================= [one request comming, baiduMonitorUrlCallbackReqUrl|MobileMonitorCallbackAPI, vo is {} ] =================================", vo);
BdBackdataDTO bdBackdataDTO = new BdBackdataDTO();
@ -189,7 +189,7 @@ public class MobileMonitorCallbackAPI {
*
* http://xxx.xxxx.com?imei={IMEI_SUM1}&oaid={OAID}&time={TS}&callback={CALL
* BACK_URL}&androidid={ANDROIDID_SUM1}&mac={MAC_SUM2}&ip={IP}&ua={U
* A}&acid={ACID}&gid={GID}&aid={AID}&cid={CID}
* A}&acid={ACID}&gid={GID}&aid={AID}&cid={CID}&tag=uc-jq-1
*/
@RequestMapping(value = "/uc/monitor")
public CommonResponse ucMonitorUrlCallbackReqUrl(
@ -219,7 +219,7 @@ public class MobileMonitorCallbackAPI {
log.error("================================= [not right imei data ,{} ] =================================", vo);
return CommonResponse.createBySuccess();
}
setTag(tag,vo);
setTag(tag, vo);
log.info("================================= [one request comming, ucMonitorUrlCallbackReqUrl|MobileMonitorCallbackAPI, vo is {} ] =================================", vo);
UcBackdataDTO ucBackdataDTO = new UcBackdataDTO();
UcBackdataConvert.voCovertToDTO(vo, ucBackdataDTO);
@ -247,9 +247,6 @@ public class MobileMonitorCallbackAPI {
}
/**
* API
* https://docs.qingque.cn/d/home/eZQBTWKAahwgCU4YeU_bRW5B_#
@ -276,7 +273,7 @@ public class MobileMonitorCallbackAPI {
) {
KuaiShouMobileMonitorCallbackRequestVO vo = new KuaiShouMobileMonitorCallbackRequestVO(
accountid,aid,cid,did,dName,imei,oaid,mac,androidid,os,ts,ip,ua,cSite,model,acCreative
accountid, aid, cid, did, dName, imei, oaid, mac, androidid, os, ts, ip, ua, cSite, model, acCreative
);
if (ObjectUtil.isNull(vo)) {
@ -344,7 +341,7 @@ public class MobileMonitorCallbackAPI {
) {
VivoMobileMonitorCallbackRequestVO vo = new VivoMobileMonitorCallbackRequestVO(
os,imei,ip,oaid,oaidplain,ua,androidid,location,requestid,requesttime,advertiserId,adName,creativeid,osversion,model,lang,resolution,nettype,ts
os, imei, ip, oaid, oaidplain, ua, androidid, location, requestid, requesttime, advertiserId, adName, creativeid, osversion, model, lang, resolution, nettype, ts
);
if (ObjectUtil.isNull(vo)) {
@ -397,20 +394,109 @@ public class MobileMonitorCallbackAPI {
}
/**
* 广
* <p>
* API : https://developers.e.qq.com/docs/guide/conversion/new_version/dianjijiance
*/
@RequestMapping(value = "/gdt/monitor")
public CommonResponse gdtMonitorUrlCallbackReqUrl(
@RequestParam(value = "click_id", defaultValue = "") String clickId,
@RequestParam(value = "click_time", defaultValue = "") String clickTime,
@RequestParam(value = "impression_time", defaultValue = "") String impressionTime,
@RequestParam(value = "campaign_id", defaultValue = "") String campaignId,
@RequestParam(value = "adgroup_id", defaultValue = "") String adgroupId,
@RequestParam(value = "ad_id", defaultValue = "") String adId,
@RequestParam(value = "ad_platform_type", defaultValue = "") String adPlatformType,
@RequestParam(value = "ad_type", defaultValue = "") String adType,
@RequestParam(value = "account_id", defaultValue = "") String accountId,
@RequestParam(value = "agency_id", defaultValue = "") String agencyId,
@RequestParam(value = "click_sku_id", defaultValue = "") String clickSkuId,
@RequestParam(value = "billing_event", defaultValue = "") String billingEvent,
@RequestParam(value = "deeplink_url", defaultValue = "") String deeplinkUrl,
@RequestParam(value = "universal_link", defaultValue = "") String universalLink,
@RequestParam(value = "page_url", defaultValue = "") String pageUrl,
@RequestParam(value = "device_os_type", defaultValue = "") String deviceOsType,
@RequestParam(value = "process_time", defaultValue = "") String processTime,
@RequestParam(value = "promoted_object_id", defaultValue = "") String promotedObjectId,
@RequestParam(value = "promoted_object_type", defaultValue = "") String promotedObjectType,
@RequestParam(value = "real_cost", defaultValue = "") String realCost,
@RequestParam(value = "request_id", defaultValue = "") String requestId,
@RequestParam(value = "impression_id", defaultValue = "") String impressionId,
@RequestParam(value = "muid", defaultValue = "") String muid,
@RequestParam(value = "hash_android_id", defaultValue = "") String imei,
@RequestParam(value = "ip", defaultValue = "") String ip,
@RequestParam(value = "user_agent", defaultValue = "") String userAgent,
@RequestParam(value = "callback", defaultValue = "") String callback,
@RequestParam(value = "encrypted_position_id", defaultValue = "") String encryptedPositionId,
@RequestParam(value = "hash_oaid", defaultValue = "") String oaid,
@RequestParam(value = "caid", defaultValue = "") String caid,
@RequestParam(value = "adgroup_name", defaultValue = "") String adgroupName,
@RequestParam(value = "site_set_name", defaultValue = "") String siteSetName,
@RequestParam(value = "campaign_name", defaultValue = "") String campaignName,
@RequestParam(value = "ad_name", defaultValue = "") String adName,
@RequestParam(value = "model", defaultValue = "") String model,
@RequestParam(value = "tag", defaultValue = "") String tag
) {
GdtMobileMonitorCallbackRequestVO vo = new GdtMobileMonitorCallbackRequestVO(
clickId, clickTime, impressionTime, campaignId, adgroupId, adId, adPlatformType, adType,
accountId, agencyId, clickSkuId, billingEvent, deeplinkUrl, universalLink,
pageUrl, deviceOsType, processTime, promotedObjectId, promotedObjectType, realCost,
requestId, impressionId, muid, imei, ip, userAgent, callback, encryptedPositionId,
oaid, caid, adgroupName, siteSetName, campaignName, adName, model, tag
);
if (ObjectUtil.isNull(vo)) {
return CommonResponse.createByErrorMessage(ResponseCode.EMPTY_ARGUMENT.getDesc());
}
// 请求过滤规则,过滤掉不用的数据
if (preRuleForReq(vo)) {
log.error("================================= [gdtMonitorUrlCallbackReqUrl|MobileMonitorCallbackAPI, not right imei data ,{} ] =================================", vo);
return CommonResponse.createBySuccess();
}
setTag(tag, vo);
log.info("================================= [one request comming, gdtMonitorUrlCallbackReqUrl|MobileMonitorCallbackAPI, vo is {} ] =================================", vo);
GdtBackdataDTO dto = new GdtBackdataDTO();
GdtBackdataConvert.voCovertToDTO(vo, dto);
adOriginalityManageService.handleMonitorUrlCallbackDataThenSave5();
return CommonResponse.createBySuccess();
}
/**
*
*
* @return boolean
*/
private boolean preRuleForReq(GdtMobileMonitorCallbackRequestVO vo) {
String imei = vo.getImei();
if (StrUtil.isBlank(imei)) {
return Boolean.TRUE;
}
if (StrUtil.isNotBlank(imei) && StrUtil.equalsIgnoreCase(IMEI_TAG, imei)) {
return Boolean.TRUE;
}
return Boolean.FALSE;
}
/**
*
*
* @param tag
* @param tag
* @param base
*/
private void setTag(String tag ,MobileMonitorCallbackRequestBase base) {
private void setTag(String tag, MobileMonitorCallbackRequestBase base) {
if (StrUtil.isNotBlank(tag)) {
base.setTag(tag);
}else {
} else {
base.setTag("");
}
}
}

@ -0,0 +1,95 @@
package com.baiyee.adcallback.api.vo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* 广 VO
*
* @author q
* @date 2022/02/19
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class GdtMobileMonitorCallbackRequestVO extends MobileMonitorCallbackRequestBase implements Serializable {
private String clickId;
private String clickTime;
private String impressionTime;
private String campaignId;
private String adgroupId;
private String adId;
private String adPlatformType;
private String adType;
private String accountId;
private String agencyId;
private String clickSkuId;
private String billingEvent;
private String deeplinkUrl;
private String universalLink;
private String pageUrl;
private String deviceOsType;
private String processTime;
private String promotedObjectId;
private String promotedObjectType;
private String realCost;
private String requestId;
private String impressionId;
/**
* idfa imei
*/
private String muid;
private String imei;
private String ip;
private String userAgent;
private String callback;
private String encryptedPositionId;
private String oaid;
private String caid;
private String adgroupName;
private String siteSetName;
private String campaignName;
private String adName;
private String model;
private String tag;
}

@ -0,0 +1,88 @@
package com.baiyee.adcallback.config.pojo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class GdtBackdataDTO implements Serializable {
private String clickId;
private String clickTime;
private String impressionTime;
private String campaignId;
private String adgroupId;
private String adId;
private String adPlatformType;
private String adType;
private String accountId;
private String agencyId;
private String clickSkuId;
private String billingEvent;
private String deeplinkUrl;
private String universalLink;
private String pageUrl;
private String deviceOsType;
private String processTime;
private String promotedObjectId;
private String promotedObjectType;
private String realCost;
private String requestId;
private String impressionId;
/**
* idfa imei
*/
private String muid;
private String imei;
private String ip;
private String userAgent;
private String callback;
private String encryptedPositionId;
private String oaid;
private String caid;
private String adgroupName;
private String siteSetName;
private String campaignName;
private String adName;
private String model;
private String tag;
}

@ -0,0 +1,44 @@
package com.baiyee.adcallback.config.pojo.convert;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baiyee.adcallback.api.vo.BaiduMobileMonitorCallbackRequestVO;
import com.baiyee.adcallback.api.vo.GdtMobileMonitorCallbackRequestVO;
import com.baiyee.adcallback.config.pojo.BdBackdataDTO;
import com.baiyee.adcallback.config.pojo.GdtBackdataDTO;
import com.baiyee.adcallback.repository.entity.TbBdBackdataEntity;
import com.baiyee.adcallback.repository.entity.TbGdtBackdataEntity;
public class GdtBackdataConvert {
/**
*
*/
private GdtBackdataConvert(){}
private static final ThreadLocal<GdtBackdataDTO> context = new ThreadLocal<>();
/**
* vo dto -> 线
*
* @param vo
*/
public static void voCovertToDTO(GdtMobileMonitorCallbackRequestVO vo, GdtBackdataDTO dto) {
BeanUtil.copyProperties(vo, dto, true);
context.set(dto);
}
/**
*
*
* @return {@link TbGdtBackdataEntity}
*/
public static TbGdtBackdataEntity covertToEntity(TbGdtBackdataEntity entity) {
GdtBackdataDTO dto = context.get();
if (ObjectUtil.isNotNull(dto)){
BeanUtil.copyProperties(dto, entity, true);
}
context.remove();
return entity;
}
}

@ -0,0 +1,7 @@
package com.baiyee.adcallback.repository;
import com.baiyee.adcallback.repository.entity.TbGdtBackdataEntity;
import org.springframework.data.jpa.repository.JpaRepository;
public interface TbGdtBackdataEntityRepository extends JpaRepository<TbGdtBackdataEntity, Long> {
}

@ -0,0 +1,570 @@
package com.baiyee.adcallback.repository.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import org.springframework.format.annotation.DateTimeFormat;
import javax.persistence.*;
import java.sql.Timestamp;
@Entity
@Table(name = "tb_gdt_backdata", schema = "db_ad", catalog = "")
@EntityListeners(AuditingEntityListener.class)
public class TbGdtBackdataEntity {
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Id
@Column(name = "id", nullable = false)
private long id;
@CreatedDate
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Basic
@Column(name = "gmt_create", nullable = false)
private Timestamp gmtCreate;
@LastModifiedDate
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Basic
@Column(name = "gmt_modify", nullable = false)
private Timestamp gmtModify;
@LastModifiedBy
@Basic
@Column(name = "operator", nullable = false, length = 255)
private String operator;
@Basic
@Column(name = "click_id", nullable = false, length = 255)
private String clickId;
@Basic
@Column(name = "click_time", nullable = false, length = 255)
private String clickTime;
@Basic
@Column(name = "impression_time", nullable = false, length = 255)
private String impressionTime;
@Basic
@Column(name = "campaign_id", nullable = false, length = 255)
private String campaignId;
@Basic
@Column(name = "adgroup_id", nullable = false, length = 255)
private String adgroupId;
@Basic
@Column(name = "ad_id", nullable = false, length = 255)
private String adId;
@Basic
@Column(name = "ad_platform_type", nullable = false, length = 255)
private String adPlatformType;
@Basic
@Column(name = "ad_type", nullable = false, length = 255)
private String adType;
@Basic
@Column(name = "account_id", nullable = false, length = 255)
private String accountId;
@Basic
@Column(name = "agency_id", nullable = false, length = 255)
private String agencyId;
@Basic
@Column(name = "click_sku_id", nullable = false, length = 255)
private String clickSkuId;
@Basic
@Column(name = "billing_event", nullable = false, length = 255)
private String billingEvent;
@Basic
@Column(name = "deeplink_url", nullable = false, length = 255)
private String deeplinkUrl;
@Basic
@Column(name = "universal_link", nullable = false, length = 255)
private String universalLink;
@Basic
@Column(name = "page_url", nullable = false, length = 255)
private String pageUrl;
@Basic
@Column(name = "device_os_type", nullable = false, length = 255)
private String deviceOsType;
@Basic
@Column(name = "process_time", nullable = false, length = 255)
private String processTime;
@Basic
@Column(name = "promoted_object_id", nullable = false, length = 255)
private String promotedObjectId;
@Basic
@Column(name = "promoted_object_type", nullable = false, length = 255)
private String promotedObjectType;
@Basic
@Column(name = "real_cost", nullable = false, length = 255)
private String realCost;
@Basic
@Column(name = "request_id", nullable = false, length = 255)
private String requestId;
@Basic
@Column(name = "impression_id", nullable = false, length = 255)
private String impressionId;
@Basic
@Column(name = "muid", nullable = false, length = 255)
private String muid;
@Basic
@Column(name = "imei", nullable = false, length = 255)
private String imei;
@Basic
@Column(name = "ip", nullable = false, length = 255)
private String ip;
@Basic
@Column(name = "user_agent", nullable = false, length = 255)
private String userAgent;
@Basic
@Column(name = "callback", nullable = false, length = 255)
private String callback;
@Basic
@Column(name = "encrypted_position_id", nullable = false, length = 255)
private String encryptedPositionId;
@Basic
@Column(name = "oaid", nullable = false, length = 255)
private String oaid;
@Basic
@Column(name = "caid", nullable = false, length = 255)
private String caid;
@Basic
@Column(name = "adgroup_name", nullable = false, length = 255)
private String adgroupName;
@Basic
@Column(name = "site_set_name", nullable = false, length = 255)
private String siteSetName;
@Basic
@Column(name = "campaign_name", nullable = false, length = 255)
private String campaignName;
@Basic
@Column(name = "ad_name", nullable = false, length = 255)
private String adName;
@Basic
@Column(name = "model", nullable = false, length = 255)
private String model;
@Basic
@Column(name = "tag", nullable = false, length = 255)
private String tag;
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public Timestamp getGmtCreate() {
return gmtCreate;
}
public void setGmtCreate(Timestamp gmtCreate) {
this.gmtCreate = gmtCreate;
}
public Timestamp getGmtModify() {
return gmtModify;
}
public void setGmtModify(Timestamp gmtModify) {
this.gmtModify = gmtModify;
}
public String getOperator() {
return operator;
}
public void setOperator(String operator) {
this.operator = operator;
}
public String getClickId() {
return clickId;
}
public void setClickId(String clickId) {
this.clickId = clickId;
}
public String getClickTime() {
return clickTime;
}
public void setClickTime(String clickTime) {
this.clickTime = clickTime;
}
public String getImpressionTime() {
return impressionTime;
}
public void setImpressionTime(String impressionTime) {
this.impressionTime = impressionTime;
}
public String getCampaignId() {
return campaignId;
}
public void setCampaignId(String campaignId) {
this.campaignId = campaignId;
}
public String getAdgroupId() {
return adgroupId;
}
public void setAdgroupId(String adgroupId) {
this.adgroupId = adgroupId;
}
public String getAdId() {
return adId;
}
public void setAdId(String adId) {
this.adId = adId;
}
public String getAdPlatformType() {
return adPlatformType;
}
public void setAdPlatformType(String adPlatformType) {
this.adPlatformType = adPlatformType;
}
public String getAdType() {
return adType;
}
public void setAdType(String adType) {
this.adType = adType;
}
public String getAccountId() {
return accountId;
}
public void setAccountId(String accountId) {
this.accountId = accountId;
}
public String getAgencyId() {
return agencyId;
}
public void setAgencyId(String agencyId) {
this.agencyId = agencyId;
}
public String getClickSkuId() {
return clickSkuId;
}
public void setClickSkuId(String clickSkuId) {
this.clickSkuId = clickSkuId;
}
public String getBillingEvent() {
return billingEvent;
}
public void setBillingEvent(String billingEvent) {
this.billingEvent = billingEvent;
}
public String getDeeplinkUrl() {
return deeplinkUrl;
}
public void setDeeplinkUrl(String deeplinkUrl) {
this.deeplinkUrl = deeplinkUrl;
}
public String getUniversalLink() {
return universalLink;
}
public void setUniversalLink(String universalLink) {
this.universalLink = universalLink;
}
public String getPageUrl() {
return pageUrl;
}
public void setPageUrl(String pageUrl) {
this.pageUrl = pageUrl;
}
public String getDeviceOsType() {
return deviceOsType;
}
public void setDeviceOsType(String deviceOsType) {
this.deviceOsType = deviceOsType;
}
public String getProcessTime() {
return processTime;
}
public void setProcessTime(String processTime) {
this.processTime = processTime;
}
public String getPromotedObjectId() {
return promotedObjectId;
}
public void setPromotedObjectId(String promotedObjectId) {
this.promotedObjectId = promotedObjectId;
}
public String getPromotedObjectType() {
return promotedObjectType;
}
public void setPromotedObjectType(String promotedObjectType) {
this.promotedObjectType = promotedObjectType;
}
public String getRealCost() {
return realCost;
}
public void setRealCost(String realCost) {
this.realCost = realCost;
}
public String getRequestId() {
return requestId;
}
public void setRequestId(String requestId) {
this.requestId = requestId;
}
public String getImpressionId() {
return impressionId;
}
public void setImpressionId(String impressionId) {
this.impressionId = impressionId;
}
public String getMuid() {
return muid;
}
public void setMuid(String muid) {
this.muid = muid;
}
public String getImei() {
return imei;
}
public void setImei(String imei) {
this.imei = imei;
}
public String getIp() {
return ip;
}
public void setIp(String ip) {
this.ip = ip;
}
public String getUserAgent() {
return userAgent;
}
public void setUserAgent(String userAgent) {
this.userAgent = userAgent;
}
public String getCallback() {
return callback;
}
public void setCallback(String callback) {
this.callback = callback;
}
public String getEncryptedPositionId() {
return encryptedPositionId;
}
public void setEncryptedPositionId(String encryptedPositionId) {
this.encryptedPositionId = encryptedPositionId;
}
public String getOaid() {
return oaid;
}
public void setOaid(String oaid) {
this.oaid = oaid;
}
public String getCaid() {
return caid;
}
public void setCaid(String caid) {
this.caid = caid;
}
public String getAdgroupName() {
return adgroupName;
}
public void setAdgroupName(String adgroupName) {
this.adgroupName = adgroupName;
}
public String getSiteSetName() {
return siteSetName;
}
public void setSiteSetName(String siteSetName) {
this.siteSetName = siteSetName;
}
public String getCampaignName() {
return campaignName;
}
public void setCampaignName(String campaignName) {
this.campaignName = campaignName;
}
public String getAdName() {
return adName;
}
public void setAdName(String adName) {
this.adName = adName;
}
public String getModel() {
return model;
}
public void setModel(String model) {
this.model = model;
}
public String getTag() {
return tag;
}
public void setTag(String tag) {
this.tag = tag;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
TbGdtBackdataEntity that = (TbGdtBackdataEntity) o;
if (id != that.id) return false;
if (gmtCreate != null ? !gmtCreate.equals(that.gmtCreate) : that.gmtCreate != null) return false;
if (gmtModify != null ? !gmtModify.equals(that.gmtModify) : that.gmtModify != null) return false;
if (operator != null ? !operator.equals(that.operator) : that.operator != null) return false;
if (clickId != null ? !clickId.equals(that.clickId) : that.clickId != null) return false;
if (clickTime != null ? !clickTime.equals(that.clickTime) : that.clickTime != null) return false;
if (impressionTime != null ? !impressionTime.equals(that.impressionTime) : that.impressionTime != null)
return false;
if (campaignId != null ? !campaignId.equals(that.campaignId) : that.campaignId != null) return false;
if (adgroupId != null ? !adgroupId.equals(that.adgroupId) : that.adgroupId != null) return false;
if (adId != null ? !adId.equals(that.adId) : that.adId != null) return false;
if (adPlatformType != null ? !adPlatformType.equals(that.adPlatformType) : that.adPlatformType != null)
return false;
if (adType != null ? !adType.equals(that.adType) : that.adType != null) return false;
if (accountId != null ? !accountId.equals(that.accountId) : that.accountId != null) return false;
if (agencyId != null ? !agencyId.equals(that.agencyId) : that.agencyId != null) return false;
if (clickSkuId != null ? !clickSkuId.equals(that.clickSkuId) : that.clickSkuId != null) return false;
if (billingEvent != null ? !billingEvent.equals(that.billingEvent) : that.billingEvent != null) return false;
if (deeplinkUrl != null ? !deeplinkUrl.equals(that.deeplinkUrl) : that.deeplinkUrl != null) return false;
if (universalLink != null ? !universalLink.equals(that.universalLink) : that.universalLink != null)
return false;
if (pageUrl != null ? !pageUrl.equals(that.pageUrl) : that.pageUrl != null) return false;
if (deviceOsType != null ? !deviceOsType.equals(that.deviceOsType) : that.deviceOsType != null) return false;
if (processTime != null ? !processTime.equals(that.processTime) : that.processTime != null) return false;
if (promotedObjectId != null ? !promotedObjectId.equals(that.promotedObjectId) : that.promotedObjectId != null)
return false;
if (promotedObjectType != null ? !promotedObjectType.equals(that.promotedObjectType) : that.promotedObjectType != null)
return false;
if (realCost != null ? !realCost.equals(that.realCost) : that.realCost != null) return false;
if (requestId != null ? !requestId.equals(that.requestId) : that.requestId != null) return false;
if (impressionId != null ? !impressionId.equals(that.impressionId) : that.impressionId != null) return false;
if (muid != null ? !muid.equals(that.muid) : that.muid != null) return false;
if (imei != null ? !imei.equals(that.imei) : that.imei != null) return false;
if (ip != null ? !ip.equals(that.ip) : that.ip != null) return false;
if (userAgent != null ? !userAgent.equals(that.userAgent) : that.userAgent != null) return false;
if (callback != null ? !callback.equals(that.callback) : that.callback != null) return false;
if (encryptedPositionId != null ? !encryptedPositionId.equals(that.encryptedPositionId) : that.encryptedPositionId != null)
return false;
if (oaid != null ? !oaid.equals(that.oaid) : that.oaid != null) return false;
if (caid != null ? !caid.equals(that.caid) : that.caid != null) return false;
if (adgroupName != null ? !adgroupName.equals(that.adgroupName) : that.adgroupName != null) return false;
if (siteSetName != null ? !siteSetName.equals(that.siteSetName) : that.siteSetName != null) return false;
if (campaignName != null ? !campaignName.equals(that.campaignName) : that.campaignName != null) return false;
if (adName != null ? !adName.equals(that.adName) : that.adName != null) return false;
if (model != null ? !model.equals(that.model) : that.model != null) return false;
if (tag != null ? !tag.equals(that.tag) : that.tag != null) return false;
return true;
}
@Override
public int hashCode() {
int result = (int) (id ^ (id >>> 32));
result = 31 * result + (gmtCreate != null ? gmtCreate.hashCode() : 0);
result = 31 * result + (gmtModify != null ? gmtModify.hashCode() : 0);
result = 31 * result + (operator != null ? operator.hashCode() : 0);
result = 31 * result + (clickId != null ? clickId.hashCode() : 0);
result = 31 * result + (clickTime != null ? clickTime.hashCode() : 0);
result = 31 * result + (impressionTime != null ? impressionTime.hashCode() : 0);
result = 31 * result + (campaignId != null ? campaignId.hashCode() : 0);
result = 31 * result + (adgroupId != null ? adgroupId.hashCode() : 0);
result = 31 * result + (adId != null ? adId.hashCode() : 0);
result = 31 * result + (adPlatformType != null ? adPlatformType.hashCode() : 0);
result = 31 * result + (adType != null ? adType.hashCode() : 0);
result = 31 * result + (accountId != null ? accountId.hashCode() : 0);
result = 31 * result + (agencyId != null ? agencyId.hashCode() : 0);
result = 31 * result + (clickSkuId != null ? clickSkuId.hashCode() : 0);
result = 31 * result + (billingEvent != null ? billingEvent.hashCode() : 0);
result = 31 * result + (deeplinkUrl != null ? deeplinkUrl.hashCode() : 0);
result = 31 * result + (universalLink != null ? universalLink.hashCode() : 0);
result = 31 * result + (pageUrl != null ? pageUrl.hashCode() : 0);
result = 31 * result + (deviceOsType != null ? deviceOsType.hashCode() : 0);
result = 31 * result + (processTime != null ? processTime.hashCode() : 0);
result = 31 * result + (promotedObjectId != null ? promotedObjectId.hashCode() : 0);
result = 31 * result + (promotedObjectType != null ? promotedObjectType.hashCode() : 0);
result = 31 * result + (realCost != null ? realCost.hashCode() : 0);
result = 31 * result + (requestId != null ? requestId.hashCode() : 0);
result = 31 * result + (impressionId != null ? impressionId.hashCode() : 0);
result = 31 * result + (muid != null ? muid.hashCode() : 0);
result = 31 * result + (imei != null ? imei.hashCode() : 0);
result = 31 * result + (ip != null ? ip.hashCode() : 0);
result = 31 * result + (userAgent != null ? userAgent.hashCode() : 0);
result = 31 * result + (callback != null ? callback.hashCode() : 0);
result = 31 * result + (encryptedPositionId != null ? encryptedPositionId.hashCode() : 0);
result = 31 * result + (oaid != null ? oaid.hashCode() : 0);
result = 31 * result + (caid != null ? caid.hashCode() : 0);
result = 31 * result + (adgroupName != null ? adgroupName.hashCode() : 0);
result = 31 * result + (siteSetName != null ? siteSetName.hashCode() : 0);
result = 31 * result + (campaignName != null ? campaignName.hashCode() : 0);
result = 31 * result + (adName != null ? adName.hashCode() : 0);
result = 31 * result + (model != null ? model.hashCode() : 0);
result = 31 * result + (tag != null ? tag.hashCode() : 0);
return result;
}
}

@ -36,4 +36,11 @@ public interface AdOriginalityManageService {
*/
void handleMonitorUrlCallbackDataThenSave4();
/**
* - gdt
*/
void handleMonitorUrlCallbackDataThenSave5();
}

@ -29,12 +29,15 @@ public class AdOriginalityManageServiceImpl implements AdOriginalityManageServic
private final TbVivoBackdataEntityRepository vivoBackdataEntityRepository;
public AdOriginalityManageServiceImpl(TbJlBackdataEntityRepository repository, TbBdBackdataEntityRepository bdBackdataEntityRepository, TbUcBackdataEntityRepository tbUcBackdataEntityRepository, TbKsBackdataEntityRepository ksBackdataEntityRepository, TbVivoBackdataEntityRepository vivoBackdataEntityRepository) {
private final TbGdtBackdataEntityRepository gdtBackdataEntityRepository;
public AdOriginalityManageServiceImpl(TbJlBackdataEntityRepository repository, TbBdBackdataEntityRepository bdBackdataEntityRepository, TbUcBackdataEntityRepository tbUcBackdataEntityRepository, TbKsBackdataEntityRepository ksBackdataEntityRepository, TbVivoBackdataEntityRepository vivoBackdataEntityRepository, TbGdtBackdataEntityRepository gdtBackdataEntityRepository) {
this.repository = repository;
this.bdBackdataEntityRepository = bdBackdataEntityRepository;
this.tbUcBackdataEntityRepository = tbUcBackdataEntityRepository;
this.ksBackdataEntityRepository = ksBackdataEntityRepository;
this.vivoBackdataEntityRepository = vivoBackdataEntityRepository;
this.gdtBackdataEntityRepository = gdtBackdataEntityRepository;
}
@Override
@ -93,4 +96,16 @@ public class AdOriginalityManageServiceImpl implements AdOriginalityManageServic
log.error("============================= [save a data fail save is {} ] =============================", save);
}
}
@Override
public void handleMonitorUrlCallbackDataThenSave5() {
TbGdtBackdataEntity entity = new TbGdtBackdataEntity();
TbGdtBackdataEntity backEntity = GdtBackdataConvert.covertToEntity(entity);
TbGdtBackdataEntity save = gdtBackdataEntityRepository.save(backEntity);
if (ObjectUtil.isNull(save)){
log.error("============================= [save a data fail save is {} ] =============================", save);
}
}
}

@ -4,7 +4,7 @@ spring:
application:
name: ad-callback
profiles:
active: dev
active: prod
jackson:
time-zone: GMT+8
date-format: yyyy-MM-dd HH:mm:ss

@ -21,7 +21,7 @@
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 按天归档,如果按小时后面加-hh -->
<fileNamePattern>${LOG_DIR}/history/%d{yyyy-MM-dd}.gz</fileNamePattern>
<fileNamePattern>${LOG_DIR}/history/ad-callback-log/%d{yyyy-MM-dd}.gz</fileNamePattern>
<maxHistory>30</maxHistory>
</rollingPolicy>
@ -77,7 +77,7 @@
<root level="INFO">
<!-- TODO prod 环境去掉std -->
<appender-ref ref="stdAppender"/>
<!-- <appender-ref ref="fileAppender"/>-->
<!-- <appender-ref ref="stdAppender"/>-->
<appender-ref ref="fileAppender"/>
</root>
</configuration>
Loading…
Cancel
Save