|
@@ -7,8 +7,10 @@ import com.ym.mec.common.entity.HttpResponseResult;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.http.MediaType;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
@@ -23,15 +25,15 @@ public class LiveGoodsController extends BaseController {
|
|
|
@ApiOperation("新增直播间商品")
|
|
|
@PostMapping("/add")
|
|
|
@PreAuthorize("@pcs.hasPermissions('liveGoods/add')")
|
|
|
- public HttpResponseResult add(LiveGoods liveGoods) {
|
|
|
+ public HttpResponseResult add(@RequestBody LiveGoods liveGoods) {
|
|
|
liveGoodsService.insert(liveGoods);
|
|
|
return succeed();
|
|
|
}
|
|
|
|
|
|
@ApiOperation("修改直播间商品")
|
|
|
- @PostMapping("/update")
|
|
|
+ @PostMapping(value = "/update")
|
|
|
@PreAuthorize("@pcs.hasPermissions('liveGoods/update')")
|
|
|
- public HttpResponseResult update(LiveGoods liveGoods) {
|
|
|
+ public HttpResponseResult update(@RequestBody LiveGoods liveGoods) {
|
|
|
liveGoodsService.updateLiveGoods(liveGoods);
|
|
|
return succeed();
|
|
|
}
|