import ignore blank customer id
This commit is contained in:
parent
248ebf4931
commit
75c5f982ac
@ -192,8 +192,11 @@ public class CustomerServiceSupport
|
||||
@Override
|
||||
public void read(final CSVRecord record) {
|
||||
final String customerId = record.get(0).trim();
|
||||
if (StringUtils.isBlank(customerId)) {
|
||||
log.info("Blank customer id found, ignore.");
|
||||
return;
|
||||
}
|
||||
customer.setId(customerId);
|
||||
|
||||
customer.setName(record.get(1).trim());
|
||||
customer.setCountryCode(record.get(2).trim());
|
||||
customer.setState(record.get(3).trim());
|
||||
|
@ -90,6 +90,10 @@ public class CustomerYearToDateSaleServiceSupport
|
||||
@Override
|
||||
public void read(final CSVRecord record) {
|
||||
final String customerId = StringUtils.trim(record.get(0));
|
||||
if (StringUtils.isBlank(customerId)) {
|
||||
log.info("Blank customer id found, ignore.");
|
||||
return;
|
||||
}
|
||||
customerYtdSale.setCustomerId(customerId);
|
||||
customerYtdSale.setYear(StringUtils.trim(record.get(3)));
|
||||
customerYtdSale.setYtdSale(Long.parseLong(StringUtils.trim(record.get(6)).replace(",", "")));
|
||||
|
Loading…
x
Reference in New Issue
Block a user