7a69fd5e4db1f01b95385e5757ccf73359d2fa3d..bd1dfc46c917596265f61fe279ed024478a6a59e
2021-06-29 xiaoyong931011
Merge branch 'score-shop' of http://120.27.238.55:7000/r/xzx into score-shop
bd1dfc diff | tree
2021-06-29 xiaoyong931011
20210629 ๅ•†ๅ“ๆœ็ดข
be9026 diff | tree
1 files modified
17 ■■■■ changed files
gc-shop/src/main/java/com/xzx/gc/shop/service/GoodsService.java 17 ●●●● patch | view | raw | blame | history
gc-shop/src/main/java/com/xzx/gc/shop/service/GoodsService.java
@@ -318,11 +318,18 @@
        PageHelper.startPage(xcxGoodsListDto.getPageNo(), xcxGoodsListDto.getPageSize());
        List<XcxGoodsListVo> data = scoreGoodsMapper.selectXcxGoodsList(xcxGoodsListDto);
        if(StrUtil.isNotEmpty(xcxGoodsListDto.getName())){
            ScoreGoodsSearch scoreGoodsSearch = new ScoreGoodsSearch();
            scoreGoodsSearch.setUserId(xcxGoodsListDto.getUserId());
            scoreGoodsSearch.setContents(xcxGoodsListDto.getName());
            scoreGoodsSearch.setCreatedTime(new DateTime());
            scoreGoodsSearchMapper.insert(scoreGoodsSearch);
            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 DateTime());
                scoreGoodsSearchMapper.insert(scoreGoodsSearch);
            }
        }
        return new PageInfo<>(data);
    }