Merge branch 'dev' of https://gitea.lihaink.cn/mkm/multi-store into dev
This commit is contained in:
commit
8139416648
@ -95,7 +95,7 @@ class UserRechargeController extends BaseAdminController
|
|||||||
|
|
||||||
public function refund()
|
public function refund()
|
||||||
{
|
{
|
||||||
$params = (new UserRechargeValidate())->goCheck('refund');
|
$params = (new UserRechargeValidate())->post()->goCheck('refund');
|
||||||
$detail = UserRecharge::where('id',$params['id'])->findOrEmpty();
|
$detail = UserRecharge::where('id',$params['id'])->findOrEmpty();
|
||||||
if(empty($detail)){
|
if(empty($detail)){
|
||||||
return $this->fail('无该充值订单请检查');
|
return $this->fail('无该充值订单请检查');
|
||||||
@ -114,7 +114,11 @@ class UserRechargeController extends BaseAdminController
|
|||||||
}
|
}
|
||||||
|
|
||||||
//支付宝
|
//支付宝
|
||||||
|
if($detail['recharge_type'] == 'ALI_INDUSTRYMEMBERS'){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->success();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ class UserRechargeLists extends BaseAdminDataLists implements ListsSearchInterfa
|
|||||||
public function lists(): array
|
public function lists(): array
|
||||||
{
|
{
|
||||||
return UserRecharge::where($this->searchWhere)
|
return UserRecharge::where($this->searchWhere)
|
||||||
->field(['id', 'uid', 'order_id', 'price', 'recharge_type', 'paid', 'pay_time'])
|
->field(['id', 'uid', 'order_id', 'price', 'recharge_type', 'paid', 'pay_time','status','refund_time'])
|
||||||
->limit($this->limitOffset, $this->limitLength)
|
->limit($this->limitOffset, $this->limitLength)
|
||||||
->order(['id' => 'desc'])
|
->order(['id' => 'desc'])
|
||||||
->select()->each(function ($item) {
|
->select()->each(function ($item) {
|
||||||
@ -54,6 +54,11 @@ class UserRechargeLists extends BaseAdminDataLists implements ListsSearchInterfa
|
|||||||
}else{
|
}else{
|
||||||
$item['pay_time']='';
|
$item['pay_time']='';
|
||||||
}
|
}
|
||||||
|
if($item['refund_time']>0){
|
||||||
|
$item['refund_time']=date('Y-m-d H:i:s',$item['refund_time']);
|
||||||
|
}else{
|
||||||
|
$item['refund_time']='';
|
||||||
|
}
|
||||||
if($item['paid']==1){
|
if($item['paid']==1){
|
||||||
$item['paid_name']='已充值';
|
$item['paid_name']='已充值';
|
||||||
}else{
|
}else{
|
||||||
|
@ -28,8 +28,6 @@ class PayController extends BaseApiController
|
|||||||
{
|
{
|
||||||
$app = new PayService(1);
|
$app = new PayService(1);
|
||||||
$result = $app->wechat->callback(Request()->post());
|
$result = $app->wechat->callback(Request()->post());
|
||||||
Cache::set('6log'.time(),$result);
|
|
||||||
Cache::set('6logJ'.time(),json_encode($result));
|
|
||||||
if ($result && $result->event_type == 'TRANSACTION.SUCCESS') {
|
if ($result && $result->event_type == 'TRANSACTION.SUCCESS') {
|
||||||
$ciphertext = $result->resource['ciphertext'];
|
$ciphertext = $result->resource['ciphertext'];
|
||||||
if ($ciphertext['trade_state'] === 'SUCCESS') {
|
if ($ciphertext['trade_state'] === 'SUCCESS') {
|
||||||
|
@ -259,6 +259,17 @@ class PayNotifyLogic extends BaseLogic
|
|||||||
//更新状态
|
//更新状态
|
||||||
$order = StoreOrder::where('order_id', $orderSn)->findOrEmpty();
|
$order = StoreOrder::where('order_id', $orderSn)->findOrEmpty();
|
||||||
if ($order->isEmpty() || $order->status == OrderEnum::REFUND_PAY) {
|
if ($order->isEmpty() || $order->status == OrderEnum::REFUND_PAY) {
|
||||||
|
//充值
|
||||||
|
$orderRe = UserRecharge::where('order_id',$orderSn)->findOrEmpty();
|
||||||
|
if($orderRe->isEmpty() || $orderRe->status == -1){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
$orderRe->status = -1;
|
||||||
|
$orderRe->refund_price = $orderRe->price;
|
||||||
|
$orderRe->refund_time = time();
|
||||||
|
$orderRe->remarks = '';
|
||||||
|
$orderRe->save();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
$order->status = OrderEnum::REFUND_PAY;
|
$order->status = OrderEnum::REFUND_PAY;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user