Commit 5888aac9 authored by shiyu's avatar shiyu

商品详情

parent 66516a92
...@@ -165,9 +165,9 @@ public class SupplierItemServiceImpl implements SupplierItemService { ...@@ -165,9 +165,9 @@ public class SupplierItemServiceImpl implements SupplierItemService {
} }
SupplierItem supplierItem = supplierItemDao.findById(itemId); SupplierItem supplierItem = supplierItemDao.findById(itemId);
SupplierItemVo supplierItemVo = new SupplierItemVo(); SupplierItemVo supplierItemVo = new SupplierItemVo();
if (StringUtils.hasLength(shareRecordId)) {
//做浏览记录 //做浏览记录
boolean flag = userRecentBrowseDao.isExisted(dto.getUserId(),distributorShareRecord.getDistributorId()); boolean flag = userRecentBrowseDao.isExisted(dto.getUserId(), distributorShareRecord.getDistributorId());
if (!flag) { if (!flag) {
UserRecentBrowse newRecord = new UserRecentBrowse(); UserRecentBrowse newRecord = new UserRecentBrowse();
newRecord.setShareRecordId(dto.getShareRecordId()); newRecord.setShareRecordId(dto.getShareRecordId());
...@@ -178,6 +178,8 @@ public class SupplierItemServiceImpl implements SupplierItemService { ...@@ -178,6 +178,8 @@ public class SupplierItemServiceImpl implements SupplierItemService {
newRecord.setType(DistributionEnum.UserBrowseTypeEnum.PLATFORM_ITEM.getCode()); newRecord.setType(DistributionEnum.UserBrowseTypeEnum.PLATFORM_ITEM.getCode());
userRecentBrowseDao.insert(newRecord); userRecentBrowseDao.insert(newRecord);
} }
}
//用户点击链接进入详情页需要记录 //用户点击链接进入详情页需要记录
if (!dto.getIsShop()) { if (!dto.getIsShop()) {
supplierItemVo.setSalePrice(PriceUtil.convertPriceFenToYuan(distributorShareRecord.getPrice())); supplierItemVo.setSalePrice(PriceUtil.convertPriceFenToYuan(distributorShareRecord.getPrice()));
...@@ -379,7 +381,7 @@ public class SupplierItemServiceImpl implements SupplierItemService { ...@@ -379,7 +381,7 @@ public class SupplierItemServiceImpl implements SupplierItemService {
} else { } else {
itemId = dto.getId(); itemId = dto.getId();
} }
//保存浏览记录 if (StringUtils.hasLength(shareRecordId)) {
//做浏览记录 //做浏览记录
boolean flag = userRecentBrowseDao.isExisted(dto.getUserId(), distributorShareRecord.getDistributorId()); boolean flag = userRecentBrowseDao.isExisted(dto.getUserId(), distributorShareRecord.getDistributorId());
if (!flag) { if (!flag) {
...@@ -392,6 +394,7 @@ public class SupplierItemServiceImpl implements SupplierItemService { ...@@ -392,6 +394,7 @@ public class SupplierItemServiceImpl implements SupplierItemService {
newRecord.setType(DistributionEnum.UserBrowseTypeEnum.PLATFORM_ITEM.getCode()); newRecord.setType(DistributionEnum.UserBrowseTypeEnum.PLATFORM_ITEM.getCode());
userRecentBrowseDao.insert(newRecord); userRecentBrowseDao.insert(newRecord);
} }
}
//查询商品竞拍信息 //查询商品竞拍信息
AuctionConfig auctionConfig = auctionConfigDao.findByItemId(itemId); AuctionConfig auctionConfig = auctionConfigDao.findByItemId(itemId);
...@@ -674,7 +677,6 @@ public class SupplierItemServiceImpl implements SupplierItemService { ...@@ -674,7 +677,6 @@ public class SupplierItemServiceImpl implements SupplierItemService {
} }
@Override @Override
public Result delete(SupplierItemRequestDto dto) { public Result delete(SupplierItemRequestDto dto) {
try { try {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment