Commit 09375411 authored by unset's avatar unset

添加通知信息

parent 7ef3955d
......@@ -66,6 +66,9 @@ public class ShoppingCartInfoBiz extends BaseBiz<ShoppingCartInfoMapper, Shoppin
@Autowired
NoticeInfoBiz noticeInfoBiz;
@Autowired
ImageInfoRelationBiz imageInfoRelationBiz;
/**
* 添加购物车
*
......@@ -155,15 +158,19 @@ public class ShoppingCartInfoBiz extends BaseBiz<ShoppingCartInfoMapper, Shoppin
//影像图库
if (OrderTypeEnum.IMAGE_STORAGE.getType().equals(orderInfoDto.getType())) {
ImageImgStorage imageImgStorage = imageImgStorageBiz.selectById(orderInfoDto.getDetailId());
if (imageImgStorage != null) {
ShoppingCartInfo old = selectByUser(appUserDTO.getUserid(), Long.valueOf(imageImgStorage.getId()));
ImageInfoRelation imageInfoRelation = imageInfoRelationBiz.selectById(orderInfoDto.getDetailId());
if (imageInfoRelation != null) {
ShoppingCartInfo old = selectByUser(appUserDTO.getUserid(), Long.valueOf(imageInfoRelation.getId()));
if (old != null) {
return ObjectRestResponse.succ();
//return ObjectRestResponse.createFailedResult(ResultCode.ORDER_GOODS_EXIST, ResultCode.getMsg(ResultCode.ORDER_GOODS_EXIST));
} else {
ImageImgStorage imageImgStorage = imageImgStorageBiz.selectById(imageInfoRelation.getRelationId());
List<ImageInfoRelation> list = new ArrayList<>();
list.add(imageInfoRelation);
imageImgStorage.setImageInfoRelationList(list);
ShoppingCartInfo shoppingCartInfo = new ShoppingCartInfo();
shoppingCartInfo.setDetailId(Long.valueOf(imageImgStorage.getId()));
shoppingCartInfo.setDetailId(Long.valueOf(imageInfoRelation.getId()));
shoppingCartInfo.setDetailJson(JSONObject.toJSONString(imageImgStorage));
shoppingCartInfo.setPrice(orderInfoDto.getPrice());
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