Commit 9aa2772c authored by shiyu's avatar shiyu

分销商个人主页订单33

parent e5e733d4
...@@ -36,6 +36,8 @@ public class SupplierItemServiceImpl implements SupplierItemService { ...@@ -36,6 +36,8 @@ public class SupplierItemServiceImpl implements SupplierItemService {
private static final Logger logger = LoggerFactory.getLogger(DistributorShareRecordServiceImpl.class); private static final Logger logger = LoggerFactory.getLogger(DistributorShareRecordServiceImpl.class);
private final static Long SYSTEM_ACCOUNT = 8888888888L;
@Autowired @Autowired
SupplierItemDao supplierItemDao; SupplierItemDao supplierItemDao;
...@@ -88,17 +90,18 @@ public class SupplierItemServiceImpl implements SupplierItemService { ...@@ -88,17 +90,18 @@ public class SupplierItemServiceImpl implements SupplierItemService {
String shareRecordId = dto.getShareRecordId(); String shareRecordId = dto.getShareRecordId();
DistributorShareRecord distributorShareRecord = null; DistributorShareRecord distributorShareRecord = null;
long itemId = 0; long itemId = 0;
if (StringUtils.isEmpty(shareRecordId) && dto.getId() == null) { if (dto.getId() != null) {
itemId = dto.getId();
}
else if (StringUtils.isEmpty(shareRecordId) && dto.getId() == null) {
return Result.failed("商品信息为空"); return Result.failed("商品信息为空");
} else if (StringUtils.hasLength(shareRecordId)) { } else {
distributorShareRecord = distributorShareRecordDao.findById(shareRecordId); distributorShareRecord = distributorShareRecordDao.findById(shareRecordId);
if (distributorShareRecord == null || !distributorShareRecord.getEnabled()) { if (distributorShareRecord == null || !distributorShareRecord.getEnabled()) {
return Result.failed("该商品已下架"); return Result.failed("该商品已下架");
} else { } else {
itemId = distributorShareRecord.getItemId(); itemId = distributorShareRecord.getItemId();
} }
} else {
itemId = dto.getId();
} }
SupplierItemVo supplierItemVo = new SupplierItemVo(); SupplierItemVo supplierItemVo = new SupplierItemVo();
//用户点击链接进入详情页需要记录 //用户点击链接进入详情页需要记录
......
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