master:app商品详情返回档口信息优化;
parent
c1d658a73c
commit
ecf959b856
|
|
@ -1,9 +1,11 @@
|
||||||
package com.ruoyi.web.controller.xkt.vo.store;
|
package com.ruoyi.web.controller.xkt.vo.store;
|
||||||
|
|
||||||
|
import com.ruoyi.xkt.dto.store.StoreAppResDTO;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -16,7 +18,7 @@ import java.util.List;
|
||||||
public class StoreAppResVO {
|
public class StoreAppResVO {
|
||||||
|
|
||||||
@ApiModelProperty(value = "档口头像")
|
@ApiModelProperty(value = "档口头像")
|
||||||
private String storeLogo;
|
private SAFileVO logo;
|
||||||
@ApiModelProperty(value = "档口ID")
|
@ApiModelProperty(value = "档口ID")
|
||||||
private Long storeId;
|
private Long storeId;
|
||||||
@ApiModelProperty(value = "档口名称")
|
@ApiModelProperty(value = "档口名称")
|
||||||
|
|
@ -32,4 +34,16 @@ public class StoreAppResVO {
|
||||||
@ApiModelProperty(value = "备选联系电话")
|
@ApiModelProperty(value = "备选联系电话")
|
||||||
private String contactBackPhone;
|
private String contactBackPhone;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class SAFileVO {
|
||||||
|
@ApiModelProperty(value = "文件名称")
|
||||||
|
private String fileName;
|
||||||
|
@ApiModelProperty(value = "文件路径")
|
||||||
|
private String fileUrl;
|
||||||
|
@ApiModelProperty(value = "文件类型")
|
||||||
|
private Integer fileType;
|
||||||
|
@ApiModelProperty(value = "文件大小")
|
||||||
|
private BigDecimal fileSize;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -18,7 +19,7 @@ import java.util.List;
|
||||||
public class StoreAppResDTO {
|
public class StoreAppResDTO {
|
||||||
|
|
||||||
@ApiModelProperty(value = "档口头像")
|
@ApiModelProperty(value = "档口头像")
|
||||||
private String storeLogo;
|
private SAFileDTO logo;
|
||||||
@ApiModelProperty(value = "档口ID")
|
@ApiModelProperty(value = "档口ID")
|
||||||
private Long storeId;
|
private Long storeId;
|
||||||
@ApiModelProperty(value = "档口名称")
|
@ApiModelProperty(value = "档口名称")
|
||||||
|
|
@ -34,4 +35,17 @@ public class StoreAppResDTO {
|
||||||
@ApiModelProperty(value = "备选联系电话")
|
@ApiModelProperty(value = "备选联系电话")
|
||||||
private String contactBackPhone;
|
private String contactBackPhone;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class SAFileDTO {
|
||||||
|
@ApiModelProperty(value = "文件名称")
|
||||||
|
private String fileName;
|
||||||
|
@ApiModelProperty(value = "文件路径")
|
||||||
|
private String fileUrl;
|
||||||
|
@ApiModelProperty(value = "文件类型")
|
||||||
|
private Integer fileType;
|
||||||
|
@ApiModelProperty(value = "文件大小")
|
||||||
|
private BigDecimal fileSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -227,9 +227,15 @@ public class StoreServiceImpl implements IStoreService {
|
||||||
UserSubscriptions userSub = this.userSubMapper.selectOne(new LambdaQueryWrapper<UserSubscriptions>()
|
UserSubscriptions userSub = this.userSubMapper.selectOne(new LambdaQueryWrapper<UserSubscriptions>()
|
||||||
.eq(UserSubscriptions::getUserId, SecurityUtils.getUserId()).eq(UserSubscriptions::getStoreId, storeId)
|
.eq(UserSubscriptions::getUserId, SecurityUtils.getUserId()).eq(UserSubscriptions::getStoreId, storeId)
|
||||||
.eq(UserSubscriptions::getDelFlag, Constants.UNDELETED));
|
.eq(UserSubscriptions::getDelFlag, Constants.UNDELETED));
|
||||||
return BeanUtil.toBean(store, StoreAppResDTO.class)
|
StoreAppResDTO appResDTO = BeanUtil.toBean(store, StoreAppResDTO.class).setStoreId(storeId)
|
||||||
.setAttention(ObjectUtils.isNotEmpty(userSub) ? Boolean.TRUE : Boolean.FALSE)
|
.setAttention(ObjectUtils.isNotEmpty(userSub) ? Boolean.TRUE : Boolean.FALSE)
|
||||||
.setTagList(storeTagList.stream().map(DailyStoreTag::getTag).collect(Collectors.toList()));
|
.setTagList(storeTagList.stream().map(DailyStoreTag::getTag).collect(Collectors.toList()));
|
||||||
|
// 获取档口LOGO
|
||||||
|
if (ObjectUtils.isNotEmpty(store.getStoreLogoId())) {
|
||||||
|
SysFile logo = this.fileMapper.selectById(store.getStoreLogoId());
|
||||||
|
appResDTO.setLogo(ObjectUtils.isNotEmpty(logo) ? BeanUtil.toBean(logo, StoreAppResDTO.SAFileDTO.class) : null);
|
||||||
|
}
|
||||||
|
return appResDTO;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue