json.data do json.array! @data do |d| json.id d.id json.specification d.product_catalog.specification json.unit d.product_catalog.unit json.num d.amount json.price d.price json.amount d.total_price || 0 json.name d.product_catalog.name end end json.code 0 json.count @data.total_count