Просмотр исходного кода

feat: ROI搜索定向拓展开关关闭

pudongliang 4 месяцев назад
Родитель
Сommit
f2952ca89f

+ 18 - 0
src/main/java/com/moka/gdtauto/controller/TencentAccountIdImageController.java

@@ -0,0 +1,18 @@
+package com.moka.gdtauto.controller;
+
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ * 腾讯账户上传图片记录 前端控制器
+ * </p>
+ *
+ * @author mokamvp
+ * @since 2026-03-10
+ */
+@RestController
+@RequestMapping("/tencentAccountIdImage")
+public class TencentAccountIdImageController {
+
+}

+ 18 - 0
src/main/java/com/moka/gdtauto/controller/TencentAccountIdVideoIdController.java

@@ -0,0 +1,18 @@
+package com.moka.gdtauto.controller;
+
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ * 腾讯账户上传视频记录 前端控制器
+ * </p>
+ *
+ * @author mokamvp
+ * @since 2026-03-10
+ */
+@RestController
+@RequestMapping("/tencentAccountIdVideoId")
+public class TencentAccountIdVideoIdController {
+
+}

+ 99 - 0
src/main/java/com/moka/gdtauto/entity/TencentAccountIdImage.java

@@ -0,0 +1,99 @@
+package com.moka.gdtauto.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * <p>
+ * 腾讯账户上传图片记录
+ * </p>
+ *
+ * @author mokamvp
+ * @since 2026-03-10
+ */
+@TableName("tencent_account_id_image")
+public class TencentAccountIdImage implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键ID
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 账户ID
+     */
+    private Long accountId;
+
+    /**
+     * 图片URL
+     */
+    private String imageUrl;
+
+    /**
+     * 图片ID
+     */
+    private Long imageId;
+
+    /**
+     * 创建时间
+     */
+    private LocalDateTime createTime;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getAccountId() {
+        return accountId;
+    }
+
+    public void setAccountId(Long accountId) {
+        this.accountId = accountId;
+    }
+
+    public String getImageUrl() {
+        return imageUrl;
+    }
+
+    public void setImageUrl(String imageUrl) {
+        this.imageUrl = imageUrl;
+    }
+
+    public Long getImageId() {
+        return imageId;
+    }
+
+    public void setImageId(Long imageId) {
+        this.imageId = imageId;
+    }
+
+    public LocalDateTime getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(LocalDateTime createTime) {
+        this.createTime = createTime;
+    }
+
+    @Override
+    public String toString() {
+        return "TencentAccountIdImage{" +
+            "id = " + id +
+            ", accountId = " + accountId +
+            ", imageUrl = " + imageUrl +
+            ", imageId = " + imageId +
+            ", createTime = " + createTime +
+            "}";
+    }
+}

+ 113 - 0
src/main/java/com/moka/gdtauto/entity/TencentAccountIdVideoId.java

@@ -0,0 +1,113 @@
+package com.moka.gdtauto.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * <p>
+ * 腾讯账户上传视频记录
+ * </p>
+ *
+ * @author mokamvp
+ * @since 2026-03-10
+ */
+@TableName("tencent_account_id_video_id")
+public class TencentAccountIdVideoId implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键ID
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 账户ID
+     */
+    private Long accountId;
+
+    /**
+     * 视频URL
+     */
+    private String videoUrl;
+
+    /**
+     * 视频ID
+     */
+    private Long videoId;
+
+    /**
+     * 封面图片ID
+     */
+    private Long coverImageId;
+
+    /**
+     * 创建时间
+     */
+    private LocalDateTime createTime;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getAccountId() {
+        return accountId;
+    }
+
+    public void setAccountId(Long accountId) {
+        this.accountId = accountId;
+    }
+
+    public String getVideoUrl() {
+        return videoUrl;
+    }
+
+    public void setVideoUrl(String videoUrl) {
+        this.videoUrl = videoUrl;
+    }
+
+    public Long getVideoId() {
+        return videoId;
+    }
+
+    public void setVideoId(Long videoId) {
+        this.videoId = videoId;
+    }
+
+    public Long getCoverImageId() {
+        return coverImageId;
+    }
+
+    public void setCoverImageId(Long coverImageId) {
+        this.coverImageId = coverImageId;
+    }
+
+    public LocalDateTime getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(LocalDateTime createTime) {
+        this.createTime = createTime;
+    }
+
+    @Override
+    public String toString() {
+        return "TencentAccountIdVideoId{" +
+            "id = " + id +
+            ", accountId = " + accountId +
+            ", videoUrl = " + videoUrl +
+            ", videoId = " + videoId +
+            ", coverImageId = " + coverImageId +
+            ", createTime = " + createTime +
+            "}";
+    }
+}

+ 16 - 0
src/main/java/com/moka/gdtauto/mapper/TencentAccountIdImageMapper.java

@@ -0,0 +1,16 @@
+package com.moka.gdtauto.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.moka.gdtauto.entity.TencentAccountIdImage;
+
+/**
+ * <p>
+ * 腾讯账户上传图片记录 Mapper 接口
+ * </p>
+ *
+ * @author mokamvp
+ * @since 2026-03-10
+ */
+public interface TencentAccountIdImageMapper extends BaseMapper<TencentAccountIdImage> {
+
+}

