Commit 0cb295a9 authored by 吴琼's avatar 吴琼

添加log

parent c2d7dbb0
......@@ -3,12 +3,6 @@ import cn.quantgroup.customer.rest.param.transactionreceipt.TransactionReceiptRe
import cn.quantgroup.customer.rest.vo.JsonResult;
import cn.quantgroup.customer.rest.vo.transaction.*;
import cn.quantgroup.customer.service.ITransactionReceiptRecordService;
import cn.quantgroup.customer.service.http.IHttpService;
import cn.quantgroup.customer.util.FileToZip;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.google.common.collect.Maps;
import lombok.Synchronized;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -18,10 +12,6 @@ import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@Slf4j
@RestController
......
......@@ -658,8 +658,9 @@ public class TransactionReceiptRecordServiceImpl implements ITransactionReceiptR
param.put("userIds",record.getUserId());
String userUrl = userSysUrl + "/api/sync/listByUserIds";
//String userUrl = "http://passportapi-test7.liangkebang.net/api/sync/listByUserIds";
log.error("TransactionReceiptRecordServiceImpl updateTransactionRecordsStatus 调用用户中心 begin");
log.info("TransactionReceiptRecordServiceImpl updateTransactionRecordsStatus 调用用户中心 begin"+param);
String userResult = httpService.get(userUrl, param);
log.info("TransactionReceiptRecordServiceImpl userResult ="+userResult);
if (StringUtils.isEmpty(userResult)) {
record.setImportStatus(2);
record.setExportStatus(2);
......@@ -678,8 +679,8 @@ public class TransactionReceiptRecordServiceImpl implements ITransactionReceiptR
}
JSONObject object= (JSONObject) userArray.get(0);
String userName = object.getString("name");
log.error("TransactionReceiptRecordServiceImpl updateTransactionRecordsStatus 调用用户中心 end");
log.error("TransactionReceiptRecordServiceImpl updateTransactionRecordsStatus 调用商城接口 begin");
log.info("TransactionReceiptRecordServiceImpl updateTransactionRecordsStatus 调用用户中心 end");
log.info("TransactionReceiptRecordServiceImpl updateTransactionRecordsStatus 调用商城接口 begin");
if(StringUtils.isNotBlank(userName) && userName.equals(record.getUserName())){
Map<String, String> header = Maps.newHashMap();
header.put("Content-type", "application/json");
......@@ -695,12 +696,13 @@ public class TransactionReceiptRecordServiceImpl implements ITransactionReceiptR
paramList.add(param1);
String kResult = httpService.post(kUrl, header, paramList);
JSONObject kJson =JSONObject.parseObject(kResult);
log.info("TransactionReceiptRecordServiceImpl kResult ="+kResult);
String businessCode = kJson.getString("businessCode");
if(!"0000".equals(businessCode)){
deleteRedis("importTransactionReceiptRecord");
throw new RuntimeException("调用电商接口报错");
}
log.error("TransactionReceiptRecordServiceImpl updateTransactionRecordsStatus 调用商城接口 end");
log.info("TransactionReceiptRecordServiceImpl updateTransactionRecordsStatus 调用商城接口 end");
//只有数据不存在的时候返回data
if(StringUtils.isNotBlank(kJson.getString("data"))){
String kJsonResult = kJson.getString("data");
......
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