feat : pay callback

This commit is contained in:
2025-02-17 18:00:15 +08:00
parent ba2bb6874e
commit b11f033185
7 changed files with 199 additions and 26 deletions

View File

@@ -4,8 +4,10 @@ declare(strict_types=1);
namespace App\Model;
use App\Constants\Common\ThirdCode;
use Hyperf\Database\Model\Builder;
use Hyperf\DbConnection\Model\Model;
use Hyperf\Tappable\HigherOrderTapProxy;
/**
* @property int $id
@@ -43,4 +45,13 @@ class UserThird extends Model
{
return $this->where('open_id', $openId)->first();
}
/**
* @param int $userId
* @return HigherOrderTapProxy|mixed|string
*/
public function getWxThirdInfoByUserId(int $userId)
{
return $this->where('user_id', $userId)->where('type',ThirdCode::WX_LOGIN)->value('open_id') ?? '';
}
}