소스 검색

Merge branch '20250925-wyp-uploadVideo' of Server/growth-manager into master

wangyunpeng 1 주 전
부모
커밋
31d4b43a21
46개의 변경된 파일4223개의 추가작업 그리고 83개의 파일을 삭제
  1. 6 3
      api-module/src/main/java/com/tzld/piaoquan/api/common/enums/EnumUploadFileType.java
  2. 9 0
      api-module/src/main/java/com/tzld/piaoquan/api/common/enums/ExceptionEnum.java
  3. 64 0
      api-module/src/main/java/com/tzld/piaoquan/api/common/enums/contentplatform/UploadVideoAuditStatusEnum.java
  4. 0 34
      api-module/src/main/java/com/tzld/piaoquan/api/component/ManagerApiService.java
  5. 184 0
      api-module/src/main/java/com/tzld/piaoquan/api/component/VideoApiService.java
  6. 10 0
      api-module/src/main/java/com/tzld/piaoquan/api/config/AliOssConfig.java
  7. 49 1
      api-module/src/main/java/com/tzld/piaoquan/api/controller/FileController.java
  8. 6 0
      api-module/src/main/java/com/tzld/piaoquan/api/controller/contentplatform/ContentPlatformPlanController.java
  9. 31 0
      api-module/src/main/java/com/tzld/piaoquan/api/controller/contentplatform/ContentPlatformSettingController.java
  10. 76 0
      api-module/src/main/java/com/tzld/piaoquan/api/controller/contentplatform/ContentPlatformUploadContentController.java
  11. 30 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/contentplatform/ContentPlatformPqAccountRelMapper.java
  12. 30 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/contentplatform/ContentPlatformUploadVideoMapper.java
  13. 16 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/contentplatform/ext/ContentPlatformPlanMapperExt.java
  14. 57 0
      api-module/src/main/java/com/tzld/piaoquan/api/job/contentplatform/ContentPlatformVideoJob.java
  15. 2 2
      api-module/src/main/java/com/tzld/piaoquan/api/job/wecom/thirdpart/WeComCreateRoomJob.java
  16. 16 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/OssUploadSignParam.java
  17. 11 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/contentplatform/DeleteVideoParam.java
  18. 17 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/contentplatform/PublishVideoParam.java
  19. 19 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/contentplatform/StsTokenParam.java
  20. 15 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/contentplatform/UploadVideoListParam.java
  21. 196 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/contentplatform/VideoApiBaseParam.java
  22. 15 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/contentplatform/VideoAuditCallBackParam.java
  23. 1 1
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/contentplatform/VideoContentListParam.java
  24. 14 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/contentplatform/WxWebLoginParam.java
  25. 101 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformPqAccountRel.java
  26. 711 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformPqAccountRelExample.java
  27. 145 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformUploadVideo.java
  28. 971 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformUploadVideoExample.java
  29. 14 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/vo/SignatureVO.java
  30. 20 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/vo/StsTokenVO.java
  31. 51 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/vo/contentplatform/UploadVideoItemVO.java
  32. 26 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/vo/contentplatform/WxBaseUserInfoVO.java
  33. 6 1
      api-module/src/main/java/com/tzld/piaoquan/api/service/contentplatform/ContentPlatformPlanService.java
  34. 14 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/contentplatform/ContentPlatformSettingService.java
  35. 23 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/contentplatform/ContentPlatformUploadContentService.java
  36. 24 2
      api-module/src/main/java/com/tzld/piaoquan/api/service/contentplatform/impl/ContentPlatformPlanServiceImpl.java
  37. 92 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/contentplatform/impl/ContentPlatformSettingServiceImpl.java
  38. 252 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/contentplatform/impl/ContentPlatformUploadContentServiceImpl.java
  39. 129 36
      api-module/src/main/java/com/tzld/piaoquan/api/util/AliOssFileTool.java
  40. 72 0
      api-module/src/main/java/com/tzld/piaoquan/api/util/BasePropertiesUtils.java
  41. 9 1
      api-module/src/main/resources/application.properties
  42. 263 0
      api-module/src/main/resources/mapper/contentplatform/ContentPlatformPqAccountRelMapper.xml
  43. 328 0
      api-module/src/main/resources/mapper/contentplatform/ContentPlatformUploadVideoMapper.xml
  44. 30 0
      api-module/src/main/resources/mapper/contentplatform/ext/ContentPlatformPlanMapperExt.xml
  45. 4 2
      api-module/src/main/resources/mybatis-api-contentPlatform-generator-config.xml
  46. 64 0
      common-module/src/main/java/com/tzld/piaoquan/growth/common/utils/RandomUtil.java

+ 6 - 3
api-module/src/main/java/com/tzld/piaoquan/api/common/enums/EnumUploadFileType.java

