fix
Helius
2021-06-29 8750805c390990c10e6ca6675c7e5f4065843fe2
fix
1 files modified
7 ■■■■■ changed files
gc-shop/src/main/java/com/xzx/gc/shop/service/GoodsService.java 7 ●●●●● patch | view | raw | blame | history
gc-shop/src/main/java/com/xzx/gc/shop/service/GoodsService.java
@@ -318,12 +318,19 @@
        PageHelper.startPage(xcxGoodsListDto.getPageNo(), xcxGoodsListDto.getPageSize());
        List<XcxGoodsListVo> data = scoreGoodsMapper.selectXcxGoodsList(xcxGoodsListDto);
        if(StrUtil.isNotEmpty(xcxGoodsListDto.getName())){
            Example exampleSearch = new Example(ScoreGoodsSearch.class);
            Example.Criteria criteriaSearch = exampleSearch.createCriteria();
            criteriaSearch.andEqualTo("contents",xcxGoodsListDto.getName());
            criteriaSearch.andEqualTo("userId",xcxGoodsListDto.getUserId());
            List<ScoreGoodsSearch> scoreGoodsSearches = scoreGoodsSearchMapper.selectByExample(exampleSearch);
            if(CollUtil.isNotEmpty(scoreGoodsSearches)){
            ScoreGoodsSearch scoreGoodsSearch = new ScoreGoodsSearch();
            scoreGoodsSearch.setUserId(xcxGoodsListDto.getUserId());
            scoreGoodsSearch.setContents(xcxGoodsListDto.getName());
            scoreGoodsSearch.setCreatedTime(new Date());
            scoreGoodsSearchMapper.insert(scoreGoodsSearch);
        }
        }
        return new PageInfo<>(data);
    }