- Configuration
- Department
- User
- Product
- Project
- Task
- 6 Get Task List
- 6 Get Task Optional Information
- 6 Add Task
- 6 Finish Task Optional Information
- 6 Finish Task
- Bug
Add Product
- 2020-03-24 10:41:57
- John Ten
- 2483
- Final Edition:tengfei De 2020-03-24 17:19:36
| Method Description |
By requesting this method, you can add a product, and specify the person in charge and set the product type and access control. Note: If the parameter acl=custom, you can pass additional parameters, e.g. 'whitelist' => array(1, 2) , and add the IDs in the privilege group to the whitelist. |
|||||||||||||||||||||||||||||||||||||||||||||
| Example |
public function addProduct()
{
include_once('../vendor/zentao/zentao.php');
$zentao = new \zentao();
$params = array(
'name' => 'product-200',
'code' => 'p200',
'line' => 0,
'PO' => 'lisi',
'QD' => 'zhangsan',
'RD' => 'wangwu',
'type' => 'normal',
'status' => 'normal',
'desc' => 'product description,product description',
'acl' => 'custom',
'whitelist' => array(1, 2)
); // request parameter
$result = $zentao->addProduct($params);
return $result;
}
|
|||||||||||||||||||||||||||||||||||||||||||||
| Request | POST | |||||||||||||||||||||||||||||||||||||||||||||
| Method |
addProduct |
|||||||||||||||||||||||||||||||||||||||||||||
| Parameter |
|
|||||||||||||||||||||||||||||||||||||||||||||
|
Result |
success | error | ||||||||||||||||||||||||||||||||||||||||||||
{ "status": 1,
"msg": "success",
"result": "Saved"
}
|
{
"status": 0,
"msg": "error",
"result": {
"name": [
"『Product Name』 should not be empty."
]
}
}
|
|||||||||||||||||||||||||||||||||||||||||||||
Commenter
Produit
- ZDOO
- ZDOO Cloud
- ZSITE
Contactez-Nous
- A propos de nous
- Courriel: Philip@easycorp.ltd
- WhatsApp: 0086 18563953295
- Skype: philip517
