SettledData.php
4.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?php
namespace LibModels\Web\Shop;
use Api\Yohobuy;
use Api\Sign;
/**
* 商家入驻的接口
*
* @name SettledData
* @package shop
* @copyright yoho.inc
* @author xiaoxiao.hao <xiaoxiao.hao@yoho.cn>
*/
class SettledData
{
/**
* 添加入驻申请保存
* @param type string $brand_name 品牌名称
* @param type string $registerStatus 品牌注册情况
* @param type string $sellerName 公司名称
* @param type string $sellerAddress 公司地址
* @param type int $zipCode 邮编
* @param type string $contacts 联系人
* @param type int $contactPhone 电话|手机
* @param type string $contactEmail 邮箱
* @param type string $sellerRole 与品牌关系
* @param type string $brandWebsite 品牌官网
* @param type string $onlineShopWebsite 店铺连接
* @param type json $categoryInfo 品类信息['category_one'=> '', 'category_two'=> '', 'category_price'=> '']
* @param type string $billingCycle 结算周期
* @param type string $warehouseAddress 仓库地址
* @param type string $producer 商品产地
* @param type string $invoiceType 发票类型
* @param type string $newCycle 商品上新周期
* @param type int $quarterNum 款式数量
* @param type string $supplyCycle 商品补货周期
* @param type int 1:有, 0:无 $haveStore 品牌线上店状况
* @param type json $storeInfo 品牌线下店 ['store_address' => '店铺地址', 'store_sales_volume' => '月均销售']
* @param type string $brandMaterial 品牌资料
* @param type string $goodsMaterial 当季产品
* @param type int $uid 用户ID
* @return type []
*/
public static function insertApply($brandName, $registerStatus, $sellerName, $sellerAddress, $zipCode,
$contacts, $contactPhone, $contactEmail, $sellerRole, $brandWebsite, $onlineShopWebsite, $categoryInfo,
$billingCycle, $warehouseAddress, $producer, $invoiceType, $newCycle, $quarterNum, $supplyCycle, $haveStore,
$storeInfo, $brandMaterial, $goodsMaterial, $uid)
{
$param = Yohobuy::param();
$param['method'] = 'app.shops.insertApply';
$param['brandName'] = $brandName;
$param['registerStatus'] = $registerStatus;
$param['sellerName'] = $sellerName;
$param['sellerAddress'] = $sellerAddress;
$param['zipCode'] = $zipCode;
$param['contacts'] = $contacts;
$param['contactPhone'] = $contactPhone;
$param['contactEmail'] = $contactEmail;
$param['sellerRole'] = $sellerRole;
$param['brandWebsite'] = $brandWebsite;
$param['onlineShopWebsite'] = $onlineShopWebsite;
$param['categoryInfo'] = $categoryInfo;
$param['billingCycle'] = $billingCycle;
$param['warehouseAddress'] = $warehouseAddress;
$param['producer'] = $producer;
$param['invoiceType'] = $invoiceType;
$param['newCycle'] = $newCycle;
$param['quarterNum'] = $quarterNum;
$param['supplyCycle'] = $supplyCycle;
$param['haveStore'] = $haveStore;
$param['storeInfo'] = $storeInfo;
$param['brandMaterial'] = $brandMaterial;
$param['goodsMaterial'] = $goodsMaterial;
$param['uid'] = $uid;
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::post(API_URL, $param);
}
/**
* 获取一级品类
* @return type []
*/
public static function getOneCategory()
{
$param = Yohobuy::param();
$param['method'] = 'app.category.queryMax';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(API_URL, $param);
}
/**
* 通过一级品类,获取二级分类
* @param type int $parentId 一级品类id
* @return type []
*/
public static function getTwoCategory($parentId)
{
$param = Yohobuy::param();
$param['method'] = 'app.category.queryMin';
$param['parent_id'] = intval($parentId);
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::get(API_URL, $param);
}
}