| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?php
- namespace app\admin\model\dao;
- use app\common\model\UserModel;
- use think\facade\Db;
- class WithdrawLog extends BaseDao
- {
- protected $model;
- public static $table = "db_withdraw_log";
- public function __construct()
- {
- $this->model = new UserModel();
- }
- public static function getWithdrawLogById($id)
- {
- return Db::table(self::$table)->where(['id' => $id])->find();
- }
- public static function updateServiceMoney($id, $serviceMoney)
- {
- return Db::table(self::$table)->where(['id' => $id])
- ->update([
- 'service_money' => $serviceMoney,
- 'update_at' => date('Y-m-d H:i:s')
- ]);
- }
- public static function update($id, $updateData)
- {
- $updateData['update_at'] = sr_getcurtime(time());
- Db::table(self::$table)->where('id', $id)->update($updateData);
- }
- public static function SumPracticalMoneyByStatus($int)
- {
- return Db::table(self::$table)->where('status', $int)->sum('practical_money');
- }
- }
|