时间格式化加上timezone=GMT+8,修复首页redis缓存导致销量不一致的问题

This commit is contained in:
hupeng
2020-07-10 16:22:50 +08:00
parent 65d3b6583e
commit a4eb134d03
15 changed files with 18 additions and 17 deletions

View File

@ -59,7 +59,7 @@ public class ApiResult<T> implements Serializable {
* 响应时间
*/
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
private Date time;
public ApiResult() {

View File

@ -23,11 +23,11 @@ public class BaseDomain implements Serializable {
@TableField(fill= FieldFill.INSERT)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
private Date createTime;
@TableField(fill= FieldFill.UPDATE)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
private Date updateTime;
@TableLogic

View File

@ -67,7 +67,7 @@ public class YxStoreCombinationDto implements Serializable {
private Integer stock;
// 添加时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
private Date createTime;
// 推荐

View File

@ -52,7 +52,7 @@ public class YxStoreCouponDto implements Serializable {
private List<YxStoreProduct> product;
// 兑换项目添加时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
private Date createTime;

View File

@ -48,7 +48,7 @@ public class YxStoreCouponIssueDto implements Serializable {
/** 优惠券添加时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
private Date createTime;
}

View File

@ -32,7 +32,7 @@ public class StoreCouponUserVo implements Serializable
private Double useMinPrice;
/** 优惠券结束时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
private Date endTime;
private Integer type;

View File

@ -31,11 +31,11 @@ public class YxStoreCouponIssueQueryVo implements Serializable {
private Integer ctype;
@ApiModelProperty(value = "优惠券领取开启时间")
@JsonFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
private Date startTime;
@ApiModelProperty(value = "优惠券领取结束时间")
@JsonFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
private Date endTime;
@ApiModelProperty(value = "优惠券领取数量")

View File

@ -40,11 +40,11 @@ public class YxStoreCouponUserQueryVo implements Serializable {
@ApiModelProperty(value = "最低消费多少金额可用优惠券")
private BigDecimal useMinPrice;
@JsonFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
private Date createTime;
@ApiModelProperty(value = "优惠券结束时间")
@JsonFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
private Date endTime;
@ApiModelProperty(value = "使用时间")

View File

@ -413,6 +413,7 @@ public class YxStoreOrderServiceImpl extends BaseServiceImpl<StoreOrderMapper, Y
* @return YxStoreOrder
*/
@Override
@CacheEvict(cacheNames = ShopConstants.YSHOP_REDIS_INDEX_KEY,allEntries = true)
public YxStoreOrder createOrder(YxUser userInfo, String key, OrderParam param) {
ComputeVo computeVo = this.computedOrder(userInfo,key,param.getCouponId(),

View File

@ -92,7 +92,7 @@ public class YxStoreOrderQueryVo implements Serializable {
private String payType;
@ApiModelProperty(value = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
private Date createTime;
@ApiModelProperty(value = "订单状态(-1 : 申请退款 -2 : 退货成功 0待发货1待收货2已收货3待评价-1已退款")

View File

@ -64,7 +64,7 @@ public class YxStoreProductReplyQueryVo implements Serializable {
@ApiModelProperty(value = "管理员回复时间")
private Date merchantReplyTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
private Date createTime;
private String star;

View File

@ -50,7 +50,7 @@ public class YxUserBillDto implements Serializable {
private String mark;
/** 添加时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
private Date createTime;
/** 0 = 带确定 1 = 有效 -1 = 无效 */

View File

@ -57,7 +57,7 @@ public class YxUserDto implements Serializable {
private String phone;
/** 添加时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
private Date createTime;
/** 添加ip */

View File

@ -41,7 +41,7 @@ public class YxUserBillQueryVo implements Serializable {
private String mark;
@ApiModelProperty(value = "添加时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
private Date createTime;

View File

@ -57,7 +57,7 @@ public class YxArticleDto implements Serializable {
private Integer status;
/** 添加时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
private Date createTime;
/** 是否隐藏 */