java
List> voListResult = new ArrayList>();
voListResult:
[{product_idx=1, likecheck=0, product_price=25000, product_title=크롭트 가디건}, {product_idx=2, likecheck=0, product_price=25000, product_title=크롭트 가디건}, {product_idx=3, likecheck=0, product_price=25000, product_title=크롭트 가디건}, {product_idx=4, likecheck=0, product_price=25000, product_title=크롭트 가디건}, {product_idx=5, likecheck=0, product_price=25000, product_title=크롭트 가디건}, { product_idx=6, likecheck=0, product_price=25000, , product_title=크롭트 가디건}, {product_idx=7, likecheck=0, product_price=25000, product_title=크롭트 가디건}, {product_idx=8, likecheck=0, product_price=25000, product_title=크롭트 가디건}, {product_idx=9, likecheck=0, product_price=25000, product_title=크롭트 가디건}]
List> productLikeRenew = likeDAO.SumProductLike();
productLikeRenew:
[{product_idx=3, likecheck=2}, {product_idx=10, likecheck=2}, {product_idx=12, likecheck=1}, {product_idx=5, likecheck=1}, {product_idx=7, likecheck=1}, {product_idx=11, likecheck=1}, {product_idx=13, likecheck=1},{product_idx=20, likecheck=1}, {product_idx=30, likecheck=1},{product_idx=40, likecheck=1}, {product_idx=59, likecheck=1}]
如何根据 voListResult 中两个列表的 product_idx 更新 likecheck?
结果:
[{product_idx=1, likecheck=0, product_price=25000, product_title=크롭트 가디건}, {product_idx=2, likecheck=0, product_price=25000, product_title=크롭트 가디건}, {product_idx=3, likecheck=2, product_price=25000, product_title=크롭트 가디건}, {product_idx=4, likecheck=0, product_price=25000, product_title=크롭트 가디건}, {product_idx=5, likecheck=0, product_price=25000, product_title=크롭트 가디건}, { product_idx=6, likecheck=0, product_price=25000, , product_title=크롭트 가디건}, {product_idx=7, likecheck=1, product_price=25000, product_title=크롭트 가디건}, {product_idx=8, likecheck=0, product_price=25000, product_title=크롭트 가디건}, {product_idx=9, likecheck=0, product_price=25000, product_title=크롭트 가디건}, {product_idx=10, likecheck=2, product_price=25000, product_title=크롭트 가디건} ...]
想了几天,还是不行
您可以做以下事情:-