Browse Source

luckdrawverify

胡轶钦 6 years ago
parent
commit
f84ba6baee

+ 1
- 1
controllers/luckdrawlist/luckdrawlist.go View File

83
 func (c *LuckdrawlistController) VerifyLuckdraw() {
83
 func (c *LuckdrawlistController) VerifyLuckdraw() {
84
 	sysUser := c.Context.Get("user").(model.SysUser)
84
 	sysUser := c.Context.Get("user").(model.SysUser)
85
 	userId := sysUser.UserId
85
 	userId := sysUser.UserId
86
-	luckdrawId := c.GetString("luckdrawId")
86
+	luckdrawId := c.GetString(":luckdrawId")
87
 	if luckdrawId == "" {
87
 	if luckdrawId == "" {
88
 		c.ResponseError(errors.New("无效二维码"))
88
 		c.ResponseError(errors.New("无效二维码"))
89
 	}
89
 	}

+ 2
- 2
routers/common.go View File

190
 		//luckdrawlist 抽奖
190
 		//luckdrawlist 抽奖
191
 		beego.NSRouter("luckdrawlist", &luckdrawlist.LuckdrawlistController{}, "get:GetLuckdrawList"),
191
 		beego.NSRouter("luckdrawlist", &luckdrawlist.LuckdrawlistController{}, "get:GetLuckdrawList"),
192
 		beego.NSRouter("luckdrawlist/share", &luckdrawlist.LuckdrawlistController{}, "get:GetLuckShareList"),
192
 		beego.NSRouter("luckdrawlist/share", &luckdrawlist.LuckdrawlistController{}, "get:GetLuckShareList"),
193
-		beego.NSRouter("luckdrawlist/:luckdrawId", &luckdrawlist.LuckdrawlistController{}, "get:GetVerifyList"),
194
-		beego.NSRouter("luckdrawlist/:luckdrawId", &luckdrawlist.LuckdrawlistController{}, "put:VerifyLuckdraw"),
193
+		beego.NSRouter("luckdrawlist/verify/:luckdrawId", &luckdrawlist.LuckdrawlistController{}, "get:GetVerifyList"),
194
+		beego.NSRouter("luckdrawlist/verify/:luckdrawId", &luckdrawlist.LuckdrawlistController{}, "put:VerifyLuckdraw"),
195
 
195
 
196
 		// bodychecklist 体检列表
196
 		// bodychecklist 体检列表
197
 		beego.NSRouter("bodychecklist", &bodychecklist.BodychecklistController{}, "get:GetBodyCheckList"),
197
 		beego.NSRouter("bodychecklist", &bodychecklist.BodychecklistController{}, "get:GetBodyCheckList"),

+ 2
- 2
service/luckdrawlist/luckdrawlist.go View File

31
 		}
31
 		}
32
 
32
 
33
 		filters = []string{
33
 		filters = []string{
34
-			"a.case_id='" + caseID + "'",
34
+			"case_id='" + caseID + "'",
35
 		}
35
 		}
36
 	} else {
36
 	} else {
37
 		casesRaw := s.ctx.Get("cases")
37
 		casesRaw := s.ctx.Get("cases")
46
 		}
46
 		}
47
 
47
 
48
 		filters = []string{
48
 		filters = []string{
49
-			"a.case_id in ('" + strings.Join(caseIDs, "','") + "')",
49
+			"case_id in ('" + strings.Join(caseIDs, "','") + "')",
50
 		}
50
 		}
51
 	}
51
 	}
52
 
52