|
@@ -237,7 +237,8 @@ class TimbreService
|
|
|
if (!$group_id || !$group_name || !$male_lead_voice_type || !$female_lead_voice_type || !$narration_voice_type) Utils::throwError('20003:参数错误');
|
|
|
$label = getProp($data, 'label');
|
|
|
$other_roles = getProp($data, 'other_roles');
|
|
|
- if (DB::table('mp_timbre_groups')->where('group_name', $group_name)->value('id') != $group_id) Utils::throwError('20003:该音色组已存在');
|
|
|
+ $tmp_group_id = DB::table('mp_timbre_groups')->where('group_name', $group_name)->value('id');
|
|
|
+ if ($tmp_group_id && $tmp_group_id != $group_id) Utils::throwError('20003:该音色组已存在');
|
|
|
|
|
|
return DB::table('mp_timbre_groups')->where('id', $group_id)->update([
|
|
|
'group_name' => $group_name,
|