Broadcast.php 965 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace app\model;
  3. use think\Model;
  4. class Broadcast extends Model
  5. {
  6. protected $connection = 'mysql';
  7. protected $pk = 'id';
  8. protected $name = 'broadcast';
  9. public static function neworder($order)
  10. {
  11. $data['weid'] = weid();
  12. $member = Member::find($order['uid']);
  13. if (!empty($member)) {
  14. $data['username'] = $member->nickname;
  15. $data['content'] = '刚刚下了订单';
  16. $data['touxiang'] = $member->userpic;
  17. $res = self::create($data);
  18. }
  19. }
  20. public static function staff($order_staff)
  21. {
  22. $data['weid'] = weid();
  23. $Technical = Technical::getInfo($order_staff['uuid']);
  24. if (!empty($Technical)) {
  25. $data['username'] = $Technical['title'];
  26. $data['content'] = '刚刚接到平台的派单';
  27. $data['touxiang'] = $Technical['touxiang'];
  28. $res = self::create($data);
  29. }
  30. }
  31. }