提交
This commit is contained in:
@ -14,23 +14,23 @@ import javax.validation.constraints.NotEmpty;
|
||||
@Data
|
||||
public class MpAccountBaseVO {
|
||||
|
||||
@Schema(description = "公众号名称", required = true, example = "yshop")
|
||||
@Schema(description = "公众号名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "yshop")
|
||||
@NotEmpty(message = "公众号名称不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "公众号微信号", required = true, example = "yshopyuanma")
|
||||
@Schema(description = "公众号微信号", requiredMode = Schema.RequiredMode.REQUIRED, example = "yshopyuanma")
|
||||
@NotEmpty(message = "公众号微信号不能为空")
|
||||
private String account;
|
||||
|
||||
@Schema(description = "公众号 appId", required = true, example = "wx5b23ba7a5589ecbb")
|
||||
@Schema(description = "公众号 appId", requiredMode = Schema.RequiredMode.REQUIRED, example = "wx5b23ba7a5589ecbb")
|
||||
@NotEmpty(message = "公众号 appId 不能为空")
|
||||
private String appId;
|
||||
|
||||
@Schema(description = "公众号密钥", required = true, example = "3a7b3b20c537e52e74afd395eb85f61f")
|
||||
@Schema(description = "公众号密钥", requiredMode = Schema.RequiredMode.REQUIRED, example = "3a7b3b20c537e52e74afd395eb85f61f")
|
||||
@NotEmpty(message = "公众号密钥不能为空")
|
||||
private String appSecret;
|
||||
|
||||
@Schema(description = "公众号 token", required = true, example = "kangdayuzhen")
|
||||
@Schema(description = "公众号 token", requiredMode = Schema.RequiredMode.REQUIRED, example = "kangdayuzhen")
|
||||
@NotEmpty(message = "公众号 token 不能为空")
|
||||
private String token;
|
||||
|
||||
|
@ -13,13 +13,13 @@ import java.util.Date;
|
||||
@ToString(callSuper = true)
|
||||
public class MpAccountRespVO extends MpAccountBaseVO {
|
||||
|
||||
@Schema(description = "编号", required = true, example = "1024")
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "二维码图片URL", example = "https://www.yixiang.co/1024.png")
|
||||
private String qrCodeUrl;
|
||||
|
||||
@Schema(description = "创建时间", required = true)
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
|
@ -7,10 +7,10 @@ import lombok.Data;
|
||||
@Data
|
||||
public class MpAccountSimpleRespVO {
|
||||
|
||||
@Schema(description = "编号", required = true, example = "1024")
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "公众号名称", required = true, example = "yshop")
|
||||
@Schema(description = "公众号名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "yshop")
|
||||
private String name;
|
||||
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ import javax.validation.constraints.NotNull;
|
||||
@ToString(callSuper = true)
|
||||
public class MpAccountUpdateReqVO extends MpAccountBaseVO {
|
||||
|
||||
@Schema(description = "编号", required = true, example = "1024")
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
@NotNull(message = "编号不能为空")
|
||||
private Long id;
|
||||
|
||||
|
@ -13,16 +13,16 @@ import java.util.Date;
|
||||
@ToString(callSuper = true)
|
||||
public class MpMenuRespVO extends MpMenuBaseVO {
|
||||
|
||||
@Schema(description = "主键", required = true, example = "1024")
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "公众号账号的编号", required = true, example = "2048")
|
||||
@Schema(description = "公众号账号的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048")
|
||||
private Long accountId;
|
||||
|
||||
@Schema(description = "公众号 appId", required = true, example = "wx1234567890ox")
|
||||
@Schema(description = "公众号 appId", requiredMode = Schema.RequiredMode.REQUIRED, example = "wx1234567890ox")
|
||||
private String appId;
|
||||
|
||||
@Schema(description = "创建时间", required = true)
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ import java.util.List;
|
||||
@Data
|
||||
public class MpMenuSaveReqVO {
|
||||
|
||||
@Schema(description = "公众号账号的编号", required = true, example = "2048")
|
||||
@Schema(description = "公众号账号的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048")
|
||||
@NotNull(message = "公众号账号的编号不能为空")
|
||||
private Long accountId;
|
||||
|
||||
|
@ -14,7 +14,7 @@ import javax.validation.constraints.NotNull;
|
||||
@ToString(callSuper = true)
|
||||
public class MpAutoReplyPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "公众号账号的编号", required = true, example = "1")
|
||||
@Schema(description = "公众号账号的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "公众号账号的编号不能为空")
|
||||
private Long accountId;
|
||||
|
||||
|
@ -13,15 +13,15 @@ import java.util.Date;
|
||||
@ToString(callSuper = true)
|
||||
public class MpAutoReplyRespVO extends MpAutoReplyBaseVO {
|
||||
|
||||
@Schema(description = "主键", required = true, example = "1024")
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "公众号账号的编号", required = true, example = "1024")
|
||||
@Schema(description = "公众号账号的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long accountId;
|
||||
@Schema(description = "公众号 appId", required = true, example = "wx1234567890")
|
||||
@Schema(description = "公众号 appId", requiredMode = Schema.RequiredMode.REQUIRED, example = "wx1234567890")
|
||||
private String appId;
|
||||
|
||||
@Schema(description = "创建时间", required = true)
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ import static co.yixiang.yshop.framework.common.util.date.DateUtils.FORMAT_YEAR_
|
||||
@ToString(callSuper = true)
|
||||
public class MpMessagePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "公众号账号的编号", required = true, example = "1024")
|
||||
@Schema(description = "公众号账号的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
@NotNull(message = "公众号账号的编号不能为空")
|
||||
private Long accountId;
|
||||
|
||||
|
@ -13,25 +13,25 @@ import java.util.List;
|
||||
@Data
|
||||
public class MpMessageRespVO {
|
||||
|
||||
@Schema(description = "主键", required = true, example = "1024")
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "微信公众号消息 id", required = true, example = "23953173569869169")
|
||||
@Schema(description = "微信公众号消息 id", requiredMode = Schema.RequiredMode.REQUIRED, example = "23953173569869169")
|
||||
private Long msgId;
|
||||
|
||||
@Schema(description = "公众号账号的编号", required = true, example = "1")
|
||||
@Schema(description = "公众号账号的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Long accountId;
|
||||
@Schema(description = "公众号账号的 appid", required = true, example = "wx1234567890")
|
||||
@Schema(description = "公众号账号的 appid", requiredMode = Schema.RequiredMode.REQUIRED, example = "wx1234567890")
|
||||
private String appId;
|
||||
|
||||
@Schema(description = "公众号粉丝编号", required = true, example = "2048")
|
||||
@Schema(description = "公众号粉丝编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048")
|
||||
private Long userId;
|
||||
@Schema(description = "公众号粉丝标志", required = true, example = "o6_bmjrPTlm6_2sgVt7hMZOPfL2M")
|
||||
@Schema(description = "公众号粉丝标志", requiredMode = Schema.RequiredMode.REQUIRED, example = "o6_bmjrPTlm6_2sgVt7hMZOPfL2M")
|
||||
private String openid;
|
||||
|
||||
@Schema(description = "消息类型 参见 WxConsts.XmlMsgType 枚举", required = true, example = "text")
|
||||
@Schema(description = "消息类型 参见 WxConsts.XmlMsgType 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "text")
|
||||
private String type;
|
||||
@Schema(description = "消息来源 参见 MpMessageSendFromEnum 枚举", required = true, example = "1")
|
||||
@Schema(description = "消息来源 参见 MpMessageSendFromEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Integer sendFrom;
|
||||
|
||||
// ========= 普通消息内容 https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Receiving_standard_messages.html
|
||||
@ -95,7 +95,7 @@ public class MpMessageRespVO {
|
||||
@Schema(description = "事件 Key 参见 WxConsts.EventType 枚举", example = "qrscene_123456")
|
||||
private String eventKey;
|
||||
|
||||
@Schema(description = "创建时间", required = true)
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
|
@ -14,37 +14,37 @@ import java.util.List;
|
||||
@Data
|
||||
public class MpMessageSendReqVO {
|
||||
|
||||
@Schema(description = "公众号粉丝的编号", required = true, example = "1024")
|
||||
@Schema(description = "公众号粉丝的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
@NotNull(message = "公众号粉丝的编号不能为空")
|
||||
private Long userId;
|
||||
|
||||
// ========== 消息内容 ==========
|
||||
|
||||
@Schema(description = "消息类型 TEXT/IMAGE/VOICE/VIDEO/NEWS", required = true, example = "text")
|
||||
@Schema(description = "消息类型 TEXT/IMAGE/VOICE/VIDEO/NEWS", requiredMode = Schema.RequiredMode.REQUIRED, example = "text")
|
||||
@NotEmpty(message = "消息类型不能为空")
|
||||
public String type;
|
||||
|
||||
@Schema(description = "消息内容", required = true, example = "你好呀")
|
||||
@Schema(description = "消息内容", requiredMode = Schema.RequiredMode.REQUIRED, example = "你好呀")
|
||||
@NotEmpty(message = "消息内容不能为空", groups = TextMessageGroup.class)
|
||||
private String content;
|
||||
|
||||
@Schema(description = "媒体 ID", required = true, example = "qqc_2Fot30Jse-HDoZmo5RrUDijz2nGUkP")
|
||||
@Schema(description = "媒体 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "qqc_2Fot30Jse-HDoZmo5RrUDijz2nGUkP")
|
||||
@NotEmpty(message = "消息内容不能为空", groups = {ImageMessageGroup.class, VoiceMessageGroup.class, VideoMessageGroup.class})
|
||||
private String mediaId;
|
||||
|
||||
@Schema(description = "标题", required = true, example = "没有标题")
|
||||
@Schema(description = "标题", requiredMode = Schema.RequiredMode.REQUIRED, example = "没有标题")
|
||||
@NotEmpty(message = "消息内容不能为空", groups = VideoMessageGroup.class)
|
||||
private String title;
|
||||
|
||||
@Schema(description = "描述", required = true, example = "你猜")
|
||||
@Schema(description = "描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜")
|
||||
@NotEmpty(message = "消息描述不能为空", groups = VideoMessageGroup.class)
|
||||
private String description;
|
||||
|
||||
@Schema(description = "缩略图的媒体 id", required = true, example = "qqc_2Fot30Jse-HDoZmo5RrUDijz2nGUkP")
|
||||
@Schema(description = "缩略图的媒体 id", requiredMode = Schema.RequiredMode.REQUIRED, example = "qqc_2Fot30Jse-HDoZmo5RrUDijz2nGUkP")
|
||||
@NotEmpty(message = "缩略图的媒体 id 不能为空", groups = MusicMessageGroup.class)
|
||||
private String thumbMediaId;
|
||||
|
||||
@Schema(description = "图文消息", required = true)
|
||||
@Schema(description = "图文消息", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Valid
|
||||
@NotNull(message = "图文消息不能为空", groups = NewsMessageGroup.class)
|
||||
private List<MpMessageDO.Article> articles;
|
||||
|
@ -14,7 +14,7 @@ import javax.validation.constraints.NotNull;
|
||||
@ToString(callSuper = true)
|
||||
public class MpDraftPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "公众号账号的编号", required = true, example = "1024")
|
||||
@Schema(description = "公众号账号的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
@NotNull(message = "公众号账号的编号不能为空")
|
||||
private Long accountId;
|
||||
|
||||
|
@ -14,7 +14,7 @@ import javax.validation.constraints.NotNull;
|
||||
@ToString(callSuper = true)
|
||||
public class MpFreePublishPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "公众号账号的编号", required = true, example = "1024")
|
||||
@Schema(description = "公众号账号的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
@NotNull(message = "公众号账号的编号不能为空")
|
||||
private Long accountId;
|
||||
|
||||
|
@ -9,19 +9,19 @@ import javax.validation.constraints.NotEmpty;
|
||||
@Data
|
||||
public class MpOpenCheckSignatureReqVO {
|
||||
|
||||
@Schema(description = "微信加密签名", required = true, example = "490eb57f448b87bd5f20ccef58aa4de46aa1908e")
|
||||
@Schema(description = "微信加密签名", requiredMode = Schema.RequiredMode.REQUIRED, example = "490eb57f448b87bd5f20ccef58aa4de46aa1908e")
|
||||
@NotEmpty(message = "微信加密签名不能为空")
|
||||
private String signature;
|
||||
|
||||
@Schema(description = "时间戳", required = true, example = "1672587863")
|
||||
@Schema(description = "时间戳", requiredMode = Schema.RequiredMode.REQUIRED, example = "1672587863")
|
||||
@NotEmpty(message = "时间戳不能为空")
|
||||
private String timestamp;
|
||||
|
||||
@Schema(description = "随机数", required = true, example = "1827365808")
|
||||
@Schema(description = "随机数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1827365808")
|
||||
@NotEmpty(message = "随机数不能为空")
|
||||
private String nonce;
|
||||
|
||||
@Schema(description = "随机字符串", required = true, example = "2721154047828672511")
|
||||
@Schema(description = "随机字符串", requiredMode = Schema.RequiredMode.REQUIRED, example = "2721154047828672511")
|
||||
@NotEmpty(message = "随机字符串不能为空")
|
||||
@SuppressWarnings("SpellCheckingInspection")
|
||||
private String echostr;
|
||||
|
@ -12,19 +12,19 @@ public class MpOpenHandleMessageReqVO {
|
||||
|
||||
public static final String ENCRYPT_TYPE_AES = "aes";
|
||||
|
||||
@Schema(description = "微信加密签名", required = true, example = "490eb57f448b87bd5f20ccef58aa4de46aa1908e")
|
||||
@Schema(description = "微信加密签名", requiredMode = Schema.RequiredMode.REQUIRED, example = "490eb57f448b87bd5f20ccef58aa4de46aa1908e")
|
||||
@NotEmpty(message = "微信加密签名不能为空")
|
||||
private String signature;
|
||||
|
||||
@Schema(description = "时间戳", required = true, example = "1672587863")
|
||||
@Schema(description = "时间戳", requiredMode = Schema.RequiredMode.REQUIRED, example = "1672587863")
|
||||
@NotEmpty(message = "时间戳不能为空")
|
||||
private String timestamp;
|
||||
|
||||
@Schema(description = "随机数", required = true, example = "1827365808")
|
||||
@Schema(description = "随机数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1827365808")
|
||||
@NotEmpty(message = "随机数不能为空")
|
||||
private String nonce;
|
||||
|
||||
@Schema(description = "粉丝 openid", required = true, example = "oz-Jdtyn-WGm4C4I5Z-nvBMO_ZfY")
|
||||
@Schema(description = "粉丝 openid", requiredMode = Schema.RequiredMode.REQUIRED, example = "oz-Jdtyn-WGm4C4I5Z-nvBMO_ZfY")
|
||||
@NotEmpty(message = "粉丝 openid 不能为空")
|
||||
private String openid;
|
||||
|
||||
|
@ -17,6 +17,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
import static co.yixiang.yshop.framework.common.pojo.CommonResult.success;
|
||||
|
@ -14,7 +14,7 @@ import javax.validation.constraints.NotEmpty;
|
||||
@Data
|
||||
public class MpTagBaseVO {
|
||||
|
||||
@Schema(description = "标签名", required = true, example = "土豆")
|
||||
@Schema(description = "标签名", requiredMode = Schema.RequiredMode.REQUIRED, example = "土豆")
|
||||
@NotEmpty(message = "标签名不能为空")
|
||||
private String name;
|
||||
|
||||
|
@ -13,7 +13,7 @@ import javax.validation.constraints.NotNull;
|
||||
@ToString(callSuper = true)
|
||||
public class MpTagCreateReqVO extends MpTagBaseVO {
|
||||
|
||||
@Schema(description = "公众号账号的编号", required = true, example = "2048")
|
||||
@Schema(description = "公众号账号的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048")
|
||||
@NotNull(message = "公众号账号的编号不能为空")
|
||||
private Long accountId;
|
||||
|
||||
|
@ -14,7 +14,7 @@ import javax.validation.constraints.NotEmpty;
|
||||
@ToString(callSuper = true)
|
||||
public class MpTagPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "公众号账号的编号", required = true, example = "2048")
|
||||
@Schema(description = "公众号账号的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048")
|
||||
@NotEmpty(message = "公众号账号的编号不能为空")
|
||||
private Long accountId;
|
||||
|
||||
|
@ -13,13 +13,13 @@ import java.util.Date;
|
||||
@ToString(callSuper = true)
|
||||
public class MpTagRespVO extends MpTagBaseVO {
|
||||
|
||||
@Schema(description = "编号", required = true, example = "1024")
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "此标签下粉丝数量", required = true, example = "0")
|
||||
@Schema(description = "此标签下粉丝数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "0")
|
||||
private Integer count;
|
||||
|
||||
@Schema(description = "创建时间", required = true)
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
|
@ -7,13 +7,13 @@ import lombok.Data;
|
||||
@Data
|
||||
public class MpTagSimpleRespVO {
|
||||
|
||||
@Schema(description = "编号", required = true, example = "1024")
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "公众号的标签编号", required = true, example = "2048")
|
||||
@Schema(description = "公众号的标签编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048")
|
||||
private Long tagId;
|
||||
|
||||
@Schema(description = "标签名称", required = true, example = "快乐")
|
||||
@Schema(description = "标签名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "快乐")
|
||||
private String name;
|
||||
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ import javax.validation.constraints.NotNull;
|
||||
@ToString(callSuper = true)
|
||||
public class MpTagUpdateReqVO extends MpTagBaseVO {
|
||||
|
||||
@Schema(description = "编号", required = true)
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "编号不能为空")
|
||||
private Long id;
|
||||
|
||||
|
@ -14,7 +14,7 @@ import javax.validation.constraints.NotNull;
|
||||
@ToString(callSuper = true)
|
||||
public class MpUserPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "公众号账号的编号", required = true, example = "2048")
|
||||
@Schema(description = "公众号账号的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048")
|
||||
@NotNull(message = "公众号账号的编号不能为空")
|
||||
private Long accountId;
|
||||
|
||||
|
@ -4,22 +4,21 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 公众号粉丝 Response VO")
|
||||
@Data
|
||||
public class MpUserRespVO {
|
||||
|
||||
@Schema(description = "编号", required = true, example = "1024")
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "公众号粉丝标识", required = true, example = "o6_bmjrPTlm6_2sgVt7hMZOPfL2M")
|
||||
@Schema(description = "公众号粉丝标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "o6_bmjrPTlm6_2sgVt7hMZOPfL2M")
|
||||
private String openid;
|
||||
|
||||
@Schema(description = "关注状态 参见 CommonStatusEnum 枚举", required = true, example = "1")
|
||||
@Schema(description = "关注状态 参见 CommonStatusEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Integer subscribeStatus;
|
||||
@Schema(description = "关注时间", required = true)
|
||||
@Schema(description = "关注时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private LocalDateTime subscribeTime;
|
||||
@Schema(description = "取消关注时间")
|
||||
private LocalDateTime unsubscribeTime;
|
||||
@ -42,12 +41,12 @@ public class MpUserRespVO {
|
||||
@Schema(description = "标签编号数组", example = "1,2,3")
|
||||
private List<Long> tagIds;
|
||||
|
||||
@Schema(description = "公众号账号的编号", required = true, example = "1")
|
||||
@Schema(description = "公众号账号的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Long accountId;
|
||||
@Schema(description = "公众号账号的 appId", required = true, example = "wx1234567890")
|
||||
@Schema(description = "公众号账号的 appId", requiredMode = Schema.RequiredMode.REQUIRED, example = "wx1234567890")
|
||||
private String appId;
|
||||
|
||||
@Schema(description = "创建时间", required = true)
|
||||
private Date createTime;
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ import java.util.List;
|
||||
@Data
|
||||
public class MpUserUpdateReqVO {
|
||||
|
||||
@Schema(description = "编号", required = true, example = "1024")
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
@NotNull(message = "编号不能为空")
|
||||
private Long id;
|
||||
|
||||
|
@ -30,9 +30,9 @@ import java.util.Set;
|
||||
@ToString(callSuper = true)
|
||||
public class MpAutoReplyDO extends BaseDO {
|
||||
|
||||
public static Set<String> REQUEST_MESSAGE_TYPE = SetUtils.asSet(WxConsts.XmlMsgType.TEXT, WxConsts.XmlMsgType.IMAGE,
|
||||
WxConsts.XmlMsgType.VOICE, WxConsts.XmlMsgType.VIDEO, WxConsts.XmlMsgType.SHORTVIDEO,
|
||||
WxConsts.XmlMsgType.LOCATION, WxConsts.XmlMsgType.LINK);
|
||||
public static Set<String> REQUEST_MESSAGE_TYPE = SetUtils.asSet(XmlMsgType.TEXT, XmlMsgType.IMAGE,
|
||||
XmlMsgType.VOICE, XmlMsgType.VIDEO, XmlMsgType.SHORTVIDEO,
|
||||
XmlMsgType.LOCATION, XmlMsgType.LINK);
|
||||
|
||||
/**
|
||||
* 主键
|
||||
@ -97,14 +97,14 @@ public class MpAutoReplyDO extends BaseDO {
|
||||
/**
|
||||
* 回复的消息内容
|
||||
*
|
||||
* 消息类型为 {@link WxConsts.XmlMsgType} 的 TEXT
|
||||
* 消息类型为 {@link XmlMsgType} 的 TEXT
|
||||
*/
|
||||
private String responseContent;
|
||||
|
||||
/**
|
||||
* 回复的媒体 id
|
||||
*
|
||||
* 消息类型为 {@link WxConsts.XmlMsgType} 的 IMAGE、VOICE、VIDEO
|
||||
* 消息类型为 {@link XmlMsgType} 的 IMAGE、VOICE、VIDEO
|
||||
*/
|
||||
private String responseMediaId;
|
||||
/**
|
||||
@ -115,33 +115,33 @@ public class MpAutoReplyDO extends BaseDO {
|
||||
/**
|
||||
* 回复的标题
|
||||
*
|
||||
* 消息类型为 {@link WxConsts.XmlMsgType} 的 VIDEO
|
||||
* 消息类型为 {@link XmlMsgType} 的 VIDEO
|
||||
*/
|
||||
private String responseTitle;
|
||||
/**
|
||||
* 回复的描述
|
||||
*
|
||||
* 消息类型为 {@link WxConsts.XmlMsgType} 的 VIDEO
|
||||
* 消息类型为 {@link XmlMsgType} 的 VIDEO
|
||||
*/
|
||||
private String responseDescription;
|
||||
|
||||
/**
|
||||
* 回复的缩略图的媒体 id,通过素材管理中的接口上传多媒体文件,得到的 id
|
||||
*
|
||||
* 消息类型为 {@link WxConsts.XmlMsgType} 的 MUSIC、VIDEO
|
||||
* 消息类型为 {@link XmlMsgType} 的 MUSIC、VIDEO
|
||||
*/
|
||||
private String responseThumbMediaId;
|
||||
/**
|
||||
* 回复的缩略图的媒体 URL
|
||||
*
|
||||
* 消息类型为 {@link WxConsts.XmlMsgType} 的 MUSIC、VIDEO
|
||||
* 消息类型为 {@link XmlMsgType} 的 MUSIC、VIDEO
|
||||
*/
|
||||
private String responseThumbMediaUrl;
|
||||
|
||||
/**
|
||||
* 回复的图文消息
|
||||
*
|
||||
* 消息类型为 {@link WxConsts.XmlMsgType} 的 NEWS
|
||||
* 消息类型为 {@link XmlMsgType} 的 NEWS
|
||||
*/
|
||||
@TableField(typeHandler = MpMessageDO.ArticleTypeHandler.class)
|
||||
private List<MpMessageDO.Article> responseArticles;
|
||||
@ -149,7 +149,7 @@ public class MpAutoReplyDO extends BaseDO {
|
||||
/**
|
||||
* 回复的音乐链接
|
||||
*
|
||||
* 消息类型为 {@link WxConsts.XmlMsgType} 的 MUSIC
|
||||
* 消息类型为 {@link XmlMsgType} 的 MUSIC
|
||||
*/
|
||||
private String responseMusicUrl;
|
||||
/**
|
||||
@ -157,7 +157,7 @@ public class MpAutoReplyDO extends BaseDO {
|
||||
*
|
||||
* WIFI 环境优先使用该链接播放音乐
|
||||
*
|
||||
* 消息类型为 {@link WxConsts.XmlMsgType} 的 MUSIC
|
||||
* 消息类型为 {@link XmlMsgType} 的 MUSIC
|
||||
*/
|
||||
private String responseHqMusicUrl;
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
package co.yixiang.yshop.module.mp.service.statistics;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import co.yixiang.yshop.module.mp.framework.mp.core.MpServiceFactory;
|
||||
import me.chanjar.weixin.common.error.WxErrorException;
|
||||
import me.chanjar.weixin.mp.api.WxMpService;
|
||||
@ -13,6 +14,7 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import static co.yixiang.yshop.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
@ -32,6 +34,7 @@ public class MpStatisticsServiceImpl implements MpStatisticsService {
|
||||
|
||||
@Override
|
||||
public List<WxDataCubeUserSummary> getUserSummary(Long accountId, LocalDateTime[] date) {
|
||||
validDate(date);
|
||||
WxMpService mpService = mpServiceFactory.getRequiredMpService(accountId);
|
||||
try {
|
||||
return mpService.getDataCubeService().getUserSummary(
|
||||
@ -43,6 +46,7 @@ public class MpStatisticsServiceImpl implements MpStatisticsService {
|
||||
|
||||
@Override
|
||||
public List<WxDataCubeUserCumulate> getUserCumulate(Long accountId, LocalDateTime[] date) {
|
||||
validDate(date);
|
||||
WxMpService mpService = mpServiceFactory.getRequiredMpService(accountId);
|
||||
try {
|
||||
return mpService.getDataCubeService().getUserCumulate(
|
||||
@ -54,6 +58,7 @@ public class MpStatisticsServiceImpl implements MpStatisticsService {
|
||||
|
||||
@Override
|
||||
public List<WxDataCubeMsgResult> getUpstreamMessage(Long accountId, LocalDateTime[] date) {
|
||||
validDate(date);
|
||||
WxMpService mpService = mpServiceFactory.getRequiredMpService(accountId);
|
||||
try {
|
||||
return mpService.getDataCubeService().getUpstreamMsg(
|
||||
@ -65,6 +70,7 @@ public class MpStatisticsServiceImpl implements MpStatisticsService {
|
||||
|
||||
@Override
|
||||
public List<WxDataCubeInterfaceResult> getInterfaceSummary(Long accountId, LocalDateTime[] date) {
|
||||
validDate(date);
|
||||
WxMpService mpService = mpServiceFactory.getRequiredMpService(accountId);
|
||||
try {
|
||||
return mpService.getDataCubeService().getInterfaceSummary(
|
||||
@ -74,4 +80,11 @@ public class MpStatisticsServiceImpl implements MpStatisticsService {
|
||||
}
|
||||
}
|
||||
|
||||
private void validDate(LocalDateTime[] date){
|
||||
if(date != null) {
|
||||
if (date[0].isAfter(LocalDateTime.now()) || date[1].isAfter(LocalDateTime.now()))
|
||||
throw exception(STATISTICS_GET_DATETIME_FAIL);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user