xhOrderGoodsService.php 422 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace common\services;
  3. use common\models\xhOrderGoods;
  4. class xhOrderGoodsService {
  5. public static function add($data)
  6. {
  7. return xhOrderGoods::add($data);
  8. }
  9. public static function getByCondition($condition)
  10. {
  11. return xhOrderGoods::getByCondition($condition);
  12. }
  13. public static function getAllByOrderId($orderId)
  14. {
  15. return xhOrderGoods::find()->where(['orderId' => $orderId])->asArray()->all();
  16. }
  17. }