|
|
@@ -7,7 +7,6 @@ import com.uas.platform.b2c.prod.commodity.service.GoodsService;
|
|
|
import com.uas.platform.b2c.prod.commodity.service.ProductPrivateService;
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.jdbc.core.BeanPropertyRowMapper;
|
|
|
import org.springframework.jdbc.core.JdbcTemplate;
|
|
|
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
@@ -64,7 +63,6 @@ public class ProductPrivateServiceImpl implements ProductPrivateService {
|
|
|
String sql = "/*#mycat:db_type=master*/ select p.id, p.pr_id,p.pr_b2cenabled,p.pr_batchcount,p.pr_attach from product$private p where p.pr_id in (:ids);";
|
|
|
Map<String, Object> paramMap = new HashMap<String, Object>();
|
|
|
paramMap.put("ids", prIds);
|
|
|
- List<ProductPrivate> mapList = jdbcTemplate.query(sql, new BeanPropertyRowMapper(ProductPrivate.class));
|
|
|
List<Map<String, Object>> maps = namedParameterJdbcTemplate.queryForList(sql, paramMap);
|
|
|
List<ProductPrivate> list = new ArrayList<>();
|
|
|
ProductPrivate productPrivate;
|
|
|
@@ -72,7 +70,7 @@ public class ProductPrivateServiceImpl implements ProductPrivateService {
|
|
|
productPrivate = new ProductPrivate();
|
|
|
Object id = stringObjectMap.get("id");
|
|
|
if (id != null) {
|
|
|
- productPrivate.setId((Long) id);
|
|
|
+ productPrivate.setId(Long.valueOf(id.toString()));
|
|
|
}
|
|
|
Object prId = stringObjectMap.get("pr_id");
|
|
|
if (prId != null) {
|
|
|
@@ -94,7 +92,7 @@ public class ProductPrivateServiceImpl implements ProductPrivateService {
|
|
|
list.add(productPrivate);
|
|
|
}
|
|
|
}
|
|
|
- return mapList;
|
|
|
+ return list;
|
|
|
}
|
|
|
}
|
|
|
|