Merge branch 'master' of https://gitee.com/liu-jiangs-project/RuoYi-Vue
commit
10876513c1
|
|
@ -384,9 +384,6 @@ public class StoreOrderInfoVO {
|
|||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
// @ApiModelProperty(value = "档口商品名称")
|
||||
// private String prodName;
|
||||
|
||||
@ApiModelProperty(value = "商品货号")
|
||||
private String prodArtNum;
|
||||
|
||||
|
|
|
|||
|
|
@ -389,9 +389,6 @@ public class StoreOrderPageItemVO extends StoreOrderDTO {
|
|||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
// @ApiModelProperty(value = "档口商品名称")
|
||||
// private String prodName;
|
||||
|
||||
@ApiModelProperty(value = "商品货号")
|
||||
private String prodArtNum;
|
||||
|
||||
|
|
|
|||
|
|
@ -28,4 +28,9 @@ public class PicPackSimpleVO {
|
|||
*/
|
||||
@ApiModelProperty(value = "文件大小(M)")
|
||||
private BigDecimal fileSize;
|
||||
/**
|
||||
* 文件类型(1主图、2视频、3下载)
|
||||
*/
|
||||
@ApiModelProperty(value = "文件类型[3:商品下载图片包 4:商品下载图片包450px 5:商品下载图片包750px]")
|
||||
private Integer fileType;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,10 +30,6 @@ public class StoreOrderDetail extends SimpleEntity {
|
|||
* 商品ID
|
||||
*/
|
||||
private Long storeProdId;
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
// private String prodName;
|
||||
/**
|
||||
* 商品货号
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -22,4 +22,8 @@ public class PicPackSimpleDTO {
|
|||
* 文件大小(M)
|
||||
*/
|
||||
private BigDecimal fileSize;
|
||||
/**
|
||||
* 文件类型(1主图、2视频、3下载)
|
||||
*/
|
||||
private Integer fileType;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,8 +67,6 @@ public class StoreOrderServiceImpl implements IStoreOrderService {
|
|||
@Autowired
|
||||
private StoreProductColorSizeMapper storeProductColorSizeMapper;
|
||||
@Autowired
|
||||
private StoreProductColorPriceMapper storeProductColorPriceMapper;
|
||||
@Autowired
|
||||
private StoreColorMapper storeColorMapper;
|
||||
@Autowired
|
||||
private StoreProductColorMapper storeProductColorMapper;
|
||||
|
|
@ -127,7 +125,6 @@ public class StoreOrderServiceImpl implements IStoreOrderService {
|
|||
StoreProduct sp = spMap.get(spcs.getStoreProdId());
|
||||
StoreColor sc = scMap.get(spcs.getStoreColorId());
|
||||
orderDetail.setStoreProdId(sp.getId());
|
||||
// orderDetail.setProdName(sp.getProdName());
|
||||
orderDetail.setProdArtNum(sp.getProdArtNum());
|
||||
orderDetail.setProdTitle(sp.getProdTitle());
|
||||
orderDetail.setStoreColorId(sc.getId());
|
||||
|
|
@ -1836,14 +1833,8 @@ public class StoreOrderServiceImpl implements IStoreOrderService {
|
|||
* @return
|
||||
*/
|
||||
private BigDecimal calcPrice(Long orderUserId, StoreProductColorSize storeProductColorSize) {
|
||||
|
||||
StoreProductColorPrice productColorPrice = storeProductColorPriceMapper.selectOne(Wrappers
|
||||
.lambdaQuery(StoreProductColorPrice.class)
|
||||
.eq(StoreProductColorPrice::getStoreProdId, storeProductColorSize.getStoreProdId())
|
||||
.eq(StoreProductColorPrice::getStoreColorId, storeProductColorSize.getStoreColorId())
|
||||
.eq(XktBaseEntity::getDelFlag, Constants.UNDELETED));
|
||||
Assert.notNull(productColorPrice, "无法获取商品定价");
|
||||
BigDecimal price = productColorPrice.getPrice();
|
||||
Assert.notNull(storeProductColorSize.getPrice(), "无法获取商品定价");
|
||||
BigDecimal price = storeProductColorSize.getPrice();
|
||||
if (ProductSizeStatus.UN_STANDARD.getValue().equals(storeProductColorSize.getStandard())) {
|
||||
//非标准尺码
|
||||
throw new ServiceException("商品尺码异常");
|
||||
|
|
|
|||
|
|
@ -590,25 +590,27 @@ public class StoreProductServiceImpl implements IStoreProductService {
|
|||
@Override
|
||||
public List<PicPackSimpleDTO> prepareGetPicPackDownloadUrl(Long storeProductId) {
|
||||
Assert.notNull(storeProductId);
|
||||
List<Long> fileIds = storeProdFileMapper.selectList(Wrappers.lambdaQuery(StoreProductFile.class)
|
||||
.eq(StoreProductFile::getStoreProdId, storeProductId)
|
||||
.in(StoreProductFile::getFileType, FileType.picPackValues())
|
||||
.eq(XktBaseEntity::getDelFlag, UNDELETED))
|
||||
List<StoreProductFile> productFiles = storeProdFileMapper.selectList(Wrappers.lambdaQuery(StoreProductFile.class)
|
||||
.eq(StoreProductFile::getStoreProdId, storeProductId)
|
||||
.in(StoreProductFile::getFileType, FileType.picPackValues())
|
||||
.eq(XktBaseEntity::getDelFlag, UNDELETED))
|
||||
.stream()
|
||||
.map(StoreProductFile::getFileId)
|
||||
.filter(Objects::nonNull)
|
||||
.collect(Collectors.toList());
|
||||
if (CollUtil.isEmpty(fileIds)) {
|
||||
if (CollUtil.isEmpty(productFiles)) {
|
||||
return ListUtil.empty();
|
||||
}
|
||||
// 商品下载量+1
|
||||
redisCache.valueIncr(CacheConstants.PRODUCT_STATISTICS_DOWNLOAD_COUNT, storeProductId);
|
||||
List<SysFile> files = fileMapper.selectByIds(fileIds);
|
||||
return files.stream()
|
||||
.filter(o -> UNDELETED.equals(o.getDelFlag()))
|
||||
List<Long> fileIds = productFiles.stream().map(StoreProductFile::getFileId).collect(Collectors.toList());
|
||||
Map<Long, SysFile> fileMaps = fileMapper.selectByIds(fileIds)
|
||||
.stream()
|
||||
.collect(Collectors.toMap(SysFile::getId, Function.identity()));
|
||||
return productFiles.stream()
|
||||
.map(o -> {
|
||||
PicPackSimpleDTO dto = BeanUtil.toBean(o, PicPackSimpleDTO.class);
|
||||
dto.setFileId(o.getId());
|
||||
SysFile sysFile = fileMaps.get(o.getFileId());
|
||||
PicPackSimpleDTO dto = BeanUtil.toBean(sysFile, PicPackSimpleDTO.class);
|
||||
dto.setFileId(sysFile.getId());
|
||||
dto.setFileType(o.getFileType());
|
||||
return dto;
|
||||
}).collect(Collectors.toList());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue