| 12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
- namespace app\admin\model\dao;
- use app\common\model\ShopOrder as ShopOrderModel;
- use app\common\model\UserModel;
- use think\facade\Db;
- class ShopOrder extends BaseDao
- {
- protected $model;
- public static $table = "db_shop_order";
- public function __construct()
- {
- $this->model = new ShopOrderModel();
- }
- public static function editStatus($orderId, $status)
- {
- return Db::table(self::$table)
- ->where(['order_id' => $orderId])
- ->update([
- 'status' => $status,
- 'updated_time' => date('Y-m-d H:i:s')
- ]);
- }
- public static function getOrderById($orderId)
- {
- return Db::table(self::$table)->where(['order_id' => $orderId])->find();
- }
- }
|