This commit is contained in:
yan.y 2025-01-22 18:42:11 +08:00
parent 7e018a1e68
commit 385439997b
1 changed files with 10 additions and 0 deletions

View File

@ -203,6 +203,16 @@ func (p DefParty) orderCreate() web_iris.Party {
var coupons models.Coupons var coupons models.Coupons
for _, value := range orderCreateRequest.PetGoodsInfos { for _, value := range orderCreateRequest.PetGoodsInfos {
//2025-02-06 00:00:00
givenTimestamp := int64(1738771200000)
// 获取当前的系统时间戳(毫秒级)
currentTimestamp := time.Now().UnixMilli()
//时间小于2025-02-06 00:00:00 不使用优惠券
if currentTimestamp < givenTimestamp {
value.Cid = 0
}
//可以参与会员折扣的金额 //可以参与会员折扣的金额
var needDiscountAmount = 0 var needDiscountAmount = 0
//不可参与会员折扣的金额 //不可参与会员折扣的金额