Browse Source

消息相关表sql提交,生成代码提交

feature/evaluate
yinzuomei 4 years ago
parent
commit
f9d03c4de3
  1. 41
      epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/InfoController.java
  2. 33
      epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/InfoAttDao.java
  3. 33
      epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/InfoDao.java
  4. 33
      epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/InfoGroupReceiversDao.java
  5. 33
      epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/InfoProfileDao.java
  6. 33
      epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/InfoReceiverGroupDao.java
  7. 33
      epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/InfoReceiversDao.java
  8. 33
      epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/InfoReplyContentDao.java
  9. 33
      epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/InfoReplyDao.java
  10. 76
      epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/InfoAttEntity.java
  11. 56
      epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/InfoEntity.java
  12. 56
      epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/InfoGroupReceiversEntity.java
  13. 81
      epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/InfoProfileEntity.java
  14. 56
      epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/InfoReceiverGroupEntity.java
  15. 61
      epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/InfoReceiversEntity.java
  16. 76
      epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/InfoReplyContentEntity.java
  17. 56
      epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/InfoReplyEntity.java
  18. 32
      epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/InfoService.java
  19. 53
      epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/InfoServiceImpl.java
  20. 138
      epmet-module/epmet-message/epmet-message-server/src/main/resources/db/migration/V0.3.14__create_info_table.sql
  21. 24
      epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/InfoAttDao.xml
  22. 8
      epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/InfoDao.xml
  23. 9
      epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/InfoGroupReceiversDao.xml
  24. 8
      epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/InfoProfileDao.xml
  25. 8
      epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/InfoReceiverGroupDao.xml
  26. 8
      epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/InfoReceiversDao.xml
  27. 7
      epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/InfoReplyContentDao.xml
  28. 7
      epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/InfoReplyDao.xml

41
epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/InfoController.java

@ -0,0 +1,41 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.controller;
import com.epmet.service.InfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 消息主表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-08-18
*/
@RestController
@RequestMapping("info")
public class InfoController {
@Autowired
private InfoService infoService;
}

33
epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/InfoAttDao.java

@ -0,0 +1,33 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.InfoAttEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 消息的附件表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-08-18
*/
@Mapper
public interface InfoAttDao extends BaseDao<InfoAttEntity> {
}

33
epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/InfoDao.java

@ -0,0 +1,33 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.InfoEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 消息主表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-08-18
*/
@Mapper
public interface InfoDao extends BaseDao<InfoEntity> {
}

33
epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/InfoGroupReceiversDao.java

@ -0,0 +1,33 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.InfoGroupReceiversEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 消息-群组成员关系表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-08-18
*/
@Mapper
public interface InfoGroupReceiversDao extends BaseDao<InfoGroupReceiversEntity> {
}

33
epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/InfoProfileDao.java

@ -0,0 +1,33 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.InfoProfileEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 消息概要表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-08-18
*/
@Mapper
public interface InfoProfileDao extends BaseDao<InfoProfileEntity> {
}

33
epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/InfoReceiverGroupDao.java

@ -0,0 +1,33 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.InfoReceiverGroupEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 消息-群组表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-08-18
*/
@Mapper
public interface InfoReceiverGroupDao extends BaseDao<InfoReceiverGroupEntity> {
}

33
epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/InfoReceiversDao.java

@ -0,0 +1,33 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.InfoReceiversEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 消息接收人记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-08-18
*/
@Mapper
public interface InfoReceiversDao extends BaseDao<InfoReceiversEntity> {
}

33
epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/InfoReplyContentDao.java

@ -0,0 +1,33 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.InfoReplyContentEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 回复详情表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-08-18
*/
@Mapper
public interface InfoReplyContentDao extends BaseDao<InfoReplyContentEntity> {
}

33
epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/InfoReplyDao.java

