| | |
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.share.UserShareGoodsGroupMapper;
|
| | | import com.yeshi.fanli.entity.bus.share.UserShareGoodsGroup;
|
| | | import com.yeshi.fanli.entity.bus.share.UserShareGoodsRecord.ShareSourceTypeEnum;
|
| | | import com.yeshi.fanli.entity.bus.user.HongBao;
|
| | | import com.yeshi.fanli.exception.share.UserShareGoodsRecordException;
|
| | | import com.yeshi.fanli.service.inter.goods.CommonGoodsService;
|
| | |
| | |
|
| | | @Override
|
| | | public UserShareGoodsGroup getSingleGoods(Long cid, Long uid) {
|
| | | return userShareGoodsGroupMapper.getSingleGoods(cid, uid);
|
| | | return userShareGoodsGroupMapper.getSingleGoods(ShareSourceTypeEnum.goodsDetail,cid, uid );
|
| | | }
|
| | |
|
| | | @Override
|
| | |
| | | shareGoodsGroup.setTotalOrder(totalOrder + 1);
|
| | |
|
| | | // 更新预计收益
|
| | | BigDecimal totalMoney = shareGoodsGroup.getTotalMoney();
|
| | | BigDecimal totalMoney = newestRecord.getTotalMoney();
|
| | | if (totalMoney == null) {
|
| | | totalMoney = new BigDecimal(0);
|
| | | }
|
| | |
| | | if (group != null) {
|
| | | UserShareGoodsGroup shareGoodsGroup = new UserShareGoodsGroup(group.getId());
|
| | | // 累计浏览
|
| | | shareGoodsGroup.setTotalBrowse(group.getTotalBrowse() + count);
|
| | | Integer totalBrowse = group.getTotalBrowse();
|
| | | if (totalBrowse == null) {
|
| | | totalBrowse = 0;
|
| | | }
|
| | | shareGoodsGroup.setTotalBrowse(totalBrowse + count);
|
| | |
|
| | | // 今日浏览
|
| | | Date date = new Date();
|
| | |
| | | shareGoodsGroup.setTodayBrowse(count);
|
| | | }
|
| | | shareGoodsGroup.setBrowseTime(date);
|
| | | |
| | | userShareGoodsGroupMapper.updateByPrimaryKeySelective(shareGoodsGroup);
|
| | | }
|
| | | }
|