|
@@ -76,15 +76,67 @@ func GetCygxActivitySpecialTripBillList(condition string, pars []interface{}) (i
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+type AirborneCount struct {
|
|
|
+ Count int
|
|
|
+ ChartPermissionId int ` description:"品种权限ID"`
|
|
|
+}
|
|
|
+
|
|
|
// 获取空降的公司报名的记录
|
|
|
-func GetActivitySpecialTripAirborneCountByActivitySpecial(condition string, pars []interface{}) (count int, err error) {
|
|
|
- sqlCount := ` SELECT COUNT(1) AS count
|
|
|
+func GetActivitySpecialTripAirborneCountByActivitySpecial(condition string, pars []interface{}) (items []*AirborneCount, err error) {
|
|
|
+ sqlCount := ` SELECT chart_permission_id,COUNT(1) AS count
|
|
|
FROM
|
|
|
cygx_activity_special_meeting_detail AS t
|
|
|
INNER JOIN cygx_activity_special AS a ON a.activity_id = t.activity_id
|
|
|
WHERE
|
|
|
- 1= 1 AND YEAR ( t.create_time )= YEAR (NOW()) ` + condition
|
|
|
+ 1= 1 AND YEAR ( t.create_time )= YEAR (NOW()) ` + condition + `GROUP BY chart_permission_id`
|
|
|
o := orm.NewOrm()
|
|
|
- err = o.Raw(sqlCount, pars).QueryRow(&count)
|
|
|
+ _, err = o.Raw(sqlCount, pars).QueryRows(&items)
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+type CygxActivitySpecialTripBillDetailList struct {
|
|
|
+ Id int `orm:"column(id);pk"`
|
|
|
+ UserId int `description:"用户id,多个用,隔开"`
|
|
|
+ ActivityId int `description:"活动ID"`
|
|
|
+ ActivityName string `description:"活动标题"`
|
|
|
+ CreateTime time.Time `description:"创建时间"`
|
|
|
+ Mobile string `description:"手机号"`
|
|
|
+ Email string `description:"邮箱号"`
|
|
|
+ CompanyId int `description:"公司ID"`
|
|
|
+ CompanyName string `description:"公司名称"`
|
|
|
+ RealName string `description:"用户实际名称"`
|
|
|
+ AdminId int `description:"销售/管理员ID"`
|
|
|
+ Source int `description:"来源,1小程序,2后台添加, 3开发人员手动添加"`
|
|
|
+ BillDetailed int `description:"流水明细,判断是进账还是出账"`
|
|
|
+ DoType int `description:"操作方式,1报名,2取消报名"`
|
|
|
+ RegisterPlatform int `description:"来源 1小程序,2:网页"`
|
|
|
+ ChartPermissionId int `description:"行业id"`
|
|
|
+ ChartPermissionName string `description:"行业名称"`
|
|
|
+}
|
|
|
+
|
|
|
+func GetCygxActivitySpecialTripBillDetailList(condition string, pars []interface{}) (item []*CygxActivitySpecialTripBillList, err error) {
|
|
|
+ o := orm.NewOrm()
|
|
|
+ sql := `SELECT
|
|
|
+ b.*,
|
|
|
+ a.activity_name,
|
|
|
+ c.chart_permission_name
|
|
|
+ FROM
|
|
|
+ cygx_activity_special_trip_bill AS b
|
|
|
+ INNER JOIN chart_permission AS c ON c.chart_permission_id = b.chart_permission_id
|
|
|
+ INNER JOIN cygx_activity AS a ON a.activity_id = b.activity_id
|
|
|
+ WHERE
|
|
|
+ 1 = 1` + condition
|
|
|
+ _, err = o.Raw(sql, pars).QueryRows(&item)
|
|
|
+ return
|
|
|
+}
|
|
|
+
|
|
|
+type CygxActivitySpecialPointsBillResp struct {
|
|
|
+ Id int `gorm:"column:id;primary_key;AUTO_INCREMENT"`
|
|
|
+ Content string `gorm:"column:content" ` // 内容说明
|
|
|
+ Total string `gorm:"column:points;default:0;NOT NULL" ` // 合计
|
|
|
+ CreateTime string `gorm:"column:create_time" ` // 创建时间
|
|
|
+ CompanyId int `gorm:"column:company_id;default:0" ` // 公司ID
|
|
|
+ CompanyName string `gorm:"column:company_name" ` // 公司名称
|
|
|
+ RealName string `gorm:"column:real_name"` // 用户实际名称
|
|
|
+ BillDetailed int `gorm:"column:bill_detailed;default:0;NOT NULL" json:""` // 流水明细,判断是进账还是出账
|
|
|
+}
|