您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

27 行
701B

  1. <?php
  2. namespace common\logic\User\CreditHistory;
  3. use common\logic\BaseService;
  4. use common\logic\Order\Order\Order;
  5. use common\logic\RepositoryInterface;
  6. class CreditHistoryRepository extends BaseService implements RepositoryInterface
  7. {
  8. public function defaultOptionsSearch(): array
  9. {
  10. return [
  11. 'with' => [],
  12. 'join_with' => [],
  13. 'orderby' => CreditHistory::tableName() . '.date ASc',
  14. 'attribute_id_producer' => CreditHistory::tableName() . '.id_producer'
  15. ];
  16. }
  17. public function getByOrder(Order $order)
  18. {
  19. return CreditHistory::find()
  20. ->where(['id_order' => $order->id])
  21. ->all();
  22. }
  23. }