| | |
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | |
|
| | | import com.yeshi.fanli.entity.ad.DouYinClickEvent;
|
| | | import com.yeshi.fanli.entity.push.DeviceActive;
|
| | | import com.yeshi.fanli.service.inter.ad.DouYinClickEventService;
|
| | | import com.yeshi.fanli.service.inter.push.DeviceActiveService;
|
| | | import com.yeshi.fanli.util.ad.DouYinAdUtil;
|
| | |
|
| | | @Controller
|
| | | @RequestMapping("ad/callback/douyin")
|
| | | public class DouYinCallBackController {
|
| | | @Resource
|
| | | private DouYinClickEventService douYinClickEventService;
|
| | |
|
| | | @Resource
|
| | | private DeviceActiveService deviceActiveService;
|
| | |
|
| | | /**
|
| | | * 抖音下载回调
|
| | |
| | | @RequestMapping("monitor")
|
| | | public void download(DouYinClickEvent event, PrintWriter out) {
|
| | | douYinClickEventService.save(event);
|
| | | if (event.getOs() == 0) {
|
| | | DeviceActive active = deviceActiveService.getFirstActiveInfo(event.getAndroidId());
|
| | | if (active != null) {
|
| | | DouYinAdUtil.activeAndroid(event.getCallback(), event.getImei(), active.getCreateTime().getTime());
|
| | | }
|
| | | }
|
| | | out.print("success");
|
| | | }
|
| | |
|