diff --git a/framework/src/main/java/cn/lili/modules/goods/service/StudioService.java b/framework/src/main/java/cn/lili/modules/goods/service/StudioService.java index 906c3696..2d783800 100644 --- a/framework/src/main/java/cn/lili/modules/goods/service/StudioService.java +++ b/framework/src/main/java/cn/lili/modules/goods/service/StudioService.java @@ -53,7 +53,7 @@ public interface StudioService extends IService { * @param storeId 店铺ID * @return 操作结果 */ - Boolean push(Integer roomId,Integer goodsId, String storeId); + Boolean push(Integer roomId,Integer liveGoodsId, String storeId, String goodsId); /** * 删除商品 diff --git a/framework/src/main/java/cn/lili/modules/goods/serviceimpl/StudioServiceImpl.java b/framework/src/main/java/cn/lili/modules/goods/serviceimpl/StudioServiceImpl.java index 3e4aff1c..540a1f11 100644 --- a/framework/src/main/java/cn/lili/modules/goods/serviceimpl/StudioServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/goods/serviceimpl/StudioServiceImpl.java @@ -161,12 +161,12 @@ public class StudioServiceImpl extends ServiceImpl impleme @Override @Transactional(rollbackFor = Exception.class) - public Boolean push(Integer roomId, Integer goodsId, String storeId) { + public Boolean push(Integer roomId, Integer liveGoodsId, String storeId, String goodsId) { //判断直播间是否已添加商品 if (studioCommodityService.getOne( new LambdaQueryWrapper().eq(StudioCommodity::getRoomId, roomId) - .eq(StudioCommodity::getGoodsId, goodsId)) != null) { + .eq(StudioCommodity::getGoodsId, liveGoodsId)) != null) { throw new ServiceException(ResultCode.STODIO_GOODS_EXIST_ERROR); } @@ -176,8 +176,8 @@ public class StudioServiceImpl extends ServiceImpl impleme } //调用微信接口添加直播间商品并进行记录 - if (Boolean.TRUE.equals(wechatLivePlayerUtil.pushGoods(roomId, goodsId))) { - studioCommodityService.save(new StudioCommodity(roomId, goodsId)); + if (Boolean.TRUE.equals(wechatLivePlayerUtil.pushGoods(roomId, liveGoodsId))) { + studioCommodityService.save(new StudioCommodity(roomId, liveGoodsId)); //添加直播间商品数量 Studio studio = this.getByRoomId(roomId); studio.setRoomGoodsNum(studio.getRoomGoodsNum() != null ? studio.getRoomGoodsNum() + 1 : 1); diff --git a/framework/src/main/java/cn/lili/modules/permission/entity/vo/SystemLogVO.java b/framework/src/main/java/cn/lili/modules/permission/entity/vo/SystemLogVO.java index b3a9ec9c..6c5a813e 100644 --- a/framework/src/main/java/cn/lili/modules/permission/entity/vo/SystemLogVO.java +++ b/framework/src/main/java/cn/lili/modules/permission/entity/vo/SystemLogVO.java @@ -9,7 +9,6 @@ import lombok.NoArgsConstructor; import lombok.ToString; import lombok.experimental.Accessors; import org.springframework.data.annotation.Id; -import org.springframework.data.elasticsearch.annotations.DateFormat; import org.springframework.data.elasticsearch.annotations.Document; import org.springframework.data.elasticsearch.annotations.Field; import org.springframework.data.elasticsearch.annotations.FieldType; @@ -42,7 +41,7 @@ public class SystemLogVO implements Serializable { @ApiModelProperty(value = "日志记录时间") @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") - @Field(type = FieldType.Date, format = DateFormat.basic_date_time, fielddata = true) + @Field(type = FieldType.Date, fielddata = true) private Date createTime = new Date(); @ApiModelProperty(value = "请求用户") diff --git a/seller-api/src/main/java/cn/lili/controller/other/broadcast/StudioStoreController.java b/seller-api/src/main/java/cn/lili/controller/other/broadcast/StudioStoreController.java index efe697e3..44d90022 100644 --- a/seller-api/src/main/java/cn/lili/controller/other/broadcast/StudioStoreController.java +++ b/seller-api/src/main/java/cn/lili/controller/other/broadcast/StudioStoreController.java @@ -74,9 +74,9 @@ public class StudioStoreController { @ApiImplicitParam(name = "liveGoodsId", value = "直播商品ID", required = true, dataType = "Integer", paramType = "path") }) @PutMapping(value = "/push/{roomId}/{liveGoodsId}") - public ResultMessage push(@PathVariable Integer roomId, @PathVariable Integer liveGoodsId) { + public ResultMessage push(@PathVariable Integer roomId, @PathVariable Integer liveGoodsId, @RequestParam String goodsId) { String storeId = Objects.requireNonNull(UserContext.getCurrentUser()).getStoreId(); - if (Boolean.TRUE.equals(studioService.push(roomId, liveGoodsId, storeId))) { + if (Boolean.TRUE.equals(studioService.push(roomId, liveGoodsId, storeId, goodsId))) { return ResultUtil.success(ResultCode.SUCCESS); } throw new ServiceException(ResultCode.ERROR);