mp:增加【自动回复】的分页接口
parent
26ca97d2f6
commit
ab41c96641
@ -0,0 +1,5 @@
|
|||||||
|
### 请求 /mp/message/page 接口 => 成功
|
||||||
|
GET {{baseUrl}}/mp/auto-reply/page?accountId=1&pageNo=1&pageSize=10
|
||||||
|
Content-Type: application/json
|
||||||
|
Authorization: Bearer {{token}}
|
||||||
|
tenant-id: {{adminTenentId}}
|
||||||
@ -0,0 +1,40 @@
|
|||||||
|
package cn.iocoder.yudao.module.mp.controller.admin.message;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
|
import cn.iocoder.yudao.module.mp.controller.admin.message.vo.autoreply.MpAutoReplyRespVO;
|
||||||
|
import cn.iocoder.yudao.module.mp.controller.admin.message.vo.message.MpMessagePageReqVO;
|
||||||
|
import cn.iocoder.yudao.module.mp.convert.message.MpAutoReplyConvert;
|
||||||
|
import cn.iocoder.yudao.module.mp.dal.dataobject.message.MpAutoReplyDO;
|
||||||
|
import cn.iocoder.yudao.module.mp.service.message.MpAutoReplyService;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||||
|
|
||||||
|
@Api(tags = "管理后台 - 公众号自动回复")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/mp/auto-reply")
|
||||||
|
@Validated
|
||||||
|
public class MpAutoReplyController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private MpAutoReplyService mpAutoReplyService;
|
||||||
|
|
||||||
|
@GetMapping("/page")
|
||||||
|
@ApiOperation("获得公众号自动回复分页")
|
||||||
|
@PreAuthorize("@ss.hasPermission('mp:auto-reply:query')")
|
||||||
|
public CommonResult<PageResult<MpAutoReplyRespVO>> getAutoReplyPage(@Valid MpMessagePageReqVO pageVO) {
|
||||||
|
PageResult<MpAutoReplyDO> pageResult = mpAutoReplyService.getAutoReplyPage(pageVO);
|
||||||
|
return success(MpAutoReplyConvert.INSTANCE.convertPage(pageResult));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
package cn.iocoder.yudao.module.mp.controller.admin.message.vo.autoreply;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
@ApiModel("管理后台 - 公众号自动回复的创建 Request VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class MpAutoReplyCreateReqVO extends MpAutoReplyBaseVO {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "微信公众号 ID", required = true, example = "1024")
|
||||||
|
@NotNull(message = "微信公众号 ID不能为空")
|
||||||
|
private Long accountId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "回复类型", required = true, example = "1", notes = "参见 MpAutoReplyTypeEnum 枚举")
|
||||||
|
@NotNull(message = "回复类型不能为空")
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,22 @@
|
|||||||
|
package cn.iocoder.yudao.module.mp.controller.admin.message.vo.autoreply;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
@ApiModel("管理后台 - 公众号自动回复的分页 Request VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class MpAutoReplyPageReqVO extends PageParam {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "公众号账号的编号", required = true, example = "1")
|
||||||
|
@NotNull(message = "公众号账号的编号不能为空")
|
||||||
|
private Long accountId;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,23 @@
|
|||||||
|
package cn.iocoder.yudao.module.mp.controller.admin.message.vo.autoreply;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
|
@ApiModel("管理后台 - 公众号自动回复 Response VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class MpAutoReplyRespVO extends MpAutoReplyBaseVO {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "主键", required = true, example = "1024")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "微信公众号 ID", required = true, example = "1024")
|
||||||
|
private Long accountId;
|
||||||
|
@ApiModelProperty(value = "微信公众号 appid", required = true, example = "wx1234567890")
|
||||||
|
private String appId;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
package cn.iocoder.yudao.module.mp.controller.admin.message.vo.autoreply;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
@ApiModel("管理后台 - 公众号自动回复的更新 Request VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class MpAutoReplyUpdateReqVO extends MpAutoReplyBaseVO {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "主键", required = true, example = "1024")
|
||||||
|
@NotNull(message = "主键不能为空")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package cn.iocoder.yudao.module.mp.controller.admin.message.vo;
|
package cn.iocoder.yudao.module.mp.controller.admin.message.vo.message;
|
||||||
|
|
||||||
import cn.iocoder.yudao.module.mp.dal.dataobject.account.MpAccountDO;
|
import cn.iocoder.yudao.module.mp.dal.dataobject.account.MpAccountDO;
|
||||||
import cn.iocoder.yudao.module.mp.dal.dataobject.message.MpMessageDO;
|
import cn.iocoder.yudao.module.mp.dal.dataobject.message.MpMessageDO;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package cn.iocoder.yudao.module.mp.controller.admin.message.vo;
|
package cn.iocoder.yudao.module.mp.controller.admin.message.vo.message;
|
||||||
|
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package cn.iocoder.yudao.module.mp.controller.admin.message.vo;
|
package cn.iocoder.yudao.module.mp.controller.admin.message.vo.message;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package cn.iocoder.yudao.module.mp.controller.admin.message.vo;
|
package cn.iocoder.yudao.module.mp.controller.admin.message.vo.message;
|
||||||
|
|
||||||
import cn.iocoder.yudao.module.mp.dal.dataobject.message.MpMessageDO;
|
import cn.iocoder.yudao.module.mp.dal.dataobject.message.MpMessageDO;
|
||||||
import cn.iocoder.yudao.module.mp.framework.mp.core.util.MpUtils.*;
|
import cn.iocoder.yudao.module.mp.framework.mp.core.util.MpUtils.*;
|
||||||
Loading…
Reference in New Issue