var number=10; --设置变量来控制 每次请求传入的候选人数量
var orgId="livingsimple";
var operatorEmail="wangkunlun@mokahr.com";
var Clist = [201213489,201213488,201213487,201213486,201213485,201213484,201213483]; --通过数据库查询出可修改的候选人ID
function add(count){
var str1 = new Array(count);
for (i = 0; i < count; i++) {
var str2 = {};
str2["candidateId"]=Clist[i];
str2["hireMode"]=1;
str2["orgId"]=orgId;
str2["operatorEmail"]=operatorEmail;
var customIdAndDetailDTOList=[{
"id": 263,
"detail": "单行文本修改300",
"type": "string_info"
}];
str2["customIdAndDetailDTOList"]=customIdAndDetailDTOList;
str1[i]=str2;
}
console.info(str1);
pm.globals.set("body", JSON.stringify(str1));
}
add(number);