package change import ( "context" "git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/library/batchimport" "git.5iot.com/iotlcm-public/iotlcm-admin-svr/internal/logic/iot/simcardbatch/common/cardsource" ) const maxRangeRows = 100000 func BuildRangeRows(ctx context.Context, startIccid, endIccid, startMsisdn, endMsisdn, startImsi, endImsi string) ([]batchimport.Row, error) { return cardsource.BuildRangeRows(ctx, cardsource.RangeConfig{ StartIccid: startIccid, EndIccid: endIccid, StartMsisdn: startMsisdn, EndMsisdn: endMsisdn, StartImsi: startImsi, EndImsi: endImsi, MaxRows: maxRangeRows, EmptyMessage: "range change data is empty", OverLimitMessage: "range change count cannot exceed %d", CountMismatchMessage: "ICCID range count(%d), MSISDN range count(%d), IMSI range count(%d) must match", }, func(rowNo int, iccid, msisdn, imsi string) *Row { return &Row{ RowNo: rowNo, Iccid: iccid, Msisdn: msisdn, Imsi: imsi, } }) }