spring boot 版本 多表保存

Blade 未结 1 635
橙柒
橙柒 2022-04-12 17:09

一、该问题的重现步骤是什么?

  1. 主副表数据保存, 主表存储正常到了副表存储的时候报

    image.png

  2. 报错如下

image.png

2. 

四、请提供详细的错误堆栈信息,这很重要。

===============  Response Start  ================

<=== POST: /qfy-supplier/supplier/saveSupplier (13069 ms)

===============   Response End   ================


2022-04-12 17:05:05.586 ERROR 1288 --- [  XNIO-1 task-5] o.s.c.l.e.BladeRestExceptionTranslator   : 服务器异常


org.springblade.core.tenant.exception.TenantDataSourceException: null


2022-04-12 17:05:05.628  INFO 1288 --- [   async-task-5] o.s.core.mp.plugins.SqlLogInterceptor    : 


==============  Sql Start  ==============

Execute SQL : insert into blade_log_error (id, stack_trace, exception_name, tenant_id, service_id , server_ip, server_host, env, remote_ip, user_agent , request_uri, method, params, create_by, create_time) values (1513805393462824961, 'org.springblade.core.tenant.exception.TenantDataSourceException

', 'org.springblade.core.tenant.exception.TenantDataSourceException', '000000', 'blade-api' , '192.168.110.186:708', 'MacBook-Pro.local', 'dev', '127.0.0.1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.88 Safari/537.36' , '/qfy-supplier/supplier/saveSupplier', 'POST', '{"supplierName":"1321312312","companyName":"1321312312","contactPerson":"1321312312","contactPhone":"1321312312","companyAddress":"","contractExpireDate":"2022-04-12 05:04:05","billingWay":"","billingCycle":"","taxType":"","billingType":"","creditCode":"","businessRange":"","businessHours":"","cinemaInfo":"","remark":"","provinceCode":"35","cityCode":"3502","districtCode":"350206","longitude":"","latitude":"","bankCode":"1321312312","bankBranchCode":"1321312312","bankAccount":"1321312312","taxIdenNo":"1321312312","supplementNotes":"","platformRule":"","supplierRule":"1","freightAmount":"","supplierType":"1","platType":"1","isTaxpayer":"","supplierIsExist":"","phoneIsExist":"","cinemaCode":"","childrenInfo":"","glassesInfo":"","checkPhone":"","coopTicket":"","supplierId":"","qualifyType":"2","fileUrl":"http://ra7vrmwu8.hn-bkt.clouddn.com/upload/20220412/1d46f305a5ac13d432d605167bbe092b.png","remarkAttach":"","$provinceCode":"福建省","$cityCode":"厦门市","$districtCode":"湖里区"}', 'admin', TIMESTAMP '2022-04-12 17:05:05.600')

Execute Time: 20.031ms

==============  Sql  End   ==============

五、若有更多详细信息,请在下面提供。

1条回答
  •  admin
    admin (楼主)
    2022-04-12 17:58

    看报错是租户数据源切换导致的,你到对应模块调试看下,是否租户ID获取为空。

    如果找不到原因,请把可重现的步骤发一下,并且贴上你的代码。因为这是你写的业务代码,我们本地没有。只有我们本地可以拿你代码和步骤重现了才能帮你寻找原因。

    image.png

    0 讨论(0)
提交回复