123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- package models
- import (
- "eta_gn/eta_task/global"
- )
- type SendTemplateResponse struct {
- Errcode int `json:"errcode"`
- Errmsg string `json:"errmsg"`
- MsgID int `json:"msgid"`
- }
- type OpenIdList struct {
- OpenId string
- }
- func DeleteTemplateRecordByDate(date string) (err error) {
-
-
-
- sql := `DELETE FROM user_template_record WHERE create_time<? `
- err = global.DEFAULT_DmSQL.Exec(sql, date).Error
- return
- }
- func GetOpenIdArr() (items []string, err error) {
-
-
-
-
-
-
-
-
- sql := ` SELECT DISTINCT ur.open_id FROM wx_user AS wu
- INNER JOIN company AS c ON c.company_id = wu.company_id
- INNER JOIN company_product AS d ON c.company_id=d.company_id
- INNER JOIN user_record AS ur ON wu.user_id=ur.user_id
- WHERE ur.open_id != '' AND ur.subscribe=1 AND ur.create_platform=1 AND d.status IN('正式','试用','永续')
- ORDER BY FIELD(c.company_id, 16) desc, ur.user_record_id asc`
- err = global.DEFAULT_DmSQL.Raw(sql).Find(&items).Error
- return
- }
- func GetOpenIdArrByClassifyId(classifyId int) (items []string, err error) {
-
-
-
-
-
-
-
-
-
-
-
-
-
- return
- }
|