From a72da17734ff2f2730e54909b1de720a98633ebe Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 21 Oct 2020 14:31:06 +0800 Subject: [PATCH 01/12] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E8=AE=A2=E9=98=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/WxmpMessageController.java | 39 +++++++++++++++++++ .../com/epmet/service/WxmpMessageService.java | 28 +++++++++++++ .../service/impl/WxmpMessageServiceImpl.java | 35 +++++++++++++++++ 3 files changed, 102 insertions(+) create mode 100644 epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/WxmpMessageController.java create mode 100644 epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/WxmpMessageService.java create mode 100644 epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/WxmpMessageController.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/WxmpMessageController.java new file mode 100644 index 0000000000..294f0f5d36 --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/WxmpMessageController.java @@ -0,0 +1,39 @@ +/** + * 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.WxmpMessageService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + + +/** + * 微信消息订阅controller + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-10-21 + */ +@RestController +@RequestMapping("wxmpmessage") +public class WxmpMessageController { + + @Autowired + private WxmpMessageService wxmpMessageService; + +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/WxmpMessageService.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/WxmpMessageService.java new file mode 100644 index 0000000000..ab96dd6f0d --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/WxmpMessageService.java @@ -0,0 +1,28 @@ +/** + * 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; + +/** + * 微信消息订阅Service + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-10-21 + */ +public interface WxmpMessageService { + +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java new file mode 100644 index 0000000000..75b784b5e6 --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java @@ -0,0 +1,35 @@ +/** + * 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.service.WxmpMessageService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Service; + +/** + * 微信消息订阅Service + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-10-21 + */ +@Service +public class WxmpMessageServiceImpl implements WxmpMessageService { + private Logger logger = LoggerFactory.getLogger(getClass()); + +} \ No newline at end of file From 2ee535ddeb9f30c1fd307a60ba5b060d5dbf7bb3 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 21 Oct 2020 15:37:24 +0800 Subject: [PATCH 02/12] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/WxmpMsgSendRecordDTO.java | 116 ++++++++++++++++++ .../epmet/dto/WxmpResiUserSubscribeDTO.java | 101 +++++++++++++++ .../WxmpTemplateMsgSubscribeStatusDTO.java | 106 ++++++++++++++++ .../epmet/dto/WxmpUserSubscribeRecordDTO.java | 106 ++++++++++++++++ .../epmet/dto/WxmpWorkUserSubscribeDTO.java | 101 +++++++++++++++ .../WxmpMsgSendRecordController.java | 94 ++++++++++++++ .../WxmpResiUserSubscribeController.java | 94 ++++++++++++++ ...pTemplateMsgSubscribeStatusController.java | 94 ++++++++++++++ .../WxmpUserSubscribeRecordController.java | 94 ++++++++++++++ .../WxmpWorkUserSubscribeController.java | 94 ++++++++++++++ .../com/epmet/dao/WxmpMsgSendRecordDao.java | 33 +++++ .../epmet/dao/WxmpResiUserSubscribeDao.java | 33 +++++ .../WxmpTemplateMsgSubscribeStatusDao.java | 33 +++++ .../epmet/dao/WxmpUserSubscribeRecordDao.java | 33 +++++ .../epmet/dao/WxmpWorkUserSubscribeDao.java | 33 +++++ .../epmet/entity/WxmpMsgSendRecordEntity.java | 86 +++++++++++++ .../entity/WxmpResiUserSubscribeEntity.java | 71 +++++++++++ .../WxmpTemplateMsgSubscribeStatusEntity.java | 76 ++++++++++++ .../entity/WxmpUserSubscribeRecordEntity.java | 76 ++++++++++++ .../entity/WxmpWorkUserSubscribeEntity.java | 71 +++++++++++ .../epmet/excel/WxmpMsgSendRecordExcel.java | 83 +++++++++++++ .../excel/WxmpResiUserSubscribeExcel.java | 74 +++++++++++ .../WxmpTemplateMsgSubscribeStatusExcel.java | 77 ++++++++++++ .../excel/WxmpUserSubscribeRecordExcel.java | 77 ++++++++++++ .../excel/WxmpWorkUserSubscribeExcel.java | 74 +++++++++++ .../epmet/redis/WxmpMsgSendRecordRedis.java | 47 +++++++ .../redis/WxmpResiUserSubscribeRedis.java | 47 +++++++ .../WxmpTemplateMsgSubscribeStatusRedis.java | 47 +++++++ .../redis/WxmpUserSubscribeRecordRedis.java | 47 +++++++ .../redis/WxmpWorkUserSubscribeRedis.java | 47 +++++++ .../service/WxmpMsgSendRecordService.java | 95 ++++++++++++++ .../service/WxmpResiUserSubscribeService.java | 95 ++++++++++++++ ...WxmpTemplateMsgSubscribeStatusService.java | 95 ++++++++++++++ .../WxmpUserSubscribeRecordService.java | 95 ++++++++++++++ .../service/WxmpWorkUserSubscribeService.java | 95 ++++++++++++++ .../impl/WxmpMsgSendRecordServiceImpl.java | 104 ++++++++++++++++ .../WxmpResiUserSubscribeServiceImpl.java | 104 ++++++++++++++++ ...TemplateMsgSubscribeStatusServiceImpl.java | 104 ++++++++++++++++ .../WxmpUserSubscribeRecordServiceImpl.java | 104 ++++++++++++++++ .../WxmpWorkUserSubscribeServiceImpl.java | 104 ++++++++++++++++ .../resources/mapper/WxmpMsgSendRecordDao.xml | 8 ++ .../mapper/WxmpResiUserSubscribeDao.xml | 8 ++ .../WxmpTemplateMsgSubscribeStatusDao.xml | 8 ++ .../mapper/WxmpUserSubscribeRecordDao.xml | 8 ++ .../mapper/WxmpWorkUserSubscribeDao.xml | 8 ++ 45 files changed, 3200 insertions(+) create mode 100644 epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/WxmpMsgSendRecordDTO.java create mode 100644 epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/WxmpResiUserSubscribeDTO.java create mode 100644 epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/WxmpTemplateMsgSubscribeStatusDTO.java create mode 100644 epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/WxmpUserSubscribeRecordDTO.java create mode 100644 epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/WxmpWorkUserSubscribeDTO.java create mode 100644 epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/WxmpMsgSendRecordController.java create mode 100644 epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/WxmpResiUserSubscribeController.java create mode 100644 epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/WxmpTemplateMsgSubscribeStatusController.java create mode 100644 epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/WxmpUserSubscribeRecordController.java create mode 100644 epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/WxmpWorkUserSubscribeController.java create mode 100644 epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/WxmpMsgSendRecordDao.java create mode 100644 epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/WxmpResiUserSubscribeDao.java create mode 100644 epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/WxmpTemplateMsgSubscribeStatusDao.java create mode 100644 epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/WxmpUserSubscribeRecordDao.java create mode 100644 epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/WxmpWorkUserSubscribeDao.java create mode 100644 epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/WxmpMsgSendRecordEntity.java create mode 100644 epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/WxmpResiUserSubscribeEntity.java create mode 100644 epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/WxmpTemplateMsgSubscribeStatusEntity.java create mode 100644 epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/WxmpUserSubscribeRecordEntity.java create mode 100644 epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/WxmpWorkUserSubscribeEntity.java create mode 100644 epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/excel/WxmpMsgSendRecordExcel.java create mode 100644 epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/excel/WxmpResiUserSubscribeExcel.java create mode 100644 epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/excel/WxmpTemplateMsgSubscribeStatusExcel.java create mode 100644 epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/excel/WxmpUserSubscribeRecordExcel.java create mode 100644 epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/excel/WxmpWorkUserSubscribeExcel.java create mode 100644 epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/redis/WxmpMsgSendRecordRedis.java create mode 100644 epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/redis/WxmpResiUserSubscribeRedis.java create mode 100644 epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/redis/WxmpTemplateMsgSubscribeStatusRedis.java create mode 100644 epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/redis/WxmpUserSubscribeRecordRedis.java create mode 100644 epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/redis/WxmpWorkUserSubscribeRedis.java create mode 100644 epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/WxmpMsgSendRecordService.java create mode 100644 epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/WxmpResiUserSubscribeService.java create mode 100644 epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/WxmpTemplateMsgSubscribeStatusService.java create mode 100644 epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/WxmpUserSubscribeRecordService.java create mode 100644 epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/WxmpWorkUserSubscribeService.java create mode 100644 epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMsgSendRecordServiceImpl.java create mode 100644 epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpResiUserSubscribeServiceImpl.java create mode 100644 epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpTemplateMsgSubscribeStatusServiceImpl.java create mode 100644 epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpUserSubscribeRecordServiceImpl.java create mode 100644 epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpWorkUserSubscribeServiceImpl.java create mode 100644 epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/WxmpMsgSendRecordDao.xml create mode 100644 epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/WxmpResiUserSubscribeDao.xml create mode 100644 epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/WxmpTemplateMsgSubscribeStatusDao.xml create mode 100644 epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/WxmpUserSubscribeRecordDao.xml create mode 100644 epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/WxmpWorkUserSubscribeDao.xml diff --git a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/WxmpMsgSendRecordDTO.java b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/WxmpMsgSendRecordDTO.java new file mode 100644 index 0000000000..875e687b63 --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/WxmpMsgSendRecordDTO.java @@ -0,0 +1,116 @@ +/** + * 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.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 消息发送记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-10-21 + */ +@Data +public class WxmpMsgSendRecordDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户Id 客户Id + */ + private String customerId; + + /** + * 所属端类型 居民端:resi 工作端:work + */ + private String clientType; + + /** + * 消息模板Id 消息模板Id + */ + private String templateId; + + /** + * 用户Id 用户Id + */ + private String userId; + + /** + * openId openId + */ + private String wxOpenId; + + /** + * 行为类型(存title字段的中间值) 入组申请、党员认证等 + */ + private String behaviorType; + + /** + * 消息标题 消息标题 + */ + private String title; + + /** + * 消息内容 消息内容 + */ + private String messageContent; + + /** + * 消息时间 消息时间 + */ + private Date messageTitme; + + /** + * 删除标识 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/WxmpResiUserSubscribeDTO.java b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/WxmpResiUserSubscribeDTO.java new file mode 100644 index 0000000000..e8b2f2a1fb --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/WxmpResiUserSubscribeDTO.java @@ -0,0 +1,101 @@ +/** + * 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.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 居民端用户订阅模板消息次数记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-10-21 + */ +@Data +public class WxmpResiUserSubscribeDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户Id 客户Id + */ + private String customerId; + + /** + * 消息模板Id 消息模板Id + */ + private String templateId; + + /** + * 用户Id 用户Id + */ + private String userId; + + /** + * openId openId + */ + private String wxOpenId; + + /** + * wx订阅状态 订阅状态(订阅:subscribe 取消订阅:unsubscribe) + */ + private String wxSubscribeStatus; + + /** + * 可用推送次数 可用推送次数 + */ + private Integer count; + + /** + * 删除标识 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/WxmpTemplateMsgSubscribeStatusDTO.java b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/WxmpTemplateMsgSubscribeStatusDTO.java new file mode 100644 index 0000000000..00dc07a199 --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/WxmpTemplateMsgSubscribeStatusDTO.java @@ -0,0 +1,106 @@ +/** + * 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.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 用户模板消息订阅授权状态表(记录我们自己和微信的授权页用户勾选的状态) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-10-21 + */ +@Data +public class WxmpTemplateMsgSubscribeStatusDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户Id 客户Id + */ + private String customerId; + + /** + * 所属端类型 居民端:resi 工作端:work + */ + private String clientType; + + /** + * 用户Id 用户Id + */ + private String userId; + + /** + * 是否总是访问 是:yes 否:no + */ + private String alwaysVisit; + + /** + * 订阅状态 订阅状态(订阅:subscribe 取消订阅:unsubscribe) + */ + private String subscribeStatus; + + /** + * wx是否总是访问 是:yes 否:no + */ + private String wxAlwaysVisit; + + /** + * wx订阅状态 订阅状态(订阅:subscribe 取消订阅:unsubscribe) + */ + private String wxSubscribeStatus; + + /** + * 删除标识 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/WxmpUserSubscribeRecordDTO.java b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/WxmpUserSubscribeRecordDTO.java new file mode 100644 index 0000000000..901023e9ea --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/WxmpUserSubscribeRecordDTO.java @@ -0,0 +1,106 @@ +/** + * 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.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 用户触发订阅的行为记录表(同时记录微信授权页每次勾选的状态) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-10-21 + */ +@Data +public class WxmpUserSubscribeRecordDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户Id 客户Id + */ + private String customerId; + + /** + * 消息模板Id 消息模板Id + */ + private String templateId; + + /** + * 用户Id 用户Id + */ + private String userId; + + /** + * openId openId + */ + private String wxOpenId; + + /** + * 行为类型(存title字段的中间值) 入组申请、党员认证等 + */ + private String behaviorType; + + /** + * wx是否总是访问 是:yes 否:no + */ + private String wxAlwaysVisit; + + /** + * wx订阅状态 订阅状态(订阅:subscribe 取消订阅:unsubscribe) + */ + private String wxSubscribeStatus; + + /** + * 删除标识 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/WxmpWorkUserSubscribeDTO.java b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/WxmpWorkUserSubscribeDTO.java new file mode 100644 index 0000000000..632c9ecf84 --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/WxmpWorkUserSubscribeDTO.java @@ -0,0 +1,101 @@ +/** + * 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.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 工作端用户订阅模板消息有效次数记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-10-21 + */ +@Data +public class WxmpWorkUserSubscribeDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户Id 客户Id + */ + private String customerId; + + /** + * 消息模板Id 消息模板Id + */ + private String templateId; + + /** + * 用户Id 用户Id + */ + private String userId; + + /** + * openId openId + */ + private String wxOpenId; + + /** + * wx订阅状态 订阅状态(订阅:subscribe 取消订阅:unsubscribe) + */ + private String wxSubscribeStatus; + + /** + * 可用推送次数 可用推送次数 + */ + private Integer count; + + /** + * 删除标识 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/WxmpMsgSendRecordController.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/WxmpMsgSendRecordController.java new file mode 100644 index 0000000000..ad71a5db81 --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/WxmpMsgSendRecordController.java @@ -0,0 +1,94 @@ +/** + * 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.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.WxmpMsgSendRecordDTO; +import com.epmet.excel.WxmpMsgSendRecordExcel; +import com.epmet.service.WxmpMsgSendRecordService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 消息发送记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-10-21 + */ +@RestController +@RequestMapping("wxmpmsgsendrecord") +public class WxmpMsgSendRecordController { + + @Autowired + private WxmpMsgSendRecordService wxmpMsgSendRecordService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = wxmpMsgSendRecordService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + WxmpMsgSendRecordDTO data = wxmpMsgSendRecordService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody WxmpMsgSendRecordDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + wxmpMsgSendRecordService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody WxmpMsgSendRecordDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + wxmpMsgSendRecordService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + wxmpMsgSendRecordService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = wxmpMsgSendRecordService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, WxmpMsgSendRecordExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/WxmpResiUserSubscribeController.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/WxmpResiUserSubscribeController.java new file mode 100644 index 0000000000..e4c38f9478 --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/WxmpResiUserSubscribeController.java @@ -0,0 +1,94 @@ +/** + * 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.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.WxmpResiUserSubscribeDTO; +import com.epmet.excel.WxmpResiUserSubscribeExcel; +import com.epmet.service.WxmpResiUserSubscribeService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 居民端用户订阅模板消息次数记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-10-21 + */ +@RestController +@RequestMapping("wxmpresiusersubscribe") +public class WxmpResiUserSubscribeController { + + @Autowired + private WxmpResiUserSubscribeService wxmpResiUserSubscribeService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = wxmpResiUserSubscribeService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + WxmpResiUserSubscribeDTO data = wxmpResiUserSubscribeService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody WxmpResiUserSubscribeDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + wxmpResiUserSubscribeService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody WxmpResiUserSubscribeDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + wxmpResiUserSubscribeService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + wxmpResiUserSubscribeService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = wxmpResiUserSubscribeService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, WxmpResiUserSubscribeExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/WxmpTemplateMsgSubscribeStatusController.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/WxmpTemplateMsgSubscribeStatusController.java new file mode 100644 index 0000000000..a80fd35b58 --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/WxmpTemplateMsgSubscribeStatusController.java @@ -0,0 +1,94 @@ +/** + * 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.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.WxmpTemplateMsgSubscribeStatusDTO; +import com.epmet.excel.WxmpTemplateMsgSubscribeStatusExcel; +import com.epmet.service.WxmpTemplateMsgSubscribeStatusService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 用户模板消息订阅授权状态表(记录我们自己和微信的授权页用户勾选的状态) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-10-21 + */ +@RestController +@RequestMapping("wxmptemplatemsgsubscribestatus") +public class WxmpTemplateMsgSubscribeStatusController { + + @Autowired + private WxmpTemplateMsgSubscribeStatusService wxmpTemplateMsgSubscribeStatusService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = wxmpTemplateMsgSubscribeStatusService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + WxmpTemplateMsgSubscribeStatusDTO data = wxmpTemplateMsgSubscribeStatusService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody WxmpTemplateMsgSubscribeStatusDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + wxmpTemplateMsgSubscribeStatusService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody WxmpTemplateMsgSubscribeStatusDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + wxmpTemplateMsgSubscribeStatusService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + wxmpTemplateMsgSubscribeStatusService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = wxmpTemplateMsgSubscribeStatusService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, WxmpTemplateMsgSubscribeStatusExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/WxmpUserSubscribeRecordController.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/WxmpUserSubscribeRecordController.java new file mode 100644 index 0000000000..e30eace2f5 --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/WxmpUserSubscribeRecordController.java @@ -0,0 +1,94 @@ +/** + * 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.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.WxmpUserSubscribeRecordDTO; +import com.epmet.excel.WxmpUserSubscribeRecordExcel; +import com.epmet.service.WxmpUserSubscribeRecordService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 用户触发订阅的行为记录表(同时记录微信授权页每次勾选的状态) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-10-21 + */ +@RestController +@RequestMapping("wxmpusersubscriberecord") +public class WxmpUserSubscribeRecordController { + + @Autowired + private WxmpUserSubscribeRecordService wxmpUserSubscribeRecordService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = wxmpUserSubscribeRecordService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + WxmpUserSubscribeRecordDTO data = wxmpUserSubscribeRecordService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody WxmpUserSubscribeRecordDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + wxmpUserSubscribeRecordService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody WxmpUserSubscribeRecordDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + wxmpUserSubscribeRecordService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + wxmpUserSubscribeRecordService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = wxmpUserSubscribeRecordService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, WxmpUserSubscribeRecordExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/WxmpWorkUserSubscribeController.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/WxmpWorkUserSubscribeController.java new file mode 100644 index 0000000000..be838ea49d --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/WxmpWorkUserSubscribeController.java @@ -0,0 +1,94 @@ +/** + * 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.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ExcelUtils; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.AssertUtils; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.WxmpWorkUserSubscribeDTO; +import com.epmet.excel.WxmpWorkUserSubscribeExcel; +import com.epmet.service.WxmpWorkUserSubscribeService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 工作端用户订阅模板消息有效次数记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-10-21 + */ +@RestController +@RequestMapping("wxmpworkusersubscribe") +public class WxmpWorkUserSubscribeController { + + @Autowired + private WxmpWorkUserSubscribeService wxmpWorkUserSubscribeService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = wxmpWorkUserSubscribeService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + WxmpWorkUserSubscribeDTO data = wxmpWorkUserSubscribeService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody WxmpWorkUserSubscribeDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + wxmpWorkUserSubscribeService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody WxmpWorkUserSubscribeDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + wxmpWorkUserSubscribeService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + wxmpWorkUserSubscribeService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = wxmpWorkUserSubscribeService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, WxmpWorkUserSubscribeExcel.class); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/WxmpMsgSendRecordDao.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/WxmpMsgSendRecordDao.java new file mode 100644 index 0000000000..e20aa97fd6 --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/WxmpMsgSendRecordDao.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.WxmpMsgSendRecordEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 消息发送记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-10-21 + */ +@Mapper +public interface WxmpMsgSendRecordDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/WxmpResiUserSubscribeDao.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/WxmpResiUserSubscribeDao.java new file mode 100644 index 0000000000..5a26cc19f7 --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/WxmpResiUserSubscribeDao.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.WxmpResiUserSubscribeEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 居民端用户订阅模板消息次数记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-10-21 + */ +@Mapper +public interface WxmpResiUserSubscribeDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/WxmpTemplateMsgSubscribeStatusDao.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/WxmpTemplateMsgSubscribeStatusDao.java new file mode 100644 index 0000000000..9f99225746 --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/WxmpTemplateMsgSubscribeStatusDao.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.WxmpTemplateMsgSubscribeStatusEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 用户模板消息订阅授权状态表(记录我们自己和微信的授权页用户勾选的状态) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-10-21 + */ +@Mapper +public interface WxmpTemplateMsgSubscribeStatusDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/WxmpUserSubscribeRecordDao.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/WxmpUserSubscribeRecordDao.java new file mode 100644 index 0000000000..75a67bf727 --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/WxmpUserSubscribeRecordDao.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.WxmpUserSubscribeRecordEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 用户触发订阅的行为记录表(同时记录微信授权页每次勾选的状态) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-10-21 + */ +@Mapper +public interface WxmpUserSubscribeRecordDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/WxmpWorkUserSubscribeDao.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/WxmpWorkUserSubscribeDao.java new file mode 100644 index 0000000000..81a2659e04 --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/WxmpWorkUserSubscribeDao.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.WxmpWorkUserSubscribeEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 工作端用户订阅模板消息有效次数记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-10-21 + */ +@Mapper +public interface WxmpWorkUserSubscribeDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/WxmpMsgSendRecordEntity.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/WxmpMsgSendRecordEntity.java new file mode 100644 index 0000000000..e802097c68 --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/WxmpMsgSendRecordEntity.java @@ -0,0 +1,86 @@ +/** + * 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 2020-10-21 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("wxmp_msg_send_record") +public class WxmpMsgSendRecordEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id 客户Id + */ + private String customerId; + + /** + * 所属端类型 居民端:resi 工作端:work + */ + private String clientType; + + /** + * 消息模板Id 消息模板Id + */ + private String templateId; + + /** + * 用户Id 用户Id + */ + private String userId; + + /** + * openId openId + */ + private String wxOpenId; + + /** + * 行为类型(存title字段的中间值) 入组申请、党员认证等 + */ + private String behaviorType; + + /** + * 消息标题 消息标题 + */ + private String title; + + /** + * 消息内容 消息内容 + */ + private String messageContent; + + /** + * 消息时间 消息时间 + */ + private Date messageTitme; + +} diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/WxmpResiUserSubscribeEntity.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/WxmpResiUserSubscribeEntity.java new file mode 100644 index 0000000000..cff96c779d --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/WxmpResiUserSubscribeEntity.java @@ -0,0 +1,71 @@ +/** + * 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 2020-10-21 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("wxmp_resi_user_subscribe") +public class WxmpResiUserSubscribeEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id 客户Id + */ + private String customerId; + + /** + * 消息模板Id 消息模板Id + */ + private String templateId; + + /** + * 用户Id 用户Id + */ + private String userId; + + /** + * openId openId + */ + private String wxOpenId; + + /** + * wx订阅状态 订阅状态(订阅:subscribe 取消订阅:unsubscribe) + */ + private String wxSubscribeStatus; + + /** + * 可用推送次数 可用推送次数 + */ + private Integer count; + +} diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/WxmpTemplateMsgSubscribeStatusEntity.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/WxmpTemplateMsgSubscribeStatusEntity.java new file mode 100644 index 0000000000..991ed157f1 --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/WxmpTemplateMsgSubscribeStatusEntity.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 2020-10-21 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("wxmp_template_msg_subscribe_status") +public class WxmpTemplateMsgSubscribeStatusEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id 客户Id + */ + private String customerId; + + /** + * 所属端类型 居民端:resi 工作端:work + */ + private String clientType; + + /** + * 用户Id 用户Id + */ + private String userId; + + /** + * 是否总是访问 是:yes 否:no + */ + private String alwaysVisit; + + /** + * 订阅状态 订阅状态(订阅:subscribe 取消订阅:unsubscribe) + */ + private String subscribeStatus; + + /** + * wx是否总是访问 是:yes 否:no + */ + private String wxAlwaysVisit; + + /** + * wx订阅状态 订阅状态(订阅:subscribe 取消订阅:unsubscribe) + */ + private String wxSubscribeStatus; + +} diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/WxmpUserSubscribeRecordEntity.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/WxmpUserSubscribeRecordEntity.java new file mode 100644 index 0000000000..8d40463334 --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/WxmpUserSubscribeRecordEntity.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 2020-10-21 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("wxmp_user_subscribe_record") +public class WxmpUserSubscribeRecordEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id 客户Id + */ + private String customerId; + + /** + * 消息模板Id 消息模板Id + */ + private String templateId; + + /** + * 用户Id 用户Id + */ + private String userId; + + /** + * openId openId + */ + private String wxOpenId; + + /** + * 行为类型(存title字段的中间值) 入组申请、党员认证等 + */ + private String behaviorType; + + /** + * wx是否总是访问 是:yes 否:no + */ + private String wxAlwaysVisit; + + /** + * wx订阅状态 订阅状态(订阅:subscribe 取消订阅:unsubscribe) + */ + private String wxSubscribeStatus; + +} diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/WxmpWorkUserSubscribeEntity.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/WxmpWorkUserSubscribeEntity.java new file mode 100644 index 0000000000..124a450386 --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/WxmpWorkUserSubscribeEntity.java @@ -0,0 +1,71 @@ +/** + * 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 2020-10-21 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("wxmp_work_user_subscribe") +public class WxmpWorkUserSubscribeEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id 客户Id + */ + private String customerId; + + /** + * 消息模板Id 消息模板Id + */ + private String templateId; + + /** + * 用户Id 用户Id + */ + private String userId; + + /** + * openId openId + */ + private String wxOpenId; + + /** + * wx订阅状态 订阅状态(订阅:subscribe 取消订阅:unsubscribe) + */ + private String wxSubscribeStatus; + + /** + * 可用推送次数 可用推送次数 + */ + private Integer count; + +} diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/excel/WxmpMsgSendRecordExcel.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/excel/WxmpMsgSendRecordExcel.java new file mode 100644 index 0000000000..10d4a9c837 --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/excel/WxmpMsgSendRecordExcel.java @@ -0,0 +1,83 @@ +/** + * 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.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 消息发送记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-10-21 + */ +@Data +public class WxmpMsgSendRecordExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "客户Id 客户Id") + private String customerId; + + @Excel(name = "所属端类型 居民端:resi 工作端:work") + private String clientType; + + @Excel(name = "消息模板Id 消息模板Id") + private String templateId; + + @Excel(name = "用户Id 用户Id") + private String userId; + + @Excel(name = "openId openId") + private String wxOpenId; + + @Excel(name = "行为类型(存title字段的中间值) 入组申请、党员认证等") + private String behaviorType; + + @Excel(name = "消息标题 消息标题") + private String title; + + @Excel(name = "消息内容 消息内容") + private String messageContent; + + @Excel(name = "消息时间 消息时间") + private Date messageTitme; + + @Excel(name = "删除标识") + private Integer delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/excel/WxmpResiUserSubscribeExcel.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/excel/WxmpResiUserSubscribeExcel.java new file mode 100644 index 0000000000..b72c75dd7f --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/excel/WxmpResiUserSubscribeExcel.java @@ -0,0 +1,74 @@ +/** + * 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.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 居民端用户订阅模板消息次数记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-10-21 + */ +@Data +public class WxmpResiUserSubscribeExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "客户Id 客户Id") + private String customerId; + + @Excel(name = "消息模板Id 消息模板Id") + private String templateId; + + @Excel(name = "用户Id 用户Id") + private String userId; + + @Excel(name = "openId openId") + private String wxOpenId; + + @Excel(name = "wx订阅状态 订阅状态(订阅:subscribe 取消订阅:unsubscribe)") + private String wxSubscribeStatus; + + @Excel(name = "可用推送次数 可用推送次数") + private Integer count; + + @Excel(name = "删除标识") + private Integer delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/excel/WxmpTemplateMsgSubscribeStatusExcel.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/excel/WxmpTemplateMsgSubscribeStatusExcel.java new file mode 100644 index 0000000000..7c39312da3 --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/excel/WxmpTemplateMsgSubscribeStatusExcel.java @@ -0,0 +1,77 @@ +/** + * 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.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 用户模板消息订阅授权状态表(记录我们自己和微信的授权页用户勾选的状态) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-10-21 + */ +@Data +public class WxmpTemplateMsgSubscribeStatusExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "客户Id 客户Id") + private String customerId; + + @Excel(name = "所属端类型 居民端:resi 工作端:work") + private String clientType; + + @Excel(name = "用户Id 用户Id") + private String userId; + + @Excel(name = "是否总是访问 是:yes 否:no") + private String alwaysVisit; + + @Excel(name = "订阅状态 订阅状态(订阅:subscribe 取消订阅:unsubscribe)") + private String subscribeStatus; + + @Excel(name = "wx是否总是访问 是:yes 否:no") + private String wxAlwaysVisit; + + @Excel(name = "wx订阅状态 订阅状态(订阅:subscribe 取消订阅:unsubscribe)") + private String wxSubscribeStatus; + + @Excel(name = "删除标识") + private Integer delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/excel/WxmpUserSubscribeRecordExcel.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/excel/WxmpUserSubscribeRecordExcel.java new file mode 100644 index 0000000000..b52a82b5cf --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/excel/WxmpUserSubscribeRecordExcel.java @@ -0,0 +1,77 @@ +/** + * 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.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 用户触发订阅的行为记录表(同时记录微信授权页每次勾选的状态) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-10-21 + */ +@Data +public class WxmpUserSubscribeRecordExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "客户Id 客户Id") + private String customerId; + + @Excel(name = "消息模板Id 消息模板Id") + private String templateId; + + @Excel(name = "用户Id 用户Id") + private String userId; + + @Excel(name = "openId openId") + private String wxOpenId; + + @Excel(name = "行为类型(存title字段的中间值) 入组申请、党员认证等") + private String behaviorType; + + @Excel(name = "wx是否总是访问 是:yes 否:no") + private String wxAlwaysVisit; + + @Excel(name = "wx订阅状态 订阅状态(订阅:subscribe 取消订阅:unsubscribe)") + private String wxSubscribeStatus; + + @Excel(name = "删除标识") + private Integer delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/excel/WxmpWorkUserSubscribeExcel.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/excel/WxmpWorkUserSubscribeExcel.java new file mode 100644 index 0000000000..7397f5dfa3 --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/excel/WxmpWorkUserSubscribeExcel.java @@ -0,0 +1,74 @@ +/** + * 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.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 工作端用户订阅模板消息有效次数记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-10-21 + */ +@Data +public class WxmpWorkUserSubscribeExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "客户Id 客户Id") + private String customerId; + + @Excel(name = "消息模板Id 消息模板Id") + private String templateId; + + @Excel(name = "用户Id 用户Id") + private String userId; + + @Excel(name = "openId openId") + private String wxOpenId; + + @Excel(name = "wx订阅状态 订阅状态(订阅:subscribe 取消订阅:unsubscribe)") + private String wxSubscribeStatus; + + @Excel(name = "可用推送次数 可用推送次数") + private Integer count; + + @Excel(name = "删除标识") + private Integer delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/redis/WxmpMsgSendRecordRedis.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/redis/WxmpMsgSendRecordRedis.java new file mode 100644 index 0000000000..68ba610368 --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/redis/WxmpMsgSendRecordRedis.java @@ -0,0 +1,47 @@ +/** + * 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.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 消息发送记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-10-21 + */ +@Component +public class WxmpMsgSendRecordRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/redis/WxmpResiUserSubscribeRedis.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/redis/WxmpResiUserSubscribeRedis.java new file mode 100644 index 0000000000..ee0081e5db --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/redis/WxmpResiUserSubscribeRedis.java @@ -0,0 +1,47 @@ +/** + * 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.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 居民端用户订阅模板消息次数记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-10-21 + */ +@Component +public class WxmpResiUserSubscribeRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/redis/WxmpTemplateMsgSubscribeStatusRedis.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/redis/WxmpTemplateMsgSubscribeStatusRedis.java new file mode 100644 index 0000000000..67de7a368b --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/redis/WxmpTemplateMsgSubscribeStatusRedis.java @@ -0,0 +1,47 @@ +/** + * 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.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 用户模板消息订阅授权状态表(记录我们自己和微信的授权页用户勾选的状态) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-10-21 + */ +@Component +public class WxmpTemplateMsgSubscribeStatusRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/redis/WxmpUserSubscribeRecordRedis.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/redis/WxmpUserSubscribeRecordRedis.java new file mode 100644 index 0000000000..6cf0c8eb72 --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/redis/WxmpUserSubscribeRecordRedis.java @@ -0,0 +1,47 @@ +/** + * 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.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 用户触发订阅的行为记录表(同时记录微信授权页每次勾选的状态) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-10-21 + */ +@Component +public class WxmpUserSubscribeRecordRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/redis/WxmpWorkUserSubscribeRedis.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/redis/WxmpWorkUserSubscribeRedis.java new file mode 100644 index 0000000000..f6cfcea0c2 --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/redis/WxmpWorkUserSubscribeRedis.java @@ -0,0 +1,47 @@ +/** + * 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.redis; + +import com.epmet.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 工作端用户订阅模板消息有效次数记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-10-21 + */ +@Component +public class WxmpWorkUserSubscribeRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/WxmpMsgSendRecordService.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/WxmpMsgSendRecordService.java new file mode 100644 index 0000000000..54dead18cc --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/WxmpMsgSendRecordService.java @@ -0,0 +1,95 @@ +/** + * 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.commons.tools.page.PageData; +import com.epmet.dto.WxmpMsgSendRecordDTO; +import com.epmet.entity.WxmpMsgSendRecordEntity; + +import java.util.List; +import java.util.Map; + +/** + * 消息发送记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-10-21 + */ +public interface WxmpMsgSendRecordService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-10-21 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-10-21 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return WxmpMsgSendRecordDTO + * @author generator + * @date 2020-10-21 + */ + WxmpMsgSendRecordDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-10-21 + */ + void save(WxmpMsgSendRecordDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-10-21 + */ + void update(WxmpMsgSendRecordDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-10-21 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/WxmpResiUserSubscribeService.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/WxmpResiUserSubscribeService.java new file mode 100644 index 0000000000..b1eb19fc27 --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/WxmpResiUserSubscribeService.java @@ -0,0 +1,95 @@ +/** + * 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.commons.tools.page.PageData; +import com.epmet.dto.WxmpResiUserSubscribeDTO; +import com.epmet.entity.WxmpResiUserSubscribeEntity; + +import java.util.List; +import java.util.Map; + +/** + * 居民端用户订阅模板消息次数记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-10-21 + */ +public interface WxmpResiUserSubscribeService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-10-21 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-10-21 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return WxmpResiUserSubscribeDTO + * @author generator + * @date 2020-10-21 + */ + WxmpResiUserSubscribeDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-10-21 + */ + void save(WxmpResiUserSubscribeDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-10-21 + */ + void update(WxmpResiUserSubscribeDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-10-21 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/WxmpTemplateMsgSubscribeStatusService.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/WxmpTemplateMsgSubscribeStatusService.java new file mode 100644 index 0000000000..c719aa0c9b --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/WxmpTemplateMsgSubscribeStatusService.java @@ -0,0 +1,95 @@ +/** + * 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.commons.tools.page.PageData; +import com.epmet.dto.WxmpTemplateMsgSubscribeStatusDTO; +import com.epmet.entity.WxmpTemplateMsgSubscribeStatusEntity; + +import java.util.List; +import java.util.Map; + +/** + * 用户模板消息订阅授权状态表(记录我们自己和微信的授权页用户勾选的状态) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-10-21 + */ +public interface WxmpTemplateMsgSubscribeStatusService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-10-21 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-10-21 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return WxmpTemplateMsgSubscribeStatusDTO + * @author generator + * @date 2020-10-21 + */ + WxmpTemplateMsgSubscribeStatusDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-10-21 + */ + void save(WxmpTemplateMsgSubscribeStatusDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-10-21 + */ + void update(WxmpTemplateMsgSubscribeStatusDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-10-21 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/WxmpUserSubscribeRecordService.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/WxmpUserSubscribeRecordService.java new file mode 100644 index 0000000000..eda8ee4a3f --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/WxmpUserSubscribeRecordService.java @@ -0,0 +1,95 @@ +/** + * 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.commons.tools.page.PageData; +import com.epmet.dto.WxmpUserSubscribeRecordDTO; +import com.epmet.entity.WxmpUserSubscribeRecordEntity; + +import java.util.List; +import java.util.Map; + +/** + * 用户触发订阅的行为记录表(同时记录微信授权页每次勾选的状态) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-10-21 + */ +public interface WxmpUserSubscribeRecordService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-10-21 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-10-21 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return WxmpUserSubscribeRecordDTO + * @author generator + * @date 2020-10-21 + */ + WxmpUserSubscribeRecordDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-10-21 + */ + void save(WxmpUserSubscribeRecordDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-10-21 + */ + void update(WxmpUserSubscribeRecordDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-10-21 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/WxmpWorkUserSubscribeService.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/WxmpWorkUserSubscribeService.java new file mode 100644 index 0000000000..60c482cd2e --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/WxmpWorkUserSubscribeService.java @@ -0,0 +1,95 @@ +/** + * 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.commons.tools.page.PageData; +import com.epmet.dto.WxmpWorkUserSubscribeDTO; +import com.epmet.entity.WxmpWorkUserSubscribeEntity; + +import java.util.List; +import java.util.Map; + +/** + * 工作端用户订阅模板消息有效次数记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-10-21 + */ +public interface WxmpWorkUserSubscribeService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-10-21 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-10-21 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return WxmpWorkUserSubscribeDTO + * @author generator + * @date 2020-10-21 + */ + WxmpWorkUserSubscribeDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-10-21 + */ + void save(WxmpWorkUserSubscribeDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-10-21 + */ + void update(WxmpWorkUserSubscribeDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-10-21 + */ + void delete(String[] ids); +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMsgSendRecordServiceImpl.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMsgSendRecordServiceImpl.java new file mode 100644 index 0000000000..5bd33aa047 --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMsgSendRecordServiceImpl.java @@ -0,0 +1,104 @@ +/** + * 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.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.WxmpMsgSendRecordDao; +import com.epmet.dto.WxmpMsgSendRecordDTO; +import com.epmet.entity.WxmpMsgSendRecordEntity; +import com.epmet.redis.WxmpMsgSendRecordRedis; +import com.epmet.service.WxmpMsgSendRecordService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 消息发送记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-10-21 + */ +@Service +public class WxmpMsgSendRecordServiceImpl extends BaseServiceImpl implements WxmpMsgSendRecordService { + + @Autowired + private WxmpMsgSendRecordRedis wxmpMsgSendRecordRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, WxmpMsgSendRecordDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, WxmpMsgSendRecordDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public WxmpMsgSendRecordDTO get(String id) { + WxmpMsgSendRecordEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, WxmpMsgSendRecordDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(WxmpMsgSendRecordDTO dto) { + WxmpMsgSendRecordEntity entity = ConvertUtils.sourceToTarget(dto, WxmpMsgSendRecordEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(WxmpMsgSendRecordDTO dto) { + WxmpMsgSendRecordEntity entity = ConvertUtils.sourceToTarget(dto, WxmpMsgSendRecordEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpResiUserSubscribeServiceImpl.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpResiUserSubscribeServiceImpl.java new file mode 100644 index 0000000000..2c317e037b --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpResiUserSubscribeServiceImpl.java @@ -0,0 +1,104 @@ +/** + * 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.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.WxmpResiUserSubscribeDao; +import com.epmet.dto.WxmpResiUserSubscribeDTO; +import com.epmet.entity.WxmpResiUserSubscribeEntity; +import com.epmet.redis.WxmpResiUserSubscribeRedis; +import com.epmet.service.WxmpResiUserSubscribeService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 居民端用户订阅模板消息次数记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-10-21 + */ +@Service +public class WxmpResiUserSubscribeServiceImpl extends BaseServiceImpl implements WxmpResiUserSubscribeService { + + @Autowired + private WxmpResiUserSubscribeRedis wxmpResiUserSubscribeRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, WxmpResiUserSubscribeDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, WxmpResiUserSubscribeDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public WxmpResiUserSubscribeDTO get(String id) { + WxmpResiUserSubscribeEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, WxmpResiUserSubscribeDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(WxmpResiUserSubscribeDTO dto) { + WxmpResiUserSubscribeEntity entity = ConvertUtils.sourceToTarget(dto, WxmpResiUserSubscribeEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(WxmpResiUserSubscribeDTO dto) { + WxmpResiUserSubscribeEntity entity = ConvertUtils.sourceToTarget(dto, WxmpResiUserSubscribeEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpTemplateMsgSubscribeStatusServiceImpl.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpTemplateMsgSubscribeStatusServiceImpl.java new file mode 100644 index 0000000000..5ea81bdd63 --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpTemplateMsgSubscribeStatusServiceImpl.java @@ -0,0 +1,104 @@ +/** + * 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.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.WxmpTemplateMsgSubscribeStatusDao; +import com.epmet.dto.WxmpTemplateMsgSubscribeStatusDTO; +import com.epmet.entity.WxmpTemplateMsgSubscribeStatusEntity; +import com.epmet.redis.WxmpTemplateMsgSubscribeStatusRedis; +import com.epmet.service.WxmpTemplateMsgSubscribeStatusService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 用户模板消息订阅授权状态表(记录我们自己和微信的授权页用户勾选的状态) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-10-21 + */ +@Service +public class WxmpTemplateMsgSubscribeStatusServiceImpl extends BaseServiceImpl implements WxmpTemplateMsgSubscribeStatusService { + + @Autowired + private WxmpTemplateMsgSubscribeStatusRedis wxmpTemplateMsgSubscribeStatusRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, WxmpTemplateMsgSubscribeStatusDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, WxmpTemplateMsgSubscribeStatusDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public WxmpTemplateMsgSubscribeStatusDTO get(String id) { + WxmpTemplateMsgSubscribeStatusEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, WxmpTemplateMsgSubscribeStatusDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(WxmpTemplateMsgSubscribeStatusDTO dto) { + WxmpTemplateMsgSubscribeStatusEntity entity = ConvertUtils.sourceToTarget(dto, WxmpTemplateMsgSubscribeStatusEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(WxmpTemplateMsgSubscribeStatusDTO dto) { + WxmpTemplateMsgSubscribeStatusEntity entity = ConvertUtils.sourceToTarget(dto, WxmpTemplateMsgSubscribeStatusEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpUserSubscribeRecordServiceImpl.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpUserSubscribeRecordServiceImpl.java new file mode 100644 index 0000000000..9326681fe4 --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpUserSubscribeRecordServiceImpl.java @@ -0,0 +1,104 @@ +/** + * 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.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.WxmpUserSubscribeRecordDao; +import com.epmet.dto.WxmpUserSubscribeRecordDTO; +import com.epmet.entity.WxmpUserSubscribeRecordEntity; +import com.epmet.redis.WxmpUserSubscribeRecordRedis; +import com.epmet.service.WxmpUserSubscribeRecordService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 用户触发订阅的行为记录表(同时记录微信授权页每次勾选的状态) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-10-21 + */ +@Service +public class WxmpUserSubscribeRecordServiceImpl extends BaseServiceImpl implements WxmpUserSubscribeRecordService { + + @Autowired + private WxmpUserSubscribeRecordRedis wxmpUserSubscribeRecordRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, WxmpUserSubscribeRecordDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, WxmpUserSubscribeRecordDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public WxmpUserSubscribeRecordDTO get(String id) { + WxmpUserSubscribeRecordEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, WxmpUserSubscribeRecordDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(WxmpUserSubscribeRecordDTO dto) { + WxmpUserSubscribeRecordEntity entity = ConvertUtils.sourceToTarget(dto, WxmpUserSubscribeRecordEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(WxmpUserSubscribeRecordDTO dto) { + WxmpUserSubscribeRecordEntity entity = ConvertUtils.sourceToTarget(dto, WxmpUserSubscribeRecordEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpWorkUserSubscribeServiceImpl.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpWorkUserSubscribeServiceImpl.java new file mode 100644 index 0000000000..93a3ad4147 --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpWorkUserSubscribeServiceImpl.java @@ -0,0 +1,104 @@ +/** + * 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.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.WxmpWorkUserSubscribeDao; +import com.epmet.dto.WxmpWorkUserSubscribeDTO; +import com.epmet.entity.WxmpWorkUserSubscribeEntity; +import com.epmet.redis.WxmpWorkUserSubscribeRedis; +import com.epmet.service.WxmpWorkUserSubscribeService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 工作端用户订阅模板消息有效次数记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-10-21 + */ +@Service +public class WxmpWorkUserSubscribeServiceImpl extends BaseServiceImpl implements WxmpWorkUserSubscribeService { + + @Autowired + private WxmpWorkUserSubscribeRedis wxmpWorkUserSubscribeRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, WxmpWorkUserSubscribeDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, WxmpWorkUserSubscribeDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public WxmpWorkUserSubscribeDTO get(String id) { + WxmpWorkUserSubscribeEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, WxmpWorkUserSubscribeDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(WxmpWorkUserSubscribeDTO dto) { + WxmpWorkUserSubscribeEntity entity = ConvertUtils.sourceToTarget(dto, WxmpWorkUserSubscribeEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(WxmpWorkUserSubscribeDTO dto) { + WxmpWorkUserSubscribeEntity entity = ConvertUtils.sourceToTarget(dto, WxmpWorkUserSubscribeEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/WxmpMsgSendRecordDao.xml b/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/WxmpMsgSendRecordDao.xml new file mode 100644 index 0000000000..545ee0dba3 --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/WxmpMsgSendRecordDao.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/WxmpResiUserSubscribeDao.xml b/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/WxmpResiUserSubscribeDao.xml new file mode 100644 index 0000000000..83ba28d09d --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/WxmpResiUserSubscribeDao.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/WxmpTemplateMsgSubscribeStatusDao.xml b/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/WxmpTemplateMsgSubscribeStatusDao.xml new file mode 100644 index 0000000000..b226ddb20a --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/WxmpTemplateMsgSubscribeStatusDao.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/WxmpUserSubscribeRecordDao.xml b/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/WxmpUserSubscribeRecordDao.xml new file mode 100644 index 0000000000..042c8f94a0 --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/WxmpUserSubscribeRecordDao.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/WxmpWorkUserSubscribeDao.xml b/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/WxmpWorkUserSubscribeDao.xml new file mode 100644 index 0000000000..608e32e0c5 --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/WxmpWorkUserSubscribeDao.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file From 20e06e71769ac8aabc81159a32de693e1d6d32fd Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 21 Oct 2020 16:51:38 +0800 Subject: [PATCH 03/12] =?UTF-8?q?=E6=B6=88=E6=81=AF=E5=8F=91=E9=80=81?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E8=A1=A8=E6=96=B0=E5=A2=9E=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/dto/WxmpMsgSendRecordDTO.java | 10 ++++++++++ .../java/com/epmet/entity/WxmpMsgSendRecordEntity.java | 10 ++++++++++ .../java/com/epmet/excel/WxmpMsgSendRecordExcel.java | 6 ++++++ 3 files changed, 26 insertions(+) diff --git a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/WxmpMsgSendRecordDTO.java b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/WxmpMsgSendRecordDTO.java index 875e687b63..20d23aab47 100644 --- a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/WxmpMsgSendRecordDTO.java +++ b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/WxmpMsgSendRecordDTO.java @@ -83,6 +83,16 @@ public class WxmpMsgSendRecordDTO implements Serializable { */ private Date messageTitme; + /** + * 发送结果(成功:success 失败:error) + */ + private String result; + + /** + * 发送失败的原因,成功可以不记录 + */ + private String reason; + /** * 删除标识 */ diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/WxmpMsgSendRecordEntity.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/WxmpMsgSendRecordEntity.java index e802097c68..d7242fb4b8 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/WxmpMsgSendRecordEntity.java +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/entity/WxmpMsgSendRecordEntity.java @@ -83,4 +83,14 @@ public class WxmpMsgSendRecordEntity extends BaseEpmetEntity { */ private Date messageTitme; + /** + * 发送结果(成功:success 失败:error) + */ + private String result; + + /** + * 发送失败的原因,成功可以不记录 + */ + private String reason; + } diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/excel/WxmpMsgSendRecordExcel.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/excel/WxmpMsgSendRecordExcel.java index 10d4a9c837..cbe9ad4435 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/excel/WxmpMsgSendRecordExcel.java +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/excel/WxmpMsgSendRecordExcel.java @@ -61,6 +61,12 @@ public class WxmpMsgSendRecordExcel { @Excel(name = "消息时间 消息时间") private Date messageTitme; + @Excel(name = "发送结果") + private String result; + + @Excel(name = "发送失败的原因") + private String reason; + @Excel(name = "删除标识") private Integer delFlag; From 8f1161ed193f6e799cca785843329739925ae197 Mon Sep 17 00:00:00 2001 From: wxz Date: Wed, 21 Oct 2020 18:05:20 +0800 Subject: [PATCH 04/12] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E7=B3=BB=E7=BB=9F=E6=8E=88=E6=9D=83=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E7=9A=84=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/bootstrap.yml | 1 + .../epmet/dto/form/WxMsgAuthInfoFormDTO.java | 24 +++++++++++ .../dto/result/WxMsgAuthInfoResultDTO.java | 41 +++++++++++++++++++ .../controller/WxmpMessageController.java | 30 +++++++++++++- .../WxmpTemplateMsgSubscribeStatusDao.java | 11 ++++- .../com/epmet/service/WxmpMessageService.java | 1 + .../service/impl/WxmpMessageServiceImpl.java | 30 ++++++++++++++ .../WxmpTemplateMsgSubscribeStatusDao.xml | 41 ++++++++++++++++++- 8 files changed, 175 insertions(+), 4 deletions(-) create mode 100644 epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/form/WxMsgAuthInfoFormDTO.java create mode 100644 epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/result/WxMsgAuthInfoResultDTO.java diff --git a/epmet-gateway/src/main/resources/bootstrap.yml b/epmet-gateway/src/main/resources/bootstrap.yml index b6e2b73907..d78c96140e 100644 --- a/epmet-gateway/src/main/resources/bootstrap.yml +++ b/epmet-gateway/src/main/resources/bootstrap.yml @@ -61,6 +61,7 @@ spring: - Path=${server.servlet.context-path}/message/** filters: - StripPrefix=1 + - CpAuth=true #工作流服务 - id: epmet-activiti-server uri: @gateway.routes.epmet-activiti-server.uri@ diff --git a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/form/WxMsgAuthInfoFormDTO.java b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/form/WxMsgAuthInfoFormDTO.java new file mode 100644 index 0000000000..11d70e506d --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/form/WxMsgAuthInfoFormDTO.java @@ -0,0 +1,24 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +@Data +public class WxMsgAuthInfoFormDTO { + + public interface SaveSysAuthInfoGroup {} + + @NotBlank(message = "客户id不能为空", groups = { SaveSysAuthInfoGroup.class }) + private String customerId; + + @NotBlank(message = "客户端类型不能为空", groups = { SaveSysAuthInfoGroup.class }) + private String clientType; + + @NotBlank(message = "是否总是字段不能为空", groups = { SaveSysAuthInfoGroup.class }) + private String alwaysVisit; + + @NotBlank(message = "是否去订阅字段不能为空", groups = { SaveSysAuthInfoGroup.class }) + private String subscribeStatus; + +} diff --git a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/result/WxMsgAuthInfoResultDTO.java b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/result/WxMsgAuthInfoResultDTO.java new file mode 100644 index 0000000000..13988b5411 --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/result/WxMsgAuthInfoResultDTO.java @@ -0,0 +1,41 @@ +package com.epmet.dto.result; + +import lombok.Data; + +@Data +public class WxMsgAuthInfoResultDTO { + /** + * 客户Id 客户Id + */ + private String customerId; + + /** + * 所属端类型 居民端:resi 工作端:work + */ + private String clientType; + + /** + * 用户Id 用户Id + */ + private String userId; + + /** + * 是否总是访问 是:yes 否:no + */ + private String alwaysVisit; + + /** + * 订阅状态 订阅状态(订阅:subscribe 取消订阅:unsubscribe) + */ + private String subscribeStatus; + + /** + * wx是否总是访问 是:yes 否:no + */ + private String wxAlwaysVisit; + + /** + * wx订阅状态 订阅状态(订阅:subscribe 取消订阅:unsubscribe) + */ + private String wxSubscribeStatus; +} diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/WxmpMessageController.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/WxmpMessageController.java index 294f0f5d36..57441016b3 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/WxmpMessageController.java +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/WxmpMessageController.java @@ -17,10 +17,13 @@ package com.epmet.controller; +import com.epmet.commons.tools.security.user.LoginUserUtil; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.dto.form.WxMsgAuthInfoFormDTO; import com.epmet.service.WxmpMessageService; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; /** @@ -36,4 +39,27 @@ public class WxmpMessageController { @Autowired private WxmpMessageService wxmpMessageService; + @Autowired + private LoginUserUtil loginUserUtil; + + /** + * @Description 保存系统自身的弹框授权信息 + * @return com.epmet.commons.tools.utils.Result + * @author wxz + * @date 2020.10.21 17:32 + */ + @PostMapping("save-sys-authorizeinfo") + public Result saveSysAuthorizationInfo(@RequestBody WxMsgAuthInfoFormDTO form) { + ValidatorUtils.validateEntity(form, WxMsgAuthInfoFormDTO.SaveSysAuthInfoGroup.class); + + String alwaysVisit = form.getAlwaysVisit(); + String clientType = form.getClientType(); + String customerId = form.getCustomerId(); + String subscribeStatus = form.getSubscribeStatus(); + + wxmpMessageService.saveSysAuthorizeInfo(customerId, clientType, alwaysVisit, subscribeStatus, loginUserUtil.getLoginUserId()); + + return new Result(); + } + } \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/WxmpTemplateMsgSubscribeStatusDao.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/WxmpTemplateMsgSubscribeStatusDao.java index 9f99225746..df2764868c 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/WxmpTemplateMsgSubscribeStatusDao.java +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/WxmpTemplateMsgSubscribeStatusDao.java @@ -18,8 +18,10 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.result.WxMsgAuthInfoResultDTO; import com.epmet.entity.WxmpTemplateMsgSubscribeStatusEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * 用户模板消息订阅授权状态表(记录我们自己和微信的授权页用户勾选的状态) @@ -29,5 +31,12 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface WxmpTemplateMsgSubscribeStatusDao extends BaseDao { - + + WxMsgAuthInfoResultDTO getUserSubscribeStatusDTO(@Param("userId") String userId, + @Param("customerId") String customerId, + @Param("clientType") String clientType); + + WxmpTemplateMsgSubscribeStatusEntity getUserSubscribeStatusEntity(@Param("userId") String userId, + @Param("customerId") String customerId, + @Param("clientType") String clientType); } \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/WxmpMessageService.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/WxmpMessageService.java index ab96dd6f0d..25d631e1c9 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/WxmpMessageService.java +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/WxmpMessageService.java @@ -25,4 +25,5 @@ package com.epmet.service; */ public interface WxmpMessageService { + void saveSysAuthorizeInfo(String customerId, String clientType, String alwaysVisit, String subscribeStatus, String userId); } \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java index 75b784b5e6..7192a0e1bf 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java @@ -17,9 +17,12 @@ package com.epmet.service.impl; +import com.epmet.dao.WxmpTemplateMsgSubscribeStatusDao; +import com.epmet.entity.WxmpTemplateMsgSubscribeStatusEntity; import com.epmet.service.WxmpMessageService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; /** @@ -32,4 +35,31 @@ import org.springframework.stereotype.Service; public class WxmpMessageServiceImpl implements WxmpMessageService { private Logger logger = LoggerFactory.getLogger(getClass()); + @Autowired + private WxmpTemplateMsgSubscribeStatusDao msgSubscribeStatusDao; + + /** + * @Description 保存系统授权信息 + * @return void + * @author wxz + * @date 2020.10.21 17:29 + */ + @Override + public void saveSysAuthorizeInfo(String customerId, String clientType, String alwaysVisit, String subscribeStatus, String userId) { + WxmpTemplateMsgSubscribeStatusEntity userSubscribeStatusEntity = msgSubscribeStatusDao.getUserSubscribeStatusEntity(userId, customerId, clientType); + if (userSubscribeStatusEntity != null) { + userSubscribeStatusEntity.setAlwaysVisit(alwaysVisit); + userSubscribeStatusEntity.setSubscribeStatus(subscribeStatus); + msgSubscribeStatusDao.updateById(userSubscribeStatusEntity); + return; + } + + userSubscribeStatusEntity = new WxmpTemplateMsgSubscribeStatusEntity(); + userSubscribeStatusEntity.setCustomerId(customerId); + userSubscribeStatusEntity.setClientType(clientType); + userSubscribeStatusEntity.setAlwaysVisit(alwaysVisit); + userSubscribeStatusEntity.setSubscribeStatus(subscribeStatus); + userSubscribeStatusEntity.setUserId(userId); + msgSubscribeStatusDao.insert(userSubscribeStatusEntity); + } } \ No newline at end of file diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/WxmpTemplateMsgSubscribeStatusDao.xml b/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/WxmpTemplateMsgSubscribeStatusDao.xml index b226ddb20a..d1fde2360a 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/WxmpTemplateMsgSubscribeStatusDao.xml +++ b/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/WxmpTemplateMsgSubscribeStatusDao.xml @@ -3,6 +3,45 @@ + - + \ No newline at end of file From 51161d3fb116940671e87ebba42320dd0f9e27c1 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 22 Oct 2020 11:12:32 +0800 Subject: [PATCH 05/12] =?UTF-8?q?user=E6=9C=8D=E5=8A=A1=E6=8F=90=E4=BE=9B?= =?UTF-8?q?=E4=B8=A4=E4=B8=AA=E5=AF=B9=E5=A4=96=E6=8E=A5=E5=8F=A3=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E7=94=A8=E6=88=B7=E5=9F=BA=E7=A1=80=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/form/StaffBasicInfoFormDTO.java | 23 +++++++++++ .../epmet/dto/form/UserBasicInfoFormDTO.java | 22 +++++++++++ .../com/epmet/dto/result/StaffBasicInfo.java | 39 +++++++++++++++++++ .../com/epmet/dto/result/UserBasicInfo.java | 24 ++++++++++++ .../epmet/feign/EpmetUserOpenFeignClient.java | 14 +++++++ .../EpmetUserOpenFeignClientFallback.java | 10 +++++ .../StaffAgencyVisitedController.java | 11 ++++++ .../com/epmet/controller/UserController.java | 10 +++++ .../com/epmet/dao/StaffAgencyVisitedDao.java | 8 +++- .../src/main/java/com/epmet/dao/UserDao.java | 8 ++++ .../service/StaffAgencyVisitedService.java | 8 +++- .../java/com/epmet/service/UserService.java | 11 ++++-- .../impl/StaffAgencyVisitedServiceImpl.java | 10 +++++ .../epmet/service/impl/UserServiceImpl.java | 9 +++++ .../mapper/StaffAgencyVisitedDao.xml | 22 +++++++++++ .../src/main/resources/mapper/UserDao.xml | 15 +++++++ 16 files changed, 238 insertions(+), 6 deletions(-) create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/StaffBasicInfoFormDTO.java create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/UserBasicInfoFormDTO.java create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/StaffBasicInfo.java create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserBasicInfo.java diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/StaffBasicInfoFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/StaffBasicInfoFormDTO.java new file mode 100644 index 0000000000..5548431919 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/StaffBasicInfoFormDTO.java @@ -0,0 +1,23 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author sun + * @Description 工作端-查询用户基础信息-接口入参 + **/ +@Data +public class StaffBasicInfoFormDTO implements Serializable{ + private static final long serialVersionUID = -7994579456530273809L; + /** + * 用户Id + * */ + @NotBlank(message = "用户Id不能为空" , groups = { StaffBasicInfoGroup.class }) + private String staffId; + public interface StaffBasicInfoGroup {} + +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/UserBasicInfoFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/UserBasicInfoFormDTO.java new file mode 100644 index 0000000000..cfe7f721c8 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/UserBasicInfoFormDTO.java @@ -0,0 +1,22 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author sun + * @Description 居民端-查询用户基础信息-接口入参 + **/ +@Data +public class UserBasicInfoFormDTO implements Serializable{ + private static final long serialVersionUID = -7994579456530273809L; + /** + * 用户Id + * */ + @NotBlank(message = "用户Id不能为空" , groups = { UserBasicInfoGroup.class }) + private String userId; + public interface UserBasicInfoGroup {} +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/StaffBasicInfo.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/StaffBasicInfo.java new file mode 100644 index 0000000000..89e3e3f5ca --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/StaffBasicInfo.java @@ -0,0 +1,39 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author sun + * @Description 工作端-查询用户基础信息-接口返参 + **/ +@Data +public class StaffBasicInfo implements Serializable { + + /** + * 客户Id + */ + private String customerId; + + /** + * 用户Id + */ + private String staffId; + + /** + * wx_open_id + */ + private String openId; + + /** + * 是否禁用(未禁用enable,已禁用disabled) + */ + private String enableFlag; + + /** + * 手机号 + */ + private String mobile; + +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserBasicInfo.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserBasicInfo.java new file mode 100644 index 0000000000..955848ee20 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserBasicInfo.java @@ -0,0 +1,24 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author sun + * @Description 居民端-查询用户基础信息-接口返参 + **/ +@Data +public class UserBasicInfo implements Serializable { + + /** + * 用户Id + */ + private String userId; + + /** + * wx_open_id + */ + private String openId; + +} diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java index c5a50bc818..5f7c301ad0 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java @@ -313,4 +313,18 @@ public interface EpmetUserOpenFeignClient { **/ @PostMapping("epmetuser/role/getuserrolekeylist") Result> getUserRoleKeyList(@RequestBody GetRoleKeyListFormDTO dto); + + /** + * @Author sun + * @Description 居民端-查询用户基础信息 + **/ + @PostMapping(value = "epmetuser/user/getuserbasicinfo") + Result getUserBasicInfo(@RequestBody UserBasicInfoFormDTO formDTO); + + /** + * @Author sun + * @Description 工作端-查询用户基础信息 + **/ + @PostMapping(value = "epmetuser/staffagencyvisited/getstaffbasicinfo") + Result getStaffBasicInfo(@RequestBody StaffBasicInfoFormDTO formDTO); } diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java index 2a6db644e7..64985eab15 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.java @@ -210,4 +210,14 @@ public class EpmetUserOpenFeignClientFallback implements EpmetUserOpenFeignClien public Result> getUserRoleKeyList(GetRoleKeyListFormDTO dto) { return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getUserRoleKeyList", dto); } + + @Override + public Result getUserBasicInfo(UserBasicInfoFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getUserBasicInfo", formDTO); + } + + @Override + public Result getStaffBasicInfo(StaffBasicInfoFormDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getStaffBasicInfo", formDTO); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/StaffAgencyVisitedController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/StaffAgencyVisitedController.java index 71ad8f1962..ce9b6bb4d8 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/StaffAgencyVisitedController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/StaffAgencyVisitedController.java @@ -18,8 +18,11 @@ package com.epmet.controller; import com.epmet.commons.tools.utils.Result; +import com.epmet.dto.form.StaffBasicInfoFormDTO; import com.epmet.dto.form.StaffLoginAgencyRecordFormDTO; +import com.epmet.dto.result.StaffBasicInfo; import com.epmet.dto.result.StaffLatestAgencyResultDTO; +import com.epmet.dto.result.UserBasicInfo; import com.epmet.service.StaffAgencyVisitedService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -62,5 +65,13 @@ public class StaffAgencyVisitedController { return staffAgencyVisitedService.saveStaffLoginRecord(formDTO); } + /** + * @Author sun + * @Description 工作端-查询用户基础信息 + **/ + @PostMapping(value = "getstaffbasicinfo") + public Result getStaffBasicInfo(@RequestBody StaffBasicInfoFormDTO formDTO){ + return new Result().ok(staffAgencyVisitedService.getStaffBasicInfo(formDTO)); + } } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserController.java index d607eba501..2d800dcdcb 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserController.java @@ -143,4 +143,14 @@ public class UserController { ValidatorUtils.validateEntity(wxUserInfoFormDTO); return userService.updateWxUserInfo(wxUserInfoFormDTO); } + + /** + * @Author sun + * @Description 居民端-查询用户基础信息 + **/ + @PostMapping("getuserbasicinfo") + public Result getUserBasicInfo(@RequestBody UserBasicInfoFormDTO formDTO){ + return new Result().ok(userService.getUserBasicInfo(formDTO)); + } + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffAgencyVisitedDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffAgencyVisitedDao.java index 4358e4910e..99d95420ae 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffAgencyVisitedDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffAgencyVisitedDao.java @@ -18,6 +18,8 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.form.StaffBasicInfoFormDTO; +import com.epmet.dto.result.StaffBasicInfo; import com.epmet.dto.result.StaffLatestAgencyResultDTO; import com.epmet.entity.StaffAgencyVisitedEntity; import org.apache.ibatis.annotations.Mapper; @@ -39,5 +41,9 @@ public interface StaffAgencyVisitedDao extends BaseDao **/ StaffLatestAgencyResultDTO selectLatestStaffWechatLoginRecord(String openId); - + /** + * @Author sun + * @Description 工作端-查询用户基础信息 + **/ + StaffBasicInfo selectStaffBasicInfo(StaffBasicInfoFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserDao.java index 64f5d8fd8b..7dc2a768d8 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/UserDao.java @@ -2,9 +2,11 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.form.CreatedTimeByUserIdFormDTO; +import com.epmet.dto.form.UserBasicInfoFormDTO; import com.epmet.dto.result.CreatedTimeByUserIdResultDTO; import com.epmet.dto.result.MyselfMsgResultDTO; import com.epmet.dto.result.PasswordLoginUserInfoResultDTO; +import com.epmet.dto.result.UserBasicInfo; import com.epmet.entity.UserEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -44,4 +46,10 @@ public interface UserDao extends BaseDao { * @date 2020.05.22 19:19 **/ MyselfMsgResultDTO getMyselfMsg(@Param("userId")String userId); + + /** + * @Author sun + * @Description 居民端-查询用户基础信息 + **/ + UserBasicInfo selectUserBasicInfo(UserBasicInfoFormDTO formDTO); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/StaffAgencyVisitedService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/StaffAgencyVisitedService.java index 9d584aa2e6..2789052963 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/StaffAgencyVisitedService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/StaffAgencyVisitedService.java @@ -21,7 +21,9 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.StaffAgencyVisitedDTO; +import com.epmet.dto.form.StaffBasicInfoFormDTO; import com.epmet.dto.form.StaffLoginAgencyRecordFormDTO; +import com.epmet.dto.result.StaffBasicInfo; import com.epmet.dto.result.StaffLatestAgencyResultDTO; import com.epmet.entity.StaffAgencyVisitedEntity; @@ -114,5 +116,9 @@ public interface StaffAgencyVisitedService extends BaseService { * @Description 小程序微信用户登陆,新增或更新用户信息 **/ UserDTO saveWxUser(WxUserFormDTO formDTO); + + /** + * @Author sun + * @Description 居民端-查询用户基础信息 + **/ + UserBasicInfo getUserBasicInfo(UserBasicInfoFormDTO formDTO); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StaffAgencyVisitedServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StaffAgencyVisitedServiceImpl.java index 8118bbe6f6..a8ea0e718e 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StaffAgencyVisitedServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StaffAgencyVisitedServiceImpl.java @@ -26,7 +26,9 @@ import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dao.StaffAgencyVisitedDao; import com.epmet.dto.StaffAgencyVisitedDTO; +import com.epmet.dto.form.StaffBasicInfoFormDTO; import com.epmet.dto.form.StaffLoginAgencyRecordFormDTO; +import com.epmet.dto.result.StaffBasicInfo; import com.epmet.dto.result.StaffLatestAgencyResultDTO; import com.epmet.entity.StaffAgencyVisitedEntity; import com.epmet.feign.OperCrmFeignClient; @@ -127,6 +129,14 @@ public class StaffAgencyVisitedServiceImpl extends BaseServiceImpl implem return resultDTO; } + /** + * @Author sun + * @Description 居民端-查询用户基础信息 + **/ + @Override + public UserBasicInfo getUserBasicInfo(UserBasicInfoFormDTO formDTO) { + return baseDao.selectUserBasicInfo(formDTO); + } + } diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/StaffAgencyVisitedDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/StaffAgencyVisitedDao.xml index faaa5757e9..fde53be79d 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/StaffAgencyVisitedDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/StaffAgencyVisitedDao.xml @@ -36,4 +36,26 @@ LIMIT 1 + + \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/UserDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/UserDao.xml index 6822515ed6..c1f8791e16 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/UserDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/UserDao.xml @@ -52,4 +52,19 @@ AND user.FROM_APP = 'resi' + + From a70665d97fd2317c20daebaa89b006e6368de969 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 22 Oct 2020 13:37:41 +0800 Subject: [PATCH 06/12] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/controller/StaffAgencyVisitedController.java | 3 +++ .../src/main/java/com/epmet/controller/UserController.java | 1 + .../src/main/resources/mapper/StaffAgencyVisitedDao.xml | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/StaffAgencyVisitedController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/StaffAgencyVisitedController.java index ce9b6bb4d8..40f45a45ba 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/StaffAgencyVisitedController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/StaffAgencyVisitedController.java @@ -18,8 +18,10 @@ package com.epmet.controller; import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.form.StaffBasicInfoFormDTO; import com.epmet.dto.form.StaffLoginAgencyRecordFormDTO; +import com.epmet.dto.form.WxMsgAuthInfoFormDTO; import com.epmet.dto.result.StaffBasicInfo; import com.epmet.dto.result.StaffLatestAgencyResultDTO; import com.epmet.dto.result.UserBasicInfo; @@ -71,6 +73,7 @@ public class StaffAgencyVisitedController { **/ @PostMapping(value = "getstaffbasicinfo") public Result getStaffBasicInfo(@RequestBody StaffBasicInfoFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, StaffBasicInfoFormDTO.StaffBasicInfoGroup.class); return new Result().ok(staffAgencyVisitedService.getStaffBasicInfo(formDTO)); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserController.java index 2d800dcdcb..a524f9f0c9 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserController.java @@ -150,6 +150,7 @@ public class UserController { **/ @PostMapping("getuserbasicinfo") public Result getUserBasicInfo(@RequestBody UserBasicInfoFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, UserBasicInfoFormDTO.UserBasicInfoGroup.class); return new Result().ok(userService.getUserBasicInfo(formDTO)); } diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/StaffAgencyVisitedDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/StaffAgencyVisitedDao.xml index fde53be79d..d287af8fcd 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/StaffAgencyVisitedDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/StaffAgencyVisitedDao.xml @@ -39,7 +39,7 @@ + select + `count` + from WxmpResiUserSubscribe + where + del_flag =0 + and customer_id = #{customerId} + and template_id = #{templateId} + and wx_open_id = #{openId} + and wx_subscribe_status = 'subscribe' + + + update WxmpResiUserSubscribe + set count = if(count < 1, 0, count - ${num} ) + where + del_flag =0 + and customer_id = #{customerId} + and template_id = #{templateId} + and wx_open_id = #{openId} + and wx_subscribe_status = 'subscribe' + - \ No newline at end of file + + update WxmpResiUserSubscribe + set count = 0, + wx_subscribe_status = 'unsubscribe' + where + del_flag =0 + and customer_id = #{customerId} + and template_id = #{templateId} + and wx_open_id = #{openId} + + + diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/WxmpWorkUserSubscribeDao.xml b/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/WxmpWorkUserSubscribeDao.xml index 608e32e0c5..6f368f8a6e 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/WxmpWorkUserSubscribeDao.xml +++ b/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/WxmpWorkUserSubscribeDao.xml @@ -3,6 +3,35 @@ + - - \ No newline at end of file + + update WxmpWorkUserSubscribe + set count = if(count < 1, 0, count - ${num} ) + where + del_flag =0 + and customer_id = #{customerId} + and template_id = #{templateId} + and wx_open_id = #{openId} + and wx_subscribe_status = 'subscribe' + + + update WxmpWorkUserSubscribe + set count = 0, + wx_subscribe_status = 'unsubscribe' + where + del_flag =0 + and customer_id = #{customerId} + and template_id = #{templateId} + and wx_open_id = #{openId} + + From e46c6e41bcc1f6d3d1736b3ceb7118bf941b41b4 Mon Sep 17 00:00:00 2001 From: liushaowen <565850092@qq.com> Date: Thu, 22 Oct 2020 15:02:10 +0800 Subject: [PATCH 08/12] =?UTF-8?q?=E8=AE=A2=E9=98=85=E6=B6=88=E6=81=AF=20?= =?UTF-8?q?=E5=88=9D=E7=89=882?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/form/WxSubscribeMessageFormDTO.java | 6 ++---- epmet-module/epmet-message/epmet-message-server/pom.xml | 5 +++++ .../java/com/epmet/constant/WxmpMessageConstant.java | 2 +- .../java/com/epmet/controller/UserMessageController.java | 2 +- .../com/epmet/service/impl/WxmpMessageServiceImpl.java | 9 ++++++++- .../main/resources/mapper/WxmpResiUserSubscribeDao.xml | 6 +++--- .../main/resources/mapper/WxmpWorkUserSubscribeDao.xml | 6 +++--- 7 files changed, 23 insertions(+), 13 deletions(-) diff --git a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/form/WxSubscribeMessageFormDTO.java b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/form/WxSubscribeMessageFormDTO.java index 26f718715f..45ebde28b1 100644 --- a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/form/WxSubscribeMessageFormDTO.java +++ b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/form/WxSubscribeMessageFormDTO.java @@ -51,10 +51,8 @@ public class WxSubscribeMessageFormDTO implements Serializable { /** * 消息时间 */ - @NotNull(message = "消息时间不能为空") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - @JSONField(format = "yyyy-MM-dd HH:mm:ss") - private Date messageTime; + @NotBlank(message = "消息时间不能为空") + private String messageTime; /** * 所需下发的订阅模板id diff --git a/epmet-module/epmet-message/epmet-message-server/pom.xml b/epmet-module/epmet-message/epmet-message-server/pom.xml index 1322ad2243..5b62284845 100644 --- a/epmet-module/epmet-message/epmet-message-server/pom.xml +++ b/epmet-module/epmet-message/epmet-message-server/pom.xml @@ -96,6 +96,11 @@ flyway-core + + com.epmet + epmet-user-client + 2.0.0 + diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/constant/WxmpMessageConstant.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/constant/WxmpMessageConstant.java index ea44ee4861..ba61eea035 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/constant/WxmpMessageConstant.java +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/constant/WxmpMessageConstant.java @@ -18,7 +18,7 @@ public interface WxmpMessageConstant { int USER_REFUSED = 43101; - String AUTHORIZER_ACCESS_TOKEN = "authorizer_access_token"; + String AUTHORIZER_ACCESS_TOKEN = "authorizerRefreshToken"; String RESI = "resi"; diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/UserMessageController.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/UserMessageController.java index 82cc047ea8..a176b3f2ca 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/UserMessageController.java +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/UserMessageController.java @@ -162,4 +162,4 @@ public class UserMessageController { List list = userMessageService.queryStaffMessage(formDTO); return new Result>().ok(list); } -} \ No newline at end of file +} diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java index 009c6d7f5d..c32963ea07 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java @@ -44,6 +44,9 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import javax.annotation.Resource; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -264,7 +267,11 @@ public class WxmpMessageServiceImpl implements WxmpMessageService { wxmpMsgSendRecordEntity.setBehaviorType(msg.getBehaviorType()); wxmpMsgSendRecordEntity.setTitle("您有一条" + msg.getBehaviorType()); wxmpMsgSendRecordEntity.setMessageContent(msg.getMessageContent()); - wxmpMsgSendRecordEntity.setMessageTime(msg.getMessageTime()); + try { + wxmpMsgSendRecordEntity.setMessageTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(msg.getMessageTime())); + } catch (ParseException e) { + wxmpMsgSendRecordEntity.setMessageTime(new Date()); + } wxmpMsgSendRecordEntity.setResult(status); return wxmpMsgSendRecordEntity; } diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/WxmpResiUserSubscribeDao.xml b/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/WxmpResiUserSubscribeDao.xml index f47cbdf0a0..4a07a9475b 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/WxmpResiUserSubscribeDao.xml +++ b/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/WxmpResiUserSubscribeDao.xml @@ -6,7 +6,7 @@ - update WxmpResiUserSubscribe + update Wxmp_Resi_User_Subscribe set count = if(count < 1, 0, count - ${num} ) where del_flag =0 @@ -27,7 +27,7 @@ - update WxmpResiUserSubscribe + update Wxmp_Resi_User_Subscribe set count = 0, wx_subscribe_status = 'unsubscribe' where diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/WxmpWorkUserSubscribeDao.xml b/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/WxmpWorkUserSubscribeDao.xml index 6f368f8a6e..4673179dee 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/WxmpWorkUserSubscribeDao.xml +++ b/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/WxmpWorkUserSubscribeDao.xml @@ -6,7 +6,7 @@ - update WxmpWorkUserSubscribe + update Wxmp_Work_User_Subscribe set count = if(count < 1, 0, count - ${num} ) where del_flag =0 @@ -25,7 +25,7 @@ and wx_subscribe_status = 'subscribe' - update WxmpWorkUserSubscribe + update Wxmp_Work_User_Subscribe set count = 0, wx_subscribe_status = 'unsubscribe' where From 16b2d07c8ca311e185c4a51e6f3a96fb0caf31a8 Mon Sep 17 00:00:00 2001 From: liushaowen <565850092@qq.com> Date: Thu, 22 Oct 2020 15:59:25 +0800 Subject: [PATCH 09/12] =?UTF-8?q?=E5=8F=91=E9=80=81=E8=AE=A2=E9=98=85?= =?UTF-8?q?=E6=B6=88=E6=81=AF=203?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/constant/WxmpMessageConstant.java | 2 +- .../java/com/epmet/dao/WxmpResiUserSubscribeDao.java | 1 - .../epmet/service/impl/WxmpMessageServiceImpl.java | 12 ++++++------ .../resources/mapper/WxmpResiUserSubscribeDao.xml | 12 ++++++------ 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/constant/WxmpMessageConstant.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/constant/WxmpMessageConstant.java index ba61eea035..a8f8f2ea7e 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/constant/WxmpMessageConstant.java +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/constant/WxmpMessageConstant.java @@ -18,7 +18,7 @@ public interface WxmpMessageConstant { int USER_REFUSED = 43101; - String AUTHORIZER_ACCESS_TOKEN = "authorizerRefreshToken"; + String AUTHORIZER_ACCESS_TOKEN = "authorizerAccessToken"; String RESI = "resi"; diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/WxmpResiUserSubscribeDao.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/WxmpResiUserSubscribeDao.java index d9ae74e313..d2ec0c8443 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/WxmpResiUserSubscribeDao.java +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/dao/WxmpResiUserSubscribeDao.java @@ -18,7 +18,6 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.dto.WxmpResiUserSubscribeDTO; import com.epmet.entity.WxmpResiUserSubscribeEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java index c32963ea07..328cdd9aeb 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java @@ -161,9 +161,9 @@ public class WxmpMessageServiceImpl implements WxmpMessageService { //判断用户是否有次数 Integer count = null; if (WxmpMessageConstant.RESI.equals(clientType)) { - count = wxmpResiUserSubscribeDao.getResiSubscribeInfo(openId, customerId, templateId); + count = wxmpResiUserSubscribeDao.getResiSubscribeInfo(openId, templateId, customerId); } else if (WxmpMessageConstant.WORK.equals(clientType)) { - count = wxmpWorkUserSubscribeDao.getWorkSubscribeInfo(openId, customerId, templateId); + count = wxmpWorkUserSubscribeDao.getWorkSubscribeInfo(openId, templateId, customerId); } if (count == null) { //用户未订阅 @@ -203,9 +203,9 @@ public class WxmpMessageServiceImpl implements WxmpMessageService { //订阅条数-1 int decrease = 0; if (WxmpMessageConstant.RESI.equals(clientType)) { - decrease = wxmpResiUserSubscribeDao.decreaseResiSubscribeCount(openId, customerId, templateId, 1); + decrease = wxmpResiUserSubscribeDao.decreaseResiSubscribeCount(openId, templateId, customerId, 1); } else if (WxmpMessageConstant.WORK.equals(clientType)) { - decrease = wxmpWorkUserSubscribeDao.decreaseWorkSubscribeCount(openId, customerId, templateId, 1); + decrease = wxmpWorkUserSubscribeDao.decreaseWorkSubscribeCount(openId, templateId, customerId, 1); } if (decrease == 0) { logger.error("消息{}发送成功但订阅条数-1失败", JSON.toJSONString(msg)); @@ -221,9 +221,9 @@ public class WxmpMessageServiceImpl implements WxmpMessageService { if (errcode.equals(WxmpMessageConstant.USER_REFUSED)) { int clear = 0; if (WxmpMessageConstant.RESI.equals(clientType)) { - clear = wxmpResiUserSubscribeDao.clearResiSubscribeCount(openId, customerId, templateId); + clear = wxmpResiUserSubscribeDao.clearResiSubscribeCount(openId, templateId, customerId); } else if (WxmpMessageConstant.WORK.equals(clientType)) { - clear = wxmpWorkUserSubscribeDao.clearWorkSubscribeCount(openId, customerId, templateId); + clear = wxmpWorkUserSubscribeDao.clearWorkSubscribeCount(openId, templateId, customerId); } if (clear == 0) { logger.error("消息{}发送失败且清空订阅条数失败", JSON.toJSONString(msg)); diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/WxmpResiUserSubscribeDao.xml b/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/WxmpResiUserSubscribeDao.xml index 4a07a9475b..2b97a22eec 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/WxmpResiUserSubscribeDao.xml +++ b/epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/WxmpResiUserSubscribeDao.xml @@ -3,12 +3,12 @@ - select - `count` + count from Wxmp_Resi_User_Subscribe where - del_flag =0 + del_flag = 0 and customer_id = #{customerId} and template_id = #{templateId} and wx_open_id = #{openId} @@ -17,9 +17,9 @@ update Wxmp_Resi_User_Subscribe - set count = if(count < 1, 0, count - ${num} ) + set count = if(count 1, 0, count - ${num} ) where - del_flag =0 + del_flag = 0 and customer_id = #{customerId} and template_id = #{templateId} and wx_open_id = #{openId} @@ -31,7 +31,7 @@ set count = 0, wx_subscribe_status = 'unsubscribe' where - del_flag =0 + del_flag = 0 and customer_id = #{customerId} and template_id = #{templateId} and wx_open_id = #{openId} From 1a89da20c94e106d469e42b90afd5c6bef86f7f9 Mon Sep 17 00:00:00 2001 From: liushaowen <565850092@qq.com> Date: Thu, 22 Oct 2020 16:08:51 +0800 Subject: [PATCH 10/12] =?UTF-8?q?=E5=8F=91=E9=80=81=E5=BE=AE=E4=BF=A1?= =?UTF-8?q?=E8=AE=A2=E9=98=85=204?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/controller/WxmpMessageController.java | 3 +++ .../com/epmet/service/impl/WxmpMessageServiceImpl.java | 9 ++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/WxmpMessageController.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/WxmpMessageController.java index 05887e3e54..23e854f9de 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/WxmpMessageController.java +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/WxmpMessageController.java @@ -66,6 +66,9 @@ public class WxmpMessageController { } @PostMapping("sendwxsubscribemessage") public Result sendWxSubscribeMessage(@RequestBody List msgList){ + for (WxSubscribeMessageFormDTO wxSubscribeMessageFormDTO : msgList) { + ValidatorUtils.validateEntity(wxSubscribeMessageFormDTO); + } wxmpMessageService.sendWxSubscribeMessage(msgList); return new Result(); } diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java index 328cdd9aeb..377fad7f0a 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java @@ -117,8 +117,6 @@ public class WxmpMessageServiceImpl implements WxmpMessageService { int succecssCount = 0; for (WxSubscribeMessageFormDTO msg : msgList) { try { - ValidatorUtils.validateEntity(msg); - String userId = msg.getUserId(); String clientType = msg.getClientType(); String customerId = msg.getCustomerId(); @@ -238,9 +236,9 @@ public class WxmpMessageServiceImpl implements WxmpMessageService { } catch (Exception e) { String errMsg = e.getMessage(); //ValidateException错误信息为getMsg - if (StringUtils.isBlank(errMsg) && e instanceof ValidateException) { - errMsg = ((ValidateException) e).getMsg(); - } +// if (StringUtils.isBlank(errMsg) && e instanceof ValidateException) { +// errMsg = ((ValidateException) e).getMsg(); +// } if (e instanceof WxSubscribeException){ //存表 WxmpMsgSendRecordEntity wxmpMsgSendRecordEntity = initRecord(msg, ((WxSubscribeException) e).getOpenId(), WxmpMessageConstant.ERROR); @@ -257,6 +255,7 @@ public class WxmpMessageServiceImpl implements WxmpMessageService { } logger.info("{}条消息中的{}条发送成功", msgList.size(), succecssCount); } + //初始化记录对象 private WxmpMsgSendRecordEntity initRecord(WxSubscribeMessageFormDTO msg, String openId, String status){ WxmpMsgSendRecordEntity wxmpMsgSendRecordEntity = new WxmpMsgSendRecordEntity(); wxmpMsgSendRecordEntity.setCustomerId(msg.getCustomerId()); From c7445174687034325a9bc7c03e942d32b3cb1be1 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 22 Oct 2020 16:33:17 +0800 Subject: [PATCH 11/12] 1 --- .../src/main/java/com/epmet/excel/WxmpMsgSendRecordExcel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/excel/WxmpMsgSendRecordExcel.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/excel/WxmpMsgSendRecordExcel.java index cbe9ad4435..a0d474ba82 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/excel/WxmpMsgSendRecordExcel.java +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/excel/WxmpMsgSendRecordExcel.java @@ -59,7 +59,7 @@ public class WxmpMsgSendRecordExcel { private String messageContent; @Excel(name = "消息时间 消息时间") - private Date messageTitme; + private Date messageTime; @Excel(name = "发送结果") private String result; From c7e8cc5d5f8f965e75a90330a124d0362b82da73 Mon Sep 17 00:00:00 2001 From: liushaowen <565850092@qq.com> Date: Thu, 22 Oct 2020 16:42:56 +0800 Subject: [PATCH 12/12] =?UTF-8?q?=E5=8F=91=E9=80=81=E8=AE=A2=E9=98=855?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/WxSubscribeMessageFormDTO.java | 16 ---------------- .../epmet/constant/WxmpMessageConstant.java | 11 +++++++++-- .../service/impl/WxmpMessageServiceImpl.java | 19 +++++++++++++------ 3 files changed, 22 insertions(+), 24 deletions(-) diff --git a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/form/WxSubscribeMessageFormDTO.java b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/form/WxSubscribeMessageFormDTO.java index 45ebde28b1..9a55b17386 100644 --- a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/form/WxSubscribeMessageFormDTO.java +++ b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/form/WxSubscribeMessageFormDTO.java @@ -59,20 +59,4 @@ public class WxSubscribeMessageFormDTO implements Serializable { */ @NotBlank(message = "模板id不能为空") private String templateId; - - /** - * 点击模板卡片后的跳转页面,仅限本小程序内的页面。支持带参数,(示例index?foo=bar)。该字段不填则模板无跳转。 - */ - private String page; - - /** - * 跳转小程序类型:developer为开发版;trial为体验版;formal为正式版;默认为正式版 - */ - private String miniprogramState; - - /** - * 进入小程序查看”的语言类型,支持zh_CN(简体中文)、en_US(英文)、zh_HK(繁体中文)、zh_TW(繁体中文),默认为zh_CN - */ - private String lang; - } diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/constant/WxmpMessageConstant.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/constant/WxmpMessageConstant.java index a8f8f2ea7e..992146e6ab 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/constant/WxmpMessageConstant.java +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/constant/WxmpMessageConstant.java @@ -42,9 +42,16 @@ public interface WxmpMessageConstant { String MINIPROGRAM_STATE = "miniprogram_state"; - String LANG = "lang"; - String SUCCESS = "success"; String ERROR = "error"; + + String PAGE_RESI = ""; + + String PAGE_WORK = ""; + + String STATE_DEV = "developer"; + + String STATE_TEST = "trial"; + } diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java index 377fad7f0a..1a17894174 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java @@ -20,6 +20,7 @@ package com.epmet.service.impl; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.enums.EnvEnum; import com.epmet.commons.tools.exception.ValidateException; import com.epmet.commons.tools.utils.HttpClientManager; import com.epmet.commons.tools.validator.ValidatorUtils; @@ -182,16 +183,22 @@ public class WxmpMessageServiceImpl implements WxmpMessageService { data.put(WxmpMessageConstant.MESSAGE_CONTENT, new JSONObject().put("value", msg.getMessageContent())); data.put(WxmpMessageConstant.MESSAGE_TIME, new JSONObject().put("value", msg.getMessageTime())); jsonObject.put(WxmpMessageConstant.DATA, data); + EnvEnum envEnum = EnvEnum.getCurrentEnv(); //选填项 - if (StringUtils.isNotBlank(msg.getPage())) { - jsonObject.put(WxmpMessageConstant.PAGE, msg.getPage()); + if (WxmpMessageConstant.RESI.equals(clientType)) { + jsonObject.put(WxmpMessageConstant.PAGE, WxmpMessageConstant.PAGE_RESI); + } else if (WxmpMessageConstant.WORK.equals(clientType)) { + jsonObject.put(WxmpMessageConstant.PAGE, WxmpMessageConstant.PAGE_WORK); } - if (StringUtils.isNotBlank(msg.getMiniprogramState())) { - jsonObject.put(WxmpMessageConstant.MINIPROGRAM_STATE, msg.getMiniprogramState()); + //开发环境 + if ("dev".equals(envEnum.getCode())){ + jsonObject.put(WxmpMessageConstant.MINIPROGRAM_STATE, WxmpMessageConstant.STATE_DEV); } - if (StringUtils.isNotBlank(msg.getLang())) { - jsonObject.put(WxmpMessageConstant.LANG, msg.getLang()); + //测试环境 + if ("test".equals(envEnum.getCode())){ + jsonObject.put(WxmpMessageConstant.MINIPROGRAM_STATE, WxmpMessageConstant.STATE_TEST); } + String resultStr = HttpClientManager.getInstance().sendPostByJSON(WxmpMessageConstant.SEND_MESSAGE + accessToken, JSON.toJSONString(jsonObject)).getData(); Map resultMap = JSON.parseObject(resultStr, Map.class); Object errcode = resultMap.get(WxmpMessageConstant.ERR_CODE);