Commit 09375411 authored by unset's avatar unset

添加通知信息

parent 7ef3955d
...@@ -66,6 +66,9 @@ public class ShoppingCartInfoBiz extends BaseBiz<ShoppingCartInfoMapper, Shoppin ...@@ -66,6 +66,9 @@ public class ShoppingCartInfoBiz extends BaseBiz<ShoppingCartInfoMapper, Shoppin
@Autowired @Autowired
NoticeInfoBiz noticeInfoBiz; NoticeInfoBiz noticeInfoBiz;
@Autowired
ImageInfoRelationBiz imageInfoRelationBiz;
/** /**
* 添加购物车 * 添加购物车
* *
...@@ -155,15 +158,19 @@ public class ShoppingCartInfoBiz extends BaseBiz<ShoppingCartInfoMapper, Shoppin ...@@ -155,15 +158,19 @@ public class ShoppingCartInfoBiz extends BaseBiz<ShoppingCartInfoMapper, Shoppin
//影像图库 //影像图库
if (OrderTypeEnum.IMAGE_STORAGE.getType().equals(orderInfoDto.getType())) { if (OrderTypeEnum.IMAGE_STORAGE.getType().equals(orderInfoDto.getType())) {
ImageImgStorage imageImgStorage = imageImgStorageBiz.selectById(orderInfoDto.getDetailId()); ImageInfoRelation imageInfoRelation = imageInfoRelationBiz.selectById(orderInfoDto.getDetailId());
if (imageImgStorage != null) { if (imageInfoRelation != null) {
ShoppingCartInfo old = selectByUser(appUserDTO.getUserid(), Long.valueOf(imageImgStorage.getId())); ShoppingCartInfo old = selectByUser(appUserDTO.getUserid(), Long.valueOf(imageInfoRelation.getId()));
if (old != null) { if (old != null) {
return ObjectRestResponse.succ(); return ObjectRestResponse.succ();
//return ObjectRestResponse.createFailedResult(ResultCode.ORDER_GOODS_EXIST, ResultCode.getMsg(ResultCode.ORDER_GOODS_EXIST)); //return ObjectRestResponse.createFailedResult(ResultCode.ORDER_GOODS_EXIST, ResultCode.getMsg(ResultCode.ORDER_GOODS_EXIST));
} else { } else {
ImageImgStorage imageImgStorage = imageImgStorageBiz.selectById(imageInfoRelation.getRelationId());
List<ImageInfoRelation> list = new ArrayList<>();
list.add(imageInfoRelation);
imageImgStorage.setImageInfoRelationList(list);
ShoppingCartInfo shoppingCartInfo = new ShoppingCartInfo(); ShoppingCartInfo shoppingCartInfo = new ShoppingCartInfo();
shoppingCartInfo.setDetailId(Long.valueOf(imageImgStorage.getId())); shoppingCartInfo.setDetailId(Long.valueOf(imageInfoRelation.getId()));
shoppingCartInfo.setDetailJson(JSONObject.toJSONString(imageImgStorage)); shoppingCartInfo.setDetailJson(JSONObject.toJSONString(imageImgStorage));
shoppingCartInfo.setPrice(orderInfoDto.getPrice()); shoppingCartInfo.setPrice(orderInfoDto.getPrice());
shoppingCartInfo.setFilePath(orderInfoDto.getFilePath()); shoppingCartInfo.setFilePath(orderInfoDto.getFilePath());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment