master:系统调优;
parent
a129147369
commit
b942af9f4f
|
|
@ -20,8 +20,8 @@ public class StoreProdSkuResVO {
|
|||
private Long storeProdId;
|
||||
@ApiModelProperty(value = "档口ID")
|
||||
private Long storeId;
|
||||
@ApiModelProperty(value = "档口商品名称")
|
||||
private String prodName;
|
||||
@ApiModelProperty(value = "档口商品标题")
|
||||
private String prodTitle;
|
||||
@ApiModelProperty(value = "商品货号")
|
||||
private String prodArtNum;
|
||||
@ApiModelProperty(value = "主图")
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ public class StoreProdSkuResDTO {
|
|||
private Long storeProdId;
|
||||
@ApiModelProperty(value = "档口ID")
|
||||
private Long storeId;
|
||||
@ApiModelProperty(value = "档口商品名称")
|
||||
private String prodName;
|
||||
@ApiModelProperty(value = "档口商品标题")
|
||||
private String prodTitle;
|
||||
@ApiModelProperty(value = "商品货号")
|
||||
private String prodArtNum;
|
||||
@ApiModelProperty(value = "主图")
|
||||
|
|
|
|||
|
|
@ -1,10 +1,13 @@
|
|||
package com.ruoyi.xkt.dto.userSubscriptions;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author liujiang
|
||||
* @version v1.0
|
||||
|
|
@ -40,5 +43,22 @@ public class UserSubscPageResDTO {
|
|||
private Long last30DaysSaleQuantity;
|
||||
@ApiModelProperty(value = "最近7天新增商品数")
|
||||
private Long last7DaysNewProdQuantity;
|
||||
@JsonIgnore
|
||||
@ApiModelProperty(value = "档口LogoId")
|
||||
private Long storeLogoId;
|
||||
@ApiModelProperty(value = "档口头像")
|
||||
private USPFileDTO logo;
|
||||
|
||||
@Data
|
||||
public static class USPFileDTO {
|
||||
@ApiModelProperty(value = "文件名称")
|
||||
private String fileName;
|
||||
@ApiModelProperty(value = "文件路径")
|
||||
private String fileUrl;
|
||||
@ApiModelProperty(value = "文件类型")
|
||||
private Integer fileType;
|
||||
@ApiModelProperty(value = "文件大小")
|
||||
private BigDecimal fileSize;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
package com.ruoyi.xkt.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
|
|
@ -9,10 +10,7 @@ import com.ruoyi.common.core.domain.model.LoginUser;
|
|||
import com.ruoyi.common.core.page.Page;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.xkt.domain.Store;
|
||||
import com.ruoyi.xkt.domain.StoreProduct;
|
||||
import com.ruoyi.xkt.domain.StoreSale;
|
||||
import com.ruoyi.xkt.domain.UserSubscriptions;
|
||||
import com.ruoyi.xkt.domain.*;
|
||||
import com.ruoyi.xkt.dto.userSubscriptions.UserSubscDTO;
|
||||
import com.ruoyi.xkt.dto.userSubscriptions.UserSubscDeleteDTO;
|
||||
import com.ruoyi.xkt.dto.userSubscriptions.UserSubscPageDTO;
|
||||
|
|
@ -20,10 +18,7 @@ import com.ruoyi.xkt.dto.userSubscriptions.UserSubscPageResDTO;
|
|||
import com.ruoyi.xkt.enums.NoticeOwnerType;
|
||||
import com.ruoyi.xkt.enums.NoticeType;
|
||||
import com.ruoyi.xkt.enums.UserNoticeType;
|
||||
import com.ruoyi.xkt.mapper.StoreMapper;
|
||||
import com.ruoyi.xkt.mapper.StoreProductMapper;
|
||||
import com.ruoyi.xkt.mapper.StoreSaleMapper;
|
||||
import com.ruoyi.xkt.mapper.UserSubscriptionsMapper;
|
||||
import com.ruoyi.xkt.mapper.*;
|
||||
import com.ruoyi.xkt.service.INoticeService;
|
||||
import com.ruoyi.xkt.service.IUserSubscriptionsService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
|
@ -55,6 +50,7 @@ public class UserSubscriptionsServiceImpl implements IUserSubscriptionsService {
|
|||
final StoreProductMapper storeProdMapper;
|
||||
final INoticeService noticeService;
|
||||
final StoreMapper storeMapper;
|
||||
final SysFileMapper fileMapper;
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -140,6 +136,13 @@ public class UserSubscriptionsServiceImpl implements IUserSubscriptionsService {
|
|||
if (CollectionUtils.isEmpty(list)) {
|
||||
return Page.empty(pageDTO.getPageNum(), pageDTO.getPageSize());
|
||||
}
|
||||
// 获取档口头像ID列表
|
||||
List<Long> logoFileIdList = list.stream().map(UserSubscPageResDTO::getStoreLogoId).filter(ObjectUtils::isNotEmpty).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(logoFileIdList)) {
|
||||
List<SysFile> fileList = this.fileMapper.selectByIds(logoFileIdList);
|
||||
Map<Long, SysFile> fileMap = fileList.stream().collect(Collectors.toMap(SysFile::getId, Function.identity()));
|
||||
list.forEach(x -> x.setLogo(BeanUtil.toBean(fileMap.get(x.getStoreLogoId()), UserSubscPageResDTO.USPFileDTO.class)));
|
||||
}
|
||||
// APP 查询直接返回数据即可
|
||||
if (pageDTO.getSource() == 2) {
|
||||
return Page.convert(new PageInfo<>(list));
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
s.contact_back_phone,
|
||||
s.wechat_account,
|
||||
s.qq_account,
|
||||
s.store_logo_id,
|
||||
s.store_address,
|
||||
s.del_flag AS storeDelFlag,
|
||||
DATEDIFF(CURDATE(), DATE(us.create_time)) AS focusDays
|
||||
|
|
|
|||
Loading…
Reference in New Issue