Commit 366cd309 by danmo

swagger注解

1 parent 6a1d35a3
...@@ -10,6 +10,8 @@ import com.linkwechat.common.utils.poi.ExcelUtil; ...@@ -10,6 +10,8 @@ import com.linkwechat.common.utils.poi.ExcelUtil;
import com.linkwechat.wecom.domain.WeChatContactMsg; import com.linkwechat.wecom.domain.WeChatContactMsg;
import com.linkwechat.wecom.domain.vo.WeChatContactMsgVo; import com.linkwechat.wecom.domain.vo.WeChatContactMsgVo;
import com.linkwechat.wecom.service.IWeChatContactMsgService; import com.linkwechat.wecom.service.IWeChatContactMsgService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
...@@ -24,6 +26,7 @@ import java.util.List; ...@@ -24,6 +26,7 @@ import java.util.List;
* @author ruoyi * @author ruoyi
* @date 2021-07-28 * @date 2021-07-28
*/ */
@Api(tags = "会话存档管理")
@RequiredArgsConstructor(onConstructor_ = @Autowired) @RequiredArgsConstructor(onConstructor_ = @Autowired)
@RestController @RestController
@RequestMapping("/linkwechat/msg" ) @RequestMapping("/linkwechat/msg" )
...@@ -34,6 +37,7 @@ public class WeChatContactMsgController extends BaseController { ...@@ -34,6 +37,7 @@ public class WeChatContactMsgController extends BaseController {
/** /**
* 查询会话消息列表 * 查询会话消息列表
*/ */
@ApiOperation("查询会话消息列表")
@PreAuthorize("@ss.hasPermi('linkwechat:msg:list')") @PreAuthorize("@ss.hasPermi('linkwechat:msg:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo<List<WeChatContactMsg>> list(WeChatContactMsg weChatContactMsg) { public TableDataInfo<List<WeChatContactMsg>> list(WeChatContactMsg weChatContactMsg) {
...@@ -45,6 +49,7 @@ public class WeChatContactMsgController extends BaseController { ...@@ -45,6 +49,7 @@ public class WeChatContactMsgController extends BaseController {
/** /**
* 导出会话消息列表 * 导出会话消息列表
*/ */
@ApiOperation("导出会话消息列表")
@PreAuthorize("@ss.hasPermi('linkwechat:msg:export')" ) @PreAuthorize("@ss.hasPermi('linkwechat:msg:export')" )
@Log(title = "会话消息" , businessType = BusinessType.EXPORT) @Log(title = "会话消息" , businessType = BusinessType.EXPORT)
@GetMapping("/export" ) @GetMapping("/export" )
...@@ -57,6 +62,7 @@ public class WeChatContactMsgController extends BaseController { ...@@ -57,6 +62,7 @@ public class WeChatContactMsgController extends BaseController {
/** /**
* 获取会话消息详细信息 * 获取会话消息详细信息
*/ */
@ApiOperation("获取会话消息详细信息")
@PreAuthorize("@ss.hasPermi('linkwechat:msg:query')" ) @PreAuthorize("@ss.hasPermi('linkwechat:msg:query')" )
@GetMapping(value = "/{id}" ) @GetMapping(value = "/{id}" )
public AjaxResult<WeChatContactMsg> getInfo(@PathVariable("id" ) Long id) { public AjaxResult<WeChatContactMsg> getInfo(@PathVariable("id" ) Long id) {
...@@ -66,6 +72,7 @@ public class WeChatContactMsgController extends BaseController { ...@@ -66,6 +72,7 @@ public class WeChatContactMsgController extends BaseController {
/** /**
* 新增会话消息 * 新增会话消息
*/ */
@ApiOperation("新增会话消息")
@PreAuthorize("@ss.hasPermi('linkwechat:msg:add')" ) @PreAuthorize("@ss.hasPermi('linkwechat:msg:add')" )
@Log(title = "会话消息" , businessType = BusinessType.INSERT) @Log(title = "会话消息" , businessType = BusinessType.INSERT)
@PostMapping @PostMapping
...@@ -76,6 +83,7 @@ public class WeChatContactMsgController extends BaseController { ...@@ -76,6 +83,7 @@ public class WeChatContactMsgController extends BaseController {
/** /**
* 修改会话消息 * 修改会话消息
*/ */
@ApiOperation("修改会话消息")
@PreAuthorize("@ss.hasPermi('linkwechat:msg:edit')" ) @PreAuthorize("@ss.hasPermi('linkwechat:msg:edit')" )
@Log(title = "会话消息" , businessType = BusinessType.UPDATE) @Log(title = "会话消息" , businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
...@@ -86,6 +94,7 @@ public class WeChatContactMsgController extends BaseController { ...@@ -86,6 +94,7 @@ public class WeChatContactMsgController extends BaseController {
/** /**
* 删除会话消息 * 删除会话消息
*/ */
@ApiOperation("删除会话消息")
@PreAuthorize("@ss.hasPermi('linkwechat:msg:remove')" ) @PreAuthorize("@ss.hasPermi('linkwechat:msg:remove')" )
@Log(title = "会话消息" , businessType = BusinessType.DELETE) @Log(title = "会话消息" , businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}" ) @DeleteMapping("/{ids}" )
...@@ -96,6 +105,7 @@ public class WeChatContactMsgController extends BaseController { ...@@ -96,6 +105,7 @@ public class WeChatContactMsgController extends BaseController {
/** /**
* 外部联系人/单聊 会话列表 * 外部联系人/单聊 会话列表
*/ */
@ApiOperation("外部联系人/单聊 会话列表")
@Log(title = "外部联系人/单聊 会话列表" , businessType = BusinessType.OTHER) @Log(title = "外部联系人/单聊 会话列表" , businessType = BusinessType.OTHER)
@GetMapping("selectExternalChatList/{fromId}" ) @GetMapping("selectExternalChatList/{fromId}" )
public AjaxResult<List<WeChatContactMsgVo>> selectExternalChatList(@PathVariable("fromId") String fromId) { public AjaxResult<List<WeChatContactMsgVo>> selectExternalChatList(@PathVariable("fromId") String fromId) {
...@@ -105,6 +115,7 @@ public class WeChatContactMsgController extends BaseController { ...@@ -105,6 +115,7 @@ public class WeChatContactMsgController extends BaseController {
/** /**
* 内部联系人 会话列表 * 内部联系人 会话列表
*/ */
@ApiOperation("内部联系人 会话列表")
@Log(title = "内部联系人 会话列表" , businessType = BusinessType.OTHER) @Log(title = "内部联系人 会话列表" , businessType = BusinessType.OTHER)
@GetMapping("selectInternalChatList/{fromId}" ) @GetMapping("selectInternalChatList/{fromId}" )
public AjaxResult<List<WeChatContactMsgVo>> selectInternalChatList(@PathVariable("fromId") String fromId) { public AjaxResult<List<WeChatContactMsgVo>> selectInternalChatList(@PathVariable("fromId") String fromId) {
...@@ -114,6 +125,7 @@ public class WeChatContactMsgController extends BaseController { ...@@ -114,6 +125,7 @@ public class WeChatContactMsgController extends BaseController {
/** /**
* 群聊 会话列表 * 群聊 会话列表
*/ */
@ApiOperation("群聊 会话列表")
@Log(title = "群聊 会话列表" , businessType = BusinessType.OTHER) @Log(title = "群聊 会话列表" , businessType = BusinessType.OTHER)
@GetMapping("selectGroupChatList/{fromId}" ) @GetMapping("selectGroupChatList/{fromId}" )
public AjaxResult<List<WeChatContactMsgVo>> selectGroupChatList(@PathVariable("fromId") String fromId) { public AjaxResult<List<WeChatContactMsgVo>> selectGroupChatList(@PathVariable("fromId") String fromId) {
...@@ -123,6 +135,7 @@ public class WeChatContactMsgController extends BaseController { ...@@ -123,6 +135,7 @@ public class WeChatContactMsgController extends BaseController {
/** /**
* 全文检索 会话列表 * 全文检索 会话列表
*/ */
@ApiOperation("全文检索 会话列表")
@Log(title = "全文检索 会话列表" , businessType = BusinessType.OTHER) @Log(title = "全文检索 会话列表" , businessType = BusinessType.OTHER)
@GetMapping("selectFullSearchChatList}" ) @GetMapping("selectFullSearchChatList}" )
public TableDataInfo<List<WeChatContactMsgVo>> selectFullSearchChatList(WeChatContactMsg weChatContactMsg) { public TableDataInfo<List<WeChatContactMsgVo>> selectFullSearchChatList(WeChatContactMsg weChatContactMsg) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!