|
@@ -788,7 +788,11 @@ class PublicRpcService implements PublicRpcServiceInterface
|
|
|
*/
|
|
|
public function getTemplateClass(array $data): array
|
|
|
{
|
|
|
- $result = TemplateClass::where('name','like','%'.$data['template_name'].'%')->get();
|
|
|
+ $where = [];
|
|
|
+ if (!empty($data['template_name'])) {
|
|
|
+ $where['name'] = $data['template_name'];
|
|
|
+ }
|
|
|
+ $result = TemplateClass::where($where)->get();
|
|
|
if(empty($result)){
|
|
|
return Result::error("暂无风格", 0);
|
|
|
}
|