科创券优化

This commit is contained in:
2022-05-17 12:31:47 +08:00
parent 771b02bd61
commit f6f48a3f8d
7 changed files with 73 additions and 47 deletions
+6 -2
View File
@@ -162,13 +162,17 @@ var VipOrderCtr = Ctr{
"coupon_id": 1,
"code_no": "SN" + time.Now().Format("20060102150405") + getSn(),
"effective_start_time[#]": "NOW()",
"effective_end_time": "2022-10-01 23:59:59",
"effective_end_time": time.Now().AddDate(0, 6, 0).Format("2006-01-02 15:04:05"),
"source_type": 1,
"status": 0,
"admin_id": user.GetCeilInt("admin_id"),
"create_time[#]": "NOW()",
}
for n := 0; n < 10; n++ {
for n := 0; n < 5; n++ {
that.Db.Insert("coupon_user", data2)
}
data2["effective_end_time"] = time.Now().AddDate(1, 0, 0).Format("2006-01-02 15:04:05")
for n := 0; n < 5; n++ {
that.Db.Insert("coupon_user", data2)
}
return