记得上下班打卡 | git大法好,push需谨慎

Commit c0e58094 authored by jiangxiulong's avatar jiangxiulong

接口格式更改

parent 92e9c22a
......@@ -19,9 +19,26 @@ import java.io.Serializable;
@ApiModel
public class UploadVo implements Serializable {
@ApiModelProperty(value = "oss_files_id")
private String ossFilesId;
@ApiModelProperty(value = "源文件名称")
private String fileName;
@ApiModelProperty(value = "上传后的地址")
private String ossPath;
@ApiModelProperty(value = "文件类型")
private String contentType;
@ApiModelProperty(value = "文件大小")
private Integer size;
@ApiModelProperty(value = "md5值判断文件是否相同")
private String md5str;
@ApiModelProperty(value = "buck_type")
private Integer buckType;
@ApiModelProperty(value = "上传人id")
private String uploaderUid;
@ApiModelProperty(value = "上传人姓名")
private String uploaderName;
@ApiModelProperty(value = "createdAt")
private String createdAt;
@ApiModelProperty(value = "updatedAt")
private String updatedAt;
}
......@@ -347,7 +347,7 @@
maxFileCount: 1
});
$("#fileinput-demo-1").on("fileuploaded", function (event, data, previewId, index) {
$("#img").val(data.response.ossPath)
$("#img").val(data.response.data.ossPath)
});
})
</script>
......
......@@ -484,7 +484,7 @@
maxFileCount: 1
});
$("#fileinput-demo-1").on("fileuploaded", function (event, data, previewId, index) {
$("#coverImg").val(data.response.ossPath)
$("#coverImg").val(data.response.data.ossPath)
});
})
</script>
......
......@@ -539,7 +539,7 @@
});
$("#fileinput-demo-1").on("fileuploaded", function (event, data, previewId, index) {
$("#coverImg").val(data.response.ossPath)
$("#coverImg").val(data.response.data.ossPath)
});
})
</script>
......
......@@ -135,7 +135,7 @@
maxFileCount: 1
});
$("#fileinput-demo-1").on("fileuploaded", function (event, data, previewId, index) {
$("#filePath").val(data.response.ossPath)
$("#filePath").val(data.response.data.ossPath)
});
})
</script>
......
......@@ -147,7 +147,7 @@
initialPreviewConfig:[{"caption":filePath,"downloadUrl":"https://app.zhengzai.tv/" + filePath,"size":"","key":0}]
});
$("#fileinput-demo-1").on("fileuploaded", function (event, data, previewId, index) {
$("#filePath").val(data.response.ossPath)
$("#filePath").val(data.response.data.ossPath)
});
})
</script>
......
......@@ -22,6 +22,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
......@@ -64,7 +65,7 @@ public class AlOssController {
@ApiImplicitParam(type = "form", dataType = "Integer", name = "buckType", value = "buckType 1正常的任何文件上传 2apk上传", defaultValue = "1"),
@ApiImplicitParam(type = "form", dataType = "Integer", name = "resize", value = "resize", defaultValue = "0"),
})
public UploadVo upload(
public ResponseDto<UploadVo> upload(
@RequestParam MultipartFile file,
@RequestParam(defaultValue = "other") String pathName,
@RequestParam(defaultValue = "1", required = false) int buckType,
......@@ -87,7 +88,7 @@ public class AlOssController {
uploadVo.setOssPath(platformOssFiles.getOssPath());
uploadVo.setSize(platformOssFiles.getSize());
uploadVo.setContentType(platformOssFiles.getContentType());
return uploadVo;
return ResponseDto.success(uploadVo);
}
String filename = file.getResource().getFilename();// time.jpeg
......@@ -133,10 +134,8 @@ public class AlOssController {
// 返回值
UploadVo uploadVo = new UploadVo();
uploadVo.setOssPath(platformOssFilesDate.getOssPath());
uploadVo.setSize(platformOssFilesDate.getSize());
uploadVo.setContentType(platformOssFilesDate.getContentType());
return uploadVo;
BeanUtils.copyProperties(platformOssFilesDate, uploadVo);
return ResponseDto.success(uploadVo);
}
}
......@@ -3,6 +3,7 @@ package com.liquidnet.service.platform.controller.basicServices;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import com.liquidnet.common.cache.redis.util.RedisUtil;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.kylin.constant.KylinRedisConst;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
......@@ -57,12 +58,12 @@ public class WechatShareController {
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "url", value = "url地址 注意 URL 一定要动态获取,不能 hardcode", required = true),
})
public Map<String, String> zhengzai(@RequestParam String url) {
public ResponseDto<Map<String, String>> zhengzai(@RequestParam String url) {
String accessToken = accessToken(zhengzaiAppid, zhengzaiSecret);
String jsapiTicket = jsapiTicket(zhengzaiAppid, accessToken);
Map<String, String> ret = sign(jsapiTicket, url);
return ret;
return ResponseDto.success(ret);
}
@GetMapping("/modernsky")
......@@ -70,12 +71,12 @@ public class WechatShareController {
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "url", value = "url地址 注意 URL 一定要动态获取,不能 hardcode", required = true),
})
public Map<String, String> modernsky(@RequestParam String url) {
public ResponseDto<Map<String, String>> modernsky(@RequestParam String url) {
String accessToken = accessToken(modernskyAppid, modernskySecret);
String jsapiTicket = jsapiTicket(modernskyAppid, accessToken);
Map<String, String> ret = sign(jsapiTicket, url);
return ret;
return ResponseDto.success(ret);
}
public static Map<String, String> sign(String jsapi_ticket, String url) {
......
package com.liquidnet.service.platform.controller.basicServices;
import com.liquidnet.common.cache.redis.util.RedisUtil;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.kylin.constant.KylinRedisConst;
import com.liquidnet.service.kylin.dto.vo.admin.ZhengzaiAppVersionsVo;
import io.swagger.annotations.Api;
......@@ -37,7 +38,7 @@ public class ZhengzaiAppVersionsController {
// @ApiImplicitParam(type = "query", dataType = "Integer", name = "isProduction", value = "是否是生产环境,1是 2否", required = true),
})
// public ZhengzaiAppVersionsVo lastInfo(@RequestParam Integer type, @RequestParam Integer isProduction) {
public ZhengzaiAppVersionsVo lastInfo(@RequestParam Integer type, @RequestParam Integer appType) {
public ResponseDto<ZhengzaiAppVersionsVo> lastInfo(@RequestParam Integer type, @RequestParam Integer appType) {
ZhengzaiAppVersionsVo info = null;
if (1 == appType) {
if (1 == type) {
......@@ -53,7 +54,7 @@ public class ZhengzaiAppVersionsController {
}
}
return info;
return ResponseDto.success(info);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment