|
|
@ -22,6 +22,7 @@ import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
import java.text.DecimalFormat; |
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.Collections; |
|
|
@ -210,11 +211,12 @@ public class AppletGiftBagService extends MybatisBaseService<AppletGiftBagMapper |
|
|
|
AppletGiftBagDetailVo appletGiftBagVo=new AppletGiftBagDetailVo(); |
|
|
|
AppletGiftBag s= baseMapper.selectOne(new QueryWrapper<AppletGiftBag>().eq("sid",sid)); |
|
|
|
double i=0; |
|
|
|
DecimalFormat decimalFormat = new DecimalFormat("#0.00"); |
|
|
|
for(GiftBagGoods goods:goodsList){ |
|
|
|
i=i+Double.valueOf(goods.getPrice())*Double.valueOf(goods.getGoodsNumber()); |
|
|
|
goods.setIconUrl(fileUploadComponent.getUrlPrefix() +goods.getIconUrl()); |
|
|
|
goods.setTotalValue(String.valueOf(Double.valueOf(goods.getGoodsNumber())*Double.valueOf(goods.getPrice()))); |
|
|
|
goods.setJPrice(String.valueOf(Double.valueOf(goods.getPrice())/Double.valueOf(goods.getWeight()))); |
|
|
|
goods.setJPrice(String.valueOf(decimalFormat.format(Double.valueOf(goods.getPrice())/Double.valueOf(goods.getWeight())))); |
|
|
|
} |
|
|
|
appletGiftBagVo.setPrice(String.valueOf(i)); |
|
|
|
appletGiftBagVo.setGoods(goodsList); |
|
|
|