Helius
2021-06-29 5cebe1792d5240c5c95a0f389738363240d460ac
Merge branch 'score-shop' of http://120.27.238.55:7000/r/xzx into score-shop
2 files modified
6 ■■■■■ changed files
gc-shop/src/main/java/com/xzx/gc/shop/controller/AdminGoodsCategoryController.java 2 ●●● patch | view | raw | blame | history
gc-shop/src/main/java/com/xzx/gc/shop/service/GoodsService.java 4 ●●● patch | view | raw | blame | history
gc-shop/src/main/java/com/xzx/gc/shop/controller/AdminGoodsCategoryController.java
@@ -171,7 +171,7 @@
        goodsCategoryModel.setCategoryIden(categoryIden);
        goodsCategoryModel.setParentId(parentId);
        List<QueryGoodsCategoryListVo> maps = scoreGoodsCategoryMapper.queryGoodsCategoryList(goodsCategoryModel);
        if(CollUtil.isNotEmpty(maps)){
        if(CollUtil.isNotEmpty(maps) && maps.size() > 1){
            return JsonResult.failMessage("分类不能重复添加!");
        }
        goodsCategoryModel.setId(id);
gc-shop/src/main/java/com/xzx/gc/shop/service/GoodsService.java
@@ -1,5 +1,6 @@
package com.xzx.gc.shop.service;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.date.DateUnit;
@@ -209,7 +210,8 @@
    public void updateGoods(UpdateGoodsDto model) {
        ObjectMapper objectMapper = new ObjectMapper();
        objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
        ScoreGoods scoreGoods = objectMapper.convertValue(model, ScoreGoods.class);
//        ScoreGoods scoreGoods = objectMapper.convertValue(model, ScoreGoods.class);
        ScoreGoods scoreGoods = BeanUtil.copyProperties(model, ScoreGoods.class);
        scoreGoodsMapper.updateByPrimaryKey(scoreGoods);
        //轮播图