|
@@ -23,6 +23,10 @@ type WxUserRaiLabel struct {
|
|
|
ModifyTime time.Time `description:"更新时间"`
|
|
|
}
|
|
|
|
|
|
+type WxUserRaiLabelList struct {
|
|
|
+ List []*WxUserRaiLabelListResp
|
|
|
+}
|
|
|
+
|
|
|
type WxUserRaiLabelListResp struct {
|
|
|
UserId int `description:"用户ID"`
|
|
|
RaiLabelId int `description:"ID"`
|
|
@@ -94,6 +98,24 @@ func GetWxUserRaiLabelListByUserIds(userIdArr []int) (list []*WxUserRaiLabelList
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+func GetWxUserRaiLabelListByUserId(userId int) (list []*WxUserRaiLabelListResp, err error) {
|
|
|
+ o := orm.NewOrmUsingDB("hz_cygx")
|
|
|
+ sql := `SELECT
|
|
|
+ rai_label_id,
|
|
|
+ user_id,
|
|
|
+ label,
|
|
|
+ source_type
|
|
|
+ FROM
|
|
|
+ wx_user_rai_label
|
|
|
+ WHERE
|
|
|
+ user_id = ? AND create_time >= ?
|
|
|
+ ORDER BY
|
|
|
+ create_time DESC LIMIT 1000 `
|
|
|
+ _, err = o.Raw(sql, userId, time.Now().AddDate(0, -4, 0).Format(utils.FormatDate)).QueryRows(&list)
|
|
|
+ return
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
func GetWxUserRaiLabelDetailById(raiLabelId int) (item *WxUserRaiLabel, err error) {
|
|
|
o := orm.NewOrmUsingDB("hz_cygx")
|