搬家调试

20230922-ljl-fixBug
qiushengjie 1 year ago
parent 3b868ec904
commit 3771c537fb

@ -682,8 +682,6 @@ public class MoveService {
public void processDsProduct(long shopId, long detailId, String status, String sourceItemId, Ret addProductRet) {
// 分销关系填入
if (!status.equals(StatusConst.success)) {
//TODO 测试强行停掉
// E.throwMSException("状态不为成功,不进行分销关系填入");
log.info("状态不为成功,不进行分销关系填入");
return;
}

@ -324,9 +324,6 @@ public class ProcessProductPublishTaskService extends TaskBaseService {
nextData.put("brandList", brandList);
log.info(JSON.toJSONString(nextData));
//TODO 测试强行停掉
//E.throwMSException("测试,强行停掉");
// 信息保存到oss上
Ret uploadMoveDataToOssret = moveService.uploadMoveDataToOss(nextData, shopId, queueMsg.getMoveCollectTaskDetailId());
if (CommonTool.isFailRet(uploadMoveDataToOssret)) {

@ -14,6 +14,7 @@ import org.springframework.stereotype.Component;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.util.Map;
import java.util.Objects;
@ -68,7 +69,7 @@ public class TosTemplate {
public Ret upload(String key, String data) {
TOSV2 tosClient = getClient();
try {
ByteArrayInputStream stream = new ByteArrayInputStream(data.getBytes());
ByteArrayInputStream stream = new ByteArrayInputStream(data.getBytes(StandardCharsets.UTF_8));
PutObjectBasicInput basicInput = new PutObjectBasicInput().setBucket(getBucket()).setKey(key);
PutObjectInput putObjectInput = new PutObjectInput().setPutObjectBasicInput(basicInput).setContent(stream);
tosClient.putObject(putObjectInput);

Loading…
Cancel
Save