Steps:
1. In a for loop so written:
supGoodsPrice.add (subOrderGood.getPrice ());
2. Then after the loop assignment:
order.setSupGoodsPrice (supGoodsPrice);
3. order last saved to the database:
orderMapper.addOneOrder (order);
Results:
Save the value sup_goods_price library is empty. . . . . .
Taibuyinggai low-level errors committed, step 1
supGoodsPrice.add (subOrderGood.getPrice ());
no assignment is successful, should be changed to supGoodsPrice = supGoodsPrice.add (subOrderGood.getPrice ()) ;
Note:
later still have to carefully point, to write good code, do not bug manufacturing By. Or how to achieve "China Dream."