Commit 46c5d3a4 by ddx

add query errorcode log

parent 1c1e7e49
......@@ -1021,8 +1021,7 @@ public class InvoiceFileServiceImpl implements InvoiceFileService {
ResponseContent ret = HttpHelper.postJsonEntity(FileConstants.taxQueryUrl, json.toString());
resultJson = JSONObject.parseObject(ret.getContent());
} catch (Exception e) {
e.printStackTrace();
log.info(uuidFlag + " taxno is " + taxno + " queryTokenInfo is error! " + e);
log.info(uuidFlag + " taxno is " + taxno + " queryTokenInfo is error! ", e);
}
log.info(uuidFlag + " taxno is " + taxno + " queryTokenInfo request result:" + (resultJson == null ? "null" : resultJson.toJSONString()));
return resultJson;
......
......@@ -12,8 +12,8 @@ import java.util.Map;
public class UserManageTest {
String accessKeyID = "echangcheng";
static String accessKeySecret = "echangcheng#@rrwea2";
String accessKeyID = "edaxiang";
static String accessKeySecret = "edaxiang#@f26ads";
static String host = "https://api.taxservices.cn";
......@@ -36,8 +36,8 @@ public class UserManageTest {
param.put("timeStamp",timeStamp);
param.put("version","1.0");
param.put("signature",getSign(signStr));
param.put("taxno","915106002051041291");
param.put("taxType","0");
param.put("taxno","91500105MAEHWYHM39");
param.put("taxType","1");
System.out.println(url);
ResponseContent ret = HttpHelper.postJsonEntity(url,JSON.toJSONString(param));
System.out.println(ret.getContent());
......
......@@ -633,11 +633,13 @@ public class TkTokenServiceImpl implements TkTokenService {
@Override
public JsonResult<TkTokenRemarkLog> queryTokenErrorInfo(TkToken tkToken) {
JsonResult<TkTokenRemarkLog> jsonResult = new JsonResult<>();
String uuId = UUIDGenerator.generate();
logger.info(uuId + " queryTokenErrorInfo userCode is " + tkToken.getUserCode() + " ,taxno is " + tkToken.getTaxno());
TkTokenRemarkLogExample example = new TkTokenRemarkLogExample();
example.createCriteria().andTaxnoEqualTo(tkToken.getTaxno()).andUserCodeEqualTo(tkToken.getUserCode());
TkTokenRemarkLog tkTokenRemarkLog = tkTokenRemarkLogService.getOne(example);
logger.info(uuId + " queryTokenErrorInfo errorResult is " + (null==tkTokenRemarkLog?"no find error!":tkTokenRemarkLog.getTokenCode()+tkTokenRemarkLog.getRemarks()));
//检测是否在token表存在
String tokenFlag = "0";
TkTokenExample tokenExample = new TkTokenExample();
......@@ -646,13 +648,14 @@ public class TkTokenServiceImpl implements TkTokenService {
if(tokenCount>0) {
tokenFlag = "1";
}
if(null != tkTokenRemarkLog && getStopFlag(tkTokenRemarkLog.getTokenCode(), tkToken.getUserType(), tkToken.getTokenStatus())){
if(null != tkTokenRemarkLog){
tkTokenRemarkLog.setTokenDate(tkTokenRemarkLog.getUpdateDate() != null ? new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(tkTokenRemarkLog.getUpdateDate()) : "");
} else {
tkTokenRemarkLog = new TkTokenRemarkLog();
}
tkTokenRemarkLog.setTokenFlag(tokenFlag);
jsonResult.setData(tkTokenRemarkLog);
logger.info(uuId + " queryTokenErrorInfo last result is " + JSON.toJSONString(jsonResult));
return jsonResult;
}
......
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