OrderCard.php 586 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace app\model;
  3. use think\Model;
  4. class OrderCard extends Model
  5. {
  6. protected $connection = 'mysql';
  7. protected $pk = 'id';
  8. protected $name = 'order_card';
  9. public static function timesmum($order_id)
  10. {
  11. $data = self::where(['order_id' => $order_id])->find();
  12. if ($data) {
  13. return (int) $data->timesmum;
  14. }
  15. }
  16. public static function getinfobyorderid($order_id)
  17. {
  18. $data = self::where(['order_id' => $order_id])->find();
  19. if ($data) {
  20. return $data->toArray();
  21. }
  22. }
  23. }