diff --git a/controllers/client/sign.go b/controllers/client/sign.go index 87cdcf9..a6f755b 100644 --- a/controllers/client/sign.go +++ b/controllers/client/sign.go @@ -254,8 +254,13 @@ func (t *SignCtl) RealSign() { return } - exist, err = new(models.RealSignList).CheckSignIn(activityId, extSql) + realSignList := new(models.RealSignList) + exist, err = realSignList.CheckSignIn(activityId, extSql) t.CheckErr(err) + if exist && realSignList.Status == 1 { + t.ERROR("实名签到名单已被认证", code.MSG_SIGN_REAL_NOT_EXIST) + return + } var body []byte body, err = json.Marshal(params) diff --git a/models/real_sign_list.go b/models/real_sign_list.go index 1302c59..91ef307 100644 --- a/models/real_sign_list.go +++ b/models/real_sign_list.go @@ -15,6 +15,7 @@ type RealSignList struct { ActivityId int64 `json:"activity_id" xorm:"not null default 0 comment('主活动id') INT(11)"` JsonList string `json:"json_list" xorm:"not null comment('名单记录') TEXT"` + Status int `json:"status" xorm:"not null comment('是否已被验证[0/1]') TINYINT(1)"` } func (t *RealSignList) TableName() string { @@ -23,7 +24,6 @@ func (t *RealSignList) TableName() string { // 可能使用模糊匹配 func (t *RealSignList) CheckSignIn(aid int64, ext string) (bool, error) { - //var sql = fmt.Sprintf("is_delete=0 and activity_id=%d and ", aid, ext) ext += " 1 = 1 " return core.GetXormAuto().Where("is_delete=0 and activity_id=?", aid).Where(ext).Get(t) }