@ -0,0 +1,33 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.InfoReplyEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 消息回复表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-08-18
*/
@Mapper
public interface InfoReplyDao extends BaseDao<InfoReplyEntity> {
}

76
epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/InfoAttEntity.java

@ -0,0 +1,76 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 消息的附件表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-08-18
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("info_att")
public class InfoAttEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* 消息主表的id
*/
private String infoId;
/**
* 附件名
*/
private String attachmentName;
/**
* 文件格式JPGPNGPDFJPEGBMPMP4WMAM4AMP3DOCDOCXXLS
*/
private String attachmentFormat;
/**
* 附件类型图片 - image 视频 - video 语音 - voice 文档 - doc
*/
private String attachmentType;
/**
* 附件地址
*/
private String attachmentUrl;
/**
* 排序字段
*/
private Integer sort;
}

56
epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/InfoEntity.java

@ -0,0 +1,56 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 消息主表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-08-18
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("info")
public class InfoEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户id
*/
private String customerId;
/**
* 发布人id
*/
private String publishStaffId;
/**
* 内容这里存储全部的内容
*/
private String content;
}

56
epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/InfoGroupReceiversEntity.java

@ -0,0 +1,56 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 消息-群组成员关系表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-08-18
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("info_group_receivers")
public class InfoGroupReceiversEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* 群组id
*/
private String infoReceiverGroupId;
/**
* 工作人员id
*/
private String staffId;
}

81
epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/InfoProfileEntity.java

@ -0,0 +1,81 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 消息概要表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-08-18
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("info_profile")
public class InfoProfileEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户id
*/
private String customerId;
/**
* 消息主表的id
*/
private String infoId;
/**
* 发布人id
*/
private String publishStaffId;
/**
* 内容概要取前100字
*/
private String content;
/**
* 附件ID第一个用于展示
*/
private String attId;
/**
* 应读人数
*/
private Integer totalReceiver;
/**
* 已读人数插入是为0
*/
private Integer readTotal;
/**
* 未读的回复数量发布人每次查看详情后置为0接收人回复一条+1
*/
private Integer unReadReplyNum;
}

56
epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/InfoReceiverGroupEntity.java

@ -0,0 +1,56 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 消息-群组表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-08-18
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("info_receiver_group")
public class InfoReceiverGroupEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* 群组名称,我创建的范围内唯一
*/
private String name;
/**
* 创建人id
*/
private String createStaffId;
}

61
epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/InfoReceiversEntity.java

@ -0,0 +1,61 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 消息接收人记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-08-18
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("info_receivers")
public class InfoReceiversEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* 消息主表.id
*/
private String infoId;
/**
* 工作人员id
*/
private String staffId;
/**
* 已读1;未读0
*/
private Integer readFlag;
}

76
epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/InfoReplyContentEntity.java

@ -0,0 +1,76 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 回复详情表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-08-18
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("info_reply_content")
public class InfoReplyContentEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* INFO_REPLY的id
*/
private String infoReplyId;
/**
* 附件名
*/
private String attachmentName;
/**
* 文件格式JPGPNGPDFJPEGBMPMP4WMAM4AMP3DOCDOCXXLS
*/
private String attachmentFormat;
/**
* 回复的类型文本-text图片 - image 视频 - video 语音 - voice 文档 - doc
*/
private String replyType;
/**
* 如果是文本对应的是文字如果是其他类型对应的是url
*/
private String content;
/**
* 排序字段
*/
private Integer sort;
}

56
epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/InfoReplyEntity.java

@ -0,0 +1,56 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 消息回复表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-08-18
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("info_reply")
public class InfoReplyEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户ID
*/
private String customerId;
/**
* 消息主表的id
*/
private String infoId;
/**
* 回复人用户Id
*/
private String fromUserId;
}

32
epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/InfoService.java

@ -0,0 +1,32 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.entity.InfoEntity;
/**
* 消息主表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-08-18
*/
public interface InfoService extends BaseService<InfoEntity> {
}

