小程序消息订阅通知结果代码生成
This commit is contained in:
parent
2655be7e39
commit
0c1c45088f
@ -0,0 +1,27 @@
|
||||
package com.xinelu.common.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @Description 小程序消息推送结果状态枚举
|
||||
* @Author 纪寒
|
||||
* @Date 2024-03-19 10:57:43
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Getter
|
||||
public enum ErrorStatusEnum {
|
||||
/**
|
||||
* 成功
|
||||
*/
|
||||
success("success"),
|
||||
|
||||
/**
|
||||
* 失败
|
||||
*/
|
||||
fail("fail");
|
||||
final private String value;
|
||||
|
||||
ErrorStatusEnum(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
@ -13,12 +13,12 @@ public enum SubscribeStatusEnum {
|
||||
/**
|
||||
* 接受
|
||||
*/
|
||||
ACCEPT("ACCEPT"),
|
||||
accept("accept"),
|
||||
|
||||
/**
|
||||
* 拒绝
|
||||
*/
|
||||
REJECT("REJECT");
|
||||
rejet("rejet");
|
||||
final private String value;
|
||||
|
||||
SubscribeStatusEnum(String value) {
|
||||
|
||||
@ -13,15 +13,15 @@ import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.xinyilu.common.annotation.Log;
|
||||
import com.xinyilu.common.core.controller.BaseController;
|
||||
import com.xinyilu.common.core.domain.AjaxResult;
|
||||
import com.xinyilu.common.enums.BusinessType;
|
||||
import com.xinelu.common.annotation.Log;
|
||||
import com.xinelu.common.core.controller.BaseController;
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.common.enums.BusinessType;
|
||||
import ${packageName}.domain.${ClassName};
|
||||
import ${packageName}.service.I${ClassName}Service;
|
||||
import com.xinyilu.common.utils.poi.ExcelUtil;
|
||||
import com.xinelu.common.utils.poi.ExcelUtil;
|
||||
#if($table.crud || $table.sub)
|
||||
import com.xinyilu.common.core.page.TableDataInfo;
|
||||
import com.xinelu.common.core.page.TableDataInfo;
|
||||
#elseif($table.tree)
|
||||
#end
|
||||
|
||||
|
||||
@ -13,11 +13,11 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.xinyilu.common.annotation.Excel;
|
||||
import com.xinelu.common.annotation.Excel;
|
||||
#if($table.crud)
|
||||
import com.xinyilu.common.core.domain.BaseEntity;
|
||||
import com.xinelu.common.core.domain.BaseEntity;
|
||||
#elseif($table.tree)
|
||||
import com.xinyilu.common.core.domain.TreeEntity;
|
||||
import com.xinelu.common.core.domain.TreeEntity;
|
||||
#end
|
||||
|
||||
/**
|
||||
@ -32,7 +32,7 @@ import com.xinyilu.common.core.domain.TreeEntity;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "${functionName}对象", description = "${tableName}")
|
||||
#if($table.crud)
|
||||
#set($Entity="BaseDomain")
|
||||
#set($Entity="BaseEntity")
|
||||
#elseif($table.tree)
|
||||
#set($Entity="TreeEntity")
|
||||
#end
|
||||
|
||||
@ -4,7 +4,7 @@ import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
#foreach ($column in $columns)
|
||||
#if($column.javaField == 'createTime' || $column.javaField == 'updateTime')
|
||||
import com.xinyilu.common.utils.DateUtils;
|
||||
import com.xinelu.common.utils.DateUtils;
|
||||
#break
|
||||
#end
|
||||
#end
|
||||
@ -13,7 +13,7 @@ import org.springframework.stereotype.Service;
|
||||
#if($table.sub)
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.xinyilu.common.utils.StringUtils;
|
||||
import com.xinelu.common.utils.StringUtils;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import ${packageName}.domain.${subClassName};
|
||||
#end
|
||||
|
||||
@ -3,7 +3,7 @@ package ${packageName}.domain;
|
||||
#foreach ($import in $subImportList)
|
||||
import ${import};
|
||||
#end
|
||||
import com.xinyilu.common.annotation.Excel;
|
||||
import com.xinelu.common.annotation.Excel;
|
||||
|
||||
/**
|
||||
* ${subTable.functionName}对象 ${subTableName}
|
||||
|
||||
@ -0,0 +1,91 @@
|
||||
package com.xinelu.manage.controller.subscribemessagerecord;
|
||||
|
||||
import com.xinelu.common.annotation.Log;
|
||||
import com.xinelu.common.core.controller.BaseController;
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.common.core.page.TableDataInfo;
|
||||
import com.xinelu.common.enums.BusinessType;
|
||||
import com.xinelu.common.utils.poi.ExcelUtil;
|
||||
import com.xinelu.manage.domain.subscribemessagerecord.SubscribeMessageRecord;
|
||||
import com.xinelu.manage.service.subscribemessagerecord.ISubscribeMessageRecordService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 微信小程序订阅消息记录Controller
|
||||
*
|
||||
* @author xinelu
|
||||
* @date 2024-03-19
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/manage/sendRecord")
|
||||
public class SubscribeMessageRecordController extends BaseController {
|
||||
@Resource
|
||||
private ISubscribeMessageRecordService subscribeMessageRecordService;
|
||||
|
||||
/**
|
||||
* 查询微信小程序订阅消息记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:sendRecord:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SubscribeMessageRecord subscribeMessageRecord) {
|
||||
startPage();
|
||||
List<SubscribeMessageRecord> list = subscribeMessageRecordService.selectSubscribeMessageRecordList(subscribeMessageRecord);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出微信小程序订阅消息记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:sendRecord:export')")
|
||||
@Log(title = "微信小程序订阅消息记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SubscribeMessageRecord subscribeMessageRecord) {
|
||||
List<SubscribeMessageRecord> list = subscribeMessageRecordService.selectSubscribeMessageRecordList(subscribeMessageRecord);
|
||||
ExcelUtil<SubscribeMessageRecord> util = new ExcelUtil<>(SubscribeMessageRecord.class);
|
||||
util.exportExcel(response, list, "微信小程序订阅消息记录数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取微信小程序订阅消息记录详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:sendRecord:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(subscribeMessageRecordService.selectSubscribeMessageRecordById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增微信小程序订阅消息记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:sendRecord:add')")
|
||||
@Log(title = "微信小程序订阅消息记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SubscribeMessageRecord subscribeMessageRecord) {
|
||||
return toAjax(subscribeMessageRecordService.insertSubscribeMessageRecord(subscribeMessageRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改微信小程序订阅消息记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:sendRecord:edit')")
|
||||
@Log(title = "微信小程序订阅消息记录", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SubscribeMessageRecord subscribeMessageRecord) {
|
||||
return toAjax(subscribeMessageRecordService.updateSubscribeMessageRecord(subscribeMessageRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除微信小程序订阅消息记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:sendRecord:remove')")
|
||||
@Log(title = "微信小程序订阅消息记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(subscribeMessageRecordService.deleteSubscribeMessageRecordByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,91 @@
|
||||
package com.xinelu.manage.controller.subscribemessagesendrecord;
|
||||
|
||||
import com.xinelu.common.annotation.Log;
|
||||
import com.xinelu.common.core.controller.BaseController;
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.common.core.page.TableDataInfo;
|
||||
import com.xinelu.common.enums.BusinessType;
|
||||
import com.xinelu.common.utils.poi.ExcelUtil;
|
||||
import com.xinelu.manage.domain.subscribemessagesendrecord.SubscribeMessageSendRecord;
|
||||
import com.xinelu.manage.service.subscribemessagesendrecord.ISubscribeMessageSendRecordService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 微信小程序订阅消息发送结果记录Controller
|
||||
*
|
||||
* @author xinelu
|
||||
* @date 2024-03-19
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/manage/sendResult")
|
||||
public class SubscribeMessageSendRecordController extends BaseController {
|
||||
@Resource
|
||||
private ISubscribeMessageSendRecordService subscribeMessageSendRecordService;
|
||||
|
||||
/**
|
||||
* 查询微信小程序订阅消息发送结果记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:sendResult:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SubscribeMessageSendRecord subscribeMessageSendRecord) {
|
||||
startPage();
|
||||
List<SubscribeMessageSendRecord> list = subscribeMessageSendRecordService.selectSubscribeMessageSendRecordList(subscribeMessageSendRecord);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出微信小程序订阅消息发送结果记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:sendResult:export')")
|
||||
@Log(title = "微信小程序订阅消息发送结果记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SubscribeMessageSendRecord subscribeMessageSendRecord) {
|
||||
List<SubscribeMessageSendRecord> list = subscribeMessageSendRecordService.selectSubscribeMessageSendRecordList(subscribeMessageSendRecord);
|
||||
ExcelUtil<SubscribeMessageSendRecord> util = new ExcelUtil<>(SubscribeMessageSendRecord.class);
|
||||
util.exportExcel(response, list, "微信小程序订阅消息发送结果记录数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取微信小程序订阅消息发送结果记录详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:sendResult:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(subscribeMessageSendRecordService.selectSubscribeMessageSendRecordById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增微信小程序订阅消息发送结果记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:sendResult:add')")
|
||||
@Log(title = "微信小程序订阅消息发送结果记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SubscribeMessageSendRecord subscribeMessageSendRecord) {
|
||||
return toAjax(subscribeMessageSendRecordService.insertSubscribeMessageSendRecord(subscribeMessageSendRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改微信小程序订阅消息发送结果记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:sendResult:edit')")
|
||||
@Log(title = "微信小程序订阅消息发送结果记录", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SubscribeMessageSendRecord subscribeMessageSendRecord) {
|
||||
return toAjax(subscribeMessageSendRecordService.updateSubscribeMessageSendRecord(subscribeMessageSendRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除微信小程序订阅消息发送结果记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('manage:sendResult:remove')")
|
||||
@Log(title = "微信小程序订阅消息发送结果记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(subscribeMessageSendRecordService.deleteSubscribeMessageSendRecordByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,136 @@
|
||||
package com.xinelu.manage.domain.subscribemessagesendrecord;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.xinelu.common.annotation.Excel;
|
||||
import com.xinelu.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 微信小程序订阅消息发送结果记录对象 subscribe_message_send_record
|
||||
*
|
||||
* @author xinelu
|
||||
* @date 2024-03-19
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "微信小程序订阅消息发送结果记录对象", description = "subscribe_message_send_record")
|
||||
public class SubscribeMessageSendRecord extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 患者id
|
||||
*/
|
||||
@ApiModelProperty(value = "患者id")
|
||||
@Excel(name = "患者id")
|
||||
private Long patientId;
|
||||
|
||||
/**
|
||||
* 签约患者管理任务节点表id
|
||||
*/
|
||||
@ApiModelProperty(value = "签约患者管理任务节点表id")
|
||||
@Excel(name = "签约患者管理任务节点表id")
|
||||
private Long manageRouteNodeId;
|
||||
|
||||
/**
|
||||
* 微信unionid
|
||||
*/
|
||||
@ApiModelProperty(value = "微信unionid")
|
||||
@Excel(name = "微信unionid")
|
||||
private String unionid;
|
||||
|
||||
/**
|
||||
* 微信openid
|
||||
*/
|
||||
@ApiModelProperty(value = "微信openid")
|
||||
@Excel(name = "微信openid")
|
||||
private String openid;
|
||||
|
||||
/**
|
||||
* 微信小程序id
|
||||
*/
|
||||
@ApiModelProperty(value = "微信小程序id")
|
||||
@Excel(name = "微信小程序id")
|
||||
private String appletId;
|
||||
|
||||
/**
|
||||
* 订阅消息发送时间
|
||||
*/
|
||||
@ApiModelProperty(value = "订阅消息发送时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "订阅消息发送时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime subscribeTime;
|
||||
|
||||
/**
|
||||
* 消息模板id
|
||||
*/
|
||||
@ApiModelProperty(value = "消息模板id")
|
||||
@Excel(name = "消息模板id")
|
||||
private String templateId;
|
||||
|
||||
/**
|
||||
* 消息id
|
||||
*/
|
||||
@ApiModelProperty(value = "消息id")
|
||||
@Excel(name = "消息id")
|
||||
private String msgId;
|
||||
|
||||
/**
|
||||
* 订阅任务消息类型,电话外呼:PHONE_OUTBOUND,问卷量表:QUESTIONNAIRE_SCALE,宣教文章:PROPAGANDA_ARTICLE,文字提醒:TEXT_REMIND,人工随访:ARTIFICIAL_FOLLOW_UP
|
||||
*/
|
||||
@ApiModelProperty(value = "订阅任务消息类型,电话外呼:PHONE_OUTBOUND,问卷量表:QUESTIONNAIRE_SCALE,宣教文章:PROPAGANDA_ARTICLE,文字提醒:TEXT_REMIND,人工随访:ARTIFICIAL_FOLLOW_UP")
|
||||
@Excel(name = "订阅任务消息类型,电话外呼:PHONE_OUTBOUND,问卷量表:QUESTIONNAIRE_SCALE,宣教文章:PROPAGANDA_ARTICLE,文字提醒:TEXT_REMIND,人工随访:ARTIFICIAL_FOLLOW_UP")
|
||||
private String messageType;
|
||||
|
||||
/**
|
||||
* 推送结果状态码(0表示成功)
|
||||
*/
|
||||
@ApiModelProperty(value = "推送结果状态码")
|
||||
@Excel(name = "推送结果状态码", readConverterExp = "0=表示成功")
|
||||
private Long errorCode;
|
||||
|
||||
/**
|
||||
* 推送结果状态码,success:成功
|
||||
*/
|
||||
@ApiModelProperty(value = "推送结果状态码,success:成功,fail:失败")
|
||||
@Excel(name = "推送结果状态码,success:成功, fail:失败")
|
||||
private String errorStatus;
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("patientId", getPatientId())
|
||||
.append("manageRouteNodeId", getManageRouteNodeId())
|
||||
.append("unionid", getUnionid())
|
||||
.append("openid", getOpenid())
|
||||
.append("appletId", getAppletId())
|
||||
.append("subscribeTime", getSubscribeTime())
|
||||
.append("templateId", getTemplateId())
|
||||
.append("msgId", getMsgId())
|
||||
.append("messageType", getMessageType())
|
||||
.append("errorCode", getErrorCode())
|
||||
.append("errorStatus", getErrorStatus())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.xinelu.manage.mapper.subscribemessagesendrecord;
|
||||
|
||||
import com.xinelu.manage.domain.subscribemessagesendrecord.SubscribeMessageSendRecord;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 微信小程序订阅消息发送结果记录Mapper接口
|
||||
*
|
||||
* @author xinelu
|
||||
* @date 2024-03-19
|
||||
*/
|
||||
public interface SubscribeMessageSendRecordMapper {
|
||||
/**
|
||||
* 查询微信小程序订阅消息发送结果记录
|
||||
*
|
||||
* @param id 微信小程序订阅消息发送结果记录主键
|
||||
* @return 微信小程序订阅消息发送结果记录
|
||||
*/
|
||||
SubscribeMessageSendRecord selectSubscribeMessageSendRecordById(Long id);
|
||||
|
||||
/**
|
||||
* 查询微信小程序订阅消息发送结果记录列表
|
||||
*
|
||||
* @param subscribeMessageSendRecord 微信小程序订阅消息发送结果记录
|
||||
* @return 微信小程序订阅消息发送结果记录集合
|
||||
*/
|
||||
List<SubscribeMessageSendRecord> selectSubscribeMessageSendRecordList(SubscribeMessageSendRecord subscribeMessageSendRecord);
|
||||
|
||||
/**
|
||||
* 新增微信小程序订阅消息发送结果记录
|
||||
*
|
||||
* @param subscribeMessageSendRecord 微信小程序订阅消息发送结果记录
|
||||
* @return 结果
|
||||
*/
|
||||
int insertSubscribeMessageSendRecord(SubscribeMessageSendRecord subscribeMessageSendRecord);
|
||||
|
||||
/**
|
||||
* 修改微信小程序订阅消息发送结果记录
|
||||
*
|
||||
* @param subscribeMessageSendRecord 微信小程序订阅消息发送结果记录
|
||||
* @return 结果
|
||||
*/
|
||||
int updateSubscribeMessageSendRecord(SubscribeMessageSendRecord subscribeMessageSendRecord);
|
||||
|
||||
/**
|
||||
* 删除微信小程序订阅消息发送结果记录
|
||||
*
|
||||
* @param id 微信小程序订阅消息发送结果记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteSubscribeMessageSendRecordById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除微信小程序订阅消息发送结果记录
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteSubscribeMessageSendRecordByIds(Long[] ids);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.xinelu.manage.service.subscribemessagesendrecord;
|
||||
|
||||
import com.xinelu.manage.domain.subscribemessagesendrecord.SubscribeMessageSendRecord;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 微信小程序订阅消息发送结果记录Service接口
|
||||
*
|
||||
* @author xinelu
|
||||
* @date 2024-03-19
|
||||
*/
|
||||
public interface ISubscribeMessageSendRecordService {
|
||||
/**
|
||||
* 查询微信小程序订阅消息发送结果记录
|
||||
*
|
||||
* @param id 微信小程序订阅消息发送结果记录主键
|
||||
* @return 微信小程序订阅消息发送结果记录
|
||||
*/
|
||||
SubscribeMessageSendRecord selectSubscribeMessageSendRecordById(Long id);
|
||||
|
||||
/**
|
||||
* 查询微信小程序订阅消息发送结果记录列表
|
||||
*
|
||||
* @param subscribeMessageSendRecord 微信小程序订阅消息发送结果记录
|
||||
* @return 微信小程序订阅消息发送结果记录集合
|
||||
*/
|
||||
List<SubscribeMessageSendRecord> selectSubscribeMessageSendRecordList(SubscribeMessageSendRecord subscribeMessageSendRecord);
|
||||
|
||||
/**
|
||||
* 新增微信小程序订阅消息发送结果记录
|
||||
*
|
||||
* @param subscribeMessageSendRecord 微信小程序订阅消息发送结果记录
|
||||
* @return 结果
|
||||
*/
|
||||
int insertSubscribeMessageSendRecord(SubscribeMessageSendRecord subscribeMessageSendRecord);
|
||||
|
||||
/**
|
||||
* 修改微信小程序订阅消息发送结果记录
|
||||
*
|
||||
* @param subscribeMessageSendRecord 微信小程序订阅消息发送结果记录
|
||||
* @return 结果
|
||||
*/
|
||||
int updateSubscribeMessageSendRecord(SubscribeMessageSendRecord subscribeMessageSendRecord);
|
||||
|
||||
/**
|
||||
* 批量删除微信小程序订阅消息发送结果记录
|
||||
*
|
||||
* @param ids 需要删除的微信小程序订阅消息发送结果记录主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteSubscribeMessageSendRecordByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除微信小程序订阅消息发送结果记录信息
|
||||
*
|
||||
* @param id 微信小程序订阅消息发送结果记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteSubscribeMessageSendRecordById(Long id);
|
||||
}
|
||||
@ -0,0 +1,90 @@
|
||||
package com.xinelu.manage.service.subscribemessagesendrecord.impl;
|
||||
|
||||
import com.xinelu.manage.domain.subscribemessagesendrecord.SubscribeMessageSendRecord;
|
||||
import com.xinelu.manage.mapper.subscribemessagesendrecord.SubscribeMessageSendRecordMapper;
|
||||
import com.xinelu.manage.service.subscribemessagesendrecord.ISubscribeMessageSendRecordService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 微信小程序订阅消息发送结果记录Service业务层处理
|
||||
*
|
||||
* @author xinelu
|
||||
* @date 2024-03-19
|
||||
*/
|
||||
@Service
|
||||
public class SubscribeMessageSendRecordServiceImpl implements ISubscribeMessageSendRecordService {
|
||||
@Resource
|
||||
private SubscribeMessageSendRecordMapper subscribeMessageSendRecordMapper;
|
||||
|
||||
/**
|
||||
* 查询微信小程序订阅消息发送结果记录
|
||||
*
|
||||
* @param id 微信小程序订阅消息发送结果记录主键
|
||||
* @return 微信小程序订阅消息发送结果记录
|
||||
*/
|
||||
@Override
|
||||
public SubscribeMessageSendRecord selectSubscribeMessageSendRecordById(Long id) {
|
||||
return subscribeMessageSendRecordMapper.selectSubscribeMessageSendRecordById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询微信小程序订阅消息发送结果记录列表
|
||||
*
|
||||
* @param subscribeMessageSendRecord 微信小程序订阅消息发送结果记录
|
||||
* @return 微信小程序订阅消息发送结果记录
|
||||
*/
|
||||
@Override
|
||||
public List<SubscribeMessageSendRecord> selectSubscribeMessageSendRecordList(SubscribeMessageSendRecord subscribeMessageSendRecord) {
|
||||
return subscribeMessageSendRecordMapper.selectSubscribeMessageSendRecordList(subscribeMessageSendRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增微信小程序订阅消息发送结果记录
|
||||
*
|
||||
* @param subscribeMessageSendRecord 微信小程序订阅消息发送结果记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSubscribeMessageSendRecord(SubscribeMessageSendRecord subscribeMessageSendRecord) {
|
||||
subscribeMessageSendRecord.setCreateTime(LocalDateTime.now());
|
||||
return subscribeMessageSendRecordMapper.insertSubscribeMessageSendRecord(subscribeMessageSendRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改微信小程序订阅消息发送结果记录
|
||||
*
|
||||
* @param subscribeMessageSendRecord 微信小程序订阅消息发送结果记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSubscribeMessageSendRecord(SubscribeMessageSendRecord subscribeMessageSendRecord) {
|
||||
subscribeMessageSendRecord.setUpdateTime(LocalDateTime.now());
|
||||
return subscribeMessageSendRecordMapper.updateSubscribeMessageSendRecord(subscribeMessageSendRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除微信小程序订阅消息发送结果记录
|
||||
*
|
||||
* @param ids 需要删除的微信小程序订阅消息发送结果记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSubscribeMessageSendRecordByIds(Long[] ids) {
|
||||
return subscribeMessageSendRecordMapper.deleteSubscribeMessageSendRecordByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除微信小程序订阅消息发送结果记录信息
|
||||
*
|
||||
* @param id 微信小程序订阅消息发送结果记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSubscribeMessageSendRecordById(Long id) {
|
||||
return subscribeMessageSendRecordMapper.deleteSubscribeMessageSendRecordById(id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,207 @@
|
||||
<?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.xinelu.manage.mapper.subscribemessagesendrecord.SubscribeMessageSendRecordMapper">
|
||||
|
||||
<resultMap type="SubscribeMessageSendRecord" id="SubscribeMessageSendRecordResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="patientId" column="patient_id"/>
|
||||
<result property="manageRouteNodeId" column="manage_route_node_id"/>
|
||||
<result property="unionid" column="unionid"/>
|
||||
<result property="openid" column="openid"/>
|
||||
<result property="appletId" column="applet_id"/>
|
||||
<result property="subscribeTime" column="subscribe_time"/>
|
||||
<result property="templateId" column="template_id"/>
|
||||
<result property="msgId" column="msg_id"/>
|
||||
<result property="messageType" column="message_type"/>
|
||||
<result property="errorCode" column="error_code"/>
|
||||
<result property="errorStatus" column="error_status"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSubscribeMessageSendRecordVo">
|
||||
select id, patient_id, manage_route_node_id, unionid, openid, applet_id, subscribe_time, template_id, msg_id, message_type, error_code, error_status, create_by, create_time, update_by, update_time from subscribe_message_send_record
|
||||
</sql>
|
||||
|
||||
<select id="selectSubscribeMessageSendRecordList" parameterType="SubscribeMessageSendRecord"
|
||||
resultMap="SubscribeMessageSendRecordResult">
|
||||
<include refid="selectSubscribeMessageSendRecordVo"/>
|
||||
<where>
|
||||
<if test="patientId != null ">
|
||||
and patient_id = #{patientId}
|
||||
</if>
|
||||
<if test="manageRouteNodeId != null ">
|
||||
and manage_route_node_id = #{manageRouteNodeId}
|
||||
</if>
|
||||
<if test="unionid != null and unionid != ''">
|
||||
and unionid = #{unionid}
|
||||
</if>
|
||||
<if test="openid != null and openid != ''">
|
||||
and openid = #{openid}
|
||||
</if>
|
||||
<if test="appletId != null and appletId != ''">
|
||||
and applet_id = #{appletId}
|
||||
</if>
|
||||
<if test="subscribeTime != null ">
|
||||
and subscribe_time = #{subscribeTime}
|
||||
</if>
|
||||
<if test="templateId != null and templateId != ''">
|
||||
and template_id = #{templateId}
|
||||
</if>
|
||||
<if test="msgId != null and msgId != ''">
|
||||
and msg_id = #{msgId}
|
||||
</if>
|
||||
<if test="messageType != null and messageType != ''">
|
||||
and message_type = #{messageType}
|
||||
</if>
|
||||
<if test="errorCode != null ">
|
||||
and error_code = #{errorCode}
|
||||
</if>
|
||||
<if test="errorStatus != null and errorStatus != ''">
|
||||
and error_status = #{errorStatus}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSubscribeMessageSendRecordById" parameterType="Long"
|
||||
resultMap="SubscribeMessageSendRecordResult">
|
||||
<include refid="selectSubscribeMessageSendRecordVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertSubscribeMessageSendRecord" parameterType="SubscribeMessageSendRecord" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into subscribe_message_send_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="patientId != null">patient_id,
|
||||
</if>
|
||||
<if test="manageRouteNodeId != null">manage_route_node_id,
|
||||
</if>
|
||||
<if test="unionid != null">unionid,
|
||||
</if>
|
||||
<if test="openid != null">openid,
|
||||
</if>
|
||||
<if test="appletId != null">applet_id,
|
||||
</if>
|
||||
<if test="subscribeTime != null">subscribe_time,
|
||||
</if>
|
||||
<if test="templateId != null">template_id,
|
||||
</if>
|
||||
<if test="msgId != null">msg_id,
|
||||
</if>
|
||||
<if test="messageType != null">message_type,
|
||||
</if>
|
||||
<if test="errorCode != null">error_code,
|
||||
</if>
|
||||
<if test="errorStatus != null">error_status,
|
||||
</if>
|
||||
<if test="createBy != null">create_by,
|
||||
</if>
|
||||
<if test="createTime != null">create_time,
|
||||
</if>
|
||||
<if test="updateBy != null">update_by,
|
||||
</if>
|
||||
<if test="updateTime != null">update_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="patientId != null">#{patientId},
|
||||
</if>
|
||||
<if test="manageRouteNodeId != null">#{manageRouteNodeId},
|
||||
</if>
|
||||
<if test="unionid != null">#{unionid},
|
||||
</if>
|
||||
<if test="openid != null">#{openid},
|
||||
</if>
|
||||
<if test="appletId != null">#{appletId},
|
||||
</if>
|
||||
<if test="subscribeTime != null">#{subscribeTime},
|
||||
</if>
|
||||
<if test="templateId != null">#{templateId},
|
||||
</if>
|
||||
<if test="msgId != null">#{msgId},
|
||||
</if>
|
||||
<if test="messageType != null">#{messageType},
|
||||
</if>
|
||||
<if test="errorCode != null">#{errorCode},
|
||||
</if>
|
||||
<if test="errorStatus != null">#{errorStatus},
|
||||
</if>
|
||||
<if test="createBy != null">#{createBy},
|
||||
</if>
|
||||
<if test="createTime != null">#{createTime},
|
||||
</if>
|
||||
<if test="updateBy != null">#{updateBy},
|
||||
</if>
|
||||
<if test="updateTime != null">#{updateTime},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSubscribeMessageSendRecord" parameterType="SubscribeMessageSendRecord">
|
||||
update subscribe_message_send_record
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="patientId != null">patient_id =
|
||||
#{patientId},
|
||||
</if>
|
||||
<if test="manageRouteNodeId != null">manage_route_node_id =
|
||||
#{manageRouteNodeId},
|
||||
</if>
|
||||
<if test="unionid != null">unionid =
|
||||
#{unionid},
|
||||
</if>
|
||||
<if test="openid != null">openid =
|
||||
#{openid},
|
||||
</if>
|
||||
<if test="appletId != null">applet_id =
|
||||
#{appletId},
|
||||
</if>
|
||||
<if test="subscribeTime != null">subscribe_time =
|
||||
#{subscribeTime},
|
||||
</if>
|
||||
<if test="templateId != null">template_id =
|
||||
#{templateId},
|
||||
</if>
|
||||
<if test="msgId != null">msg_id =
|
||||
#{msgId},
|
||||
</if>
|
||||
<if test="messageType != null">message_type =
|
||||
#{messageType},
|
||||
</if>
|
||||
<if test="errorCode != null">error_code =
|
||||
#{errorCode},
|
||||
</if>
|
||||
<if test="errorStatus != null">error_status =
|
||||
#{errorStatus},
|
||||
</if>
|
||||
<if test="createBy != null">create_by =
|
||||
#{createBy},
|
||||
</if>
|
||||
<if test="createTime != null">create_time =
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="updateBy != null">update_by =
|
||||
#{updateBy},
|
||||
</if>
|
||||
<if test="updateTime != null">update_time =
|
||||
#{updateTime},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSubscribeMessageSendRecordById" parameterType="Long">
|
||||
delete from subscribe_message_send_record where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSubscribeMessageSendRecordByIds" parameterType="String">
|
||||
delete from subscribe_message_send_record where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue
Block a user