fix: required 过期

This commit is contained in:
xingyu 2023-09-11 12:30:33 +08:00
parent 1184b46c40
commit 5e9e41c045
17 changed files with 103 additions and 66 deletions

View File

@ -0,0 +1,36 @@
package cn.iocoder.yudao.framework.social.config;
import cn.iocoder.yudao.framework.social.core.YudaoAuthRequestFactory;
import com.xingyuv.http.HttpUtil;
import com.xingyuv.http.support.hutool.HutoolImpl;
import com.xingyuv.jushauth.cache.AuthStateCache;
import com.xingyuv.justauth.autoconfigure.JustAuthProperties;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Primary;
/**
* 社交自动装配类
*
* @author timfruit
* @date 2021-10-30
*/
@Slf4j
@AutoConfiguration
@EnableConfigurationProperties(JustAuthProperties.class)
public class YudaoSocialAutoConfiguration {
@Bean
@Primary
@ConditionalOnProperty(prefix = "justauth", value = "enabled", havingValue = "true", matchIfMissing = true)
public YudaoAuthRequestFactory yudaoAuthRequestFactory(JustAuthProperties properties, AuthStateCache authStateCache) {
// 需要修改 HttpUtil 使用的实现避免类报错
HttpUtil.setHttp(new HutoolImpl());
// 创建 YudaoAuthRequestFactory
return new YudaoAuthRequestFactory(properties, authStateCache);
}
}

View File

@ -0,0 +1 @@
cn.iocoder.yudao.framework.social.config.YudaoSocialAutoConfiguration

View File

