Authored by wangnan

使用BeanUtils.copyProperties 试试

... ... @@ -22,12 +22,12 @@ public class GeneralDataBuilder {
* 拼装来自ProductI的数据
*/
public void buildDataFromProductI(List<ProductIndexBO> productIndexBOs, List<ProductIBO> productIBOs) {
for (ProductIBO p : productIBOs) {
for (ProductIBO productIBO : productIBOs) {
ProductIndexBO productIndexBO = new ProductIndexBO();
BeanUtils.copyProperties(productIndexBO,p);
BeanUtils.copyProperties(productIBO, productIndexBO);
productIndexBOs.add(productIndexBO);
}
}
// productIndexBO.setId(p.getId());
// productIndexBO.setProductId(p.getProductId());
// productIndexBO.setProductSkn(p.getProductSkn());
... ... @@ -101,10 +101,4 @@ public class GeneralDataBuilder {
// productIndexBO.setPattern(p.getPattern());
// productIndexBO.setPhrase(p.getPhrase());
// productIndexBO.setIsPhraseExist(p.getIsPhraseExist());
}
}
... ...