Commit ffdac52a authored by shiyu's avatar shiyu

编辑商品6

parent 5473ab72
...@@ -66,7 +66,9 @@ public class SysSupplierItemServiceImpl implements SysSupplierItemService { ...@@ -66,7 +66,9 @@ public class SysSupplierItemServiceImpl implements SysSupplierItemService {
EntityMapper.copyAttribute(dto, supplierItem); EntityMapper.copyAttribute(dto, supplierItem);
supplierItem.setDistributionPrice(PriceUtil.convertPriceFromStr(StringUtils.isEmpty(dto.getDistributionPrice())?"0":dto.getDistributionPrice())); supplierItem.setDistributionPrice(PriceUtil.convertPriceFromStr(StringUtils.isEmpty(dto.getDistributionPrice())?"0":dto.getDistributionPrice()));
if (StringUtils.hasLength(dto.getSupplyPrice())) { if (StringUtils.hasLength(dto.getSupplyPrice())) {
supplierItem.setSupplyPrice(PriceUtil.convertPriceFromStr(StringUtils.isEmpty(dto.getSupplyPrice())?"0":dto.getSupplyPrice())); supplierItem.setSupplyPrice(PriceUtil.convertPriceFromStr(dto.getSupplyPrice()));
} else {
supplierItem.setSupplyPrice(0L);
} }
supplierItem.setImages(dto.getImages()); supplierItem.setImages(dto.getImages());
supplierItem.setVideos(dto.getVideos()); supplierItem.setVideos(dto.getVideos());
......
...@@ -62,6 +62,16 @@ public interface AuctionRecordDao { ...@@ -62,6 +62,16 @@ public interface AuctionRecordDao {
*/ */
AuctionRecord findLastedRecord(long itemId); AuctionRecord findLastedRecord(long itemId);
/**
* 查询用户第一条出价记录
* @param itemId
* @param userId
* @return
*/
AuctionRecord findFirstRecord(long itemId, long userId);
/** /**
* 统计出价次数 * 统计出价次数
* @param dto * @param dto
......
...@@ -84,6 +84,11 @@ public class AuctionRecordDaoImpl implements AuctionRecordDao { ...@@ -84,6 +84,11 @@ public class AuctionRecordDaoImpl implements AuctionRecordDao {
return auctionRecordMapper.selectOneByExample(example); return auctionRecordMapper.selectOneByExample(example);
} }
@Override
public AuctionRecord findFirstRecord(long itemId, long userId) {
return null;
}
@Override @Override
public long count(AuctionRecordRequestDto dto) { public long count(AuctionRecordRequestDto dto) {
AuctionRecordExample example = new AuctionRecordExample(); AuctionRecordExample example = new AuctionRecordExample();
......
...@@ -200,6 +200,9 @@ public class DistributionOrderServiceImpl implements DistributionOrderService { ...@@ -200,6 +200,9 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
if (auctionRecord.getUserId().longValue() != dto.getBuyerId().longValue()) { if (auctionRecord.getUserId().longValue() != dto.getBuyerId().longValue()) {
return Result.failed("下单信息错误"); return Result.failed("下单信息错误");
} }
//查询该中拍用户第一次出价关联的分享记录id
String shareRecordId = auctionRecord.getShareRecordId(); String shareRecordId = auctionRecord.getShareRecordId();
DistributorShareRecord distributorShareRecord = distributorShareRecordDao.findById(shareRecordId); DistributorShareRecord distributorShareRecord = distributorShareRecordDao.findById(shareRecordId);
SupplierItem supplierItem = supplierItemDao.findById(dto.getItemId()); SupplierItem supplierItem = supplierItemDao.findById(dto.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