瀏覽代碼

初始化

xueyiming 4 月之前
父節點
當前提交
ab651b50bd
共有 42 個文件被更改,包括 2225 次插入249 次删除
  1. 36 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/common/enums/AdBaseVideoStatusEnum.java
  2. 2 2
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/common/enums/AdVideoImageStatusEnum.java
  3. 9 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/common/enums/DimensionSizeEnum.java
  4. 57 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/controller/AdBaseVideoController.java
  5. 10 5
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/controller/AdCreativeController.java
  6. 68 10
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/controller/AdVideoController.java
  7. 30 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/dao/mapper/AdBaseVideoMapper.java
  8. 114 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/po/AdBaseVideo.java
  9. 782 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/po/AdBaseVideoExample.java
  10. 17 6
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/po/AdCreative.java
  11. 94 24
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/po/AdCreativeExample.java
  12. 18 18
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/po/AdVideo.java
  13. 90 80
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/po/AdVideoExample.java
  14. 17 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/vo/AdBaseVideoParam.java
  15. 18 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/vo/AdBaseVideoStatusVo.java
  16. 27 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/vo/AdBaseVideoVo.java
  17. 7 1
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/vo/AdCreativeParam.java
  18. 27 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/vo/AdCreativeVo.java
  19. 9 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/vo/AdGroupVo.java
  20. 18 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/vo/AdVideoImageStatusVo.java
  21. 2 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/vo/AdVideoImageVo.java
  22. 18 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/vo/AdVideoMuseStatusVo.java
  23. 6 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/vo/AdVideoParam.java
  24. 18 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/vo/AdVideoStatusVo.java
  25. 18 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/vo/DimensionSizeVo.java
  26. 18 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/vo/SimilarityCodeVo.java
  27. 19 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/AdBaseVideoService.java
  28. 2 1
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/AdCreativeService.java
  29. 4 1
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/AdMuseTaskService.java
  30. 2 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/AdVideoImageService.java
  31. 5 2
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/AdVideoService.java
  32. 16 2
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/impl/AdAccountServiceImpl.java
  33. 138 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/impl/AdBaseVideoServiceImpl.java
  34. 22 7
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/impl/AdCreativeServiceImpl.java
  35. 3 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/impl/AdGroupServiceImpl.java
  36. 43 5
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/impl/AdMuseTaskServiceImpl.java
  37. 46 3
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/impl/AdVideoImageServiceImpl.java
  38. 37 24
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/impl/AdVideoServiceImpl.java
  39. 279 0
      tencent-ad-server/src/main/resources/mapper/AdBaseVideoMapper.xml
  40. 36 18
      tencent-ad-server/src/main/resources/mapper/AdCreativeMapper.xml
  41. 42 39
      tencent-ad-server/src/main/resources/mapper/AdVideoMapper.xml
  42. 1 1
      tencent-ad-server/src/main/resources/mybatis-generator-config.xml

+ 36 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/common/enums/AdBaseVideoStatusEnum.java

@@ -0,0 +1,36 @@
+package com.tzld.piaoquan.tencentad.common.enums;
+
+import lombok.Getter;
+
+import java.util.Objects;
+
+@Getter
+public enum AdBaseVideoStatusEnum {
+
+    DEFAULT(0, "未审核"),
+    FIRST_VERIFY_SUCCESS(1, "一审通过"),
+    FIRST_VERIFY_FAIL(2, "一审不通过"),
+    SECOND_VERIFY_SUCCESS(3, "二审通过"),
+    SECOND_VERIFY_FAIL(4, "二审不通过");
+
+
+    final Integer status;
+
+    final String desc;
+
+    AdBaseVideoStatusEnum(Integer status, String desc) {
+        this.status = status;
+        this.desc = desc;
+    }
+
+    public static AdBaseVideoStatusEnum getByStatus(Integer status) {
+        for (AdBaseVideoStatusEnum adBaseVideoStatusEnum : AdBaseVideoStatusEnum.values()) {
+            if (Objects.equals(adBaseVideoStatusEnum.getStatus(), status)) {
+                return adBaseVideoStatusEnum;
+            }
+        }
+        return null;
+    }
+
+
+}

+ 2 - 2
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/common/enums/AdVideoImageStatusEnum.java

@@ -8,8 +8,8 @@ import java.util.Objects;
 public enum AdVideoImageStatusEnum {
 
     DEFAULT(0, "未审核"),
-    VERIFY_SUCCESS(1, "审核成功"),
-    VERIFY_FAIL(2, "审核失败"),
+    VERIFY_SUCCESS(1, "审核通过"),
+    VERIFY_FAIL(2, "审核不通过"),
     UPLOAD_SUCCESS(3,"上传成功"),
     UPLOAD_FAIL(4,"上传失败")
     ;

+ 9 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/common/enums/DimensionSizeEnum.java

@@ -21,6 +21,15 @@ public enum DimensionSizeEnum {
         this.desc = desc;
     }
 
+    public static DimensionSizeEnum getBySize(String size) {
+        for (DimensionSizeEnum dimensionSizeEnum : DimensionSizeEnum.values()) {
+            if (Objects.equals(dimensionSizeEnum.getSize(), size)) {
+                return dimensionSizeEnum;
+            }
+        }
+        return null;
+    }
+
 
 
 }

+ 57 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/controller/AdBaseVideoController.java

@@ -0,0 +1,57 @@
+package com.tzld.piaoquan.tencentad.controller;
+
+import com.tzld.piaoquan.tencentad.common.base.CommonResponse;
+import com.tzld.piaoquan.tencentad.common.enums.AdBaseVideoStatusEnum;
+import com.tzld.piaoquan.tencentad.model.vo.AdBaseVideoParam;
+import com.tzld.piaoquan.tencentad.model.vo.AdBaseVideoStatusVo;
+import com.tzld.piaoquan.tencentad.model.vo.AdBaseVideoVo;
+import com.tzld.piaoquan.tencentad.service.AdBaseVideoService;
+import com.tzld.piaoquan.tencentad.utils.page.Page;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@RestController
+@RequestMapping("/ad/base/video")
+public class AdBaseVideoController {
+
+    @Autowired
+    private AdBaseVideoService adBaseVideoService;
+
+    @PostMapping("/add")
+    public CommonResponse<Void> addAdBaseVideo(@RequestBody List<AdBaseVideoVo> baseVideoList) {
+        return adBaseVideoService.addAdBaseVideo(baseVideoList);
+    }
+
+    @GetMapping("/get")
+    public CommonResponse<Page<AdBaseVideoVo>> getAdBaseVideo(@RequestParam(defaultValue = "1") Integer pageNum,
+                                                              @RequestParam(defaultValue = "10") Integer pageSize,
+                                                              @RequestParam(required = false) List<Integer> status,
+                                                              @RequestParam(required = false) String category) {
+        return adBaseVideoService.getAdBaseVideo(pageNum, pageSize, status, category);
+    }
+
+    @GetMapping("/status")
+    public CommonResponse<List<AdBaseVideoStatusVo>> getAdBaseVideoStatusVo() {
+        List<AdBaseVideoStatusVo> res = new ArrayList<>();
+        res.add(new AdBaseVideoStatusVo(AdBaseVideoStatusEnum.FIRST_VERIFY_SUCCESS.getStatus(), AdBaseVideoStatusEnum.FIRST_VERIFY_SUCCESS.getDesc()));
+        res.add(new AdBaseVideoStatusVo(AdBaseVideoStatusEnum.FIRST_VERIFY_FAIL.getStatus(), AdBaseVideoStatusEnum.FIRST_VERIFY_FAIL.getDesc()));
+        res.add(new AdBaseVideoStatusVo(AdBaseVideoStatusEnum.SECOND_VERIFY_SUCCESS.getStatus(), AdBaseVideoStatusEnum.SECOND_VERIFY_SUCCESS.getDesc()));
+        res.add(new AdBaseVideoStatusVo(AdBaseVideoStatusEnum.SECOND_VERIFY_FAIL.getStatus(), AdBaseVideoStatusEnum.SECOND_VERIFY_FAIL.getDesc()));
+        return CommonResponse.success(res);
+    }
+
+    @PostMapping("/verify/first")
+    public CommonResponse<Void> firstVerifyAdBaseVideo(@RequestBody AdBaseVideoParam adBaseVideoParam) {
+        System.out.println(adBaseVideoParam);
+        return adBaseVideoService.firstVerifyAdBaseVideo(adBaseVideoParam);
+    }
+
+    @PostMapping("/verify/second")
+    public CommonResponse<Void> secondVerifyAdBaseVideo(@RequestBody AdBaseVideoParam adBaseVideoParam) {
+        return adBaseVideoService.secondVerifyAdBaseVideo(adBaseVideoParam);
+    }
+
+}

+ 10 - 5
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/controller/AdCreativeController.java

@@ -2,12 +2,11 @@ package com.tzld.piaoquan.tencentad.controller;
 
 import com.tzld.piaoquan.tencentad.common.base.CommonResponse;
 import com.tzld.piaoquan.tencentad.model.vo.AdCreativeParam;
+import com.tzld.piaoquan.tencentad.model.vo.AdCreativeVo;
 import com.tzld.piaoquan.tencentad.service.AdVideoService;
+import com.tzld.piaoquan.tencentad.utils.page.Page;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 @RestController
 @RequestMapping("/ad/creative")
@@ -16,8 +15,14 @@ public class AdCreativeController {
     @Autowired
     private AdVideoService adVideoService;
 
-    @PostMapping("/create")
+    @PostMapping("/add")
     public CommonResponse<Void> createAdCreative(@RequestBody AdCreativeParam creativeParam) {
         return adVideoService.createAdCreative(creativeParam);
     }
+
+    @GetMapping("/get")
+    public CommonResponse<Page<AdCreativeVo>> getAdCreative(@RequestParam(defaultValue = "1") Integer pageNum,
+                                                            @RequestParam(defaultValue = "10") Integer pageSize) {
+        return null;
+    }
 }

+ 68 - 10
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/controller/AdVideoController.java

@@ -1,8 +1,7 @@
 package com.tzld.piaoquan.tencentad.controller;
 
 import com.tzld.piaoquan.tencentad.common.base.CommonResponse;
-import com.tzld.piaoquan.tencentad.model.po.AdVideo;
-import com.tzld.piaoquan.tencentad.model.po.AdVideoImage;
+import com.tzld.piaoquan.tencentad.common.enums.*;
 import com.tzld.piaoquan.tencentad.model.vo.*;
 import com.tzld.piaoquan.tencentad.service.AdMuseTaskService;
 import com.tzld.piaoquan.tencentad.service.AdVideoImageService;
@@ -10,8 +9,12 @@ import com.tzld.piaoquan.tencentad.service.AdVideoService;
 import com.tzld.piaoquan.tencentad.utils.page.Page;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
 
+import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
+import java.util.stream.Collectors;
 
 @RestController
 @RequestMapping("/ad/video")
