Commit 98c42d1f authored by wdy's avatar wdy

Merge branch 'dev' into 'master'

dev - master 41

See merge request !407
parents 67a16fd5 97ed5b01
......@@ -25,4 +25,9 @@ public interface ReviewSceneService extends IService<ReviewScene> {
List<ReviewScene> findList(ReviewSceneFindListRequest request);
/**
* 新增场景
* @param reviewScene
*/
void addReviewScene(ReviewScene reviewScene);
}
......@@ -39,4 +39,13 @@ public class ReviewSceneServiceImpl extends ServiceImpl<ReviewSceneMapper, Revie
return reviewSceneMapper.findList(request);
}
/**
* 新增场景
* @param reviewScene
*/
@Override
public void addReviewScene(ReviewScene reviewScene) {
save(reviewScene);
}
}
package com.ruoyi.web;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.domain.ReviewScene;
import com.ruoyi.service.ReviewSceneService;
import com.ruoyi.web.request.*;
......@@ -34,4 +37,28 @@ public class ReviewSceneController extends BaseController {
return getDataTable(reviewSceneService.findList(request));
}
@ApiOperation("新建场景")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@Log(title = "新建场景", businessType = BusinessType.INSERT)
@RequestMapping(method = RequestMethod.POST, value = "/add")
public R<String> add(@Validated @RequestBody ReviewScene reviewScene) {
reviewSceneService.addReviewScene(reviewScene);
return R.ok();
}
@ApiOperation("删除场景")
@Trace
@Tags({@Tag(key = "param", value = "arg[0]"), @Tag(key = "result", value = "returnedObj")})
@Log(title = "删除场景", businessType = BusinessType.DELETE)
@RequestMapping(method = RequestMethod.POST, value = "/remove")
public R<String> remove(@Validated @RequestBody ReviewSceneDelRequest request) {
reviewSceneService.removeById(request.getId());
return R.ok();
}
}
package com.ruoyi.web.request;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ApiModel(value = "ReviewSceneDelResult", description = "删除场景")
@Data
public class ReviewSceneDelRequest {
@ApiModelProperty("ID")
private Long id;
}
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