jiangqs
2023-06-28 efe79e640c4598f52c2d1032fcead000edf8049e
ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/controller/management/MgtGoodsController.java
@@ -15,6 +15,7 @@
import com.ruoyi.system.api.domain.vo.MgtSelectGoodsPageVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@@ -73,7 +74,7 @@
    @RequestMapping(value = "/editMgtGoods", method = RequestMethod.POST)
    @Log(title = "商品管理", businessType = BusinessType.UPDATE,operContent = "编辑商品")
    @ApiOperation(value = "平台编辑商品")
    public R editMgtGoods(@RequestBody MgtGoodsEditDto mgtGoodsEditDto) {
    public R editMgtGoods(@Validated @RequestBody MgtGoodsEditDto mgtGoodsEditDto) {
        Long userId = SecurityUtils.getUserId();
        mgtGoodsEditDto.setUserId(userId);
        goodsService.editMgtGoods(mgtGoodsEditDto);