Commit f66382b5 authored by shiyu's avatar shiyu

订单详情页2

parent 48dc5d12
......@@ -74,5 +74,5 @@ public class SupplierItemRequestDto extends BaseRequestDto implements Entity {
/**
* 是否是店家
*/
private Integer isShop;
private Boolean isShop;
}
......@@ -85,14 +85,23 @@ public class SupplierItemServiceImpl implements SupplierItemService {
public Result findDetail(SupplierItemRequestDto dto) {
try {
String shareRecordId = dto.getShareRecordId();
DistributorShareRecord distributorShareRecord = distributorShareRecordDao.findById(shareRecordId);
DistributorShareRecord distributorShareRecord = null;
long itemId = 0;
if (StringUtils.isEmpty(shareRecordId) && dto.getId() == null) {
return Result.failed("商品信息为空");
} else if (StringUtils.hasLength(shareRecordId)) {
distributorShareRecord = distributorShareRecordDao.findById(shareRecordId);
if (distributorShareRecord == null || !distributorShareRecord.getEnabled()) {
return Result.failed("该商品已下架");
} else {
itemId = distributorShareRecord.getItemId();
}
} else {
itemId = dto.getId();
}
Long itemId = distributorShareRecord.getItemId();
SupplierItemVo supplierItemVo = new SupplierItemVo();
//用户点击链接进入详情页需要记录, isShop = 0,为普通用户
if (dto.getIsShop() == 0) {
//用户点击链接进入详情页需要记录
if (!dto.getIsShop()) {
supplierItemVo.setSalePrice(PriceUtil.convertPriceFenToYuan(distributorShareRecord.getPrice()));
itemId = distributorShareRecord.getItemId();
//如果用户绑定过分销商,则不做浏览记录
......
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