@ -9,41 +9,41 @@ import java.time.LocalDateTime;
@Data
public class AppArticleRespVO {
@Schema(description = "文章编号", required = true, example = "1")
@Schema(description = "文章编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Long id;
@Schema(description = "文章标题", required = true, example = "芋道源码 - 促销模块")
@Schema(description = "文章标题", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码 - 促销模块")
private String title;
@Schema(description = "文章作者", required = true, example = "芋道源码")
@Schema(description = "文章作者", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码")
private String author;
@Schema(description = "分类编号", required = true, example = "2048")
@Schema(description = "分类编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048")
private Long categoryId;
@Schema(description = "图文封面", required = true, example = "https://www.iocoder.cn/1.png")
@Schema(description = "图文封面", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/1.png")
private String picUrl;
@Schema(description = "文章简介", required = true, example = "我是简介")
@Schema(description = "文章简介", requiredMode = Schema.RequiredMode.REQUIRED, example = "我是简介")
private String introduction;
@Schema(description = "文章内容", required = true, example = "我是详细")
@Schema(description = "文章内容", requiredMode = Schema.RequiredMode.REQUIRED, example = "我是详细")
private String description;
@Schema(description = "发布时间", required = true)
@Schema(description = "发布时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime createTime;
@Schema(description = "浏览量", required = true, example = "1024")
@Schema(description = "浏览量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Integer browseCount;
@Schema(description = "关联的商品 SPU 编号", example = "1024")
private Long spuId;
// TODO 芋艿下面 2 个字段后端要存储前端不用返回
// @Schema(description = "是否热卖推荐", required = true, example = "true")
// @Schema(description = "是否热卖推荐", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
// private Boolean recommendHot;
//
// @Schema(description = "是否 Banner 推荐", required = true, example = "true")
// @Schema(description = "是否 Banner 推荐", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
// private Boolean recommendBanner;
}

View File

@ -7,20 +7,20 @@ import lombok.Data;
@Data
public class AppArticleCategoryRespVO {
@Schema(description = "分类编号", required = true, example = "1")
@Schema(description = "分类编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Long id;
@Schema(description = "分类名称", required = true, example = "技术")
@Schema(description = "分类名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "技术")
private String name;
@Schema(description = "分类图标", required = true, example = "https://www.iocoder.cn/1.png")
@Schema(description = "分类图标", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/1.png")
private String picUrl;
// TODO 芋艿下面 2 个字段后端要存储前端不用返回
// @Schema(description = "状态", required = true, example = "1")
// @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
// private Integer status;
//
// @Schema(description = "排序", required = true, example = "1024")
// @Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
// private Integer sort;
}

View File

@ -9,46 +9,46 @@ import java.time.LocalDateTime;
@Data
public class AppBargainActivityDetailRespVO {
@Schema(description = "砍价活动编号", required = true, example = "1024")
@Schema(description = "砍价活动编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long id;
@Schema(description = "砍价活动名称", required = true, example = "618 大砍价")
@Schema(description = "砍价活动名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "618 大砍价")
private String name;
@Schema(description = "活动开始时间", required = true)
@Schema(description = "活动开始时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime startTime;
@Schema(description = "活动结束时间", required = true)
@Schema(description = "活动结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime endTime;
@Schema(description = "商品 SPU 编号", required = true, example = "2048")
@Schema(description = "商品 SPU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048")
private Long spuId;
@Schema(description = "商品 SKU 编号", required = true, example = "1024")
@Schema(description = "商品 SKU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long skuId;
@Schema(description = "商品价格,单位:分", required = true, example = "100")
@Schema(description = "商品价格,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
private Integer price;
@Schema(description = "商品描述", required = true, example = "我要吃西红柿")
@Schema(description = "商品描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "我要吃西红柿")
private String description;
@Schema(description = "砍价库存", required = true, example = "512")
@Schema(description = "砍价库存", requiredMode = Schema.RequiredMode.REQUIRED, example = "512")
private Integer stock;
@Schema(description = "商品图片", required = true, example = "4096") // SPU picUrl 读取
@Schema(description = "商品图片", requiredMode = Schema.RequiredMode.REQUIRED, example = "4096") // SPU picUrl 读取
private String picUrl;
@Schema(description = "商品市场价,单位:分", required = true, example = "50") // SPU marketPrice 读取
@Schema(description = "商品市场价,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "50") // SPU marketPrice 读取
private Integer marketPrice;
@Schema(description = "商品单位", required = true, example = "") // SPU unit 读取然后转换
@Schema(description = "商品单位", requiredMode = Schema.RequiredMode.REQUIRED, example = "") // SPU unit 读取然后转换
private String unitName;
@Schema(description = "砍价最低金额,单位:分", required = true, example = "100") // 从砍价商品里取最低价
@Schema(description = "砍价最低金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "100") // 从砍价商品里取最低价
private Integer bargainPrice;
@Schema(description = "砍价成功数量", required = true, example = "100")
@Schema(description = "砍价成功数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
private Integer successCount;
}

View File

@ -9,34 +9,34 @@ import java.time.LocalDateTime;
@Data
public class AppBargainActivityRespVO {
@Schema(description = "砍价活动编号", required = true, example = "1024")
@Schema(description = "砍价活动编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long id;
@Schema(description = "砍价活动名称", required = true, example = "618 大砍价")
@Schema(description = "砍价活动名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "618 大砍价")
private String name;
@Schema(description = "活动开始时间", required = true)
@Schema(description = "活动开始时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime startTime;
@Schema(description = "活动结束时间", required = true)
@Schema(description = "活动结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime endTime;
@Schema(description = "商品 SPU 编号", required = true, example = "2048")
@Schema(description = "商品 SPU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048")
private Long spuId;
@Schema(description = "商品 SKU 编号", required = true, example = "1024")
@Schema(description = "商品 SKU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long skuId;
@Schema(description = "砍价库存", required = true, example = "512")
@Schema(description = "砍价库存", requiredMode = Schema.RequiredMode.REQUIRED, example = "512")
private Integer stock;
@Schema(description = "商品图片", required = true, example = "4096") // SPU picUrl 读取
@Schema(description = "商品图片", requiredMode = Schema.RequiredMode.REQUIRED, example = "4096") // SPU picUrl 读取
private String picUrl;
@Schema(description = "商品市场价,单位:分", required = true, example = "50") // SPU marketPrice 读取
@Schema(description = "商品市场价,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "50") // SPU marketPrice 读取
private Integer marketPrice;
@Schema(description = "砍价最低金额,单位:分", required = true, example = "100") // 从砍价商品里取最低价
@Schema(description = "砍价最低金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "100") // 从砍价商品里取最低价
private Integer bargainPrice;
}

View File

@ -9,7 +9,7 @@ import javax.validation.constraints.NotNull;
@Data
public class AppBargainHelpCreateReqVO {
@Schema(description = "砍价记录编号", required = true, example = "1024")
@Schema(description = "砍价记录编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
@NotNull(message = "砍价记录编号不能为空")
private Long recordId;

View File

@ -9,16 +9,16 @@ import java.time.LocalDateTime;
@Data
public class AppBargainHelpRespVO {
@Schema(description = "助力用户的昵称", required = true, example = "1024")
@Schema(description = "助力用户的昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private String nickname;
@Schema(description = "助力用户的头像", required = true, example = "1024")
@Schema(description = "助力用户的头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private String avatar;
@Schema(description = "助力用户的砍价金额", required = true, example = "1024")
@Schema(description = "助力用户的砍价金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Integer reducePrice;
@Schema(description = "创建时间", required = true, example = "1024")
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private LocalDateTime createTime;
}

View File

@ -9,7 +9,7 @@ import javax.validation.constraints.NotNull;
@Data
public class AppBargainRecordCreateReqVO {
@Schema(description = "砍价活动编号", required = true, example = "1024")
@Schema(description = "砍价活动编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
@NotNull(message = "砍价活动编号不能为空")
private Long activityId;

View File

@ -9,23 +9,23 @@ import java.util.List;
@Data
public class AppBargainRecordSummaryRespVO {
@Schema(description = "砍价用户数量", required = true, example = "1024")
@Schema(description = "砍价用户数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Integer userCount;
@Schema(description = "成功砍价的记录", required = true) // 只返回最近的 7
@Schema(description = "成功砍价的记录", requiredMode = Schema.RequiredMode.REQUIRED) // 只返回最近的 7
private List<Record> successRecords;
@Schema(description = "成功砍价记录")
@Data
public static class Record {
@Schema(description = "用户昵称", required = true, example = "王**")
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王**")
private String nickname;
@Schema(description = "用户头像", required = true, example = "https://www.iocoder.cn/xxx.jpg")
@Schema(description = "用户头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/xxx.jpg")
private String avatar;
@Schema(description = "活动名称", required = true, example = "天蚕土豆")
@Schema(description = "活动名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "天蚕土豆")
private String activityName;
}

View File

@ -15,15 +15,15 @@ public class AppCouponMatchReqVO {
@NotNull(message = "商品金额不能为空")
private Integer price;
@Schema(description = "商品 SPU 编号的数组", required = true, example = "[1, 2]")
@Schema(description = "商品 SPU 编号的数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "[1, 2]")
@NotEmpty(message = "商品 SPU 编号不能为空")
private List<Long> spuIds;
@Schema(description = "商品 SKU 编号的数组", required = true, example = "[1, 2]")
@Schema(description = "商品 SKU 编号的数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "[1, 2]")
@NotEmpty(message = "商品 SKU 编号不能为空")
private List<Long> skuIds;
@Schema(description = "分类编号的数组", required = true, example = "[10, 20]")
@Schema(description = "分类编号的数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "[10, 20]")
@NotEmpty(message = "分类编号不能为空")
private List<Long> categoryIds;

View File

@ -8,10 +8,10 @@ import lombok.Data;
@Data
public class AppDeliveryConfigRespVO {
@Schema(description = "腾讯地图 KEY", required = true, example = "123456")
@Schema(description = "腾讯地图 KEY", requiredMode = Schema.RequiredMode.REQUIRED, example = "123456")
private String tencentLbsKey;
@Schema(description = "是否开启自提", required = true, example = "true")
@Schema(description = "是否开启自提", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
private Boolean pickUpEnable;
}

View File

@ -7,10 +7,10 @@ import lombok.Data;
@Data
public class AppDeliveryExpressRespVO {
@Schema(description = "编号", required = true, example = "1")
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Long id;
@Schema(description = "门店名称", required = true, example = "顺丰")
@Schema(description = "门店名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "顺丰")
private String name;
}

View File

@ -25,12 +25,12 @@ public class AppTradeOrderSettlementReqVO {
@Schema(description = "优惠劵编号", example = "1024")
private Long couponId;
@Schema(description = "是否使用积分", required = true, example = "true")
@Schema(description = "是否使用积分", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
@NotNull(message = "是否使用积分不能为空")
private Boolean pointStatus;
// ========== 配送相关相关字段 ==========
@Schema(description = "配送方式", required = true, example = "1")
@Schema(description = "配送方式", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@InEnum(value = DeliveryTypeEnum.class, message = "配送方式不正确")
private Integer deliveryType;

View File

@ -13,7 +13,7 @@ import java.util.List;
@Data
public class AppTradeOrderSettlementRespVO {
@Schema(description = "交易类型", required = true, example = "1") // 对应 TradeOrderTypeEnum 枚举
@Schema(description = "交易类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") // 对应 TradeOrderTypeEnum 枚举
private Integer type = 1; // TODO 芋艿改成计算
@Schema(description = "购物项数组", requiredMode = Schema.RequiredMode.REQUIRED)

View File

@ -13,16 +13,16 @@ import java.time.LocalDateTime;
@ToString(callSuper = true)
public class PayOrderDetailsRespVO extends PayOrderBaseVO {
@Schema(description = "支付订单编号", required = true, example = "1024")
@Schema(description = "支付订单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long id;
@Schema(description = "应用名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码")
private String appName;
@Schema(description = "创建时间", required = true)
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime createTime;
@Schema(description = "更新时间", required = true)
@Schema(description = "更新时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime updateTime;
/**
@ -34,7 +34,7 @@ public class PayOrderDetailsRespVO extends PayOrderBaseVO {
@Schema(description = "支付订单扩展")
public static class PayOrderExtension {
@Schema(description = "支付订单号", required = true, example = "1024")
@Schema(description = "支付订单号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private String no;
@Schema(description = "支付异步通知的内容")

View File

@ -55,7 +55,7 @@ public class DictDataDO extends BaseDO {
/**
* css 样式
*/
@TableField(updateStrategy = FieldStrategy.IGNORED)
@TableField(updateStrategy = FieldStrategy.ALWAYS)
private String cssClass;
/**
* 备注