|  |  |  | 
|---|
|  |  |  | objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); | 
|---|
|  |  |  | //        ScoreGoods scoreGoods = objectMapper.convertValue(model, ScoreGoods.class); | 
|---|
|  |  |  | ScoreGoods scoreGoods = BeanUtil.copyProperties(model, ScoreGoods.class); | 
|---|
|  |  |  | log.info("抢购时间:{}, {}", scoreGoods.getQgStartTime(), scoreGoods.getQgEndTime()); | 
|---|
|  |  |  | scoreGoodsMapper.updateByPrimaryKey(scoreGoods); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //轮播图 | 
|---|
|  |  |  | 
|---|
|  |  |  | 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.isEmpty(scoreGoodsSearches)){ | 
|---|
|  |  |  | ScoreGoodsSearch scoreGoodsSearch = new ScoreGoodsSearch(); | 
|---|
|  |  |  | scoreGoodsSearch.setUserId(xcxGoodsListDto.getUserId()); | 
|---|
|  |  |  | scoreGoodsSearch.setContents(xcxGoodsListDto.getName()); | 
|---|
|  |  |  | scoreGoodsSearch.setCreatedTime(new Date()); | 
|---|
|  |  |  | scoreGoodsSearchMapper.insert(scoreGoodsSearch); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return new PageInfo<>(data); | 
|---|
|  |  |  | } | 
|---|