Commit e0edaf25 authored by tangtuo's avatar tangtuo

debug

parent ea77b414
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="SqlDialectMappings">
<file url="file://$PROJECT_DIR$/sql/joying.sql" dialect="MySQL" />
</component>
</project>
\ No newline at end of file
......@@ -53,7 +53,7 @@ spring:
password: admin
listener:
simple:
acknowledge-mode: auto #acknowledge-mode: none,关闭ack;manual,手动ack;auto:自动ack
acknowledge-mode: manual #acknowledge-mode: none,关闭ack; manual,手动ack; auto:自动ack
swagger:
title: 乐映影视后台管理系统
description: 乐映影视后台管理系统RESTFUL API
......@@ -96,4 +96,9 @@ copyright:
app-id: 289391457858
app-secret: xExjKUCYH1nrze6Hpxf8s1dYWdxEggo2FiwKlZKygCItOV7E8bFhkyr4C192uhK
huaweiyun:
obs:
app-key: HIULSHJZJOTWB72Z38ZB
app-secret: GI0oWEGRJuMKmPXJq2fCmuMpFPIITLmjeCQxo2tA
end-point: obs.cn-east-3.myhuaweicloud.com
bucket: filmchain-file
......@@ -54,7 +54,7 @@ spring:
password: admin
listener:
simple:
acknowledge-mode: auto #acknowledge-mode: none,关闭ack;manual,手动ack;auto:自动ack
acknowledge-mode: manual #acknowledge-mode: none,关闭ack;manual,手动ack;auto:自动ack
swagger:
title: 乐映影视乐映影视后台管理系统
description: 乐映影视后台管理系统RESTFUL API
......@@ -97,3 +97,9 @@ copyright:
app-id: 289391457858
app-secret: xExjKUCYH1nrze6Hpxf8s1dYWdxEggo2FiwKlZKygCItOV7E8bFhkyr4C192uhK
huaweiyun:
obs:
app-key: HIULSHJZJOTWB72Z38ZB
app-secret: GI0oWEGRJuMKmPXJq2fCmuMpFPIITLmjeCQxo2tA
end-point: obs.cn-east-3.myhuaweicloud.com
bucket: filmchain-file
\ No newline at end of file
......@@ -54,7 +54,7 @@ spring:
password: guest
listener:
simple:
acknowledge-mode: auto #acknowledge-mode: none,关闭ack;manual,手动ack;auto:自动ack
acknowledge-mode: manual #acknowledge-mode: none,关闭ack;manual,手动ack;auto:自动ack
swagger:
title: 乐映影视后台管理系统
description: 乐映影视后台管理系统RESTFUL API
......@@ -98,4 +98,9 @@ copyright:
app-id: 289391457858
app-secret: xExjKUCYH1nrze6Hpxf8s1dYWdxEggo2FiwKlZKygCItOV7E8bFhkyr4C192uhK
huaweiyun:
obs:
app-key: HIULSHJZJOTWB72Z38ZB
app-secret: GI0oWEGRJuMKmPXJq2fCmuMpFPIITLmjeCQxo2tA
end-point: obs.cn-east-3.myhuaweicloud.com
bucket: filmchain-file
......@@ -46,6 +46,14 @@ spring:
redis:
# 缓存失效时间
time-to-live: 86400000
rabbitmq:
host: 123.60.58.16
port: 5672
username: admin
password: admin
listener:
simple:
acknowledge-mode: manual #acknowledge-mode: none,关闭ack;manual,手动ack;auto:自动ack
swagger:
title: 乐映影视后台管理系统
description: 乐映影视后台管理系统RESTFUL API
......@@ -83,7 +91,14 @@ aliyun:
encrypt-bucket: joying-nft
copyright:
url: https://p.yareiot.com/ccct/ccct/api/copyright/create
app-id: 289391457858
app-secret: xExjKUCYH1nrze6Hpxf8s1dYWdxEggo2FiwKlZKygCItOV7E8bFhkyr4C192uhK
apply-url: https://p.yareiot.com/ccct/ccct/api/copyright/create
query-url: https://p.yareiot.com/ccct/ccct/api/copyright/query
huaweiyun:
obs:
app-key: HIULSHJZJOTWB72Z38ZB
app-secret: GI0oWEGRJuMKmPXJq2fCmuMpFPIITLmjeCQxo2tA
end-point: obs.cn-east-3.myhuaweicloud.com
bucket: filmchain-file
\ No newline at end of file
......@@ -53,7 +53,7 @@ spring:
password: admin
listener:
simple:
acknowledge-mode: auto #acknowledge-mode: none,关闭ack;manual,手动ack;auto:自动ack
acknowledge-mode: manual #acknowledge-mode: none,关闭ack;manual,手动ack;auto:自动ack
swagger:
title: 乐映影视乐映影视后台管理系统
description: 乐映影视后台管理系统RESTFUL API
......@@ -95,3 +95,9 @@ copyright:
app-id: 289391457858
app-secret: xExjKUCYH1nrze6Hpxf8s1dYWdxEggo2FiwKlZKygCItOV7E8bFhkyr4C192uhK
huaweiyun:
obs:
app-key: HIULSHJZJOTWB72Z38ZB
app-secret: GI0oWEGRJuMKmPXJq2fCmuMpFPIITLmjeCQxo2tA
end-point: obs.cn-east-3.myhuaweicloud.com
bucket: filmchain-file
\ No newline at end of file
......@@ -101,6 +101,12 @@
<artifactId>tencentcloud-sdk-java</artifactId>
<version>3.1.322</version>
</dependency>
<dependency>
<groupId>com.huaweicloud</groupId>
<artifactId>esdk-obs-java</artifactId>
<version>3.20.6.1</version>
</dependency>
</dependencies>
<properties>
......
package com.fzm.common.config;
import com.fzm.common.properties.ObsProperties;
import com.obs.services.ObsClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* @author tangtuo
* @date 2021/12/31 14:51
*/
@Configuration
public class ObsConfig {
@Bean
public ObsClient obsClient(ObsProperties obsProperties) {
return new ObsClient(obsProperties.getAppKey(), obsProperties.getAppSecret(), obsProperties.getEndPoint());
}
}
......@@ -61,7 +61,7 @@ public class RabbitMQConfig {
@Bean
public Queue dlQueue() {
return QueueBuilder.durable(DEAD_LETTER_QUEUE)
.ttl(1000 * 60 * 2)
.ttl(1000 * 60 * 60 * 6)
.deadLetterExchange(DEAD_LETTER_DIRECT)
.deadLetterRoutingKey("copyright.notify")
.build();
......
package com.fzm.common.properties;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
/**
* @author tangtuo
* @date 2021/6/29 15:54
*/
@Data
@Component
@ConfigurationProperties(prefix = "huaweiyun.obs")
public class ObsProperties {
private String appKey;
private String appSecret;
private String endPoint;
private String bucket;
}
......@@ -24,7 +24,7 @@ import com.fzm.common.mapper.CopyrightApplyMapper;
import com.fzm.common.properties.CopyrightProperties;
import com.fzm.common.service.*;
import com.fzm.common.utils.CopyrightSignUtil;
import com.fzm.common.utils.OssUtil;
import com.fzm.common.utils.ObsUtil;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j;
......@@ -77,7 +77,7 @@ public class CopyrightApplyServiceImpl extends ServiceImpl<CopyrightApplyMapper,
private NftService nftService;
@Resource
private OssUtil ossUtil;
private ObsUtil obsUtil;
@Resource
private ThreadPoolTaskExecutor threadPoolTaskExecutor;
......@@ -183,11 +183,11 @@ public class CopyrightApplyServiceImpl extends ServiceImpl<CopyrightApplyMapper,
}
// 删除权力取得方式的附件
if (StringUtils.isNotBlank(copyright.getAuthorityAcquireMode())) {
ossUtil.delete(copyright.getAuthorityAcquireMode());
obsUtil.delete(copyright.getAuthorityAcquireMode());
}
// 删除权力归属证明附件
if (StringUtils.isNotBlank(copyright.getAuthorityAscriptionMode())) {
ossUtil.delete(copyright.getAuthorityAcquireMode());
obsUtil.delete(copyright.getAuthorityAcquireMode());
}
// 删除附件列表
copyrightFileService.delByCopyrightId(id);
......
......@@ -2,12 +2,11 @@ package com.fzm.common.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fzm.common.entity.CopyrightFile;
import com.fzm.common.mapper.CopyrightFileMapper;
import com.fzm.common.service.CopyrightFileService;
import com.fzm.common.utils.OssUtil;
import com.fzm.common.utils.ObsUtil;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
......@@ -24,7 +23,7 @@ public class CopyrightFileServiceImpl extends ServiceImpl<CopyrightFileMapper, C
private CopyrightFileMapper copyrightFileMapper;
@Resource
private OssUtil ossUtil;
private ObsUtil obsUtil;
@Override
......@@ -38,7 +37,7 @@ public class CopyrightFileServiceImpl extends ServiceImpl<CopyrightFileMapper, C
public Integer delByCopyrightId(Integer copyrightId) {
List<CopyrightFile> list = getByCopyrightId(copyrightId);
for (CopyrightFile file : list) {
ossUtil.delete(file.getFileUrl());
obsUtil.delete(file.getFileUrl());
}
UpdateWrapper<CopyrightFile> updateWrapper = new UpdateWrapper<>();
updateWrapper.eq("copyright_id", copyrightId);
......
......@@ -14,7 +14,7 @@ import com.fzm.common.enums.ResultCode;
import com.fzm.common.exception.GlobalException;
import com.fzm.common.mapper.DraftMapper;
import com.fzm.common.service.*;
import com.fzm.common.utils.OssUtil;
import com.fzm.common.utils.ObsUtil;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
......@@ -32,7 +32,7 @@ public class DraftServiceImpl extends ServiceImpl<DraftMapper, Draft> implements
private DraftMapper draftMapper;
@Resource
private OssUtil ossUtil;
private ObsUtil obsUtil;
@Resource
private CopyrightApplyService copyrightApplyService;
......@@ -63,17 +63,17 @@ public class DraftServiceImpl extends ServiceImpl<DraftMapper, Draft> implements
if (copyrightDTO != null) {
// 删除权力取得方式的附件权力
if (StringUtils.isNotBlank(copyrightDTO.getAuthorityAcquireMode())) {
ossUtil.delete(copyrightDTO.getAuthorityAcquireMode());
obsUtil.delete(copyrightDTO.getAuthorityAcquireMode());
}
// 删除权力归属证明附件
if (StringUtils.isNotBlank(copyrightDTO.getAuthorityAscriptionMode())) {
ossUtil.delete(copyrightDTO.getAuthorityAcquireMode());
obsUtil.delete(copyrightDTO.getAuthorityAcquireMode());
}
// 删除文件列表
if (CollectionUtil.isNotEmpty(copyrightDTO.getFiles())) {
for (CopyrightDTO.File file : copyrightDTO.getFiles()) {
if (StringUtils.isNotBlank(file.getFileUrl())) {
ossUtil.delete(file.getFileUrl());
obsUtil.delete(file.getFileUrl());
}
}
}
......
......@@ -26,7 +26,7 @@ import com.fzm.common.params.NftTransferParam;
import com.fzm.common.properties.SmsProperties;
import com.fzm.common.service.*;
import com.fzm.common.utils.JwtUtil;
import com.fzm.common.utils.OssUtil;
import com.fzm.common.utils.ObsUtil;
import com.fzm.common.utils.RedisUtil;
import com.fzm.common.utils.SmsUtil;
import com.github.pagehelper.PageHelper;
......@@ -77,7 +77,7 @@ public class NftServiceImpl extends ServiceImpl<NftMapper, Nft> implements NftSe
private NftTransferRecordService nftTransferRecordService;
@Resource
private OssUtil ossUtil;
private ObsUtil obsUtil;
@Resource
private SmsUtil smsUtil;
......@@ -392,7 +392,7 @@ public class NftServiceImpl extends ServiceImpl<NftMapper, Nft> implements NftSe
if (nft == null) {
throw GlobalException.newException(ResultCode.DATA_ERROR, "没找到此nft详情");
}
ossUtil.downloadFile(nft.getFileUrl(), nft.getFileName());
obsUtil.downloadFile(nft.getFileUrl(), nft.getFileName());
}
private long getTokenId() {
......
......@@ -82,7 +82,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
private HttpServletRequest request;
@Resource
private OssUtil ossUtil;
private ObsUtil obsUtil;
@Resource
private OssProperties ossProperties;
......@@ -182,7 +182,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
User loginUser = getUserByToken();
// 如果不是第一次上传头像,需要删除旧头像
if (StringUtils.isNotBlank(loginUser.getAvatar())) {
ossUtil.delete(loginUser.getAvatar());
obsUtil.delete(loginUser.getAvatar());
}
User user = new User().
setAvatar(avatar).
......@@ -238,8 +238,8 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
Integer status;
if (IdCardVerificationResponse.SUCCESS.getCode().equals(response.getResult())) {
// 验证成功上传身份证证件
String frontUrl = ossUtil.putSimpleObject(cardPictureFront);
String backUrl = ossUtil.putSimpleObject(cardPictureBack);
String frontUrl = obsUtil.putObject(cardPictureFront);
String backUrl = obsUtil.putObject(cardPictureBack);
AuthPerson authPerson = new AuthPerson()
.setUserId(userId)
.setIdCard(response.getIdCard())
......
package com.fzm.common.utils;
import cn.hutool.core.util.IdUtil;
import com.fzm.common.enums.ResultCode;
import com.fzm.common.exception.GlobalException;
import com.fzm.common.properties.ObsProperties;
import com.obs.services.ObsClient;
import com.obs.services.model.DeleteObjectResult;
import com.obs.services.model.ObsObject;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.net.URLEncoder;
/**
* @author tangtuo
* @date 2021/6/29 16:07
*
* <p>
* 华为云对象存储服务工具类
* </p>
*/
@Slf4j
@Component
public class ObsUtil {
@Resource
private ObsClient obsClient;
@Resource
private ObsProperties obsProperties;
@Resource
private HttpServletResponse response;
/**
* 上传对象
*
* @param file
* @return
*/
public String putObject(MultipartFile file) throws IOException {
String objectName = IdUtil.simpleUUID().concat("/").concat(file.getOriginalFilename());
obsClient.putObject(obsProperties.getBucket(), objectName, file.getInputStream());
return String.format("https://%s.%s/%s", obsProperties.getBucket(), obsProperties.getEndPoint(), objectName);
}
/**
* 下载对象
*
* @param fileUrl 文件地址
* @param fileName 文件名
*/
public void downloadFile(String fileUrl, String fileName) {
try {
// 文件名以附件的形式下载
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(fileName, "UTF-8"));
} catch (UnsupportedEncodingException e) {
log.error(e.getMessage(), e);
throw GlobalException.newException(ResultCode.FILE_DOWNLOAD_ERROR, e.getMessage());
}
String objectName = fileUrl.substring(String.format("https://%s.%s/", obsProperties.getBucket(), obsProperties.getEndPoint()).length());
ObsObject object = obsClient.getObject(obsProperties.getBucket(), objectName);
try {
// 读取文件内容。
InputStream inputStream = object.getObjectContent();
BufferedInputStream in = new BufferedInputStream(inputStream);// 把输入流放入缓存流
ServletOutputStream outputStream = response.getOutputStream();
BufferedOutputStream out = new BufferedOutputStream(outputStream);// 把输出流放入缓存流
byte[] buffer = new byte[1024];
int len;
while ((len = in.read(buffer)) != -1) {
out.write(buffer, 0, len);
}
out.flush();
out.close();
in.close();
} catch (Exception e) {
log.error(e.getMessage(), e);
throw GlobalException.newException(ResultCode.FILE_DOWNLOAD_ERROR, e.getMessage());
}
}
/**
* 删除对象
*
* @param fileUrl
* @return
*/
public boolean delete(String fileUrl) {
String objectName = fileUrl.substring(String.format("https://%s.%s/", obsProperties.getBucket(), obsProperties.getEndPoint()).length());
DeleteObjectResult result = obsClient.deleteObject(obsProperties.getBucket(), objectName);
return !result.isDeleteMarker();
}
public static void main(String[] args) {
String endPoint = "obs.cn-east-3.myhuaweicloud.com";
String ak = "HIULSHJZJOTWB72Z38ZB";
String sk = "GI0oWEGRJuMKmPXJq2fCmuMpFPIITLmjeCQxo2tA";
String bucketName = "filmchain-file";
// 创建ObsClient实例
ObsClient obsClient = new ObsClient(ak, sk, endPoint);
String url = "https://filmchain-file.obs.cn-east-3.myhuaweicloud.com/8792bab6a7fe4bb58e64b2c4f54ab220/kubernetes(k8s)课程.pdf";
String objectName = url.substring(String.format("https://%s.%s/", bucketName, endPoint).length());
System.out.println(objectName);
DeleteObjectResult deleteObjectResult = obsClient.deleteObject(bucketName, objectName);
System.out.println(deleteObjectResult);
// String objectName = IdUtil.simpleUUID().concat("/").concat("kubernetes(k8s)课程.pdf");
// PutObjectResult putObjectResult = obsClient.putObject(bucketName, objectName, new File("D:\\资料\\k8s\\课程笔记\\kubernetes(k8s)课程.pdf"));
// System.out.println(putObjectResult);
// System.out.println(String.format("https://%s.%s/%s", bucketName, endPoint, objectName));
}
}
......@@ -13,7 +13,7 @@ import com.fzm.common.service.CategoryService;
import com.fzm.common.service.CommemorateNftService;
import com.fzm.common.service.UserService;
import com.fzm.common.utils.JwtUtil;
import com.fzm.common.utils.OssUtil;
import com.fzm.common.utils.ObsUtil;
import com.fzm.common.utils.RedisUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
......@@ -41,7 +41,7 @@ public class CommemorateNftController {
private CommemorateNftService commemorateNftService;
@Resource
private OssUtil ossUtil;
private ObsUtil obsUtil;
@Resource
private UserService userService;
......@@ -71,8 +71,8 @@ public class CommemorateNftController {
if (!coverName.endsWith(".png") && !coverName.endsWith(".jpg")) {
throw GlobalException.newException(ResultCode.FILE_UPLOAD_ERROR, "封面类型有误");
}
String fileUrl = ossUtil.putSimpleObject(file);
String coverUrl = ossUtil.putSimpleObject(cover);
String fileUrl = obsUtil.putObject(file);
String coverUrl = obsUtil.putObject(cover);
CommemorateNft commemorateNft = new CommemorateNft().
setName(name).
setCover(coverUrl).
......
......@@ -5,7 +5,7 @@ import com.fzm.common.enums.FileSuffix;
import com.fzm.common.enums.ResultCode;
import com.fzm.common.exception.GlobalException;
import com.fzm.common.model.ResponseModel;
import com.fzm.common.utils.OssUtil;
import com.fzm.common.utils.ObsUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
......@@ -29,7 +29,7 @@ public class CopyrightFileController {
private static final long maxSize = 1024 * 1024 * 200;
@Resource
private OssUtil ossUtil;
private ObsUtil obsUtil;
@PostMapping("/upload")
@ApiOperation(value = "上传版权申请附件")
......@@ -44,7 +44,7 @@ public class CopyrightFileController {
throw GlobalException.newException(ResultCode.FILE_UPLOAD_ERROR, "不支持当前上传的文件类型");
}
String url = ossUtil.putSimpleObject(file);
String url = obsUtil.putObject(file);
return ResponseModel.success(url);
}
}
package com.fzm.portal.controller;
import com.fasterxml.jackson.databind.deser.std.NumberDeserializers;
import com.fzm.common.annotation.Authentication;
import com.fzm.common.model.ResponseModel;
import com.fzm.common.utils.OssUtil;
import com.tencentcloudapi.tsf.v20180326.models.TaskRule;
import com.fzm.common.utils.ObsUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import java.io.IOException;
import java.util.Map;
/**
* @author tangtuo
......@@ -24,21 +24,14 @@ import java.util.Map;
public class OssController {
@Resource
private OssUtil ossUtil;
private ObsUtil obsUtil;
@Authentication
@GetMapping("/policy")
@ApiOperation("完成oss签名")
public ResponseModel<Map<String, String>> policy() {
Map<String, String> policy = ossUtil.policy();
return ResponseModel.success(policy);
}
@Authentication
@PostMapping("/upload")
@ApiOperation("普通文件上传")
public ResponseModel<String> upload(MultipartFile file) throws IOException {
return ResponseModel.success(ossUtil.putSimpleObject(file));
return ResponseModel.success(obsUtil.putObject(file));
}
......@@ -47,7 +40,7 @@ public class OssController {
@ApiOperation(value = "下载文件")
public void download(@RequestParam String fileUrl) {
String fileName = fileUrl.substring(fileUrl.lastIndexOf("/") + 1);
ossUtil.downloadFile(fileUrl, fileName);
obsUtil.downloadFile(fileUrl, fileName);
}
......@@ -55,7 +48,6 @@ public class OssController {
@ApiOperation(value = "删除文件")
@PostMapping(value = "/delete")
public ResponseModel<Boolean> delete(String fileUrl) {
ossUtil.delete(fileUrl);
return ResponseModel.success(true);
return ResponseModel.success(obsUtil.delete(fileUrl));
}
}
......@@ -3,7 +3,6 @@ package com.fzm.portal.controller;
import com.fzm.common.annotation.Authentication;
import com.fzm.common.constant.RedisConstant;
import com.fzm.common.constant.TokenConstant;
import com.fzm.common.entity.AuthPerson;
import com.fzm.common.entity.User;
import com.fzm.common.enums.ResultCode;
import com.fzm.common.exception.GlobalException;
......@@ -11,7 +10,7 @@ import com.fzm.common.model.ResponseModel;
import com.fzm.common.params.LoginParam;
import com.fzm.common.service.UserService;
import com.fzm.common.utils.JwtUtil;
import com.fzm.common.utils.OssUtil;
import com.fzm.common.utils.ObsUtil;
import com.fzm.common.utils.RedisUtil;
import com.tencentcloudapi.faceid.v20180301.models.IdCardOCRVerificationResponse;
import io.swagger.annotations.Api;
......@@ -41,7 +40,7 @@ public class UserController {
private UserService userService;
@Resource
private OssUtil ossUtil;
private ObsUtil obsUtil;
@Resource
private RedisUtil redisUtil;
......@@ -111,7 +110,7 @@ public class UserController {
@ApiOperation(value = "上传头像")
@PostMapping("/upload/avatar")
public ResponseModel<User> uploadAvatar(MultipartFile file) throws IOException {
String avatar = ossUtil.putSimpleObject(file);
String avatar = obsUtil.putObject(file);
User user = userService.uploadAvatar(avatar);
return ResponseModel.success(user);
}
......
......@@ -93,3 +93,9 @@ aliyun:
end-point: oss-cn-hangzhou.aliyuncs.com
simple-bucket: test-nft
encrypt-bucket: test-nft-2
huaweiyun:
obs:
app-key: HIULSHJZJOTWB72Z38ZB
app-secret: GI0oWEGRJuMKmPXJq2fCmuMpFPIITLmjeCQxo2tA
end-point: obs.cn-east-3.myhuaweicloud.com
bucket: filmchain-file
\ No newline at end of file
......@@ -105,3 +105,10 @@ aliyun:
end-point: oss-cn-hangzhou.aliyuncs.com
simple-bucket: test-nft
encrypt-bucket: test-nft-2
huaweiyun:
obs:
app-key: HIULSHJZJOTWB72Z38ZB
app-secret: GI0oWEGRJuMKmPXJq2fCmuMpFPIITLmjeCQxo2tA
end-point: obs.cn-east-3.myhuaweicloud.com
bucket: filmchain-file
\ No newline at end of file
......@@ -107,3 +107,10 @@ aliyun:
end-point: oss-cn-hangzhou.aliyuncs.com
simple-bucket: test-nft
encrypt-bucket: test-nft-2
huaweiyun:
obs:
app-key: HIULSHJZJOTWB72Z38ZB
app-secret: GI0oWEGRJuMKmPXJq2fCmuMpFPIITLmjeCQxo2tA
end-point: obs.cn-east-3.myhuaweicloud.com
bucket: filmchain-file
\ No newline at end of file
......@@ -93,3 +93,10 @@ aliyun:
end-point: oss-cn-shanghai.aliyuncs.com
simple-bucket: joying-file
encrypt-bucket: joying-nft
huaweiyun:
obs:
app-key: HIULSHJZJOTWB72Z38ZB
app-secret: GI0oWEGRJuMKmPXJq2fCmuMpFPIITLmjeCQxo2tA
end-point: obs.cn-east-3.myhuaweicloud.com
bucket: filmchain-file
\ No newline at end of file
......@@ -102,3 +102,10 @@ aliyun:
end-point: oss-cn-hangzhou.aliyuncs.com
simple-bucket: test-nft
encrypt-bucket: test-nft-2
huaweiyun:
obs:
app-key: HIULSHJZJOTWB72Z38ZB
app-secret: GI0oWEGRJuMKmPXJq2fCmuMpFPIITLmjeCQxo2tA
end-point: obs.cn-east-3.myhuaweicloud.com
bucket: filmchain-file
\ No newline at end of file
......@@ -79,13 +79,13 @@ public class NftEvm {
long balance = ra.evmBalance(abi, cAddr, EvmTokenEnum.ERC1155, publisher, tokenId);*/
//=============================================================================================
//long tokenId = Instant.now().getEpochSecond();
long tokenId = Instant.now().getEpochSecond();
// long tokenId = 1640828944;
// String hash = ra.evmSetTokenInfo(abi, cAddr, 0L, tokenId, "publishAddress=143nwppTM4yyuc4KKQbi5RHiKmpHPAwnqm&synopsis=呵呵呵", "143nwppTM4yyuc4KKQbi5RHiKmpHPAwnqm", null, true);
// System.out.println("hash = " + hash);
// System.out.println("tokenId = " + tokenId);
// TimeUnit.SECONDS.sleep(10);
String result = ra.evmGetTokenInfo(abi, cAddr, 1640675959, "19uiPBDu6jh39y7J3Xa7vFcF141RWQAkd1");
String hash = ra.evmSetTokenInfo(abi, cAddr, 0L, tokenId, "author=213&copyrightOwner=123sassafras&evidencer=湖北版权局&hash=d59a9c995aa17b862ccce38c9f77e7bd&opusName=卡卡打开&opusType=录像制品(电影作品和以类似摄制电影的方法创作的作品以外的任何有伴音或无伴音的连续相关形象、图像的制品)&publishAddress=171Urr3LubNKfaWLN5jcVyfnsWMDfbdAGe&registerCode=&synopsis=123", "143nwppTM4yyuc4KKQbi5RHiKmpHPAwnqm", null, true);
System.out.println("hash = " + hash);
System.out.println("tokenId = " + tokenId);
TimeUnit.SECONDS.sleep(10);
String result = ra.evmGetTokenInfo(abi, cAddr, tokenId, "19uiPBDu6jh39y7J3Xa7vFcF141RWQAkd1");
System.out.println(result);
// String realTxHashFromGrp = ra.getRealTxHashFromGrp("0x2061e977daee520629ac8757763249855e2cf5b408276a8253a81b4e9b9cba7b");
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
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