|
@@ -63,15 +63,17 @@ func MsgTxtHandler(w ResponseWriter, r *Request) {
|
|
|
w.ReplyText("嗨,小星来陪你解闷。有什么开心的,不开心的说说来,大伙乐呵乐呵。\n输入q或Q离开。")
|
|
|
return
|
|
|
} else if r.Content == "抽奖" { //进入抽奖环节
|
|
|
+ /*
|
|
|
+ //TODO 改为查我的抽奖卷
|
|
|
+ if dao.GetMyCouponAmount(r.FromUserName) <= 0 {
|
|
|
+ w.ReplyText("对不起,你的奖劵不足。您可以查看<a href='http://www.qimingxing.info/p/'>企明星的最新活动</a>赚取积分。")
|
|
|
+ } else if dao.GetMyTodayDrawTimes() > 0 { //检查今日抽奖次数
|
|
|
+ w.ReplyText("对不起,你今天的抽奖次数已经用完,请您明天再来。")
|
|
|
+ }
|
|
|
+ */
|
|
|
//查改用户是否已经抽过奖
|
|
|
- /*if dao.FindWinningRecord(r.FromUserName, wf.SysConfig.Activity["activitycode"]) {
|
|
|
+ if dao.FindWinningRecord(r.FromUserName, wf.SysConfig.Activity["activitycode"]) {
|
|
|
w.ReplyText("小主莫贪心,每人只有一次抽奖机会呦")
|
|
|
- }*/
|
|
|
- //TODO 改为查我的抽奖卷
|
|
|
- if dao.GetMyCouponAmount(r.FromUserName) <= 0 {
|
|
|
- w.ReplyText("对不起,你的奖劵不足。您可以查看<a href='http://www.qimingxing.info/p/'>企明星的最新活动</a>赚取积分。")
|
|
|
- } else if dao.GetMyTodayDrawTimes() > 0 { //检查今日抽奖次数
|
|
|
- w.ReplyText("对不起,你今天的抽奖次数已经用完,请您明天再来。")
|
|
|
} else {
|
|
|
targeturl := fmt.Sprintf("http://%s/activity/%s/%s", wf.SysConfig.Domain, wf.SysConfig.Activity["activitycode"], se.EncodeString(r.FromUserName))
|
|
|
log.Println("choujiang url:", targeturl)
|