modify goodsItems second and refomat code