jh-admin/addon/store/model/MaYiStore.php

113 lines
3.0 KiB
PHP

<?php
/**
* SAAS应用系统 --- 十年开发经验汇集巨献!
* ==========================================================
* Copy right 2020-2050 成都众联思索科技有限公司,保留所有权利。
* ----------------------------------------------------------
* 官方网址: https://www.zoomtk.com
* 这不是自由软件!未经允许不得用于商业目或程序代码摘取及修改。
* 任何企业和个人未经允许对程序代码以任何形式任何目的再发布传播。
* 唯一发布渠道www.zoomtk.com;非官方渠道统一视为侵权行为。
* ==========================================================
*/
namespace addon\store\model;
use app\model\BaseModel;
use addon\aliapp\model\MinCode;
class MaYiStore extends BaseModel
{
public $my = '';
public function __construct($site_id)
{
$this->my = new MinCode($site_id);
}
/***
* 查询店铺
* @param $shop_id
*/
public function shopQuery($shop_id)
{
$info = $this->my->requestApi('ant.merchant.expand.shop.query', ['shop_id' => $shop_id]);
return $info['ant_merchant_expand_shop_query_response'];
}
/***
* 创建支付宝门店
* @param $data
* @return mixed
*/
public function StoreCreate($data)
{
$info = $this->my->requestApi('ant.merchant.expand.shop.create', $data);
return $info['ant_merchant_expand_shop_create_response'];
}
/***
* 修改支付宝门店信息
* @param $data
* @return mixed
*/
public function modifyStore($data)
{
$info = $this->my->requestApi('ant.merchant.expand.shop.modify', $data);
return $info['ant_merchant_expand_shop_modify_response'];
}
/***
* 申请订单查询
* @param $order_id
*/
public function orderQuery($order_id)
{
$info = $this->my->requestApi('ant.merchant.expand.order.query', ['order_id' => $order_id]);
return $info['ant_merchant_expand_order_query_response'];
}
/***
* 分页查询门店
* @param $pid 支付宝PID SIMD
* @param int $page_num
* @return mixed
*/
public function QueryStore($pid, $page_num = 1)
{
$info = $this->my->requestApi('ant.merchant.expand.shop.page.query', [
'ip_role_id' => $pid,
'page_num' => $page_num,
'page_size' => 10,
]);
return $info['ant_merchant_expand_shop_page_query_response'];
}
/***
* 关闭门店
* @param $shop_id
* @return mixed
*/
public function CloseStore($shop_id)
{
$info = $this->my->requestApi('ant.merchant.expand.shop.close', ['shop_id' => $shop_id]);
return $info['ant_merchant_expand_shop_close_response'];
}
/***
* 营业分类查询
* @return mixed
*/
public function mccQuery()
{
$info = $this->my->requestApi('ant.merchant.expand.mcc.query', []);
return $info['ant_merchant_expand_mcc_query_response'];
}
}