gengx
This commit is contained in:
parent
cc58029a76
commit
2b031af807
@ -108,7 +108,7 @@ class TaskLogic extends BaseLogic
|
||||
];
|
||||
$data = $arr;
|
||||
$data['money'] = 0;
|
||||
$data['extend'] = json_encode(['shareholder'=>['moeny'=>$v['recharge'],'over_decimal'=>$v['over_decimal'],'count_moeny'=>$v['recharge']*count($user_ids)]]);
|
||||
$data['extend'] = json_encode(['shareholder'=>['money'=>$v['recharge'],'over_decimal'=>$v['over_decimal'],'count_money'=>$v['recharge']*count($user_ids)]]);
|
||||
$data['type'] = 35;
|
||||
$data['title'] = $u_v['nickname'].'的入股任务';
|
||||
$data['status'] = 2;
|
||||
|
@ -29,7 +29,13 @@ class RechargeOrder extends BaseModel
|
||||
|
||||
protected $deleteTime = 'delete_time';
|
||||
|
||||
|
||||
public function getExtendAttr($value){
|
||||
if($value){
|
||||
return json_decode($value, true);
|
||||
}else{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @notes 支付方式
|
||||
* @param $value
|
||||
|
@ -20,6 +20,8 @@ use app\common\enum\PayEnum;
|
||||
use app\common\enum\user\UserTerminalEnum;
|
||||
use app\common\logic\PayNotifyLogic;
|
||||
use app\common\model\recharge\RechargeOrder;
|
||||
use app\common\model\task\Task;
|
||||
use app\common\model\task_template\TaskTemplate;
|
||||
use app\common\model\user\UserAuth;
|
||||
use app\common\service\wechat\WeChatConfigService;
|
||||
use EasyWeChat\Pay\Application;
|
||||
@ -376,6 +378,14 @@ class WeChatPayService extends BasePayService
|
||||
switch ($attach) {
|
||||
case 'recharge':
|
||||
$order = RechargeOrder::where(['sn' => $message['out_trade_no']])->findOrEmpty();
|
||||
if($order && isset($order['extend']['type']) &&$order['extend']['type']==1){
|
||||
$find=Task::where('id',$order['extend']['task_id'])->find();
|
||||
if($find){
|
||||
Task::where('id',$order['extend']['task_id'])->update(['status'=>3]);
|
||||
// TaskTemplate::where('id',$find['template_id'])->update(['status'=>2]);
|
||||
|
||||
}
|
||||
}
|
||||
if($order->isEmpty() || $order->pay_status == PayEnum::ISPAID) {
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user