update hhs_goods as g
INNER JOIN
(select SUM(goods_number) as goods_number,goods_id from hhs_order_goods GROUP BY goods_id) as og
on g.goods_id=og.goods_id
set g.sales_base_num=og.goods_number
2.
update hhs_order_goods as og,hhs_goods as g,hhs_suppliers as s
set og.suppliers_id=s.suppliers_id,og.suppliers_name=s.suppliers_name
where og.goods_id=g.goods_id and g.suppliers_id=s.suppliers_id