Commit 98d2b5d4 by 陶光胜

Merge branch 'developer' into 'master'

Developer

See merge request !6
parents c9014448 a0e112c7
......@@ -120,6 +120,16 @@ public class StoreController {
storeWidgetDTO.setAuthSearchParam(storeWidgetQO.getAuthSearchParam());
storeWidgetDTO.setSearchParam(storeWidgetQO.getSearchParam());
storeWidgetDTO.setStoreWidgetId(storeWidgetQO.getStoreWidgetId());
if(storeWidgetQO.getStoreWidgetId()!= null){
StoreWidgetDTO old = this.storeWidgetApiService.getStoreWidget(storeWidgetQO.getStoreWidgetId()).getResult();
if(old != null){
if(StringUtils.isNotBlank(storeWidgetQO.getAuthSearchParam()) && !storeWidgetQO.getAuthSearchParam().equals(old.getAuthSearchParam())){
storeWidgetDTO.setStoreWidgetId(null);
} else if(StringUtils.isBlank(storeWidgetQO.getAuthSearchParam()) && StringUtils.isNotBlank(storeWidgetQO.getAuthSearchParam())){
storeWidgetDTO.setStoreWidgetId(null);
}
}
}
storeWidgetDTO.setWriteBackParam(storeWidgetQO.getWriteBackParam());
storeWidgetDTO.setAuthMode(storeWidgetQO.getAuthMode());
ServiceResponse<Integer> storeWidgetResponse = this.storeWidgetApiService.saveAuthStoreWidget(storeWidgetDTO);
......
......@@ -48,6 +48,21 @@ public class UploadImgController {
return RestResponse.success(picList);
}
@RequestMapping("get-cos-secret")
@IgnoreLogin
public RestResponse getCosSecret(HttpServletRequest request) throws IOException {
Map<String, String> map = new HashMap<>();
map.put("secretId", "AKIDxpbnsmZ0KYtAKNd5f7QbbP3YyDJD6Rq3");
map.put("secretKey", "GLFwRjpmYviRzLUREqKcieS4VmsmU1Lc");
byte[] bytes = map.get("secretKey").getBytes();
//Base64 加密
String encoded = Base64.getEncoder().encodeToString(bytes);
map.put("secretKey", encoded);
map.put("bucket", "video-1251519181");
map.put("region", "ap-shanghai");
return RestResponse.success(map);
}
@RequestMapping("upload-file")
@IgnoreLogin
public RestResponse uploadFile(HttpServletRequest request) throws IOException {
......
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