OrderGoodsV2Model.class.php 738 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /**
  3. * lionfish 商城系统
  4. *
  5. *
  6. * @author fish
  7. *
  8. */
  9. namespace Home\Model;
  10. use Think\Model;
  11. /**
  12. * @author yj
  13. * @desc 重构前端订单模型
  14. * Class OrderV2Model
  15. * @package Home\Model
  16. */
  17. class OrderGoodsV2Model {
  18. /**
  19. * @author yj
  20. * @desc 获取订单商品名称
  21. * @param $order_id
  22. * @return string
  23. */
  24. public function getOrderGoodsName( $order_id )
  25. {
  26. $order_goods_name = "";
  27. $order_goods_list = M('lionfish_comshop_order_goods')->where( array('order_id' => $order_id ) )->select();
  28. foreach($order_goods_list as $order_goods)
  29. {
  30. $order_goods_name .= $order_goods['name']." \r\n";
  31. }
  32. return $order_goods_name;
  33. }
  34. }