Browse Source
# Conflicts: # epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicService.java # epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicCommentServiceImpl.java # epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.javadev_shibei_match
60 changed files with 2951 additions and 122 deletions
@ -0,0 +1,19 @@ |
|||||
|
package com.epmet.constant; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2021/1/4 下午1:42 |
||||
|
*/ |
||||
|
public interface SysSmsConstant { |
||||
|
|
||||
|
String IS_NULL_PARAM_LIST = "项目流转或滞留推送短信提醒入参集合为空......"; |
||||
|
|
||||
|
String SELECT_PARAMETER_INFO_FAILURE = "查询客户配置参数失败......"; |
||||
|
|
||||
|
String PARAMETER_INFO_IS_ZERO = "未查到客户配置参数......"; |
||||
|
|
||||
|
String NOT_ENOUGH_BALANCE = "客户:%s ,当前余额为:%s"; |
||||
|
|
||||
|
String NOT_ON_SWITCH = "客户:%s ,【%s】开关未开启"; |
||||
|
|
||||
|
} |
@ -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,43 @@ |
|||||
|
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 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class ProjectSendMsgFormDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 8894395590639206399L; |
||||
|
/** |
||||
|
* 手机号 |
||||
|
*/ |
||||
|
@NotBlank(message = "手机号不能为空", groups = {AddUserInternalGroup.class, AddUserShowGroup.class}) |
||||
|
private String mobile; |
||||
|
/** |
||||
|
* 场景: |
||||
|
*/ |
||||
|
@NotBlank(message = "短信模板编码不能为空", groups = {AddUserInternalGroup.class}) |
||||
|
private String aliyunTemplateCode; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
@NotBlank(message = "客户ID不能为空", groups = {AddUserInternalGroup.class}) |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 参数KEY |
||||
|
*/ |
||||
|
@NotBlank(message = "参数KEY不能为空", groups = {AddUserInternalGroup.class}) |
||||
|
private String parameterKey; |
||||
|
|
||||
|
public interface AddUserInternalGroup {} |
||||
|
|
||||
|
public interface AddUserShowGroup extends CustomerClientShowGroup {} |
||||
|
} |
@ -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; |
||||
|
|
||||
|
|
||||
|
} |
@ -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,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,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; |
||||
|
} |
@ -0,0 +1,82 @@ |
|||||
|
package com.epmet.dto; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2021/1/4 上午10:59 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class CustomerParameterDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 主键 唯一标识 |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 参数KEY值 |
||||
|
*/ |
||||
|
private String parameterKey; |
||||
|
|
||||
|
/** |
||||
|
* 参数名称 |
||||
|
*/ |
||||
|
private String parameterName; |
||||
|
|
||||
|
/** |
||||
|
* 参数VALUE值 |
||||
|
*/ |
||||
|
private String parameterValue; |
||||
|
|
||||
|
/** |
||||
|
* 参数开关:开启:on,关闭:off |
||||
|
*/ |
||||
|
private String parameterSwitch; |
||||
|
|
||||
|
/** |
||||
|
* 说明 |
||||
|
*/ |
||||
|
private String description; |
||||
|
|
||||
|
/** |
||||
|
* 删除标识:0.未删除 1.已删除 |
||||
|
*/ |
||||
|
private Integer delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
@ -0,0 +1,28 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import lombok.AllArgsConstructor; |
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2021/1/4 上午10:44 |
||||
|
*/ |
||||
|
@Data |
||||
|
@AllArgsConstructor |
||||
|
@NoArgsConstructor |
||||
|
public class CrmParameterFormDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = -1892384189805073724L; |
||||
|
|
||||
|
public interface CrmParameterForm{} |
||||
|
|
||||
|
@NotBlank(message = "客户ID不能为空",groups = {CrmParameterForm.class}) |
||||
|
private String customerId; |
||||
|
|
||||
|
@NotBlank(message = "参数KEY值不能为空",groups = {CrmParameterForm.class}) |
||||
|
private String parameterKey; |
||||
|
} |
@ -0,0 +1,49 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import lombok.AllArgsConstructor; |
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2021/1/4 上午10:46 |
||||
|
*/ |
||||
|
@Data |
||||
|
@AllArgsConstructor |
||||
|
@NoArgsConstructor |
||||
|
public class CrmParameterResultDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 8082721392714934568L; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 参数KEY值 |
||||
|
*/ |
||||
|
private String parameterKey; |
||||
|
|
||||
|
/** |
||||
|
* 参数VALUE值 |
||||
|
*/ |
||||
|
private String parameterValue; |
||||
|
|
||||
|
/** |
||||
|
* 余额状态【parameterValue】true:充足,false:不足 |
||||
|
*/ |
||||
|
private Boolean balanceStatus = true; |
||||
|
|
||||
|
/** |
||||
|
* 新的参数VALUE值 |
||||
|
*/ |
||||
|
private String subtractParameterValue; |
||||
|
|
||||
|
/** |
||||
|
* 参数开关状态 true:开启,false:关闭 |
||||
|
*/ |
||||
|
private Boolean switchStatus; |
||||
|
} |
@ -0,0 +1,53 @@ |
|||||
|
package com.epmet.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
||||
|
import com.epmet.dto.form.CrmParameterFormDTO; |
||||
|
import com.epmet.dto.result.CrmParameterResultDTO; |
||||
|
import com.epmet.service.CustomerParameterService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestBody; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2021/1/4 上午10:51 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("parameter") |
||||
|
public class CustomerParameterController { |
||||
|
|
||||
|
@Autowired |
||||
|
private CustomerParameterService parameterService; |
||||
|
|
||||
|
/** |
||||
|
* @Description 查询客户配置信息 |
||||
|
* @Param formDTO |
||||
|
* @author zxc |
||||
|
* @date 2021/1/4 上午11:20 |
||||
|
*/ |
||||
|
@PostMapping("parameterinfo") |
||||
|
public Result<List<CrmParameterResultDTO>> selectParamInfo(@RequestBody List<CrmParameterFormDTO> formDTOs){ |
||||
|
formDTOs.forEach(formDTO -> { |
||||
|
ValidatorUtils.validateEntity(formDTO, CrmParameterFormDTO.CrmParameterForm.class); |
||||
|
}); |
||||
|
return new Result<List<CrmParameterResultDTO>>().ok(parameterService.selectParamInfo(formDTOs)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @Description 更新客户配置信息 |
||||
|
* @Param formDTOS |
||||
|
* @author zxc |
||||
|
* @date 2021/1/4 下午4:23 |
||||
|
*/ |
||||
|
@PostMapping("parameterupdate") |
||||
|
public Result updateParamInfo(@RequestBody List<CrmParameterResultDTO> formDTOS){ |
||||
|
parameterService.updateParamInfo(formDTOS); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,34 @@ |
|||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.dto.form.CrmParameterFormDTO; |
||||
|
import com.epmet.dto.result.CrmParameterResultDTO; |
||||
|
import com.epmet.entity.CustomerParameterEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2021/1/4 上午11:01 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface CustomerParameterDao extends BaseDao<CustomerParameterEntity> { |
||||
|
|
||||
|
/** |
||||
|
* @Description 查询客户的配置信息 |
||||
|
* @Param customerIds |
||||
|
* @author zxc |
||||
|
* @date 2021/1/4 上午11:07 |
||||
|
*/ |
||||
|
List<CrmParameterResultDTO> selectParamInfo(@Param("formDTOS")List<CrmParameterFormDTO> formDTOS); |
||||
|
|
||||
|
/** |
||||
|
* @Description 更新客户配置信息 |
||||
|
* @Param formDTOS |
||||
|
* @author zxc |
||||
|
* @date 2021/1/4 下午4:12 |
||||
|
*/ |
||||
|
void updateParamInfo(@Param("formDTOS")List<CrmParameterResultDTO> formDTOS); |
||||
|
} |
@ -0,0 +1,49 @@ |
|||||
|
package com.epmet.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2021/1/4 上午11:03 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("customer_parameter") |
||||
|
public class CustomerParameterEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户ID |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 参数KEY值 |
||||
|
*/ |
||||
|
private String parameterKey; |
||||
|
|
||||
|
/** |
||||
|
* 参数名称 |
||||
|
*/ |
||||
|
private String parameterName; |
||||
|
|
||||
|
/** |
||||
|
* 参数VALUE值 |
||||
|
*/ |
||||
|
private String parameterValue; |
||||
|
|
||||
|
/** |
||||
|
* 参数开关:开启:on,关闭:off |
||||
|
*/ |
||||
|
private String parameterSwitch; |
||||
|
|
||||
|
/** |
||||
|
* 说明 |
||||
|
*/ |
||||
|
private String description; |
||||
|
|
||||
|
} |
@ -0,0 +1,30 @@ |
|||||
|
package com.epmet.service; |
||||
|
|
||||
|
import com.epmet.dto.form.CrmParameterFormDTO; |
||||
|
import com.epmet.dto.result.CrmParameterResultDTO; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2021/1/4 上午10:52 |
||||
|
*/ |
||||
|
public interface CustomerParameterService { |
||||
|
|
||||
|
/** |
||||
|
* @Description 查询客户配置信息 |
||||
|
* @Param formDTO |
||||
|
* @author zxc |
||||
|
* @date 2021/1/4 上午11:20 |
||||
|
*/ |
||||
|
List<CrmParameterResultDTO> selectParamInfo(List<CrmParameterFormDTO> formDTOs); |
||||
|
|
||||
|
/** |
||||
|
* @Description 更新客户配置信息 |
||||
|
* @Param formDTOS |
||||
|
* @author zxc |
||||
|
* @date 2021/1/4 下午4:10 |
||||
|
*/ |
||||
|
void updateParamInfo(List<CrmParameterResultDTO> formDTOS); |
||||
|
|
||||
|
} |
@ -0,0 +1,57 @@ |
|||||
|
package com.epmet.service.impl; |
||||
|
|
||||
|
import com.epmet.dao.CustomerParameterDao; |
||||
|
import com.epmet.dto.form.CrmParameterFormDTO; |
||||
|
import com.epmet.dto.result.CrmParameterResultDTO; |
||||
|
import com.epmet.service.CustomerParameterService; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
import org.springframework.util.CollectionUtils; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2021/1/4 上午10:53 |
||||
|
*/ |
||||
|
@Service |
||||
|
@Slf4j |
||||
|
public class CustomerParameterServiceImpl implements CustomerParameterService { |
||||
|
|
||||
|
@Autowired |
||||
|
private CustomerParameterDao parameterDao; |
||||
|
|
||||
|
/** |
||||
|
* @Description 查询客户配置信息 |
||||
|
* @Param formDTO |
||||
|
* @author zxc |
||||
|
* @date 2021/1/4 上午11:20 |
||||
|
*/ |
||||
|
@Override |
||||
|
public List<CrmParameterResultDTO> selectParamInfo(List<CrmParameterFormDTO> formDTOs) { |
||||
|
if (CollectionUtils.isEmpty(formDTOs)){ |
||||
|
return new ArrayList<>(); |
||||
|
} |
||||
|
List<CrmParameterResultDTO> result = parameterDao.selectParamInfo(formDTOs); |
||||
|
if (CollectionUtils.isEmpty(result)){ |
||||
|
return new ArrayList<>(); |
||||
|
} |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @Description 更新客户配置信息 |
||||
|
* @Param formDTOS |
||||
|
* @author zxc |
||||
|
* @date 2021/1/4 下午4:11 |
||||
|
*/ |
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void updateParamInfo(List<CrmParameterResultDTO> formDTOS) { |
||||
|
if (CollectionUtils.isEmpty(formDTOS))return; |
||||
|
parameterDao.updateParamInfo(formDTOS); |
||||
|
} |
||||
|
} |
@ -0,0 +1,52 @@ |
|||||
|
CREATE TABLE `customer_parameter` |
||||
|
( |
||||
|
`ID` varchar(64) NOT NULL COMMENT '唯一标识', |
||||
|
`CUSTOMER_ID` varchar(32) NOT NULL COMMENT '客户ID', |
||||
|
`PARAMETER_KEY` varchar(32) NOT NULL COMMENT '参数KEY值(发短信:send_msg;)', |
||||
|
`PARAMETER_NAME` varchar(32) DEFAULT NULL COMMENT '参数名称(短信)', |
||||
|
`PARAMETER_VALUE` varchar(32) DEFAULT NULL COMMENT '参数VALUE值', |
||||
|
`DESCRIPTION` varchar(32) DEFAULT NULL COMMENT '说明', |
||||
|
`DEL_FLAG` int(11) NOT NULL COMMENT '删除标识:0.未删除 1.已删除', |
||||
|
`REVISION` int(11) NOT NULL COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', |
||||
|
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
||||
|
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
||||
|
PRIMARY KEY (`ID`) USING BTREE |
||||
|
) ENGINE = InnoDB |
||||
|
DEFAULT CHARSET = utf8mb4 |
||||
|
ROW_FORMAT = COMPACT COMMENT ='客户配置表'; |
||||
|
|
||||
|
|
||||
|
#=================== 数据初始化 ============================ |
||||
|
INSERT INTO customer_parameter ( |
||||
|
ID, |
||||
|
CUSTOMER_ID, |
||||
|
PARAMETER_KEY, |
||||
|
PARAMETER_NAME, |
||||
|
PARAMETER_VALUE, |
||||
|
DESCRIPTION, |
||||
|
DEL_FLAG, |
||||
|
REVISION, |
||||
|
CREATED_BY, |
||||
|
CREATED_TIME, |
||||
|
UPDATED_BY, |
||||
|
UPDATED_TIME |
||||
|
) |
||||
|
SELECT |
||||
|
MD5(uuid() + FLOOR(RAND() * 999999)), |
||||
|
id, |
||||
|
'send_msg', |
||||
|
'短信', |
||||
|
'5000', |
||||
|
'客户短信可发送次数配置', |
||||
|
'0', |
||||
|
'0', |
||||
|
'app_user', |
||||
|
NOW(), |
||||
|
'app_user', |
||||
|
NOW() |
||||
|
FROM |
||||
|
customer |
||||
|
WHERE |
||||
|
DEL_FLAG = '0' |
@ -0,0 +1,49 @@ |
|||||
|
DROP TABLE IF EXISTS `customer_parameter`; |
||||
|
CREATE TABLE `customer_parameter` |
||||
|
( |
||||
|
`ID` varchar(64) NOT NULL COMMENT '唯一标识', |
||||
|
`CUSTOMER_ID` varchar(32) NOT NULL COMMENT '客户ID', |
||||
|
`PARAMETER_KEY` varchar(32) NOT NULL COMMENT '参数KEY值(发短信:send_msg;)', |
||||
|
`PARAMETER_NAME` varchar(32) DEFAULT NULL COMMENT '参数名称(短信)', |
||||
|
`PARAMETER_SWITCH` varchar(255) DEFAULT NULL COMMENT '参数开关:开启:on,关闭:off', |
||||
|
`PARAMETER_VALUE` varchar(32) DEFAULT NULL COMMENT '参数VALUE值', |
||||
|
`DESCRIPTION` varchar(32) DEFAULT NULL COMMENT '说明', |
||||
|
`DEL_FLAG` int(11) NOT NULL COMMENT '删除标识:0.未删除 1.已删除', |
||||
|
`REVISION` int(11) NOT NULL COMMENT '乐观锁', |
||||
|
`CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', |
||||
|
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
||||
|
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', |
||||
|
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
||||
|
PRIMARY KEY (`ID`) USING BTREE |
||||
|
) ENGINE = InnoDB |
||||
|
DEFAULT CHARSET = utf8mb4 |
||||
|
ROW_FORMAT = COMPACT COMMENT ='客户配置表'; |
||||
|
|
||||
|
|
||||
|
#=================== 数据初始化 ============================ |
||||
|
INSERT INTO customer_parameter (ID, |
||||
|
CUSTOMER_ID, |
||||
|
PARAMETER_KEY, |
||||
|
PARAMETER_NAME, |
||||
|
PARAMETER_VALUE, |
||||
|
DESCRIPTION, |
||||
|
DEL_FLAG, |
||||
|
REVISION, |
||||
|
CREATED_BY, |
||||
|
CREATED_TIME, |
||||
|
UPDATED_BY, |
||||
|
UPDATED_TIME) |
||||
|
SELECT MD5(uuid() + FLOOR(RAND() * 999999)), |
||||
|
id, |
||||
|
'send_msg', |
||||
|
'短信', |
||||
|
'5000', |
||||
|
'客户短信可发送次数配置', |
||||
|
'0', |
||||
|
'0', |
||||
|
'app_user', |
||||
|
NOW(), |
||||
|
'app_user', |
||||
|
NOW() |
||||
|
FROM customer |
||||
|
WHERE DEL_FLAG = '0' |
@ -0,0 +1,33 @@ |
|||||
|
<?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.CustomerParameterDao"> |
||||
|
|
||||
|
<!-- 更新客户配置信息 --> |
||||
|
<update id="updateParamInfo"> |
||||
|
<foreach collection="formDTOS" item="f" separator=";"> |
||||
|
UPDATE customer_parameter |
||||
|
SET PARAMETER_VALUE = #{f.subtractParameterValue} |
||||
|
<where> |
||||
|
DEL_FLAG = 0 |
||||
|
AND CUSTOMER_ID = #{f.customerId} |
||||
|
AND PARAMETER_KEY = #{f.parameterKey} |
||||
|
</where> |
||||
|
</foreach> |
||||
|
</update> |
||||
|
|
||||
|
<!-- 查询客户的配置信息 --> |
||||
|
<select id="selectParamInfo" resultType="com.epmet.dto.result.CrmParameterResultDTO"> |
||||
|
SELECT |
||||
|
CUSTOMER_ID, |
||||
|
PARAMETER_KEY, |
||||
|
PARAMETER_VALUE, |
||||
|
(CASE WHEN PARAMETER_SWITCH = 'on' THEN TRUE ELSE FALSE END) AS switchStatus |
||||
|
FROM customer_parameter |
||||
|
WHERE DEL_FLAG = 0 |
||||
|
AND |
||||
|
<foreach collection="formDTOS" item="formDTO" separator=" OR "> |
||||
|
CUSTOMER_ID = #{formDTO.customerId} |
||||
|
AND PARAMETER_KEY = #{formDTO.parameterKey} |
||||
|
</foreach> |
||||
|
</select> |
||||
|
</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