mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-19 21:45:06 +08:00
【代码评审】全局:微信小程序码
This commit is contained in:
@ -7,9 +7,17 @@ import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 获取小程序码 Request DTO
|
||||
*
|
||||
* @see <a href="https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/qrcode-link/qr-code/getUnlimitedQRCode.html">获取不限制的小程序码</a>
|
||||
*
|
||||
* @author HUIHUI
|
||||
*/
|
||||
@Data
|
||||
public class SocialWxQrcodeReqDTO {
|
||||
|
||||
// TODO @puhui999:userId、userType 应该后续要搞成抽象参数;说白了,就是 path 的参数; socialType 应该去掉,因为就是微信的;
|
||||
/**
|
||||
* 用户编号
|
||||
*/
|
||||
@ -30,9 +38,9 @@ public class SocialWxQrcodeReqDTO {
|
||||
private Integer socialType;
|
||||
|
||||
/**
|
||||
* 最大32个可见字符,只支持数字,大小写英文以及部分特殊字符:!#$&'()*+,/:;=?@-._~, 其它字符请自行编码为合法字符
|
||||
* (因不支持%,中文无法使用 urlencode 处理,请使用其他编码方式)
|
||||
* 场景
|
||||
*/
|
||||
@NotEmpty(message = "场景不能为空")
|
||||
private String scene;
|
||||
/**
|
||||
* 页面路径
|
||||
@ -40,24 +48,30 @@ public class SocialWxQrcodeReqDTO {
|
||||
@NotEmpty(message = "页面路径不能为空")
|
||||
private String path;
|
||||
/**
|
||||
* 要打开的小程序版本。默认是开发版。
|
||||
* 要打开的小程序版本
|
||||
*/
|
||||
private String envVersion;
|
||||
/**
|
||||
* 二维码宽度
|
||||
*/
|
||||
private Integer width;
|
||||
|
||||
// TODO @puhui999:autoColor
|
||||
|
||||
/**
|
||||
* 默认true 自动配置线条颜色,如果颜色依然是黑色,则说明不建议配置主色调
|
||||
* 是否需要透明底色
|
||||
*/
|
||||
private Boolean isAutoColor;
|
||||
|
||||
// TODO @puhui999: checkPath
|
||||
/**
|
||||
* 默认true 检查 page 是否存在,为 true 时 page 必须是已经发布的小程序存在的页面(否则报错);
|
||||
* 为 false 时允许小程序未发布或者 page 不存在,但 page 有数量上限(60000个)请勿滥用
|
||||
* 是否检查 page 是否存在
|
||||
*/
|
||||
private Boolean isCheckPath;
|
||||
|
||||
// TODO @puhui999: hyaline
|
||||
/**
|
||||
* 是否需要透明底色, is_hyaline 为true时,生成透明底色的小程序码
|
||||
* 是否需要透明底色
|
||||
*/
|
||||
private Boolean isHyaline;
|
||||
|
||||
|
Reference in New Issue
Block a user