add 动态消息Swagger注释
This commit is contained in:
+5
-4
@@ -12,6 +12,7 @@ import com.jero.common.api.vo.ResultCommon;
|
||||
import com.jero.modules.laws.standard.entity.LawsNewsFeed;
|
||||
import com.jero.modules.laws.standard.service.ILawsNewsFeedService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
@@ -124,7 +125,7 @@ public class LawsNewsFeedController extends JeroController<LawsNewsFeed, ILawsNe
|
||||
@PostMapping(value = "/delete")
|
||||
@RequiresPermissions("dynamicMessage:delete")
|
||||
@ApiOperationSupport(order = 5)
|
||||
public Result<T> delete(@RequestBody Map<String, String> map) {
|
||||
public Result<T> delete(@RequestBody @ApiParam(name = "id", value = "主键") Map<String, String> map) {
|
||||
if (!map.containsKey("id") || StringUtils.isEmpty(map.get("id"))) {
|
||||
throw new JeroBootException(ResultCommon.SELECT_DATA);
|
||||
}
|
||||
@@ -143,7 +144,7 @@ public class LawsNewsFeedController extends JeroController<LawsNewsFeed, ILawsNe
|
||||
@PostMapping(value = "/deleteBatch")
|
||||
@RequiresPermissions("dynamicMessage:deleteBatch")
|
||||
@ApiOperationSupport(order = 6)
|
||||
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
||||
public Result<T> deleteBatch(@RequestBody @ApiParam(name = "ids", value = "主键(多个用逗号分隔)") Map<String, String> map) {
|
||||
if (!map.containsKey("ids") || StringUtils.isEmpty(map.get("ids"))) {
|
||||
throw new JeroBootException(ResultCommon.SELECT_DATA);
|
||||
}
|
||||
@@ -163,8 +164,8 @@ public class LawsNewsFeedController extends JeroController<LawsNewsFeed, ILawsNe
|
||||
@Translation
|
||||
@RequiresPermissions("dynamicMessage:search")
|
||||
@ApiOperationSupport(order = 7)
|
||||
public Result<LawsNewsFeed> queryById(@RequestParam(name = "id") String id,
|
||||
@RequestParam(name = "type") String type) {
|
||||
public Result<LawsNewsFeed> queryById(@RequestParam(name = "id") @ApiParam("主键") String id,
|
||||
@RequestParam(name = "type") @ApiParam("类型(query查看、edit编辑)") String type) {
|
||||
LawsNewsFeed lawsNewsFeed = lawsNewsFeedService.queryById(id, type);
|
||||
return Result.OK(lawsNewsFeed);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user