|
@@ -5,7 +5,7 @@ import (
|
|
"time"
|
|
"time"
|
|
)
|
|
)
|
|
|
|
|
|
-//活动详情
|
|
|
|
|
|
+// 活动详情
|
|
type CygxActivity struct {
|
|
type CygxActivity struct {
|
|
ActivityId int `orm:"column(activity_id);pk";description:"活动ID 等于0新增活动,大于0修改活动"`
|
|
ActivityId int `orm:"column(activity_id);pk";description:"活动ID 等于0新增活动,大于0修改活动"`
|
|
ActivityTypeId int `description:"活动类型id"`
|
|
ActivityTypeId int `description:"活动类型id"`
|
|
@@ -83,7 +83,7 @@ type CygxYidongActivityExamineStatus struct {
|
|
YidongExamineStatus int `description:"易董活动报名审核状态0审核中,1:审核通过、2审核不通过"`
|
|
YidongExamineStatus int `description:"易董活动报名审核状态0审核中,1:审核通过、2审核不通过"`
|
|
}
|
|
}
|
|
|
|
|
|
-//通过纪要ID获取活动详情
|
|
|
|
|
|
+// 通过ID获取活动详情
|
|
func GetAddActivityInfoById(activityIdYiDong string) (item *CygxActivity, err error) {
|
|
func GetAddActivityInfoById(activityIdYiDong string) (item *CygxActivity, err error) {
|
|
o := orm.NewOrm()
|
|
o := orm.NewOrm()
|
|
sql := `SELECT
|
|
sql := `SELECT
|
|
@@ -91,8 +91,8 @@ func GetAddActivityInfoById(activityIdYiDong string) (item *CygxActivity, err er
|
|
FROM
|
|
FROM
|
|
cygx_activity as a
|
|
cygx_activity as a
|
|
WHERE
|
|
WHERE
|
|
- yidong_activity_id =?`
|
|
|
|
- err = o.Raw(sql, activityIdYiDong).QueryRow(&item)
|
|
|
|
|
|
+ yidong_activity_id =? OR yidong_activity_id_by_cygx = ? LIMIT 1 `
|
|
|
|
+ err = o.Raw(sql, activityIdYiDong, activityIdYiDong).QueryRow(&item)
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
@@ -134,7 +134,7 @@ func AddActivitySignupNumMulti(items []*CygxActivitySignup) (err error) {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
-//GetActivitySignupListByActivity获取已经报名了的用户列表
|
|
|
|
|
|
+// GetActivitySignupListByActivity获取已经报名了的用户列表
|
|
func GetActivitySignupListByActivity(activityId int) (items []*CygxActivitySignup, err error) {
|
|
func GetActivitySignupListByActivity(activityId int) (items []*CygxActivitySignup, err error) {
|
|
o := orm.NewOrm()
|
|
o := orm.NewOrm()
|
|
sql := `SELECT * FROM cygx_activity_signup WHERE activity_id = ?`
|
|
sql := `SELECT * FROM cygx_activity_signup WHERE activity_id = ?`
|
|
@@ -188,7 +188,7 @@ type CygxYidongActivitySignupReq struct {
|
|
Job string `description:"职务" json:"job"`
|
|
Job string `description:"职务" json:"job"`
|
|
}
|
|
}
|
|
|
|
|
|
-//通过纪要ID获取活动详情
|
|
|
|
|
|
+// 通过纪要ID获取活动详情
|
|
func GetAddActivityInfoByMobile(mobile string) (item *CygxYidongActivitySignupReq, err error) {
|
|
func GetAddActivityInfoByMobile(mobile string) (item *CygxYidongActivitySignupReq, err error) {
|
|
o := orm.NewOrm()
|
|
o := orm.NewOrm()
|
|
sql := ` SELECT u.*, c.company_name FROM wx_user AS u
|
|
sql := ` SELECT u.*, c.company_name FROM wx_user AS u
|
|
@@ -208,7 +208,7 @@ func AddActivityItemsLogNumMulti(items []*CygxYidongActivityExamineStatus) (err
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
-//我的日程
|
|
|
|
|
|
+// 我的日程
|
|
type CygxMySchedule struct {
|
|
type CygxMySchedule struct {
|
|
Id int `orm:"column(id);pk"`
|
|
Id int `orm:"column(id);pk"`
|
|
ActivityId int `description:"活动ID"`
|
|
ActivityId int `description:"活动ID"`
|
|
@@ -220,7 +220,7 @@ type CygxMySchedule struct {
|
|
CompanyName string `description:"公司名称"`
|
|
CompanyName string `description:"公司名称"`
|
|
}
|
|
}
|
|
|
|
|
|
-//GetCygxMyScheduleList 获取我的日程数据
|
|
|
|
|
|
+// GetCygxMyScheduleList 获取我的日程数据
|
|
func GetCygxMyScheduleList(activityId int) (items []*CygxMySchedule, err error) {
|
|
func GetCygxMyScheduleList(activityId int) (items []*CygxMySchedule, err error) {
|
|
o := orm.NewOrm()
|
|
o := orm.NewOrm()
|
|
sql := `SELECT * FROM cygx_my_schedule WHERE activity_id = ?`
|
|
sql := `SELECT * FROM cygx_my_schedule WHERE activity_id = ?`
|
|
@@ -238,7 +238,7 @@ func AddCygxMyScheduleLNumMulti(items []*CygxMySchedule) (err error) {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
-//DelCygxMyScheduleList 删除我的日程
|
|
|
|
|
|
+// DelCygxMyScheduleList 删除我的日程
|
|
func DelCygxMyScheduleList(mobile string, activityId int) (err error) {
|
|
func DelCygxMyScheduleList(mobile string, activityId int) (err error) {
|
|
o := orm.NewOrm()
|
|
o := orm.NewOrm()
|
|
sql := ` DELETE FROM cygx_my_schedule WHERE mobile IN (` + mobile + `) AND activity_id=?`
|
|
sql := ` DELETE FROM cygx_my_schedule WHERE mobile IN (` + mobile + `) AND activity_id=?`
|
|
@@ -246,7 +246,7 @@ func DelCygxMyScheduleList(mobile string, activityId int) (err error) {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
-//DelCygxcActivitySignup 删除我的报名信息
|
|
|
|
|
|
+// DelCygxcActivitySignup 删除我的报名信息
|
|
func DelCygxcActivitySignup(mobile string, activityId int) (err error) {
|
|
func DelCygxcActivitySignup(mobile string, activityId int) (err error) {
|
|
o := orm.NewOrm()
|
|
o := orm.NewOrm()
|
|
sql := ` DELETE FROM cygx_activity_signup WHERE mobile IN (` + mobile + `) AND activity_id=?`
|
|
sql := ` DELETE FROM cygx_activity_signup WHERE mobile IN (` + mobile + `) AND activity_id=?`
|