添加短信库管理相关接口Swagger注解
This commit is contained in:
parent
326db20b10
commit
9a090e27d7
@ -10,6 +10,8 @@ import com.xinelu.manage.dto.textmessage.TextMessageDTO;
|
||||
import com.xinelu.manage.dto.textmessage.TextMessageTaskDTO;
|
||||
import com.xinelu.manage.service.textmessage.ITextMessageService;
|
||||
import com.xinelu.manage.vo.textmessage.TextMessageVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@ -23,6 +25,7 @@ import java.util.List;
|
||||
* @author xinelu
|
||||
* @date 2024-02-28
|
||||
*/
|
||||
@Api(tags = "短信库控制器")
|
||||
@RestController
|
||||
@RequestMapping("/manage/message")
|
||||
public class TextMessageController extends BaseController {
|
||||
@ -32,6 +35,7 @@ public class TextMessageController extends BaseController {
|
||||
/**
|
||||
* 查询短信模板信息列表
|
||||
*/
|
||||
@ApiOperation("查询短信模板信息列表")
|
||||
@PreAuthorize("@ss.hasPermi('manage:message:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(TextMessageDTO textMessageDTO) {
|
||||
@ -43,6 +47,7 @@ public class TextMessageController extends BaseController {
|
||||
/**
|
||||
* 导出短信模板信息列表
|
||||
*/
|
||||
@ApiOperation("导出短信模板信息列表")
|
||||
@PreAuthorize("@ss.hasPermi('manage:message:export')")
|
||||
@Log(title = "短信模板信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ -55,6 +60,7 @@ public class TextMessageController extends BaseController {
|
||||
/**
|
||||
* 获取短信模板信息详细信息
|
||||
*/
|
||||
@ApiOperation("获取短信模板信息详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('manage:message:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
@ -64,9 +70,10 @@ public class TextMessageController extends BaseController {
|
||||
/**
|
||||
* 新增短信模板信息
|
||||
*/
|
||||
@ApiOperation("新增短信模板信息")
|
||||
@PreAuthorize("@ss.hasPermi('manage:message:add')")
|
||||
@Log(title = "短信模板信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
@PostMapping("/add")
|
||||
public AjaxResult add(@RequestBody TextMessageTaskDTO textMessage) {
|
||||
return toAjax(textMessageService.insertTextMessage(textMessage));
|
||||
}
|
||||
@ -74,9 +81,10 @@ public class TextMessageController extends BaseController {
|
||||
/**
|
||||
* 修改短信模板信息
|
||||
*/
|
||||
@ApiOperation("修改短信模板信息")
|
||||
@PreAuthorize("@ss.hasPermi('manage:message:edit')")
|
||||
@Log(title = "短信模板信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
@PutMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody TextMessageTaskDTO textMessageTaskDTO) {
|
||||
return toAjax(textMessageService.updateTextMessage(textMessageTaskDTO));
|
||||
}
|
||||
@ -84,9 +92,10 @@ public class TextMessageController extends BaseController {
|
||||
/**
|
||||
* 删除短信模板信息
|
||||
*/
|
||||
@ApiOperation("删除短信模板信息")
|
||||
@PreAuthorize("@ss.hasPermi('manage:message:remove')")
|
||||
@Log(title = "短信模板信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
@DeleteMapping("/remove/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(textMessageService.deleteTextMessageByIds(ids));
|
||||
}
|
||||
|
||||
@ -24,6 +24,7 @@ public class TextMessageSuitTask extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@ApiModelProperty(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
|
||||
@ -27,6 +27,7 @@ public class TextMessageVO extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@ApiModelProperty(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user