-
Notifications
You must be signed in to change notification settings - Fork 334
Open
Description
循环执行单次更新时(不是批量更新),ResetTable应该在foreach内部还是外部?
private bool UpdateTongHuiRepaymentScheduleList(MAction action, List<UpdateTongHuiRepaymentScheduleListInput> listInput, string scheduleId)
{
foreach (var listItem in listInput)
{
action.ResetTable("TongHuiRepaymentScheduleList");
action.Set("CurrentPayState", listItem.CurrentPayState);
action.Set("CurrentBuyBackState", listItem.CurrentBuyBackState);
action.Set("CurrentCompensatoryState", listItem.CurrentCompensatoryState);
action.Set("CustomerPayState", listItem.CustomerPayState);
action.Set("THPayableId", listItem.THPayableId);
if (!action.Update(listItem.Id))
{
return false; // 如果插入失败,返回 false
}
}
return true; // 如果所有插入成功,返回 true
}
Metadata
Metadata
Assignees
Labels
No labels