科服券列表+领券,企业认证,购买vip领券

This commit is contained in:
zhoupengwei 2022-05-13 15:50:45 +08:00
parent ec798bd624
commit 0ec83f9a95
2 changed files with 5 additions and 0 deletions

View File

@ -191,6 +191,7 @@ var CompanyCtr = Ctr{
//赠送一张券 //赠送一张券
data := Map{ data := Map{
"user_id": user_id, "user_id": user_id,
"coupon_id": 1,
"code_no": "SN" + time.Now().Format("20060102150405") + getSn(), "code_no": "SN" + time.Now().Format("20060102150405") + getSn(),
"effective_start_time[#]": "NOW()", "effective_start_time[#]": "NOW()",
"effective_end_time": "2022-10-01 23:59:59", "effective_end_time": "2022-10-01 23:59:59",

View File

@ -159,6 +159,7 @@ var VipOrderCtr = Ctr{
//user_id := that.Session("user_id").Data //user_id := that.Session("user_id").Data
data2 := Map{ data2 := Map{
"user_id": that.Session("user_id").Data, "user_id": that.Session("user_id").Data,
"coupon_id": 1,
"code_no": "SN" + time.Now().Format("20060102150405") + getSn(), "code_no": "SN" + time.Now().Format("20060102150405") + getSn(),
"effective_start_time[#]": "NOW()", "effective_start_time[#]": "NOW()",
"effective_end_time": "2022-10-01 23:59:59", "effective_end_time": "2022-10-01 23:59:59",
@ -168,6 +169,9 @@ var VipOrderCtr = Ctr{
} }
for n := 0; n < 10; n++ { for n := 0; n < 10; n++ {
that.Db.Insert("coupon_user", data2) that.Db.Insert("coupon_user", data2)
//fmt.Println(that.Db.LastQuery)
//fmt.Println(that.Db.LastData)
//fmt.Println(that.Db.LastErr)
} }
return return