|
@@ -718,7 +718,7 @@ class PublicRpcService implements PublicRpcServiceInterface
|
|
$where = [
|
|
$where = [
|
|
'id' => $data['id'],
|
|
'id' => $data['id'],
|
|
];
|
|
];
|
|
- $template_class = TemplateClass::where('id', $data['id'])->first();
|
|
|
|
|
|
+ $template_class = TemplateClass::where($where)->first();
|
|
if (empty($template_class)) {
|
|
if (empty($template_class)) {
|
|
return Result::error("未查询到风格", 0);
|
|
return Result::error("未查询到风格", 0);
|
|
}
|
|
}
|
|
@@ -735,6 +735,7 @@ class PublicRpcService implements PublicRpcServiceInterface
|
|
$updateData = [
|
|
$updateData = [
|
|
'name' => $data['name'],
|
|
'name' => $data['name'],
|
|
'keyword' => json_encode($data['keyword']),
|
|
'keyword' => json_encode($data['keyword']),
|
|
|
|
+ 'class_id' => $data['class_id'],
|
|
];
|
|
];
|
|
$result = TemplateClass::where($where)->update($updateData);
|
|
$result = TemplateClass::where($where)->update($updateData);
|
|
if (empty($result)) {
|
|
if (empty($result)) {
|