| | |
| | | import org.springframework.stereotype.Service;
|
| | | import org.yeshi.utils.NumberUtil;
|
| | |
|
| | | import com.yeshi.fanli.dao.config.AddEveryDayTaskDao;
|
| | | import com.yeshi.fanli.dao.goods.RecommendSectionGoodsDao;
|
| | | import com.yeshi.fanli.dao.mybatis.taobao.TaoBaoGoodsBriefMapper;
|
| | | import com.yeshi.fanli.dao.taobao.TaoBaoGoodsBriefDao;
|
| | | import com.yeshi.fanli.entity.admin.EveryDayTask;
|
| | | import com.yeshi.fanli.entity.bus.clazz.GoodsClass;
|
| | | import com.yeshi.fanli.entity.bus.recommend.RecommendSection;
|
| | | import com.yeshi.fanli.entity.bus.recommend.RecommendSectionGoods;
|
| | |
| | | @Resource
|
| | | private GoodsClassService goodsClassService;
|
| | |
|
| | | @Resource
|
| | | private AddEveryDayTaskDao addEveryDayTaskDao;
|
| | |
|
| | | @Resource
|
| | | private HongBaoManageService hongBaoManageService;
|
| | |
| | | recommendSectionGoodsService.addRecommendSectionGoods(recommendSection, taobao);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 添加商品到每日任务
|
| | | */
|
| | | @Override
|
| | | public void addEveryDayTask(long tbid) throws NotExistObjectException, ExistObjectException {
|
| | | TaoBaoGoodsBrief taobao = taoBaoGoodsBriefDao.find(TaoBaoGoodsBrief.class, tbid);
|
| | | if (taobao == null) {
|
| | | throw new NotExistObjectException("不存在该淘宝商品");
|
| | | }
|
| | | EveryDayTask everyDaoTask = new EveryDayTask();
|
| | | everyDaoTask.setEtGoods(taobao);
|
| | | everyDaoTask.setEtCreateTime(new Date());
|
| | | addEveryDayTaskDao.create(everyDaoTask);
|
| | | }
|
| | |
|
| | | @Transactional
|
| | | public void addClassRecommendGoods(long gcid, long tbid) throws NotExistObjectException, ExistObjectException {
|
| | |
| | | throw new ShareGoodsException(204, "商品详情数据为空");
|
| | |
|
| | | return taoBaoGoodsBrief;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void updateBatchSelective(List<TaoBaoGoodsBrief> list) {
|
| | | taoBaoGoodsBriefMapper.updateBatchSelective(list);
|
| | | }
|
| | |
|
| | | }
|