作者 王智

文档修改

... ... @@ -18,6 +18,8 @@ return [
'Type 9' => '好友下单奖励',
'Type 10' => '下单奖励',
'Type 11' => '下单抵扣',
'Type 12' => '订单退还积分,',
'Type 13' => '退单扣除积分',
'Num' => '积分明细',
'Up_num' => '剩余积分',
'Createtime' => '发生时间',
... ...
... ... @@ -273,23 +273,25 @@ class GuanYiCloud extends Api
if (empty($Array['orders'])) {
$this->error('获取订单失败:平台单号' . $OrderSn);
}
return $Array['orders'];
}
//获取订单oid
public function OrderUpdate()
public function OrderUpdate($OrderSn,$Oid)
{
$OrderSn = input('order');
$data = array();
$data['appkey'] = APPKEY;
$data['sessionkey'] = SESSIONKEY;
$data['method'] = 'gy.erp.trade.refund.update';
$data['tid'] = $OrderSn;
$data['oid'] = $OrderSn;
$data['oid'] = $Oid;
$data['refund_state'] = 2;
// $date['receiver_mobile']='15928552965';
$data['sign'] = $this->sign($data, SECRET);
$Array = json_decode(json_encode(json_decode($this->mycurl(URL, $data))), true);
dump($Array);
if ($Array['success'] == false) {
$this->error('订单推送失败');
}
}
}
\ No newline at end of file
... ...
... ... @@ -374,7 +374,8 @@ class Order extends Api
]
);
$GuanYiCloud = new GuanYiCloud();
$GuanYiCloud->GetOrderOid($params['OrderSn']);
$Oid = $GuanYiCloud->GetOrderOid($params['OrderSn']);
$GuanYiCloud->OrderUpdate($params['OrderSn'], $Oid);
if (!$res2) {
$this->error('订单状态更改失败', 0);
die;
... ...
... ... @@ -333,20 +333,20 @@ class Pay extends Api
//扣除积分 增加余额
Db::name('user')->where('id', $FatherUserId)->update(
[
'num' => $FirstUserInfoArray['num'] - $RecordedFirstMoney,
// 'num' => $FirstUserInfoArray['num'] - $RecordedFirstMoney,
'money' => $FirstUserInfoArray['money'] + $RecordedFirstMoney
]
);
//添加用户积分记录
$FirstNumuSql = [
'user_id' => $FatherUserId,
'status' => 0,
'type' => 3,
'num' => $RecordedFirstMoney,
'up_num' => $FirstUserInfoArray['num'] - $RecordedFirstMoney,
'createtime' => time()
];
Db::name('num')->insert($FirstNumuSql);
// $FirstNumuSql = [
// 'user_id' => $FatherUserId,
// 'status' => 0,
// 'type' => 3,
// 'num' => $RecordedFirstMoney,
// 'up_num' => $FirstUserInfoArray['num'] - $RecordedFirstMoney,
// 'createtime' => time()
// ];
// Db::name('num')->insert($FirstNumuSql);
//添加收益记录
$FirstSqlMoney = [
'user_id' => $FatherUserId,
... ... @@ -387,20 +387,20 @@ class Pay extends Api
//扣除积分 增加余额
Db::name('user')->where('id', $GroundFatherUserId)->update(
[
'num' => $SecondUserInfoArray['num'] - $RecordedSecondMoney,
// 'num' => $SecondUserInfoArray['num'] - $RecordedSecondMoney,
'money' => $SecondUserInfoArray['money'] + $RecordedSecondMoney
]
);
//添加用户积分记录
$SecondNumuSql = [
'user_id' => $GroundFatherUserId,
'status' => 0,
'type' => 3,
'num' => $RecordedSecondMoney,
'up_num' => $SecondUserInfoArray['num'] - $RecordedSecondMoney,
'createtime' => time()
];
Db::name('num')->insert($SecondNumuSql);
// //添加用户积分记录
// $SecondNumuSql = [
// 'user_id' => $GroundFatherUserId,
// 'status' => 0,
// 'type' => 3,
// 'num' => $RecordedSecondMoney,
// 'up_num' => $SecondUserInfoArray['num'] - $RecordedSecondMoney,
// 'createtime' => time()
// ];
// Db::name('num')->insert($SecondNumuSql);
//添加收益记录
$SecondSqlMoney = [
'user_id' => $GroundFatherUserId,
... ...
... ... @@ -62,7 +62,7 @@ class User extends Api
/*新增会员到管易平台*/
$GuanYiCloud = new GuanYiCloud();
$bool = $GuanYiCloud->getvip($Json['unionId']);
if ($bool == 1) {
if ($bool == 0) {
$GuanYiCloud->addVip($Json['unionId'], $Json['nickName']);
}
$dataUser = [
... ...