+ 16 - 0
src/main/java/com/moka/gdtauto/mapper/TencentAccountIdVideoIdMapper.java

@@ -0,0 +1,16 @@
+package com.moka.gdtauto.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.moka.gdtauto.entity.TencentAccountIdVideoId;
+
+/**
+ * <p>
+ * 腾讯账户上传视频记录 Mapper 接口
+ * </p>
+ *
+ * @author mokamvp
+ * @since 2026-03-10
+ */
+public interface TencentAccountIdVideoIdMapper extends BaseMapper<TencentAccountIdVideoId> {
+
+}

+ 16 - 0
src/main/java/com/moka/gdtauto/service/TencentAccountIdImageService.java

@@ -0,0 +1,16 @@
+package com.moka.gdtauto.service;
+
+import com.moka.gdtauto.entity.TencentAccountIdImage;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 腾讯账户上传图片记录 服务类
+ * </p>
+ *
+ * @author mokamvp
+ * @since 2026-03-10
+ */
+public interface TencentAccountIdImageService extends IService<TencentAccountIdImage> {
+
+}

+ 16 - 0
src/main/java/com/moka/gdtauto/service/TencentAccountIdVideoIdService.java

@@ -0,0 +1,16 @@
+package com.moka.gdtauto.service;
+
+import com.moka.gdtauto.entity.TencentAccountIdVideoId;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 腾讯账户上传视频记录 服务类
+ * </p>
+ *
+ * @author mokamvp
+ * @since 2026-03-10
+ */
+public interface TencentAccountIdVideoIdService extends IService<TencentAccountIdVideoId> {
+
+}

+ 20 - 0
src/main/java/com/moka/gdtauto/service/impl/TencentAccountIdImageServiceImp.java

@@ -0,0 +1,20 @@
+package com.moka.gdtauto.service.impl;
+
+import com.moka.gdtauto.entity.TencentAccountIdImage;
+import com.moka.gdtauto.mapper.TencentAccountIdImageMapper;
+import com.moka.gdtauto.service.TencentAccountIdImageService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 腾讯账户上传图片记录 服务实现类
+ * </p>
+ *
+ * @author mokamvp
+ * @since 2026-03-10
+ */
+@Service
+public class TencentAccountIdImageServiceImp extends ServiceImpl<TencentAccountIdImageMapper, TencentAccountIdImage> implements TencentAccountIdImageService {
+
+}

+ 20 - 0
src/main/java/com/moka/gdtauto/service/impl/TencentAccountIdVideoIdServiceImp.java

@@ -0,0 +1,20 @@
+package com.moka.gdtauto.service.impl;
+
+import com.moka.gdtauto.entity.TencentAccountIdVideoId;
+import com.moka.gdtauto.mapper.TencentAccountIdVideoIdMapper;
+import com.moka.gdtauto.service.TencentAccountIdVideoIdService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 腾讯账户上传视频记录 服务实现类
+ * </p>
+ *
+ * @author mokamvp
+ * @since 2026-03-10
+ */
+@Service
+public class TencentAccountIdVideoIdServiceImp extends ServiceImpl<TencentAccountIdVideoIdMapper, TencentAccountIdVideoId> implements TencentAccountIdVideoIdService {
+
+}

+ 5 - 4
src/main/java/com/moka/gdtauto/util/AdgroupsAddReqPool.java

@@ -18,7 +18,7 @@ import com.tencent.ads.model.v3.BidScene;
 
 import com.tencent.ads.model.v3.WriteTargetingSetting;
 import com.tencent.ads.model.v3.OptimizationGoal;
-
+import com.tencent.ads.model.v3.SearchExpandTargetingSwitch;
 import com.tencent.ads.model.v3.SmartTargetingMode;
 
 
@@ -67,6 +67,7 @@ public class AdgroupsAddReqPool {
         request.setConversionId(conversionId);
         // 保留2位小数
         request.setDeepConversionWorthRate(deepConversionWorthRate.setScale(2, RoundingMode.HALF_UP).doubleValue());
+        request.setSmartTargetingMode(SmartTargetingMode.SMART_TARGETING_MANUAL);
         return request;
     }
 
@@ -118,9 +119,6 @@ public class AdgroupsAddReqPool {
         // 转化 id
         request.setConversionId(67676141L);
         
-        // 自动衍生创意
-        request.setAutoDerivedCreativeEnabled(false);
-        
         // 出价场景
         request.setBidScene(BidScene.UNKNOWN);
         
@@ -187,6 +185,9 @@ public class AdgroupsAddReqPool {
 
         // 创意增强 MAX 开关
         request.setAutoDerivedCreativeEnabled(true);
+        
+        //搜索定向拓展开关
+        request.setSearchExpandTargetingSwitch(SearchExpandTargetingSwitch.CLOSE);
 
         return request;
     }

+ 5 - 0
src/main/resources/mapper/TencentAccountIdImageMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.moka.gdtauto.mapper.TencentAccountIdImageMapper">
+
+</mapper>

+ 5 - 0
src/main/resources/mapper/TencentAccountIdVideoIdMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.moka.gdtauto.mapper.TencentAccountIdVideoIdMapper">
+
+</mapper>