feat : wechatPay callback

This commit is contained in:
2025-03-18 11:14:07 +08:00
parent b50a0738fb
commit 4f4a4a6dd4
10 changed files with 42 additions and 30 deletions

View File

@@ -4,6 +4,7 @@ declare(strict_types=1);
namespace App\Model;
use App\Constants\Common\PayCode;
use Hyperf\Database\Concerns\BuildsQueries;
use Hyperf\Database\Model\Builder;
use Hyperf\DbConnection\Model\Model;
@@ -51,6 +52,11 @@ class PayOrder extends Model
*/
public function getInfoByOrderIdAndType(int $id,int $type): \Hyperf\Database\Model\Model|null
{
return $this->where('order_id',$id)->where('order_type',$type)->first();
return $this->where('order_id',$id)->where('order_type',$type)->where('status',PayCode::FINISH_PAY)->first();
}
public function getInfoByOrderIdAndTypeAndRType(int $id,int $type,int $rType)
{
return $this->where('order_id',$id)->where('order_type',$type)->where('recharge_type',$rType)->first();
}
}