|
@@ -317,12 +317,12 @@ func (a *Activemanage) Getluckdraw() error {
|
|
|
flog = "T"
|
|
|
}
|
|
|
//红包
|
|
|
- if (i > 184 && i < 221) || (i > 319 && i < 356) {
|
|
|
+ if (i > 189 && i < 221) || (i > 324 && i < 351) {
|
|
|
var amount int //红包金额以“元”为单位,微信红包以“分”为单位
|
|
|
- if i > 184 && i < 221 {
|
|
|
+ if i > 189 && i < 221 {
|
|
|
amount = 500 //红包金额以“元”为单位,微信红包以“分”为单位
|
|
|
|
|
|
- } else if i > 319 && i < 356 {
|
|
|
+ } else if i > 324 && i < 351 {
|
|
|
amount = 100 //红包金额以“元”为单位,微信红包以“分”为单位
|
|
|
}
|
|
|
bm := qrpc.BonusMsg{Mchbillno: fmt.Sprint(today.Unix()),
|
|
@@ -358,7 +358,7 @@ func (a *Activemanage) Getluckdraw() error {
|
|
|
|
|
|
}
|
|
|
msg = " 小主是真真的好运气," + s_prize + "落入您囊中。红包将由系统自动发放到您的微信,请注意查收。<br/><br/> 分享给好友参加明天抽奖呦!乖,快去分享吧!大奖可能就在明天~~"
|
|
|
- } else if (i > 274 && i < 311) || (i > 94 && i < 131) {
|
|
|
+ } else if (i > 279 && i < 311) || (i > 94 && i < 121) {
|
|
|
//时间判断,提醒不同
|
|
|
//now := time.Now()
|
|
|
//不在工作时间
|
|
@@ -405,24 +405,24 @@ func getLuckDraw() int {
|
|
|
amount := min + rand.New(rand.NewSource(time.Now().UnixNano())).Intn(max-min)
|
|
|
if amount <= 0 {
|
|
|
return 1
|
|
|
- } else if amount > 274 && amount < 311 {
|
|
|
- count := Count("winningrecord", "{'s_prize':'《牛奶可乐经济学》'}")
|
|
|
- if count > 6 {
|
|
|
- amount = 245
|
|
|
- }
|
|
|
- } else if amount > 94 && amount < 131 {
|
|
|
+ } else if amount > 279 && amount < 311 {
|
|
|
+ //count := Count("winningrecord", "{'s_prize':'《牛奶可乐经济学》'}")
|
|
|
+ //if count > 6 {
|
|
|
+ amount = 245
|
|
|
+ //}
|
|
|
+ } else if amount > 94 && amount < 121 {
|
|
|
count := Count("winningrecord", "{'s_prize':'限量版U盘'}")
|
|
|
if count > 100 {
|
|
|
amount = 255
|
|
|
}
|
|
|
- } else if amount > 184 && amount < 221 {
|
|
|
+ } else if amount > 189 && amount < 221 {
|
|
|
count := Count("winningrecord", "{'s_prize':'五元现金红包'}")
|
|
|
- if count > 200 {
|
|
|
+ if count > 250 {
|
|
|
amount = 65
|
|
|
}
|
|
|
- } else if amount > 319 && amount < 356 {
|
|
|
+ } else if amount > 324 && amount < 356 {
|
|
|
count := Count("winningrecord", "{'s_prize':'一元现金红包'}")
|
|
|
- if count > 2500 {
|
|
|
+ if count > 3100 {
|
|
|
amount = 75
|
|
|
}
|
|
|
}
|