|
|
@ -92,7 +92,7 @@ public class AppletGiftBagService extends MybatisBaseService<AppletGiftBagMapper |
|
|
|
AppletGiftBagGoods.setGoodsSid(goods.getGoodsSid()); |
|
|
|
AppletGiftBagGoods.setGiftbagSid(AppletGiftBag.getSid()); |
|
|
|
AppletGiftBagGoods.setGoodsNumber(goods.getGoodsNumber()); |
|
|
|
AppletGiftBagGoods.setPrice(0); |
|
|
|
AppletGiftBagGoods.setPrice(Double.valueOf(goods.getPrice())); |
|
|
|
appletGiftBagGoodsService.insert(AppletGiftBagGoods); |
|
|
|
} |
|
|
|
} |
|
|
@ -115,6 +115,7 @@ public class AppletGiftBagService extends MybatisBaseService<AppletGiftBagMapper |
|
|
|
AppletGiftBagGoods.setGoodsSid(goods.getGoodsSid()); |
|
|
|
AppletGiftBagGoods.setGiftbagSid(AppletGiftBag.getSid()); |
|
|
|
AppletGiftBagGoods.setGoodsNumber(goods.getGoodsNumber()); |
|
|
|
AppletGiftBagGoods.setPrice(Double.valueOf(goods.getPrice())); |
|
|
|
appletGiftBagGoodsService.insert(AppletGiftBagGoods); |
|
|
|
} |
|
|
|
} |
|
|
@ -153,6 +154,9 @@ public class AppletGiftBagService extends MybatisBaseService<AppletGiftBagMapper |
|
|
|
if (StringUtils.isNotBlank(lpkGoods.getName())) { |
|
|
|
bagGoods.setName(lpkGoods.getName()); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(lpkGoods.getPicUrl())) { |
|
|
|
bagGoods.setIconUrl(lpkGoods.getPicUrl()); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(lpkGoods.getUnitName())) { |
|
|
|
bagGoods.setUnitName(lpkGoods.getUnitName()); |
|
|
|
} |
|
|
@ -184,7 +188,7 @@ public class AppletGiftBagService extends MybatisBaseService<AppletGiftBagMapper |
|
|
|
List<AppletGiftBagVo> pagging = baseMapper.giftBagList(); |
|
|
|
return rb.success().setData(pagging); |
|
|
|
} |
|
|
|
public ResultBean isGrounding(String sid,String state) { |
|
|
|
public ResultBean isGrounding(String sid,String state) { |
|
|
|
ResultBean rb = new ResultBean().fail(); |
|
|
|
AppletGiftBag bag=baseMapper.selectOne(new QueryWrapper<AppletGiftBag>().eq("sid",sid)); |
|
|
|
bag.setIsGrounding(state); |
|
|
@ -218,7 +222,7 @@ public class AppletGiftBagService extends MybatisBaseService<AppletGiftBagMapper |
|
|
|
i=i+Double.valueOf(goods.getPrice())*Double.valueOf(goods.getGoodsNumber()); |
|
|
|
goods.setIconUrl(fileUploadComponent.getUrlPrefix() +goods.getIconUrl()); |
|
|
|
goods.setTotalValue(String.valueOf(decimalFormat.format(Double.valueOf(goods.getGoodsNumber())*Double.valueOf(goods.getPrice())))); |
|
|
|
goods.setJPrice(String.valueOf(decimalFormat.format(Double.valueOf(goods.getPrice())/Double.valueOf(goods.getWeight())))); |
|
|
|
goods.setJPrice(String.valueOf(decimalFormat.format(Double.valueOf(goods.getPrice())*Double.valueOf(goods.getWeight())))); |
|
|
|
} |
|
|
|
appletGiftBagVo.setPrice(decimalFormat.format(i)); |
|
|
|
appletGiftBagVo.setGoods(goodsList); |
|
|
|