yanghui
2022-11-29 c7748fcd810efee6ed3aded415087e6cf9e638e8
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopFlowerGoodsServiceImpl.java
@@ -1,6 +1,7 @@
package com.panzhihua.service_community.service.impl;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@@ -221,6 +222,8 @@
        shopGoods.setOrderNum(orderNum);
        List<ComShopFlowerEvaluateVO> comShopFlowerEvaluateVOList = comShopFlowerEvaluateDAO.selectListLimit(goodsId);
        shopGoods.setShopFlowerEvaluateVOList(comShopFlowerEvaluateVOList);
        Integer evaluateNum = comShopFlowerEvaluateDAO.selectCountByGoodsId(goodsId);
        shopGoods.setEvaluateNum(evaluateNum);
        List<Long> categoryIds = convenientGoodsCategoryDAO.selectCategoryIdsForGoods(goodsId);
        shopGoods.setCategoryIds(categoryIds);
@@ -245,6 +248,9 @@
        ComShopFlowerGoodsDO shopGoodsDO = new ComShopFlowerGoodsDO();
        BeanUtils.copyProperties(addShopFlowerGoodsVO, shopGoodsDO);
        shopGoodsDO.setOriginalPrice(addShopFlowerGoodsVO.getPrice());
        if (StrUtil.isEmpty(addShopFlowerGoodsVO.getImages())){
            shopGoodsDO.setImages("");
        }
        int update = this.baseMapper.update(shopGoodsDO, query);
        if (update < 1) {
            throw new ServiceException("修改失败");