//拼接字符数组
NSMutableString *ids = [NSMutableString stringWithString:@"["];
for(ConsultationAppointmentDoctorDto *consulDoctor in self.consulAppointDto.doctors){
[ids appendFormat:@"'%@',",consulDoctor.doctor.id_a];
}
NSString *idStr = [NSString stringWithFormat:@"%@]",[ids substringWithRange:NSMakeRange(0,[ids length]-1)]];
//核心代码
NSMutableDictionary *paramsDict=[[NSMutableDictionary alloc] init];
[paramsDict setObject:idStr forKey:@"doctorIds"];//将字符数组装入参数字典中
网友评论