53
epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/InfoServiceImpl.java

@ -0,0 +1,53 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.impl;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.dao.*;
import com.epmet.entity.InfoEntity;
import com.epmet.service.InfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* 消息主表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-08-18
*/
@Slf4j
@Service
public class InfoServiceImpl extends BaseServiceImpl<InfoDao, InfoEntity> implements InfoService {
@Autowired
private InfoAttDao infoAttDao;
@Autowired
private InfoReceiversDao infoReceiversDao;
@Autowired
private InfoGroupReceiversDao infoGroupReceiversDao;
@Autowired
private InfoReceiverGroupDao infoReceiverGroupDao;
@Autowired
private InfoProfileDao infoProfileDao;
@Autowired
private InfoReplyDao infoReplyDao;
@Autowired
private InfoReplyContentDao infoReplyContentDao;
}

138
epmet-module/epmet-message/epmet-message-server/src/main/resources/db/migration/V0.3.14__create_info_table.sql

@ -0,0 +1,138 @@
-- 上传下达消息表
CREATE TABLE `info` (
`ID` varchar(64) NOT NULL COMMENT '主键',
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id',
`publish_staff_id` varchar(64) NOT NULL COMMENT '发布人id',
`content` varchar(1024) NOT NULL COMMENT '内容,这里存储全部的内容。',
`DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标识',
`REVISION` int(10) NOT NULL COMMENT '乐观锁',
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人',
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人',
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='消息主表';
CREATE TABLE `info_att` (
`ID` varchar(64) NOT NULL COMMENT '主键',
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID',
`INFO_ID` varchar(64) NOT NULL COMMENT '消息主表的id',
`ATTACHMENT_NAME` varchar(64) NOT NULL COMMENT '附件名',
`ATTACHMENT_FORMAT` varchar(64) NOT NULL COMMENT '文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS)',
`ATTACHMENT_TYPE` varchar(64) NOT NULL COMMENT '附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc))',
`ATTACHMENT_URL` varchar(255) NOT NULL COMMENT '附件地址',
`SORT` int(1) NOT NULL COMMENT '排序字段',
`DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标记 0:未删除,1:已删除',
`REVISION` int(11) NOT NULL COMMENT '乐观锁',
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人',
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人',
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='消息的附件表';
CREATE TABLE `info_group_receivers` (
`ID` varchar(64) NOT NULL COMMENT '主键',
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID',
`info_receiver_group_id` varchar(64) NOT NULL COMMENT '群组id',
`STAFF_ID` varchar(64) NOT NULL COMMENT '工作人员id',
`DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标记 0:未删除,1:已删除',
`REVISION` int(11) NOT NULL COMMENT '乐观锁',
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人',
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人',
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='消息-群组成员关系表';
CREATE TABLE `info_profile` (
`ID` varchar(64) NOT NULL COMMENT '主键',
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户id',
`INFO_ID` varchar(64) NOT NULL COMMENT '消息主表的id',
`publish_staff_id` varchar(64) NOT NULL COMMENT '发布人id',
`content` varchar(512) NOT NULL COMMENT '内容概要,取前100字',
`att_id` varchar(1024) NOT NULL COMMENT '附件ID,第一个用于展示',
`total_receiver` int(11) NOT NULL COMMENT '应读人数',
`read_total` int(11) NOT NULL COMMENT '已读人数,插入是为0',
`UN_READ_REPLY_NUM` int(11) NOT NULL COMMENT '未读的回复数量:发布人每次查看详情后,置为0;接收人回复一条+1',
`DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标识',
`REVISION` int(10) NOT NULL COMMENT '乐观锁',
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人',
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人',
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`ID`) USING BTREE,
UNIQUE KEY `IDX_IP_INFO_ID` (`INFO_ID`),
KEY `IDX_IP_STAFF_ID` (`publish_staff_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='消息概要表';
CREATE TABLE `info_receiver_group` (
`ID` varchar(64) NOT NULL COMMENT '主键',
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID',
`NAME` varchar(64) NOT NULL COMMENT '群组名称,我创建的范围内唯一',
`CREATE_STAFF_ID` varchar(64) NOT NULL COMMENT '创建人id',
`DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标记 0:未删除,1:已删除',
`REVISION` int(11) NOT NULL COMMENT '乐观锁',
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人',
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人',
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='消息-群组表';
CREATE TABLE `info_receivers` (
`ID` varchar(64) NOT NULL COMMENT '主键,群组id',
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID',
`INFO_ID` varchar(64) NOT NULL COMMENT '消息主表.id',
`STAFF_ID` varchar(64) NOT NULL COMMENT '工作人员id',
`READ_FLAG` tinyint(1) NOT NULL DEFAULT '0' COMMENT '已读:1;未读:0',
`DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标记 0:未删除,1:已删除',
`REVISION` int(11) NOT NULL COMMENT '乐观锁',
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人',
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人',
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`ID`) USING BTREE,
KEY `IDX_IR_INFO_ID` (`INFO_ID`),
KEY `IDX_IR_STAFF_ID` (`STAFF_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='消息接收人记录表';
CREATE TABLE `info_reply` (
`ID` varchar(64) NOT NULL COMMENT '主键',
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID',
`INFO_ID` varchar(64) NOT NULL COMMENT '消息主表的id',
`FROM_USER_ID` varchar(64) NOT NULL COMMENT '回复人用户Id',
`DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标记 0:未删除,1:已删除',
`REVISION` int(11) NOT NULL COMMENT '乐观锁',
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人',
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人',
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='消息回复表';
CREATE TABLE `info_reply_content` (
`ID` varchar(64) NOT NULL COMMENT '主键',
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID',
`INFO_REPLY_ID` varchar(64) NOT NULL COMMENT 'INFO_REPLY的id',
`ATTACHMENT_NAME` varchar(64) DEFAULT NULL COMMENT '附件名',
`ATTACHMENT_FORMAT` varchar(64) DEFAULT NULL COMMENT '文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS)',
`REPLY_TYPE` varchar(64) NOT NULL COMMENT '回复的类型(文本-text、图片 - image、 视频 - video、 语音 - voice、 文档 - doc))',
`CONTENT` varchar(255) NOT NULL COMMENT '如果是文本对应的是文字,如果是其他类型,对应的是url',
`SORT` int(1) NOT NULL COMMENT '排序字段',
`DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标记 0:未删除,1:已删除',
`REVISION` int(11) NOT NULL COMMENT '乐观锁',
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人',
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人',
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`ID`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='回复详情表';

24
epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/InfoAttDao.xml

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.InfoAttDao">
<resultMap type="com.epmet.entity.InfoAttEntity" id="infoAttMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="infoId" column="INFO_ID"/>
<result property="attachmentName" column="ATTACHMENT_NAME"/>
<result property="attachmentFormat" column="ATTACHMENT_FORMAT"/>
<result property="attachmentType" column="ATTACHMENT_TYPE"/>
<result property="attachmentUrl" column="ATTACHMENT_URL"/>
<result property="sort" column="SORT"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>

8
epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/InfoDao.xml

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.InfoDao">
</mapper>

9
epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/InfoGroupReceiversDao.xml

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.InfoGroupReceiversDao">
</mapper>

8
epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/InfoProfileDao.xml

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.InfoProfileDao">
</mapper>

8
epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/InfoReceiverGroupDao.xml

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.InfoReceiverGroupDao">
</mapper>

8
epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/InfoReceiversDao.xml

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.InfoReceiversDao">
</mapper>

7
epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/InfoReplyContentDao.xml

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.InfoReplyContentDao">
</mapper>

7
epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/InfoReplyDao.xml

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.InfoReplyDao">
</mapper>
Loading…
Cancel
Save