package data_manage import ( "eta/eta_task/global" "eta/eta_task/utils" ) func GetUnSubUserOpenid(openIdstr string) (items []string, err error) { sql := `SELECT open_id FROM user_record WHERE open_id IS NOT NULL AND subscribe=0 AND create_platform=1 ` sql += ` AND open_id in (` + openIdstr + `) ` err = global.DbMap[utils.DbNameIndex].Raw(sql).Find(&items).Error return } func UpdateSubStatus(unSubIds string) (err error) { sql := "UPDATE user_record SET subscribe=1,subscribe_time=NOW() WHERE create_platform=1 " sql += ` AND open_id in (` + unSubIds + `) ` err = global.DbMap[utils.DbNameIndex].Exec(sql).Error return }