老师能指导下我写的优化方案吗
/** * * @param {期刊类型} type * @param {dao层的方法前缀 add、delete、delete} prefix * @param {dao层的方法后缀 比如:ById} suffix * @param {Array dao层方法的参数} options */function switchCase (type, prefix, suffix, options) { switch (type) { case 100: delete options[0].url MovieDao[prefix + 'Movie' + suffix](...options) break case 200: MusicDao[prefix + 'Music' + suffix](...options) break case 300: delete options[0].url SentenceDao[prefix + 'Sentence' + suffix](...options) break default: throw new NotFound('内容类型不存在') }}