basisIdGetInfo($param['bill_id']); if ($billResult['status'] != 1) { return $billResult; } $result = $this->abnormalHandle($billResult['data']); return $result; } /** * 支付失败或查询支付异常处理 * @param $param * [ * data * ] * @return mixed */ public function abnormalHandle($param) { //支付失败进行缓存清除 if (!empty($param['coupon_type']) && !empty($param['coupon_id']) && C('IS_SET_REDIS')) { $coupon_redis_key = 'retail_coupon_store_id_*_uid_*_coupon_type_' . $param['coupon_type'] . '_coupon_id_' . $param['coupon_id']; $CacheHandleClass = new CacheHandle(); $CacheHandleClass->eliminateCache($coupon_redis_key); } //支付失败后修改订单表状态 if ($param['pay_money'] == 0) { $billOrderModel = new RetailBillOrderModel(); $billOrderModel->updateOrder([ 'id' => $param['id'] ], ['pay_state' => 0]); } return callBack(statusCode()['success'], "成功"); } }