yumeng %!s(int64=5) %!d(string=hai) anos
pai
achega
41ad4ac074

+ 12 - 13
module-common/src/main/java/cn/com/ctop/common/module/enums/MaterialEnum.java

@@ -3,24 +3,24 @@ package cn.com.ctop.common.module.enums;
 public enum MaterialEnum {
 
 
-    VerticalVideoSmall(1, 720L, 1280L),
-    VerticalVideoBig(1, 1080L, 1920L),
-    HorizontalVideoSmall(2, 1280L, 720L),
-    HorizontalVideoBig(2, 1920L, 1080L);
+    VerticalVideoSmall(1, 720, 1280),
+    VerticalVideoBig(1, 1080, 1920),
+    HorizontalVideoSmall(2, 1280, 720),
+    HorizontalVideoBig(2, 1920, 1080);
 
     private Integer type;
-    private Long width;
-    private Long height;
+    private Integer width;
+    private Integer height;
 
 
-    private MaterialEnum(Integer type, Long width, Long height) {
+    private MaterialEnum(Integer type, Integer width, Integer height) {
         this.type = type;
         this.width = width;
         this.width = width;
         this.height = height;
     }
 
-    public static Integer getTypeBySize(Long width, Long height) {
+    public static Integer getTypeBySize(Integer width, Integer height) {
         for (MaterialEnum material : MaterialEnum.values()) {
             if (width == material.width && height == material.height) {
                 return material.type;
@@ -31,7 +31,6 @@ public enum MaterialEnum {
     }
 
 
-
     public Integer getType() {
         return type;
     }
@@ -40,19 +39,19 @@ public enum MaterialEnum {
         this.type = type;
     }
 
-    public Long getWidth() {
+    public Integer getWidth() {
         return width;
     }
 
-    public void setWidth(Long width) {
+    public void setWidth(Integer width) {
         this.width = width;
     }
 
-    public Long getHeight() {
+    public Integer getHeight() {
         return height;
     }
 
-    public void setHeight(Long height) {
+    public void setHeight(Integer height) {
         this.height = height;
     }
 }

+ 4 - 4
module-ctop/src/main/java/cn/com/ctop/manage/modules/material/service/impl/MaterialUploadServiceImpl.java

@@ -186,11 +186,11 @@ public class MaterialUploadServiceImpl implements IMaterialUploadService {
                                                     imageGet.setId(accountId + signature);
                                                     imageGet.setAccountId(accountId);
                                                     imageGet.setUrl(dataJson.getString("url"));
-                                                    imageGet.setWidth(dataJson.getLong("width"));
-                                                    imageGet.setHeight(dataJson.getLong("height"));
-                                                    imageGet.setSize(dataJson.getLong("size"));
+                                                    imageGet.setWidth(dataJson.getInteger("width"));
+                                                    imageGet.setHeight(dataJson.getInteger("height"));
+                                                    imageGet.setSize(dataJson.getInteger("size"));
                                                     imageGet.setFormat(dataJson.getString("format"));
-                                                    Integer type = MaterialEnum.getTypeBySize(dataJson.getLong("width"), dataJson.getLong("height"));
+                                                    Integer type = MaterialEnum.getTypeBySize(dataJson.getInteger("width"), dataJson.getInteger("height"));
                                                     if (!Check.isNull(type)) {
                                                         imageGet.setMaterialType(type);
                                                     }

+ 3 - 3
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/entity/KuaiShouImageGet.java

@@ -49,19 +49,19 @@ public class KuaiShouImageGet {
      */
     @Excel(name = "宽", width = 15)
     @ApiModelProperty(value = "宽")
-    private Long width;
+    private Integer width;
     /**
      * 高
      */
     @Excel(name = "高", width = 15)
     @ApiModelProperty(value = "高")
-    private Long height;
+    private Integer height;
     /**
      * 图片大小
      */
     @Excel(name = "图片大小", width = 15)
     @ApiModelProperty(value = "图片大小")
-    private Long size;
+    private Integer size;
     /**
      * 图片格式
      */

+ 2 - 2
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/entity/KuaiShouVideoGet.java

@@ -49,13 +49,13 @@ public class KuaiShouVideoGet {
      */
     @Excel(name = "宽", width = 15)
     @ApiModelProperty(value = "宽")
-    private Long width;
+    private Integer width;
     /**
      * 高
      */
     @Excel(name = "高", width = 15)
     @ApiModelProperty(value = "高")
-    private Long height;
+    private Integer height;
     /**
      * 视频预览链接
      */

+ 12 - 12
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaishouInterfaceServiceImpl.java

@@ -1905,8 +1905,8 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
                                 KuaiShouVideoGet videoGet = new KuaiShouVideoGet();
                                 videoGet.setId(detailJson.getString("photo_id"));
                                 videoGet.setAccountId(advertiserId);
-                                videoGet.setWidth(detailJson.getLong("width"));
-                                videoGet.setHeight(detailJson.getLong("height"));
+                                videoGet.setWidth(detailJson.getInteger("width"));
+                                videoGet.setHeight(detailJson.getInteger("height"));
                                 videoGet.setUrl(detailJson.getString("url"));
                                 videoGet.setCoverUrl(detailJson.getString("creative_name"));
                                 videoGet.setPhotoId(detailJson.getString("photo_id"));
@@ -2459,12 +2459,12 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
                                 KuaiShouVideoGet videoGet = new KuaiShouVideoGet();
                                 videoGet.setAccountId(advertiserId);
                                 videoGet.setId(advertiserId + signature);
-                                videoGet.setWidth(dataJson.getLong("width"));
-                                videoGet.setHeight(dataJson.getLong("height"));
+                                videoGet.setWidth(dataJson.getInteger("width"));
+                                videoGet.setHeight(dataJson.getInteger("height"));
                                 videoGet.setUrl(dataJson.getString("url"));
                                 videoGet.setPhotoId(dataJson.getString("photo_id"));
                                 videoGet.setCoverUrl(dataJson.getString("cover_url"));
-                                Integer type = MaterialEnum.getTypeBySize(dataJson.getLong("width"), dataJson.getLong("height"));
+                                Integer type = MaterialEnum.getTypeBySize(dataJson.getInteger("width"), dataJson.getInteger("height"));
                                 if (!Check.isNull(type)) {
                                     videoGet.setMaterialType(type);
                                 }
@@ -2522,11 +2522,11 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
                     /*    Integer width = Integer.valueOf(dataJson.getLong("width"));
                         Integer height = Integer.valueOf(dataJson.getLong("height"));*/
 
-                        imageGet.setWidth(dataJson.getLong("width"));
-                        imageGet.setHeight(dataJson.getLong("height"));
-                        imageGet.setSize(dataJson.getLong("size"));
+                        imageGet.setWidth(dataJson.getInteger("width"));
+                        imageGet.setHeight(dataJson.getInteger("height"));
+                        imageGet.setSize(dataJson.getInteger("size"));
                         imageGet.setFormat(dataJson.getString("format"));
-                        Integer type = MaterialEnum.getTypeBySize(dataJson.getLong("width"), dataJson.getLong("height"));
+                        Integer type = MaterialEnum.getTypeBySize(dataJson.getInteger("width"), dataJson.getInteger("height"));
                         if (!Check.isNull(type)) {
                             imageGet.setMaterialType(type);
                         }
@@ -3235,9 +3235,9 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
         List<KuaiShouImageGet> list = new ArrayList<>();
         KuaiShouImageGet kuaiShouImageGet1 = new KuaiShouImageGet();
         kuaiShouImageGet1.setUrl("http://static.yximgs.com/udata/pkg/markb21f94845c4350.jpg");
-        kuaiShouImageGet1.setWidth(720L);
-        kuaiShouImageGet1.setHeight(1280L);
-        kuaiShouImageGet1.setSize(441029L);
+        kuaiShouImageGet1.setWidth(720);
+        kuaiShouImageGet1.setHeight(1280);
+        kuaiShouImageGet1.setSize(441029);
         kuaiShouImageGet1.setFormat("jpg");
         kuaiShouImageGet1.setImageToken("market0a8a3104ee6b4f148ab21f94845c4350.jpg");
         kuaiShouImageGet1.setSignature("44a20b91b0727fa2abb68b19c0456422");