blade-boot 中批量删除数据,业务通用字段只更新最后1条记录的数据

Blade 未结 1 623
stx510
stx510 剑圣 2021-06-22 13:20

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

1. 

================  Request Start  ================

===> POST: /blade-system/post/remove Parameters: {"ids":"1407199301913862145,1407198686961790977"}

===Headers===  sec-fetch-mode: cors

===Headers===  referer: http://localhost:1888/

===Headers===  content-length: 0

===Headers===  sec-fetch-site: same-origin

===Headers===  blade-auth: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJpc3N1c2VyIiwiYXVkIjoiYXVkaWVuY2UiLCJ0ZW5hbnRfaWQiOiI1OTUyNzIiLCJyb2xlX25hbWUiOiJhZG1pbiIsInBvc3RfaWQiOiIxNDA2ODIxNzQxMTExNjYwNTQ2IiwidXNlcl9pZCI6IjE0MDY4MjE3NDEyNDU4NzgyNzMiLCJyb2xlX2lkIjoiMTQwNjgyMTczODk2ODM3MTIwMiIsInVzZXJfbmFtZSI6ImFkbWluIiwibmlja19uYW1lIjoi6bKB56aP6IuxIiwiZGV0YWlsIjp7InR5cGUiOiJ3ZWIifSwidG9rZW5fdHlwZSI6ImFjY2Vzc190b2tlbiIsImRlcHRfaWQiOiIxNDA2ODIxNzQxMDk0ODgzMzI5IiwiYWNjb3VudCI6ImFkbWluIiwiY2xpZW50X2lkIjoic2FiZXIiLCJleHAiOjE2MjQzMzk5OTYsIm5iZiI6MTYyNDMzNjM5Nn0.HUNHRMO4v4zpl5tg_ameSs_lYIgksORcxonf-uH2CBQsdB8O1UFqOqJB5a2US9K3O-oBx-qJ15Nu7EGYlV8vpA

===Headers===  cookie: saber-access-token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJpc3N1c2VyIiwiYXVkIjoiYXVkaWVuY2UiLCJ0ZW5hbnRfaWQiOiI1OTUyNzIiLCJyb2xlX25hbWUiOiJhZG1pbiIsInBvc3RfaWQiOiIxNDA2ODIxNzQxMTExNjYwNTQ2IiwidXNlcl9pZCI6IjE0MDY4MjE3NDEyNDU4NzgyNzMiLCJyb2xlX2lkIjoiMTQwNjgyMTczODk2ODM3MTIwMiIsInVzZXJfbmFtZSI6ImFkbWluIiwibmlja19uYW1lIjoi6bKB56aP6IuxIiwiZGV0YWlsIjp7InR5cGUiOiJ3ZWIifSwidG9rZW5fdHlwZSI6ImFjY2Vzc190b2tlbiIsImRlcHRfaWQiOiIxNDA2ODIxNzQxMDk0ODgzMzI5IiwiYWNjb3VudCI6ImFkbWluIiwiY2xpZW50X2lkIjoic2FiZXIiLCJleHAiOjE2MjQzMzk5OTYsIm5iZiI6MTYyNDMzNjM5Nn0.HUNHRMO4v4zpl5tg_ameSs_lYIgksORcxonf-uH2CBQsdB8O1UFqOqJB5a2US9K3O-oBx-qJ15Nu7EGYlV8vpA; saber-refresh-token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJpc3MiOiJpc3N1c2VyIiwiYXVkIjoiYXVkaWVuY2UiLCJ1c2VyX2lkIjoiMTQwNjgyMTc0MTI0NTg3ODI3MyIsInRva2VuX3R5cGUiOiJyZWZyZXNoX3Rva2VuIiwiY2xpZW50X2lkIjoic2FiZXIiLCJleHAiOjE2MjQ5NDExOTYsIm5iZiI6MTYyNDMzNjM5Nn0.8eLaOvtH0Cz6ZSVAPylDXdxW1Plx14ocC6fW1c8VFk1w1Gv4ABw1zfh298aZL1lBNyy0YQv70_r3a0vk_Ad5lA

===Headers===  accept-language: zh-CN,zh;q=0.9

===Headers===  x-forwarded-proto: http

===Headers===  origin: http://localhost:1888

===Headers===  x-forwarded-port: 1888

===Headers===  x-forwarded-for: 127.0.0.1

===Headers===  accept: application/json, text/plain, */*

===Headers===  authorization: Basic c2FiZXI6c2FiZXJfc2VjcmV0

===Headers===  sec-ch-ua: "Google Chrome";v="93", " Not;A Brand";v="99", "Chromium";v="93"

===Headers===  sec-ch-ua-mobile: ?0

===Headers===  x-forwarded-host: localhost:1888

===Headers===  host: localhost

===Headers===  connection: close

===Headers===  accept-encoding: gzip, deflate, br

===Headers===  user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4542.2 Safari/537.36

===Headers===  sec-fetch-dest: empty

================   Request End   ================


2021-06-22 13:13:02.813  INFO 21215 --- [  XNIO-1 task-1] io.lettuce.core.EpollProvider            : Starting without optional epoll library

2021-06-22 13:13:02.814  INFO 21215 --- [  XNIO-1 task-1] io.lettuce.core.KqueueProvider           : Starting without optional kqueue library

2021-06-22 13:13:03.015  INFO 21215 --- [  XNIO-1 task-1] o.s.core.mp.plugins.SqlLogInterceptor    : 


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

Execute SQL : update blade_post set update_user = 1406821741245878273, update_time = TIMESTAMP '2021-06-22 13:13:02.977' where id = 1407198686961790977 and is_deleted = 0

Execute Time: 3.679ms

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


2021-06-22 13:13:03.034  INFO 21215 --- [  XNIO-1 task-1] o.s.core.mp.plugins.SqlLogInterceptor    : 


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

Execute SQL : update blade_post set is_deleted = 1 where id in (1407199301913862145, 1407198686961790977) and is_deleted = 0

Execute Time: 2.597ms

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


二、你期待的结果是什么?实际看到的又是什么?

期望更新多条通用业务字段数据;

三、你正在使用的是什么产品,什么版本?在什么操作系统上?

Running SpringBoot 2.2.13.RELEASE MAC OS

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


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

1条回答
  • 2021-06-22 16:34

    后端的逻辑如下,经过测试,数据是被批量更新的。至于sql打印只有一条,定位到是durid本身的解析器问题,只能解析出最后一条展示。

    image.png

    0 讨论(0)
提交回复