@@ -1,11 +1,14 @@
 package com.tzld.piaoquan.api.common.enums;
 
 public enum EnumUploadFileType {
-	FILE(4,"4"),
-	GIF(5,"5"),
+	PICTURE(1,"1"),
 	VIDEO(2,"2"),
 	VOICE(3,"3"),
-	PICTURE(1,"1");
+	FILE(4,"4"),
+	GIF(5,"5"),
+	SUBTITLE(6,"6"),
+	;
+
 	private Integer intType;
 	private String strType;
 	EnumUploadFileType(Integer intType, String strType){

+ 9 - 0
api-module/src/main/java/com/tzld/piaoquan/api/common/enums/ExceptionEnum.java

@@ -52,6 +52,15 @@ public enum ExceptionEnum {
     THIRD_PART_STAFF_NOT_FOUND(5001, "账号不存在"),
     THIRD_PART_ROOM_NOT_FOUND(5002, "群不存在"),
 
+    // 用户上传内容管理
+    PQ_LOGIN_FAIL(6001, "票圈登录失败"),
+    VIDEO_PUBLISH_FAILED(6002, "视频发布失败"),
+    VIDEO_UPDATE_FAILED(6003, "视频更新失败"),
+    VIDEO_DELETE_FAILED(6004, "视频删除失败"),
+    VIDEO_INFO_FAILED(6005, "视频信息获取失败"),
+    PQ_ACCOUNT_NOT_BINDING(6006, "票圈账号未绑定"),
+    VIDEO_CITED(6007, "视频已被引用,不能删除"),
+
     // 自动回复
     CGI_REPLY_BUCKET_DATA_NOT_FOUND(10000, "自动回复数据不存在"),
     CGI_REPLY_BUCKET_DATA_NOT_AUTO_REPLY(10001, "非自动回复数据"),

+ 64 - 0
api-module/src/main/java/com/tzld/piaoquan/api/common/enums/contentplatform/UploadVideoAuditStatusEnum.java

@@ -0,0 +1,64 @@
+package com.tzld.piaoquan.api.common.enums.contentplatform;
+
+import lombok.Getter;
+
+@Getter
+public enum UploadVideoAuditStatusEnum {
+    WAIT_AUDIT(0, "待审核"),
+    AUDITING(1, "审核中"),
+    AUDIT_PASS(2, "审核通过"),
+    AUDIT_REJECT(3, "审核不通过"),
+
+    other(999, "其他");
+
+    // 状态 0-待审核 1-审核中 2-审核通过 3-审核不通过
+    private final int val;
+    private final String description;
+
+    UploadVideoAuditStatusEnum(int val, String description) {
+        this.val = val;
+        this.description = description;
+    }
+
+    public static UploadVideoAuditStatusEnum from(int val) {
+        for (UploadVideoAuditStatusEnum typeEnum : UploadVideoAuditStatusEnum.values()) {
+            if (typeEnum.getVal() == val) {
+                return typeEnum;
+            }
+        }
+        return other;
+    }
+
+    public static UploadVideoAuditStatusEnum from(String description) {
+        for (UploadVideoAuditStatusEnum typeEnum : UploadVideoAuditStatusEnum.values()) {
+            if (typeEnum.getDescription().equals(description)) {
+                return typeEnum;
+            }
+        }
+        return other;
+    }
+
+    public static Integer parsePqAuditStatus(Integer pqAuditStatus) {
+        if (pqAuditStatus == null) {
+            return AUDITING.getVal();
+        }
+        switch (pqAuditStatus) {
+            case 0:
+                return WAIT_AUDIT.getVal();
+            case 1:
+                return AUDITING.getVal();
+            case 2:
+                return AUDIT_REJECT.getVal();
+            case 3:
+                return AUDIT_REJECT.getVal();
+            case 4:
+                return AUDIT_REJECT.getVal();
+            case 5:
+                return AUDIT_PASS.getVal();
+            default:
+                return other.getVal();
+        }
+    }
+
+
+}

+ 0 - 34
api-module/src/main/java/com/tzld/piaoquan/api/component/ManagerApiService.java

@@ -1,34 +0,0 @@
-package com.tzld.piaoquan.api.component;
-
-import com.alibaba.fastjson.JSONObject;
-import com.tzld.piaoquan.growth.common.component.HttpPoolClient;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Component;
-
-import java.util.List;
-
-@Slf4j
-@Component
-public class ManagerApiService {
-
-    @Autowired
-    private HttpPoolClient httpPoolClient;
-
-    @Value("${video.api.host:https://videotest.yishihui.com}")
-    private String videoApiHost;
-
-    public List<String> getCoverImagePaths(Long videoId) {
-        String url = videoApiHost + "/longvideoapi/video/getCoverImagePaths";
-        try {
-            String post = httpPoolClient.post(url, "id=" + videoId, "application/x-www-form-urlencoded;charset=UTF-8");
-            JSONObject res = JSONObject.parseObject(post);
-            JSONObject data = res.getJSONObject("data");
-            return data.getJSONArray("videoCoverImages").toJavaList(String.class);
-        } catch (Exception e) {
-            log.error("getVideoDetailRequest error", e);
-        }
-        return null;
-    }
-}

+ 184 - 0
api-module/src/main/java/com/tzld/piaoquan/api/component/VideoApiService.java

@@ -0,0 +1,184 @@
+package com.tzld.piaoquan.api.component;
+
+import com.alibaba.fastjson.JSONObject;
+import com.tzld.piaoquan.api.common.enums.ExceptionEnum;
+import com.tzld.piaoquan.api.common.exception.CommonException;
+import com.tzld.piaoquan.api.model.vo.contentplatform.WxBaseUserInfoVO;
+import com.tzld.piaoquan.growth.common.component.HttpPoolClient;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Objects;
+
+@Slf4j
+@Component
+public class VideoApiService {
+
+    @Autowired
+    private HttpPoolClient httpPoolClient;
+
+    @Value("${video.api.host:https://videotest.yishihui.com}")
+    private String videoApiHost;
+
+    public List<String> getCoverImagePaths(Long videoId) {
+        String url = videoApiHost + "/longvideoapi/video/getCoverImagePaths";
+        try {
+            String post = httpPoolClient.post(url, "id=" + videoId, "application/x-www-form-urlencoded;charset=UTF-8");
+            JSONObject res = JSONObject.parseObject(post);
+            JSONObject data = res.getJSONObject("data");
+            return data.getJSONArray("videoCoverImages").toJavaList(String.class);
+        } catch (Exception e) {
+            log.error("VideoApiService getCoverImagePaths error", e);
+        }
+        return null;
+    }
+
+    public WxBaseUserInfoVO webLogin(String code, Integer appType, String appId, String machineCode) {
+        String url = videoApiHost + "/longvideoapi/user/webLogin";
+        try {
+            String post = httpPoolClient.post(url, "code=" + code +
+                    "&appType=" + appType +
+                    "&appId=" + appId +
+                    "&path=%2F" +
+                    "&clientTimestamp=" + System.currentTimeMillis() +
+                    "&loginUid=" +
+                    "&token=" +
+                    "&machineCode=" + machineCode, "application/x-www-form-urlencoded;charset=UTF-8");
+            JSONObject res = JSONObject.parseObject(post);
+            return res.getObject("data", WxBaseUserInfoVO.class);
+        } catch (Exception e) {
+            log.error("VideoApiService webLogin error", e);
+        }
+        return null;
+    }
+
+    public void saveUserPhoneNumber(Long uid, String phoneNumber) {
+        String url = videoApiHost + "/longvideoapi/openapi/user/saveUserPhoneNumber";
+        try {
+            JSONObject param = new JSONObject();
+            param.put("uid", uid);
+            param.put("phoneNumber", phoneNumber);
+            String post = httpPoolClient.post(url, param.toJSONString());
+            JSONObject res = JSONObject.parseObject(post);
+        } catch (Exception e) {
+            log.error("VideoApiService saveUserPhoneNumber error", e);
+        }
+    }
+
+    public Long publishVideo(Long uid, String videoUrl, String coverUrl, String title) {
+        String url = videoApiHost + "/longvideoapi/crawler/video/send";
+        JSONObject res = null;
+        try {
+            String param = "videoPath=" + videoUrl +
+                    "&crawlerSrcCode=CONTENT" +
+                    "&crawlerSrcPublishTimestamp=" + System.currentTimeMillis() +
+                    "&crawlerTaskTimestamp=" + System.currentTimeMillis() +
+                    "&coverImgPath=" + coverUrl +
+                    "&appType=888888" +
+                    "&loginUid=" + uid +
+                    "&title=" + title +
+                    "&viewStatus=1" +
+                    "&versionCode=1";
+            log.info("VideoApiService publishVideo param={}", param);
+            String post = httpPoolClient.post(url, param, "application/x-www-form-urlencoded;charset=UTF-8");
+            res = JSONObject.parseObject(post);
+        } catch (Exception e) {
+            log.error("VideoApiService publishVideo error", e);
+        }
+        if (Objects.isNull(res)) {
+            return null;
+        }
+        if (res.getInteger("code") != 0) {
+            log.error("publishVideo error, uid:{} videoUrl={} coverUrl={} title={} res={}", uid, videoUrl, coverUrl, title, res);
+            throw new CommonException(ExceptionEnum.VIDEO_PUBLISH_FAILED.getCode(),
+                    ExceptionEnum.VIDEO_PUBLISH_FAILED.getMsg() + "," + res.getString("msg"));
+        }
+        JSONObject data = res.getJSONObject("data");
+        Long videoId = data.getLong("id");
+        log.info("VideoApiService publishVideo success, uid:{} videoId={}", uid, videoId);
+        return videoId;
+    }
+
+    public void updateVideo(Long uid, Long videoId, String coverUrl, String title) {
+        String url = videoApiHost + "/longvideoapi/openapi/video/update";
+        JSONObject res = null;
+        try {
+            JSONObject videoDetail = getVideoInfo(videoId);
+            JSONObject chargeDetail = videoDetail.getJSONObject("chargeDetail");
+            JSONObject param = new JSONObject();
+            param.put("loginUid", uid);
+            param.put("id", videoId);
+            param.put("videoId", videoId);
+            param.put("appType", 8);
+            param.put("coverImgPath", coverUrl);
+            param.put("title", title);
+            param.put("viewStatus", 1);
+            param.put("videoCollectionId", videoDetail.getLong("videoCollectionId"));
+            param.put("barrageSwitch", videoDetail.getLong("barrageSwitch"));
+            param.put("charge", chargeDetail.getInteger("charge"));
+            param.put("price", chargeDetail.getLong("price"));
+            param.put("allowIosPlay", chargeDetail.getLong("allowIosPlay"));
+            param.put("allowDownload", 0);
+            log.info("VideoApiService updateVideo param={}", param.toJSONString());
+            String post = httpPoolClient.post(url, param.toJSONString());
+            res = JSONObject.parseObject(post);
+        } catch (Exception e) {
+            log.error("VideoApiService updateVideo error", e);
+        }
+        if (Objects.isNull(res)) {
+            throw new CommonException(ExceptionEnum.VIDEO_UPDATE_FAILED);
+        }
+        if (res.getInteger("code") != 0) {
+            log.error("VideoApiService updateVideo error, uid:{} videoId={} coverUrl={} title={} res={}", uid, videoId, coverUrl, title, res);
+            throw new CommonException(ExceptionEnum.VIDEO_UPDATE_FAILED.getCode(), res.getString("msg"));
+        }
+    }
+
+    public JSONObject getVideoInfo(Long videoId) {
+        String url = videoApiHost + "/longvideoapi/openapi/video/getVideoInfo";
+        JSONObject res = null;
+        try {
+            JSONObject param = new JSONObject();
+            param.put("videoId", videoId);
+            String post = httpPoolClient.post(url, param.toJSONString());
+            res = JSONObject.parseObject(post);
+        } catch (Exception e) {
+            log.error("VideoApiService getVideoInfo error", e);
+        }
+        if (Objects.isNull(res)) {
+            throw new CommonException(ExceptionEnum.VIDEO_INFO_FAILED);
+        }
+        if (res.getInteger("code") != 0) {
+            log.error("VideoApiService getVideoInfo error, videoId={} res={}", videoId, res);
+            throw new CommonException(ExceptionEnum.VIDEO_INFO_FAILED.getCode(),
+                    ExceptionEnum.VIDEO_INFO_FAILED.getMsg() + "," + res.getString("msg"));
+        }
+        return res.getJSONObject("data");
+    }
+
+    public void deleteVideo(Long uid, Long videoId) {
+        String url = videoApiHost + "/longvideoapi/openapi/video/delete";
+        JSONObject res = null;
+        try {
+            JSONObject param = new JSONObject();
+            param.put("loginUid", uid);
+            param.put("videoId", videoId);
+            String post = httpPoolClient.post(url, param.toJSONString());
+            res = JSONObject.parseObject(post);
+        } catch (Exception e) {
+            log.error("VideoApiService deleteVideo error", e);
+        }
+        if (Objects.isNull(res)) {
+            throw new CommonException(ExceptionEnum.VIDEO_DELETE_FAILED);
+        }
+        if (res.getInteger("code") != 0) {
+            log.error("VideoApiService deleteVideo error, videoId={} res={}", videoId, res);
+            throw new CommonException(ExceptionEnum.VIDEO_DELETE_FAILED.getCode(),
+                    ExceptionEnum.VIDEO_DELETE_FAILED.getMsg() + "," + res.getString("msg"));
+        }
+    }
+
+}

+ 10 - 0
api-module/src/main/java/com/tzld/piaoquan/api/config/AliOssConfig.java

@@ -87,6 +87,7 @@ public class AliOssConfig {
 	public static String cdnDomain;
 	public static String imgDomain;
 	public static String videoDomain;
+	public static String uploadDomain;
 	public static String lvvideoDomain;
 	public static String pubBucket;
 	public static String priBucket;
@@ -108,6 +109,7 @@ public class AliOssConfig {
 			setCdnDomain(cdnDomain);
 			setImgDomain(imgDomain);
 			setVideoDomain(videoDomain);
+			setUploadDomain(uploadDomain);
 			setInternalEndPoint(internalEndPoint);
 			setPubBucket(pubBucket);
 			try{
@@ -325,6 +327,14 @@ public class AliOssConfig {
 		AliOssConfig.expiration = expiration;
 	}
 
+	public static String getUploadDomain() {
+		return uploadDomain;
+	}
+	@Value("${cdn.upload.domain}")
+	public void setUploadDomain(String uploadDomain) {
+		AliOssConfig.uploadDomain = uploadDomain;
+	}
+
 	public static PolicyDetailVO getPolicyDetail() {
 		return policyDetail;
 	}

+ 49 - 1
api-module/src/main/java/com/tzld/piaoquan/api/controller/FileController.java

@@ -1,13 +1,20 @@
 package com.tzld.piaoquan.api.controller;
 
+import com.alibaba.fastjson.JSON;
 import com.stuuudy.commons.external.filestorage.enums.EnumPublicBuckets;
 import com.tzld.piaoquan.api.common.enums.ExceptionEnum;
 import com.tzld.piaoquan.api.common.exception.CommonException;
 import com.tzld.piaoquan.api.config.AliOssConfig;
 import com.tzld.piaoquan.api.model.param.FileUploadParam;
+import com.tzld.piaoquan.api.model.param.OssUploadSignParam;
+import com.tzld.piaoquan.api.model.param.contentplatform.StsTokenParam;
 import com.tzld.piaoquan.api.model.vo.FileInfo;
+import com.tzld.piaoquan.api.model.vo.SignatureVO;
+import com.tzld.piaoquan.api.model.vo.StsTokenVO;
 import com.tzld.piaoquan.api.util.AliOssFileTool;
 import com.tzld.piaoquan.growth.common.common.base.CommonResponse;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.validation.BindingResult;
 import org.springframework.validation.annotation.Validated;
@@ -16,10 +23,12 @@ import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
+import javax.servlet.http.HttpServletRequest;
 import java.io.IOException;
 
 @RestController
 @RequestMapping("/file")
+@Slf4j
 public class FileController {
 
     @CrossOrigin(origins = "*")
@@ -42,10 +51,49 @@ public class FileController {
         fileInfo.setFileUrl(fileUrl);
         String bucketName = AliOssConfig.getBucket(EnumPublicBuckets.PUBBUCKET.getBucketName());
         boolean isExistFile = AliOssFileTool.getOssClient().doesObjectExist(bucketName, param.getFileUri());
-        if (!isExistFile){
+        if (!isExistFile) {
             throw new CommonException(ExceptionEnum.PARAM_ERROR.getCode(), "上传文件不存在!!");
         }
         return CommonResponse.create(fileInfo);
     }
 
+    @CrossOrigin(origins = "*")
+    @PostMapping("/signature")
+    @ApiOperation(value = "获取签名")
+    public CommonResponse<SignatureVO> signature(@Validated OssUploadSignParam ossUploadSignParam) {
+        log.info("获取OSS签名失败 param" + JSON.toJSONString(ossUploadSignParam));
+        SignatureVO signatureVO;
+        try {
+            signatureVO = AliOssFileTool.getUploadPolicy(ossUploadSignParam.getFileType());
+        } catch (Exception e) {
+            log.error("获取OSS签名失败", e);
+            return CommonResponse.create(ExceptionEnum.SYSTEM_ERROR.getCode(), "获取OSS签名失败");
+        }
+        return CommonResponse.success(signatureVO);
+    }
+
+    /**
+     * 尽量控制前端获取oss权限,降低安全风险
+     * 有效期为15分钟,getStsToken接口为1小时
+     *
+     * @param stsTokenParam
+     * @param request
+     * @return
+     * @throws Exception
+     */
+    @CrossOrigin(origins = "*")
+    @PostMapping("/getTempStsToken")
+    @ApiOperation(value = "获取STS临时令牌")
+    public CommonResponse<StsTokenVO> getTempStsToken(StsTokenParam stsTokenParam, HttpServletRequest request) throws Exception {
+        log.info("获取STS临时令牌 param" + JSON.toJSONString(stsTokenParam));
+        StsTokenVO stsTokenVO;
+        try {
+            String fileName = AliOssFileTool.getRandomObjectKey(stsTokenParam.getFileType());
+            stsTokenVO = AliOssFileTool.getStsToken(fileName, 15 * 60L);
+        } catch (Exception e) {
+            log.error("获取STS临时令牌", e);
+            return CommonResponse.create(ExceptionEnum.SYSTEM_ERROR.getCode(), "获取STS临时令牌失败");
+        }
+        return CommonResponse.success(stsTokenVO);
+    }
 }

+ 6 - 0
api-module/src/main/java/com/tzld/piaoquan/api/controller/contentplatform/ContentPlatformPlanController.java

@@ -60,6 +60,12 @@ public class ContentPlatformPlanController {
         return CommonResponse.success(planService.getVideoContentList(param));
     }
 
+    @ApiOperation(value = "个人上传发布内容视频列表")
+    @PostMapping("/upload/videoContentList")
+    public CommonResponse<Page<VideoContentItemVO>> getUploadVideoContentList(@RequestBody VideoContentListParam param) {
+        return CommonResponse.success(planService.getUploadVideoContentList(param));
+    }
+
     @ApiOperation(value = "发布内容视频品类列表")
     @GetMapping("/videoContentCategoryList")
     public CommonResponse<List<String>> getVideoContentCategoryList() {

+ 31 - 0
api-module/src/main/java/com/tzld/piaoquan/api/controller/contentplatform/ContentPlatformSettingController.java

@@ -0,0 +1,31 @@
+package com.tzld.piaoquan.api.controller.contentplatform;
+
+import com.tzld.piaoquan.api.model.param.contentplatform.WxWebLoginParam;
+import com.tzld.piaoquan.api.model.vo.contentplatform.WxBaseUserInfoVO;
+import com.tzld.piaoquan.api.service.contentplatform.ContentPlatformSettingService;
+import com.tzld.piaoquan.growth.common.common.base.CommonResponse;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+@RestController
+@RequestMapping("/contentPlatform/setting")
+@CrossOrigin(origins = "*")
+public class ContentPlatformSettingController {
+
+    @Autowired
+    ContentPlatformSettingService service;
+
+    @ApiOperation(value = "票圈账号绑定")
+    @PostMapping(value = "/webLogin")
+    public CommonResponse<WxBaseUserInfoVO> wxLoginByWeb(@Validated WxWebLoginParam param) {
+        return CommonResponse.success(service.wxLoginByWeb(param));
+    }
+
+    @ApiOperation(value = "获取票圈账户绑定信息")
+    @GetMapping(value = "/getBindPQUserInfo")
+    public CommonResponse<WxBaseUserInfoVO> getBindPQUserInfo() {
+        return CommonResponse.success(service.getBindPQUserInfo());
+    }
+}

+ 76 - 0
api-module/src/main/java/com/tzld/piaoquan/api/controller/contentplatform/ContentPlatformUploadContentController.java

@@ -0,0 +1,76 @@
+package com.tzld.piaoquan.api.controller.contentplatform;
+
+import com.tzld.piaoquan.api.annotation.JwtIgnore;
+import com.tzld.piaoquan.api.job.contentplatform.ContentPlatformVideoJob;
+import com.tzld.piaoquan.api.model.param.contentplatform.DeleteVideoParam;
+import com.tzld.piaoquan.api.model.param.contentplatform.PublishVideoParam;
+import com.tzld.piaoquan.api.model.param.contentplatform.UploadVideoListParam;
+import com.tzld.piaoquan.api.model.param.contentplatform.VideoAuditCallBackParam;
+import com.tzld.piaoquan.api.model.vo.contentplatform.UploadVideoItemVO;
+import com.tzld.piaoquan.api.service.contentplatform.ContentPlatformUploadContentService;
+import com.tzld.piaoquan.growth.common.common.base.CommonResponse;
+import com.tzld.piaoquan.growth.common.utils.page.Page;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+@RestController
+@RequestMapping("/contentPlatform/uploadContent")
+@CrossOrigin(origins = "*")
+public class ContentPlatformUploadContentController {
+
+    @Autowired
+    ContentPlatformUploadContentService service;
+    @Autowired
+    ContentPlatformVideoJob job;
+
+    @ApiOperation(value = "发布视频")
+    @PostMapping("/publishVideo")
+    public CommonResponse<UploadVideoItemVO> publishVideo(@RequestBody PublishVideoParam param) {
+        return CommonResponse.success(service.publishVideo(param));
+    }
+
+    @ApiOperation(value = "修改视频")
+    @PostMapping("/updateVideo")
+    public CommonResponse<UploadVideoItemVO> updateVideo(@RequestBody PublishVideoParam param) {
+        return CommonResponse.success(service.updateVideo(param));
+    }
+
+    @ApiOperation(value = "删除视频")
+    @PostMapping("/deleteVideo")
+    public CommonResponse<Void> deleteVideo(@RequestBody DeleteVideoParam param) {
+        service.deleteVideo(param);
+        return CommonResponse.success();
+    }
+
+    @ApiOperation(value = "视频审核回调")
+    @PostMapping("/callback/videoAudit")
+    @JwtIgnore
+    public CommonResponse<Void> videoAuditCallBack(@RequestBody VideoAuditCallBackParam param) {
+        service.videoAuditCallBack(param);
+        return CommonResponse.success();
+    }
+
+    @ApiOperation(value = "上传视频列表")
+    @PostMapping("/list")
+    public CommonResponse<Page<UploadVideoItemVO>> uploadVideoList(@RequestBody UploadVideoListParam param) {
+        return CommonResponse.success(service.uploadVideoList(param));
+    }
+
+    @JwtIgnore
+    @ApiOperation(value = "同步手动上传视频裂变分", hidden = true)
+    @GetMapping("/job/syncContentPlatformUploadVideoScoreJob")
+    public CommonResponse<Void> syncContentPlatformUploadVideoScoreJob() {
+        job.syncContentPlatformUploadVideoScoreJob(null);
+        return CommonResponse.success();
+    }
+
+    @JwtIgnore
+    @ApiOperation(value = "检查手动上传视频状态", hidden = true)
+    @GetMapping("/job/checkContentPlatformUploadVideoStatusJob")
+    public CommonResponse<Void> checkContentPlatformUploadVideoStatusJob() {
+        job.checkContentPlatformUploadVideoStatusJob(null);
+        return CommonResponse.success();
+    }
+
+}

+ 30 - 0
api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/contentplatform/ContentPlatformPqAccountRelMapper.java

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

+ 30 - 0
api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/contentplatform/ContentPlatformUploadVideoMapper.java

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

+ 16 - 0
api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/contentplatform/ext/ContentPlatformPlanMapperExt.java

@@ -113,4 +113,20 @@ public interface ContentPlatformPlanMapperExt {
     List<PlanIllegalVideoDTO> getGzhPlanIllegalVideoList(@Param("videoId") Long videoId);
 
     List<PlanIllegalVideoDTO> getQwPlanIllegalVideoList(@Param("videoId") Long videoId);
+
+    int getUploadVideoCount(@Param("param") VideoContentListParam param, @Param("createAccountId") Long createAccountId);
+
+    List<ContentPlatformVideo> getUploadVideoList(@Param("param") VideoContentListParam param,
+                                                  @Param("createAccountId") Long createAccountId,
+                                                  @Param("datastatDt") String datastatDt,
+                                                  @Param("type") String type,
+                                                  @Param("channel") String channel,
+                                                  @Param("offset") int offset,
+                                                  @Param("pageSize") Integer pageSize,
+                                                  @Param("sort") String sort);
+
+    void updateUploadVideoStatusWithOldStatus(@Param("videoId") Long videoId,
+                                              @Param("status") Integer status,
+                                              @Param("now") Long now);
+
 }

+ 57 - 0
api-module/src/main/java/com/tzld/piaoquan/api/job/contentplatform/ContentPlatformVideoJob.java

@@ -2,6 +2,7 @@ package com.tzld.piaoquan.api.job.contentplatform;
 
 import com.aliyun.odps.data.Record;
 import com.google.common.collect.Lists;
+import com.tzld.piaoquan.api.common.enums.contentplatform.UploadVideoAuditStatusEnum;
 import com.tzld.piaoquan.api.dao.mapper.contentplatform.*;
 import com.tzld.piaoquan.api.dao.mapper.contentplatform.ext.ContentPlatformPlanMapperExt;
 import com.tzld.piaoquan.api.model.po.contentplatform.*;
@@ -46,6 +47,9 @@ public class ContentPlatformVideoJob {
     @Autowired
     private MessageAttachmentService messageAttachmentService;
 
+    @Autowired
+    ContentPlatformUploadVideoMapper uploadVideoMapper;
+
     @Value("${video.agg.days:3}")
     private Integer videoAggDays;
 
@@ -325,6 +329,59 @@ public class ContentPlatformVideoJob {
         return videoDataStatMapper.selectByExample(example);
     }
 
+    @XxlJob("syncContentPlatformUploadVideoScoreJob")
+    public ReturnT<String> syncContentPlatformUploadVideoScoreJob(String param) {
+        String aggDt = DateUtil.getBeforeDayDateString("yyyyMMdd");
+        List<ContentPlatformVideoAgg> saveAggList = getVideoListByDt(aggDt);
+        Map<Long, ContentPlatformVideoAgg> videoIdMap = saveAggList.stream().collect(Collectors.toMap(ContentPlatformVideoAgg::getVideoId, o -> o));
+        List<ContentPlatformUploadVideo> uploadVideoList = getAllUploadVideo();
+        if (CollectionUtils.isNotEmpty(uploadVideoList)) {
+            for (ContentPlatformUploadVideo uploadVideo : uploadVideoList) {
+                ContentPlatformVideoAgg agg = videoIdMap.get(uploadVideo.getVideoId());
+                if (Objects.nonNull(agg)) {
+                    uploadVideo.setScore(agg.getScore());
+                    uploadVideoMapper.updateByPrimaryKeySelective(uploadVideo);
+                }
+            }
+        }
+        return ReturnT.SUCCESS;
+    }
+
+    private List<ContentPlatformUploadVideo> getAllUploadVideo() {
+        ContentPlatformUploadVideoExample example = new ContentPlatformUploadVideoExample();
+        example.createCriteria().andIsDeleteEqualTo(0);
+        return uploadVideoMapper.selectByExample(example);
+    }
+
+    @XxlJob("checkContentPlatformUploadVideoStatusJob")
+    public ReturnT<String> checkContentPlatformUploadVideoStatusJob(String param) {
+        List<ContentPlatformUploadVideo> uploadVideoList = getAllUploadVideo();
+        Long now = System.currentTimeMillis();
+        for (List<ContentPlatformUploadVideo> partition : Lists.partition(uploadVideoList, 20)) {
+            List<Long> videoIds = partition.stream().map(ContentPlatformUploadVideo::getVideoId).collect(Collectors.toList());
+            Map<Long, VideoDetail> videoDetailMap = messageAttachmentService.getVideoDetail(new HashSet<>(videoIds));
+            for (ContentPlatformUploadVideo video : partition) {
+                VideoDetail videoDetail = videoDetailMap.get(video.getVideoId());
+                if (videoDetail == null || videoDetail.getAuditStatus() != 5) {
+                    updateUploadVideoStatusWithOldStatus(video.getVideoId(), UploadVideoAuditStatusEnum.AUDIT_REJECT.getVal(), now);
+                }
+            }
+        }
+        // 检查视频是否违规
+        List<ContentPlatformIllegalVideo> illegalVideoList = getAllIllegalVideoList();
+        List<Long> illegalVideoIds = illegalVideoList.stream().map(ContentPlatformIllegalVideo::getVideoId).collect(Collectors.toList());
+        if (CollectionUtils.isNotEmpty(illegalVideoIds)) {
+            for (Long illegalVideoId : illegalVideoIds) {
+                updateUploadVideoStatusWithOldStatus(illegalVideoId, UploadVideoAuditStatusEnum.AUDIT_REJECT.getVal(), now);
+            }
+        }
+        return ReturnT.SUCCESS;
+    }
+
+    private void updateUploadVideoStatusWithOldStatus(Long videoId, Integer status, Long now) {
+        planMapperExt.updateUploadVideoStatusWithOldStatus(videoId, status, now);
+    }
+
 }
 
 

+ 2 - 2
api-module/src/main/java/com/tzld/piaoquan/api/job/wecom/thirdpart/WeComCreateRoomJob.java

@@ -149,7 +149,7 @@ public class WeComCreateRoomJob {
                                List<ThirdPartWeComStaffUser> staffUserList,
                                Integer roomNum) {
         Iterator<ThirdPartWeComStaffUser> iterator = staffUserList.iterator();
-        // todo 暂时每次任务仅创建一个群
+        // todo createRoom 暂时每次任务仅创建一个群
         //while (iterator.hasNext()) {
         List<Long> vids = new ArrayList<>();
         List<ThirdPartWeComStaffUser> addUserList = new ArrayList<>();
@@ -206,7 +206,7 @@ public class WeComCreateRoomJob {
             setRoomAntiRequest.setAntiIds(antiSpamRuleList.stream().map(AntiSpamRuleResponse.AntiSpamRule::getId).collect(Collectors.toList()));
             apiClient.setRoomAnti(setRoomAntiRequest);
         }
-        // todo 设置管理员
+        // todo createRoom 设置管理员
         //apiClient.addRoomAdmins();
     }
 

+ 16 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/param/OssUploadSignParam.java

@@ -0,0 +1,16 @@
+package com.tzld.piaoquan.api.model.param;
+
+import com.tzld.piaoquan.api.model.param.contentplatform.VideoApiBaseParam;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+
+@Data
+public class OssUploadSignParam extends VideoApiBaseParam {
+
+	@ApiModelProperty(value = "文件类型1:picture 2:视频 3:声音 4:文件  5:gif 6:字幕", required = true)
+	@NotNull
+	private Integer fileType;
+
+}

+ 11 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/param/contentplatform/DeleteVideoParam.java

@@ -0,0 +1,11 @@
+package com.tzld.piaoquan.api.model.param.contentplatform;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class DeleteVideoParam {
+
+    @ApiModelProperty(value = "视频Id")
+    private Long videoId;
+}

+ 17 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/param/contentplatform/PublishVideoParam.java

@@ -0,0 +1,17 @@
+package com.tzld.piaoquan.api.model.param.contentplatform;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class PublishVideoParam {
+
+    @ApiModelProperty(value = "视频Id")
+    private Long videoId;
+    @ApiModelProperty(value = "视频标题")
+    private String title;
+    @ApiModelProperty(value = "视频封面")
+    private String coverUrl;
+    @ApiModelProperty(value = "视频url")
+    private String videoUrl;
+}

+ 19 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/param/contentplatform/StsTokenParam.java

@@ -0,0 +1,19 @@
+package com.tzld.piaoquan.api.model.param.contentplatform;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.hibernate.validator.constraints.NotEmpty;
+
+import javax.validation.constraints.NotNull;
+
+@Data
+public class StsTokenParam extends VideoApiBaseParam {
+	
+	@NotEmpty(message = "fileType不能为空")
+	@NotNull(message = "fileType不能为空")
+	@ApiModelProperty(value = "文件类型:(1:PICTURE, 2:VIDEO, 3:VOICE, 4:FILE, 5:GIF)")
+	private Integer fileType;
+	@ApiModelProperty(value = "第一次获取token时返回的唯一标识字符串,用来在上传大文件时若签名快失效时重新获取对应文件的token")
+	private String uploadId;
+
+}

+ 15 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/param/contentplatform/UploadVideoListParam.java

@@ -0,0 +1,15 @@
+package com.tzld.piaoquan.api.model.param.contentplatform;
+
+import com.tzld.piaoquan.api.model.param.PageParam;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class UploadVideoListParam  extends PageParam {
+
+    @ApiModelProperty(value = "审核状态 0-待审核 1-审核中 2-审核通过 3-审核不通过")
+    private Integer auditStatus;
+    @ApiModelProperty(value = "标题")
+    private String title;
+
+}

+ 196 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/param/contentplatform/VideoApiBaseParam.java

@@ -0,0 +1,196 @@
+package com.tzld.piaoquan.api.model.param.contentplatform;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class VideoApiBaseParam {
+
+	//用户登陆相关的参数
+	@ApiModelProperty(value = "公共参数-登录用户ID")
+	private Long loginUid;
+	@ApiModelProperty(value = "公共参数-token值")
+	private String token;
+
+	//APP相关的参数
+	@ApiModelProperty(value = "公共参数-版本号")
+	private Integer versionCode;
+	@ApiModelProperty(value = "公共参数-app发布版本")
+	private String versionName;
+	@ApiModelProperty(value = "公共参数-产品类型:0-VLOG,1-轻趣视频,2-搞笑视频,3-爱电影,4-爱生活,5-长视频,6-短视频,7-惊奇视频,8-PC端,9-票圈长视频APP,10-票圈长视频lite,11-票圈相册,12-H5,13-票圈视频APP,14-小程序极速版,15-闪音卡点APP,16-社区APP")
+	private Integer appType;
+	@ApiModelProperty(value = "公共参数-appid")
+	private String appId;
+
+	//手机设备信息相关的参数
+	@ApiModelProperty(value = "公共参数-手机设备的唯一码")
+	private String machineCode;
+	@ApiModelProperty(value = "公共参数-ios,android")
+	private String platform;
+	@ApiModelProperty(value = "公共参数-精确到ios,android的哪个版本")
+	private String system;
+	@ApiModelProperty(value = "公共参数-手机信息")
+	private String machineInfo;
+	@ApiModelProperty(value = "公共参数-网络类型")
+	private String networkType;
+	@ApiModelProperty(value = "公共参数-客户端ip")
+	private String clientIp;
+
+	//pageSource相关的参数
+	@ApiModelProperty(value = "公共参数-页面来源")
+	private String pageSource;
+	@ApiModelProperty(value = "公共参数-页面分类ID,只在首页分发列表中才有")
+	private Long pageCategoryId;
+	@ApiModelProperty(value = "公共参数-root页面来源")
+	private String rootPageSource;
+	@ApiModelProperty(value = "公共参数-root页面分类ID")
+	private Long rootPageCategoryId;
+	@ApiModelProperty(value = "公共参数-root页面时间戳")
+	private Long rootPageTimestamp;
+
+	//某次操作相关的参数
+	@ApiModelProperty(value = "公共参数-小程序打开类型")
+	private String openType;
+	@ApiModelProperty(value = "公共参数-前端请求时间")
+	private Long clientTimestamp;
+	@ApiModelProperty(value = "公共参数-sessionId")
+	private String sessionId;
+
+	//视频相关的参数
+	@ApiModelProperty(value = "公共参数-视频加载时长,毫秒")
+	private Long videoLoadTime;
+	@ApiModelProperty(value = "公共参数-视频事件发生的时间点,相对于视频时长,秒")
+	private Long videoEventTime;
+	@ApiModelProperty(value = "公共参数-videoPlayError事件,播放器返回的错误信息")
+	private String errorMsg;
+
+	//分享相关的参数
+	@ApiModelProperty(value = "公共参数-分享的深度")
+	private Integer shareDepth;
+	@ApiModelProperty(value = "公共参数-分享者手机设备的唯一码,只有在分享页才有")
+	private String shareMachineCode;
+	@ApiModelProperty(value = "公共参数-分享者uid,只有在分享页才有")
+	private Long shareUid;
+	@ApiModelProperty(value = "公共参数-是否为分享页标识,0:不是分享页,1:是分享页")
+	private Integer sharePageFlag;
+	@ApiModelProperty(value = "公共参数-分享按钮类型")
+	private Integer shareButtonType;
+	@ApiModelProperty(value = "公共参数-从哪个产品分享出来的")
+	private Integer shareAppType;
+
+	@ApiModelProperty(value = "公共参数-0 综合模块 1 feed流 ")
+	private String sharePageType;
+	@ApiModelProperty(value = "公共参数-分享页跳转")
+	private String videoShareJumpModel;
+	//推荐相关的参数
+	@ApiModelProperty(value = "公共参数-推荐来源 0 默认")
+	private Integer recommendSource = 0;
+
+	@ApiModelProperty(value = "公共参数-视频上报数据,使用后端返回的原样数据")
+	private String videoReportMeta;
+
+	@ApiModelProperty(value = "公共参数-事件ID")
+	private String eventId;
+	@ApiModelProperty(value = "公共参数-root事件ID")
+	private String rootEventId;
+
+	@ApiModelProperty(value = "公共参数-root分享页面类型")
+	private String rootSharePageType;
+	@ApiModelProperty(value = "公共参数-自动标志位类型")
+	private String autoType;
+	@ApiModelProperty(value = "公共参数-动作发生的页面位置")
+	private String actionPosition;
+
+	@ApiModelProperty(value = "公共参数-运营消息ID")
+	private String operationMsgId;
+	@ApiModelProperty(value = "公共参数-playId")
+	private String playId;
+	@ApiModelProperty(value = "公共参数-活动id")
+	private String activityId;
+
+	@ApiModelProperty(value = "公共参数-AB信息")
+	private String abInfoData;
+
+	// h5
+	@ApiModelProperty(value = "公共参数-h5分享id")
+	private String h5ShareId;
+	@ApiModelProperty(value = "公共参数-h5打开场景")
+	private String h5OpenFrom;
+	@ApiModelProperty(value = "公共参数-h5分享场景")
+	private String h5ShareFrom;
+	@ApiModelProperty(value = "公共参数-h5页面-小程序分享根源rootPageSource")
+	private String h5WxRootPageSource;
+
+	@ApiModelProperty(value = "公共参数-搜索上报")
+	private String searchActionCode;
+
+	@ApiModelProperty(value = "公共参数-AB的根实验集合")
+	private String rootEventIds;
+
+	@ApiModelProperty(value = "公共参数-returnId")
+	private String returnId;
+	@ApiModelProperty(value = "公共参数-viewId")
+	private String viewId;
+	@ApiModelProperty(value = "公共参数-shareId")
+	private String shareId;
+	@ApiModelProperty(value = "公共参数-subSessionId")
+	private String subSessionId;
+
+	@ApiModelProperty(value = "公共参数-headVideoId")
+	private String headVideoId;
+    @ApiModelProperty(value = "公共参数-推荐链路ID")
+    private String recommendId;
+	@ApiModelProperty(value = "公共参数-推荐日志对象")
+	private String recommendLogVO;
+
+	@ApiModelProperty(value = "公共参数-分享ID")
+	private String jumpHomeVideoId;
+	@ApiModelProperty(value = "公共参数-根分享ID")
+	private String rootJumpHomeVideoId;
+
+	@ApiModelProperty(value = "公共参数-小程序打开场景")
+	private Integer senceType=-1;
+	@ApiModelProperty(value = "公共参数-小程序打开场景 热启动")
+	private Integer hotSenceType;
+	@ApiModelProperty(value = "公共参数-rootMid")
+	private String rootMid;
+	@ApiModelProperty(value = "公共参数-渠道:yybstore xmstore hwstore oppostore vivostore sougou bdstore mzstore store360 douyin kuaishou")
+	private String appChannel;
+	//	@ApiModelProperty(value = "微信AB实验参数 例如:22031801")
+//	private String wechatAbcode;
+	@ApiModelProperty(value = "通过微信实验分流获取到的对应数据")
+    private String abExpInfo; //Map<String, List<AbExpItemDTO>>
+    @ApiModelProperty(value = "H5")
+    private Long adBlockVideoId;
+
+    private Boolean showDistribute;
+
+    private Boolean showShare;
+
+    private Boolean showFocusExp;
+
+    private Boolean isFirstPageOrFirstPageFeed;
+
+	private String newExpGroup;
+
+	private Boolean isTest;
+	/**
+	 * 代表用户来自哪个外部来源,包括:公众号文章、投流等等,
+	 */
+	private String rootSourceId;
+	/**
+	 * 代表一个通过分享卡片进入的用户,他最初来自哪个用户mid的分享
+	 */
+	private String rootShareMid;
+	/**
+	 * 代表一个通过分享卡片进入的用户,他最初来自哪个用户mid的哪次冷启动sessionId的分享
+	 */
+	private String rootSessionId;
+
+	private String rootShareId;
+	/**
+	 * 微信群ID
+	 */
+	private String openGId;
+
+}

+ 15 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/param/contentplatform/VideoAuditCallBackParam.java

@@ -0,0 +1,15 @@
+package com.tzld.piaoquan.api.model.param.contentplatform;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class VideoAuditCallBackParam {
+
+    @ApiModelProperty(value = "视频Id")
+    private Long videoId;
+    @ApiModelProperty(value = "审核状态 0-待审核 1-审核中 2-审核通过 3-审核不通过")
+    private Integer auditStatus;
+    @ApiModelProperty(value = "审核不通过原因")
+    private String reason;
+}

+ 1 - 1
api-module/src/main/java/com/tzld/piaoquan/api/model/param/contentplatform/VideoContentListParam.java

@@ -13,7 +13,7 @@ public class VideoContentListParam extends PageParam {
     @ApiModelProperty(value = "品类")
     private String category;
 
-    @ApiModelProperty(value = "排序 0-自动回复、1-服务号推送、2-企微-社群、3-企微-自动回复、4-公众号推送")
+    @ApiModelProperty(value = "行业 0-自动回复、1-服务号推送、2-企微-社群、3-企微-自动回复、4-公众号推送")
     private Integer type = 999;
 
     @ApiModelProperty(value = "排序 0-平台推荐 1-行业裂变率 2-本渠道裂变率")

+ 14 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/param/contentplatform/WxWebLoginParam.java

@@ -0,0 +1,14 @@
+package com.tzld.piaoquan.api.model.param.contentplatform;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.hibernate.validator.constraints.NotBlank;
+
+@Data
+public class WxWebLoginParam extends VideoApiBaseParam {
+
+    @ApiModelProperty(value = "code")
+    @NotBlank(message = "code不能为空")
+    private String code;
+
+}

+ 101 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformPqAccountRel.java

@@ -0,0 +1,101 @@
+package com.tzld.piaoquan.api.model.po.contentplatform;
+
+public class ContentPlatformPqAccountRel {
+    private Long id;
+
+    private Long accountId;
+
+    private Long pqUid;
+
+    private String pqName;
+
+    private String pqTelNum;
+
+    private Integer status;
+
+    private Long createTimestamp;
+
+    private Long updateTimestamp;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getAccountId() {
+        return accountId;
+    }
+
+    public void setAccountId(Long accountId) {
+        this.accountId = accountId;
+    }
+
+    public Long getPqUid() {
+        return pqUid;
+    }
+
+    public void setPqUid(Long pqUid) {
+        this.pqUid = pqUid;
+    }
+
+    public String getPqName() {
+        return pqName;
+    }
+
+    public void setPqName(String pqName) {
+        this.pqName = pqName;
+    }
+
+    public String getPqTelNum() {
+        return pqTelNum;
+    }
+
+    public void setPqTelNum(String pqTelNum) {
+        this.pqTelNum = pqTelNum;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public Long getCreateTimestamp() {
+        return createTimestamp;
+    }
+
+    public void setCreateTimestamp(Long createTimestamp) {
+        this.createTimestamp = createTimestamp;
+    }
+
+    public Long getUpdateTimestamp() {
+        return updateTimestamp;
+    }
+
+    public void setUpdateTimestamp(Long updateTimestamp) {
+        this.updateTimestamp = updateTimestamp;
+    }
+
+    @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(", accountId=").append(accountId);
+        sb.append(", pqUid=").append(pqUid);
+        sb.append(", pqName=").append(pqName);
+        sb.append(", pqTelNum=").append(pqTelNum);
+        sb.append(", status=").append(status);
+        sb.append(", createTimestamp=").append(createTimestamp);
+        sb.append(", updateTimestamp=").append(updateTimestamp);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 711 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformPqAccountRelExample.java

@@ -0,0 +1,711 @@
+package com.tzld.piaoquan.api.model.po.contentplatform;
+
+import com.tzld.piaoquan.growth.common.utils.page.Page;
+import java.util.ArrayList;
+import java.util.List;
+
+public class ContentPlatformPqAccountRelExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    protected Page page;
+
+    public ContentPlatformPqAccountRelExample() {
+        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 andAccountIdIsNull() {
+            addCriterion("account_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdIsNotNull() {
+            addCriterion("account_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdEqualTo(Long value) {
+            addCriterion("account_id =", value, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdNotEqualTo(Long value) {
+            addCriterion("account_id <>", value, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdGreaterThan(Long value) {
+            addCriterion("account_id >", value, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("account_id >=", value, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdLessThan(Long value) {
+            addCriterion("account_id <", value, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdLessThanOrEqualTo(Long value) {
+            addCriterion("account_id <=", value, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdIn(List<Long> values) {
+            addCriterion("account_id in", values, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdNotIn(List<Long> values) {
+            addCriterion("account_id not in", values, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdBetween(Long value1, Long value2) {
+            addCriterion("account_id between", value1, value2, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdNotBetween(Long value1, Long value2) {
+            addCriterion("account_id not between", value1, value2, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqUidIsNull() {
+            addCriterion("pq_uid is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqUidIsNotNull() {
+            addCriterion("pq_uid is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqUidEqualTo(Long value) {
+            addCriterion("pq_uid =", value, "pqUid");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqUidNotEqualTo(Long value) {
+            addCriterion("pq_uid <>", value, "pqUid");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqUidGreaterThan(Long value) {
+            addCriterion("pq_uid >", value, "pqUid");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqUidGreaterThanOrEqualTo(Long value) {
+            addCriterion("pq_uid >=", value, "pqUid");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqUidLessThan(Long value) {
+            addCriterion("pq_uid <", value, "pqUid");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqUidLessThanOrEqualTo(Long value) {
+            addCriterion("pq_uid <=", value, "pqUid");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqUidIn(List<Long> values) {
+            addCriterion("pq_uid in", values, "pqUid");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqUidNotIn(List<Long> values) {
+            addCriterion("pq_uid not in", values, "pqUid");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqUidBetween(Long value1, Long value2) {
+            addCriterion("pq_uid between", value1, value2, "pqUid");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqUidNotBetween(Long value1, Long value2) {
+            addCriterion("pq_uid not between", value1, value2, "pqUid");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqNameIsNull() {
+            addCriterion("pq_name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqNameIsNotNull() {
+            addCriterion("pq_name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqNameEqualTo(String value) {
+            addCriterion("pq_name =", value, "pqName");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqNameNotEqualTo(String value) {
+            addCriterion("pq_name <>", value, "pqName");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqNameGreaterThan(String value) {
+            addCriterion("pq_name >", value, "pqName");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqNameGreaterThanOrEqualTo(String value) {
+            addCriterion("pq_name >=", value, "pqName");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqNameLessThan(String value) {
+            addCriterion("pq_name <", value, "pqName");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqNameLessThanOrEqualTo(String value) {
+            addCriterion("pq_name <=", value, "pqName");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqNameLike(String value) {
+            addCriterion("pq_name like", value, "pqName");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqNameNotLike(String value) {
+            addCriterion("pq_name not like", value, "pqName");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqNameIn(List<String> values) {
+            addCriterion("pq_name in", values, "pqName");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqNameNotIn(List<String> values) {
+            addCriterion("pq_name not in", values, "pqName");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqNameBetween(String value1, String value2) {
+            addCriterion("pq_name between", value1, value2, "pqName");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqNameNotBetween(String value1, String value2) {
+            addCriterion("pq_name not between", value1, value2, "pqName");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqTelNumIsNull() {
+            addCriterion("pq_tel_num is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqTelNumIsNotNull() {
+            addCriterion("pq_tel_num is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqTelNumEqualTo(String value) {
+            addCriterion("pq_tel_num =", value, "pqTelNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqTelNumNotEqualTo(String value) {
+            addCriterion("pq_tel_num <>", value, "pqTelNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqTelNumGreaterThan(String value) {
+            addCriterion("pq_tel_num >", value, "pqTelNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqTelNumGreaterThanOrEqualTo(String value) {
+            addCriterion("pq_tel_num >=", value, "pqTelNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqTelNumLessThan(String value) {
+            addCriterion("pq_tel_num <", value, "pqTelNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqTelNumLessThanOrEqualTo(String value) {
+            addCriterion("pq_tel_num <=", value, "pqTelNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqTelNumLike(String value) {
+            addCriterion("pq_tel_num like", value, "pqTelNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqTelNumNotLike(String value) {
+            addCriterion("pq_tel_num not like", value, "pqTelNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqTelNumIn(List<String> values) {
+            addCriterion("pq_tel_num in", values, "pqTelNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqTelNumNotIn(List<String> values) {
+            addCriterion("pq_tel_num not in", values, "pqTelNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqTelNumBetween(String value1, String value2) {
+            addCriterion("pq_tel_num between", value1, value2, "pqTelNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqTelNumNotBetween(String value1, String value2) {
+            addCriterion("pq_tel_num not between", value1, value2, "pqTelNum");
+            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 andCreateTimestampIsNull() {
+            addCriterion("create_timestamp is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampIsNotNull() {
+            addCriterion("create_timestamp is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampEqualTo(Long value) {
+            addCriterion("create_timestamp =", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampNotEqualTo(Long value) {
+            addCriterion("create_timestamp <>", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampGreaterThan(Long value) {
+            addCriterion("create_timestamp >", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampGreaterThanOrEqualTo(Long value) {
+            addCriterion("create_timestamp >=", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampLessThan(Long value) {
+            addCriterion("create_timestamp <", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampLessThanOrEqualTo(Long value) {
+            addCriterion("create_timestamp <=", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampIn(List<Long> values) {
+            addCriterion("create_timestamp in", values, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampNotIn(List<Long> values) {
+            addCriterion("create_timestamp not in", values, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampBetween(Long value1, Long value2) {
+            addCriterion("create_timestamp between", value1, value2, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampNotBetween(Long value1, Long value2) {
+            addCriterion("create_timestamp not between", value1, value2, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimestampIsNull() {
+            addCriterion("update_timestamp is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimestampIsNotNull() {
+            addCriterion("update_timestamp is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimestampEqualTo(Long value) {
+            addCriterion("update_timestamp =", value, "updateTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimestampNotEqualTo(Long value) {
+            addCriterion("update_timestamp <>", value, "updateTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimestampGreaterThan(Long value) {
+            addCriterion("update_timestamp >", value, "updateTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimestampGreaterThanOrEqualTo(Long value) {
+            addCriterion("update_timestamp >=", value, "updateTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimestampLessThan(Long value) {
+            addCriterion("update_timestamp <", value, "updateTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimestampLessThanOrEqualTo(Long value) {
+            addCriterion("update_timestamp <=", value, "updateTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimestampIn(List<Long> values) {
+            addCriterion("update_timestamp in", values, "updateTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimestampNotIn(List<Long> values) {
+            addCriterion("update_timestamp not in", values, "updateTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimestampBetween(Long value1, Long value2) {
+            addCriterion("update_timestamp between", value1, value2, "updateTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimestampNotBetween(Long value1, Long value2) {
+            addCriterion("update_timestamp not between", value1, value2, "updateTimestamp");
+            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);
+        }
+    }
+}

+ 145 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformUploadVideo.java

@@ -0,0 +1,145 @@
+package com.tzld.piaoquan.api.model.po.contentplatform;
+
+public class ContentPlatformUploadVideo {
+    private Long id;
+
+    private Long videoId;
+
+    private String title;
+
+    private String cover;
+
+    private String video;
+
+    private Integer auditStatus;
+
+    private String auditReason;
+
+    private Double score;
+
+    private Integer isDelete;
+
+    private Long createAccountId;
+
+    private Long createTimestamp;
+
+    private Long updateTimestamp;
+
+    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 getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public String getCover() {
+        return cover;
+    }
+
+    public void setCover(String cover) {
+        this.cover = cover;
+    }
+
+    public String getVideo() {
+        return video;
+    }
+
+    public void setVideo(String video) {
+        this.video = video;
+    }
+
+    public Integer getAuditStatus() {
+        return auditStatus;
+    }
+
+    public void setAuditStatus(Integer auditStatus) {
+        this.auditStatus = auditStatus;
+    }
+
+    public String getAuditReason() {
+        return auditReason;
+    }
+
+    public void setAuditReason(String auditReason) {
+        this.auditReason = auditReason;
+    }
+
+    public Double getScore() {
+        return score;
+    }
+
+    public void setScore(Double score) {
+        this.score = score;
+    }
+
+    public Integer getIsDelete() {
+        return isDelete;
+    }
+
+    public void setIsDelete(Integer isDelete) {
+        this.isDelete = isDelete;
+    }
+
+    public Long getCreateAccountId() {
+        return createAccountId;
+    }
+
+    public void setCreateAccountId(Long createAccountId) {
+        this.createAccountId = createAccountId;
+    }
+
+    public Long getCreateTimestamp() {
+        return createTimestamp;
+    }
+
+    public void setCreateTimestamp(Long createTimestamp) {
+        this.createTimestamp = createTimestamp;
+    }
+
+    public Long getUpdateTimestamp() {
+        return updateTimestamp;
+    }
+
+    public void setUpdateTimestamp(Long updateTimestamp) {
+        this.updateTimestamp = updateTimestamp;
+    }
+
+    @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(", title=").append(title);
+        sb.append(", cover=").append(cover);
+        sb.append(", video=").append(video);
+        sb.append(", auditStatus=").append(auditStatus);
+        sb.append(", auditReason=").append(auditReason);
+        sb.append(", score=").append(score);
+        sb.append(", isDelete=").append(isDelete);
+        sb.append(", createAccountId=").append(createAccountId);
+        sb.append(", createTimestamp=").append(createTimestamp);
+        sb.append(", updateTimestamp=").append(updateTimestamp);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 971 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformUploadVideoExample.java

@@ -0,0 +1,971 @@
+package com.tzld.piaoquan.api.model.po.contentplatform;
+
+import com.tzld.piaoquan.growth.common.utils.page.Page;
+import java.util.ArrayList;
+import java.util.List;
+
+public class ContentPlatformUploadVideoExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    protected Page page;
+
+    public ContentPlatformUploadVideoExample() {
+        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 andTitleIsNull() {
+            addCriterion("title is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleIsNotNull() {
+            addCriterion("title is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleEqualTo(String value) {
+            addCriterion("title =", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleNotEqualTo(String value) {
+            addCriterion("title <>", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleGreaterThan(String value) {
+            addCriterion("title >", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleGreaterThanOrEqualTo(String value) {
+            addCriterion("title >=", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleLessThan(String value) {
+            addCriterion("title <", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleLessThanOrEqualTo(String value) {
+            addCriterion("title <=", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleLike(String value) {
+            addCriterion("title like", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleNotLike(String value) {
+            addCriterion("title not like", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleIn(List<String> values) {
+            addCriterion("title in", values, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleNotIn(List<String> values) {
+            addCriterion("title not in", values, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleBetween(String value1, String value2) {
+            addCriterion("title between", value1, value2, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleNotBetween(String value1, String value2) {
+            addCriterion("title not between", value1, value2, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverIsNull() {
+            addCriterion("cover is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverIsNotNull() {
+            addCriterion("cover is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverEqualTo(String value) {
+            addCriterion("cover =", value, "cover");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverNotEqualTo(String value) {
+            addCriterion("cover <>", value, "cover");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverGreaterThan(String value) {
+            addCriterion("cover >", value, "cover");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverGreaterThanOrEqualTo(String value) {
+            addCriterion("cover >=", value, "cover");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverLessThan(String value) {
+            addCriterion("cover <", value, "cover");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverLessThanOrEqualTo(String value) {
+            addCriterion("cover <=", value, "cover");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverLike(String value) {
+            addCriterion("cover like", value, "cover");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverNotLike(String value) {
+            addCriterion("cover not like", value, "cover");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverIn(List<String> values) {
+            addCriterion("cover in", values, "cover");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverNotIn(List<String> values) {
+            addCriterion("cover not in", values, "cover");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverBetween(String value1, String value2) {
+            addCriterion("cover between", value1, value2, "cover");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverNotBetween(String value1, String value2) {
+            addCriterion("cover not between", value1, value2, "cover");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIsNull() {
+            addCriterion("video is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIsNotNull() {
+            addCriterion("video is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoEqualTo(String value) {
+            addCriterion("video =", value, "video");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoNotEqualTo(String value) {
+            addCriterion("video <>", value, "video");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoGreaterThan(String value) {
+            addCriterion("video >", value, "video");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoGreaterThanOrEqualTo(String value) {
+            addCriterion("video >=", value, "video");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoLessThan(String value) {
+            addCriterion("video <", value, "video");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoLessThanOrEqualTo(String value) {
+            addCriterion("video <=", value, "video");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoLike(String value) {
+            addCriterion("video like", value, "video");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoNotLike(String value) {
+            addCriterion("video not like", value, "video");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIn(List<String> values) {
+            addCriterion("video in", values, "video");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoNotIn(List<String> values) {
+            addCriterion("video not in", values, "video");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoBetween(String value1, String value2) {
+            addCriterion("video between", value1, value2, "video");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoNotBetween(String value1, String value2) {
+            addCriterion("video not between", value1, value2, "video");
+            return (Criteria) this;
+        }
+
+        public Criteria andAuditStatusIsNull() {
+            addCriterion("audit_status is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAuditStatusIsNotNull() {
+            addCriterion("audit_status is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAuditStatusEqualTo(Integer value) {
+            addCriterion("audit_status =", value, "auditStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andAuditStatusNotEqualTo(Integer value) {
+            addCriterion("audit_status <>", value, "auditStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andAuditStatusGreaterThan(Integer value) {
+            addCriterion("audit_status >", value, "auditStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andAuditStatusGreaterThanOrEqualTo(Integer value) {
+            addCriterion("audit_status >=", value, "auditStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andAuditStatusLessThan(Integer value) {
+            addCriterion("audit_status <", value, "auditStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andAuditStatusLessThanOrEqualTo(Integer value) {
+            addCriterion("audit_status <=", value, "auditStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andAuditStatusIn(List<Integer> values) {
+            addCriterion("audit_status in", values, "auditStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andAuditStatusNotIn(List<Integer> values) {
+            addCriterion("audit_status not in", values, "auditStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andAuditStatusBetween(Integer value1, Integer value2) {
+            addCriterion("audit_status between", value1, value2, "auditStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andAuditStatusNotBetween(Integer value1, Integer value2) {
+            addCriterion("audit_status not between", value1, value2, "auditStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andAuditReasonIsNull() {
+            addCriterion("audit_reason is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAuditReasonIsNotNull() {
+            addCriterion("audit_reason is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAuditReasonEqualTo(String value) {
+            addCriterion("audit_reason =", value, "auditReason");
+            return (Criteria) this;
+        }
+
+        public Criteria andAuditReasonNotEqualTo(String value) {
+            addCriterion("audit_reason <>", value, "auditReason");
+            return (Criteria) this;
+        }
+
+        public Criteria andAuditReasonGreaterThan(String value) {
+            addCriterion("audit_reason >", value, "auditReason");
+            return (Criteria) this;
+        }
+
+        public Criteria andAuditReasonGreaterThanOrEqualTo(String value) {
+            addCriterion("audit_reason >=", value, "auditReason");
+            return (Criteria) this;
+        }
+
+        public Criteria andAuditReasonLessThan(String value) {
+            addCriterion("audit_reason <", value, "auditReason");
+            return (Criteria) this;
+        }
+
+        public Criteria andAuditReasonLessThanOrEqualTo(String value) {
+            addCriterion("audit_reason <=", value, "auditReason");
+            return (Criteria) this;
+        }
+
+        public Criteria andAuditReasonLike(String value) {
+            addCriterion("audit_reason like", value, "auditReason");
+            return (Criteria) this;
+        }
+
+        public Criteria andAuditReasonNotLike(String value) {
+            addCriterion("audit_reason not like", value, "auditReason");
+            return (Criteria) this;
+        }
+
+        public Criteria andAuditReasonIn(List<String> values) {
+            addCriterion("audit_reason in", values, "auditReason");
+            return (Criteria) this;
+        }
+
+        public Criteria andAuditReasonNotIn(List<String> values) {
+            addCriterion("audit_reason not in", values, "auditReason");
+            return (Criteria) this;
+        }
+
+        public Criteria andAuditReasonBetween(String value1, String value2) {
+            addCriterion("audit_reason between", value1, value2, "auditReason");
+            return (Criteria) this;
+        }
+
+        public Criteria andAuditReasonNotBetween(String value1, String value2) {
+            addCriterion("audit_reason not between", value1, value2, "auditReason");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreIsNull() {
+            addCriterion("score is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreIsNotNull() {
+            addCriterion("score is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreEqualTo(Double value) {
+            addCriterion("score =", value, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreNotEqualTo(Double value) {
+            addCriterion("score <>", value, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreGreaterThan(Double value) {
+            addCriterion("score >", value, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreGreaterThanOrEqualTo(Double value) {
+            addCriterion("score >=", value, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreLessThan(Double value) {
+            addCriterion("score <", value, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreLessThanOrEqualTo(Double value) {
+            addCriterion("score <=", value, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreIn(List<Double> values) {
+            addCriterion("score in", values, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreNotIn(List<Double> values) {
+            addCriterion("score not in", values, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreBetween(Double value1, Double value2) {
+            addCriterion("score between", value1, value2, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreNotBetween(Double value1, Double value2) {
+            addCriterion("score not between", value1, value2, "score");
+            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 andCreateAccountIdIsNull() {
+            addCriterion("create_account_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateAccountIdIsNotNull() {
+            addCriterion("create_account_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateAccountIdEqualTo(Long value) {
+            addCriterion("create_account_id =", value, "createAccountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateAccountIdNotEqualTo(Long value) {
+            addCriterion("create_account_id <>", value, "createAccountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateAccountIdGreaterThan(Long value) {
+            addCriterion("create_account_id >", value, "createAccountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateAccountIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("create_account_id >=", value, "createAccountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateAccountIdLessThan(Long value) {
+            addCriterion("create_account_id <", value, "createAccountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateAccountIdLessThanOrEqualTo(Long value) {
+            addCriterion("create_account_id <=", value, "createAccountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateAccountIdIn(List<Long> values) {
+            addCriterion("create_account_id in", values, "createAccountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateAccountIdNotIn(List<Long> values) {
+            addCriterion("create_account_id not in", values, "createAccountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateAccountIdBetween(Long value1, Long value2) {
+            addCriterion("create_account_id between", value1, value2, "createAccountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateAccountIdNotBetween(Long value1, Long value2) {
+            addCriterion("create_account_id not between", value1, value2, "createAccountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampIsNull() {
+            addCriterion("create_timestamp is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampIsNotNull() {
+            addCriterion("create_timestamp is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampEqualTo(Long value) {
+            addCriterion("create_timestamp =", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampNotEqualTo(Long value) {
+            addCriterion("create_timestamp <>", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampGreaterThan(Long value) {
+            addCriterion("create_timestamp >", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampGreaterThanOrEqualTo(Long value) {
+            addCriterion("create_timestamp >=", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampLessThan(Long value) {
+            addCriterion("create_timestamp <", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampLessThanOrEqualTo(Long value) {
+            addCriterion("create_timestamp <=", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampIn(List<Long> values) {
+            addCriterion("create_timestamp in", values, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampNotIn(List<Long> values) {
+            addCriterion("create_timestamp not in", values, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampBetween(Long value1, Long value2) {
+            addCriterion("create_timestamp between", value1, value2, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampNotBetween(Long value1, Long value2) {
+            addCriterion("create_timestamp not between", value1, value2, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimestampIsNull() {
+            addCriterion("update_timestamp is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimestampIsNotNull() {
+            addCriterion("update_timestamp is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimestampEqualTo(Long value) {
+            addCriterion("update_timestamp =", value, "updateTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimestampNotEqualTo(Long value) {
+            addCriterion("update_timestamp <>", value, "updateTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimestampGreaterThan(Long value) {
+            addCriterion("update_timestamp >", value, "updateTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimestampGreaterThanOrEqualTo(Long value) {
+            addCriterion("update_timestamp >=", value, "updateTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimestampLessThan(Long value) {
+            addCriterion("update_timestamp <", value, "updateTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimestampLessThanOrEqualTo(Long value) {
+            addCriterion("update_timestamp <=", value, "updateTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimestampIn(List<Long> values) {
+            addCriterion("update_timestamp in", values, "updateTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimestampNotIn(List<Long> values) {
+            addCriterion("update_timestamp not in", values, "updateTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimestampBetween(Long value1, Long value2) {
+            addCriterion("update_timestamp between", value1, value2, "updateTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimestampNotBetween(Long value1, Long value2) {
+            addCriterion("update_timestamp not between", value1, value2, "updateTimestamp");
+            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);
+        }
+    }
+}

+ 14 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/vo/SignatureVO.java

@@ -0,0 +1,14 @@
+package com.tzld.piaoquan.api.model.vo;
+
+import com.tzld.piaoquan.api.config.AliOssConfig;
+import lombok.Data;
+
+@Data
+public class SignatureVO {
+    private String accessId;
+    private String policy;
+    private String signature;
+    private String fileName;
+    private String host;
+    private String expire;
+}

+ 20 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/vo/StsTokenVO.java

@@ -0,0 +1,20 @@
+package com.tzld.piaoquan.api.model.vo;
+
+import lombok.Data;
+
+@Data
+public class StsTokenVO {
+    private String Expiration;
+    private String AccessKeyId;
+    private String AccessKeySecret;
+    private String SecurityToken;
+    private String RequestId;
+    private String FileName;
+    private String Host;
+    private String[] Hosts;
+    private String Bucket;
+    private String Region;
+    private Boolean Cname;
+    private Long serverTimestamp;
+
+}

+ 51 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/vo/contentplatform/UploadVideoItemVO.java

@@ -0,0 +1,51 @@
+package com.tzld.piaoquan.api.model.vo.contentplatform;
+
+import com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformUploadVideo;
+import com.tzld.piaoquan.api.util.CdnUtil;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.apache.commons.lang3.StringUtils;
+
+@Data
+public class UploadVideoItemVO {
+    @ApiModelProperty(value = "id")
+    private Long id;
+    @ApiModelProperty(value = "视频Id")
+    private Long videoId;
+    @ApiModelProperty(value = "视频标题")
+    private String title;
+    @ApiModelProperty(value = "视频封面")
+    private String coverUrl;
+    @ApiModelProperty(value = "视频url")
+    private String videoUrl;
+    @ApiModelProperty(value = "创建时间")
+    private Long createTimeStamp;
+    @ApiModelProperty(value = "审核状态 0-待审核 1-审核中 2-审核通过 3-审核不通过")
+    private Integer auditStatus;
+    @ApiModelProperty(value = "审核不通过原因")
+    private String auditReason;
+
+    public static UploadVideoItemVO convert(ContentPlatformUploadVideo uploadVideo) {
+        if (uploadVideo == null) {
+            return null;
+        }
+        UploadVideoItemVO uploadVideoItemVO = new UploadVideoItemVO();
+        uploadVideoItemVO.setId(uploadVideo.getId());
+        uploadVideoItemVO.setVideoId(uploadVideo.getVideoId());
+        uploadVideoItemVO.setTitle(uploadVideo.getTitle());
+        uploadVideoItemVO.setCoverUrl(uploadVideo.getCover());
+        uploadVideoItemVO.setVideoUrl(uploadVideo.getVideo());
+        uploadVideoItemVO.setCreateTimeStamp(uploadVideo.getCreateTimestamp());
+        uploadVideoItemVO.setAuditStatus(uploadVideo.getAuditStatus());
+        uploadVideoItemVO.setAuditReason(uploadVideo.getAuditReason());
+        if (StringUtils.isNotBlank(uploadVideoItemVO.getCoverUrl())
+                && !uploadVideoItemVO.getCoverUrl().startsWith("http")) {
+            uploadVideoItemVO.setCoverUrl(CdnUtil.VIDEO_CDN_URL_HOST + uploadVideoItemVO.getCoverUrl());
+        }
+        if (StringUtils.isNotBlank(uploadVideoItemVO.getVideoUrl())
+                && !uploadVideoItemVO.getVideoUrl().startsWith("http")) {
+            uploadVideoItemVO.setVideoUrl(CdnUtil.VIDEO_CDN_URL_HOST + uploadVideoItemVO.getVideoUrl());
+        }
+        return uploadVideoItemVO;
+    }
+}

+ 26 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/vo/contentplatform/WxBaseUserInfoVO.java

@@ -0,0 +1,26 @@
+package com.tzld.piaoquan.api.model.vo.contentplatform;
+
+import lombok.Data;
+
+@Data
+public class WxBaseUserInfoVO {
+
+	// 用户编号,目前来源于REDIS中分布式主键ID,暂时不与现有用户数据打通,未来有需要则要在登陆时同步为现有用户数据
+	private Long uid;
+	// 第三方用户昵称,因为昵称中可能带有emoji图片,所以此处用utf8mb4格式存储
+	private String nickName;
+	//// 头像地址
+	//private String avatarUrl;
+	//// 凭证
+	//private String accessToken;
+	//// 性别(1是男性,2是女性,0是未知)
+	//private int gender;
+	//private String country;
+	//private String province;
+	//private String city;
+	private String phoneNumber;
+	//private String userCode;
+	//private String openId;
+	//
+	//private Integer authType;
+}

+ 6 - 1
api-module/src/main/java/com/tzld/piaoquan/api/service/contentplatform/ContentPlatformPlanService.java

@@ -23,7 +23,10 @@ public interface ContentPlatformPlanService {
         if (StringUtils.hasText(video.getCustomCover())) {
             return video.getCustomCover();
         }
-        return video.getCover().substring(0, video.getCover().indexOf("?"));
+        if (video.getCover().contains("?")) {
+            return video.getCover().substring(0, video.getCover().indexOf("?"));
+        }
+        return video.getCover();
     }
 
     Page<GzhPlanItemVO> gzhPlanList(GzhPlanListParam param);
@@ -32,6 +35,8 @@ public interface ContentPlatformPlanService {
 
     Page<VideoContentItemVO> getVideoContentList(VideoContentListParam param);
 
+    Page<VideoContentItemVO> getUploadVideoContentList(VideoContentListParam param);
+
     List<String> getVideoContentCategoryList();
 
     List<String> getVideoContentCoverFrameList(VideoContentCoverFrameParam param);

+ 14 - 0
api-module/src/main/java/com/tzld/piaoquan/api/service/contentplatform/ContentPlatformSettingService.java

@@ -0,0 +1,14 @@
+package com.tzld.piaoquan.api.service.contentplatform;
+
+import com.tzld.piaoquan.api.model.param.contentplatform.WxWebLoginParam;
+import com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformPqAccountRel;
+import com.tzld.piaoquan.api.model.vo.contentplatform.WxBaseUserInfoVO;
+
+public interface ContentPlatformSettingService {
+
+    WxBaseUserInfoVO wxLoginByWeb(WxWebLoginParam param);
+
+    WxBaseUserInfoVO getBindPQUserInfo();
+
+    ContentPlatformPqAccountRel getPqAccountRel(Long accountId);
+}

+ 23 - 0
api-module/src/main/java/com/tzld/piaoquan/api/service/contentplatform/ContentPlatformUploadContentService.java

@@ -0,0 +1,23 @@
+package com.tzld.piaoquan.api.service.contentplatform;
+
+import com.tzld.piaoquan.api.model.param.contentplatform.DeleteVideoParam;
+import com.tzld.piaoquan.api.model.param.contentplatform.PublishVideoParam;
+import com.tzld.piaoquan.api.model.param.contentplatform.UploadVideoListParam;
+import com.tzld.piaoquan.api.model.param.contentplatform.VideoAuditCallBackParam;
+import com.tzld.piaoquan.api.model.vo.contentplatform.UploadVideoItemVO;
+import com.tzld.piaoquan.growth.common.utils.page.Page;
+
+public interface ContentPlatformUploadContentService {
+
+    UploadVideoItemVO publishVideo(PublishVideoParam param);
+
+    UploadVideoItemVO createVideo(PublishVideoParam param);
+
+    UploadVideoItemVO updateVideo(PublishVideoParam param);
+
+    void deleteVideo(DeleteVideoParam param);
+
+    void videoAuditCallBack(VideoAuditCallBackParam param);
+
+    Page<UploadVideoItemVO> uploadVideoList(UploadVideoListParam param);
+}

+ 24 - 2
api-module/src/main/java/com/tzld/piaoquan/api/service/contentplatform/impl/ContentPlatformPlanServiceImpl.java

@@ -78,7 +78,7 @@ public class ContentPlatformPlanServiceImpl implements ContentPlatformPlanServic
     @Autowired
     private AigcApiService aigcApiService;
     @Autowired
-    private ManagerApiService managerApiService;
+    private VideoApiService videoApiService;
     @Autowired
     private MessageAttachmentService messageAttachmentService;
     @Autowired
@@ -575,6 +575,28 @@ public class ContentPlatformPlanServiceImpl implements ContentPlatformPlanServic
         return videoDataStatAggMapper.selectByExample(example);
     }
 
+    @Override
+    public Page<VideoContentItemVO> getUploadVideoContentList(VideoContentListParam param) {
+        ContentPlatformAccount user = LoginUserContext.getUser();
+        Page<VideoContentItemVO> result = new Page<>(param.getPageNum(), param.getPageSize());
+        int offset = (param.getPageNum() - 1) * param.getPageSize();
+        String datastatDt = planMapperExt.getVideoDatastatMaxDt();
+        int count = planMapperExt.getUploadVideoCount(param, user.getId());
+        result.setTotalSize(count);
+        if (count == 0) {
+            result.setObjs(new ArrayList<>());
+            return result;
+        }
+        String sort = getVideoContentListSort(param.getSort());
+        String type = getVideoContentListType(param.getType());
+        String channel = getVideoContentListChannel(param.getSort(), user.getChannel());
+        List<ContentPlatformVideo> videoList = planMapperExt.getUploadVideoList(param, user.getId(), datastatDt,
+                type, channel, offset, param.getPageSize(), sort);
+        List<VideoContentItemVO> list = buildVideoContentItemVOList(videoList, type, channel, user.getChannel(), datastatDt);
+        result.setObjs(list);
+        return result;
+    }
+
     @Override
     public List<String> getVideoContentCategoryList() {
         String dt = planMapperExt.getVideoMaxDt();
@@ -583,7 +605,7 @@ public class ContentPlatformPlanServiceImpl implements ContentPlatformPlanServic
 
     @Override
     public List<String> getVideoContentCoverFrameList(VideoContentCoverFrameParam param) {
-        return managerApiService.getCoverImagePaths(param.getVideoId());
+        return videoApiService.getCoverImagePaths(param.getVideoId());
     }
 
     @Override

+ 92 - 0
api-module/src/main/java/com/tzld/piaoquan/api/service/contentplatform/impl/ContentPlatformSettingServiceImpl.java

@@ -0,0 +1,92 @@
+package com.tzld.piaoquan.api.service.contentplatform.impl;
+
+import com.tzld.piaoquan.api.common.enums.ExceptionEnum;
+import com.tzld.piaoquan.api.common.exception.CommonException;
+import com.tzld.piaoquan.api.component.VideoApiService;
+import com.tzld.piaoquan.api.dao.mapper.contentplatform.ContentPlatformPqAccountRelMapper;
+import com.tzld.piaoquan.api.model.config.LoginUserContext;
+import com.tzld.piaoquan.api.model.param.contentplatform.WxWebLoginParam;
+import com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformAccount;
+import com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformPqAccountRel;
+import com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformPqAccountRelExample;
+import com.tzld.piaoquan.api.model.vo.contentplatform.WxBaseUserInfoVO;
+import com.tzld.piaoquan.api.service.contentplatform.ContentPlatformSettingService;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Objects;
+
+@Slf4j
+@Service
+public class ContentPlatformSettingServiceImpl implements ContentPlatformSettingService {
+
+    @Autowired
+    private ContentPlatformPqAccountRelMapper pqAccountRelMapper;
+    @Autowired
+    VideoApiService videoApiService;
+
+    @Override
+    public WxBaseUserInfoVO wxLoginByWeb(WxWebLoginParam param) {
+        ContentPlatformAccount user = LoginUserContext.getUser();
+        // 调用webLogin接口 登录/注册 票圈用户
+        WxBaseUserInfoVO wxBaseUserInfoVO = videoApiService.webLogin(param.getCode(), param.getAppType(), param.getAppId(), param.getMachineCode());
+        if (Objects.isNull(wxBaseUserInfoVO)) {
+            throw new CommonException(ExceptionEnum.PQ_LOGIN_FAIL);
+        }
+        ContentPlatformPqAccountRel pqAccountRel = getPqAccountRel(user.getId());
+        if (Objects.nonNull(pqAccountRel)) {
+            wxBaseUserInfoVO = new WxBaseUserInfoVO();
+            wxBaseUserInfoVO.setUid(pqAccountRel.getPqUid());
+            wxBaseUserInfoVO.setNickName(pqAccountRel.getPqName());
+            return wxBaseUserInfoVO;
+        }
+        pqAccountRel = new ContentPlatformPqAccountRel();
+        pqAccountRel.setAccountId(user.getId());
+        pqAccountRel.setPqUid(wxBaseUserInfoVO.getUid());
+        pqAccountRel.setPqName(wxBaseUserInfoVO.getNickName());
+        pqAccountRel.setPqTelNum(StringUtils.isBlank(wxBaseUserInfoVO.getPhoneNumber()) ? user.getTelNum() : wxBaseUserInfoVO.getPhoneNumber());
+        pqAccountRel.setCreateTimestamp(System.currentTimeMillis());
+        pqAccountRel.setUpdateTimestamp(System.currentTimeMillis());
+        pqAccountRelMapper.insertSelective(pqAccountRel);
+        // 异步修改手机号
+        if (StringUtils.isBlank(wxBaseUserInfoVO.getPhoneNumber())) {
+            asyncUpdatePqAccountTelNum(wxBaseUserInfoVO.getUid(), user.getTelNum());
+        }
+
+        return wxBaseUserInfoVO;
+    }
+
+    private void asyncUpdatePqAccountTelNum(Long uid, String telNum) {
+        // 修改票圈用户手机号
+        new Thread(() -> videoApiService.saveUserPhoneNumber(uid, telNum)).start();
+    }
+
+    @Override
+    public ContentPlatformPqAccountRel getPqAccountRel(Long accountId) {
+        ContentPlatformPqAccountRelExample example = new ContentPlatformPqAccountRelExample();
+        example.createCriteria().andAccountIdEqualTo(accountId).andStatusEqualTo(1);
+        List<ContentPlatformPqAccountRel> pqAccountRelList = pqAccountRelMapper.selectByExample(example);
+        if (CollectionUtils.isEmpty(pqAccountRelList)) {
+            return null;
+        }
+        return pqAccountRelList.get(0);
+    }
+
+    @Override
+    public WxBaseUserInfoVO getBindPQUserInfo() {
+        ContentPlatformAccount user = LoginUserContext.getUser();
+        ContentPlatformPqAccountRel pqAccountRel = getPqAccountRel(user.getId());
+        if (Objects.isNull(pqAccountRel)) {
+            return null;
+        }
+        WxBaseUserInfoVO wxBaseUserInfoVO = new WxBaseUserInfoVO();
+        wxBaseUserInfoVO.setUid(pqAccountRel.getPqUid());
+        wxBaseUserInfoVO.setNickName(pqAccountRel.getPqName());
+        return wxBaseUserInfoVO;
+    }
+
+}

+ 252 - 0
api-module/src/main/java/com/tzld/piaoquan/api/service/contentplatform/impl/ContentPlatformUploadContentServiceImpl.java

@@ -0,0 +1,252 @@
+package com.tzld.piaoquan.api.service.contentplatform.impl;
+
+import com.tzld.piaoquan.api.common.enums.ExceptionEnum;
+import com.tzld.piaoquan.api.common.enums.contentplatform.UploadVideoAuditStatusEnum;
+import com.tzld.piaoquan.api.common.exception.CommonException;
+import com.tzld.piaoquan.api.component.VideoApiService;
+import com.tzld.piaoquan.api.dao.mapper.contentplatform.ContentPlatformGzhPlanVideoMapper;
+import com.tzld.piaoquan.api.dao.mapper.contentplatform.ContentPlatformQwPlanVideoMapper;
+import com.tzld.piaoquan.api.dao.mapper.contentplatform.ContentPlatformUploadVideoMapper;
+import com.tzld.piaoquan.api.model.config.LoginUserContext;
+import com.tzld.piaoquan.api.model.param.contentplatform.DeleteVideoParam;
+import com.tzld.piaoquan.api.model.param.contentplatform.PublishVideoParam;
+import com.tzld.piaoquan.api.model.param.contentplatform.UploadVideoListParam;
+import com.tzld.piaoquan.api.model.param.contentplatform.VideoAuditCallBackParam;
+import com.tzld.piaoquan.api.model.po.contentplatform.*;
+import com.tzld.piaoquan.api.model.vo.contentplatform.UploadVideoItemVO;
+import com.tzld.piaoquan.api.service.contentplatform.ContentPlatformSettingService;
+import com.tzld.piaoquan.api.service.contentplatform.ContentPlatformUploadContentService;
+import com.tzld.piaoquan.api.util.CdnUtil;
+import com.tzld.piaoquan.growth.common.utils.page.Page;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+@Slf4j
+@Service
+public class ContentPlatformUploadContentServiceImpl implements ContentPlatformUploadContentService {
+
+    @Autowired
+    ContentPlatformUploadVideoMapper uploadVideoMapper;
+    @Autowired
+    ContentPlatformSettingService settingService;
+    @Autowired
+    VideoApiService videoApiService;
+    @Autowired
+    ContentPlatformGzhPlanVideoMapper gzhPlanVideoMapper;
+    @Autowired
+    ContentPlatformQwPlanVideoMapper qwPlanVideoMapper;
+
+    @Override
+    public UploadVideoItemVO publishVideo(PublishVideoParam param) {
+        if (param.getVideoId() != null) {
+            return updateVideo(param);
+        } else {
+            return createVideo(param);
+        }
+    }
+
+    @Override
+    public UploadVideoItemVO createVideo(PublishVideoParam param) {
+        ContentPlatformAccount user = LoginUserContext.getUser();
+        ContentPlatformPqAccountRel pqAccountRel = settingService.getPqAccountRel(user.getId());
+        if (pqAccountRel == null) {
+            throw new CommonException(ExceptionEnum.PQ_ACCOUNT_NOT_BINDING);
+        }
+        if (StringUtils.isBlank(param.getTitle())
+                || StringUtils.isBlank(param.getCoverUrl())
+                || StringUtils.isBlank(param.getVideoUrl())) {
+            throw new CommonException(ExceptionEnum.PARAM_ERROR);
+        }
+        if (!param.getCoverUrl().startsWith("http")) {
+            param.setCoverUrl(CdnUtil.VIDEO_CDN_URL_HOST + param.getCoverUrl());
+        }
+        // 调用视频发布 获取videoId
+        Long videoId = videoApiService.publishVideo(pqAccountRel.getPqUid(), param.getVideoUrl(), param.getCoverUrl(), param.getTitle());
+        if (videoId == null) {
+            throw new CommonException(ExceptionEnum.VIDEO_PUBLISH_FAILED);
+        }
+        if (!param.getVideoUrl().startsWith("http")) {
+            param.setVideoUrl(CdnUtil.VIDEO_CDN_URL_HOST + param.getVideoUrl());
+        }
+        ContentPlatformUploadVideo uploadVideo = new ContentPlatformUploadVideo();
+        uploadVideo.setVideoId(videoId);
+        uploadVideo.setTitle(param.getTitle());
+        uploadVideo.setCover(param.getCoverUrl());
+        uploadVideo.setVideo(param.getVideoUrl());
+        uploadVideo.setAuditStatus(UploadVideoAuditStatusEnum.WAIT_AUDIT.getVal());
+        uploadVideo.setCreateAccountId(user.getId());
+        uploadVideo.setCreateTimestamp(System.currentTimeMillis());
+        uploadVideo.setUpdateTimestamp(System.currentTimeMillis());
+        uploadVideoMapper.insertSelective(uploadVideo);
+        return UploadVideoItemVO.convert(uploadVideo);
+    }
+
+    @Override
+    public UploadVideoItemVO updateVideo(PublishVideoParam param) {
+        ContentPlatformAccount user = LoginUserContext.getUser();
+        ContentPlatformUploadVideo uploadVideo = getUploadVideo(param.getVideoId());
+        if (uploadVideo == null) {
+            return null;
+        }
+        if (StringUtils.isBlank(param.getTitle())
+                || StringUtils.isBlank(param.getCoverUrl())
+                || StringUtils.isBlank(param.getVideoUrl())) {
+            throw new CommonException(ExceptionEnum.PARAM_ERROR);
+        }
+        if (!param.getCoverUrl().startsWith("http")) {
+            param.setCoverUrl(CdnUtil.VIDEO_CDN_URL_HOST + param.getCoverUrl());
+        }
+        if (!param.getVideoUrl().startsWith("http")) {
+            param.setVideoUrl(CdnUtil.VIDEO_CDN_URL_HOST + param.getVideoUrl());
+        }
+        // 调用修改视频接口
+        ContentPlatformPqAccountRel pqAccountRel = settingService.getPqAccountRel(user.getId());
+        videoApiService.updateVideo(pqAccountRel.getPqUid(), uploadVideo.getVideoId(), param.getCoverUrl(), param.getTitle());
+        // save
+        uploadVideo.setTitle(param.getTitle());
+        uploadVideo.setCover(param.getCoverUrl());
+        uploadVideo.setAuditStatus(UploadVideoAuditStatusEnum.AUDITING.getVal());
+        uploadVideo.setUpdateTimestamp(System.currentTimeMillis());
+        uploadVideoMapper.updateByPrimaryKeySelective(uploadVideo);
+        return UploadVideoItemVO.convert(uploadVideo);
+    }
+
+    private ContentPlatformUploadVideo getUploadVideo(Long videoId) {
+        ContentPlatformUploadVideoExample example = new ContentPlatformUploadVideoExample();
+        example.createCriteria().andVideoIdEqualTo(videoId);
+        List<ContentPlatformUploadVideo> uploadVideos = uploadVideoMapper.selectByExample(example);
+        if (CollectionUtils.isEmpty(uploadVideos)) {
+            return null;
+        }
+        return uploadVideos.get(0);
+    }
+
+    @Override
+    public void deleteVideo(DeleteVideoParam param) {
+        ContentPlatformAccount user = LoginUserContext.getUser();
+        ContentPlatformUploadVideo uploadVideo = getUploadVideo(param.getVideoId());
+        if (uploadVideo == null) {
+            return;
+        }
+        // 检查视频是否被引用
+        if (checkVideoCited(uploadVideo)) {
+            throw new CommonException(ExceptionEnum.VIDEO_CITED);
+        }
+        uploadVideo.setIsDelete(1);
+        uploadVideo.setUpdateTimestamp(System.currentTimeMillis());
+        uploadVideoMapper.updateByPrimaryKeySelective(uploadVideo);
+        // 调用删除视频接口
+        ContentPlatformPqAccountRel pqAccountRel = settingService.getPqAccountRel(user.getId());
+        videoApiService.deleteVideo(pqAccountRel.getPqUid(), uploadVideo.getVideoId());
+    }
+
+    private Boolean checkVideoCited(ContentPlatformUploadVideo uploadVideo) {
+        Boolean result = false;
+        ContentPlatformGzhPlanVideoExample example = new ContentPlatformGzhPlanVideoExample();
+        example.createCriteria().andVideoIdEqualTo(uploadVideo.getVideoId());
+        List<ContentPlatformGzhPlanVideo> gzhPlanVideos = gzhPlanVideoMapper.selectByExample(example);
+        if (CollectionUtils.isNotEmpty(gzhPlanVideos)) {
+            result = true;
+            return result;
+        }
+        ContentPlatformQwPlanVideoExample qwPlanVideoExample = new ContentPlatformQwPlanVideoExample();
+        qwPlanVideoExample.createCriteria().andVideoIdEqualTo(uploadVideo.getVideoId());
+        List<ContentPlatformQwPlanVideo> qwPlanVideos = qwPlanVideoMapper.selectByExample(qwPlanVideoExample);
+        if (CollectionUtils.isNotEmpty(qwPlanVideos)) {
+            result = true;
+        }
+        return result;
+    }
+
+    @Override
+    public void videoAuditCallBack(VideoAuditCallBackParam param) {
+        ContentPlatformUploadVideo uploadVideo = getUploadVideo(param.getVideoId());
+        if (uploadVideo == null) {
+            return;
+        }
+        // 转化审核状态
+        Integer auditStatus = UploadVideoAuditStatusEnum.parsePqAuditStatus(param.getAuditStatus());
+        uploadVideo.setAuditStatus(auditStatus);
+        // 更改审核失败原因
+        if (auditStatus.equals(UploadVideoAuditStatusEnum.AUDIT_REJECT.getVal())) {
+            String auditReason = parseAuditReason(param.getReason());
+            uploadVideo.setAuditReason(auditReason);
+        }
+        uploadVideo.setUpdateTimestamp(System.currentTimeMillis());
+        uploadVideoMapper.updateByPrimaryKeySelective(uploadVideo);
+    }
+
+    private String parseAuditReason(String auditReason) {
+        if (StringUtils.isBlank(auditReason)) {
+            return "内容违规";
+        }
+        if (auditReason.contains("标题")) {
+            return "标题违规";
+        } else if (auditReason.contains("封面")) {
+            return "封面违规";
+        } else {
+            return "内容违规";
+        }
+    }
+
+    @Override
+    public Page<UploadVideoItemVO> uploadVideoList(UploadVideoListParam param) {
+        ContentPlatformAccount user = LoginUserContext.getUser();
+        Page<UploadVideoItemVO> result = new Page<>(param.getPageNum(), param.getPageSize());
+        Long count = getUploadVideoCount(param, user.getId());
+        result.setTotalSize(count.intValue());
+        if (count == 0) {
+            result.setObjs(new ArrayList<>());
+            return result;
+        }
+        List<ContentPlatformUploadVideo> videoList = getUploadVideoList(param, user.getId());
+        List<UploadVideoItemVO> list = buildUploadVideoItemVOList(videoList);
+        result.setObjs(list);
+        return result;
+    }
+
+    private Long getUploadVideoCount(UploadVideoListParam param, Long accountId) {
+        ContentPlatformUploadVideoExample example = new ContentPlatformUploadVideoExample();
+        ContentPlatformUploadVideoExample.Criteria criteria = example.createCriteria();
+        if (param.getAuditStatus() != null) {
+            criteria.andAuditStatusEqualTo(param.getAuditStatus());
+        }
+        if (StringUtils.isNotBlank(param.getTitle())) {
+            criteria.andTitleLike("%" + param.getTitle() + "%");
+        }
+        criteria.andCreateAccountIdEqualTo(accountId);
+        criteria.andIsDeleteEqualTo(0);
+        return uploadVideoMapper.countByExample(example);
+    }
+
+    private List<ContentPlatformUploadVideo> getUploadVideoList(UploadVideoListParam param, Long id) {
+        ContentPlatformUploadVideoExample example = new ContentPlatformUploadVideoExample();
+        ContentPlatformUploadVideoExample.Criteria criteria = example.createCriteria();
+        if (param.getAuditStatus() != null) {
+            criteria.andAuditStatusEqualTo(param.getAuditStatus());
+        }
+        if (StringUtils.isNotBlank(param.getTitle())) {
+            criteria.andTitleLike("%" + param.getTitle() + "%");
+        }
+        criteria.andCreateAccountIdEqualTo(id);
+        criteria.andIsDeleteEqualTo(0);
+        example.setOrderByClause("create_timestamp desc");
+        example.setPage(new Page<>(param.getPageNum(), param.getPageSize()));
+        return uploadVideoMapper.selectByExample(example);
+    }
+
+    private List<UploadVideoItemVO> buildUploadVideoItemVOList(List<ContentPlatformUploadVideo> videoList) {
+        if (CollectionUtils.isEmpty(videoList)) {
+            return new ArrayList<>();
+        }
+        return videoList.stream().map(UploadVideoItemVO::convert).collect(Collectors.toList());
+    }
+
+}

+ 129 - 36
api-module/src/main/java/com/tzld/piaoquan/api/util/AliOssFileTool.java

@@ -27,9 +27,12 @@ import com.stuuudy.commons.util.CompressImage;
 import com.stuuudy.commons.util.MD5.Md5Util;
 import com.stuuudy.commons.util.exception.CommonsException;
 import com.stuuudy.commons.util.exception.EnumErrorException;
-import com.tzld.piaoquan.api.config.AliOssConfig;
 import com.tzld.piaoquan.api.common.enums.EnumUploadFileType;
+import com.tzld.piaoquan.api.config.AliOssConfig;
+import com.tzld.piaoquan.api.model.vo.SignatureVO;
+import com.tzld.piaoquan.api.model.vo.StsTokenVO;
 import com.tzld.piaoquan.growth.common.utils.DateUtils;
+import com.tzld.piaoquan.growth.common.utils.RandomUtil;
 import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang3.StringUtils;
@@ -513,6 +516,7 @@ public class AliOssFileTool extends AliOssConfig {
         }
         return "";
     }
+
     /**
      * (重命名文件,实现是先拷贝文件,再删掉旧的文件)<BR>
      * 方法名:renameFile<BR>
@@ -737,48 +741,45 @@ public class AliOssFileTool extends AliOssConfig {
         }
     }
 
-    public static Map<String, String> getUploadPolicy(String fileName, Integer fileType, String bucketName)
-            throws Exception {
-
+    public static SignatureVO getUploadPolicy(Integer fileType) throws Exception {
+        // 后台随机生成唯一文件名
+        String env = PropertiesUtils.getProjectEnv();
+        if (StringUtils.isEmpty(env)) {
+            env = "qa";
+        }
+        String fileName = RandomUtil.generate18String();
+        String contentType = "";
         if (EnumUploadFileType.VIDEO.getIntType().equals(fileType)) {
-            fileName = "/video/" + fileName;
+            fileName = "/video/" + env + "/" + DateUtils.dateToStringyyyyMMdd(new Date()) + "/" + fileName;
         } else if (EnumUploadFileType.VOICE.getIntType().equals(fileType)) {
-            fileName = "/voice/" + fileName;
-        } else if (EnumUploadFileType.FILE.getIntType().equals(fileType)) {
-            fileName = "/file/" + fileName;
+            fileName = "/voice/" + env + "/" + DateUtils.dateToStringyyyyMMdd(new Date()) + "/" + fileName;
         } else {
-            fileName = "/pic/" + fileName;
+            fileName = "/pic/" + env + "/" + DateUtils.dateToStringyyyyMMdd(new Date()) + "/" + fileName;
         }
-        // String host = "http://" + bucket + "." + AliOssConfig.getOssEndPoint();
-
         long expireTime = 60 * 60 * 4;
         long expireEndTime = System.currentTimeMillis() + expireTime * 1000;
         Date expiration = new Date(expireEndTime);
         PolicyConditions policyConds = new PolicyConditions();
-        policyConds.addConditionItem(PolicyConditions.COND_CONTENT_LENGTH_RANGE, 0, 5261334938L);
-
-        policyConds.addConditionItem(MatchMode.StartWith, PolicyConditions.COND_KEY,
+        //4.95G  上限是5个G
+        policyConds.addConditionItem(PolicyConditions.COND_CONTENT_LENGTH_RANGE, 0, 5261334938l);
+        policyConds.addConditionItem(MatchMode.Exact, PolicyConditions.COND_KEY,
                 AliOssConfig.getProjectName() + fileName);
+        if (!StringUtils.isEmpty(contentType)) {
+            policyConds.addConditionItem(PolicyConditions.COND_CONTENT_TYPE, contentType);
+        }
+
         String postPolicy = AliOssConfig.getOssClient().generatePostPolicy(expiration, policyConds);
         byte[] binaryData = postPolicy.getBytes("utf-8");
         String encodedPolicy = BinaryUtil.toBase64String(binaryData);
         String postSignature = AliOssConfig.getOssClient().calculatePostSignature(postPolicy);
-        Map<String, String> respMap = new LinkedHashMap<String, String>();
-        respMap.put("accessId", AliOssConfig.getAccessKeyId());
-        respMap.put("policy", encodedPolicy);
-        respMap.put("signature", postSignature);
-        respMap.put("fileName", AliOssConfig.getProjectName() + fileName);
-
-        if ("clipres".equals(bucketName)) {
-            respMap.put("host", PropertiesUtils.getValue("oss.clipres.upload.domain"));
-        } else {
-            respMap.put("host", AliOssConfig.getLvvideoDomain());
-        }
-
-        // respMap.put("host", "https://oss.zuluki.com");
-        // respMap.put("callback", getCallBackStr(signUploadParams));
-        respMap.put("expire", String.valueOf(expireEndTime / 1000));
-        return respMap;
+        SignatureVO signatureVO = new SignatureVO();
+        signatureVO.setAccessId(AliOssConfig.getAccessKeyId());
+        signatureVO.setPolicy(encodedPolicy);
+        signatureVO.setSignature(postSignature);
+        signatureVO.setFileName(AliOssConfig.getProjectName() + fileName);
+        signatureVO.setHost(AliOssConfig.getUploadDomain());
+        signatureVO.setExpire(String.valueOf(expireEndTime / 1000));
+        return signatureVO;
     }
 
     public static String getSignaturedUrl(String fileName, Boolean isPrivate) {
@@ -1140,7 +1141,7 @@ public class AliOssFileTool extends AliOssConfig {
 //		Date expiration = new Date(new Date().getTime() +( 60) * 1000);
         // 生成以GET方法访问的签名URL,访客可以直接通过浏览器访问相关内容。
 
-        URL url = getOssReadOnlyClient().generatePresignedUrl(PropertiesUtils.getVideoBucket(),
+        URL url = getOssReadOnlyClient().generatePresignedUrl(BasePropertiesUtils.getVideoBucket(),
                 filePath, expiration, HttpMethod.GET);
         String path = url.getFile();
         if (StringUtils.startsWith(path, "/")) {
@@ -1152,7 +1153,7 @@ public class AliOssFileTool extends AliOssConfig {
 
     public static String saveObjectFromInternal(InputStream inputStream, String fullKey)
             throws OSSException, ClientException, IOException {
-        String bucketName = PropertiesUtils.getVideoBucket();
+        String bucketName = BasePropertiesUtils.getVideoBucket();
         getInternalOssClient().putObject(bucketName, fullKey, inputStream);
         return fullKey;
     }
@@ -1219,7 +1220,7 @@ public class AliOssFileTool extends AliOssConfig {
             try {
                 ossInternalClient.restoreObject(bucket, srckey);
             } catch (Exception e) {
-                // TODO Auto-generated catch blockvideo-common/src/main/java/com/weiqu/video/common/enums/ExceptionCodeEnum.java
+                // TODO OSS Auto-generated catch blockvideo-common/src/main/java/com/weiqu/video/common/enums/ExceptionCodeEnum.java
 //				e.printStackTrace();
                 logger.error("视频可能在解冻中");
             }
@@ -1241,7 +1242,7 @@ public class AliOssFileTool extends AliOssConfig {
         try {
             isRestoreCompleted = objectMetadata.isRestoreCompleted();
         } catch (Exception e) {
-            // TODO Auto-generated catch block
+            // TODO OSS Auto-generated catch block
 //			e.printStackTrace();
             logger.error("视频可能在解冻中");
         }
@@ -1261,7 +1262,7 @@ public class AliOssFileTool extends AliOssConfig {
             return -1;
         }
         String realPath = path.replace(PropertiesUtils.getDownloadDomain(), "");
-        String bucketName = PropertiesUtils.getVideoBucket();
+        String bucketName = BasePropertiesUtils.getVideoBucket();
         ObjectMetadata objectMetadata = null;
         try {
             objectMetadata = getInternalOssClient().getObjectMetadata(bucketName, realPath);
@@ -1295,7 +1296,7 @@ public class AliOssFileTool extends AliOssConfig {
 
 
     public static Map<String, Object> getMediaAllInfo(String inPath) {
-        return getMediaAllInfo(inPath, PropertiesUtils.getVideoBucket());
+        return getMediaAllInfo(inPath, BasePropertiesUtils.getVideoBucket());
     }
 
     public static Map<String, Object> getMediaAllInfo(String inPath, String bucketName) {
@@ -1379,5 +1380,97 @@ public class AliOssFileTool extends AliOssConfig {
         return getInternalOssClient().copyObject(request);
     }
 
+    public static String getRandomObjectKey(Integer fileType) {
+        String env = PropertiesUtils.getProjectEnv();
+        if (StringUtils.isEmpty(env)) {
+            env = "qa";
+        }
+        String fileName = RandomUtil.generate18String();
+        if (EnumUploadFileType.VIDEO.getIntType().equals(fileType)) {
+            fileName = "/video/" + env + "/" + DateUtils.dateToStringyyyyMMdd(new Date()) + "/" + fileName;
+        } else if (EnumUploadFileType.VOICE.getIntType().equals(fileType)) {
+            fileName = "/voice/" + env + "/" + DateUtils.dateToStringyyyyMMdd(new Date()) + "/" + fileName;
+        } else {
+            fileName = "/pic/" + env + "/" + DateUtils.dateToStringyyyyMMdd(new Date()) + "/" + fileName;
+        }
+        return getProjectName() + fileName;
+    }
+
+    public static StsTokenVO getStsToken(String fileName, Long durationSeconds) {
+
+        String endpoint = BasePropertiesUtils.getLongvideoStsEndpoint();
+        String accessKeyId = BasePropertiesUtils.getLongvideoStsAccessKeyId();
+        String accessKeySecret = BasePropertiesUtils.getLongvideoStsAccessKeySecret();
+        String roleArn = BasePropertiesUtils.getLongvideoStsRoleArn();
+        String roleSessionName = BasePropertiesUtils.getLongvideoStsSessionName();
+        StsTokenVO result = new StsTokenVO();
+        try {
+            String region = "cn-hangzhou";
+            DefaultProfile.addEndpoint("", "", "Sts", endpoint);
+            IClientProfile profile = DefaultProfile.getProfile("", accessKeyId, accessKeySecret);
+            DefaultAcsClient client = new DefaultAcsClient(profile);
+            final AssumeRoleRequest request = new AssumeRoleRequest();
+            request.setMethod(MethodType.POST);
+            request.setRoleArn(roleArn);
+            request.setRoleSessionName(roleSessionName);
+            //设置过期时间 临时访问凭证的有效时间,单位为秒。最小值为900,最大值以当前角色设定的最大会话时间为准。角色最大会话时间取值范围为3600秒~43200秒
+            if (Objects.nonNull(durationSeconds)) {
+                request.setDurationSeconds(durationSeconds);
+            }
+            JSONObject policy = getUploadFileStsPolicy(BasePropertiesUtils.getVideoBucket(), fileName);
+            request.setPolicy(policy.toJSONString());
+
+            final AssumeRoleResponse response = client.getAcsResponse(request);
+            result.setExpiration(response.getCredentials().getExpiration());
+            result.setAccessKeyId(response.getCredentials().getAccessKeyId());
+            result.setAccessKeySecret(response.getCredentials().getAccessKeySecret());
+            result.setSecurityToken(response.getCredentials().getSecurityToken());
+            result.setRequestId(response.getRequestId());
+            result.setFileName(fileName);
+            result.setHost(AliOssConfig.getUploadDomain());
+
+            String host0 = BasePropertiesUtils.getOssaccelerateUploadDomain();
+            String host1 = "https://" + AliOssConfig.getBucket(EnumPublicBuckets.PUBBUCKET.getBucketName()) + "." + AliOssConfig.getOssEndPoint() + "/";
+            result.setHosts(new String[]{host0, host1});
+
+            result.setBucket(BasePropertiesUtils.getVideoBucket());
+            result.setRegion(region);
+            result.setCname(true);
+
+            // 返回服务器当前时间
+            result.setServerTimestamp(System.currentTimeMillis());
+
+        } catch (com.aliyuncs.exceptions.ClientException e) {
+            logger.error(String.format("获取临时令牌失败,errorCode:%s;errorMessage:%s;requestId:%s",
+                    e.getErrCode(), e.getErrMsg(), e.getRequestId()));
+        } catch (Exception e) {
+            logger.error("获取临时令牌失败", e);
+        }
+        return result;
+    }
+
+    private static JSONObject getUploadFileStsPolicy(String bucketName, String fileName) {
+
+        JSONObject policy = new JSONObject();
+        policy.put("Version", "1");
+
+        JSONArray statements = new JSONArray();
+        JSONObject statement = new JSONObject();
+        statement.put("Effect", "Allow");
+
+        JSONArray action = new JSONArray();
+        action.add("oss:PutObject");
+
+        statement.put("Action", action);
+        JSONArray resource = new JSONArray();
+        resource.add("acs:oss:*:1894469520484605:" + bucketName + "/" + fileName);
+        statement.put("Resource", resource);
+
+        statements.add(statement);
+        policy.put("Statement", statements);
+
+        logger.info(String.format("Policy:%s", JSON.toJSONString(policy)));
+        return policy;
+    }
 
 }

+ 72 - 0
api-module/src/main/java/com/tzld/piaoquan/api/util/BasePropertiesUtils.java

@@ -0,0 +1,72 @@
+package com.tzld.piaoquan.api.util;
+
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+
+@Slf4j
+public class BasePropertiesUtils {
+
+    public static Properties properties;
+
+    static {
+        Properties mainProperties = new Properties();
+        properties = new Properties();
+        try {
+            InputStream mainStream = BasePropertiesUtils.class.getClassLoader().getResourceAsStream("application.properties");
+            mainProperties.load(mainStream);
+            // 先通过虚拟机参数 -Denv=value去取配置文件的值
+            // 如果没有设置-Denv的虚拟机参数则说明是本地开发环境,则读取application.properties文件中spring.profiles.active的值
+            String env = System.getProperty("env");
+            if (StringUtils.isEmpty(env)) {
+                env = mainProperties.getProperty("spring.profiles.active");
+            }
+            if (StringUtils.isEmpty(env)) {
+                log.error("设置spring.profiles.active or 设置虚拟机启动参数 -Denv错误!!!");
+                System.exit(1);
+            }
+            InputStream activeStream = BasePropertiesUtils.class.getClassLoader().getResourceAsStream("application.properties");
+            properties.load(activeStream);
+            log.info("开发环境为: " + env);
+        } catch (IOException e) {
+            log.error(e.getMessage());
+            System.exit(1);
+        }
+    }
+
+    public static Properties getProperties() {
+        return properties;
+    }
+
+    public static String getVideoBucket() {
+        return getProperties().getProperty("oss.video.bucket");
+    }
+
+    public static String getLongvideoStsEndpoint() {
+        return getProperties().getProperty("oss.longvideo.video.sts.endpoint");
+    }
+
+    public static String getLongvideoStsAccessKeyId() {
+        return getProperties().getProperty("oss.longvideo.video.sts.accessKeyId");
+    }
+
+    public static String getLongvideoStsAccessKeySecret() {
+        return getProperties().getProperty("oss.longvideo.video.sts.accessKeySecret");
+    }
+
+    public static String getLongvideoStsRoleArn() {
+        return getProperties().getProperty("oss.longvideo.video.sts.roleArn");
+    }
+
+    public static String getLongvideoStsSessionName() {
+        return getProperties().getProperty("oss.longvideo.video.sts.roleSessionName");
+    }
+
+    public static String getOssaccelerateUploadDomain() {
+        return getProperties().getProperty("ossaccelerate.upload.domain");
+    }
+
+}

+ 9 - 1
api-module/src/main/resources/application.properties

@@ -87,4 +87,12 @@ oss.growth.pubBucket=public:art-pubbucket,publicVideo:art-pubbucket
 oss.growth.priBucket=private:art-pribucket,privateVideo:art-privideo,privateVideoIn:art-privideo-in
 oss.growth.priEndPoint=pricdn.yishihui.com
 oss.growth.needPress=true
-oss.growth.internal.endPoint=oss-cn-hangzhou.aliyuncs.com
+oss.growth.internal.endPoint=oss-cn-hangzhou.aliyuncs.com
+cdn.upload.domain=https://weappupload.piaoquantv.com/
+oss.longvideo.video.sts.endpoint=sts.cn-hangzhou.aliyuncs.com
+oss.longvideo.video.sts.accessKeyId=LTAIfZYdxeQpq3YI
+oss.longvideo.video.sts.accessKeySecret=1yISVWe5Gws2VAdTMc9XWIHpjPd7ja
+oss.longvideo.video.sts.roleArn=acs:ram::1894469520484605:role/oss-sts
+oss.longvideo.video.sts.roleSessionName=session-name
+ossaccelerate.upload.domain=https://ossaccelerateupload.piaoquantv.com/
+oss.video.bucket=art-pubbucket

+ 263 - 0
api-module/src/main/resources/mapper/contentplatform/ContentPlatformPqAccountRelMapper.xml

@@ -0,0 +1,263 @@
+<?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.api.dao.mapper.contentplatform.ContentPlatformPqAccountRelMapper">
+  <resultMap id="BaseResultMap" type="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformPqAccountRel">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="account_id" jdbcType="BIGINT" property="accountId" />
+    <result column="pq_uid" jdbcType="BIGINT" property="pqUid" />
+    <result column="pq_name" jdbcType="VARCHAR" property="pqName" />
+    <result column="pq_tel_num" jdbcType="VARCHAR" property="pqTelNum" />
+    <result column="status" jdbcType="INTEGER" property="status" />
+    <result column="create_timestamp" jdbcType="BIGINT" property="createTimestamp" />
+    <result column="update_timestamp" jdbcType="BIGINT" property="updateTimestamp" />
+  </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, account_id, pq_uid, pq_name, pq_tel_num, `status`, create_timestamp, update_timestamp
+  </sql>
+  <select id="selectByExample" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformPqAccountRelExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from content_platform_pq_account_rel
+    <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 content_platform_pq_account_rel
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from content_platform_pq_account_rel
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformPqAccountRelExample">
+    delete from content_platform_pq_account_rel
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformPqAccountRel"
+          useGeneratedKeys="true" keyProperty="id">
+    insert into content_platform_pq_account_rel (id, account_id, pq_uid, 
+      pq_name, pq_tel_num, `status`, 
+      create_timestamp, update_timestamp)
+    values (#{id,jdbcType=BIGINT}, #{accountId,jdbcType=BIGINT}, #{pqUid,jdbcType=BIGINT}, 
+      #{pqName,jdbcType=VARCHAR}, #{pqTelNum,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, 
+      #{createTimestamp,jdbcType=BIGINT}, #{updateTimestamp,jdbcType=BIGINT})
+  </insert>
+  <insert id="insertSelective" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformPqAccountRel"
+          useGeneratedKeys="true" keyProperty="id">
+    insert into content_platform_pq_account_rel
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="accountId != null">
+        account_id,
+      </if>
+      <if test="pqUid != null">
+        pq_uid,
+      </if>
+      <if test="pqName != null">
+        pq_name,
+      </if>
+      <if test="pqTelNum != null">
+        pq_tel_num,
+      </if>
+      <if test="status != null">
+        `status`,
+      </if>
+      <if test="createTimestamp != null">
+        create_timestamp,
+      </if>
+      <if test="updateTimestamp != null">
+        update_timestamp,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=BIGINT},
+      </if>
+      <if test="accountId != null">
+        #{accountId,jdbcType=BIGINT},
+      </if>
+      <if test="pqUid != null">
+        #{pqUid,jdbcType=BIGINT},
+      </if>
+      <if test="pqName != null">
+        #{pqName,jdbcType=VARCHAR},
+      </if>
+      <if test="pqTelNum != null">
+        #{pqTelNum,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        #{status,jdbcType=INTEGER},
+      </if>
+      <if test="createTimestamp != null">
+        #{createTimestamp,jdbcType=BIGINT},
+      </if>
+      <if test="updateTimestamp != null">
+        #{updateTimestamp,jdbcType=BIGINT},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformPqAccountRelExample" resultType="java.lang.Long">
+    select count(*) from content_platform_pq_account_rel
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update content_platform_pq_account_rel
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.accountId != null">
+        account_id = #{record.accountId,jdbcType=BIGINT},
+      </if>
+      <if test="record.pqUid != null">
+        pq_uid = #{record.pqUid,jdbcType=BIGINT},
+      </if>
+      <if test="record.pqName != null">
+        pq_name = #{record.pqName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.pqTelNum != null">
+        pq_tel_num = #{record.pqTelNum,jdbcType=VARCHAR},
+      </if>
+      <if test="record.status != null">
+        `status` = #{record.status,jdbcType=INTEGER},
+      </if>
+      <if test="record.createTimestamp != null">
+        create_timestamp = #{record.createTimestamp,jdbcType=BIGINT},
+      </if>
+      <if test="record.updateTimestamp != null">
+        update_timestamp = #{record.updateTimestamp,jdbcType=BIGINT},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update content_platform_pq_account_rel
+    set id = #{record.id,jdbcType=BIGINT},
+      account_id = #{record.accountId,jdbcType=BIGINT},
+      pq_uid = #{record.pqUid,jdbcType=BIGINT},
+      pq_name = #{record.pqName,jdbcType=VARCHAR},
+      pq_tel_num = #{record.pqTelNum,jdbcType=VARCHAR},
+      `status` = #{record.status,jdbcType=INTEGER},
+      create_timestamp = #{record.createTimestamp,jdbcType=BIGINT},
+      update_timestamp = #{record.updateTimestamp,jdbcType=BIGINT}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformPqAccountRel">
+    update content_platform_pq_account_rel
+    <set>
+      <if test="accountId != null">
+        account_id = #{accountId,jdbcType=BIGINT},
+      </if>
+      <if test="pqUid != null">
+        pq_uid = #{pqUid,jdbcType=BIGINT},
+      </if>
+      <if test="pqName != null">
+        pq_name = #{pqName,jdbcType=VARCHAR},
+      </if>
+      <if test="pqTelNum != null">
+        pq_tel_num = #{pqTelNum,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        `status` = #{status,jdbcType=INTEGER},
+      </if>
+      <if test="createTimestamp != null">
+        create_timestamp = #{createTimestamp,jdbcType=BIGINT},
+      </if>
+      <if test="updateTimestamp != null">
+        update_timestamp = #{updateTimestamp,jdbcType=BIGINT},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformPqAccountRel">
+    update content_platform_pq_account_rel
+    set account_id = #{accountId,jdbcType=BIGINT},
+      pq_uid = #{pqUid,jdbcType=BIGINT},
+      pq_name = #{pqName,jdbcType=VARCHAR},
+      pq_tel_num = #{pqTelNum,jdbcType=VARCHAR},
+      `status` = #{status,jdbcType=INTEGER},
+      create_timestamp = #{createTimestamp,jdbcType=BIGINT},
+      update_timestamp = #{updateTimestamp,jdbcType=BIGINT}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 328 - 0
api-module/src/main/resources/mapper/contentplatform/ContentPlatformUploadVideoMapper.xml

@@ -0,0 +1,328 @@
+<?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.api.dao.mapper.contentplatform.ContentPlatformUploadVideoMapper">
+  <resultMap id="BaseResultMap" type="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformUploadVideo">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="video_id" jdbcType="BIGINT" property="videoId" />
+    <result column="title" jdbcType="VARCHAR" property="title" />
+    <result column="cover" jdbcType="VARCHAR" property="cover" />
+    <result column="video" jdbcType="VARCHAR" property="video" />
+    <result column="audit_status" jdbcType="INTEGER" property="auditStatus" />
+    <result column="audit_reason" jdbcType="VARCHAR" property="auditReason" />
+    <result column="score" jdbcType="DOUBLE" property="score" />
+    <result column="is_delete" jdbcType="INTEGER" property="isDelete" />
+    <result column="create_account_id" jdbcType="BIGINT" property="createAccountId" />
+    <result column="create_timestamp" jdbcType="BIGINT" property="createTimestamp" />
+    <result column="update_timestamp" jdbcType="BIGINT" property="updateTimestamp" />
+  </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, title, cover, video, audit_status, audit_reason, score, is_delete, 
+    create_account_id, create_timestamp, update_timestamp
+  </sql>
+  <select id="selectByExample" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformUploadVideoExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from content_platform_upload_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 content_platform_upload_video
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from content_platform_upload_video
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformUploadVideoExample">
+    delete from content_platform_upload_video
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformUploadVideo"
+          useGeneratedKeys="true" keyProperty="id">
+    insert into content_platform_upload_video (id, video_id, title, 
+      cover, video, audit_status, 
+      audit_reason, score, is_delete, 
+      create_account_id, create_timestamp, update_timestamp
+      )
+    values (#{id,jdbcType=BIGINT}, #{videoId,jdbcType=BIGINT}, #{title,jdbcType=VARCHAR}, 
+      #{cover,jdbcType=VARCHAR}, #{video,jdbcType=VARCHAR}, #{auditStatus,jdbcType=INTEGER}, 
+      #{auditReason,jdbcType=VARCHAR}, #{score,jdbcType=DOUBLE}, #{isDelete,jdbcType=INTEGER}, 
+      #{createAccountId,jdbcType=BIGINT}, #{createTimestamp,jdbcType=BIGINT}, #{updateTimestamp,jdbcType=BIGINT}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformUploadVideo"
+          useGeneratedKeys="true" keyProperty="id">
+    insert into content_platform_upload_video
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="videoId != null">
+        video_id,
+      </if>
+      <if test="title != null">
+        title,
+      </if>
+      <if test="cover != null">
+        cover,
+      </if>
+      <if test="video != null">
+        video,
+      </if>
+      <if test="auditStatus != null">
+        audit_status,
+      </if>
+      <if test="auditReason != null">
+        audit_reason,
+      </if>
+      <if test="score != null">
+        score,
+      </if>
+      <if test="isDelete != null">
+        is_delete,
+      </if>
+      <if test="createAccountId != null">
+        create_account_id,
+      </if>
+      <if test="createTimestamp != null">
+        create_timestamp,
+      </if>
+      <if test="updateTimestamp != null">
+        update_timestamp,
+      </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="title != null">
+        #{title,jdbcType=VARCHAR},
+      </if>
+      <if test="cover != null">
+        #{cover,jdbcType=VARCHAR},
+      </if>
+      <if test="video != null">
+        #{video,jdbcType=VARCHAR},
+      </if>
+      <if test="auditStatus != null">
+        #{auditStatus,jdbcType=INTEGER},
+      </if>
+      <if test="auditReason != null">
+        #{auditReason,jdbcType=VARCHAR},
+      </if>
+      <if test="score != null">
+        #{score,jdbcType=DOUBLE},
+      </if>
+      <if test="isDelete != null">
+        #{isDelete,jdbcType=INTEGER},
+      </if>
+      <if test="createAccountId != null">
+        #{createAccountId,jdbcType=BIGINT},
+      </if>
+      <if test="createTimestamp != null">
+        #{createTimestamp,jdbcType=BIGINT},
+      </if>
+      <if test="updateTimestamp != null">
+        #{updateTimestamp,jdbcType=BIGINT},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformUploadVideoExample" resultType="java.lang.Long">
+    select count(*) from content_platform_upload_video
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update content_platform_upload_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.title != null">
+        title = #{record.title,jdbcType=VARCHAR},
+      </if>
+      <if test="record.cover != null">
+        cover = #{record.cover,jdbcType=VARCHAR},
+      </if>
+      <if test="record.video != null">
+        video = #{record.video,jdbcType=VARCHAR},
+      </if>
+      <if test="record.auditStatus != null">
+        audit_status = #{record.auditStatus,jdbcType=INTEGER},
+      </if>
+      <if test="record.auditReason != null">
+        audit_reason = #{record.auditReason,jdbcType=VARCHAR},
+      </if>
+      <if test="record.score != null">
+        score = #{record.score,jdbcType=DOUBLE},
+      </if>
+      <if test="record.isDelete != null">
+        is_delete = #{record.isDelete,jdbcType=INTEGER},
+      </if>
+      <if test="record.createAccountId != null">
+        create_account_id = #{record.createAccountId,jdbcType=BIGINT},
+      </if>
+      <if test="record.createTimestamp != null">
+        create_timestamp = #{record.createTimestamp,jdbcType=BIGINT},
+      </if>
+      <if test="record.updateTimestamp != null">
+        update_timestamp = #{record.updateTimestamp,jdbcType=BIGINT},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update content_platform_upload_video
+    set id = #{record.id,jdbcType=BIGINT},
+      video_id = #{record.videoId,jdbcType=BIGINT},
+      title = #{record.title,jdbcType=VARCHAR},
+      cover = #{record.cover,jdbcType=VARCHAR},
+      video = #{record.video,jdbcType=VARCHAR},
+      audit_status = #{record.auditStatus,jdbcType=INTEGER},
+      audit_reason = #{record.auditReason,jdbcType=VARCHAR},
+      score = #{record.score,jdbcType=DOUBLE},
+      is_delete = #{record.isDelete,jdbcType=INTEGER},
+      create_account_id = #{record.createAccountId,jdbcType=BIGINT},
+      create_timestamp = #{record.createTimestamp,jdbcType=BIGINT},
+      update_timestamp = #{record.updateTimestamp,jdbcType=BIGINT}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformUploadVideo">
+    update content_platform_upload_video
+    <set>
+      <if test="videoId != null">
+        video_id = #{videoId,jdbcType=BIGINT},
+      </if>
+      <if test="title != null">
+        title = #{title,jdbcType=VARCHAR},
+      </if>
+      <if test="cover != null">
+        cover = #{cover,jdbcType=VARCHAR},
+      </if>
+      <if test="video != null">
+        video = #{video,jdbcType=VARCHAR},
+      </if>
+      <if test="auditStatus != null">
+        audit_status = #{auditStatus,jdbcType=INTEGER},
+      </if>
+      <if test="auditReason != null">
+        audit_reason = #{auditReason,jdbcType=VARCHAR},
+      </if>
+      <if test="score != null">
+        score = #{score,jdbcType=DOUBLE},
+      </if>
+      <if test="isDelete != null">
+        is_delete = #{isDelete,jdbcType=INTEGER},
+      </if>
+      <if test="createAccountId != null">
+        create_account_id = #{createAccountId,jdbcType=BIGINT},
+      </if>
+      <if test="createTimestamp != null">
+        create_timestamp = #{createTimestamp,jdbcType=BIGINT},
+      </if>
+      <if test="updateTimestamp != null">
+        update_timestamp = #{updateTimestamp,jdbcType=BIGINT},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformUploadVideo">
+    update content_platform_upload_video
+    set video_id = #{videoId,jdbcType=BIGINT},
+      title = #{title,jdbcType=VARCHAR},
+      cover = #{cover,jdbcType=VARCHAR},
+      video = #{video,jdbcType=VARCHAR},
+      audit_status = #{auditStatus,jdbcType=INTEGER},
+      audit_reason = #{auditReason,jdbcType=VARCHAR},
+      score = #{score,jdbcType=DOUBLE},
+      is_delete = #{isDelete,jdbcType=INTEGER},
+      create_account_id = #{createAccountId,jdbcType=BIGINT},
+      create_timestamp = #{createTimestamp,jdbcType=BIGINT},
+      update_timestamp = #{updateTimestamp,jdbcType=BIGINT}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 30 - 0
api-module/src/main/resources/mapper/contentplatform/ext/ContentPlatformPlanMapperExt.xml

@@ -370,5 +370,35 @@
         where video.video_id = #{videoId} and plan.`status` = 1
     </select>
 
+    <select id="getUploadVideoCount" resultType="java.lang.Integer">
+        select count(1)
+        from content_platform_upload_video
+        where audit_status = 2 and create_account_id = #{createAccountId} and is_delete = 0
+        <if test="param.title!= null and param.title!= ''">
+            and title like concat('%', #{param.title}, '%')
+        </if>
+    </select>
+
+    <select id="getUploadVideoList"
+            resultType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformVideo">
+        select video.*
+        from content_platform_upload_video video
+        left join content_platform_video_datastat_agg datastat
+        on datastat.dt = #{datastatDt} and datastat.type = #{type} and datastat.channel = #{channel} and datastat.video_id = video.video_id
+        where video.audit_status = 2 and video.create_account_id = #{createAccountId} and video.is_delete = 0
+        <if test="param.title!= null and param.title!= ''">
+            and video.title like concat('%', #{param.title}, '%')
+        </if>
+        order by ${sort}
+        limit #{offset}, #{pageSize}
+    </select>
+
+    <update id="updateUploadVideoStatusWithOldStatus">
+        update content_platform_upload_video
+        set audit_status = #{status},
+            update_timestamp = #{now}
+        where video_id = #{videoId}
+    </update>
+
 
 </mapper>

+ 4 - 2
api-module/src/main/resources/mybatis-api-contentPlatform-generator-config.xml

@@ -73,8 +73,10 @@
 <!--        <table tableName="content_platform_video_agg" domainObjectName="ContentPlatformVideoAgg" alias=""/>-->
 <!--        <table tableName="content_platform_video_datastat" domainObjectName="ContentPlatformVideoDataStat" alias=""/>-->
 <!--        <table tableName="content_platform_video_datastat_agg" domainObjectName="ContentPlatformVideoDataStatAgg" alias=""/>-->
-        <table tableName="content_platform_illegal_video" domainObjectName="ContentPlatformIllegalVideo" alias=""/>
-        <table tableName="content_platform_illegal_msg" domainObjectName="ContentPlatformIllegalMsg" alias=""/>
+<!--        <table tableName="content_platform_illegal_video" domainObjectName="ContentPlatformIllegalVideo" alias=""/>-->
+<!--        <table tableName="content_platform_illegal_msg" domainObjectName="ContentPlatformIllegalMsg" alias=""/>-->
+<!--        <table tableName="content_platform_pq_account_rel" domainObjectName="ContentPlatformPqAccountRel" alias=""/>-->
+        <table tableName="content_platform_upload_video" domainObjectName="ContentPlatformUploadVideo" alias=""/>
     </context>
 
 </generatorConfiguration>

+ 64 - 0
common-module/src/main/java/com/tzld/piaoquan/growth/common/utils/RandomUtil.java

@@ -0,0 +1,64 @@
+package com.tzld.piaoquan.growth.common.utils;
+
+import java.math.BigDecimal;
+import java.util.Calendar;
+import java.util.Random;
+import java.util.UUID;
+
+public class RandomUtil {
+
+	public static final String ALLNUMBER = "0123456789";  
+	public static final String ALLCHAR = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";  
+	public static final Integer FIXLENG=18;
+    /** 
+     * 返回一个定长的随机字符串(只包含大小写字母、数字)
+     *  随机字符串长度
+     * @return 随机字符串 
+     */  
+    public static String generate18String() {  
+        StringBuffer sb = new StringBuffer();  
+        Random random = new Random();  
+        for (int i = 0; i < FIXLENG; i++) {  
+            sb.append(ALLCHAR.charAt(random.nextInt(ALLCHAR.length())));  
+        }  
+        return sb.toString();  
+    } 
+    
+    public static void main(String[] args) {
+		//System.out.println(generate18String())
+        String proportion="0.01";
+        Long price=150l;
+        Double incomeMoney=price*(Double.valueOf(proportion));
+        System.out.println(incomeMoney);
+
+
+        BigDecimal b = new BigDecimal(incomeMoney);
+        Long t = b.setScale(0,BigDecimal.ROUND_HALF_UP).longValue();
+        System.out.println(t);
+
+    	
+	}
+    
+    public static String generateString(int length) {  
+        StringBuffer sb = new StringBuffer();  
+        Random random = new Random();  
+        for (int i = 0; i < length; i++) {  
+            sb.append(ALLCHAR.charAt(random.nextInt(ALLCHAR.length())));  
+        }  
+        return sb.toString();  
+    }
+    
+    public static String generateNumber(int length) {  
+        StringBuffer sb = new StringBuffer();  
+        Random random = new Random();  
+        for (int i = 0; i < length; i++) {  
+            sb.append(ALLNUMBER.charAt(random.nextInt(ALLNUMBER.length())));  
+        }  
+        return sb.toString();  
+    } 
+    
+    public static String getRandomUUIDStr() {
+		return UUID.randomUUID().toString().replaceAll("-", "")+Calendar.getInstance().getTimeInMillis();
+	}
+
+}