forked from rongchao/epmet-cloud-rizhao
39 changed files with 2143 additions and 124 deletions
@ -0,0 +1,86 @@ |
|||
package com.epmet.constant; |
|||
|
|||
import java.util.HashMap; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* @description: 微信订阅消息常量 |
|||
* @author: liushaowen |
|||
* @date: 2020/10/21 17:45 |
|||
*/ |
|||
|
|||
public interface WxmpMessageConstant { |
|||
String SEND_MESSAGE = "https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token="; |
|||
|
|||
String ERR_CODE = "errcode"; |
|||
|
|||
String ERR_MSG = "errmsg"; |
|||
|
|||
int USER_REFUSED = 43101; |
|||
|
|||
String AUTHORIZER_ACCESS_TOKEN = "authorizerAccessToken"; |
|||
|
|||
String RESI = "resi"; |
|||
|
|||
String GOV_REDIS = "work"; |
|||
|
|||
String GOV_DB = "gov"; |
|||
|
|||
String ACCESS_TOKEN = "access_token"; |
|||
|
|||
String TOUSER = "touser"; |
|||
|
|||
String TEMPLATE_ID = "template_id"; |
|||
/*站内信模板start*/ |
|||
String MESSAGE_TEMPLATE_TYPE = "1832"; |
|||
String MESSAGE_TITLE = "thing5"; |
|||
String MESSAGE_CONTENT = "thing4"; |
|||
String MESSAGE_TIME = "date2"; |
|||
/*站内信模板end*/ |
|||
|
|||
/**关注更新提醒模板start**/ |
|||
String CONCERN_UPDATE_TEMPLATE_TYPE = "8171"; |
|||
String CONCERN_UPDATE_TITLE = "thing5"; |
|||
String CONCERN_UPDATE_TITLE_TEXT = "话题状态提醒"; |
|||
String CONCERN_UPDATE_CONTENT = "thing7"; |
|||
String CONCERN_UPDATE_CONTENT_TEXT = "你关注的话题已被转为议题,请点击查看。"; |
|||
String CONCERN_UPDATE_TIME = "date6"; |
|||
/**关注更新提醒模板end**/ |
|||
|
|||
/**内容更新消息通知模板start**/ |
|||
String CONTENT_UPDATE_TEMPLATE_TYPE = "2092"; |
|||
String CONTENT_UPDATE_TITLE = "thing4"; |
|||
String CONTENT_UPDATE_TITLE_TEXT = "新评论提醒"; |
|||
String CONTENT_UPDATE_CONTENT = "thing9"; |
|||
String CONTENT_UPDATE_CONTENT_TEXT = "你关注的话题收到新评论,请点击查看。"; |
|||
String CONTENT_UPDATE_TIME = "date3"; |
|||
/**内容更新消息通知模板end**/ |
|||
|
|||
/** 消息来源start**/ |
|||
//话题
|
|||
String SOURCE_TYPE_TOPIC = "topic"; |
|||
//议题
|
|||
String SOURCE_TYPE_ISSUE = "issue"; |
|||
/** 消息来源end**/ |
|||
|
|||
String PAGE = "page"; |
|||
|
|||
String PAGE_URL = "/subpages/mine/pages/message/skip"; |
|||
|
|||
int TITLE_LIMIT = 20; |
|||
|
|||
int MESSAGE_CONTENT_LIMIT = 20; |
|||
|
|||
String DATA = "data"; |
|||
|
|||
String MINIPROGRAM_STATE = "miniprogram_state"; |
|||
|
|||
String SUCCESS = "success"; |
|||
|
|||
String ERROR = "error"; |
|||
|
|||
String STATE_DEV = "developer"; |
|||
|
|||
String STATE_TEST = "trial"; |
|||
|
|||
} |
@ -0,0 +1,111 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 订阅消息发送数据表(内容更新消息提醒、关注更新提醒) |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2021-01-04 |
|||
*/ |
|||
@Data |
|||
public class WxmpUpdateSendDataDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 来源类型 (话题:topic 议题:issue 项目project 爱心互助heart 党建声音voice) |
|||
*/ |
|||
private String sourceType; |
|||
|
|||
/** |
|||
* 来源对应ID |
|||
*/ |
|||
private String sourceId; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 组织ID agencyId |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 网格ID |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 小组Id |
|||
*/ |
|||
private String groupId; |
|||
|
|||
/** |
|||
* 工作人员Id |
|||
*/ |
|||
private String staffId; |
|||
|
|||
/** |
|||
* 消息接收者 |
|||
*/ |
|||
private String msgUserId; |
|||
|
|||
/** |
|||
* 删除标识 0未删除、1已删除 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,131 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 订阅消息发送记录表(内容更新消息提醒、关注更新提醒) |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-12-30 |
|||
*/ |
|||
@Data |
|||
public class WxmpUpdateSendRecordDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 网格Id (居民端跟网格有关的则有值,工作端以及一些居民端和网格没关的存*) |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 所属端类型 居民端:resi 工作端:gov |
|||
*/ |
|||
private String clientType; |
|||
|
|||
/** |
|||
* 消息模板Id |
|||
*/ |
|||
private String templateId; |
|||
|
|||
/** |
|||
* 用户Id |
|||
*/ |
|||
private String userId; |
|||
|
|||
/** |
|||
* openId |
|||
*/ |
|||
private String wxOpenId; |
|||
|
|||
/** |
|||
* 行为类型: 关注更新提醒、内容更新消息通知 |
|||
*/ |
|||
private String behaviorType; |
|||
|
|||
/** |
|||
* 消息标题 |
|||
*/ |
|||
private String title; |
|||
|
|||
/** |
|||
* 消息内容 |
|||
*/ |
|||
private String content; |
|||
|
|||
/** |
|||
* 消息时间 |
|||
*/ |
|||
private Date time; |
|||
|
|||
/** |
|||
* 发送结果(成功:success 失败:error) |
|||
*/ |
|||
private String result; |
|||
|
|||
/** |
|||
* 发送失败的原因,成功可以不记录 |
|||
*/ |
|||
private String reason; |
|||
|
|||
/** |
|||
* 删除标识 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,20 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: liushaowen |
|||
* @date: 2020/12/29 13:20 |
|||
*/ |
|||
@Data |
|||
public class TemplateListV2FormDTO implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
@NotBlank(message = "customerId不能为空") |
|||
private String customerId; |
|||
@NotBlank(message = "app不能为空") |
|||
private String app; |
|||
} |
@ -0,0 +1,86 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import javax.validation.constraints.NotNull; |
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @description: 微信订阅消息FormDTO |
|||
* @author: liushaowen |
|||
* @date: 2020/10/21 14:29 |
|||
*/ |
|||
@Data |
|||
public class WxSubscribeUpdateFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
/** |
|||
* 客户id |
|||
*/ |
|||
@NotBlank(message = "客户id不能为空") |
|||
private String customerId; |
|||
/** |
|||
* 客户端类型 居民端:resi 工作端:work |
|||
*/ |
|||
@NotBlank(message = "客户端类型不能为空") |
|||
private String clientType; |
|||
|
|||
/** |
|||
* 接收者(用户)的 userId |
|||
*/ |
|||
@NotBlank(message = "接收用户id不能为空") |
|||
private String userId; |
|||
|
|||
/** |
|||
* 来源类型 (话题:topic 议题:issue 项目project 爱心互助heart 党建声音voice)等 |
|||
*/ |
|||
@NotBlank(message = "来源类型不能为空") |
|||
private String sourceType; |
|||
/** |
|||
* 来源对应id |
|||
*/ |
|||
@NotBlank(message = "来源id不能为空") |
|||
private String sourceId; |
|||
|
|||
/** |
|||
* 行为类型 传模板的tid |
|||
*/ |
|||
@NotBlank(message = "行为类型不能为空") |
|||
private String behaviorType; |
|||
|
|||
@NotBlank(message = "消息标题不能为空") |
|||
private String messageTitle; |
|||
|
|||
/** |
|||
* 消息内容 |
|||
*/ |
|||
@NotBlank(message = "消息内容不能为空") |
|||
private String messageContent; |
|||
|
|||
/** |
|||
* 消息时间 |
|||
*/ |
|||
@NotNull(message = "消息时间不能为空") |
|||
private Date messageTime; |
|||
|
|||
/** |
|||
* 网格id |
|||
*/ |
|||
private String gridId; |
|||
/** |
|||
* 工作人员id |
|||
*/ |
|||
private String staffId; |
|||
|
|||
/** |
|||
* 群id |
|||
*/ |
|||
private String groupId; |
|||
/** |
|||
* 组织id |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
|
|||
} |
@ -0,0 +1,21 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: liushaowen |
|||
* @date: 2020/12/29 13:19 |
|||
*/ |
|||
@Data |
|||
public class TemplateListV2ResultDTO implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
//类型id
|
|||
private String tid; |
|||
//类型名称
|
|||
private String type; |
|||
|
|||
private String templateId; |
|||
} |
@ -1,63 +0,0 @@ |
|||
package com.epmet.constant; |
|||
|
|||
import java.util.HashMap; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* @description: 微信订阅消息常量 |
|||
* @author: liushaowen |
|||
* @date: 2020/10/21 17:45 |
|||
*/ |
|||
|
|||
public interface WxmpMessageConstant { |
|||
String SEND_MESSAGE = "https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token="; |
|||
|
|||
String ERR_CODE = "errcode"; |
|||
|
|||
String ERR_MSG = "errmsg"; |
|||
|
|||
int USER_REFUSED = 43101; |
|||
|
|||
String AUTHORIZER_ACCESS_TOKEN = "authorizerAccessToken"; |
|||
|
|||
String RESI = "resi"; |
|||
|
|||
String GOV_REDIS = "work"; |
|||
|
|||
String GOV_DB = "gov"; |
|||
|
|||
String ACCESS_TOKEN = "access_token"; |
|||
|
|||
String TOUSER = "touser"; |
|||
|
|||
String TEMPLATE_ID = "template_id"; |
|||
|
|||
String TEMPLATE_TYPE = "1832"; |
|||
|
|||
String PAGE = "page"; |
|||
|
|||
String PAGE_URL = "/subpages/mine/pages/message/skip"; |
|||
|
|||
String TITLE = "thing5"; |
|||
|
|||
int TITLE_LIMIT = 20; |
|||
|
|||
String MESSAGE_CONTENT = "thing4"; |
|||
|
|||
int MESSAGE_CONTENT_LIMIT = 20; |
|||
|
|||
String MESSAGE_TIME = "date2"; |
|||
|
|||
String DATA = "data"; |
|||
|
|||
String MINIPROGRAM_STATE = "miniprogram_state"; |
|||
|
|||
String SUCCESS = "success"; |
|||
|
|||
String ERROR = "error"; |
|||
|
|||
String STATE_DEV = "developer"; |
|||
|
|||
String STATE_TEST = "trial"; |
|||
|
|||
} |
@ -0,0 +1,94 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.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.WxmpUpdateSendDataDTO; |
|||
import com.epmet.excel.WxmpUpdateSendDataExcel; |
|||
import com.epmet.service.WxmpUpdateSendDataService; |
|||
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 qu qu@elink-cn.com |
|||
* @since v1.0.0 2021-01-04 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("wxmpupdatesenddata") |
|||
public class WxmpUpdateSendDataController { |
|||
|
|||
@Autowired |
|||
private WxmpUpdateSendDataService wxmpUpdateSendDataService; |
|||
|
|||
@GetMapping("page") |
|||
public Result<PageData<WxmpUpdateSendDataDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<WxmpUpdateSendDataDTO> page = wxmpUpdateSendDataService.page(params); |
|||
return new Result<PageData<WxmpUpdateSendDataDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<WxmpUpdateSendDataDTO> get(@PathVariable("id") String id){ |
|||
WxmpUpdateSendDataDTO data = wxmpUpdateSendDataService.get(id); |
|||
return new Result<WxmpUpdateSendDataDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result save(@RequestBody WxmpUpdateSendDataDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
wxmpUpdateSendDataService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PutMapping |
|||
public Result update(@RequestBody WxmpUpdateSendDataDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
wxmpUpdateSendDataService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
wxmpUpdateSendDataService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
@GetMapping("export") |
|||
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<WxmpUpdateSendDataDTO> list = wxmpUpdateSendDataService.list(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, WxmpUpdateSendDataExcel.class); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,94 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.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.WxmpUpdateSendRecordDTO; |
|||
import com.epmet.excel.WxmpUpdateSendRecordExcel; |
|||
import com.epmet.service.WxmpUpdateSendRecordService; |
|||
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 qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-12-30 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("wxmpupdatesendrecord") |
|||
public class WxmpUpdateSendRecordController { |
|||
|
|||
@Autowired |
|||
private WxmpUpdateSendRecordService wxmpUpdateSendRecordService; |
|||
|
|||
@GetMapping("page") |
|||
public Result<PageData<WxmpUpdateSendRecordDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<WxmpUpdateSendRecordDTO> page = wxmpUpdateSendRecordService.page(params); |
|||
return new Result<PageData<WxmpUpdateSendRecordDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<WxmpUpdateSendRecordDTO> get(@PathVariable("id") String id){ |
|||
WxmpUpdateSendRecordDTO data = wxmpUpdateSendRecordService.get(id); |
|||
return new Result<WxmpUpdateSendRecordDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result save(@RequestBody WxmpUpdateSendRecordDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
wxmpUpdateSendRecordService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PutMapping |
|||
public Result update(@RequestBody WxmpUpdateSendRecordDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
wxmpUpdateSendRecordService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
wxmpUpdateSendRecordService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
@GetMapping("export") |
|||
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<WxmpUpdateSendRecordDTO> list = wxmpUpdateSendRecordService.list(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, WxmpUpdateSendRecordExcel.class); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,33 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.WxmpUpdateSendDataEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 订阅消息发送数据表(内容更新消息提醒、关注更新提醒) |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2021-01-04 |
|||
*/ |
|||
@Mapper |
|||
public interface WxmpUpdateSendDataDao extends BaseDao<WxmpUpdateSendDataEntity> { |
|||
|
|||
} |
@ -0,0 +1,33 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.WxmpUpdateSendRecordEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 订阅消息发送记录表(内容更新消息提醒、关注更新提醒) |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-12-30 |
|||
*/ |
|||
@Mapper |
|||
public interface WxmpUpdateSendRecordDao extends BaseDao<WxmpUpdateSendRecordEntity> { |
|||
|
|||
} |
@ -0,0 +1,81 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 订阅消息发送数据表(内容更新消息提醒、关注更新提醒) |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2021-01-04 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("wxmp_update_send_data") |
|||
public class WxmpUpdateSendDataEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 来源类型 (话题:topic 议题:issue 项目project 爱心互助heart 党建声音voice) |
|||
*/ |
|||
private String sourceType; |
|||
|
|||
/** |
|||
* 来源对应ID |
|||
*/ |
|||
private String sourceId; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 组织ID agencyId |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 网格ID |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 小组Id |
|||
*/ |
|||
private String groupId; |
|||
|
|||
/** |
|||
* 工作人员Id |
|||
*/ |
|||
private String staffId; |
|||
|
|||
/** |
|||
* 消息接收者 |
|||
*/ |
|||
private String msgUserId; |
|||
|
|||
} |
@ -0,0 +1,101 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 订阅消息发送记录表(内容更新消息提醒、关注更新提醒) |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-12-30 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("wxmp_update_send_record") |
|||
public class WxmpUpdateSendRecordEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 网格Id (居民端跟网格有关的则有值,工作端以及一些居民端和网格没关的存*) |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 所属端类型 居民端:resi 工作端:gov |
|||
*/ |
|||
private String clientType; |
|||
|
|||
/** |
|||
* 消息模板Id |
|||
*/ |
|||
private String templateId; |
|||
|
|||
/** |
|||
* 用户Id |
|||
*/ |
|||
private String userId; |
|||
|
|||
/** |
|||
* openId |
|||
*/ |
|||
private String wxOpenId; |
|||
|
|||
/** |
|||
* 行为类型: 关注更新提醒、内容更新消息通知 |
|||
*/ |
|||
private String behaviorType; |
|||
|
|||
/** |
|||
* 消息标题 |
|||
*/ |
|||
private String title; |
|||
|
|||
/** |
|||
* 消息内容 |
|||
*/ |
|||
private String content; |
|||
|
|||
/** |
|||
* 消息时间 |
|||
*/ |
|||
private Date time; |
|||
|
|||
/** |
|||
* 发送结果(成功:success 失败:error) |
|||
*/ |
|||
private String result; |
|||
|
|||
/** |
|||
* 发送失败的原因,成功可以不记录 |
|||
*/ |
|||
private String reason; |
|||
|
|||
} |
@ -0,0 +1,80 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.excel; |
|||
|
|||
import cn.afterturn.easypoi.excel.annotation.Excel; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 订阅消息发送数据表(内容更新消息提醒、关注更新提醒) |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2021-01-04 |
|||
*/ |
|||
@Data |
|||
public class WxmpUpdateSendDataExcel { |
|||
|
|||
@Excel(name = "主键") |
|||
private String id; |
|||
|
|||
@Excel(name = "来源类型 (话题:topic 议题:issue 项目project 爱心互助heart 党建声音voice)") |
|||
private String sourceType; |
|||
|
|||
@Excel(name = "来源对应ID") |
|||
private String sourceId; |
|||
|
|||
@Excel(name = "客户ID") |
|||
private String customerId; |
|||
|
|||
@Excel(name = "组织ID agencyId") |
|||
private String agencyId; |
|||
|
|||
@Excel(name = "网格ID ") |
|||
private String gridId; |
|||
|
|||
@Excel(name = "小组Id") |
|||
private String groupId; |
|||
|
|||
@Excel(name = "工作人员Id") |
|||
private String staffId; |
|||
|
|||
@Excel(name = "消息接收者") |
|||
private String msgUserId; |
|||
|
|||
@Excel(name = "删除标识 0未删除、1已删除") |
|||
private String 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; |
|||
|
|||
|
|||
} |
@ -0,0 +1,92 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.excel; |
|||
|
|||
import cn.afterturn.easypoi.excel.annotation.Excel; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 订阅消息发送记录表(内容更新消息提醒、关注更新提醒) |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-12-30 |
|||
*/ |
|||
@Data |
|||
public class WxmpUpdateSendRecordExcel { |
|||
|
|||
@Excel(name = "主键") |
|||
private String id; |
|||
|
|||
@Excel(name = "客户Id ") |
|||
private String customerId; |
|||
|
|||
@Excel(name = "网格Id (居民端跟网格有关的则有值,工作端以及一些居民端和网格没关的存*)") |
|||
private String gridId; |
|||
|
|||
@Excel(name = "所属端类型 居民端:resi 工作端:gov") |
|||
private String clientType; |
|||
|
|||
@Excel(name = "消息模板Id ") |
|||
private String templateId; |
|||
|
|||
@Excel(name = "用户Id") |
|||
private String userId; |
|||
|
|||
@Excel(name = "openId ") |
|||
private String wxOpenId; |
|||
|
|||
@Excel(name = "行为类型: 关注更新提醒、内容更新消息通知") |
|||
private String behaviorType; |
|||
|
|||
@Excel(name = "消息标题 ") |
|||
private String title; |
|||
|
|||
@Excel(name = "消息内容 ") |
|||
private String content; |
|||
|
|||
@Excel(name = "消息时间 ") |
|||
private Date time; |
|||
|
|||
@Excel(name = "发送结果(成功:success 失败:error)") |
|||
private String result; |
|||
|
|||
@Excel(name = "发送失败的原因,成功可以不记录") |
|||
private String reason; |
|||
|
|||
@Excel(name = "删除标识") |
|||
private String 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; |
|||
|
|||
|
|||
} |
@ -0,0 +1,47 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.redis; |
|||
|
|||
import com.epmet.commons.tools.redis.RedisUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* 订阅消息发送数据表(内容更新消息提醒、关注更新提醒) |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2021-01-04 |
|||
*/ |
|||
@Component |
|||
public class WxmpUpdateSendDataRedis { |
|||
@Autowired |
|||
private RedisUtils redisUtils; |
|||
|
|||
public void delete(Object[] ids) { |
|||
|
|||
} |
|||
|
|||
public void set(){ |
|||
|
|||
} |
|||
|
|||
public String get(String id){ |
|||
return null; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,47 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.redis; |
|||
|
|||
import com.epmet.commons.tools.redis.RedisUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* 订阅消息发送记录表(内容更新消息提醒、关注更新提醒) |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-12-30 |
|||
*/ |
|||
@Component |
|||
public class WxmpUpdateSendRecordRedis { |
|||
@Autowired |
|||
private RedisUtils redisUtils; |
|||
|
|||
public void delete(Object[] ids) { |
|||
|
|||
} |
|||
|
|||
public void set(){ |
|||
|
|||
} |
|||
|
|||
public String get(String id){ |
|||
return null; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,95 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.dto.WxmpUpdateSendDataDTO; |
|||
import com.epmet.entity.WxmpUpdateSendDataEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 订阅消息发送数据表(内容更新消息提醒、关注更新提醒) |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2021-01-04 |
|||
*/ |
|||
public interface WxmpUpdateSendDataService extends BaseService<WxmpUpdateSendDataEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<WxmpUpdateSendDataDTO> |
|||
* @author generator |
|||
* @date 2021-01-04 |
|||
*/ |
|||
PageData<WxmpUpdateSendDataDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<WxmpUpdateSendDataDTO> |
|||
* @author generator |
|||
* @date 2021-01-04 |
|||
*/ |
|||
List<WxmpUpdateSendDataDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return WxmpUpdateSendDataDTO |
|||
* @author generator |
|||
* @date 2021-01-04 |
|||
*/ |
|||
WxmpUpdateSendDataDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2021-01-04 |
|||
*/ |
|||
void save(WxmpUpdateSendDataDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2021-01-04 |
|||
*/ |
|||
void update(WxmpUpdateSendDataDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2021-01-04 |
|||
*/ |
|||
void delete(String[] ids); |
|||
} |
@ -0,0 +1,95 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.dto.WxmpUpdateSendRecordDTO; |
|||
import com.epmet.entity.WxmpUpdateSendRecordEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 订阅消息发送记录表(内容更新消息提醒、关注更新提醒) |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-12-30 |
|||
*/ |
|||
public interface WxmpUpdateSendRecordService extends BaseService<WxmpUpdateSendRecordEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<WxmpUpdateSendRecordDTO> |
|||
* @author generator |
|||
* @date 2020-12-30 |
|||
*/ |
|||
PageData<WxmpUpdateSendRecordDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<WxmpUpdateSendRecordDTO> |
|||
* @author generator |
|||
* @date 2020-12-30 |
|||
*/ |
|||
List<WxmpUpdateSendRecordDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return WxmpUpdateSendRecordDTO |
|||
* @author generator |
|||
* @date 2020-12-30 |
|||
*/ |
|||
WxmpUpdateSendRecordDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-12-30 |
|||
*/ |
|||
void save(WxmpUpdateSendRecordDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-12-30 |
|||
*/ |
|||
void update(WxmpUpdateSendRecordDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-12-30 |
|||
*/ |
|||
void delete(String[] ids); |
|||
} |
@ -0,0 +1,104 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.impl; |
|||
|
|||
import com.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.WxmpUpdateSendDataDao; |
|||
import com.epmet.dto.WxmpUpdateSendDataDTO; |
|||
import com.epmet.entity.WxmpUpdateSendDataEntity; |
|||
import com.epmet.redis.WxmpUpdateSendDataRedis; |
|||
import com.epmet.service.WxmpUpdateSendDataService; |
|||
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 qu qu@elink-cn.com |
|||
* @since v1.0.0 2021-01-04 |
|||
*/ |
|||
@Service |
|||
public class WxmpUpdateSendDataServiceImpl extends BaseServiceImpl<WxmpUpdateSendDataDao, WxmpUpdateSendDataEntity> implements WxmpUpdateSendDataService { |
|||
|
|||
@Autowired |
|||
private WxmpUpdateSendDataRedis wxmpUpdateSendDataRedis; |
|||
|
|||
@Override |
|||
public PageData<WxmpUpdateSendDataDTO> page(Map<String, Object> params) { |
|||
IPage<WxmpUpdateSendDataEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, WxmpUpdateSendDataDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<WxmpUpdateSendDataDTO> list(Map<String, Object> params) { |
|||
List<WxmpUpdateSendDataEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, WxmpUpdateSendDataDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<WxmpUpdateSendDataEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<WxmpUpdateSendDataEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public WxmpUpdateSendDataDTO get(String id) { |
|||
WxmpUpdateSendDataEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, WxmpUpdateSendDataDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(WxmpUpdateSendDataDTO dto) { |
|||
WxmpUpdateSendDataEntity entity = ConvertUtils.sourceToTarget(dto, WxmpUpdateSendDataEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(WxmpUpdateSendDataDTO dto) { |
|||
WxmpUpdateSendDataEntity entity = ConvertUtils.sourceToTarget(dto, WxmpUpdateSendDataEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,104 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.impl; |
|||
|
|||
import com.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.WxmpUpdateSendRecordDao; |
|||
import com.epmet.dto.WxmpUpdateSendRecordDTO; |
|||
import com.epmet.entity.WxmpUpdateSendRecordEntity; |
|||
import com.epmet.redis.WxmpUpdateSendRecordRedis; |
|||
import com.epmet.service.WxmpUpdateSendRecordService; |
|||
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 qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-12-30 |
|||
*/ |
|||
@Service |
|||
public class WxmpUpdateSendRecordServiceImpl extends BaseServiceImpl<WxmpUpdateSendRecordDao, WxmpUpdateSendRecordEntity> implements WxmpUpdateSendRecordService { |
|||
|
|||
@Autowired |
|||
private WxmpUpdateSendRecordRedis wxmpUpdateSendRecordRedis; |
|||
|
|||
@Override |
|||
public PageData<WxmpUpdateSendRecordDTO> page(Map<String, Object> params) { |
|||
IPage<WxmpUpdateSendRecordEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, WxmpUpdateSendRecordDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<WxmpUpdateSendRecordDTO> list(Map<String, Object> params) { |
|||
List<WxmpUpdateSendRecordEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, WxmpUpdateSendRecordDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<WxmpUpdateSendRecordEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<WxmpUpdateSendRecordEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public WxmpUpdateSendRecordDTO get(String id) { |
|||
WxmpUpdateSendRecordEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, WxmpUpdateSendRecordDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(WxmpUpdateSendRecordDTO dto) { |
|||
WxmpUpdateSendRecordEntity entity = ConvertUtils.sourceToTarget(dto, WxmpUpdateSendRecordEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(WxmpUpdateSendRecordDTO dto) { |
|||
WxmpUpdateSendRecordEntity entity = ConvertUtils.sourceToTarget(dto, WxmpUpdateSendRecordEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,41 @@ |
|||
CREATE TABLE `wxmp_update_send_record` ( |
|||
`ID` varchar(64) NOT NULL COMMENT '主键', |
|||
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id ', |
|||
`GRID_ID` varchar(64) DEFAULT NULL COMMENT '网格Id (居民端跟网格有关的则有值,工作端以及一些居民端和网格没关的存*)', |
|||
`CLIENT_TYPE` varchar(64) NOT NULL COMMENT '所属端类型 居民端:resi 工作端:gov', |
|||
`TEMPLATE_ID` varchar(64) NOT NULL COMMENT '消息模板Id ', |
|||
`USER_ID` varchar(64) NOT NULL COMMENT '用户Id', |
|||
`WX_OPEN_ID` varchar(64) DEFAULT NULL COMMENT 'openId ', |
|||
`BEHAVIOR_TYPE` varchar(128) NOT NULL COMMENT '行为类型: 关注更新提醒、内容更新消息通知', |
|||
`TITLE` varchar(128) NOT NULL COMMENT '消息标题 ', |
|||
`CONTENT` varchar(1024) NOT NULL COMMENT '消息内容 ', |
|||
`TIME` datetime NOT NULL COMMENT '消息时间 ', |
|||
`RESULT` varchar(32) NOT NULL COMMENT '发送结果(成功:success 失败:error)', |
|||
`REASON` varchar(1024) DEFAULT NULL COMMENT '发送失败的原因,成功可以不记录', |
|||
`DEL_FLAG` varchar(1) NOT NULL COMMENT '删除标识', |
|||
`REVISION` int(11) NOT NULL COMMENT '乐观锁', |
|||
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', |
|||
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
|||
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', |
|||
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
|||
PRIMARY KEY (`ID`) |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='订阅消息发送记录表(内容更新消息提醒、关注更新提醒)'; |
|||
|
|||
CREATE TABLE `wxmp_update_send_data` ( |
|||
`ID` varchar(32) NOT NULL COMMENT '主键', |
|||
`SOURCE_TYPE` varchar(32) NOT NULL COMMENT '来源类型 (话题:topic 议题:issue 项目project 爱心互助heart 党建声音voice)', |
|||
`SOURCE_ID` varchar(32) NOT NULL COMMENT '来源对应ID', |
|||
`CUSTOMER_ID` varchar(32) NOT NULL COMMENT '客户ID', |
|||
`AGENCY_ID` varchar(32) DEFAULT NULL COMMENT '组织ID agencyId', |
|||
`GRID_ID` varchar(32) DEFAULT NULL COMMENT '网格ID ', |
|||
`GROUP_ID` varchar(32) DEFAULT NULL COMMENT '小组Id', |
|||
`STAFF_ID` varchar(32) DEFAULT NULL COMMENT '工作人员Id', |
|||
`MSG_USER_ID` varchar(1024) DEFAULT NULL COMMENT '消息接收者', |
|||
`DEL_FLAG` varchar(1) NOT NULL DEFAULT '0' COMMENT '删除标识 0未删除、1已删除', |
|||
`REVISION` int(11) NOT NULL DEFAULT '0' COMMENT '乐观锁', |
|||
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', |
|||
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
|||
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', |
|||
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
|||
PRIMARY KEY (`ID`) |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='订阅消息发送数据表(内容更新消息提醒、关注更新提醒)'; |
@ -0,0 +1,25 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.epmet.dao.WxmpUpdateSendDataDao"> |
|||
|
|||
<resultMap type="com.epmet.entity.WxmpUpdateSendDataEntity" id="wxmpUpdateSendDataMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="sourceType" column="SOURCE_TYPE"/> |
|||
<result property="sourceId" column="SOURCE_ID"/> |
|||
<result property="customerId" column="CUSTOMER_ID"/> |
|||
<result property="agencyId" column="AGENCY_ID"/> |
|||
<result property="gridId" column="GRID_ID"/> |
|||
<result property="groupId" column="GROUP_ID"/> |
|||
<result property="staffId" column="STAFF_ID"/> |
|||
<result property="msgUserId" column="MSG_USER_ID"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
<result property="revision" column="REVISION"/> |
|||
<result property="createdBy" column="CREATED_BY"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<result property="updatedBy" column="UPDATED_BY"/> |
|||
<result property="updatedTime" column="UPDATED_TIME"/> |
|||
</resultMap> |
|||
|
|||
|
|||
</mapper> |
@ -0,0 +1,29 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.epmet.dao.WxmpUpdateSendRecordDao"> |
|||
|
|||
<resultMap type="com.epmet.entity.WxmpUpdateSendRecordEntity" id="wxmpUpdateSendRecordMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="customerId" column="CUSTOMER_ID"/> |
|||
<result property="gridId" column="GRID_ID"/> |
|||
<result property="clientType" column="CLIENT_TYPE"/> |
|||
<result property="templateId" column="TEMPLATE_ID"/> |
|||
<result property="userId" column="USER_ID"/> |
|||
<result property="wxOpenId" column="WX_OPEN_ID"/> |
|||
<result property="behaviorType" column="BEHAVIOR_TYPE"/> |
|||
<result property="title" column="TITLE"/> |
|||
<result property="content" column="CONTENT"/> |
|||
<result property="time" column="TIME"/> |
|||
<result property="result" column="RESULT"/> |
|||
<result property="reason" column="REASON"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
<result property="revision" column="REVISION"/> |
|||
<result property="createdBy" column="CREATED_BY"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<result property="updatedBy" column="UPDATED_BY"/> |
|||
<result property="updatedTime" column="UPDATED_TIME"/> |
|||
</resultMap> |
|||
|
|||
|
|||
</mapper> |
@ -0,0 +1,6 @@ |
|||
package com.epmet.modules.constant; |
|||
|
|||
public interface WxmpSubscribeConstant { |
|||
String TYPE_COMMENT = "comment"; |
|||
String TYPE_SHIFT_ISSUE = "shiftIssue"; |
|||
} |
Loading…
Reference in new issue