|
@@ -62,6 +62,15 @@ func GetCygxActivitySigninCount(condition string, pars []interface{}) (count int
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+func GetCygxActivitySigninDetail(condition string, pars []interface{}) (item *CygxActivitySignin, err error) {
|
|
|
+ sql := `SELECT * FROM cygx_activity_signin as art WHERE 1= 1 `
|
|
|
+ if condition != "" {
|
|
|
+ sql += condition
|
|
|
+ }
|
|
|
+ err = orm.NewOrm().Raw(sql, pars).QueryRow(&item)
|
|
|
+ return
|
|
|
+}
|
|
|
+
|
|
|
// 修改是否推送消息状态
|
|
|
func UpdatedateCygxActivitySignin(item *CygxActivitySignin) (err error) {
|
|
|
sql := ` UPDATE cygx_activity_signin SET create_time= NOW() WHERE user_id = ? AND activity_id = ? `
|
|
@@ -77,6 +86,33 @@ func AddCygxActivitySignin(item *CygxActivitySignin) (err error) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+// 修改
|
|
|
+//func UpdateCygxActivitySignin(item *CygxActivitySignin) (err error) {
|
|
|
+// o := orm.NewOrm()
|
|
|
+// updateParams := make(map[string]interface{})
|
|
|
+// updateParams["PublishTime"] = item.PublishTime
|
|
|
+// updateParams["ModifyTime"] = item.ModifyTime
|
|
|
+// updateParams["ColumnName"] = item.ColumnName
|
|
|
+// updateParams["Title"] = item.Title
|
|
|
+// updateParams["Status"] = item.Status
|
|
|
+// updateParams["Body"] = item.Body
|
|
|
+// updateParams["IsCancel"] = item.IsCancel
|
|
|
+// updateParams["VisibleRange"] = item.VisibleRange
|
|
|
+// updateParams["Abstract"] = item.Abstract
|
|
|
+// updateParams["Department"] = item.Department
|
|
|
+// updateParams["MatchTypeId"] = item.MatchTypeId
|
|
|
+// updateParams["ChartPermissionId"] = item.ChartPermissionId
|
|
|
+// updateParams["ChartPermissionName"] = item.ChartPermissionName
|
|
|
+// ptrStructOrTableName := "cygx_product_interior"
|
|
|
+// whereParam := map[string]interface{}{"user_id": item.UserId}
|
|
|
+// qs := o.QueryTable(ptrStructOrTableName)
|
|
|
+// for expr, exprV := range whereParam {
|
|
|
+// qs = qs.Filter(expr, exprV)
|
|
|
+// }
|
|
|
+// _, err = qs.Update(updateParams)
|
|
|
+// return
|
|
|
+//}
|
|
|
+
|
|
|
// 添加日志
|
|
|
func AddCygxActivitySigninLog(item *CygxActivitySigninLog) (err error) {
|
|
|
o := orm.NewOrm()
|