Browse Source

fix:阅读查询

zqbao 9 months ago
parent
commit
8e4f7e4b4e
1 changed files with 4 additions and 4 deletions
  1. 4 4
      controllers/user_read_record.go

+ 4 - 4
controllers/user_read_record.go

@@ -23,7 +23,7 @@ type UserReadRecordController struct {
 // @Param   PageSize   query   int  true       "每页数据条数"
 // @Param   CurrentIndex   query   int  true       "当前页页码,从1开始"
 // @Param   SellerId   query   int  true       "销售id"
-// @Param   Status   query   int  true       "用户状态"
+// @Param   Status   query   string  true       "用户状态"
 // @Param   KeyWord   query   string  true       "手机号/邮箱/姓名"
 // @Param   IsRegistered   query   string  true       "是否注册"
 // @Param   IsSubscribed   query   string  true       "是否关注"
@@ -45,7 +45,7 @@ func (this *UserReadRecordController) List() {
 	pageSize, _ := this.GetInt("PageSize")
 	currentIndex, _ := this.GetInt("CurrentIndex")
 	sellerIdStr := this.GetString("SellerId")
-	status, _ := this.GetInt("Status")
+	status := this.GetString("Status")
 	keyWord := this.GetString("KeyWord")
 	IsRegistered := this.GetString("IsRegisterd")
 	IsSubscribed := this.GetString("IsSubscribed")
@@ -113,10 +113,10 @@ func (this *UserReadRecordController) List() {
 	}
 
 	switch status {
-	case utils.UserStatusNo:
+	case fmt.Sprint(utils.UserStatusNo):
 		condition += " AND u.status=? "
 		pars = append(pars, 0)
-	case utils.UserStatusFormal:
+	case fmt.Sprint(utils.UserStatusFormal):
 		condition += " AND u.status=? "
 		pars = append(pars, 2)
 	default: