Commit ffdac52a authored by shiyu's avatar shiyu

编辑商品6

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