StoreOrderStatus.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2020 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. namespace app\admin\model\order;
  12. use traits\ModelTrait;
  13. use basic\ModelBasic;
  14. /**
  15. * 订单操作纪律model
  16. * Class StoreOrderStatus
  17. * @package app\admin\model\store
  18. */
  19. class StoreOrderStatus extends ModelBasic
  20. {
  21. use ModelTrait;
  22. /**
  23. * @param $oid
  24. * @param $type
  25. * @param $message
  26. */
  27. public static function setStatus($oid,$type,$message,$order_type=0){
  28. $data['oid'] = (int)$oid;
  29. $data['type'] = $order_type;
  30. $data['change_type'] = $type;
  31. $data['change_message'] = $message;
  32. $data['change_time'] = time();
  33. self::set($data);
  34. }
  35. /**
  36. * @param $where
  37. * @return array
  38. */
  39. public static function systemPage($oid){
  40. $model = new self;
  41. $model = $model->where('oid',$oid);
  42. $model = $model->order('change_time asc');
  43. return self::page($model);
  44. }
  45. /**
  46. * @param $where
  47. * @return array
  48. */
  49. public static function systemPageMer($oid){
  50. $model = new self;
  51. $model = $model->where('oid',$oid);
  52. $model = $model->order('change_time asc');
  53. return self::page($model);
  54. }
  55. }