pageList($condition, $field, $order, $page, $page_size, $alias, $join, $group); return success(0, '', $res); } /*** * 保存支付 * @param $data * @param $payInfo * @param $site_id * @param $rate 费率 * @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException */ public function PaySave($data, $payInfo, $site_id, $member_id = 0, $rate = '0.6') { $merchant_name = ''; if (isset($data['subject_info']['business_license_info']['merchant_name'])) { $merchant_name = $data['subject_info']['business_license_info']['merchant_name']; } else if ($data['subject_info']['certificate_info']['merchant_name']) { $merchant_name = $data['subject_info']['certificate_info']['merchant_name']; } $date = [ 'merchant_name' => $merchant_name, 'contacts_name' => $data['contact_info']['contact_name'], 'contacts_phone' => $data['contact_info']['mobile_phone'], 'site_id' => $site_id, 'ag_member_id' => $member_id, 'pay_type' => 'wechatpay', 'states' => 0, 'rate' => $rate, 'subject_type' => $data['subject_type'], 'wechatpay_value' => $payInfo, 'business_code' => $data['business_code'], 'isDrafts' => $data['isDrafts'], 'reg_money' => $data['reg_money'], ]; if ($data['shop_id'] > 0) { $find = $this->where('shop_id', $data['shop_id'])->find(); } else { $find = $this->where('business_code', $data['business_code'])->find(); } if ($find) { $find->save($date); } else { $this->save($date); } return success(); } /*** * @param $data * @param $payInfo * @param $site_id * @param int $member_id * @param string $rate * @return array */ public function AlipaySave($data, $payInfo, $ag_site_id, $member_id = 0, $rate = '0.6',$saveData=[]) { $datas = [ 'merchant_name' => $data['alias_name'], 'contacts_name' => $data['contact_infos']['name'], 'contacts_phone' => $data['contact_infos']['mobile'], 'site_id' => $data['site_id'], 'ag_site_id' => $ag_site_id, 'ag_member_id' => $member_id, 'manage_id' => $data['manage_id'] ?? 0, 'pay_type' => 'alipay', 'rate' => $rate, 'subject_type' => $data['subject_type'], 'alipay_value' => $payInfo, 'business_code' => $data['business_code'], 'service_commission' => $data['service_commission'] ?? 0, 'isDrafts' => $data['isDrafts'], 'reg_money' => $data['reg_money'], 'apply_desc' => $data['apply_desc'] ?? '', ]; $datas=array_merge($datas,$saveData); if ($data['shop_id'] > 0) { $find = $this->where('shop_id', $data['shop_id'])->find(); } else { $find = $this->where('business_code', $data['business_code'])->find(); } if ($find) { $find->save($datas, true); $shop_id = $find['shop_id']; } else { $this->save($datas, true); $shop_id = $this->shop_id; } return success(0, '' ,$shop_id); } }