|
@@ -22,7 +22,7 @@ type CygxActivityUserSearchContent struct {
|
|
|
}
|
|
|
|
|
|
//添加报名信息
|
|
|
-func AddUserSearchContent(item *CygxActivityUserSearchContent) (lastId int64, err error) {
|
|
|
+func AddUserSearchContent(item *CygxActivityUserSearchContent, ttlTime time.Duration) (lastId int64, err error) {
|
|
|
o := orm.NewOrm()
|
|
|
o.Begin()
|
|
|
defer func() {
|
|
@@ -39,7 +39,7 @@ func AddUserSearchContent(item *CygxActivityUserSearchContent) (lastId int64, er
|
|
|
if err != nil {
|
|
|
return
|
|
|
}
|
|
|
- if count > 0 {
|
|
|
+ if count > 0 || ttlTime > 0 {
|
|
|
sql := `UPDATE cygx_activity_user_search_content SET chart_permissionids = ?,activity_typeids = ?,active_state = ?,is_show_jurisdiction = ? ,modify_time=NOW() WHERE user_id=? `
|
|
|
_, err = o.Raw(sql, item.ChartPermissionids, item.ActivityTypeids, item.ActiveState, item.IsShowJurisdiction, item.UserId).Exec()
|
|
|
return
|