feat:微信通知改造

This commit is contained in:
苏竹红
2025-10-15 10:32:48 +08:00
parent 211fc19499
commit ba6835a887
4 changed files with 165 additions and 5 deletions

View File

@@ -0,0 +1,115 @@
package com.cool.store.dto.wechat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import java.util.List;
/**
* @Author suzhuhong
* @Date 2025/10/15 9:56
* @Version 1.0
*/
@Data
public class WechatUserInfoDTO {
/**
* 用户是否订阅该公众号标识
* 0代表未关注1代表关注
*/
private Integer subscribe;
/**
* 用户的标识,对当前公众号唯一
*/
private String openid;
/**
* 用户的昵称
*/
private String nickname;
/**
* 用户的性别
* 1为男性2为女性0为未知
*/
private Integer sex;
/**
* 用户所在城市
*/
private String city;
/**
* 用户所在国家
*/
private String country;
/**
* 用户所在省份
*/
private String province;
/**
* 用户的语言
* 简体中文为zh_CN
*/
private String language;
/**
* 用户头像
*/
private String headimgurl;
/**
* 用户关注时间,为时间戳
*/
@JsonProperty("subscribe_time")
private Long subscribeTime;
/**
* 只有在用户将公众号绑定到微信开放平台帐号后,才会出现该字段
*/
private String unionid;
/**
* 公众号运营者对粉丝的备注
*/
private String remark;
/**
* 用户所在的分组ID兼容旧的用户分组接口
*/
private Integer groupid;
/**
* 用户被打上的标签ID列表
*/
@JsonProperty("tagid_list")
private List<Integer> tagidList;
/**
* 返回用户关注的渠道来源
*/
@JsonProperty("subscribe_scene")
private String subscribeScene;
/**
* 二维码扫码场景(开发者自定义)
*/
@JsonProperty("qr_scene")
private Long qrScene;
/**
* 二维码扫码场景描述(开发者自定义)
*/
@JsonProperty("qr_scene_str")
private String qrSceneStr;
/**
* 是否已关注
*/
public boolean isSubscribed() {
return subscribe != null && subscribe == 1;
}
}