master:app商品详情返回数据调整;
parent
d5db8550a6
commit
3b589f84ac
|
|
@ -17,30 +17,30 @@ public enum AdType {
|
|||
|
||||
// 顶部横向大图
|
||||
PC_HOME_TOP_LEFT_BANNER(1, "首页顶部横向大图"),
|
||||
// 顶部纵向小图
|
||||
PC_HOME_TOP_RIGHT_BANNER(2, "首页顶部纵向小图"),
|
||||
// 首页销售榜榜一
|
||||
PC_HOME_SALE_RANK_ONE(3, "首页销售榜榜一"),
|
||||
// 首页销售榜榜二
|
||||
PC_HOME_SALE_RANK_TWO(4, "首页销售榜榜二"),
|
||||
// 首页销售榜榜三
|
||||
PC_HOME_SALE_RANK_THREE(5, "首页销售榜榜三"),
|
||||
// 首页销售榜榜四
|
||||
PC_HOME_SALE_RANK_FOUR(6, "首页销售榜榜四"),
|
||||
// 顶部纵向商品
|
||||
PC_HOME_TOP_RIGHT_BANNER(2, "首页顶部纵向商品"),
|
||||
// 首页销售榜一商品
|
||||
PC_HOME_SALE_RANK_ONE(3, "首页销售榜一商品"),
|
||||
// 首页销售榜二商品
|
||||
PC_HOME_SALE_RANK_TWO(4, "首页销售榜二商品"),
|
||||
// 首页销售榜三商品
|
||||
PC_HOME_SALE_RANK_THREE(5, "首页销售榜三商品"),
|
||||
// 首页销售榜四商品
|
||||
PC_HOME_SALE_RANK_FOUR(6, "首页销售榜四商品"),
|
||||
// 风格榜
|
||||
PC_HOME_STYLE_RANK(7, "首页风格榜"),
|
||||
// 人气榜左侧大图
|
||||
PC_HOME_POP_LEFT_BANNER(8, "首页人气榜左大图"),
|
||||
// 人气榜中间图
|
||||
PC_HOME_POP_MID(9, "首页人气榜中间图"),
|
||||
// 人气榜右侧图
|
||||
PC_HOME_POP_RIGHT(10, "首页人气榜右侧图"),
|
||||
// 人气榜右侧商品
|
||||
PC_HOME_POP_RIGHT(10, "首页人气榜右侧商品"),
|
||||
// 首页档口横幅
|
||||
PC_HOME_SINGLE_BANNER(11, "首页档口横幅"),
|
||||
// 首页商品列表
|
||||
PC_HOME_PRODUCT_LIST(12, "首页商品列表"),
|
||||
// 首页两侧固定挂耳
|
||||
PC_HOME_FIXED_EAR(13, "首页两侧固定挂耳"),
|
||||
// 首页两侧固定侧边栏
|
||||
PC_HOME_FIXED_EAR(13, "首页两侧固定侧边栏"),
|
||||
// 首页搜索框下名称
|
||||
PC_HOME_SEARCH_DOWN_NAME(14, "首页搜索框下档口名称"),
|
||||
// 首页搜索框中推荐商品
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ public class XktTask {
|
|||
|
||||
/**
|
||||
* 每天执行定时任务
|
||||
* 每年3月1日、6月1日、9月1日、12月1日执行 生成春夏秋冬标签
|
||||
* 每年3月1日、6月1日、9月1日、12月1日执行 生成夏秋冬春标签
|
||||
*/
|
||||
@Transactional
|
||||
public void seasonTag() {
|
||||
|
|
@ -139,13 +139,13 @@ public class XktTask {
|
|||
int day = today.getDayOfMonth();
|
||||
String seasonLabel = "";
|
||||
if (month == 3 && day == 1) {
|
||||
seasonLabel = today.getYear() + "年春季";
|
||||
} else if (month == 6 && day == 1) {
|
||||
seasonLabel = today.getYear() + "年夏季";
|
||||
} else if (month == 9 && day == 1) {
|
||||
} else if (month == 6 && day == 1) {
|
||||
seasonLabel = today.getYear() + "年秋季";
|
||||
} else if (month == 12 && day == 1) {
|
||||
} else if (month == 9 && day == 1) {
|
||||
seasonLabel = today.getYear() + "年冬季";
|
||||
} else if (month == 12 && day == 1) {
|
||||
seasonLabel = today.getYear() + 1 + "年春季";
|
||||
}
|
||||
if (StringUtils.isEmpty(seasonLabel)) {
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.ruoyi.xkt.dto.storeProductFile;
|
|||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
|
@ -13,6 +14,7 @@ import java.math.BigDecimal;
|
|||
*/
|
||||
@ApiModel("档口商品文件返回数据")
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class StoreProdFileResDTO {
|
||||
|
||||
@ApiModelProperty("档口商品名称")
|
||||
|
|
|
|||
|
|
@ -71,10 +71,11 @@ public interface StoreProductFileMapper extends BaseMapper<StoreProductFile> {
|
|||
/**
|
||||
* 根据商品ID获取商品主图和视频
|
||||
*
|
||||
* @param storeProdId 商品ID
|
||||
* @param storeProdId 商品ID
|
||||
* @param fileTypeList 文件类型列表
|
||||
* @return List<StoreProdFileResDTO>
|
||||
*/
|
||||
List<StoreProdFileResDTO> selectVideoAndMainPicList(Long storeProdId);
|
||||
List<StoreProdFileResDTO> selectVideoAndMainPicList(@Param("storeProdId") Long storeProdId, @Param("fileTypeList") List<Integer> fileTypeList);
|
||||
|
||||
/**
|
||||
* 筛选档口随机主图
|
||||
|
|
|
|||
|
|
@ -767,7 +767,7 @@ public class StoreProductServiceImpl implements IStoreProductService {
|
|||
List<StoreProductColorSize> colorSizeList = this.storeProdColorSizeMapper.selectList(new LambdaQueryWrapper<StoreProductColorSize>()
|
||||
.eq(StoreProductColorSize::getStoreProdId, storeProdId).eq(StoreProductColorSize::getDelFlag, Constants.UNDELETED)
|
||||
.eq(StoreProductColorSize::getStandard, ProductSizeStatus.STANDARD.getValue()));
|
||||
List<StoreProdFileResDTO> fileList = this.storeProdFileMapper.selectVideoAndMainPicList(storeProdId);
|
||||
List<StoreProdFileResDTO> fileList = this.storeProdFileMapper.selectVideoAndMainPicList(storeProdId, Collections.singletonList(FileType.MAIN_PIC.getValue()));
|
||||
// 第一张商品主图
|
||||
final String mainPicUrl = fileList.stream().filter(x -> Objects.equals(x.getFileType(), FileType.MAIN_PIC.getValue()))
|
||||
.filter(x -> Objects.equals(x.getOrderNum(), ORDER_NUM_1)).map(StoreProdFileResDTO::getFileUrl).findAny().orElse("");
|
||||
|
|
@ -877,7 +877,8 @@ public class StoreProductServiceImpl implements IStoreProductService {
|
|||
// 获取商品的属性
|
||||
StoreProductCategoryAttribute cateAttr = this.storeProdCateAttrMapper.selectOne(new LambdaQueryWrapper<StoreProductCategoryAttribute>()
|
||||
.eq(StoreProductCategoryAttribute::getStoreProdId, storeProdId).eq(StoreProductCategoryAttribute::getDelFlag, Constants.UNDELETED));
|
||||
List<StoreProdFileResDTO> fileList = this.storeProdFileMapper.selectVideoAndMainPicList(storeProdId);
|
||||
List<StoreProdFileResDTO> fileList = this.storeProdFileMapper
|
||||
.selectVideoAndMainPicList(storeProdId, Arrays.asList(FileType.MAIN_PIC_VIDEO.getValue(), FileType.MAIN_PIC.getValue()));
|
||||
prodInfoDTO
|
||||
// 获取商品的属性
|
||||
.setCateAttrMap(this.getCateAttrMap(cateAttr))
|
||||
|
|
|
|||
|
|
@ -152,7 +152,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
WHERE
|
||||
spf.del_flag = 0
|
||||
AND spf.store_prod_id = #{storeProdId}
|
||||
AND spf.file_type IN (1,2)
|
||||
<if test="fileTypeList != null and fileTypeList.size() > 0">
|
||||
AND spf.file_type IN
|
||||
<foreach item="fileType" collection="fileTypeList" open="(" separator="," close=")">
|
||||
#{fileType}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectRandomStoreFileList" resultType="com.ruoyi.xkt.dto.advertRound.app.strength.APPStrengthStoreFileDTO">
|
||||
|
|
|
|||
Loading…
Reference in New Issue