Commit 9c55d502 by 翁国栋 Committed by 284718418@qq.com

8小时后台--

保险增员回调,回调速度过快,系统sql执行未完成导致无法查找到订单
parent ca797bba
......@@ -5,6 +5,7 @@ import cn.timer.api.bean.yggl.YgglMainEmp;
import cn.timer.api.config.exception.CustomException;
import cn.timer.api.utils.HttpUtils;
import cn.timer.api.utils.ResultUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
......@@ -122,6 +123,7 @@ public class CallBackContorll {
throw new CustomException("增员核保回调验签失败");
}
CallBack callBack = JSONObject.parseObject(sb.toString(), CallBack.class);
log.info("增员核保回调参数:- {}",JSON.toJSONString(callBack));
if (callBack.getCallback_type().equals("1")) {
List<InsureUser> insureUserList = InsureUser.builder().build().selectList(new QueryWrapper<InsureUser>().lambda().eq(InsureUser::getTransId, callBack.getOrder_import_info().getThird_uuid()));
if(insureUserList.size()<=0){
......@@ -165,7 +167,11 @@ public class CallBackContorll {
.returnCode(callBack.getStatus()).returnMsg(errorMsg).policyId(insurePolicy.getId()).build().insert();
}
}
} catch (Exception e) {
} catch (IndexOutOfBoundsException e){
log.error("增员核保回调异常:无法查找到该订单",e);
return map;
}
catch (Exception e) {
log.error("增员核保回调异常:",e);
throw new CustomException("增员核保回调异常");
} finally {
......@@ -204,6 +210,7 @@ public class CallBackContorll {
paramsMap.put("timestamp", timestamp);
paramsMap.put("sign", sign);
CallBack callBack = JSONObject.parseObject(sb.toString(), CallBack.class);
log.info("保全增员申请回调:- {}",JSON.toJSONString(callBack));
List<InsureUser> list = InsureUser.builder().build().selectList(new QueryWrapper<InsureUser>().lambda().eq(InsureUser::getTransId, callBack.getOrder_import_info().getThird_uuid()));
if(list.size()<=0){
list = InsureUser.builder().build().selectList(new QueryWrapper<InsureUser>().lambda().eq(InsureUser::getBatchNo, callBack.getOrder_import_info().getUuid()));
......@@ -264,7 +271,11 @@ public class CallBackContorll {
insurePolicy.setStatus("1");
insurePolicy.updateById();
} catch (Exception e) {
} catch (IndexOutOfBoundsException e){
log.error("保全增员申请回调:无法查找到该订单",e);
return map;
}
catch (Exception e) {
log.error("保全增员申请回调异常:",e);
throw new CustomException("保全增员申请回调异常");
//TODO 写入日志
......
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