Commit ebda14d9 authored by wangpeng's avatar wangpeng

Merge branch 'dev' into 'test'

Dev See merge request !22
parents 9d6c6175 9ccc4133
......@@ -107,7 +107,7 @@ public class GoodsListController {
return resFac.getResponse(MallResponseError.NO_AUTH_ERROR);
}
}
spuService.offGoods(goodsId, type);
spuService.offGoods(goodsId, type ,onOffDTO.getPreheatEndTime());
return resFac.getSimpleSuccessResponse();
}
......
......@@ -201,7 +201,7 @@ public class SpuController {
return resFac.getResponse(MallResponseError.NO_AUTH_ERROR);
}
}
spuService.offGoods(goodsId, type);
spuService.offGoods(goodsId, type,onOffDTO.getPreheatEndTime());
return resFac.getSimpleSuccessResponse();
}
......
......@@ -24,8 +24,12 @@ public class OnOffDTO {
@NotBlank(message = MallResponseError.NULL_PARAM_ERROR)
private String goodsId;
@ApiModelProperty("上下架参数")
@CustomType(pType = MALLGlobalConfig.ON_OFF, message = MallResponseError.PARAM_ERROR)
@ApiModelProperty("上下架参数(1.上架 2.下架 10.预热)")
// @CustomType(pType = MALLGlobalConfig.ON_OFF, message = MallResponseError.PARAM_ERROR)
@NotNull(message = MallResponseError.NULL_PARAM_ERROR)
private Integer type;
@ApiModelProperty("开售时间")
// @CustomType(pType = MALLGlobalConfig.ON_OFF, message = MallResponseError.PARAM_ERROR)
private Long preheatEndTime;
}
......@@ -181,4 +181,8 @@ public class Spu implements Serializable {
@ApiModelProperty(value = "盲盒规则")
private String blindBoxRule;
@ApiModelProperty(value = "预热结束时间")
private Long preheatEndTime;
}
......@@ -104,7 +104,7 @@ public interface ISpuService extends IService<Spu> {
* @param goodsId 商品id
* @param type 上下架类型
*/
void offGoods(String goodsId, Integer type);
void offGoods(String goodsId, Integer type, Long preheatEndTime);
/**
* 批量删除商品
......
......@@ -397,7 +397,7 @@ public class SpuServiceImpl extends ServiceImpl<SpuMapper, Spu> implements ISpuS
}
@Override
public void offGoods(String goodsId, Integer type) {
public void offGoods(String goodsId, Integer type, Long preheatEndTime) {
if (getByGoodsId(goodsId).getType().equals(AUCTION.getType())) {
QueryWrapper<Auction> qw = new QueryWrapper<>();
qw.lambda().eq(Auction::getGoodsId, goodsId);
......@@ -423,6 +423,9 @@ public class SpuServiceImpl extends ServiceImpl<SpuMapper, Spu> implements ISpuS
ExternalToken externalToken = externalTokenService.getOne(qw2);
spu.setHash(externalToken.getHash());
}
if (preheatEndTime != null) {
spu.setPreheatEndTime(preheatEndTime);
}
spu.setStatus(type);
updateById(spu);
}
......
......@@ -33,6 +33,7 @@
<result column="difficulty" property="difficulty"/>
<result column="blind_box_price" property="blindBoxPrice"/>
<result column="blind_box_rule" property="blindBoxRule"/>
<result column="preheat_end_time" property="preheatEndTime"/>
</resultMap>
<select id="page" resultType="com.fzm.mall.server.admin.goods_center.entity.vo.GoodsSpuVO">
......
......@@ -82,4 +82,10 @@ public class GoodsVo {
@ApiModelProperty(value = "盲盒规则")
private String blindBoxRule;
@ApiModelProperty(value = "预热开始时间")
private Long preheatStartTime;
@ApiModelProperty(value = "预热结束时间")
private Long preheatEndTime;
}
......@@ -42,4 +42,10 @@ public class SaleHotVo {
@ApiModelProperty(value = "(销售方式)1.普通 4.盲盒")
private Integer salesType;
@ApiModelProperty(value = "预热开始时间")
private Long preheatStartTime;
@ApiModelProperty(value = "预热结束时间")
private Long preheatEndTime;
}
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