跳到主要内容

Update multiple records

Example DB Table

smartPanda.mdh.brand

CREATE TABLE `brand`
(
`id` int NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL DEFAULT '',
`logo` text,
`logo_url` varchar(255) DEFAULT NULL,
`website` varchar(255) DEFAULT NULL,
`disabled` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
);

Updates one or more records according to the conditions specified by the method name

API setBatch

Example Request

{
"method": "smartPanda.mdh.brand.setBatch",
"params": {
"filters": [
{
"field": "id",
"operator": "in",
"value": [
1,
2,
3
]
}
],
"data": {
"disabled": 1
}
}
}