记得上下班打卡 | git大法好,push需谨慎

Commit 736de09f authored by zhengfuxin's avatar zhengfuxin

修改接口

parent 6a1c5d46
package com.liquidnet.service.goblin.param;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* <p>
* 商品信息
* </p>
*
* @author liquidnet
* @since 2021-12-27
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class GoblinGoodsParam implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "mid", type = IdType.AUTO)
private Long mid;
/**
* 商品id
*/
private String spuId;
/**
* 商品编码
*/
private String spuNo;
/**
* 商品名称
*/
private String name;
/**
* 商品副标题
*/
private String subtitle;
/**
* 销售价-原价
*/
private BigDecimal sellPrice;
/**
* 价格区间MIN
*/
private BigDecimal priceGe;
/**
* 价格区间MAX
*/
private BigDecimal priceLe;
/**
* 商品简介
*/
private String intro;
/**
* 详情
*/
private String details;
/**
* 封面图片地址
*/
private String coverPic;
/**
* 商品视频地址
*/
private String video;
/**
* 规格展现方式[1-常规|2-组合]
*/
private String specMode;
/**
* 商品的店铺id,如果是平台的则为0
*/
private String storeId;
/**
* 平台一级分类id
*/
private String cateFid;
/**
* 平台二级分类id
*/
private String cateSid;
/**
* 平台三级分类id
*/
private String cateTid;
/**
* 店铺一级分类id
*/
private String storeCateFid;
/**
* 店铺二级分类id
*/
private String storeCateSid;
/**
* 店铺三级分类id
*/
private String storeCateTid;
/**
* 品牌id
*/
private String brandId;
/**
* 上架处理方式[1-等待手动上架|2-直接上架售卖|3-预约定时上架]
*/
private String shelvesHandle;
/**
* 上架处理方式为3-预约定时上架时需要指定]
*/
private LocalDateTime shelvesTime;
/**
* 商品有效期
*/
private LocalDateTime spuValidity;
/**
* 是否虚拟商品[0-否|1-是]
*/
private String virtualFlg;
/**
* 审核状态[0-编辑中|1-审核中|2-审核不通过|3-审核通过]
*/
private String status;
/**
* 审核拒绝原因
*/
private String reason;
/**
* 商品上架状态[0-待上架|1-下架|2-违规|3-上架]
*/
private String shelvesStatus;
/**
* 自定义展示[0-默认展示|1-隐藏不可购买]
*/
private String spuAppear;
/**
* 删除标记[0-未删除|1-删除]
*/
private String delFlg;
/**
* 上架时间
*/
private LocalDateTime shelvesAt;
private String createdBy;
private LocalDateTime createdAt;
private String updatedBy;
private LocalDateTime updatedAt;
private String deletedBy;
private LocalDateTime deletedAt;
/**
* 物流模版id
*/
private String logisticsTemplate;
private String comment;
}
...@@ -23,7 +23,7 @@ public interface GoblinFrontService { ...@@ -23,7 +23,7 @@ public interface GoblinFrontService {
* @Description:获取热词 * @Description:获取热词
* @date 2022/1/5 下午2:31 * @date 2022/1/5 下午2:31
*/ */
List<GoblinFrontHotWord> getHotWord(); GoblinFrontHotWord getHotWord();
/** /**
* @author zhangfuxin * @author zhangfuxin
......
...@@ -56,6 +56,7 @@ public class GoblinFrontSelectGoodsController extends BaseController { ...@@ -56,6 +56,7 @@ public class GoblinFrontSelectGoodsController extends BaseController {
queryWrapper.orderByDesc(GoblinGoods::getCreatedAt); queryWrapper.orderByDesc(GoblinGoods::getCreatedAt);
}else if(type.equals("2")){ }else if(type.equals("2")){
//销量 暂时不考虑 //销量 暂时不考虑
}else if(type.equals("3")){ }else if(type.equals("3")){
//价格从高到低 //价格从高到低
queryWrapper.orderByDesc(GoblinGoods::getPriceGe); queryWrapper.orderByDesc(GoblinGoods::getPriceGe);
...@@ -63,6 +64,7 @@ public class GoblinFrontSelectGoodsController extends BaseController { ...@@ -63,6 +64,7 @@ public class GoblinFrontSelectGoodsController extends BaseController {
queryWrapper.orderByAsc(GoblinGoods::getPriceGe); queryWrapper.orderByAsc(GoblinGoods::getPriceGe);
} }
List<GoblinGoods> list=goblinGoodsMapper.selectList(queryWrapper); List<GoblinGoods> list=goblinGoodsMapper.selectList(queryWrapper);
return AjaxResult.success(list); return AjaxResult.success(list);
} }
......
...@@ -48,7 +48,7 @@ public class GoblinFrontController { ...@@ -48,7 +48,7 @@ public class GoblinFrontController {
} }
@GetMapping("getHotWord") @GetMapping("getHotWord")
@ApiOperation("获得热词") @ApiOperation("获得热词")
public ResponseDto<List<GoblinFrontHotWord>> getHotWord() { public ResponseDto<GoblinFrontHotWord> getHotWord() {
return ResponseDto.success( goblinFrontService.getHotWord() ); return ResponseDto.success( goblinFrontService.getHotWord() );
} }
@GetMapping("getNavigation") @GetMapping("getNavigation")
......
...@@ -88,7 +88,7 @@ public class GoblinFrontServiceImpl implements GoblinFrontService { ...@@ -88,7 +88,7 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
} }
@Override @Override
public List<GoblinFrontHotWord> getHotWord() { public GoblinFrontHotWord getHotWord() {
// int index= (int) redisUtil.get(GoblinRedisConst.FRONT_HOTWORD_INDEX); // int index= (int) redisUtil.get(GoblinRedisConst.FRONT_HOTWORD_INDEX);
//获得value //获得value
List<GoblinFrontHotWord> list= (List<GoblinFrontHotWord>) redisUtil.get(GoblinRedisConst.FRONT_HOTWORD); List<GoblinFrontHotWord> list= (List<GoblinFrontHotWord>) redisUtil.get(GoblinRedisConst.FRONT_HOTWORD);
...@@ -100,7 +100,11 @@ public class GoblinFrontServiceImpl implements GoblinFrontService { ...@@ -100,7 +100,11 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
}else{ }else{
hotWord= list.get(0).getWord(); hotWord= list.get(0).getWord();
}*/ }*/
return list; if(null==list||list.size()==0){
return null;
}else{
return list.get(0);
}
} }
@Override @Override
......
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