Commit 21787483 by danmo

api补全

1 parent 3353692f
...@@ -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.WeChatContactMapping; import com.linkwechat.wecom.domain.WeChatContactMapping;
import com.linkwechat.wecom.domain.WeCustomer; import com.linkwechat.wecom.domain.WeCustomer;
import com.linkwechat.wecom.service.IWeChatContactMappingService; import com.linkwechat.wecom.service.IWeChatContactMappingService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
...@@ -29,6 +31,7 @@ import java.util.List; ...@@ -29,6 +31,7 @@ import java.util.List;
* @author ruoyi * @author ruoyi
* @date 2020-12-27 * @date 2020-12-27
*/ */
@Api("聊天关系映射Controller")
@RestController @RestController
@RequestMapping("/chat/mapping") @RequestMapping("/chat/mapping")
public class WeChatContactMappingController extends BaseController public class WeChatContactMappingController extends BaseController
...@@ -40,8 +43,9 @@ public class WeChatContactMappingController extends BaseController ...@@ -40,8 +43,9 @@ public class WeChatContactMappingController extends BaseController
* 查询聊天关系映射列表 * 查询聊天关系映射列表
*/ */
// @PreAuthorize("@ss.hasPermi('chat:mapping:list')") // @PreAuthorize("@ss.hasPermi('chat:mapping:list')")
@ApiOperation(value = "查询聊天关系映射列表",httpMethod = "GET")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(WeChatContactMapping weChatContactMapping) public TableDataInfo<List<WeChatContactMapping>> list(WeChatContactMapping weChatContactMapping)
{ {
startPage(); startPage();
List<WeChatContactMapping> list = weChatContactMappingService.selectWeChatContactMappingList(weChatContactMapping); List<WeChatContactMapping> list = weChatContactMappingService.selectWeChatContactMappingList(weChatContactMapping);
...@@ -52,8 +56,9 @@ public class WeChatContactMappingController extends BaseController ...@@ -52,8 +56,9 @@ public class WeChatContactMappingController extends BaseController
* 按客户查询关系映射列表 * 按客户查询关系映射列表
*/ */
// @PreAuthorize("@ss.hasPermi('chat:mapping:listByCustomer')") // @PreAuthorize("@ss.hasPermi('chat:mapping:listByCustomer')")
@ApiOperation(value = "按客户查询关系映射列表",httpMethod = "GET")
@GetMapping("/listByCustomer") @GetMapping("/listByCustomer")
public TableDataInfo listByCustomer() public TableDataInfo<PageInfo<WeCustomer>> listByCustomer()
{ {
startPage(); startPage();
PageInfo<WeCustomer> weCustomerPageInfo = weChatContactMappingService.listByCustomer(); PageInfo<WeCustomer> weCustomerPageInfo = weChatContactMappingService.listByCustomer();
......
package com.linkwechat.web.controller.wecom; package com.linkwechat.web.controller.wecom;
import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageInfo;
import com.linkwechat.common.core.controller.BaseController; import com.linkwechat.common.core.controller.BaseController;
import com.linkwechat.common.core.domain.ConversationArchiveQuery; import com.linkwechat.common.core.domain.ConversationArchiveQuery;
import com.linkwechat.common.core.page.TableDataInfo; import com.linkwechat.common.core.page.TableDataInfo;
import com.linkwechat.wecom.service.IWeConversationArchiveService; import com.linkwechat.wecom.service.IWeConversationArchiveService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
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;
...@@ -16,6 +20,7 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -16,6 +20,7 @@ import org.springframework.web.bind.annotation.RestController;
* @description 会话存档controller * @description 会话存档controller
* @date 2020/12/19 13:51 * @date 2020/12/19 13:51
**/ **/
@Api("会话存档controller")
@Slf4j @Slf4j
@RestController @RestController
@RequestMapping("/wecom/finance") @RequestMapping("/wecom/finance")
...@@ -32,8 +37,9 @@ public class WeConversationArchiveController extends BaseController { ...@@ -32,8 +37,9 @@ public class WeConversationArchiveController extends BaseController {
* @return * @return
*/ */
// @PreAuthorize("@ss.hasPermi('conversationArchive:chatContact:list')") // @PreAuthorize("@ss.hasPermi('conversationArchive:chatContact:list')")
@ApiOperation(value = "获取单聊会话数据接口",httpMethod = "GET")
@GetMapping("/getChatContactList") @GetMapping("/getChatContactList")
public TableDataInfo getChatContactList(ConversationArchiveQuery query) { public TableDataInfo<PageInfo<JSONObject>> getChatContactList(ConversationArchiveQuery query) {
return getDataTable(weConversationArchiveService.getChatContactList(query)); return getDataTable(weConversationArchiveService.getChatContactList(query));
} }
...@@ -47,8 +53,9 @@ public class WeConversationArchiveController extends BaseController { ...@@ -47,8 +53,9 @@ public class WeConversationArchiveController extends BaseController {
* @return * @return
*/ */
// @PreAuthorize("@ss.hasPermi('conversationArchive:chatRoomContact:list')") // @PreAuthorize("@ss.hasPermi('conversationArchive:chatRoomContact:list')")
@ApiOperation(value = "获取群聊会话数据接口",httpMethod = "GET")
@GetMapping("/getChatRoomContactList") @GetMapping("/getChatRoomContactList")
public TableDataInfo getChatRoomContactList(ConversationArchiveQuery query) { public TableDataInfo<PageInfo<JSONObject>> getChatRoomContactList(ConversationArchiveQuery query) {
return getDataTable(weConversationArchiveService.getChatRoomContactList(query)); return getDataTable(weConversationArchiveService.getChatRoomContactList(query));
} }
...@@ -60,8 +67,9 @@ public class WeConversationArchiveController extends BaseController { ...@@ -60,8 +67,9 @@ public class WeConversationArchiveController extends BaseController {
* @return * @return
*/ */
// @PreAuthorize("@ss.hasPermi('conversationArchive:chatAllContact:list')") // @PreAuthorize("@ss.hasPermi('conversationArchive:chatAllContact:list')")
@ApiOperation(value = "获取全局会话数据接口",httpMethod = "GET")
@GetMapping("/getChatAllList") @GetMapping("/getChatAllList")
public TableDataInfo getChatAllList(ConversationArchiveQuery query) { public TableDataInfo<PageInfo<JSONObject>> getChatAllList(ConversationArchiveQuery query) {
return getDataTable(weConversationArchiveService.getChatAllList(query)); return getDataTable(weConversationArchiveService.getChatAllList(query));
} }
......
package com.linkwechat.common.core.domain; package com.linkwechat.common.core.domain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
/** /**
...@@ -7,29 +9,38 @@ import lombok.Data; ...@@ -7,29 +9,38 @@ import lombok.Data;
* @description 会话存档接口入参实体 * @description 会话存档接口入参实体
* @date 2020/12/29 14:23 * @date 2020/12/29 14:23
**/ **/
@ApiModel
@Data @Data
public class ConversationArchiveQuery extends BaseEntity { public class ConversationArchiveQuery extends BaseEntity {
/** 发送人Id */ /** 发送人Id */
@ApiModelProperty("发送人Id")
private String fromId=""; private String fromId="";
/** 成员名称 */ /** 成员名称 */
@ApiModelProperty("成员名称")
private String userName=""; private String userName="";
/** 接收人Id */ /** 接收人Id */
@ApiModelProperty("接收人Id")
private String receiveId=""; private String receiveId="";
/** 客户姓名 */ /** 客户姓名 */
@ApiModelProperty("客户姓名")
private String customerName=""; private String customerName="";
/** 群聊Id */ /** 群聊Id */
@ApiModelProperty("群聊Id")
private String roomId=""; private String roomId="";
/** 类型 */ /** 消息类型(同企微api文档消息类型) */
@ApiModelProperty("消息类型(同企微api文档消息类型)")
private String msgType=""; private String msgType="";
/** 关键词 **/ /** 关键词 **/
@ApiModelProperty("关键词")
private String keyWord=""; private String keyWord="";
/** 消息动作 */ /** 消息动作 */
@ApiModelProperty("消息动作")
private String action=""; private String action="";
} }
...@@ -3,6 +3,8 @@ package com.linkwechat.wecom.domain; ...@@ -3,6 +3,8 @@ package com.linkwechat.wecom.domain;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.linkwechat.common.annotation.Excel; import com.linkwechat.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -12,6 +14,7 @@ import lombok.Data; ...@@ -12,6 +14,7 @@ import lombok.Data;
* @author ruoyi * @author ruoyi
* @date 2020-12-27 * @date 2020-12-27
*/ */
@ApiModel
@Data @Data
public class WeChatContactMapping { public class WeChatContactMapping {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -24,66 +27,77 @@ public class WeChatContactMapping { ...@@ -24,66 +27,77 @@ public class WeChatContactMapping {
/** /**
* 发送人id * 发送人id
*/ */
@ApiModelProperty("发送人id")
@Excel(name = "发送人id") @Excel(name = "发送人id")
private String fromId; private String fromId;
/** /**
* 接收人id * 接收人id
*/ */
@ApiModelProperty("接收人id")
@Excel(name = "接收人id") @Excel(name = "接收人id")
private String receiveId; private String receiveId;
/** /**
* 群聊id * 群聊id
*/ */
@ApiModelProperty("群聊id")
@Excel(name = "群聊id") @Excel(name = "群聊id")
private String roomId; private String roomId;
/** /**
* 是否为客户 0-成员 1-客户 2-机器人 * 是否为客户 0-成员 1-客户 2-机器人
*/ */
@ApiModelProperty("是否为客户 0-成员 1-客户 2-机器人")
@Excel(name = "是否为客户 0-成员 1-客户 2-机器人") @Excel(name = "是否为客户 0-成员 1-客户 2-机器人")
private Integer isCustom; private Integer isCustom;
/** /**
* 是否为客户 0-内部 1-外部 2-群聊 * 是否为客户 0-内部 1-外部 2-群聊
*/ */
@ApiModelProperty("是否为客户 0-内部 1-外部 2-群聊")
@TableField(exist = false) @TableField(exist = false)
private Integer searchType; private Integer searchType;
/** /**
* 内部接收人信息 * 内部发送人信息
*/ */
@ApiModelProperty("内部发送人信息")
@TableField(exist = false) @TableField(exist = false)
private WeUser fromWeUser; private WeUser fromWeUser;
/** /**
* 外部接收人信息 * 外部发送人信息
*/ */
@ApiModelProperty("外部发送人信息")
@TableField(exist = false) @TableField(exist = false)
private WeCustomer fromWeCustomer; private WeCustomer fromWeCustomer;
/** /**
* 内部接收人信息 * 内部接收人信息
*/ */
@ApiModelProperty("内部接收人信息")
@TableField(exist = false) @TableField(exist = false)
private WeUser receiveWeUser; private WeUser receiveWeUser;
/** /**
* 外部接收人信息 * 外部接收人信息
*/ */
@ApiModelProperty("外部接收人信息")
@TableField(exist = false) @TableField(exist = false)
private WeCustomer receiveWeCustomer; private WeCustomer receiveWeCustomer;
/** /**
* 群信息 * 群信息
*/ */
@ApiModelProperty("群信息")
@TableField(exist = false) @TableField(exist = false)
private WeGroup roomInfo; private WeGroup roomInfo;
/** /**
* 最后一条聊天数据 * 最后一条聊天数据
*/ */
@ApiModelProperty("最后一条聊天数据")
@TableField(exist = false) @TableField(exist = false)
private JSONObject finalChatContext; private JSONObject finalChatContext;
} }
...@@ -28,6 +28,7 @@ import java.util.Date; ...@@ -28,6 +28,7 @@ import java.util.Date;
* @author ruoyi * @author ruoyi
* @date 2020-08-31 * @date 2020-08-31
*/ */
@ApiModel
@Data @Data
@TableName("we_user") @TableName("we_user")
@Builder @Builder
...@@ -39,79 +40,101 @@ public class WeUser ...@@ -39,79 +40,101 @@ public class WeUser
/** 用户头像 */ /** 用户头像 */
@ApiModelProperty("用户头像")
@TableField(value = "head_image_url") @TableField(value = "head_image_url")
private String avatarMediaid; private String avatarMediaid;
/** 用户名称 */ /** 用户名称 */
@ApiModelProperty("用户名称")
@NotBlank(message = "姓名不可为空") @NotBlank(message = "姓名不可为空")
@TableField(value = "user_name") @TableField(value = "user_name")
private String name; private String name;
/** 用户昵称 */ /** 用户昵称 */
@ApiModelProperty("用户昵称")
private String alias; private String alias;
/** 账号 */ /** 账号 */
@ApiModelProperty("账号")
@NotBlank(message = "账号不可为空") @NotBlank(message = "账号不可为空")
@TableId @TableId
private String userId; private String userId;
/** 性别。1表示男性,2表示女性 */ /** 性别。1表示男性,2表示女性 */
@ApiModelProperty("性别。1表示男性,2表示女性")
private Integer gender; private Integer gender;
/** 手机号 */ /** 手机号 */
@ApiModelProperty("手机号")
@NotBlank(message = "手机号不可为空") @NotBlank(message = "手机号不可为空")
private String mobile; private String mobile;
/** 邮箱 */ /** 邮箱 */
@ApiModelProperty("邮箱")
private String email; private String email;
/** 个人微信号 */ /** 个人微信号 */
@ApiModelProperty("个人微信号")
private String wxAccount; private String wxAccount;
/** 用户所属部门,使用逗号隔开,字符串格式存储 */ /** 用户所属部门,使用逗号隔开,字符串格式存储 */
@ApiModelProperty("用户所属部门")
private String[] department; private String[] department;
/** 职务 */ /** 职务 */
@ApiModelProperty("职务")
private String position; private String position;
/** 1表示为上级,0表示普通成员(非上级)。 */ /** 1表示为上级,0表示普通成员(非上级)。 */
@ApiModelProperty("1表示为上级,0表示普通成员(非上级)")
private String[] isLeaderInDept; private String[] isLeaderInDept;
/** 入职时间 */ /** 入职时间 */
@ApiModelProperty("入职时间")
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
private Date joinTime; private Date joinTime;
/** 是否启用(1表示启用成员,0表示禁用成员) */ /** 是否启用(1表示启用成员,0表示禁用成员) */
@ApiModelProperty("是否启用(1表示启用成员,0表示禁用成员)")
private Integer enable; private Integer enable;
/** 身份证号 */ /** 身份证号 */
@ApiModelProperty("身份证号")
private String idCard; private String idCard;
/** QQ号 */ /** QQ号 */
@ApiModelProperty("QQ号")
private String qqAccount; private String qqAccount;
/** 座机 */ /** 座机 */
@ApiModelProperty("座机")
private String telephone; private String telephone;
/** 地址 */ /** 地址 */
@ApiModelProperty("地址")
private String address; private String address;
/** 生日 */ /** 生日 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
@ApiModelProperty("生日")
private Date birthday; private Date birthday;
/** 是否激活(1:是;2:否)该字段主要表示当前信息是否同步微信 */ /** 是否激活(1:是;2:否)该字段主要表示当前信息是否同步微信 */
/** 激活状态: 1=已激活,2=已禁用,4=未激活,5=退出企业,6=删除 */ /** 激活状态: 1=已激活,2=已禁用,4=未激活,5=退出企业,6=删除 */
@ApiModelProperty("激活状态: 1=已激活,2=已禁用,4=未激活,5=退出企业,6=删除")
private Integer isActivate; private Integer isActivate;
/** 离职是否分配(1:已分配;0:未分配;) */ /** 离职是否分配(1:已分配;0:未分配;) */
@ApiModelProperty("离职是否分配(1:已分配;0:未分配;)")
private Integer isAllocate; private Integer isAllocate;
/** 离职时间 */ /** 离职时间 */
@ApiModelProperty("离职时间")
private Date dimissionTime; private Date dimissionTime;
@ApiModelProperty("备注")
private String remark; private String remark;
@TableField(exist = false) @TableField(exist = false)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!