diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/InfoController.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/InfoController.java new file mode 100644 index 0000000000..7ef36643de --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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; + + + +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/InfoAttDao.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/InfoAttDao.java new file mode 100644 index 0000000000..45005bf028 --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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 { + +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/InfoDao.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/InfoDao.java new file mode 100644 index 0000000000..e6eaacaef6 --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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 { + +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/InfoGroupReceiversDao.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/InfoGroupReceiversDao.java new file mode 100644 index 0000000000..17890976b6 --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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 { + +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/InfoProfileDao.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/InfoProfileDao.java new file mode 100644 index 0000000000..4b26153662 --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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 { + +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/InfoReceiverGroupDao.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/InfoReceiverGroupDao.java new file mode 100644 index 0000000000..a5b7f35b54 --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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 { + +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/InfoReceiversDao.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/InfoReceiversDao.java new file mode 100644 index 0000000000..74a19d7aba --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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 { + +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/InfoReplyContentDao.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/InfoReplyContentDao.java new file mode 100644 index 0000000000..03d0fc4399 --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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 { + +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/InfoReplyDao.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/InfoReplyDao.java new file mode 100644 index 0000000000..201e36a54d --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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 { + +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/InfoAttEntity.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/InfoAttEntity.java new file mode 100644 index 0000000000..d458461500 --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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; + + /** + * 文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS) + */ + private String attachmentFormat; + + /** + * 附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc)) + */ + private String attachmentType; + + /** + * 附件地址 + */ + private String attachmentUrl; + + /** + * 排序字段 + */ + private Integer sort; + +} diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/InfoEntity.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/InfoEntity.java new file mode 100644 index 0000000000..d3cd0ca82f --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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; + +} diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/InfoGroupReceiversEntity.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/InfoGroupReceiversEntity.java new file mode 100644 index 0000000000..9de1c52bc0 --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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; + +} diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/InfoProfileEntity.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/InfoProfileEntity.java new file mode 100644 index 0000000000..637ce6e125 --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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; + +} diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/InfoReceiverGroupEntity.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/InfoReceiverGroupEntity.java new file mode 100644 index 0000000000..d7efe67896 --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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; + +} diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/InfoReceiversEntity.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/InfoReceiversEntity.java new file mode 100644 index 0000000000..ea5275329e --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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; + +} diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/InfoReplyContentEntity.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/InfoReplyContentEntity.java new file mode 100644 index 0000000000..e83345449a --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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; + + /** + * 文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS) + */ + private String attachmentFormat; + + /** + * 回复的类型(文本-text、图片 - image、 视频 - video、 语音 - voice、 文档 - doc)) + */ + private String replyType; + + /** + * 如果是文本对应的是文字,如果是其他类型,对应的是url + */ + private String content; + + /** + * 排序字段 + */ + private Integer sort; + +} diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/InfoReplyEntity.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/InfoReplyEntity.java new file mode 100644 index 0000000000..9e67742cae --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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; + +} diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/InfoService.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/InfoService.java new file mode 100644 index 0000000000..4fba1d245d --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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 { + + +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/InfoServiceImpl.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/InfoServiceImpl.java new file mode 100644 index 0000000000..616ab65bac --- /dev/null +++ b/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 + *

+ * 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. + *

+ * 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. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +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 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; + + +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/resources/db/migration/V0.3.14__create_info_table.sql b/epmet-module/epmet-message/epmet-message-server/src/main/resources/db/migration/V0.3.14__create_info_table.sql new file mode 100644 index 0000000000..04797deeeb --- /dev/null +++ b/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='回复详情表'; + diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/InfoAttDao.xml b/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/InfoAttDao.xml new file mode 100644 index 0000000000..4d3710f54f --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/InfoAttDao.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/InfoDao.xml b/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/InfoDao.xml new file mode 100644 index 0000000000..25ef13a201 --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/InfoDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/InfoGroupReceiversDao.xml b/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/InfoGroupReceiversDao.xml new file mode 100644 index 0000000000..19cdf876fd --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/InfoGroupReceiversDao.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/InfoProfileDao.xml b/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/InfoProfileDao.xml new file mode 100644 index 0000000000..5b9bea1f1e --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/InfoProfileDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/InfoReceiverGroupDao.xml b/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/InfoReceiverGroupDao.xml new file mode 100644 index 0000000000..264c96846f --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/InfoReceiverGroupDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/InfoReceiversDao.xml b/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/InfoReceiversDao.xml new file mode 100644 index 0000000000..88acf8d276 --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/InfoReceiversDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/InfoReplyContentDao.xml b/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/InfoReplyContentDao.xml new file mode 100644 index 0000000000..0e02284cd4 --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/InfoReplyContentDao.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/InfoReplyDao.xml b/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/InfoReplyDao.xml new file mode 100644 index 0000000000..0411abe306 --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/InfoReplyDao.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file