Authored by wangnan

使用BeanUtils.copyProperties 试试

@@ -22,12 +22,12 @@ public class GeneralDataBuilder { @@ -22,12 +22,12 @@ public class GeneralDataBuilder {
22 * 拼装来自ProductI的数据 22 * 拼装来自ProductI的数据
23 */ 23 */
24 public void buildDataFromProductI(List<ProductIndexBO> productIndexBOs, List<ProductIBO> productIBOs) { 24 public void buildDataFromProductI(List<ProductIndexBO> productIndexBOs, List<ProductIBO> productIBOs) {
25 - for (ProductIBO p : productIBOs) { 25 + for (ProductIBO productIBO : productIBOs) {
26 ProductIndexBO productIndexBO = new ProductIndexBO(); 26 ProductIndexBO productIndexBO = new ProductIndexBO();
27 - BeanUtils.copyProperties(productIndexBO,p); 27 + BeanUtils.copyProperties(productIBO, productIndexBO);
28 productIndexBOs.add(productIndexBO); 28 productIndexBOs.add(productIndexBO);
29 } 29 }
30 - 30 + }
31 // productIndexBO.setId(p.getId()); 31 // productIndexBO.setId(p.getId());
32 // productIndexBO.setProductId(p.getProductId()); 32 // productIndexBO.setProductId(p.getProductId());
33 // productIndexBO.setProductSkn(p.getProductSkn()); 33 // productIndexBO.setProductSkn(p.getProductSkn());
@@ -101,10 +101,4 @@ public class GeneralDataBuilder { @@ -101,10 +101,4 @@ public class GeneralDataBuilder {
101 // productIndexBO.setPattern(p.getPattern()); 101 // productIndexBO.setPattern(p.getPattern());
102 // productIndexBO.setPhrase(p.getPhrase()); 102 // productIndexBO.setPhrase(p.getPhrase());
103 // productIndexBO.setIsPhraseExist(p.getIsPhraseExist()); 103 // productIndexBO.setIsPhraseExist(p.getIsPhraseExist());
104 -  
105 -  
106 - }  
107 -  
108 -  
109 -  
110 } 104 }