| 1234567891011121314151617181920212223242526272829303132333435363738 |
- <?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();
- }
- }
|