|
@@ -17,6 +17,8 @@ import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
@Api(tags = "直播商品关联管理")
|
|
|
@RequestMapping("liveGoodsMapper")
|
|
|
@RestController
|
|
@@ -38,6 +40,10 @@ public class LiveGoodsMapperController extends BaseController {
|
|
|
@ApiImplicitParam(name = "liveId", value = "房间号", required = true,dataType = "String")
|
|
|
})
|
|
|
public HttpResponseResult<LiveGoodsMapperDto> getGoodsDetail(Integer liveGoodsId, String liveId) {
|
|
|
- return succeed(liveGoodsMapperService.getLiveGoodsList(liveId,liveGoodsId,null).get(0));
|
|
|
+ List<LiveGoodsMapperDto> liveGoodsList = liveGoodsMapperService.getLiveGoodsList(liveId, liveGoodsId, null);
|
|
|
+ if (liveGoodsList.size() > 0) {
|
|
|
+ return succeed(liveGoodsList.get(0));
|
|
|
+ }
|
|
|
+ return failed("商品不存在");
|
|
|
}
|
|
|
}
|