Commit 21787483 by danmo

api补全

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