diff --git a/postdischarge-common/src/main/java/com/xinelu/common/enums/ErrorStatusEnum.java b/postdischarge-common/src/main/java/com/xinelu/common/enums/ErrorStatusEnum.java new file mode 100644 index 00000000..7f0e5084 --- /dev/null +++ b/postdischarge-common/src/main/java/com/xinelu/common/enums/ErrorStatusEnum.java @@ -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; + } +} diff --git a/postdischarge-common/src/main/java/com/xinelu/common/enums/SubscribeStatusEnum.java b/postdischarge-common/src/main/java/com/xinelu/common/enums/SubscribeStatusEnum.java index 43a1c468..02a508d5 100644 --- a/postdischarge-common/src/main/java/com/xinelu/common/enums/SubscribeStatusEnum.java +++ b/postdischarge-common/src/main/java/com/xinelu/common/enums/SubscribeStatusEnum.java @@ -13,12 +13,12 @@ public enum SubscribeStatusEnum { /** * 接受 */ - ACCEPT("ACCEPT"), + accept("accept"), /** * 拒绝 */ - REJECT("REJECT"); + rejet("rejet"); final private String value; SubscribeStatusEnum(String value) { diff --git a/postdischarge-generator/src/main/resources/vm/java/controller.java.vm b/postdischarge-generator/src/main/resources/vm/java/controller.java.vm index 61e42e16..0d083087 100644 --- a/postdischarge-generator/src/main/resources/vm/java/controller.java.vm +++ b/postdischarge-generator/src/main/resources/vm/java/controller.java.vm @@ -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 diff --git a/postdischarge-generator/src/main/resources/vm/java/domain.java.vm b/postdischarge-generator/src/main/resources/vm/java/domain.java.vm index ea4fe7cb..07624d51 100644 --- a/postdischarge-generator/src/main/resources/vm/java/domain.java.vm +++ b/postdischarge-generator/src/main/resources/vm/java/domain.java.vm @@ -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 diff --git a/postdischarge-generator/src/main/resources/vm/java/serviceImpl.java.vm b/postdischarge-generator/src/main/resources/vm/java/serviceImpl.java.vm index d3c6ef7c..8b32f9ff 100644 --- a/postdischarge-generator/src/main/resources/vm/java/serviceImpl.java.vm +++ b/postdischarge-generator/src/main/resources/vm/java/serviceImpl.java.vm @@ -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 diff --git a/postdischarge-generator/src/main/resources/vm/java/sub-domain.java.vm b/postdischarge-generator/src/main/resources/vm/java/sub-domain.java.vm index f69d2548..c753cf0d 100644 --- a/postdischarge-generator/src/main/resources/vm/java/sub-domain.java.vm +++ b/postdischarge-generator/src/main/resources/vm/java/sub-domain.java.vm @@ -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} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/subscribemessagerecord/SubscribeMessageRecordController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/subscribemessagerecord/SubscribeMessageRecordController.java new file mode 100644 index 00000000..f20e9719 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/subscribemessagerecord/SubscribeMessageRecordController.java @@ -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 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 list = subscribeMessageRecordService.selectSubscribeMessageRecordList(subscribeMessageRecord); + ExcelUtil 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)); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/controller/subscribemessagesendrecord/SubscribeMessageSendRecordController.java b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/subscribemessagesendrecord/SubscribeMessageSendRecordController.java new file mode 100644 index 00000000..bcc6a418 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/controller/subscribemessagesendrecord/SubscribeMessageSendRecordController.java @@ -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 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 list = subscribeMessageSendRecordService.selectSubscribeMessageSendRecordList(subscribeMessageSendRecord); + ExcelUtil 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)); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/domain/subscribemessagesendrecord/SubscribeMessageSendRecord.java b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/subscribemessagesendrecord/SubscribeMessageSendRecord.java new file mode 100644 index 00000000..45aef908 --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/domain/subscribemessagesendrecord/SubscribeMessageSendRecord.java @@ -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(); + } +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/subscribemessagesendrecord/SubscribeMessageSendRecordMapper.java b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/subscribemessagesendrecord/SubscribeMessageSendRecordMapper.java new file mode 100644 index 00000000..3784205d --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/mapper/subscribemessagesendrecord/SubscribeMessageSendRecordMapper.java @@ -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 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); +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/subscribemessagesendrecord/ISubscribeMessageSendRecordService.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/subscribemessagesendrecord/ISubscribeMessageSendRecordService.java new file mode 100644 index 00000000..1676e22f --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/subscribemessagesendrecord/ISubscribeMessageSendRecordService.java @@ -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 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); +} diff --git a/postdischarge-manage/src/main/java/com/xinelu/manage/service/subscribemessagesendrecord/impl/SubscribeMessageSendRecordServiceImpl.java b/postdischarge-manage/src/main/java/com/xinelu/manage/service/subscribemessagesendrecord/impl/SubscribeMessageSendRecordServiceImpl.java new file mode 100644 index 00000000..f6bed21a --- /dev/null +++ b/postdischarge-manage/src/main/java/com/xinelu/manage/service/subscribemessagesendrecord/impl/SubscribeMessageSendRecordServiceImpl.java @@ -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 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); + } +} diff --git a/postdischarge-manage/src/main/resources/mapper/manage/subscribemessagesendrecord/SubscribeMessageSendRecordMapper.xml b/postdischarge-manage/src/main/resources/mapper/manage/subscribemessagesendrecord/SubscribeMessageSendRecordMapper.xml new file mode 100644 index 00000000..e7633f1e --- /dev/null +++ b/postdischarge-manage/src/main/resources/mapper/manage/subscribemessagesendrecord/SubscribeMessageSendRecordMapper.xml @@ -0,0 +1,207 @@ + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + insert into subscribe_message_send_record + + 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, + + + + #{patientId}, + + #{manageRouteNodeId}, + + #{unionid}, + + #{openid}, + + #{appletId}, + + #{subscribeTime}, + + #{templateId}, + + #{msgId}, + + #{messageType}, + + #{errorCode}, + + #{errorStatus}, + + #{createBy}, + + #{createTime}, + + #{updateBy}, + + #{updateTime}, + + + + + + update subscribe_message_send_record + + patient_id = + #{patientId}, + + manage_route_node_id = + #{manageRouteNodeId}, + + unionid = + #{unionid}, + + openid = + #{openid}, + + applet_id = + #{appletId}, + + subscribe_time = + #{subscribeTime}, + + template_id = + #{templateId}, + + msg_id = + #{msgId}, + + message_type = + #{messageType}, + + error_code = + #{errorCode}, + + error_status = + #{errorStatus}, + + create_by = + #{createBy}, + + create_time = + #{createTime}, + + update_by = + #{updateBy}, + + update_time = + #{updateTime}, + + + where id = #{id} + + + + delete from subscribe_message_send_record where id = #{id} + + + + delete from subscribe_message_send_record where id in + + #{id} + + + \ No newline at end of file