hxhac / mali

Life Manage
MIT License
0 stars 0 forks source link

goods-evaluation做成硬删除 #164

Closed hxhac closed 1 year ago

hxhac commented 1 year ago

否则brand的num有问题

sc
hxhac commented 1 year ago

本身就是硬删除逻辑

Xnip2023-04-29_12-04-04

hxhac commented 1 year ago

问题出在之前修改为硬删除逻辑之后,没有修改goods_brand表的num的值

根据goods_evaluation表的brand的数量修改goods_brand表的num

update goods_brand set num = (select count(id) from goods_evaluation where brand = goods_brand.id) where 1=1;