@@ -29,13 +32,24 @@ public class AdVideoController {
 
     @GetMapping("/get")
     public CommonResponse<Page<AdVideoVo>> getAdVideoList(@RequestParam(defaultValue = "1") Integer pageNum,
-                                                          @RequestParam(defaultValue = "10") Integer pageSize) {
-        return adVideoService.getAdVideoList(pageNum, pageSize);
+                                                          @RequestParam(defaultValue = "10") Integer pageSize,
+                                                          @RequestParam(required = false) List<Integer> status) {
+        return adVideoService.getAdVideoList(pageNum, pageSize, status);
     }
 
-    @PostMapping("/verify")
-    public CommonResponse<Void> verifyAdVideo(@RequestBody AdVideoParam adVideoParam) {
-        return adVideoService.verifyAdVideo(adVideoParam);
+    @GetMapping("/status")
+    public CommonResponse<List<AdVideoStatusVo>> getAdVideoStatusVo() {
+        List<AdVideoStatusVo> res = new ArrayList<>();
+        res.add(new AdVideoStatusVo(AdVideoStatusEnum.VERIFY_SUCCESS.getStatus(),
+                AdVideoStatusEnum.VERIFY_SUCCESS.getDesc()));
+        res.add(new AdVideoStatusVo(AdVideoStatusEnum.VERIFY_FAIL.getStatus(),
+                AdVideoStatusEnum.VERIFY_FAIL.getDesc()));
+        return CommonResponse.success(res);
+    }
+
+    @PostMapping("/update")
+    public CommonResponse<Void> updateAdVideo(@RequestBody AdVideoParam adVideoParam) {
+        return adVideoService.updateAdVideo(adVideoParam);
     }
 
     @GetMapping("/image/get")
@@ -43,6 +57,35 @@ public class AdVideoController {
         return adVideoImageService.getAdVideoImageVoList(adVideoId);
     }
 
+    @GetMapping("/image/status")
+    public CommonResponse<List<AdVideoImageStatusVo>> getAdBaseVideoStatusVo() {
+        List<AdVideoImageStatusVo> res = new ArrayList<>();
+        res.add(new AdVideoImageStatusVo(AdVideoImageStatusEnum.VERIFY_SUCCESS.getStatus(),
+                AdVideoImageStatusEnum.VERIFY_SUCCESS.getDesc()));
+        res.add(new AdVideoImageStatusVo(AdVideoImageStatusEnum.VERIFY_FAIL.getStatus(),
+                AdVideoImageStatusEnum.VERIFY_FAIL.getDesc()));
+        return CommonResponse.success(res);
+    }
+
+    @GetMapping("/image/dimension")
+    public CommonResponse<List<DimensionSizeVo>> getDimensionSizeVo() {
+        return CommonResponse.success(Arrays.stream(DimensionSizeEnum.values())
+                .map(dimensionSizeEnum -> new DimensionSizeVo(dimensionSizeEnum.getSize(), dimensionSizeEnum.getDesc()))
+                .collect(Collectors.toList()));
+    }
+
+    @GetMapping("/image/similarity")
+    public CommonResponse<List<SimilarityCodeVo>> getSimilarityCodeVo() {
+        return CommonResponse.success(Arrays.stream(SimilarityCodeEnum.values())
+                .map(similarityCodeEnum -> new SimilarityCodeVo(similarityCodeEnum.getCode(), similarityCodeEnum.getDesc()))
+                .collect(Collectors.toList()));
+    }
+
+    @PostMapping("/image/upload")
+    public CommonResponse<Void> uploadVideoImage(@RequestParam("file") MultipartFile file, @RequestParam Long adVideoId) {
+        return adVideoImageService.uploadMuseImage(file, adVideoId);
+    }
+
     @PostMapping("/image/update")
     public CommonResponse<Void> getAdVideoImageList(@RequestBody AdVideoImageParam adVideoImageParam) {
         return adVideoImageService.updateAdVideoImage(adVideoImageParam);
@@ -54,9 +97,24 @@ public class AdVideoController {
         return adMuseTaskService.getAdMuseImageVoList(adVideoId);
     }
 
-    @PostMapping("/muse/verify")
-    public CommonResponse<Void> verifyAdMuseImage(@RequestBody AdMuseImageParam adMuseImageParam) {
-        return adMuseTaskService.verifyMuseTask(adMuseImageParam);
+    @GetMapping("/muse/status")
+    public CommonResponse<List<AdVideoMuseStatusVo>> getAdVideoMuseStatusVo() {
+        List<AdVideoMuseStatusVo> res = new ArrayList<>();
+        res.add(new AdVideoMuseStatusVo(AdMuseTaskStatusEnum.VERIFY_SUCCESS.getStatus(),
+                AdMuseTaskStatusEnum.VERIFY_SUCCESS.getDesc()));
+        res.add(new AdVideoMuseStatusVo(AdMuseTaskStatusEnum.VERIFY_FAIL.getStatus(),
+                AdMuseTaskStatusEnum.VERIFY_FAIL.getDesc()));
+        return CommonResponse.success(res);
+    }
+
+    @PostMapping("/muse/update")
+    public CommonResponse<Void> updateAdMuseImage(@RequestBody AdMuseImageParam adMuseImageParam) {
+        return adMuseTaskService.updateMuseTask(adMuseImageParam);
+    }
+
+    @PostMapping("/muse/upload")
+    public CommonResponse<Void> uploadMuseImage(@RequestParam("file") MultipartFile file, @RequestParam("id") Long id) {
+        return adMuseTaskService.uploadMuseImage(file, id);
     }
 
 

+ 30 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/dao/mapper/AdBaseVideoMapper.java

@@ -0,0 +1,30 @@
+package com.tzld.piaoquan.tencentad.dao.mapper;
+
+import com.tzld.piaoquan.tencentad.model.po.AdBaseVideo;
+import com.tzld.piaoquan.tencentad.model.po.AdBaseVideoExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface AdBaseVideoMapper {
+    long countByExample(AdBaseVideoExample example);
+
+    int deleteByExample(AdBaseVideoExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(AdBaseVideo record);
+
+    int insertSelective(AdBaseVideo record);
+
+    List<AdBaseVideo> selectByExample(AdBaseVideoExample example);
+
+    AdBaseVideo selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("record") AdBaseVideo record, @Param("example") AdBaseVideoExample example);
+
+    int updateByExample(@Param("record") AdBaseVideo record, @Param("example") AdBaseVideoExample example);
+
+    int updateByPrimaryKeySelective(AdBaseVideo record);
+
+    int updateByPrimaryKey(AdBaseVideo record);
+}

+ 114 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/po/AdBaseVideo.java

@@ -0,0 +1,114 @@
+package com.tzld.piaoquan.tencentad.model.po;
+
+import java.util.Date;
+
+public class AdBaseVideo {
+    private Long id;
+
+    private Long videoId;
+
+    private String videoPath;
+
+    private String videoCover;
+
+    private String category;
+
+    private Integer status;
+
+    private Integer isDelete;
+
+    private Date createTime;
+
+    private Date updateTime;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getVideoId() {
+        return videoId;
+    }
+
+    public void setVideoId(Long videoId) {
+        this.videoId = videoId;
+    }
+
+    public String getVideoPath() {
+        return videoPath;
+    }
+
+    public void setVideoPath(String videoPath) {
+        this.videoPath = videoPath;
+    }
+
+    public String getVideoCover() {
+        return videoCover;
+    }
+
+    public void setVideoCover(String videoCover) {
+        this.videoCover = videoCover;
+    }
+
+    public String getCategory() {
+        return category;
+    }
+
+    public void setCategory(String category) {
+        this.category = category;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public Integer getIsDelete() {
+        return isDelete;
+    }
+
+    public void setIsDelete(Integer isDelete) {
+        this.isDelete = isDelete;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", videoId=").append(videoId);
+        sb.append(", videoPath=").append(videoPath);
+        sb.append(", videoCover=").append(videoCover);
+        sb.append(", category=").append(category);
+        sb.append(", status=").append(status);
+        sb.append(", isDelete=").append(isDelete);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 782 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/po/AdBaseVideoExample.java

@@ -0,0 +1,782 @@
+package com.tzld.piaoquan.tencentad.model.po;
+
+import com.tzld.piaoquan.tencentad.utils.page.Page;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class AdBaseVideoExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    protected Page page;
+
+    public AdBaseVideoExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    public void setPage(Page page) {
+        this.page=page;
+    }
+
+    public Page getPage() {
+        return page;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Long value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Long value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Long value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Long value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Long value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Long> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Long> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Long value1, Long value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Long value1, Long value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdIsNull() {
+            addCriterion("video_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdIsNotNull() {
+            addCriterion("video_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdEqualTo(Long value) {
+            addCriterion("video_id =", value, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdNotEqualTo(Long value) {
+            addCriterion("video_id <>", value, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdGreaterThan(Long value) {
+            addCriterion("video_id >", value, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("video_id >=", value, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdLessThan(Long value) {
+            addCriterion("video_id <", value, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdLessThanOrEqualTo(Long value) {
+            addCriterion("video_id <=", value, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdIn(List<Long> values) {
+            addCriterion("video_id in", values, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdNotIn(List<Long> values) {
+            addCriterion("video_id not in", values, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdBetween(Long value1, Long value2) {
+            addCriterion("video_id between", value1, value2, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdNotBetween(Long value1, Long value2) {
+            addCriterion("video_id not between", value1, value2, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoPathIsNull() {
+            addCriterion("video_path is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoPathIsNotNull() {
+            addCriterion("video_path is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoPathEqualTo(String value) {
+            addCriterion("video_path =", value, "videoPath");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoPathNotEqualTo(String value) {
+            addCriterion("video_path <>", value, "videoPath");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoPathGreaterThan(String value) {
+            addCriterion("video_path >", value, "videoPath");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoPathGreaterThanOrEqualTo(String value) {
+            addCriterion("video_path >=", value, "videoPath");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoPathLessThan(String value) {
+            addCriterion("video_path <", value, "videoPath");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoPathLessThanOrEqualTo(String value) {
+            addCriterion("video_path <=", value, "videoPath");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoPathLike(String value) {
+            addCriterion("video_path like", value, "videoPath");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoPathNotLike(String value) {
+            addCriterion("video_path not like", value, "videoPath");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoPathIn(List<String> values) {
+            addCriterion("video_path in", values, "videoPath");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoPathNotIn(List<String> values) {
+            addCriterion("video_path not in", values, "videoPath");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoPathBetween(String value1, String value2) {
+            addCriterion("video_path between", value1, value2, "videoPath");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoPathNotBetween(String value1, String value2) {
+            addCriterion("video_path not between", value1, value2, "videoPath");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoCoverIsNull() {
+            addCriterion("video_cover is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoCoverIsNotNull() {
+            addCriterion("video_cover is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoCoverEqualTo(String value) {
+            addCriterion("video_cover =", value, "videoCover");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoCoverNotEqualTo(String value) {
+            addCriterion("video_cover <>", value, "videoCover");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoCoverGreaterThan(String value) {
+            addCriterion("video_cover >", value, "videoCover");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoCoverGreaterThanOrEqualTo(String value) {
+            addCriterion("video_cover >=", value, "videoCover");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoCoverLessThan(String value) {
+            addCriterion("video_cover <", value, "videoCover");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoCoverLessThanOrEqualTo(String value) {
+            addCriterion("video_cover <=", value, "videoCover");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoCoverLike(String value) {
+            addCriterion("video_cover like", value, "videoCover");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoCoverNotLike(String value) {
+            addCriterion("video_cover not like", value, "videoCover");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoCoverIn(List<String> values) {
+            addCriterion("video_cover in", values, "videoCover");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoCoverNotIn(List<String> values) {
+            addCriterion("video_cover not in", values, "videoCover");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoCoverBetween(String value1, String value2) {
+            addCriterion("video_cover between", value1, value2, "videoCover");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoCoverNotBetween(String value1, String value2) {
+            addCriterion("video_cover not between", value1, value2, "videoCover");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryIsNull() {
+            addCriterion("category is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryIsNotNull() {
+            addCriterion("category is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryEqualTo(String value) {
+            addCriterion("category =", value, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryNotEqualTo(String value) {
+            addCriterion("category <>", value, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryGreaterThan(String value) {
+            addCriterion("category >", value, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryGreaterThanOrEqualTo(String value) {
+            addCriterion("category >=", value, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryLessThan(String value) {
+            addCriterion("category <", value, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryLessThanOrEqualTo(String value) {
+            addCriterion("category <=", value, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryLike(String value) {
+            addCriterion("category like", value, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryNotLike(String value) {
+            addCriterion("category not like", value, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryIn(List<String> values) {
+            addCriterion("category in", values, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryNotIn(List<String> values) {
+            addCriterion("category not in", values, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryBetween(String value1, String value2) {
+            addCriterion("category between", value1, value2, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryNotBetween(String value1, String value2) {
+            addCriterion("category not between", value1, value2, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIsNull() {
+            addCriterion("`status` is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIsNotNull() {
+            addCriterion("`status` is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusEqualTo(Integer value) {
+            addCriterion("`status` =", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotEqualTo(Integer value) {
+            addCriterion("`status` <>", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusGreaterThan(Integer value) {
+            addCriterion("`status` >", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
+            addCriterion("`status` >=", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusLessThan(Integer value) {
+            addCriterion("`status` <", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusLessThanOrEqualTo(Integer value) {
+            addCriterion("`status` <=", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIn(List<Integer> values) {
+            addCriterion("`status` in", values, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotIn(List<Integer> values) {
+            addCriterion("`status` not in", values, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusBetween(Integer value1, Integer value2) {
+            addCriterion("`status` between", value1, value2, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotBetween(Integer value1, Integer value2) {
+            addCriterion("`status` not between", value1, value2, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteIsNull() {
+            addCriterion("is_delete is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteIsNotNull() {
+            addCriterion("is_delete is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteEqualTo(Integer value) {
+            addCriterion("is_delete =", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteNotEqualTo(Integer value) {
+            addCriterion("is_delete <>", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteGreaterThan(Integer value) {
+            addCriterion("is_delete >", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteGreaterThanOrEqualTo(Integer value) {
+            addCriterion("is_delete >=", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteLessThan(Integer value) {
+            addCriterion("is_delete <", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteLessThanOrEqualTo(Integer value) {
+            addCriterion("is_delete <=", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteIn(List<Integer> values) {
+            addCriterion("is_delete in", values, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteNotIn(List<Integer> values) {
+            addCriterion("is_delete not in", values, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteBetween(Integer value1, Integer value2) {
+            addCriterion("is_delete between", value1, value2, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteNotBetween(Integer value1, Integer value2) {
+            addCriterion("is_delete not between", value1, value2, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNull() {
+            addCriterion("create_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNotNull() {
+            addCriterion("create_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeEqualTo(Date value) {
+            addCriterion("create_time =", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotEqualTo(Date value) {
+            addCriterion("create_time <>", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThan(Date value) {
+            addCriterion("create_time >", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("create_time >=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThan(Date value) {
+            addCriterion("create_time <", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("create_time <=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIn(List<Date> values) {
+            addCriterion("create_time in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotIn(List<Date> values) {
+            addCriterion("create_time not in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeBetween(Date value1, Date value2) {
+            addCriterion("create_time between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("create_time not between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIsNull() {
+            addCriterion("update_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIsNotNull() {
+            addCriterion("update_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeEqualTo(Date value) {
+            addCriterion("update_time =", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotEqualTo(Date value) {
+            addCriterion("update_time <>", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeGreaterThan(Date value) {
+            addCriterion("update_time >", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("update_time >=", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeLessThan(Date value) {
+            addCriterion("update_time <", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("update_time <=", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIn(List<Date> values) {
+            addCriterion("update_time in", values, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotIn(List<Date> values) {
+            addCriterion("update_time not in", values, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeBetween(Date value1, Date value2) {
+            addCriterion("update_time between", value1, value2, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("update_time not between", value1, value2, "updateTime");
+            return (Criteria) this;
+        }
+    }
+
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 17 - 6
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/po/AdCreative.java

@@ -5,10 +5,12 @@ import java.util.Date;
 public class AdCreative {
     private Long id;
 
-    private Long adId;
+    private Long adGroupId;
 
     private Long adVideoId;
 
+    private String museIds;
+
     private Long dynamicCreativeId;
 
     private Integer status;
@@ -27,12 +29,12 @@ public class AdCreative {
         this.id = id;
     }
 
-    public Long getAdId() {
-        return adId;
+    public Long getAdGroupId() {
+        return adGroupId;
     }
 
-    public void setAdId(Long adId) {
-        this.adId = adId;
+    public void setAdGroupId(Long adGroupId) {
+        this.adGroupId = adGroupId;
     }
 
     public Long getAdVideoId() {
@@ -43,6 +45,14 @@ public class AdCreative {
         this.adVideoId = adVideoId;
     }
 
+    public String getMuseIds() {
+        return museIds;
+    }
+
+    public void setMuseIds(String museIds) {
+        this.museIds = museIds;
+    }
+
     public Long getDynamicCreativeId() {
         return dynamicCreativeId;
     }
@@ -90,8 +100,9 @@ public class AdCreative {
         sb.append(" [");
         sb.append("Hash = ").append(hashCode());
         sb.append(", id=").append(id);
-        sb.append(", adId=").append(adId);
+        sb.append(", adGroupId=").append(adGroupId);
         sb.append(", adVideoId=").append(adVideoId);
+        sb.append(", museIds=").append(museIds);
         sb.append(", dynamicCreativeId=").append(dynamicCreativeId);
         sb.append(", status=").append(status);
         sb.append(", isDelete=").append(isDelete);

+ 94 - 24
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/po/AdCreativeExample.java

@@ -176,63 +176,63 @@ public class AdCreativeExample {
             return (Criteria) this;
         }
 
-        public Criteria andAdIdIsNull() {
-            addCriterion("ad_id is null");
+        public Criteria andAdGroupIdIsNull() {
+            addCriterion("ad_group_id is null");
             return (Criteria) this;
         }
 
-        public Criteria andAdIdIsNotNull() {
-            addCriterion("ad_id is not null");
+        public Criteria andAdGroupIdIsNotNull() {
+            addCriterion("ad_group_id is not null");
             return (Criteria) this;
         }
 
-        public Criteria andAdIdEqualTo(Long value) {
-            addCriterion("ad_id =", value, "adId");
+        public Criteria andAdGroupIdEqualTo(Long value) {
+            addCriterion("ad_group_id =", value, "adGroupId");
             return (Criteria) this;
         }
 
-        public Criteria andAdIdNotEqualTo(Long value) {
-            addCriterion("ad_id <>", value, "adId");
+        public Criteria andAdGroupIdNotEqualTo(Long value) {
+            addCriterion("ad_group_id <>", value, "adGroupId");
             return (Criteria) this;
         }
 
-        public Criteria andAdIdGreaterThan(Long value) {
-            addCriterion("ad_id >", value, "adId");
+        public Criteria andAdGroupIdGreaterThan(Long value) {
+            addCriterion("ad_group_id >", value, "adGroupId");
             return (Criteria) this;
         }
 
-        public Criteria andAdIdGreaterThanOrEqualTo(Long value) {
-            addCriterion("ad_id >=", value, "adId");
+        public Criteria andAdGroupIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("ad_group_id >=", value, "adGroupId");
             return (Criteria) this;
         }
 
-        public Criteria andAdIdLessThan(Long value) {
-            addCriterion("ad_id <", value, "adId");
+        public Criteria andAdGroupIdLessThan(Long value) {
+            addCriterion("ad_group_id <", value, "adGroupId");
             return (Criteria) this;
         }
 
-        public Criteria andAdIdLessThanOrEqualTo(Long value) {
-            addCriterion("ad_id <=", value, "adId");
+        public Criteria andAdGroupIdLessThanOrEqualTo(Long value) {
+            addCriterion("ad_group_id <=", value, "adGroupId");
             return (Criteria) this;
         }
 
-        public Criteria andAdIdIn(List<Long> values) {
-            addCriterion("ad_id in", values, "adId");
+        public Criteria andAdGroupIdIn(List<Long> values) {
+            addCriterion("ad_group_id in", values, "adGroupId");
             return (Criteria) this;
         }
 
-        public Criteria andAdIdNotIn(List<Long> values) {
-            addCriterion("ad_id not in", values, "adId");
+        public Criteria andAdGroupIdNotIn(List<Long> values) {
+            addCriterion("ad_group_id not in", values, "adGroupId");
             return (Criteria) this;
         }
 
-        public Criteria andAdIdBetween(Long value1, Long value2) {
-            addCriterion("ad_id between", value1, value2, "adId");
+        public Criteria andAdGroupIdBetween(Long value1, Long value2) {
+            addCriterion("ad_group_id between", value1, value2, "adGroupId");
             return (Criteria) this;
         }
 
-        public Criteria andAdIdNotBetween(Long value1, Long value2) {
-            addCriterion("ad_id not between", value1, value2, "adId");
+        public Criteria andAdGroupIdNotBetween(Long value1, Long value2) {
+            addCriterion("ad_group_id not between", value1, value2, "adGroupId");
             return (Criteria) this;
         }
 
@@ -296,6 +296,76 @@ public class AdCreativeExample {
             return (Criteria) this;
         }
 
+        public Criteria andMuseIdsIsNull() {
+            addCriterion("muse_ids is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMuseIdsIsNotNull() {
+            addCriterion("muse_ids is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMuseIdsEqualTo(String value) {
+            addCriterion("muse_ids =", value, "museIds");
+            return (Criteria) this;
+        }
+
+        public Criteria andMuseIdsNotEqualTo(String value) {
+            addCriterion("muse_ids <>", value, "museIds");
+            return (Criteria) this;
+        }
+
+        public Criteria andMuseIdsGreaterThan(String value) {
+            addCriterion("muse_ids >", value, "museIds");
+            return (Criteria) this;
+        }
+
+        public Criteria andMuseIdsGreaterThanOrEqualTo(String value) {
+            addCriterion("muse_ids >=", value, "museIds");
+            return (Criteria) this;
+        }
+
+        public Criteria andMuseIdsLessThan(String value) {
+            addCriterion("muse_ids <", value, "museIds");
+            return (Criteria) this;
+        }
+
+        public Criteria andMuseIdsLessThanOrEqualTo(String value) {
+            addCriterion("muse_ids <=", value, "museIds");
+            return (Criteria) this;
+        }
+
+        public Criteria andMuseIdsLike(String value) {
+            addCriterion("muse_ids like", value, "museIds");
+            return (Criteria) this;
+        }
+
+        public Criteria andMuseIdsNotLike(String value) {
+            addCriterion("muse_ids not like", value, "museIds");
+            return (Criteria) this;
+        }
+
+        public Criteria andMuseIdsIn(List<String> values) {
+            addCriterion("muse_ids in", values, "museIds");
+            return (Criteria) this;
+        }
+
+        public Criteria andMuseIdsNotIn(List<String> values) {
+            addCriterion("muse_ids not in", values, "museIds");
+            return (Criteria) this;
+        }
+
+        public Criteria andMuseIdsBetween(String value1, String value2) {
+            addCriterion("muse_ids between", value1, value2, "museIds");
+            return (Criteria) this;
+        }
+
+        public Criteria andMuseIdsNotBetween(String value1, String value2) {
+            addCriterion("muse_ids not between", value1, value2, "museIds");
+            return (Criteria) this;
+        }
+
         public Criteria andDynamicCreativeIdIsNull() {
             addCriterion("dynamic_creative_id is null");
             return (Criteria) this;

+ 18 - 18
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/po/AdVideo.java

@@ -5,7 +5,7 @@ import java.util.Date;
 public class AdVideo {
     private Long id;
 
-    private Long adGroupId;
+    private String accountId;
 
     private Long videoId;
 
@@ -15,9 +15,9 @@ public class AdVideo {
 
     private String category;
 
-    private String copywriter;
+    private String description;
 
-    private String caption;
+    private String subtitle;
 
     private Integer status;
 
@@ -37,12 +37,12 @@ public class AdVideo {
         this.id = id;
     }
 
-    public Long getAdGroupId() {
-        return adGroupId;
+    public String getAccountId() {
+        return accountId;
     }
 
-    public void setAdGroupId(Long adGroupId) {
-        this.adGroupId = adGroupId;
+    public void setAccountId(String accountId) {
+        this.accountId = accountId;
     }
 
     public Long getVideoId() {
@@ -77,20 +77,20 @@ public class AdVideo {
         this.category = category;
     }
 
-    public String getCopywriter() {
-        return copywriter;
+    public String getDescription() {
+        return description;
     }
 
-    public void setCopywriter(String copywriter) {
-        this.copywriter = copywriter;
+    public void setDescription(String description) {
+        this.description = description;
     }
 
-    public String getCaption() {
-        return caption;
+    public String getSubtitle() {
+        return subtitle;
     }
 
-    public void setCaption(String caption) {
-        this.caption = caption;
+    public void setSubtitle(String subtitle) {
+        this.subtitle = subtitle;
     }
 
     public Integer getStatus() {
@@ -140,13 +140,13 @@ public class AdVideo {
         sb.append(" [");
         sb.append("Hash = ").append(hashCode());
         sb.append(", id=").append(id);
-        sb.append(", adGroupId=").append(adGroupId);
+        sb.append(", accountId=").append(accountId);
         sb.append(", videoId=").append(videoId);
         sb.append(", videoPath=").append(videoPath);
         sb.append(", videoCover=").append(videoCover);
         sb.append(", category=").append(category);
-        sb.append(", copywriter=").append(copywriter);
-        sb.append(", caption=").append(caption);
+        sb.append(", description=").append(description);
+        sb.append(", subtitle=").append(subtitle);
         sb.append(", status=").append(status);
         sb.append(", retryCount=").append(retryCount);
         sb.append(", isDelete=").append(isDelete);

+ 90 - 80
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/po/AdVideoExample.java

@@ -176,63 +176,73 @@ public class AdVideoExample {
             return (Criteria) this;
         }
 
-        public Criteria andAdGroupIdIsNull() {
-            addCriterion("ad_group_id is null");
+        public Criteria andAccountIdIsNull() {
+            addCriterion("account_id is null");
             return (Criteria) this;
         }
 
-        public Criteria andAdGroupIdIsNotNull() {
-            addCriterion("ad_group_id is not null");
+        public Criteria andAccountIdIsNotNull() {
+            addCriterion("account_id is not null");
             return (Criteria) this;
         }
 
-        public Criteria andAdGroupIdEqualTo(Long value) {
-            addCriterion("ad_group_id =", value, "adGroupId");
+        public Criteria andAccountIdEqualTo(String value) {
+            addCriterion("account_id =", value, "accountId");
             return (Criteria) this;
         }
 
-        public Criteria andAdGroupIdNotEqualTo(Long value) {
-            addCriterion("ad_group_id <>", value, "adGroupId");
+        public Criteria andAccountIdNotEqualTo(String value) {
+            addCriterion("account_id <>", value, "accountId");
             return (Criteria) this;
         }
 
-        public Criteria andAdGroupIdGreaterThan(Long value) {
-            addCriterion("ad_group_id >", value, "adGroupId");
+        public Criteria andAccountIdGreaterThan(String value) {
+            addCriterion("account_id >", value, "accountId");
             return (Criteria) this;
         }
 
-        public Criteria andAdGroupIdGreaterThanOrEqualTo(Long value) {
-            addCriterion("ad_group_id >=", value, "adGroupId");
+        public Criteria andAccountIdGreaterThanOrEqualTo(String value) {
+            addCriterion("account_id >=", value, "accountId");
             return (Criteria) this;
         }
 
-        public Criteria andAdGroupIdLessThan(Long value) {
-            addCriterion("ad_group_id <", value, "adGroupId");
+        public Criteria andAccountIdLessThan(String value) {
+            addCriterion("account_id <", value, "accountId");
             return (Criteria) this;
         }
 
-        public Criteria andAdGroupIdLessThanOrEqualTo(Long value) {
-            addCriterion("ad_group_id <=", value, "adGroupId");
+        public Criteria andAccountIdLessThanOrEqualTo(String value) {
+            addCriterion("account_id <=", value, "accountId");
             return (Criteria) this;
         }
 
-        public Criteria andAdGroupIdIn(List<Long> values) {
-            addCriterion("ad_group_id in", values, "adGroupId");
+        public Criteria andAccountIdLike(String value) {
+            addCriterion("account_id like", value, "accountId");
             return (Criteria) this;
         }
 
-        public Criteria andAdGroupIdNotIn(List<Long> values) {
-            addCriterion("ad_group_id not in", values, "adGroupId");
+        public Criteria andAccountIdNotLike(String value) {
+            addCriterion("account_id not like", value, "accountId");
             return (Criteria) this;
         }
 
-        public Criteria andAdGroupIdBetween(Long value1, Long value2) {
-            addCriterion("ad_group_id between", value1, value2, "adGroupId");
+        public Criteria andAccountIdIn(List<String> values) {
+            addCriterion("account_id in", values, "accountId");
             return (Criteria) this;
         }
 
-        public Criteria andAdGroupIdNotBetween(Long value1, Long value2) {
-            addCriterion("ad_group_id not between", value1, value2, "adGroupId");
+        public Criteria andAccountIdNotIn(List<String> values) {
+            addCriterion("account_id not in", values, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdBetween(String value1, String value2) {
+            addCriterion("account_id between", value1, value2, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdNotBetween(String value1, String value2) {
+            addCriterion("account_id not between", value1, value2, "accountId");
             return (Criteria) this;
         }
 
@@ -506,143 +516,143 @@ public class AdVideoExample {
             return (Criteria) this;
         }
 
-        public Criteria andCopywriterIsNull() {
-            addCriterion("copywriter is null");
+        public Criteria andDescriptionIsNull() {
+            addCriterion("description is null");
             return (Criteria) this;
         }
 
-        public Criteria andCopywriterIsNotNull() {
-            addCriterion("copywriter is not null");
+        public Criteria andDescriptionIsNotNull() {
+            addCriterion("description is not null");
             return (Criteria) this;
         }
 
-        public Criteria andCopywriterEqualTo(String value) {
-            addCriterion("copywriter =", value, "copywriter");
+        public Criteria andDescriptionEqualTo(String value) {
+            addCriterion("description =", value, "description");
             return (Criteria) this;
         }
 
-        public Criteria andCopywriterNotEqualTo(String value) {
-            addCriterion("copywriter <>", value, "copywriter");
+        public Criteria andDescriptionNotEqualTo(String value) {
+            addCriterion("description <>", value, "description");
             return (Criteria) this;
         }
 
-        public Criteria andCopywriterGreaterThan(String value) {
-            addCriterion("copywriter >", value, "copywriter");
+        public Criteria andDescriptionGreaterThan(String value) {
+            addCriterion("description >", value, "description");
             return (Criteria) this;
         }
 
-        public Criteria andCopywriterGreaterThanOrEqualTo(String value) {
-            addCriterion("copywriter >=", value, "copywriter");
+        public Criteria andDescriptionGreaterThanOrEqualTo(String value) {
+            addCriterion("description >=", value, "description");
             return (Criteria) this;
         }
 
-        public Criteria andCopywriterLessThan(String value) {
-            addCriterion("copywriter <", value, "copywriter");
+        public Criteria andDescriptionLessThan(String value) {
+            addCriterion("description <", value, "description");
             return (Criteria) this;
         }
 
-        public Criteria andCopywriterLessThanOrEqualTo(String value) {
-            addCriterion("copywriter <=", value, "copywriter");
+        public Criteria andDescriptionLessThanOrEqualTo(String value) {
+            addCriterion("description <=", value, "description");
             return (Criteria) this;
         }
 
-        public Criteria andCopywriterLike(String value) {
-            addCriterion("copywriter like", value, "copywriter");
+        public Criteria andDescriptionLike(String value) {
+            addCriterion("description like", value, "description");
             return (Criteria) this;
         }
 
-        public Criteria andCopywriterNotLike(String value) {
-            addCriterion("copywriter not like", value, "copywriter");
+        public Criteria andDescriptionNotLike(String value) {
+            addCriterion("description not like", value, "description");
             return (Criteria) this;
         }
 
-        public Criteria andCopywriterIn(List<String> values) {
-            addCriterion("copywriter in", values, "copywriter");
+        public Criteria andDescriptionIn(List<String> values) {
+            addCriterion("description in", values, "description");
             return (Criteria) this;
         }
 
-        public Criteria andCopywriterNotIn(List<String> values) {
-            addCriterion("copywriter not in", values, "copywriter");
+        public Criteria andDescriptionNotIn(List<String> values) {
+            addCriterion("description not in", values, "description");
             return (Criteria) this;
         }
 
-        public Criteria andCopywriterBetween(String value1, String value2) {
-            addCriterion("copywriter between", value1, value2, "copywriter");
+        public Criteria andDescriptionBetween(String value1, String value2) {
+            addCriterion("description between", value1, value2, "description");
             return (Criteria) this;
         }
 
-        public Criteria andCopywriterNotBetween(String value1, String value2) {
-            addCriterion("copywriter not between", value1, value2, "copywriter");
+        public Criteria andDescriptionNotBetween(String value1, String value2) {
+            addCriterion("description not between", value1, value2, "description");
             return (Criteria) this;
         }
 
-        public Criteria andCaptionIsNull() {
-            addCriterion("caption is null");
+        public Criteria andSubtitleIsNull() {
+            addCriterion("subtitle is null");
             return (Criteria) this;
         }
 
-        public Criteria andCaptionIsNotNull() {
-            addCriterion("caption is not null");
+        public Criteria andSubtitleIsNotNull() {
+            addCriterion("subtitle is not null");
             return (Criteria) this;
         }
 
-        public Criteria andCaptionEqualTo(String value) {
-            addCriterion("caption =", value, "caption");
+        public Criteria andSubtitleEqualTo(String value) {
+            addCriterion("subtitle =", value, "subtitle");
             return (Criteria) this;
         }
 
-        public Criteria andCaptionNotEqualTo(String value) {
-            addCriterion("caption <>", value, "caption");
+        public Criteria andSubtitleNotEqualTo(String value) {
+            addCriterion("subtitle <>", value, "subtitle");
             return (Criteria) this;
         }
 
-        public Criteria andCaptionGreaterThan(String value) {
-            addCriterion("caption >", value, "caption");
+        public Criteria andSubtitleGreaterThan(String value) {
+            addCriterion("subtitle >", value, "subtitle");
             return (Criteria) this;
         }
 
-        public Criteria andCaptionGreaterThanOrEqualTo(String value) {
-            addCriterion("caption >=", value, "caption");
+        public Criteria andSubtitleGreaterThanOrEqualTo(String value) {
+            addCriterion("subtitle >=", value, "subtitle");
             return (Criteria) this;
         }
 
-        public Criteria andCaptionLessThan(String value) {
-            addCriterion("caption <", value, "caption");
+        public Criteria andSubtitleLessThan(String value) {
+            addCriterion("subtitle <", value, "subtitle");
             return (Criteria) this;
         }
 
-        public Criteria andCaptionLessThanOrEqualTo(String value) {
-            addCriterion("caption <=", value, "caption");
+        public Criteria andSubtitleLessThanOrEqualTo(String value) {
+            addCriterion("subtitle <=", value, "subtitle");
             return (Criteria) this;
         }
 
-        public Criteria andCaptionLike(String value) {
-            addCriterion("caption like", value, "caption");
+        public Criteria andSubtitleLike(String value) {
+            addCriterion("subtitle like", value, "subtitle");
             return (Criteria) this;
         }
 
-        public Criteria andCaptionNotLike(String value) {
-            addCriterion("caption not like", value, "caption");
+        public Criteria andSubtitleNotLike(String value) {
+            addCriterion("subtitle not like", value, "subtitle");
             return (Criteria) this;
         }
 
-        public Criteria andCaptionIn(List<String> values) {
-            addCriterion("caption in", values, "caption");
+        public Criteria andSubtitleIn(List<String> values) {
+            addCriterion("subtitle in", values, "subtitle");
             return (Criteria) this;
         }
 
-        public Criteria andCaptionNotIn(List<String> values) {
-            addCriterion("caption not in", values, "caption");
+        public Criteria andSubtitleNotIn(List<String> values) {
+            addCriterion("subtitle not in", values, "subtitle");
             return (Criteria) this;
         }
 
-        public Criteria andCaptionBetween(String value1, String value2) {
-            addCriterion("caption between", value1, value2, "caption");
+        public Criteria andSubtitleBetween(String value1, String value2) {
+            addCriterion("subtitle between", value1, value2, "subtitle");
             return (Criteria) this;
         }
 
-        public Criteria andCaptionNotBetween(String value1, String value2) {
-            addCriterion("caption not between", value1, value2, "caption");
+        public Criteria andSubtitleNotBetween(String value1, String value2) {
+            addCriterion("subtitle not between", value1, value2, "subtitle");
             return (Criteria) this;
         }
 

+ 17 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/vo/AdBaseVideoParam.java

@@ -0,0 +1,17 @@
+package com.tzld.piaoquan.tencentad.model.vo;
+
+import lombok.Data;
+import lombok.ToString;
+
+import java.util.List;
+
+@Data
+@ToString
+public class AdBaseVideoParam {
+
+    private Long id;
+
+    private Integer status;
+
+
+}

+ 18 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/vo/AdBaseVideoStatusVo.java

@@ -0,0 +1,18 @@
+package com.tzld.piaoquan.tencentad.model.vo;
+
+import lombok.Data;
+import lombok.ToString;
+
+@Data
+@ToString
+public class AdBaseVideoStatusVo {
+
+    private Integer status;
+
+    private String name;
+
+    public AdBaseVideoStatusVo(Integer status, String name) {
+        this.status = status;
+        this.name = name;
+    }
+}

+ 27 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/vo/AdBaseVideoVo.java

@@ -0,0 +1,27 @@
+package com.tzld.piaoquan.tencentad.model.vo;
+
+import lombok.Data;
+import lombok.ToString;
+
+@Data
+@ToString
+public class AdBaseVideoVo {
+
+    private Long id;
+
+    private Long videoId;
+
+    private String videoPath;
+
+    private String videoCover;
+
+    private String category;
+
+    private Integer status;
+
+    private String statusName;
+
+    private String createTime;
+
+    private String updateTime;
+}

+ 7 - 1
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/vo/AdCreativeParam.java

@@ -9,7 +9,13 @@ import java.util.List;
 @ToString
 public class AdCreativeParam {
 
+    private Integer accountId;
+
+    private Long adGroupId;
+
     private Long adVideoId;
 
-    private List<Long> adMuseTaskIds;
+    private String adGroupName;
+
+    private List<Long> adMuseIds;
 }

+ 27 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/vo/AdCreativeVo.java

@@ -0,0 +1,27 @@
+package com.tzld.piaoquan.tencentad.model.vo;
+
+import lombok.Data;
+import lombok.ToString;
+
+import java.util.List;
+
+@Data
+@ToString
+public class AdCreativeVo {
+
+    private Long id;
+
+    private Integer accountId;
+
+    private Long adGroupId;
+
+    private String adGroupName;
+
+    private Long adVideoId;
+
+    private Long dynamicCreativeId;
+
+    private String createTime;
+
+    private String updateTime;
+}

+ 9 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/vo/AdGroupVo.java

@@ -0,0 +1,9 @@
+package com.tzld.piaoquan.tencentad.model.vo;
+
+import lombok.Data;
+import lombok.ToString;
+
+@Data
+@ToString
+public class AdGroupVo {
+}

+ 18 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/vo/AdVideoImageStatusVo.java

@@ -0,0 +1,18 @@
+package com.tzld.piaoquan.tencentad.model.vo;
+
+import lombok.Data;
+import lombok.ToString;
+
+@Data
+@ToString
+public class AdVideoImageStatusVo {
+
+    private Integer status;
+
+    private String name;
+
+    public AdVideoImageStatusVo(Integer status, String name) {
+        this.status = status;
+        this.name = name;
+    }
+}

+ 2 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/vo/AdVideoImageVo.java

@@ -23,6 +23,8 @@ public class AdVideoImageVo {
 
     private String dimensionSize;
 
+    private String dimensionSizeName;
+
     private String text2imgDesc;
 
     private String createTime;

+ 18 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/vo/AdVideoMuseStatusVo.java

@@ -0,0 +1,18 @@
+package com.tzld.piaoquan.tencentad.model.vo;
+
+import lombok.Data;
+import lombok.ToString;
+
+@Data
+@ToString
+public class AdVideoMuseStatusVo {
+
+    private Integer status;
+
+    private String name;
+
+    public AdVideoMuseStatusVo(Integer status, String name) {
+        this.status = status;
+        this.name = name;
+    }
+}

+ 6 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/vo/AdVideoParam.java

@@ -11,4 +11,10 @@ public class AdVideoParam {
 
     private Integer status;
 
+    private String accountId;
+
+    private String description;
+
+    private String subtitle;
+
 }

+ 18 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/vo/AdVideoStatusVo.java

@@ -0,0 +1,18 @@
+package com.tzld.piaoquan.tencentad.model.vo;
+
+import lombok.Data;
+import lombok.ToString;
+
+@Data
+@ToString
+public class AdVideoStatusVo {
+
+    private Integer status;
+
+    private String name;
+
+    public AdVideoStatusVo(Integer status, String name) {
+        this.status = status;
+        this.name = name;
+    }
+}

+ 18 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/vo/DimensionSizeVo.java

@@ -0,0 +1,18 @@
+package com.tzld.piaoquan.tencentad.model.vo;
+
+import lombok.Data;
+import lombok.ToString;
+
+@Data
+@ToString
+public class DimensionSizeVo {
+
+    private String size;
+
+    private String desc;
+
+    public DimensionSizeVo(String size, String desc) {
+        this.size = size;
+        this.desc = desc;
+    }
+}

+ 18 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/vo/SimilarityCodeVo.java

@@ -0,0 +1,18 @@
+package com.tzld.piaoquan.tencentad.model.vo;
+
+import lombok.Data;
+import lombok.ToString;
+
+@Data
+@ToString
+public class SimilarityCodeVo {
+
+    private Integer code;
+
+    private String desc;
+
+    public SimilarityCodeVo(Integer code, String desc) {
+        this.code = code;
+        this.desc = desc;
+    }
+}

+ 19 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/AdBaseVideoService.java

@@ -0,0 +1,19 @@
+package com.tzld.piaoquan.tencentad.service;
+
+import com.tzld.piaoquan.tencentad.common.base.CommonResponse;
+import com.tzld.piaoquan.tencentad.model.vo.AdBaseVideoParam;
+import com.tzld.piaoquan.tencentad.model.vo.AdBaseVideoVo;
+import com.tzld.piaoquan.tencentad.utils.page.Page;
+
+import java.util.List;
+
+public interface AdBaseVideoService {
+
+    CommonResponse<Void> addAdBaseVideo(List<AdBaseVideoVo> baseVideoList);
+
+    CommonResponse<Page<AdBaseVideoVo>> getAdBaseVideo(Integer pageNum, Integer pageSize, List<Integer> status, String category);
+
+    CommonResponse<Void> firstVerifyAdBaseVideo(AdBaseVideoParam adBaseVideoParam);
+
+    CommonResponse<Void> secondVerifyAdBaseVideo(AdBaseVideoParam adBaseVideoParam);
+}

+ 2 - 1
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/AdCreativeService.java

@@ -6,5 +6,6 @@ import java.util.List;
 
 public interface AdCreativeService {
 
-    boolean addAdCreative(AdVideo adVideo, List<Long> mediaIds, Long adgroupId, String accountId);
+    boolean addAdCreative(AdVideo adVideo, List<Long> mediaIds, Long adgroupId, Integer accountId,
+                          String adGroupName, List<Long> adMuseIds);
 }

+ 4 - 1
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/AdMuseTaskService.java

@@ -6,6 +6,7 @@ import com.tzld.piaoquan.tencentad.model.po.AdVideoImage;
 import com.tzld.piaoquan.tencentad.model.vo.AdMuseImageParam;
 import com.tzld.piaoquan.tencentad.model.vo.AdMuseImageVo;
 import com.tzld.piaoquan.tencentad.model.vo.AdVideoImageVo;
+import org.springframework.web.multipart.MultipartFile;
 
 import java.util.List;
 
@@ -23,5 +24,7 @@ public interface AdMuseTaskService {
 
     CommonResponse<List<AdMuseImageVo>> getAdMuseImageVoList(Long adVideoId);
 
-    CommonResponse<Void> verifyMuseTask(AdMuseImageParam adMuseImageParam);
+    CommonResponse<Void> updateMuseTask(AdMuseImageParam adMuseImageParam);
+
+    CommonResponse<Void> uploadMuseImage(MultipartFile file, Long id);
 }

+ 2 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/AdVideoImageService.java

@@ -5,6 +5,7 @@ import com.tzld.piaoquan.tencentad.model.po.AdVideoImage;
 import com.tzld.piaoquan.tencentad.model.vo.AdVideoImageParam;
 import com.tzld.piaoquan.tencentad.model.vo.AdVideoImageVo;
 import com.tzld.piaoquan.tencentad.model.vo.AdVideoParam;
+import org.springframework.web.multipart.MultipartFile;
 
 import java.util.List;
 
@@ -23,4 +24,5 @@ public interface AdVideoImageService {
     long selectCount(Long adVideoId, Integer status);
 
 
+    CommonResponse<Void> uploadMuseImage(MultipartFile file, Long adVideoId);
 }

+ 5 - 2
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/AdVideoService.java

@@ -1,6 +1,7 @@
 package com.tzld.piaoquan.tencentad.service;
 
 import com.tzld.piaoquan.tencentad.common.base.CommonResponse;
+import com.tzld.piaoquan.tencentad.model.po.AdBaseVideo;
 import com.tzld.piaoquan.tencentad.model.po.AdVideo;
 import com.tzld.piaoquan.tencentad.model.vo.AdCreativeParam;
 import com.tzld.piaoquan.tencentad.model.vo.AdVideoParam;
@@ -11,13 +12,15 @@ import java.util.List;
 
 public interface AdVideoService {
 
-    CommonResponse<Page<AdVideoVo>> getAdVideoList(Integer pageNum, Integer pageSize);
+    void addAdVideo(AdBaseVideo adBaseVideo);
+
+    CommonResponse<Page<AdVideoVo>> getAdVideoList(Integer pageNum, Integer pageSize, List<Integer> status);
 
     void buildVideoImage(AdVideo adVideo);
 
     CommonResponse<Void> createAdCreative(AdCreativeParam adCreativeParam);
 
-    CommonResponse<Void> verifyAdVideo(AdVideoParam adVideoParam);
+    CommonResponse<Void> updateAdVideo(AdVideoParam adVideoParam);
 
     void refreshMuseTaskStatus();
 }

+ 16 - 2
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/impl/AdAccountServiceImpl.java

@@ -1,16 +1,30 @@
 package com.tzld.piaoquan.tencentad.service.impl;
 
+import com.tzld.piaoquan.tencentad.component.HttpPoolClient;
 import com.tzld.piaoquan.tencentad.service.AdAccountService;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+@Slf4j
 @Service
 public class AdAccountServiceImpl implements AdAccountService {
 
+    @Autowired
+    private HttpPoolClient httpPoolClient;
 
     @Override
     public String getAccessToken(String accountId) {
-        if ("44981456".equals(accountId)) {
-            return "2e4d37f5da9f441bbc54b03ec7d89eb7";
+
+        String url = String.format("https://api.piaoquantv.com/ad/put/tencent/getAccessToken?accountId=%s", accountId);
+        try {
+            String accessToken = httpPoolClient.get(url);
+            if (StringUtils.isNotEmpty(accessToken)) {
+                return accessToken;
+            }
+        } catch (Exception e) {
+            log.error("getAccessToken error", e);
         }
         return null;
     }

+ 138 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/impl/AdBaseVideoServiceImpl.java

@@ -0,0 +1,138 @@
+package com.tzld.piaoquan.tencentad.service.impl;
+
+import com.tzld.piaoquan.tencentad.common.base.CommonResponse;
+import com.tzld.piaoquan.tencentad.common.base.ExceptionCodeEnum;
+import com.tzld.piaoquan.tencentad.common.enums.AdBaseVideoStatusEnum;
+import com.tzld.piaoquan.tencentad.dao.mapper.AdBaseVideoMapper;
+import com.tzld.piaoquan.tencentad.model.po.AdBaseVideo;
+import com.tzld.piaoquan.tencentad.model.po.AdBaseVideoExample;
+import com.tzld.piaoquan.tencentad.model.vo.AdBaseVideoParam;
+import com.tzld.piaoquan.tencentad.model.vo.AdBaseVideoVo;
+import com.tzld.piaoquan.tencentad.service.AdBaseVideoService;
+import com.tzld.piaoquan.tencentad.service.AdVideoService;
+import com.tzld.piaoquan.tencentad.utils.DateUtils;
+import com.tzld.piaoquan.tencentad.utils.page.Page;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Objects;
+
+@Service
+public class AdBaseVideoServiceImpl implements AdBaseVideoService {
+
+    @Autowired
+    private AdBaseVideoMapper adBaseVideoMapper;
+
+    @Autowired
+    private AdVideoService adVideoService;
+
+
+    @Override
+    public CommonResponse<Void> addAdBaseVideo(List<AdBaseVideoVo> baseVideoList) {
+        if (CollectionUtils.isEmpty(baseVideoList)) {
+            return CommonResponse.create(ExceptionCodeEnum.PARAM_ERROR.getCode(), "参数错误,添加列表不能为空");
+        }
+        for (AdBaseVideoVo adBaseVideoVo : baseVideoList) {
+            AdBaseVideo adBaseVideo = new AdBaseVideo();
+            BeanUtils.copyProperties(adBaseVideoVo, adBaseVideo);
+            adBaseVideoMapper.insertSelective(adBaseVideo);
+        }
+        return CommonResponse.success();
+    }
+
+    @Override
+    public CommonResponse<Page<AdBaseVideoVo>> getAdBaseVideo(Integer pageNum, Integer pageSize,
+                                                              List<Integer> status, String category) {
+        Page<AdBaseVideoVo> page = new Page<>();
+        page.setCurrentPage(pageNum);
+        page.setPageSize(pageSize);
+        AdBaseVideoExample example = new AdBaseVideoExample();
+        AdBaseVideoExample.Criteria criteria = example.createCriteria();
+        if (status != null) {
+            criteria.andStatusIn(status);
+        }
+        if (StringUtils.isNotEmpty(category)) {
+            criteria.andCategoryLike(category);
+        }
+        example.setOrderByClause("create_time desc");
+        example.setPage(page);
+        long total = adBaseVideoMapper.countByExample(example);
+        page.setTotalSize((int) total);
+        List<AdBaseVideo> adBaseVideos = adBaseVideoMapper.selectByExample(example);
+        if (CollectionUtils.isEmpty(adBaseVideos)) {
+            return CommonResponse.success(page);
+        }
+        List<AdBaseVideoVo> adBaseVideoVos = new ArrayList<>();
+        for (AdBaseVideo adBaseVideo : adBaseVideos) {
+            AdBaseVideoVo adBaseVideoVo = new AdBaseVideoVo();
+            BeanUtils.copyProperties(adBaseVideo, adBaseVideoVo);
+            AdBaseVideoStatusEnum adBaseVideoStatusEnum = AdBaseVideoStatusEnum.getByStatus(adBaseVideo.getStatus());
+            if (adBaseVideoStatusEnum != null) {
+                adBaseVideoVo.setStatusName(adBaseVideoStatusEnum.getDesc());
+            }
+            adBaseVideoVo.setCreateTime(DateUtils.getDateString(adBaseVideo.getCreateTime().getTime(), "yyyy-MM-dd HH:mm:ss"));
+            adBaseVideoVo.setUpdateTime(DateUtils.getDateString(adBaseVideo.getUpdateTime().getTime(), "yyyy-MM-dd HH:mm:ss"));
+            adBaseVideoVos.add(adBaseVideoVo);
+        }
+        page.setObjs(adBaseVideoVos);
+        return CommonResponse.success(page);
+    }
+
+    @Override
+    public CommonResponse<Void> firstVerifyAdBaseVideo(AdBaseVideoParam adBaseVideoParam) {
+        if (adBaseVideoParam == null || adBaseVideoParam.getId() == null || adBaseVideoParam.getStatus() == null) {
+            return CommonResponse.create(ExceptionCodeEnum.PARAM_ERROR.getCode(), "参数错误");
+        }
+        List<Integer> allowStatus =
+                Arrays.asList(AdBaseVideoStatusEnum.FIRST_VERIFY_SUCCESS.getStatus(), AdBaseVideoStatusEnum.FIRST_VERIFY_FAIL.getStatus());
+        if (!allowStatus.contains(adBaseVideoParam.getStatus())) {
+            return CommonResponse.create(ExceptionCodeEnum.PARAM_ERROR.getCode(), "参数错误,不允许修改为当前状态");
+        }
+        AdBaseVideo adBaseVideo = adBaseVideoMapper.selectByPrimaryKey(adBaseVideoParam.getId());
+        if (adBaseVideo == null) {
+            return CommonResponse.create(ExceptionCodeEnum.PARAM_ERROR.getCode(), "参数错误,该视频不存在");
+        }
+        if (!Objects.equals(adBaseVideo.getStatus(), AdBaseVideoStatusEnum.DEFAULT.getStatus())) {
+            return CommonResponse.create(ExceptionCodeEnum.SYS_ERROR.getCode(), "该状态不允许修改审核状态");
+        }
+        updateAdBaseVideoStatus(adBaseVideoParam.getId(), adBaseVideoParam.getStatus());
+        return CommonResponse.success();
+    }
+
+    @Override
+    public CommonResponse<Void> secondVerifyAdBaseVideo(AdBaseVideoParam adBaseVideoParam) {
+        if (adBaseVideoParam == null || adBaseVideoParam.getId() == null || adBaseVideoParam.getStatus() == null) {
+            return CommonResponse.create(ExceptionCodeEnum.PARAM_ERROR.getCode(), "参数错误");
+        }
+        List<Integer> allowStatus =
+                Arrays.asList(AdBaseVideoStatusEnum.SECOND_VERIFY_SUCCESS.getStatus(), AdBaseVideoStatusEnum.SECOND_VERIFY_FAIL.getStatus());
+        if (!allowStatus.contains(adBaseVideoParam.getStatus())) {
+            return CommonResponse.create(ExceptionCodeEnum.PARAM_ERROR.getCode(), "参数错误,不允许修改为当前状态");
+        }
+        AdBaseVideo adBaseVideo = adBaseVideoMapper.selectByPrimaryKey(adBaseVideoParam.getId());
+        if (adBaseVideo == null) {
+            return CommonResponse.create(ExceptionCodeEnum.PARAM_ERROR.getCode(), "参数错误,该视频不存在");
+        }
+        if (!Objects.equals(adBaseVideo.getStatus(), AdBaseVideoStatusEnum.FIRST_VERIFY_SUCCESS.getStatus())) {
+            return CommonResponse.create(ExceptionCodeEnum.SYS_ERROR.getCode(), "该状态不允许修改审核状态");
+        }
+        updateAdBaseVideoStatus(adBaseVideoParam.getId(), adBaseVideoParam.getStatus());
+        if (Objects.equals(AdBaseVideoStatusEnum.SECOND_VERIFY_SUCCESS.getStatus(), adBaseVideoParam.getStatus())) {
+            adVideoService.addAdVideo(adBaseVideo);
+        }
+        return CommonResponse.success();
+    }
+
+    private void updateAdBaseVideoStatus(Long id, Integer status) {
+        AdBaseVideo updateAdBaseVideo = new AdBaseVideo();
+        updateAdBaseVideo.setId(id);
+        updateAdBaseVideo.setStatus(status);
+        adBaseVideoMapper.updateByPrimaryKeySelective(updateAdBaseVideo);
+    }
+}

+ 22 - 7
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/impl/AdCreativeServiceImpl.java

@@ -4,7 +4,9 @@ import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.tzld.piaoquan.tencentad.component.HttpPoolClient;
 import com.tzld.piaoquan.tencentad.dao.mapper.AdCreativeMapper;
+import com.tzld.piaoquan.tencentad.dao.mapper.AdGroupMapper;
 import com.tzld.piaoquan.tencentad.model.po.AdCreative;
+import com.tzld.piaoquan.tencentad.model.po.AdGroup;
 import com.tzld.piaoquan.tencentad.model.po.AdVideo;
 import com.tzld.piaoquan.tencentad.model.vo.AdPutFlowParam;
 import com.tzld.piaoquan.tencentad.service.AdAccountService;
@@ -15,9 +17,11 @@ import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.io.IOException;
 import java.net.URLDecoder;
-import java.util.*;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
 
 @Slf4j
 @Service
@@ -32,8 +36,12 @@ public class AdCreativeServiceImpl implements AdCreativeService {
     @Autowired
     private AdCreativeMapper adCreativeMapper;
 
+    @Autowired
+    private AdGroupMapper adGroupMapper;
+
 
-    public boolean addAdCreative(AdVideo adVideo, List<Long> mediaIds, Long adgroupId, String accountId) {
+    public boolean addAdCreative(AdVideo adVideo, List<Long> mediaIds, Long adgroupId, Integer accountId,
+                                 String adGroupName, List<Long> adMuseIds) {
 
         JSONObject param = new JSONObject();
 
@@ -43,7 +51,7 @@ public class AdCreativeServiceImpl implements AdCreativeService {
         }
         String rootSourceId = getRootSourceId(page);
 
-        param.put("account_id", Integer.parseInt(accountId));
+        param.put("account_id", accountId);
         param.put("adgroup_id", adgroupId);
         param.put("delivery_mode", "DELIVERY_MODE_COMPONENT");
         param.put("dynamic_creative_type", "DYNAMIC_CREATIVE_TYPE_PROGRAM");
@@ -54,7 +62,7 @@ public class AdCreativeServiceImpl implements AdCreativeService {
         JSONArray descriptions = new JSONArray();
         JSONObject description1 = new JSONObject();
         JSONObject descriptionValue = new JSONObject();
-        descriptionValue.put("content", adVideo.getCopywriter());
+        descriptionValue.put("content", adVideo.getDescription());
         description1.put("value", descriptionValue);
         descriptions.add(description1);
         creativeComponents.put("description", descriptions);
@@ -95,7 +103,7 @@ public class AdCreativeServiceImpl implements AdCreativeService {
         creativeComponents.put("main_jump_info", mainJumpInfo);
         param.put("creative_components", creativeComponents);
 
-        String accessToken = adAccountService.getAccessToken(accountId);
+        String accessToken = adAccountService.getAccessToken(String.valueOf(accountId));
         Long timestamp = System.currentTimeMillis() / 1000;
         System.out.println(JSONObject.toJSONString(param));
 
@@ -108,10 +116,16 @@ public class AdCreativeServiceImpl implements AdCreativeService {
             if (jsonObject != null && jsonObject.getInteger("code") == 0) {
                 JSONObject data = jsonObject.getJSONObject("data");
                 Long dynamicCreativeId = data.getLong("dynamic_creative_id");
+                AdGroup adGroup = new AdGroup();
+                adGroup.setAccountId(String.valueOf(accountId));
+                adGroup.setAdgroupId(adgroupId);
+                adGroup.setAdgroupName(adGroupName);
+                adGroupMapper.insertSelective(adGroup);
                 AdCreative adCreative = new AdCreative();
-                adCreative.setAdId(adVideo.getAdGroupId());
+                adCreative.setAdGroupId(adGroup.getId());
                 adCreative.setAdVideoId(adVideo.getId());
                 adCreative.setDynamicCreativeId(dynamicCreativeId);
+                adCreative.setMuseIds(JSONObject.toJSONString(adMuseIds));
                 adCreativeMapper.insertSelective(adCreative);
                 return true;
             }
@@ -141,6 +155,7 @@ public class AdCreativeServiceImpl implements AdCreativeService {
         String decode = URLDecoder.decode(page);
         return decode.split("rootSourceId=")[1].split("&")[0];
     }
+
     private String insertPage(Long videoId, String remark) {
         AdPutFlowParam param = new AdPutFlowParam();
         param.setChannel("tencent");

+ 3 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/impl/AdGroupServiceImpl.java

@@ -14,6 +14,9 @@ public class AdGroupServiceImpl implements AdGroupService {
     private AdGroupMapper adGroupMapper;
 
     public AdGroup getAdGroupById(Long adGroupId) {
+        if (adGroupId == null) {
+            return null;
+        }
         return adGroupMapper.selectByPrimaryKey(adGroupId);
     }
 }

+ 43 - 5
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/impl/AdMuseTaskServiceImpl.java

@@ -17,6 +17,7 @@ import com.tzld.piaoquan.tencentad.model.vo.AdMuseImageParam;
 import com.tzld.piaoquan.tencentad.model.vo.AdMuseImageVo;
 import com.tzld.piaoquan.tencentad.service.AdAccountService;
 import com.tzld.piaoquan.tencentad.service.AdMuseTaskService;
+import com.tzld.piaoquan.tencentad.utils.DateUtils;
 import com.tzld.piaoquan.tencentad.utils.ImageUtils;
 import com.tzld.piaoquan.tencentad.utils.OSSUploader;
 import lombok.extern.slf4j.Slf4j;
@@ -26,8 +27,11 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
+import org.springframework.web.multipart.MultipartFile;
 
 import java.awt.*;
+import java.io.File;
+import java.io.IOException;
 import java.util.*;
 import java.util.List;
 
@@ -177,6 +181,7 @@ public class AdMuseTaskServiceImpl implements AdMuseTaskService {
     @Override
     public CommonResponse<List<AdMuseImageVo>> getAdMuseImageVoList(Long adVideoId) {
         AdMuseTaskExample example = new AdMuseTaskExample();
+        example.createCriteria().andAdVideoIdEqualTo(adVideoId);
         List<AdMuseTask> adMuseTasks = adMuseTaskMapper.selectByExample(example);
         List<AdMuseImageVo> res = new ArrayList<>();
         if (CollectionUtils.isEmpty(adMuseTasks)) {
@@ -189,13 +194,15 @@ public class AdMuseTaskServiceImpl implements AdMuseTaskService {
             if (adMuseTaskStatusEnum != null) {
                 adMuseImageVo.setStatusName(adMuseTaskStatusEnum.getDesc());
             }
+            adMuseImageVo.setCreateTime(DateUtils.getDateString(adMuseTask.getCreateTime().getTime(), "yyyy-MM-dd HH:mm:ss"));
+            adMuseImageVo.setUpdateTime(DateUtils.getDateString(adMuseTask.getUpdateTime().getTime(), "yyyy-MM-dd HH:mm:ss"));
             res.add(adMuseImageVo);
         }
         return CommonResponse.success(res);
     }
 
 
-    public CommonResponse<Void> verifyMuseTask(AdMuseImageParam adMuseImageParam) {
+    public CommonResponse<Void> updateMuseTask(AdMuseImageParam adMuseImageParam) {
         if (adMuseImageParam == null || adMuseImageParam.getId() == null || adMuseImageParam.getStatus() == null) {
             return CommonResponse.create(ExceptionCodeEnum.PARAM_ERROR.getCode(), "参数错误");
         }
@@ -214,11 +221,9 @@ public class AdMuseTaskServiceImpl implements AdMuseTaskService {
         adMuseTaskMapper.updateByPrimaryKeySelective(adMuseTask);
         if (AdMuseTaskStatusEnum.VERIFY_SUCCESS.getStatus().equals(adMuseImageParam.getStatus())) {
             AdVideo adVideo = adVideoMapper.selectByPrimaryKey(adMuseTask.getAdVideoId());
-            AdGroup adGroup = adGroupMapper.selectByPrimaryKey(adVideo.getAdGroupId());
-            String accountId = adGroup.getAccountId();
-            String accessToken = accountService.getAccessToken(accountId);
+            String accessToken = accountService.getAccessToken(adVideo.getAccountId());
             String url = StringUtils.isEmpty(adMuseTask.getFinalUrl()) ? adMuseTask.getStitchUrl() : adMuseTask.getFinalUrl();
-            Long mediaId = uploadImage(accountId, accessToken, url, adMuseTask.getMuseMaterialId());
+            Long mediaId = uploadImage(adVideo.getAccountId(), accessToken, url, adMuseTask.getMuseMaterialId());
             if (mediaId != null) {
                 adMuseTask.setMediaId(mediaId);
                 adMuseTask.setStatus(AdMuseTaskStatusEnum.UPLOAD_SUCCESS.getStatus());
@@ -235,6 +240,39 @@ public class AdMuseTaskServiceImpl implements AdMuseTaskService {
         return CommonResponse.success();
     }
 
+    @Override
+    public CommonResponse<Void> uploadMuseImage(MultipartFile file, Long id) {
+        if (id == null) {
+            return CommonResponse.create(ExceptionCodeEnum.PARAM_ERROR.getCode(), "参数错误,id不能为空");
+        }
+        // 创建上传目录
+        String fileName = file.getOriginalFilename();
+        if (fileName == null) {
+            return CommonResponse.create(ExceptionCodeEnum.PARAM_ERROR.getCode(), "参数错误,文件名无效");
+        }
+        File uploadDir = new File(imagePath);
+        if (!uploadDir.exists()) {
+            uploadDir.mkdirs(); // 创建目录
+        }
+        String path = imagePath + "/" + fileName;
+        // 保存文件
+        File destinationFile = new File(uploadDir, fileName);
+        try {
+            file.transferTo(destinationFile);
+        } catch (IOException e) {
+            return CommonResponse.create(ExceptionCodeEnum.SYS_ERROR.getCode(), "系统异常,上传失败");
+        }
+        String url = OSSUploader.uploadToOSS(path);
+        if (StringUtils.isNotEmpty(url)) {
+            AdMuseTask updateAdMuseTask = new AdMuseTask();
+            updateAdMuseTask.setId(id);
+            updateAdMuseTask.setFinalUrl(url);
+            adMuseTaskMapper.updateByPrimaryKeySelective(updateAdMuseTask);
+            return CommonResponse.success();
+        }
+        return CommonResponse.create(ExceptionCodeEnum.SYS_ERROR.getCode(), "系统异常,上传失败");
+    }
+
     public Long uploadImage(String accountId, String accessToken, String imageUrl, Long museMaterialId) {
         try {
             long timestamp = System.currentTimeMillis() / 1000;

+ 46 - 3
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/impl/AdVideoImageServiceImpl.java

@@ -2,8 +2,8 @@ package com.tzld.piaoquan.tencentad.service.impl;
 
 import com.tzld.piaoquan.tencentad.common.base.CommonResponse;
 import com.tzld.piaoquan.tencentad.common.base.ExceptionCodeEnum;
-import com.tzld.piaoquan.tencentad.common.enums.AdMuseTaskStatusEnum;
 import com.tzld.piaoquan.tencentad.common.enums.AdVideoImageStatusEnum;
+import com.tzld.piaoquan.tencentad.common.enums.DimensionSizeEnum;
 import com.tzld.piaoquan.tencentad.common.enums.SimilarityCodeEnum;
 import com.tzld.piaoquan.tencentad.dao.mapper.AdVideoImageMapper;
 import com.tzld.piaoquan.tencentad.model.po.AdMuseTask;
@@ -11,21 +11,24 @@ import com.tzld.piaoquan.tencentad.model.po.AdVideoImage;
 import com.tzld.piaoquan.tencentad.model.po.AdVideoImageExample;
 import com.tzld.piaoquan.tencentad.model.vo.AdVideoImageParam;
 import com.tzld.piaoquan.tencentad.model.vo.AdVideoImageVo;
-import com.tzld.piaoquan.tencentad.model.vo.AdVideoParam;
 import com.tzld.piaoquan.tencentad.service.AdMuseTaskService;
 import com.tzld.piaoquan.tencentad.service.AdVideoImageService;
 import com.tzld.piaoquan.tencentad.service.TencentService;
 import com.tzld.piaoquan.tencentad.utils.DateUtils;
+import com.tzld.piaoquan.tencentad.utils.OSSUploader;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
+import org.springframework.web.multipart.MultipartFile;
 
+import java.io.File;
+import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
-import java.util.Objects;
 
 import static com.tzld.piaoquan.tencentad.common.base.ExceptionCodeEnum.PARAM_ERROR;
 
@@ -33,6 +36,9 @@ import static com.tzld.piaoquan.tencentad.common.base.ExceptionCodeEnum.PARAM_ER
 @Service
 public class AdVideoImageServiceImpl implements AdVideoImageService {
 
+    @Value("${image_path}")
+    private String imagePath;
+
     @Autowired
     private AdVideoImageMapper adVideoImageMapper;
 
@@ -71,6 +77,12 @@ public class AdVideoImageServiceImpl implements AdVideoImageService {
                     adVideoImageVo.setSimilarityName(similarityCodeEnum.getDesc());
                 }
             }
+            if (adVideoImage.getDimensionSize() != null) {
+                DimensionSizeEnum dimensionSizeEnum = DimensionSizeEnum.getBySize(adVideoImage.getDimensionSize());
+                if (dimensionSizeEnum != null) {
+                    adVideoImageVo.setDimensionSizeName(dimensionSizeEnum.getDesc());
+                }
+            }
             AdVideoImageStatusEnum adVideoImageStatusEnum = AdVideoImageStatusEnum.getByStatus(adVideoImage.getStatus());
             if (adVideoImageStatusEnum != null) {
                 adVideoImageVo.setStatusName(adVideoImageStatusEnum.getDesc());
@@ -137,5 +149,36 @@ public class AdVideoImageServiceImpl implements AdVideoImageService {
         return adVideoImageMapper.countByExample(example);
     }
 
+    @Override
+    public CommonResponse<Void> uploadMuseImage(MultipartFile file, Long adVideoId) {
+        if (adVideoId == null) {
+            return CommonResponse.create(ExceptionCodeEnum.PARAM_ERROR.getCode(), "参数错误,adVideoId不能为空");
+        }
+        // 创建上传目录
+        String fileName = file.getOriginalFilename();
+        if (fileName == null) {
+            return CommonResponse.create(ExceptionCodeEnum.PARAM_ERROR.getCode(), "参数错误,文件名无效");
+        }
+        File uploadDir = new File(imagePath);
+        if (!uploadDir.exists()) {
+            uploadDir.mkdirs(); // 创建目录
+        }
+        String path = imagePath + "/" + fileName;
+        // 保存文件
+        File destinationFile = new File(uploadDir, fileName);
+        try {
+            file.transferTo(destinationFile);
+        } catch (IOException e) {
+            return CommonResponse.create(ExceptionCodeEnum.SYS_ERROR.getCode(), "系统异常,上传失败");
+        }
+        String url = OSSUploader.uploadToOSS(path);
+        if (StringUtils.isNotEmpty(url)) {
+            if (addAdVideoImage(adVideoId, url)) {
+                return CommonResponse.success();
+            }
+        }
+        return CommonResponse.create(ExceptionCodeEnum.SYS_ERROR.getCode(), "系统异常,上传失败");
+    }
+
 
 }

+ 37 - 24
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/impl/AdVideoServiceImpl.java

@@ -55,14 +55,26 @@ public class AdVideoServiceImpl implements AdVideoService {
     @Autowired
     private AdCreativeService adCreativeService;
 
+    public void addAdVideo(AdBaseVideo adBaseVideo) {
+        AdVideo adVideo = new AdVideo();
+        adVideo.setVideoId(adBaseVideo.getVideoId());
+        adVideo.setVideoPath(adBaseVideo.getVideoPath());
+        adVideo.setVideoCover(adBaseVideo.getVideoCover());
+        adVideo.setCategory(adBaseVideo.getCategory());
+        adVideoMapper.insertSelective(adVideo);
+        buildVideoImage(adVideo);
+    }
+
 
     @Override
-    public CommonResponse<Page<AdVideoVo>> getAdVideoList(Integer pageNum, Integer pageSize) {
+    public CommonResponse<Page<AdVideoVo>> getAdVideoList(Integer pageNum, Integer pageSize, List<Integer> status) {
         Page<AdVideoVo> page = new Page<>();
         page.setCurrentPage(pageNum);
         page.setPageSize(pageSize);
         AdVideoExample example = new AdVideoExample();
-        example.createCriteria().andStatusNotEqualTo(0);
+        if (!CollectionUtils.isEmpty(status)) {
+            example.createCriteria().andStatusIn(status);
+        }
         example.setOrderByClause("create_time desc");
         example.setPage(page);
         List<AdVideo> adVideos = adVideoMapper.selectByExample(example);
@@ -85,6 +97,7 @@ public class AdVideoServiceImpl implements AdVideoService {
         return CommonResponse.success(page);
     }
 
+    @Override
     public CommonResponse<Void> createAdCreative(AdCreativeParam adCreativeParam) {
         if (adCreativeParam == null || adCreativeParam.getAdVideoId() == null) {
             return CommonResponse.create(ExceptionCodeEnum.PARAM_ERROR.getCode(), "参数错误");
@@ -97,22 +110,19 @@ public class AdVideoServiceImpl implements AdVideoService {
             return CommonResponse.create(ExceptionCodeEnum.PARAM_ERROR.getCode(), "参数错误,当前状态不允许创建创意");
         }
         List<AdMuseTask> adMuseTask;
-        if (CollectionUtils.isEmpty(adCreativeParam.getAdMuseTaskIds())) {
+        if (CollectionUtils.isEmpty(adCreativeParam.getAdMuseIds())) {
             adMuseTask = adMuseTaskService.getAdMuseTask(adCreativeParam.getAdVideoId(),
                     AdMuseTaskStatusEnum.UPLOAD_SUCCESS.getStatus());
         } else {
             adMuseTask = adMuseTaskService.getAdMuseTask(adCreativeParam.getAdVideoId(),
-                    AdMuseTaskStatusEnum.UPLOAD_SUCCESS.getStatus(), adCreativeParam.getAdMuseTaskIds());
+                    AdMuseTaskStatusEnum.UPLOAD_SUCCESS.getStatus(), adCreativeParam.getAdMuseIds());
         }
         if (CollectionUtils.isEmpty(adMuseTask)) {
             return CommonResponse.create(ExceptionCodeEnum.SYS_ERROR.getCode(), "系统错误,当前没有可以创建创意的素材");
         }
         List<Long> mediaIds = adMuseTask.stream().map(AdMuseTask::getMediaId).collect(Collectors.toList());
-        AdGroup adGroup = adGroupService.getAdGroupById(adVideo.getAdGroupId());
-        if (adGroup == null) {
-            return CommonResponse.create(ExceptionCodeEnum.SYS_ERROR.getCode(), "系统错误,当前广告组不存在");
-        }
-        boolean res = adCreativeService.addAdCreative(adVideo, mediaIds, adGroup.getAdgroupId(), adGroup.getAccountId());
+        boolean res = adCreativeService.addAdCreative(adVideo, mediaIds, adCreativeParam.getAdGroupId(),
+                adCreativeParam.getAccountId(), adCreativeParam.getAdGroupName(), adCreativeParam.getAdMuseIds());
         if (res) {
             return CommonResponse.success();
         } else {
@@ -178,7 +188,7 @@ public class AdVideoServiceImpl implements AdVideoService {
     }
 
     @Override
-    public CommonResponse<Void> verifyAdVideo(AdVideoParam adVideoParam) {
+    public CommonResponse<Void> updateAdVideo(AdVideoParam adVideoParam) {
         if (adVideoParam == null || adVideoParam.getId() == null || adVideoParam.getStatus() == null) {
             return CommonResponse.create(ExceptionCodeEnum.PARAM_ERROR.getCode(), "参数错误");
         }
@@ -194,26 +204,33 @@ public class AdVideoServiceImpl implements AdVideoService {
         if (!Objects.equals(adVideo.getStatus(), AdVideoStatusEnum.CROP_SUCCESS.getStatus())) {
             return CommonResponse.create(ExceptionCodeEnum.SYS_ERROR.getCode(), "该状态不允许修改审核状态");
         }
-        updateAdVideoStatus(adVideoParam.getId(), adVideoParam.getStatus());
         if (Objects.equals(adVideoParam.getStatus(), AdVideoStatusEnum.VERIFY_SUCCESS.getStatus())) {
+            long count = adVideoImageService.selectCount(adVideoParam.getId(), AdVideoImageStatusEnum.VERIFY_SUCCESS.getStatus());
+            if (count <= 0) {
+                return CommonResponse.create(ExceptionCodeEnum.SYS_ERROR.getCode(), "没有审核通过的图片,不允许审核通过");
+            }
+            AdVideo updateAdVideo = new AdVideo();
+            updateAdVideo.setId(adVideoParam.getId());
+            updateAdVideo.setStatus(adVideoParam.getStatus());
+            updateAdVideo.setAccountId(adVideoParam.getAccountId());
+            updateAdVideo.setDescription(adVideoParam.getDescription());
+            updateAdVideo.setSubtitle(adVideoParam.getSubtitle());
+            adVideoMapper.updateByPrimaryKeySelective(updateAdVideo);
             //可以改成异步操作
             uploadImageToTencent(adVideo);
-
+        } else {
+            updateAdVideoStatus(adVideoParam.getId(), adVideoParam.getStatus());
         }
         return CommonResponse.success();
     }
 
     private void uploadImageToTencent(AdVideo adVideo) {
-        AdGroup adGroup = adGroupService.getAdGroupById(adVideo.getAdGroupId());
-        if (adGroup == null) {
-            return;
-        }
-        String accessToken = accountService.getAccessToken(adGroup.getAccountId());
+        String accessToken = accountService.getAccessToken(adVideo.getAccountId());
         if (accessToken == null) {
             return;
         }
         Long adVideoId = adVideo.getId();
-        boolean res = adVideoImageService.uploadImageToTencent(adGroup.getAccountId(), accessToken, adVideoId);
+        boolean res = adVideoImageService.uploadImageToTencent(adVideo.getAccountId(), accessToken, adVideoId);
         if (res) {
             updateAdVideoStatus(adVideoId, AdVideoStatusEnum.UPLOAD_SUCCESS.getStatus());
         } else {
@@ -227,11 +244,7 @@ public class AdVideoServiceImpl implements AdVideoService {
         example.createCriteria().andStatusEqualTo(AdVideoStatusEnum.UPLOAD_SUCCESS.getStatus());
         List<AdVideo> adVideos = adVideoMapper.selectByExample(example);
         for (AdVideo adVideo : adVideos) {
-            AdGroup adGroup = adGroupService.getAdGroupById(adVideo.getAdGroupId());
-            if (adGroup == null) {
-                continue;
-            }
-            String accessToken = accountService.getAccessToken(adGroup.getAccountId());
+            String accessToken = accountService.getAccessToken(adVideo.getAccountId());
             if (accessToken == null) {
                 continue;
             }
@@ -243,7 +256,7 @@ public class AdVideoServiceImpl implements AdVideoService {
                 boolean flag = true;
                 List<AdMuseTask> adMuseTasks = adMuseTaskService.getAdMuseTask(adVideo.getId(), AdMuseTaskStatusEnum.DEFAULT.getStatus());
                 for (AdMuseTask adMuseTask : adMuseTasks) {
-                    boolean museTaskRes = adMuseTaskService.getMuseTaskRes(adGroup.getAccountId(), accessToken, adMuseTask, adVideo.getCaption());
+                    boolean museTaskRes = adMuseTaskService.getMuseTaskRes(adVideo.getAccountId(), accessToken, adMuseTask, adVideo.getSubtitle());
                     if (!museTaskRes) {
                         flag = false;
                     }

+ 279 - 0
tencent-ad-server/src/main/resources/mapper/AdBaseVideoMapper.xml

@@ -0,0 +1,279 @@
+<?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.tzld.piaoquan.tencentad.dao.mapper.AdBaseVideoMapper">
+  <resultMap id="BaseResultMap" type="com.tzld.piaoquan.tencentad.model.po.AdBaseVideo">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="video_id" jdbcType="BIGINT" property="videoId" />
+    <result column="video_path" jdbcType="VARCHAR" property="videoPath" />
+    <result column="video_cover" jdbcType="VARCHAR" property="videoCover" />
+    <result column="category" jdbcType="VARCHAR" property="category" />
+    <result column="status" jdbcType="INTEGER" property="status" />
+    <result column="is_delete" jdbcType="INTEGER" property="isDelete" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    id, video_id, video_path, video_cover, category, `status`, is_delete, create_time, 
+    update_time
+  </sql>
+  <select id="selectByExample" parameterType="com.tzld.piaoquan.tencentad.model.po.AdBaseVideoExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from ad_base_video
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+    <if test="page != null">
+      limit #{page.offset} , #{page.pageSize}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from ad_base_video
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from ad_base_video
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.tzld.piaoquan.tencentad.model.po.AdBaseVideoExample">
+    delete from ad_base_video
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.tzld.piaoquan.tencentad.model.po.AdBaseVideo">
+    insert into ad_base_video (id, video_id, video_path, 
+      video_cover, category, `status`, 
+      is_delete, create_time, update_time
+      )
+    values (#{id,jdbcType=BIGINT}, #{videoId,jdbcType=BIGINT}, #{videoPath,jdbcType=VARCHAR}, 
+      #{videoCover,jdbcType=VARCHAR}, #{category,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, 
+      #{isDelete,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.tzld.piaoquan.tencentad.model.po.AdBaseVideo">
+    insert into ad_base_video
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="videoId != null">
+        video_id,
+      </if>
+      <if test="videoPath != null">
+        video_path,
+      </if>
+      <if test="videoCover != null">
+        video_cover,
+      </if>
+      <if test="category != null">
+        category,
+      </if>
+      <if test="status != null">
+        `status`,
+      </if>
+      <if test="isDelete != null">
+        is_delete,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+      <if test="updateTime != null">
+        update_time,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=BIGINT},
+      </if>
+      <if test="videoId != null">
+        #{videoId,jdbcType=BIGINT},
+      </if>
+      <if test="videoPath != null">
+        #{videoPath,jdbcType=VARCHAR},
+      </if>
+      <if test="videoCover != null">
+        #{videoCover,jdbcType=VARCHAR},
+      </if>
+      <if test="category != null">
+        #{category,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        #{status,jdbcType=INTEGER},
+      </if>
+      <if test="isDelete != null">
+        #{isDelete,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.tzld.piaoquan.tencentad.model.po.AdBaseVideoExample" resultType="java.lang.Long">
+    select count(*) from ad_base_video
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update ad_base_video
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.videoId != null">
+        video_id = #{record.videoId,jdbcType=BIGINT},
+      </if>
+      <if test="record.videoPath != null">
+        video_path = #{record.videoPath,jdbcType=VARCHAR},
+      </if>
+      <if test="record.videoCover != null">
+        video_cover = #{record.videoCover,jdbcType=VARCHAR},
+      </if>
+      <if test="record.category != null">
+        category = #{record.category,jdbcType=VARCHAR},
+      </if>
+      <if test="record.status != null">
+        `status` = #{record.status,jdbcType=INTEGER},
+      </if>
+      <if test="record.isDelete != null">
+        is_delete = #{record.isDelete,jdbcType=INTEGER},
+      </if>
+      <if test="record.createTime != null">
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.updateTime != null">
+        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update ad_base_video
+    set id = #{record.id,jdbcType=BIGINT},
+      video_id = #{record.videoId,jdbcType=BIGINT},
+      video_path = #{record.videoPath,jdbcType=VARCHAR},
+      video_cover = #{record.videoCover,jdbcType=VARCHAR},
+      category = #{record.category,jdbcType=VARCHAR},
+      `status` = #{record.status,jdbcType=INTEGER},
+      is_delete = #{record.isDelete,jdbcType=INTEGER},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      update_time = #{record.updateTime,jdbcType=TIMESTAMP}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.tencentad.model.po.AdBaseVideo">
+    update ad_base_video
+    <set>
+      <if test="videoId != null">
+        video_id = #{videoId,jdbcType=BIGINT},
+      </if>
+      <if test="videoPath != null">
+        video_path = #{videoPath,jdbcType=VARCHAR},
+      </if>
+      <if test="videoCover != null">
+        video_cover = #{videoCover,jdbcType=VARCHAR},
+      </if>
+      <if test="category != null">
+        category = #{category,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        `status` = #{status,jdbcType=INTEGER},
+      </if>
+      <if test="isDelete != null">
+        is_delete = #{isDelete,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateTime != null">
+        update_time = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.tencentad.model.po.AdBaseVideo">
+    update ad_base_video
+    set video_id = #{videoId,jdbcType=BIGINT},
+      video_path = #{videoPath,jdbcType=VARCHAR},
+      video_cover = #{videoCover,jdbcType=VARCHAR},
+      category = #{category,jdbcType=VARCHAR},
+      `status` = #{status,jdbcType=INTEGER},
+      is_delete = #{isDelete,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      update_time = #{updateTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 36 - 18
tencent-ad-server/src/main/resources/mapper/AdCreativeMapper.xml

@@ -3,8 +3,9 @@
 <mapper namespace="com.tzld.piaoquan.tencentad.dao.mapper.AdCreativeMapper">
   <resultMap id="BaseResultMap" type="com.tzld.piaoquan.tencentad.model.po.AdCreative">
     <id column="id" jdbcType="BIGINT" property="id" />
-    <result column="ad_id" jdbcType="BIGINT" property="adId" />
+    <result column="ad_group_id" jdbcType="BIGINT" property="adGroupId" />
     <result column="ad_video_id" jdbcType="BIGINT" property="adVideoId" />
+    <result column="muse_ids" jdbcType="VARCHAR" property="museIds" />
     <result column="dynamic_creative_id" jdbcType="BIGINT" property="dynamicCreativeId" />
     <result column="status" jdbcType="INTEGER" property="status" />
     <result column="is_delete" jdbcType="INTEGER" property="isDelete" />
@@ -70,7 +71,8 @@
     </where>
   </sql>
   <sql id="Base_Column_List">
-    id, ad_id, ad_video_id, dynamic_creative_id, `status`, is_delete, create_time, update_time
+    id, ad_group_id, ad_video_id, muse_ids, dynamic_creative_id, `status`, is_delete, 
+    create_time, update_time
   </sql>
   <select id="selectByExample" parameterType="com.tzld.piaoquan.tencentad.model.po.AdCreativeExample" resultMap="BaseResultMap">
     select
@@ -106,12 +108,14 @@
     </if>
   </delete>
   <insert id="insert" parameterType="com.tzld.piaoquan.tencentad.model.po.AdCreative">
-    insert into ad_creative (id, ad_id, ad_video_id, 
-      dynamic_creative_id, `status`, is_delete, 
-      create_time, update_time)
-    values (#{id,jdbcType=BIGINT}, #{adId,jdbcType=BIGINT}, #{adVideoId,jdbcType=BIGINT}, 
-      #{dynamicCreativeId,jdbcType=BIGINT}, #{status,jdbcType=INTEGER}, #{isDelete,jdbcType=INTEGER}, 
-      #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
+    insert into ad_creative (id, ad_group_id, ad_video_id, 
+      muse_ids, dynamic_creative_id, `status`, 
+      is_delete, create_time, update_time
+      )
+    values (#{id,jdbcType=BIGINT}, #{adGroupId,jdbcType=BIGINT}, #{adVideoId,jdbcType=BIGINT}, 
+      #{museIds,jdbcType=VARCHAR}, #{dynamicCreativeId,jdbcType=BIGINT}, #{status,jdbcType=INTEGER}, 
+      #{isDelete,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
+      )
   </insert>
   <insert id="insertSelective" parameterType="com.tzld.piaoquan.tencentad.model.po.AdCreative">
     insert into ad_creative
@@ -119,12 +123,15 @@
       <if test="id != null">
         id,
       </if>
-      <if test="adId != null">
-        ad_id,
+      <if test="adGroupId != null">
+        ad_group_id,
       </if>
       <if test="adVideoId != null">
         ad_video_id,
       </if>
+      <if test="museIds != null">
+        muse_ids,
+      </if>
       <if test="dynamicCreativeId != null">
         dynamic_creative_id,
       </if>
@@ -145,12 +152,15 @@
       <if test="id != null">
         #{id,jdbcType=BIGINT},
       </if>
-      <if test="adId != null">
-        #{adId,jdbcType=BIGINT},
+      <if test="adGroupId != null">
+        #{adGroupId,jdbcType=BIGINT},
       </if>
       <if test="adVideoId != null">
         #{adVideoId,jdbcType=BIGINT},
       </if>
+      <if test="museIds != null">
+        #{museIds,jdbcType=VARCHAR},
+      </if>
       <if test="dynamicCreativeId != null">
         #{dynamicCreativeId,jdbcType=BIGINT},
       </if>
@@ -180,12 +190,15 @@
       <if test="record.id != null">
         id = #{record.id,jdbcType=BIGINT},
       </if>
-      <if test="record.adId != null">
-        ad_id = #{record.adId,jdbcType=BIGINT},
+      <if test="record.adGroupId != null">
+        ad_group_id = #{record.adGroupId,jdbcType=BIGINT},
       </if>
       <if test="record.adVideoId != null">
         ad_video_id = #{record.adVideoId,jdbcType=BIGINT},
       </if>
+      <if test="record.museIds != null">
+        muse_ids = #{record.museIds,jdbcType=VARCHAR},
+      </if>
       <if test="record.dynamicCreativeId != null">
         dynamic_creative_id = #{record.dynamicCreativeId,jdbcType=BIGINT},
       </if>
@@ -209,8 +222,9 @@
   <update id="updateByExample" parameterType="map">
     update ad_creative
     set id = #{record.id,jdbcType=BIGINT},
-      ad_id = #{record.adId,jdbcType=BIGINT},
+      ad_group_id = #{record.adGroupId,jdbcType=BIGINT},
       ad_video_id = #{record.adVideoId,jdbcType=BIGINT},
+      muse_ids = #{record.museIds,jdbcType=VARCHAR},
       dynamic_creative_id = #{record.dynamicCreativeId,jdbcType=BIGINT},
       `status` = #{record.status,jdbcType=INTEGER},
       is_delete = #{record.isDelete,jdbcType=INTEGER},
@@ -223,12 +237,15 @@
   <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.tencentad.model.po.AdCreative">
     update ad_creative
     <set>
-      <if test="adId != null">
-        ad_id = #{adId,jdbcType=BIGINT},
+      <if test="adGroupId != null">
+        ad_group_id = #{adGroupId,jdbcType=BIGINT},
       </if>
       <if test="adVideoId != null">
         ad_video_id = #{adVideoId,jdbcType=BIGINT},
       </if>
+      <if test="museIds != null">
+        muse_ids = #{museIds,jdbcType=VARCHAR},
+      </if>
       <if test="dynamicCreativeId != null">
         dynamic_creative_id = #{dynamicCreativeId,jdbcType=BIGINT},
       </if>
@@ -249,8 +266,9 @@
   </update>
   <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.tencentad.model.po.AdCreative">
     update ad_creative
-    set ad_id = #{adId,jdbcType=BIGINT},
+    set ad_group_id = #{adGroupId,jdbcType=BIGINT},
       ad_video_id = #{adVideoId,jdbcType=BIGINT},
+      muse_ids = #{museIds,jdbcType=VARCHAR},
       dynamic_creative_id = #{dynamicCreativeId,jdbcType=BIGINT},
       `status` = #{status,jdbcType=INTEGER},
       is_delete = #{isDelete,jdbcType=INTEGER},

+ 42 - 39
tencent-ad-server/src/main/resources/mapper/AdVideoMapper.xml

@@ -3,13 +3,13 @@
 <mapper namespace="com.tzld.piaoquan.tencentad.dao.mapper.AdVideoMapper">
   <resultMap id="BaseResultMap" type="com.tzld.piaoquan.tencentad.model.po.AdVideo">
     <id column="id" jdbcType="BIGINT" property="id" />
-    <result column="ad_group_id" jdbcType="BIGINT" property="adGroupId" />
+    <result column="account_id" jdbcType="VARCHAR" property="accountId" />
     <result column="video_id" jdbcType="BIGINT" property="videoId" />
     <result column="video_path" jdbcType="VARCHAR" property="videoPath" />
     <result column="video_cover" jdbcType="VARCHAR" property="videoCover" />
     <result column="category" jdbcType="VARCHAR" property="category" />
-    <result column="copywriter" jdbcType="VARCHAR" property="copywriter" />
-    <result column="caption" jdbcType="VARCHAR" property="caption" />
+    <result column="description" jdbcType="VARCHAR" property="description" />
+    <result column="subtitle" jdbcType="VARCHAR" property="subtitle" />
     <result column="status" jdbcType="INTEGER" property="status" />
     <result column="retry_count" jdbcType="INTEGER" property="retryCount" />
     <result column="is_delete" jdbcType="INTEGER" property="isDelete" />
@@ -75,7 +75,7 @@
     </where>
   </sql>
   <sql id="Base_Column_List">
-    id, ad_group_id, video_id, video_path, video_cover, category, copywriter, caption, 
+    id, account_id, video_id, video_path, video_cover, category, description, subtitle, 
     `status`, retry_count, is_delete, create_time, update_time
   </sql>
   <select id="selectByExample" parameterType="com.tzld.piaoquan.tencentad.model.po.AdVideoExample" resultMap="BaseResultMap">
@@ -112,25 +112,25 @@
     </if>
   </delete>
   <insert id="insert" parameterType="com.tzld.piaoquan.tencentad.model.po.AdVideo">
-    insert into ad_video (id, ad_group_id, video_id, 
+    insert into ad_video (id, account_id, video_id, 
       video_path, video_cover, category, 
-      copywriter, caption, `status`, 
+      description, subtitle, `status`, 
       retry_count, is_delete, create_time, 
       update_time)
-    values (#{id,jdbcType=BIGINT}, #{adGroupId,jdbcType=BIGINT}, #{videoId,jdbcType=BIGINT}, 
+    values (#{id,jdbcType=BIGINT}, #{accountId,jdbcType=VARCHAR}, #{videoId,jdbcType=BIGINT}, 
       #{videoPath,jdbcType=VARCHAR}, #{videoCover,jdbcType=VARCHAR}, #{category,jdbcType=VARCHAR}, 
-      #{copywriter,jdbcType=VARCHAR}, #{caption,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, 
+      #{description,jdbcType=VARCHAR}, #{subtitle,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, 
       #{retryCount,jdbcType=INTEGER}, #{isDelete,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, 
       #{updateTime,jdbcType=TIMESTAMP})
   </insert>
-  <insert id="insertSelective" parameterType="com.tzld.piaoquan.tencentad.model.po.AdVideo">
+  <insert id="insertSelective" parameterType="com.tzld.piaoquan.tencentad.model.po.AdVideo" useGeneratedKeys="true" keyProperty="id">
     insert into ad_video
     <trim prefix="(" suffix=")" suffixOverrides=",">
       <if test="id != null">
         id,
       </if>
-      <if test="adGroupId != null">
-        ad_group_id,
+      <if test="accountId != null">
+        account_id,
       </if>
       <if test="videoId != null">
         video_id,
@@ -144,11 +144,11 @@
       <if test="category != null">
         category,
       </if>
-      <if test="copywriter != null">
-        copywriter,
+      <if test="description != null">
+        description,
       </if>
-      <if test="caption != null">
-        caption,
+      <if test="subtitle != null">
+        subtitle,
       </if>
       <if test="status != null">
         `status`,
@@ -170,8 +170,8 @@
       <if test="id != null">
         #{id,jdbcType=BIGINT},
       </if>
-      <if test="adGroupId != null">
-        #{adGroupId,jdbcType=BIGINT},
+      <if test="accountId != null">
+        #{accountId,jdbcType=VARCHAR},
       </if>
       <if test="videoId != null">
         #{videoId,jdbcType=BIGINT},
@@ -185,11 +185,11 @@
       <if test="category != null">
         #{category,jdbcType=VARCHAR},
       </if>
-      <if test="copywriter != null">
-        #{copywriter,jdbcType=VARCHAR},
+      <if test="description != null">
+        #{description,jdbcType=VARCHAR},
       </if>
-      <if test="caption != null">
-        #{caption,jdbcType=VARCHAR},
+      <if test="subtitle != null">
+        #{subtitle,jdbcType=VARCHAR},
       </if>
       <if test="status != null">
         #{status,jdbcType=INTEGER},
@@ -207,6 +207,9 @@
         #{updateTime,jdbcType=TIMESTAMP},
       </if>
     </trim>
+    <selectKey resultType="java.lang.Long" order="AFTER" keyProperty="id">
+      select LAST_INSERT_ID()
+    </selectKey>
   </insert>
   <select id="countByExample" parameterType="com.tzld.piaoquan.tencentad.model.po.AdVideoExample" resultType="java.lang.Long">
     select count(*) from ad_video
@@ -220,8 +223,8 @@
       <if test="record.id != null">
         id = #{record.id,jdbcType=BIGINT},
       </if>
-      <if test="record.adGroupId != null">
-        ad_group_id = #{record.adGroupId,jdbcType=BIGINT},
+      <if test="record.accountId != null">
+        account_id = #{record.accountId,jdbcType=VARCHAR},
       </if>
       <if test="record.videoId != null">
         video_id = #{record.videoId,jdbcType=BIGINT},
@@ -235,11 +238,11 @@
       <if test="record.category != null">
         category = #{record.category,jdbcType=VARCHAR},
       </if>
-      <if test="record.copywriter != null">
-        copywriter = #{record.copywriter,jdbcType=VARCHAR},
+      <if test="record.description != null">
+        description = #{record.description,jdbcType=VARCHAR},
       </if>
-      <if test="record.caption != null">
-        caption = #{record.caption,jdbcType=VARCHAR},
+      <if test="record.subtitle != null">
+        subtitle = #{record.subtitle,jdbcType=VARCHAR},
       </if>
       <if test="record.status != null">
         `status` = #{record.status,jdbcType=INTEGER},
@@ -264,13 +267,13 @@
   <update id="updateByExample" parameterType="map">
     update ad_video
     set id = #{record.id,jdbcType=BIGINT},
-      ad_group_id = #{record.adGroupId,jdbcType=BIGINT},
+      account_id = #{record.accountId,jdbcType=VARCHAR},
       video_id = #{record.videoId,jdbcType=BIGINT},
       video_path = #{record.videoPath,jdbcType=VARCHAR},
       video_cover = #{record.videoCover,jdbcType=VARCHAR},
       category = #{record.category,jdbcType=VARCHAR},
-      copywriter = #{record.copywriter,jdbcType=VARCHAR},
-      caption = #{record.caption,jdbcType=VARCHAR},
+      description = #{record.description,jdbcType=VARCHAR},
+      subtitle = #{record.subtitle,jdbcType=VARCHAR},
       `status` = #{record.status,jdbcType=INTEGER},
       retry_count = #{record.retryCount,jdbcType=INTEGER},
       is_delete = #{record.isDelete,jdbcType=INTEGER},
@@ -283,8 +286,8 @@
   <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.tencentad.model.po.AdVideo">
     update ad_video
     <set>
-      <if test="adGroupId != null">
-        ad_group_id = #{adGroupId,jdbcType=BIGINT},
+      <if test="accountId != null">
+        account_id = #{accountId,jdbcType=VARCHAR},
       </if>
       <if test="videoId != null">
         video_id = #{videoId,jdbcType=BIGINT},
@@ -298,11 +301,11 @@
       <if test="category != null">
         category = #{category,jdbcType=VARCHAR},
       </if>
-      <if test="copywriter != null">
-        copywriter = #{copywriter,jdbcType=VARCHAR},
+      <if test="description != null">
+        description = #{description,jdbcType=VARCHAR},
       </if>
-      <if test="caption != null">
-        caption = #{caption,jdbcType=VARCHAR},
+      <if test="subtitle != null">
+        subtitle = #{subtitle,jdbcType=VARCHAR},
       </if>
       <if test="status != null">
         `status` = #{status,jdbcType=INTEGER},
@@ -324,13 +327,13 @@
   </update>
   <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.tencentad.model.po.AdVideo">
     update ad_video
-    set ad_group_id = #{adGroupId,jdbcType=BIGINT},
+    set account_id = #{accountId,jdbcType=VARCHAR},
       video_id = #{videoId,jdbcType=BIGINT},
       video_path = #{videoPath,jdbcType=VARCHAR},
       video_cover = #{videoCover,jdbcType=VARCHAR},
       category = #{category,jdbcType=VARCHAR},
-      copywriter = #{copywriter,jdbcType=VARCHAR},
-      caption = #{caption,jdbcType=VARCHAR},
+      description = #{description,jdbcType=VARCHAR},
+      subtitle = #{subtitle,jdbcType=VARCHAR},
       `status` = #{status,jdbcType=INTEGER},
       retry_count = #{retryCount,jdbcType=INTEGER},
       is_delete = #{isDelete,jdbcType=INTEGER},

+ 1 - 1
tencent-ad-server/src/main/resources/mybatis-generator-config.xml

@@ -55,7 +55,7 @@
         <table tableName="ad_muse_task" domainObjectName="AdMuseTask" alias=""/>
         <table tableName="ad_creative" domainObjectName="AdCreative" alias=""/>
         <table tableName="ad_group" domainObjectName="AdGroup" alias=""/>
-
+        <table tableName="ad_base_video" domainObjectName="AdBaseVideo" alias=""/>
 
 
     </context>