diff --git a/yudao-module-mp/yudao-module-mp-api/src/main/java/cn/iocoder/yudao/module/mp/enums/message/MpAutoReplyMatchEnum.java b/yudao-module-mp/yudao-module-mp-api/src/main/java/cn/iocoder/yudao/module/mp/enums/message/MpAutoReplyMatchEnum.java new file mode 100644 index 000000000..b9fcf3671 --- /dev/null +++ b/yudao-module-mp/yudao-module-mp-api/src/main/java/cn/iocoder/yudao/module/mp/enums/message/MpAutoReplyMatchEnum.java @@ -0,0 +1,28 @@ +package cn.iocoder.yudao.module.mp.enums.message; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * 微信消息自动回复的匹配模式 + * + * @author 芋道源码 + */ +@Getter +@AllArgsConstructor +public enum MpAutoReplyMatchEnum { + + ALL(1, "完全匹配"), + LIKE(2, "半匹配"), + ; + + /** + * 匹配 + */ + private final Integer match; + /** + * 匹配的名字 + */ + private final String name; + +} diff --git a/yudao-module-mp/yudao-module-mp-api/src/main/java/cn/iocoder/yudao/module/mp/enums/message/MpAutoReplyTypeEnum.java b/yudao-module-mp/yudao-module-mp-api/src/main/java/cn/iocoder/yudao/module/mp/enums/message/MpAutoReplyTypeEnum.java new file mode 100644 index 000000000..8df7e704b --- /dev/null +++ b/yudao-module-mp/yudao-module-mp-api/src/main/java/cn/iocoder/yudao/module/mp/enums/message/MpAutoReplyTypeEnum.java @@ -0,0 +1,29 @@ +package cn.iocoder.yudao.module.mp.enums.message; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * 微信消息自动回复的类型 + * + * @author 芋道源码 + */ +@Getter +@AllArgsConstructor +public enum MpAutoReplyTypeEnum { + + SUBSCRIBE(1, "关注时回复"), + MESSAGE(2, "收到消息回复"), + KEYWORD(2, "关键词回复"), + ; + + /** + * 来源 + */ + private final Integer type; + /** + * 类型的名字 + */ + private final String name; + +} diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/WxMediaUploadController.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/WxMediaUploadController.java deleted file mode 100644 index 3a6b941fb..000000000 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/WxMediaUploadController.java +++ /dev/null @@ -1,103 +0,0 @@ -package cn.iocoder.yudao.module.mp.controller.admin.mediaupload; - -import org.springframework.web.bind.annotation.*; - -import javax.annotation.Resource; - -import org.springframework.validation.annotation.Validated; -import org.springframework.security.access.prepost.PreAuthorize; -import io.swagger.annotations.*; - -import javax.validation.*; -import javax.servlet.http.*; -import java.util.*; -import java.io.IOException; - -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.common.pojo.CommonResult; - -import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; - -import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; - -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; - -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*; - -import cn.iocoder.yudao.module.mp.controller.admin.mediaupload.vo.*; -import cn.iocoder.yudao.module.mp.dal.dataobject.mediaupload.WxMediaUploadDO; -import cn.iocoder.yudao.module.mp.convert.mediaupload.WxMediaUploadConvert; -import cn.iocoder.yudao.module.mp.service.mediaupload.WxMediaUploadService; - -@Api(tags = "管理后台 - 微信素材上传表 ") -@RestController -@RequestMapping("/wechatMp/wx-media-upload") -@Validated -public class WxMediaUploadController { - - @Resource - private WxMediaUploadService wxMediaUploadService; - - @PostMapping("/create") - @ApiOperation("创建微信素材上传表 ") - @PreAuthorize("@ss.hasPermission('wechatMp:wx-media-upload:create')") - public CommonResult createWxMediaUpload(@Valid @RequestBody WxMediaUploadCreateReqVO createReqVO) { - return success(wxMediaUploadService.createWxMediaUpload(createReqVO)); - } - - @PutMapping("/update") - @ApiOperation("更新微信素材上传表 ") - @PreAuthorize("@ss.hasPermission('wechatMp:wx-media-upload:update')") - public CommonResult updateWxMediaUpload(@Valid @RequestBody WxMediaUploadUpdateReqVO updateReqVO) { - wxMediaUploadService.updateWxMediaUpload(updateReqVO); - return success(true); - } - - @DeleteMapping("/delete") - @ApiOperation("删除微信素材上传表 ") - @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Integer.class) - @PreAuthorize("@ss.hasPermission('wechatMp:wx-media-upload:delete')") - public CommonResult deleteWxMediaUpload(@RequestParam("id") Integer id) { - wxMediaUploadService.deleteWxMediaUpload(id); - return success(true); - } - - @GetMapping("/get") - @ApiOperation("获得微信素材上传表 ") - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Integer.class) - @PreAuthorize("@ss.hasPermission('wechatMp:wx-media-upload:query')") - public CommonResult getWxMediaUpload(@RequestParam("id") Integer id) { - WxMediaUploadDO wxMediaUpload = wxMediaUploadService.getWxMediaUpload(id); - return success(WxMediaUploadConvert.INSTANCE.convert(wxMediaUpload)); - } - - @GetMapping("/list") - @ApiOperation("获得微信素材上传表 列表") - @ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class) - @PreAuthorize("@ss.hasPermission('wechatMp:wx-media-upload:query')") - public CommonResult> getWxMediaUploadList(@RequestParam("ids") Collection ids) { - List list = wxMediaUploadService.getWxMediaUploadList(ids); - return success(WxMediaUploadConvert.INSTANCE.convertList(list)); - } - - @GetMapping("/page") - @ApiOperation("获得微信素材上传表 分页") - @PreAuthorize("@ss.hasPermission('wechatMp:wx-media-upload:query')") - public CommonResult> getWxMediaUploadPage(@Valid WxMediaUploadPageReqVO pageVO) { - PageResult pageResult = wxMediaUploadService.getWxMediaUploadPage(pageVO); - return success(WxMediaUploadConvert.INSTANCE.convertPage(pageResult)); - } - - @GetMapping("/export-excel") - @ApiOperation("导出微信素材上传表 Excel") - @PreAuthorize("@ss.hasPermission('wechatMp:wx-media-upload:export')") - @OperateLog(type = EXPORT) - public void exportWxMediaUploadExcel(@Valid WxMediaUploadExportReqVO exportReqVO, - HttpServletResponse response) throws IOException { - List list = wxMediaUploadService.getWxMediaUploadList(exportReqVO); - // 导出 Excel - List datas = WxMediaUploadConvert.INSTANCE.convertList02(list); - ExcelUtils.write(response, "微信素材上传表 .xls", "数据", WxMediaUploadExcelVO.class, datas); - } - -} diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadBaseVO.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadBaseVO.java deleted file mode 100644 index c00af4f2f..000000000 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadBaseVO.java +++ /dev/null @@ -1,28 +0,0 @@ -package cn.iocoder.yudao.module.mp.controller.admin.mediaupload.vo; - -import lombok.*; -import io.swagger.annotations.*; - -/** - * 微信素材上传表 Base VO,提供给添加、修改、详细的子 VO 使用 - * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 - */ -@Data -public class WxMediaUploadBaseVO { - - @ApiModelProperty(value = "类型") - private String type; - - @ApiModelProperty(value = "图片URL") - private String url; - - @ApiModelProperty(value = "素材ID") - private String mediaId; - - @ApiModelProperty(value = "缩略图素材ID") - private String thumbMediaId; - - @ApiModelProperty(value = "微信账号ID") - private String wxAccountId; - -} diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadCreateReqVO.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadCreateReqVO.java deleted file mode 100644 index e26be6eb2..000000000 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadCreateReqVO.java +++ /dev/null @@ -1,12 +0,0 @@ -package cn.iocoder.yudao.module.mp.controller.admin.mediaupload.vo; - -import lombok.*; -import io.swagger.annotations.*; - -@ApiModel("管理后台 - 微信素材上传表 创建 Request VO") -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class WxMediaUploadCreateReqVO extends WxMediaUploadBaseVO { - -} diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadExcelVO.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadExcelVO.java deleted file mode 100644 index 26e4597da..000000000 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadExcelVO.java +++ /dev/null @@ -1,38 +0,0 @@ -package cn.iocoder.yudao.module.mp.controller.admin.mediaupload.vo; - -import lombok.*; - -import java.util.*; - -import com.alibaba.excel.annotation.ExcelProperty; - -/** - * 微信素材上传表 Excel VO - * - * @author 芋道源码 - */ -@Data -public class WxMediaUploadExcelVO { - - @ExcelProperty("主键") - private Integer id; - - @ExcelProperty("类型") - private String type; - - @ExcelProperty("图片URL") - private String url; - - @ExcelProperty("素材ID") - private String mediaId; - - @ExcelProperty("缩略图素材ID") - private String thumbMediaId; - - @ExcelProperty("微信账号ID") - private String wxAccountId; - - @ExcelProperty("创建时间") - private Date createTime; - -} diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadExportReqVO.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadExportReqVO.java deleted file mode 100644 index a5d412eb2..000000000 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadExportReqVO.java +++ /dev/null @@ -1,39 +0,0 @@ -package cn.iocoder.yudao.module.mp.controller.admin.mediaupload.vo; - -import lombok.*; - -import java.util.*; - -import io.swagger.annotations.*; -import org.springframework.format.annotation.DateTimeFormat; - -import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; - -@ApiModel(value = "管理后台 - 微信素材上传表 Excel 导出 Request VO", description = "参数和 WxMediaUploadPageReqVO 是一致的") -@Data -public class WxMediaUploadExportReqVO { - - @ApiModelProperty(value = "类型") - private String type; - - @ApiModelProperty(value = "图片URL") - private String url; - - @ApiModelProperty(value = "素材ID") - private String mediaId; - - @ApiModelProperty(value = "缩略图素材ID") - private String thumbMediaId; - - @ApiModelProperty(value = "微信账号ID") - private String wxAccountId; - - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "开始创建时间") - private Date beginCreateTime; - - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "结束创建时间") - private Date endCreateTime; - -} diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadPageReqVO.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadPageReqVO.java deleted file mode 100644 index 32a4c17a1..000000000 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadPageReqVO.java +++ /dev/null @@ -1,42 +0,0 @@ -package cn.iocoder.yudao.module.mp.controller.admin.mediaupload.vo; - -import lombok.*; - -import java.util.*; - -import io.swagger.annotations.*; -import cn.iocoder.yudao.framework.common.pojo.PageParam; -import org.springframework.format.annotation.DateTimeFormat; - -import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; - -@ApiModel("管理后台 - 微信素材上传表 分页 Request VO") -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class WxMediaUploadPageReqVO extends PageParam { - - @ApiModelProperty(value = "类型") - private String type; - - @ApiModelProperty(value = "图片URL") - private String url; - - @ApiModelProperty(value = "素材ID") - private String mediaId; - - @ApiModelProperty(value = "缩略图素材ID") - private String thumbMediaId; - - @ApiModelProperty(value = "微信账号ID") - private String wxAccountId; - - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "开始创建时间") - private Date beginCreateTime; - - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "结束创建时间") - private Date endCreateTime; - -} diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadRespVO.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadRespVO.java deleted file mode 100644 index e2e173081..000000000 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadRespVO.java +++ /dev/null @@ -1,21 +0,0 @@ -package cn.iocoder.yudao.module.mp.controller.admin.mediaupload.vo; - -import lombok.*; - -import java.util.*; - -import io.swagger.annotations.*; - -@ApiModel("管理后台 - 微信素材上传表 Response VO") -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class WxMediaUploadRespVO extends WxMediaUploadBaseVO { - - @ApiModelProperty(value = "主键", required = true) - private Integer id; - - @ApiModelProperty(value = "创建时间", required = true) - private Date createTime; - -} diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadUpdateReqVO.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadUpdateReqVO.java deleted file mode 100644 index a094a1481..000000000 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/mediaupload/vo/WxMediaUploadUpdateReqVO.java +++ /dev/null @@ -1,18 +0,0 @@ -package cn.iocoder.yudao.module.mp.controller.admin.mediaupload.vo; - -import lombok.*; -import io.swagger.annotations.*; - -import javax.validation.constraints.*; - -@ApiModel("管理后台 - 微信素材上传表 更新 Request VO") -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class WxMediaUploadUpdateReqVO extends WxMediaUploadBaseVO { - - @ApiModelProperty(value = "主键", required = true) - @NotNull(message = "主键不能为空") - private Integer id; - -} diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/WxReceiveTextController.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/WxReceiveTextController.java deleted file mode 100644 index a1a0aa51e..000000000 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/WxReceiveTextController.java +++ /dev/null @@ -1,103 +0,0 @@ -package cn.iocoder.yudao.module.mp.controller.admin.receivetext; - -import org.springframework.web.bind.annotation.*; - -import javax.annotation.Resource; - -import org.springframework.validation.annotation.Validated; -import org.springframework.security.access.prepost.PreAuthorize; -import io.swagger.annotations.*; - -import javax.validation.*; -import javax.servlet.http.*; -import java.util.*; -import java.io.IOException; - -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.common.pojo.CommonResult; - -import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; - -import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; - -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; - -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*; - -import cn.iocoder.yudao.module.mp.controller.admin.receivetext.vo.*; -import cn.iocoder.yudao.module.mp.dal.dataobject.receivetext.WxReceiveTextDO; -import cn.iocoder.yudao.module.mp.convert.receivetext.WxReceiveTextConvert; -import cn.iocoder.yudao.module.mp.service.receivetext.WxReceiveTextService; - -@Api(tags = "管理后台 - 回复关键字") -@RestController -@RequestMapping("/wechatMp/wx-receive-text") -@Validated -public class WxReceiveTextController { - - @Resource - private WxReceiveTextService wxReceiveTextService; - - @PostMapping("/create") - @ApiOperation("创建回复关键字") - @PreAuthorize("@ss.hasPermission('wechatMp:wx-receive-text:create')") - public CommonResult createWxReceiveText(@Valid @RequestBody WxReceiveTextCreateReqVO createReqVO) { - return success(wxReceiveTextService.createWxReceiveText(createReqVO)); - } - - @PutMapping("/update") - @ApiOperation("更新回复关键字") - @PreAuthorize("@ss.hasPermission('wechatMp:wx-receive-text:update')") - public CommonResult updateWxReceiveText(@Valid @RequestBody WxReceiveTextUpdateReqVO updateReqVO) { - wxReceiveTextService.updateWxReceiveText(updateReqVO); - return success(true); - } - - @DeleteMapping("/delete") - @ApiOperation("删除回复关键字") - @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Integer.class) - @PreAuthorize("@ss.hasPermission('wechatMp:wx-receive-text:delete')") - public CommonResult deleteWxReceiveText(@RequestParam("id") Integer id) { - wxReceiveTextService.deleteWxReceiveText(id); - return success(true); - } - - @GetMapping("/get") - @ApiOperation("获得回复关键字") - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Integer.class) - @PreAuthorize("@ss.hasPermission('wechatMp:wx-receive-text:query')") - public CommonResult getWxReceiveText(@RequestParam("id") Integer id) { - WxReceiveTextDO wxReceiveText = wxReceiveTextService.getWxReceiveText(id); - return success(WxReceiveTextConvert.INSTANCE.convert(wxReceiveText)); - } - - @GetMapping("/list") - @ApiOperation("获得回复关键字列表") - @ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class) - @PreAuthorize("@ss.hasPermission('wechatMp:wx-receive-text:query')") - public CommonResult> getWxReceiveTextList(@RequestParam("ids") Collection ids) { - List list = wxReceiveTextService.getWxReceiveTextList(ids); - return success(WxReceiveTextConvert.INSTANCE.convertList(list)); - } - - @GetMapping("/page") - @ApiOperation("获得回复关键字分页") - @PreAuthorize("@ss.hasPermission('wechatMp:wx-receive-text:query')") - public CommonResult> getWxReceiveTextPage(@Valid WxReceiveTextPageReqVO pageVO) { - PageResult pageResult = wxReceiveTextService.getWxReceiveTextPage(pageVO); - return success(WxReceiveTextConvert.INSTANCE.convertPage(pageResult)); - } - - @GetMapping("/export-excel") - @ApiOperation("导出回复关键字 Excel") - @PreAuthorize("@ss.hasPermission('wechatMp:wx-receive-text:export')") - @OperateLog(type = EXPORT) - public void exportWxReceiveTextExcel(@Valid WxReceiveTextExportReqVO exportReqVO, - HttpServletResponse response) throws IOException { - List list = wxReceiveTextService.getWxReceiveTextList(exportReqVO); - // 导出 Excel - List datas = WxReceiveTextConvert.INSTANCE.convertList02(list); - ExcelUtils.write(response, "回复关键字.xls", "数据", WxReceiveTextExcelVO.class, datas); - } - -} diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextBaseVO.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextBaseVO.java deleted file mode 100644 index 0eaf5976c..000000000 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextBaseVO.java +++ /dev/null @@ -1,25 +0,0 @@ -package cn.iocoder.yudao.module.mp.controller.admin.receivetext.vo; - -import lombok.*; -import io.swagger.annotations.*; - -/** - * 回复关键字 Base VO,提供给添加、修改、详细的子 VO 使用 - * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 - */ -@Data -public class WxReceiveTextBaseVO { - - @ApiModelProperty(value = "关键字") - private String receiveText; - - @ApiModelProperty(value = "消息类型 1文本消息;2图文消息;") - private String msgType; - - @ApiModelProperty(value = "模板ID") - private String tplId; - - @ApiModelProperty(value = "微信账号ID") - private String wxAccountId; - -} diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextCreateReqVO.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextCreateReqVO.java deleted file mode 100644 index ca654b3eb..000000000 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextCreateReqVO.java +++ /dev/null @@ -1,12 +0,0 @@ -package cn.iocoder.yudao.module.mp.controller.admin.receivetext.vo; - -import lombok.*; -import io.swagger.annotations.*; - -@ApiModel("管理后台 - 回复关键字创建 Request VO") -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class WxReceiveTextCreateReqVO extends WxReceiveTextBaseVO { - -} diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextExcelVO.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextExcelVO.java deleted file mode 100644 index 407029afc..000000000 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextExcelVO.java +++ /dev/null @@ -1,35 +0,0 @@ -package cn.iocoder.yudao.module.mp.controller.admin.receivetext.vo; - -import lombok.*; - -import java.util.*; - -import com.alibaba.excel.annotation.ExcelProperty; - -/** - * 回复关键字 Excel VO - * - * @author 芋道源码 - */ -@Data -public class WxReceiveTextExcelVO { - - @ExcelProperty("主键") - private Integer id; - - @ExcelProperty("关键字") - private String receiveText; - - @ExcelProperty("消息类型 1文本消息;2图文消息;") - private String msgType; - - @ExcelProperty("模板ID") - private String tplId; - - @ExcelProperty("微信账号ID") - private String wxAccountId; - - @ExcelProperty("创建时间") - private Date createTime; - -} diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextExportReqVO.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextExportReqVO.java deleted file mode 100644 index b511b0aef..000000000 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextExportReqVO.java +++ /dev/null @@ -1,36 +0,0 @@ -package cn.iocoder.yudao.module.mp.controller.admin.receivetext.vo; - -import lombok.*; - -import java.util.*; - -import io.swagger.annotations.*; -import org.springframework.format.annotation.DateTimeFormat; - -import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; - -@ApiModel(value = "管理后台 - 回复关键字 Excel 导出 Request VO", description = "参数和 WxReceiveTextPageReqVO 是一致的") -@Data -public class WxReceiveTextExportReqVO { - - @ApiModelProperty(value = "关键字") - private String receiveText; - - @ApiModelProperty(value = "消息类型 1文本消息;2图文消息;") - private String msgType; - - @ApiModelProperty(value = "模板ID") - private String tplId; - - @ApiModelProperty(value = "微信账号ID") - private String wxAccountId; - - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "开始创建时间") - private Date beginCreateTime; - - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "结束创建时间") - private Date endCreateTime; - -} diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextPageReqVO.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextPageReqVO.java deleted file mode 100644 index 373a8cd51..000000000 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextPageReqVO.java +++ /dev/null @@ -1,39 +0,0 @@ -package cn.iocoder.yudao.module.mp.controller.admin.receivetext.vo; - -import lombok.*; - -import java.util.*; - -import io.swagger.annotations.*; -import cn.iocoder.yudao.framework.common.pojo.PageParam; -import org.springframework.format.annotation.DateTimeFormat; - -import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; - -@ApiModel("管理后台 - 回复关键字分页 Request VO") -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class WxReceiveTextPageReqVO extends PageParam { - - @ApiModelProperty(value = "关键字") - private String receiveText; - - @ApiModelProperty(value = "消息类型 1文本消息;2图文消息;") - private String msgType; - - @ApiModelProperty(value = "模板ID") - private String tplId; - - @ApiModelProperty(value = "微信账号ID") - private String wxAccountId; - - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "开始创建时间") - private Date beginCreateTime; - - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "结束创建时间") - private Date endCreateTime; - -} diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextRespVO.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextRespVO.java deleted file mode 100644 index 12c36056e..000000000 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextRespVO.java +++ /dev/null @@ -1,21 +0,0 @@ -package cn.iocoder.yudao.module.mp.controller.admin.receivetext.vo; - -import lombok.*; - -import java.util.*; - -import io.swagger.annotations.*; - -@ApiModel("管理后台 - 回复关键字 Response VO") -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class WxReceiveTextRespVO extends WxReceiveTextBaseVO { - - @ApiModelProperty(value = "主键", required = true) - private Integer id; - - @ApiModelProperty(value = "创建时间", required = true) - private Date createTime; - -} diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextUpdateReqVO.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextUpdateReqVO.java deleted file mode 100644 index 6abc53551..000000000 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/receivetext/vo/WxReceiveTextUpdateReqVO.java +++ /dev/null @@ -1,18 +0,0 @@ -package cn.iocoder.yudao.module.mp.controller.admin.receivetext.vo; - -import lombok.*; -import io.swagger.annotations.*; - -import javax.validation.constraints.*; - -@ApiModel("管理后台 - 回复关键字更新 Request VO") -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class WxReceiveTextUpdateReqVO extends WxReceiveTextBaseVO { - - @ApiModelProperty(value = "主键", required = true) - @NotNull(message = "主键不能为空") - private Integer id; - -} diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/WxTextTemplateController.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/WxTextTemplateController.java deleted file mode 100644 index c6428a03f..000000000 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/WxTextTemplateController.java +++ /dev/null @@ -1,103 +0,0 @@ -package cn.iocoder.yudao.module.mp.controller.admin.texttemplate; - -import org.springframework.web.bind.annotation.*; - -import javax.annotation.Resource; - -import org.springframework.validation.annotation.Validated; -import org.springframework.security.access.prepost.PreAuthorize; -import io.swagger.annotations.*; - -import javax.validation.*; -import javax.servlet.http.*; -import java.util.*; -import java.io.IOException; - -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.common.pojo.CommonResult; - -import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; - -import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; - -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; - -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*; - -import cn.iocoder.yudao.module.mp.controller.admin.texttemplate.vo.*; -import cn.iocoder.yudao.module.mp.dal.dataobject.texttemplate.WxTextTemplateDO; -import cn.iocoder.yudao.module.mp.convert.texttemplate.WxTextTemplateConvert; -import cn.iocoder.yudao.module.mp.service.texttemplate.WxTextTemplateService; - -@Api(tags = "管理后台 - 文本模板") -@RestController -@RequestMapping("/wechatMp/wx-text-template") -@Validated -public class WxTextTemplateController { - - @Resource - private WxTextTemplateService wxTextTemplateService; - - @PostMapping("/create") - @ApiOperation("创建文本模板") - @PreAuthorize("@ss.hasPermission('wechatMp:wx-text-template:create')") - public CommonResult createWxTextTemplate(@Valid @RequestBody WxTextTemplateCreateReqVO createReqVO) { - return success(wxTextTemplateService.createWxTextTemplate(createReqVO)); - } - - @PutMapping("/update") - @ApiOperation("更新文本模板") - @PreAuthorize("@ss.hasPermission('wechatMp:wx-text-template:update')") - public CommonResult updateWxTextTemplate(@Valid @RequestBody WxTextTemplateUpdateReqVO updateReqVO) { - wxTextTemplateService.updateWxTextTemplate(updateReqVO); - return success(true); - } - - @DeleteMapping("/delete") - @ApiOperation("删除文本模板") - @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Integer.class) - @PreAuthorize("@ss.hasPermission('wechatMp:wx-text-template:delete')") - public CommonResult deleteWxTextTemplate(@RequestParam("id") Integer id) { - wxTextTemplateService.deleteWxTextTemplate(id); - return success(true); - } - - @GetMapping("/get") - @ApiOperation("获得文本模板") - @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Integer.class) - @PreAuthorize("@ss.hasPermission('wechatMp:wx-text-template:query')") - public CommonResult getWxTextTemplate(@RequestParam("id") Integer id) { - WxTextTemplateDO wxTextTemplate = wxTextTemplateService.getWxTextTemplate(id); - return success(WxTextTemplateConvert.INSTANCE.convert(wxTextTemplate)); - } - - @GetMapping("/list") - @ApiOperation("获得文本模板列表") - @ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class) - @PreAuthorize("@ss.hasPermission('wechatMp:wx-text-template:query')") - public CommonResult> getWxTextTemplateList(@RequestParam("ids") Collection ids) { - List list = wxTextTemplateService.getWxTextTemplateList(ids); - return success(WxTextTemplateConvert.INSTANCE.convertList(list)); - } - - @GetMapping("/page") - @ApiOperation("获得文本模板分页") - @PreAuthorize("@ss.hasPermission('wechatMp:wx-text-template:query')") - public CommonResult> getWxTextTemplatePage(@Valid WxTextTemplatePageReqVO pageVO) { - PageResult pageResult = wxTextTemplateService.getWxTextTemplatePage(pageVO); - return success(WxTextTemplateConvert.INSTANCE.convertPage(pageResult)); - } - - @GetMapping("/export-excel") - @ApiOperation("导出文本模板 Excel") - @PreAuthorize("@ss.hasPermission('wechatMp:wx-text-template:export')") - @OperateLog(type = EXPORT) - public void exportWxTextTemplateExcel(@Valid WxTextTemplateExportReqVO exportReqVO, - HttpServletResponse response) throws IOException { - List list = wxTextTemplateService.getWxTextTemplateList(exportReqVO); - // 导出 Excel - List datas = WxTextTemplateConvert.INSTANCE.convertList02(list); - ExcelUtils.write(response, "文本模板.xls", "数据", WxTextTemplateExcelVO.class, datas); - } - -} diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplateBaseVO.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplateBaseVO.java deleted file mode 100644 index 38b9cd9d2..000000000 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplateBaseVO.java +++ /dev/null @@ -1,19 +0,0 @@ -package cn.iocoder.yudao.module.mp.controller.admin.texttemplate.vo; - -import lombok.*; -import io.swagger.annotations.*; - -/** - * 文本模板 Base VO,提供给添加、修改、详细的子 VO 使用 - * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 - */ -@Data -public class WxTextTemplateBaseVO { - - @ApiModelProperty(value = "模板名字") - private String tplName; - - @ApiModelProperty(value = "模板内容") - private String content; - -} diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplateCreateReqVO.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplateCreateReqVO.java deleted file mode 100644 index 1ec6c0268..000000000 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplateCreateReqVO.java +++ /dev/null @@ -1,12 +0,0 @@ -package cn.iocoder.yudao.module.mp.controller.admin.texttemplate.vo; - -import lombok.*; -import io.swagger.annotations.*; - -@ApiModel("管理后台 - 文本模板创建 Request VO") -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class WxTextTemplateCreateReqVO extends WxTextTemplateBaseVO { - -} diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplateExcelVO.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplateExcelVO.java deleted file mode 100644 index 4d0389059..000000000 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplateExcelVO.java +++ /dev/null @@ -1,29 +0,0 @@ -package cn.iocoder.yudao.module.mp.controller.admin.texttemplate.vo; - -import lombok.*; - -import java.util.*; - -import com.alibaba.excel.annotation.ExcelProperty; - -/** - * 文本模板 Excel VO - * - * @author 芋道源码 - */ -@Data -public class WxTextTemplateExcelVO { - - @ExcelProperty("主键") - private Integer id; - - @ExcelProperty("模板名字") - private String tplName; - - @ExcelProperty("模板内容") - private String content; - - @ExcelProperty("创建时间") - private Date createTime; - -} diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplateExportReqVO.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplateExportReqVO.java deleted file mode 100644 index 0bc6467da..000000000 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplateExportReqVO.java +++ /dev/null @@ -1,30 +0,0 @@ -package cn.iocoder.yudao.module.mp.controller.admin.texttemplate.vo; - -import lombok.*; - -import java.util.*; - -import io.swagger.annotations.*; -import org.springframework.format.annotation.DateTimeFormat; - -import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; - -@ApiModel(value = "管理后台 - 文本模板 Excel 导出 Request VO", description = "参数和 WxTextTemplatePageReqVO 是一致的") -@Data -public class WxTextTemplateExportReqVO { - - @ApiModelProperty(value = "模板名字") - private String tplName; - - @ApiModelProperty(value = "模板内容") - private String content; - - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "开始创建时间") - private Date beginCreateTime; - - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "结束创建时间") - private Date endCreateTime; - -} diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplatePageReqVO.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplatePageReqVO.java deleted file mode 100644 index 0bcbaf468..000000000 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplatePageReqVO.java +++ /dev/null @@ -1,33 +0,0 @@ -package cn.iocoder.yudao.module.mp.controller.admin.texttemplate.vo; - -import lombok.*; - -import java.util.*; - -import io.swagger.annotations.*; -import cn.iocoder.yudao.framework.common.pojo.PageParam; -import org.springframework.format.annotation.DateTimeFormat; - -import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; - -@ApiModel("管理后台 - 文本模板分页 Request VO") -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class WxTextTemplatePageReqVO extends PageParam { - - @ApiModelProperty(value = "模板名字") - private String tplName; - - @ApiModelProperty(value = "模板内容") - private String content; - - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "开始创建时间") - private Date beginCreateTime; - - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @ApiModelProperty(value = "结束创建时间") - private Date endCreateTime; - -} diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplateRespVO.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplateRespVO.java deleted file mode 100644 index b12c5a23c..000000000 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplateRespVO.java +++ /dev/null @@ -1,21 +0,0 @@ -package cn.iocoder.yudao.module.mp.controller.admin.texttemplate.vo; - -import lombok.*; - -import java.util.*; - -import io.swagger.annotations.*; - -@ApiModel("管理后台 - 文本模板 Response VO") -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class WxTextTemplateRespVO extends WxTextTemplateBaseVO { - - @ApiModelProperty(value = "主键", required = true) - private Integer id; - - @ApiModelProperty(value = "创建时间", required = true) - private Date createTime; - -} diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplateUpdateReqVO.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplateUpdateReqVO.java deleted file mode 100644 index 0de0a2c5b..000000000 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/texttemplate/vo/WxTextTemplateUpdateReqVO.java +++ /dev/null @@ -1,18 +0,0 @@ -package cn.iocoder.yudao.module.mp.controller.admin.texttemplate.vo; - -import lombok.*; -import io.swagger.annotations.*; - -import javax.validation.constraints.*; - -@ApiModel("管理后台 - 文本模板更新 Request VO") -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class WxTextTemplateUpdateReqVO extends WxTextTemplateBaseVO { - - @ApiModelProperty(value = "主键", required = true) - @NotNull(message = "主键不能为空") - private Integer id; - -} diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/mediaupload/WxMediaUploadConvert.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/mediaupload/WxMediaUploadConvert.java deleted file mode 100644 index ba2855d8b..000000000 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/mediaupload/WxMediaUploadConvert.java +++ /dev/null @@ -1,34 +0,0 @@ -package cn.iocoder.yudao.module.mp.convert.mediaupload; - -import java.util.*; - -import cn.iocoder.yudao.framework.common.pojo.PageResult; - -import org.mapstruct.Mapper; -import org.mapstruct.factory.Mappers; -import cn.iocoder.yudao.module.mp.controller.admin.mediaupload.vo.*; -import cn.iocoder.yudao.module.mp.dal.dataobject.mediaupload.WxMediaUploadDO; - -/** - * 微信素材上传表 Convert - * - * @author 芋道源码 - */ -@Mapper -public interface WxMediaUploadConvert { - - WxMediaUploadConvert INSTANCE = Mappers.getMapper(WxMediaUploadConvert.class); - - WxMediaUploadDO convert(WxMediaUploadCreateReqVO bean); - - WxMediaUploadDO convert(WxMediaUploadUpdateReqVO bean); - - WxMediaUploadRespVO convert(WxMediaUploadDO bean); - - List convertList(List list); - - PageResult convertPage(PageResult page); - - List convertList02(List list); - -} diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/receivetext/WxReceiveTextConvert.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/receivetext/WxReceiveTextConvert.java deleted file mode 100644 index 24b9dc505..000000000 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/receivetext/WxReceiveTextConvert.java +++ /dev/null @@ -1,34 +0,0 @@ -package cn.iocoder.yudao.module.mp.convert.receivetext; - -import java.util.*; - -import cn.iocoder.yudao.framework.common.pojo.PageResult; - -import org.mapstruct.Mapper; -import org.mapstruct.factory.Mappers; -import cn.iocoder.yudao.module.mp.controller.admin.receivetext.vo.*; -import cn.iocoder.yudao.module.mp.dal.dataobject.receivetext.WxReceiveTextDO; - -/** - * 回复关键字 Convert - * - * @author 芋道源码 - */ -@Mapper -public interface WxReceiveTextConvert { - - WxReceiveTextConvert INSTANCE = Mappers.getMapper(WxReceiveTextConvert.class); - - WxReceiveTextDO convert(WxReceiveTextCreateReqVO bean); - - WxReceiveTextDO convert(WxReceiveTextUpdateReqVO bean); - - WxReceiveTextRespVO convert(WxReceiveTextDO bean); - - List convertList(List list); - - PageResult convertPage(PageResult page); - - List convertList02(List list); - -} diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/texttemplate/WxTextTemplateConvert.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/texttemplate/WxTextTemplateConvert.java deleted file mode 100644 index 6c71f80d8..000000000 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/convert/texttemplate/WxTextTemplateConvert.java +++ /dev/null @@ -1,34 +0,0 @@ -package cn.iocoder.yudao.module.mp.convert.texttemplate; - -import java.util.*; - -import cn.iocoder.yudao.framework.common.pojo.PageResult; - -import org.mapstruct.Mapper; -import org.mapstruct.factory.Mappers; -import cn.iocoder.yudao.module.mp.controller.admin.texttemplate.vo.*; -import cn.iocoder.yudao.module.mp.dal.dataobject.texttemplate.WxTextTemplateDO; - -/** - * 文本模板 Convert - * - * @author 芋道源码 - */ -@Mapper -public interface WxTextTemplateConvert { - - WxTextTemplateConvert INSTANCE = Mappers.getMapper(WxTextTemplateConvert.class); - - WxTextTemplateDO convert(WxTextTemplateCreateReqVO bean); - - WxTextTemplateDO convert(WxTextTemplateUpdateReqVO bean); - - WxTextTemplateRespVO convert(WxTextTemplateDO bean); - - List convertList(List list); - - PageResult convertPage(PageResult page); - - List convertList02(List list); - -} diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/mediaupload/WxMediaUploadDO.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/mediaupload/WxMediaUploadDO.java deleted file mode 100644 index 41e8be32d..000000000 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/mediaupload/WxMediaUploadDO.java +++ /dev/null @@ -1,51 +0,0 @@ -package cn.iocoder.yudao.module.mp.dal.dataobject.mediaupload; - -import lombok.*; - -import java.util.*; - -import com.baomidou.mybatisplus.annotation.*; -import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; - -/** - * 微信素材上传表 DO - * - * @author 芋道源码 - */ -@TableName("wx_media_upload") -@KeySequence("wx_media_upload_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -@Builder -@NoArgsConstructor -@AllArgsConstructor -public class WxMediaUploadDO extends BaseDO { - - /** - * 主键 - */ - @TableId - private Integer id; - /** - * 类型 - */ - private String type; - /** - * 图片URL - */ - private String url; - /** - * 素材ID - */ - private String mediaId; - /** - * 缩略图素材ID - */ - private String thumbMediaId; - /** - * 微信账号ID - */ - private String wxAccountId; - -} diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/message/MpAutoReplyDO.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/message/MpAutoReplyDO.java new file mode 100644 index 000000000..5a698f0ac --- /dev/null +++ b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/message/MpAutoReplyDO.java @@ -0,0 +1,95 @@ +package cn.iocoder.yudao.module.mp.dal.dataobject.message; + +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.module.mp.dal.dataobject.account.MpAccountDO; +import cn.iocoder.yudao.module.mp.enums.message.MpAutoReplyMatchEnum; +import cn.iocoder.yudao.module.mp.enums.message.MpAutoReplyTypeEnum; +import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import me.chanjar.weixin.common.api.WxConsts; +import me.chanjar.weixin.common.api.WxConsts.XmlMsgType; + +/** + * 微信消息自动回复 DO + * + * @author 芋道源码 + */ +@TableName(value = "mp_auto_reply", autoResultMap = true) +@KeySequence("mp_auto_reply_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class MpAutoReplyDO extends BaseDO { + + /** + * 主键 + */ + @TableId + private Long id; + /** + * 微信公众号 ID + * + * 关联 {@link MpAccountDO#getId()} + */ + private Long accountId; + /** + * 微信公众号 appid + * + * 冗余 {@link MpAccountDO#getAppId()} + */ + private String appId; + + /** + * 回复类型 + * + * 枚举 {@link MpAutoReplyTypeEnum} + */ + private Integer type; + + // ==================== 请求消息 ==================== + + /** + * 请求的关键字 + * + * 当 {@link #type} 为 {@link MpAutoReplyTypeEnum#KEYWORD} + */ + private String requestKeyword; + /** + * 请求的关键字的匹配 + * + * 当 {@link #type} 为 {@link MpAutoReplyTypeEnum#KEYWORD} + * + * 枚举 {@link MpAutoReplyMatchEnum} + */ + private Integer requestMatch; + + /** + * 请求的消息类型 + * + * 当 {@link #type} 为 {@link MpAutoReplyTypeEnum#MESSAGE} + * + * 枚举 {@link XmlMsgType} 中的 TEXT、IMAGE、VOICE、VIDEO、SHORTVIDEO、LOCATION、LINK + */ + private String requestMessageType; + + // ==================== 响应消息 ==================== + + /** + * 回复的消息类型 + * + * 枚举 {@link XmlMsgType} 中的 TEXT、IMAGE、VOICE、VIDEO、NEWS + */ + private String responseMessageType; + + /** + * 回复的消息内容 + * + * 消息类型为 {@link WxConsts.XmlMsgType} 的 TEXT + */ + private String responseContent; + +} diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/message/MpMessageDO.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/message/MpMessageDO.java index aead89058..5fb62f0d3 100644 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/message/MpMessageDO.java +++ b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/message/MpMessageDO.java @@ -20,9 +20,6 @@ import me.chanjar.weixin.common.api.WxConsts; @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) -@Builder -@NoArgsConstructor -@AllArgsConstructor public class MpMessageDO extends BaseDO { /** diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/receivetext/WxReceiveTextDO.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/receivetext/WxReceiveTextDO.java deleted file mode 100644 index 49fd62905..000000000 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/receivetext/WxReceiveTextDO.java +++ /dev/null @@ -1,47 +0,0 @@ -package cn.iocoder.yudao.module.mp.dal.dataobject.receivetext; - -import lombok.*; - -import java.util.*; - -import com.baomidou.mybatisplus.annotation.*; -import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; - -/** - * 回复关键字 DO - * - * @author 芋道源码 - */ -@TableName("wx_receive_text") -@KeySequence("wx_receive_text_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -@Builder -@NoArgsConstructor -@AllArgsConstructor -public class WxReceiveTextDO extends BaseDO { - - /** - * 主键 - */ - @TableId - private Integer id; - /** - * 关键字 - */ - private String receiveText; - /** - * 消息类型 1文本消息;2图文消息; - */ - private String msgType; - /** - * 模板ID - */ - private String tplId; - /** - * 微信账号ID - */ - private String wxAccountId; - -} diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/texttemplate/WxTextTemplateDO.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/texttemplate/WxTextTemplateDO.java deleted file mode 100644 index afa46f9f7..000000000 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/dataobject/texttemplate/WxTextTemplateDO.java +++ /dev/null @@ -1,39 +0,0 @@ -package cn.iocoder.yudao.module.mp.dal.dataobject.texttemplate; - -import lombok.*; - -import java.util.*; - -import com.baomidou.mybatisplus.annotation.*; -import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; - -/** - * 文本模板 DO - * - * @author 芋道源码 - */ -@TableName("wx_text_template") -@KeySequence("wx_text_template_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -@Builder -@NoArgsConstructor -@AllArgsConstructor -public class WxTextTemplateDO extends BaseDO { - - /** - * 主键 - */ - @TableId - private Integer id; - /** - * 模板名字 - */ - private String tplName; - /** - * 模板内容 - */ - private String content; - -} diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/mediaupload/WxMediaUploadMapper.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/mediaupload/WxMediaUploadMapper.java deleted file mode 100644 index 64d6db6ca..000000000 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/mediaupload/WxMediaUploadMapper.java +++ /dev/null @@ -1,42 +0,0 @@ -package cn.iocoder.yudao.module.mp.dal.mysql.mediaupload; - -import java.util.*; - -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; -import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; -import cn.iocoder.yudao.module.mp.dal.dataobject.mediaupload.WxMediaUploadDO; -import org.apache.ibatis.annotations.Mapper; -import cn.iocoder.yudao.module.mp.controller.admin.mediaupload.vo.*; - -/** - * 微信素材上传表 Mapper - * - * @author 芋道源码 - */ -@Mapper -public interface WxMediaUploadMapper extends BaseMapperX { - - default PageResult selectPage(WxMediaUploadPageReqVO reqVO) { - return selectPage(reqVO, new LambdaQueryWrapperX() - .eqIfPresent(WxMediaUploadDO::getType, reqVO.getType()) - .eqIfPresent(WxMediaUploadDO::getUrl, reqVO.getUrl()) - .eqIfPresent(WxMediaUploadDO::getMediaId, reqVO.getMediaId()) - .eqIfPresent(WxMediaUploadDO::getThumbMediaId, reqVO.getThumbMediaId()) - .eqIfPresent(WxMediaUploadDO::getWxAccountId, reqVO.getWxAccountId()) - .betweenIfPresent(WxMediaUploadDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) - .orderByDesc(WxMediaUploadDO::getId)); - } - - default List selectList(WxMediaUploadExportReqVO reqVO) { - return selectList(new LambdaQueryWrapperX() - .eqIfPresent(WxMediaUploadDO::getType, reqVO.getType()) - .eqIfPresent(WxMediaUploadDO::getUrl, reqVO.getUrl()) - .eqIfPresent(WxMediaUploadDO::getMediaId, reqVO.getMediaId()) - .eqIfPresent(WxMediaUploadDO::getThumbMediaId, reqVO.getThumbMediaId()) - .eqIfPresent(WxMediaUploadDO::getWxAccountId, reqVO.getWxAccountId()) - .betweenIfPresent(WxMediaUploadDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) - .orderByDesc(WxMediaUploadDO::getId)); - } - -} diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/receivetext/WxReceiveTextMapper.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/receivetext/WxReceiveTextMapper.java deleted file mode 100644 index 3cf1f7478..000000000 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/receivetext/WxReceiveTextMapper.java +++ /dev/null @@ -1,40 +0,0 @@ -package cn.iocoder.yudao.module.mp.dal.mysql.receivetext; - -import java.util.*; - -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; -import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; -import cn.iocoder.yudao.module.mp.dal.dataobject.receivetext.WxReceiveTextDO; -import org.apache.ibatis.annotations.Mapper; -import cn.iocoder.yudao.module.mp.controller.admin.receivetext.vo.*; - -/** - * 回复关键字 Mapper - * - * @author 芋道源码 - */ -@Mapper -public interface WxReceiveTextMapper extends BaseMapperX { - - default PageResult selectPage(WxReceiveTextPageReqVO reqVO) { - return selectPage(reqVO, new LambdaQueryWrapperX() - .eqIfPresent(WxReceiveTextDO::getReceiveText, reqVO.getReceiveText()) - .eqIfPresent(WxReceiveTextDO::getMsgType, reqVO.getMsgType()) - .eqIfPresent(WxReceiveTextDO::getTplId, reqVO.getTplId()) - .eqIfPresent(WxReceiveTextDO::getWxAccountId, reqVO.getWxAccountId()) - .betweenIfPresent(WxReceiveTextDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) - .orderByDesc(WxReceiveTextDO::getId)); - } - - default List selectList(WxReceiveTextExportReqVO reqVO) { - return selectList(new LambdaQueryWrapperX() - .eqIfPresent(WxReceiveTextDO::getReceiveText, reqVO.getReceiveText()) - .eqIfPresent(WxReceiveTextDO::getMsgType, reqVO.getMsgType()) - .eqIfPresent(WxReceiveTextDO::getTplId, reqVO.getTplId()) - .eqIfPresent(WxReceiveTextDO::getWxAccountId, reqVO.getWxAccountId()) - .betweenIfPresent(WxReceiveTextDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) - .orderByDesc(WxReceiveTextDO::getId)); - } - -} diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/texttemplate/WxTextTemplateMapper.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/texttemplate/WxTextTemplateMapper.java deleted file mode 100644 index 14c3eb305..000000000 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/dal/mysql/texttemplate/WxTextTemplateMapper.java +++ /dev/null @@ -1,36 +0,0 @@ -package cn.iocoder.yudao.module.mp.dal.mysql.texttemplate; - -import java.util.*; - -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; -import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; -import cn.iocoder.yudao.module.mp.dal.dataobject.texttemplate.WxTextTemplateDO; -import org.apache.ibatis.annotations.Mapper; -import cn.iocoder.yudao.module.mp.controller.admin.texttemplate.vo.*; - -/** - * 文本模板 Mapper - * - * @author 芋道源码 - */ -@Mapper -public interface WxTextTemplateMapper extends BaseMapperX { - - default PageResult selectPage(WxTextTemplatePageReqVO reqVO) { - return selectPage(reqVO, new LambdaQueryWrapperX() - .likeIfPresent(WxTextTemplateDO::getTplName, reqVO.getTplName()) - .eqIfPresent(WxTextTemplateDO::getContent, reqVO.getContent()) - .betweenIfPresent(WxTextTemplateDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) - .orderByDesc(WxTextTemplateDO::getId)); - } - - default List selectList(WxTextTemplateExportReqVO reqVO) { - return selectList(new LambdaQueryWrapperX() - .likeIfPresent(WxTextTemplateDO::getTplName, reqVO.getTplName()) - .eqIfPresent(WxTextTemplateDO::getContent, reqVO.getContent()) - .betweenIfPresent(WxTextTemplateDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) - .orderByDesc(WxTextTemplateDO::getId)); - } - -} diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/handler/message/MessageAutoReplyHandler.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/handler/message/MessageAutoReplyHandler.java index 29ee30922..19681b535 100644 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/handler/message/MessageAutoReplyHandler.java +++ b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/handler/message/MessageAutoReplyHandler.java @@ -46,6 +46,10 @@ public class MessageAutoReplyHandler implements WxMpMessageHandler { @Resource private FileApi fileApi; + // auto reply + // createMessage + // outmessage + @Override public WxMpXmlOutMessage handle(WxMpXmlMessage wxMessage, Map context, WxMpService weixinService, WxSessionManager sessionManager) { diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/mediaupload/WxMediaUploadService.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/mediaupload/WxMediaUploadService.java deleted file mode 100644 index c6c57bb4a..000000000 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/mediaupload/WxMediaUploadService.java +++ /dev/null @@ -1,71 +0,0 @@ -package cn.iocoder.yudao.module.mp.service.mediaupload; - -import java.util.*; -import javax.validation.*; - -import cn.iocoder.yudao.module.mp.controller.admin.mediaupload.vo.*; -import cn.iocoder.yudao.module.mp.dal.dataobject.mediaupload.WxMediaUploadDO; -import cn.iocoder.yudao.framework.common.pojo.PageResult; - -/** - * 微信素材上传表 Service 接口 - * - * @author 芋道源码 - */ -public interface WxMediaUploadService { - - /** - * 创建微信素材上传表 - * - * @param createReqVO 创建信息 - * @return 编号 - */ - Integer createWxMediaUpload(@Valid WxMediaUploadCreateReqVO createReqVO); - - /** - * 更新微信素材上传表 - * - * @param updateReqVO 更新信息 - */ - void updateWxMediaUpload(@Valid WxMediaUploadUpdateReqVO updateReqVO); - - /** - * 删除微信素材上传表 - * - * @param id 编号 - */ - void deleteWxMediaUpload(Integer id); - - /** - * 获得微信素材上传表 - * - * @param id 编号 - * @return 微信素材上传表 - */ - WxMediaUploadDO getWxMediaUpload(Integer id); - - /** - * 获得微信素材上传表 列表 - * - * @param ids 编号 - * @return 微信素材上传表 列表 - */ - List getWxMediaUploadList(Collection ids); - - /** - * 获得微信素材上传表 分页 - * - * @param pageReqVO 分页查询 - * @return 微信素材上传表 分页 - */ - PageResult getWxMediaUploadPage(WxMediaUploadPageReqVO pageReqVO); - - /** - * 获得微信素材上传表 列表, 用于 Excel 导出 - * - * @param exportReqVO 查询条件 - * @return 微信素材上传表 列表 - */ - List getWxMediaUploadList(WxMediaUploadExportReqVO exportReqVO); - -} diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/mediaupload/WxMediaUploadServiceImpl.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/mediaupload/WxMediaUploadServiceImpl.java deleted file mode 100644 index 84332756f..000000000 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/mediaupload/WxMediaUploadServiceImpl.java +++ /dev/null @@ -1,85 +0,0 @@ -package cn.iocoder.yudao.module.mp.service.mediaupload; - -import org.springframework.stereotype.Service; - -import javax.annotation.Resource; - -import org.springframework.validation.annotation.Validated; - -import java.util.*; - -import cn.iocoder.yudao.module.mp.controller.admin.mediaupload.vo.*; -import cn.iocoder.yudao.module.mp.dal.dataobject.mediaupload.WxMediaUploadDO; -import cn.iocoder.yudao.framework.common.pojo.PageResult; - -import cn.iocoder.yudao.module.mp.convert.mediaupload.WxMediaUploadConvert; -import cn.iocoder.yudao.module.mp.dal.mysql.mediaupload.WxMediaUploadMapper; - -import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; -import static cn.iocoder.yudao.module.mp.enums.ErrorCodeConstants.*; - -/** - * 微信素材上传表 Service 实现类 - * - * @author 芋道源码 - */ -@Service -@Validated -public class WxMediaUploadServiceImpl implements WxMediaUploadService { - - @Resource - private WxMediaUploadMapper wxMediaUploadMapper; - - @Override - public Integer createWxMediaUpload(WxMediaUploadCreateReqVO createReqVO) { - // 插入 - WxMediaUploadDO wxMediaUpload = WxMediaUploadConvert.INSTANCE.convert(createReqVO); - wxMediaUploadMapper.insert(wxMediaUpload); - // 返回 - return wxMediaUpload.getId(); - } - - @Override - public void updateWxMediaUpload(WxMediaUploadUpdateReqVO updateReqVO) { - // 校验存在 - this.validateWxMediaUploadExists(updateReqVO.getId()); - // 更新 - WxMediaUploadDO updateObj = WxMediaUploadConvert.INSTANCE.convert(updateReqVO); - wxMediaUploadMapper.updateById(updateObj); - } - - @Override - public void deleteWxMediaUpload(Integer id) { - // 校验存在 - this.validateWxMediaUploadExists(id); - // 删除 - wxMediaUploadMapper.deleteById(id); - } - - private void validateWxMediaUploadExists(Integer id) { - if (wxMediaUploadMapper.selectById(id) == null) { - throw exception(COMMON_NOT_EXISTS); - } - } - - @Override - public WxMediaUploadDO getWxMediaUpload(Integer id) { - return wxMediaUploadMapper.selectById(id); - } - - @Override - public List getWxMediaUploadList(Collection ids) { - return wxMediaUploadMapper.selectBatchIds(ids); - } - - @Override - public PageResult getWxMediaUploadPage(WxMediaUploadPageReqVO pageReqVO) { - return wxMediaUploadMapper.selectPage(pageReqVO); - } - - @Override - public List getWxMediaUploadList(WxMediaUploadExportReqVO exportReqVO) { - return wxMediaUploadMapper.selectList(exportReqVO); - } - -} diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/message/MpMessageService.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/message/MpMessageService.java index 1c9c152a4..e34f91bf3 100644 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/message/MpMessageService.java +++ b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/message/MpMessageService.java @@ -12,6 +12,7 @@ import me.chanjar.weixin.mp.bean.message.WxMpXmlMessage; */ public interface MpMessageService { + // TODO 芋艿:方法名要优化下 /** * 获得粉丝消息表分页 * diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/receivetext/WxReceiveTextService.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/receivetext/WxReceiveTextService.java deleted file mode 100644 index a27e62000..000000000 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/receivetext/WxReceiveTextService.java +++ /dev/null @@ -1,71 +0,0 @@ -package cn.iocoder.yudao.module.mp.service.receivetext; - -import java.util.*; -import javax.validation.*; - -import cn.iocoder.yudao.module.mp.controller.admin.receivetext.vo.*; -import cn.iocoder.yudao.module.mp.dal.dataobject.receivetext.WxReceiveTextDO; -import cn.iocoder.yudao.framework.common.pojo.PageResult; - -/** - * 回复关键字 Service 接口 - * - * @author 芋道源码 - */ -public interface WxReceiveTextService { - - /** - * 创建回复关键字 - * - * @param createReqVO 创建信息 - * @return 编号 - */ - Integer createWxReceiveText(@Valid WxReceiveTextCreateReqVO createReqVO); - - /** - * 更新回复关键字 - * - * @param updateReqVO 更新信息 - */ - void updateWxReceiveText(@Valid WxReceiveTextUpdateReqVO updateReqVO); - - /** - * 删除回复关键字 - * - * @param id 编号 - */ - void deleteWxReceiveText(Integer id); - - /** - * 获得回复关键字 - * - * @param id 编号 - * @return 回复关键字 - */ - WxReceiveTextDO getWxReceiveText(Integer id); - - /** - * 获得回复关键字列表 - * - * @param ids 编号 - * @return 回复关键字列表 - */ - List getWxReceiveTextList(Collection ids); - - /** - * 获得回复关键字分页 - * - * @param pageReqVO 分页查询 - * @return 回复关键字分页 - */ - PageResult getWxReceiveTextPage(WxReceiveTextPageReqVO pageReqVO); - - /** - * 获得回复关键字列表, 用于 Excel 导出 - * - * @param exportReqVO 查询条件 - * @return 回复关键字列表 - */ - List getWxReceiveTextList(WxReceiveTextExportReqVO exportReqVO); - -} diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/receivetext/WxReceiveTextServiceImpl.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/receivetext/WxReceiveTextServiceImpl.java deleted file mode 100644 index 07c4b7503..000000000 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/receivetext/WxReceiveTextServiceImpl.java +++ /dev/null @@ -1,85 +0,0 @@ -package cn.iocoder.yudao.module.mp.service.receivetext; - -import org.springframework.stereotype.Service; - -import javax.annotation.Resource; - -import org.springframework.validation.annotation.Validated; - -import java.util.*; - -import cn.iocoder.yudao.module.mp.controller.admin.receivetext.vo.*; -import cn.iocoder.yudao.module.mp.dal.dataobject.receivetext.WxReceiveTextDO; -import cn.iocoder.yudao.framework.common.pojo.PageResult; - -import cn.iocoder.yudao.module.mp.convert.receivetext.WxReceiveTextConvert; -import cn.iocoder.yudao.module.mp.dal.mysql.receivetext.WxReceiveTextMapper; - -import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; -import static cn.iocoder.yudao.module.mp.enums.ErrorCodeConstants.*; - -/** - * 回复关键字 Service 实现类 - * - * @author 芋道源码 - */ -@Service -@Validated -public class WxReceiveTextServiceImpl implements WxReceiveTextService { - - @Resource - private WxReceiveTextMapper wxReceiveTextMapper; - - @Override - public Integer createWxReceiveText(WxReceiveTextCreateReqVO createReqVO) { - // 插入 - WxReceiveTextDO wxReceiveText = WxReceiveTextConvert.INSTANCE.convert(createReqVO); - wxReceiveTextMapper.insert(wxReceiveText); - // 返回 - return wxReceiveText.getId(); - } - - @Override - public void updateWxReceiveText(WxReceiveTextUpdateReqVO updateReqVO) { - // 校验存在 - this.validateWxReceiveTextExists(updateReqVO.getId()); - // 更新 - WxReceiveTextDO updateObj = WxReceiveTextConvert.INSTANCE.convert(updateReqVO); - wxReceiveTextMapper.updateById(updateObj); - } - - @Override - public void deleteWxReceiveText(Integer id) { - // 校验存在 - this.validateWxReceiveTextExists(id); - // 删除 - wxReceiveTextMapper.deleteById(id); - } - - private void validateWxReceiveTextExists(Integer id) { - if (wxReceiveTextMapper.selectById(id) == null) { - throw exception(COMMON_NOT_EXISTS); - } - } - - @Override - public WxReceiveTextDO getWxReceiveText(Integer id) { - return wxReceiveTextMapper.selectById(id); - } - - @Override - public List getWxReceiveTextList(Collection ids) { - return wxReceiveTextMapper.selectBatchIds(ids); - } - - @Override - public PageResult getWxReceiveTextPage(WxReceiveTextPageReqVO pageReqVO) { - return wxReceiveTextMapper.selectPage(pageReqVO); - } - - @Override - public List getWxReceiveTextList(WxReceiveTextExportReqVO exportReqVO) { - return wxReceiveTextMapper.selectList(exportReqVO); - } - -} diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/texttemplate/WxTextTemplateService.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/texttemplate/WxTextTemplateService.java deleted file mode 100644 index 51dcf7d38..000000000 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/texttemplate/WxTextTemplateService.java +++ /dev/null @@ -1,71 +0,0 @@ -package cn.iocoder.yudao.module.mp.service.texttemplate; - -import java.util.*; -import javax.validation.*; - -import cn.iocoder.yudao.module.mp.controller.admin.texttemplate.vo.*; -import cn.iocoder.yudao.module.mp.dal.dataobject.texttemplate.WxTextTemplateDO; -import cn.iocoder.yudao.framework.common.pojo.PageResult; - -/** - * 文本模板 Service 接口 - * - * @author 芋道源码 - */ -public interface WxTextTemplateService { - - /** - * 创建文本模板 - * - * @param createReqVO 创建信息 - * @return 编号 - */ - Integer createWxTextTemplate(@Valid WxTextTemplateCreateReqVO createReqVO); - - /** - * 更新文本模板 - * - * @param updateReqVO 更新信息 - */ - void updateWxTextTemplate(@Valid WxTextTemplateUpdateReqVO updateReqVO); - - /** - * 删除文本模板 - * - * @param id 编号 - */ - void deleteWxTextTemplate(Integer id); - - /** - * 获得文本模板 - * - * @param id 编号 - * @return 文本模板 - */ - WxTextTemplateDO getWxTextTemplate(Integer id); - - /** - * 获得文本模板列表 - * - * @param ids 编号 - * @return 文本模板列表 - */ - List getWxTextTemplateList(Collection ids); - - /** - * 获得文本模板分页 - * - * @param pageReqVO 分页查询 - * @return 文本模板分页 - */ - PageResult getWxTextTemplatePage(WxTextTemplatePageReqVO pageReqVO); - - /** - * 获得文本模板列表, 用于 Excel 导出 - * - * @param exportReqVO 查询条件 - * @return 文本模板列表 - */ - List getWxTextTemplateList(WxTextTemplateExportReqVO exportReqVO); - -} diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/texttemplate/WxTextTemplateServiceImpl.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/texttemplate/WxTextTemplateServiceImpl.java deleted file mode 100644 index 74347ae3a..000000000 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/service/texttemplate/WxTextTemplateServiceImpl.java +++ /dev/null @@ -1,85 +0,0 @@ -package cn.iocoder.yudao.module.mp.service.texttemplate; - -import org.springframework.stereotype.Service; - -import javax.annotation.Resource; - -import org.springframework.validation.annotation.Validated; - -import java.util.*; - -import cn.iocoder.yudao.module.mp.controller.admin.texttemplate.vo.*; -import cn.iocoder.yudao.module.mp.dal.dataobject.texttemplate.WxTextTemplateDO; -import cn.iocoder.yudao.framework.common.pojo.PageResult; - -import cn.iocoder.yudao.module.mp.convert.texttemplate.WxTextTemplateConvert; -import cn.iocoder.yudao.module.mp.dal.mysql.texttemplate.WxTextTemplateMapper; - -import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; -import static cn.iocoder.yudao.module.mp.enums.ErrorCodeConstants.*; - -/** - * 文本模板 Service 实现类 - * - * @author 芋道源码 - */ -@Service -@Validated -public class WxTextTemplateServiceImpl implements WxTextTemplateService { - - @Resource - private WxTextTemplateMapper wxTextTemplateMapper; - - @Override - public Integer createWxTextTemplate(WxTextTemplateCreateReqVO createReqVO) { - // 插入 - WxTextTemplateDO wxTextTemplate = WxTextTemplateConvert.INSTANCE.convert(createReqVO); - wxTextTemplateMapper.insert(wxTextTemplate); - // 返回 - return wxTextTemplate.getId(); - } - - @Override - public void updateWxTextTemplate(WxTextTemplateUpdateReqVO updateReqVO) { - // 校验存在 - this.validateWxTextTemplateExists(updateReqVO.getId()); - // 更新 - WxTextTemplateDO updateObj = WxTextTemplateConvert.INSTANCE.convert(updateReqVO); - wxTextTemplateMapper.updateById(updateObj); - } - - @Override - public void deleteWxTextTemplate(Integer id) { - // 校验存在 - this.validateWxTextTemplateExists(id); - // 删除 - wxTextTemplateMapper.deleteById(id); - } - - private void validateWxTextTemplateExists(Integer id) { - if (wxTextTemplateMapper.selectById(id) == null) { - throw exception(COMMON_NOT_EXISTS); - } - } - - @Override - public WxTextTemplateDO getWxTextTemplate(Integer id) { - return wxTextTemplateMapper.selectById(id); - } - - @Override - public List getWxTextTemplateList(Collection ids) { - return wxTextTemplateMapper.selectBatchIds(ids); - } - - @Override - public PageResult getWxTextTemplatePage(WxTextTemplatePageReqVO pageReqVO) { - return wxTextTemplateMapper.selectPage(pageReqVO); - } - - @Override - public List getWxTextTemplateList(WxTextTemplateExportReqVO exportReqVO) { - return wxTextTemplateMapper.selectList(exportReqVO); - } - -}