|
@@ -154,7 +154,7 @@ func GetArticleUserCollectCount(userId int) (count int, err error) {
|
|
|
}
|
|
|
|
|
|
func GetArticleUserCollectList(startSize, pageSize, userId int) (items []*ArticleReportBillboardResp, err error) {
|
|
|
- sql := `SELECT a.* FROM cygx_article_collect AS a INNER JOIN cygx_article as art ON art.article_id = a.article_id
|
|
|
+ sql := `SELECT a.*,art.category_id FROM cygx_article_collect AS a INNER JOIN cygx_article as art ON art.article_id = a.article_id
|
|
|
WHERE a.user_id=?
|
|
|
ORDER BY a.create_time DESC LIMIT ?,? `
|
|
|
_, err = orm.NewOrm().Raw(sql, userId, startSize, pageSize).QueryRows(&items)
|
|
@@ -239,7 +239,7 @@ func AddCountryCode(CountryCode string, user *WxUserItem) (err error) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
type OutboundMobileItem struct {
|
|
|
OutboundMobile string `description:"外呼手机号"`
|
|
|
OutboundCountryCode string `description:"外呼手机号区号"`
|
|
@@ -271,7 +271,7 @@ func AddOutboundMobile(item *OutboundMobileItem, userId int) (err error) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
func BindUserOutboundMobile(mobile, countryCode string, userId int) (err error) {
|
|
|
o := orm.NewOrm()
|
|
|
sql := `UPDATE wx_user SET outbound_mobile=? ,outbound_country_code = ?, country_code= ? WHERE user_id=? `
|
|
@@ -279,7 +279,7 @@ func BindUserOutboundMobile(mobile, countryCode string, userId int) (err error)
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
func BindUserOutboundMobileByMobile(mobile, countryCode string, userId int) (err error) {
|
|
|
o := orm.NewOrm()
|
|
|
sql := `UPDATE wx_user SET outbound_mobile=? ,outbound_country_code = ? WHERE user_id=? `
|
|
@@ -287,7 +287,7 @@ func BindUserOutboundMobileByMobile(mobile, countryCode string, userId int) (err
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
func ChangeUserOutboundMobileByMobile(userId int) (err error) {
|
|
|
o := orm.NewOrm()
|
|
|
sql := `UPDATE wx_user SET country_code = 86 WHERE user_id=? `
|
|
@@ -310,7 +310,7 @@ type UserWhiteListRep struct {
|
|
|
List []*UserWhiteList
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
func GetFormalUserWhiteList(fieldStr, condition string) (items []*UserWhiteList, err error) {
|
|
|
sql := `SELECT ` + fieldStr + `
|
|
|
(SELECT cp.seller_name FROM company_product AS cp WHERE cp.company_id = u.company_id ORDER BY cp.product_id DESC LIMIT 0,1 ) as seller_name,
|
|
@@ -329,7 +329,7 @@ func GetFormalUserWhiteList(fieldStr, condition string) (items []*UserWhiteList,
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
func GetSustainableUserWhiteList(fieldStr, condition string) (items []*UserWhiteList, err error) {
|
|
|
sql := `SELECT ` + fieldStr + `
|
|
|
(SELECT cp.seller_name FROM company_product AS cp WHERE cp.company_id = u.company_id ORDER BY cp.product_id DESC LIMIT 0,1 ) as seller_name,
|
|
@@ -355,7 +355,7 @@ func GetSustainableUserWhiteList(fieldStr, condition string) (items []*UserWhite
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
type GetSendEmailAllUserWithRAIRep struct {
|
|
|
CompanyName string `description:"客户名称"`
|
|
|
CreditCode string `description:"社会统一信用码"`
|
|
@@ -402,7 +402,7 @@ func GetSendEmailAllUserWithRAI() (items []*GetSendEmailAllUserWithRAIRep, err e
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
type GetSendEmailAllUserWithCompanyRep struct {
|
|
|
RealName string `description:"姓名"`
|
|
|
Mobile string `description:"手机号"`
|
|
@@ -440,7 +440,7 @@ type Headimgurl struct {
|
|
|
Headimgurl string `description:"用户头像"`
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
func UpdateUserHeadimgurl(headimgurl string, userId int) (err error) {
|
|
|
o := orm.NewOrm()
|
|
|
sql := `UPDATE wx_user SET headimgurl = ? WHERE user_id=? `
|
|
@@ -448,7 +448,7 @@ func UpdateUserHeadimgurl(headimgurl string, userId int) (err error) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
func UpdateUserLabel(userLabel string, userId int) (err error) {
|
|
|
o := orm.NewOrm()
|
|
|
sql := `UPDATE wx_user SET user_label = ? WHERE user_id=? `
|
|
@@ -456,7 +456,7 @@ func UpdateUserLabel(userLabel string, userId int) (err error) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
func UpdateUserInteractionNum(interactionNum, userId int) (err error) {
|
|
|
o := orm.NewOrm()
|
|
|
sql := `UPDATE wx_user SET interaction_num = ? WHERE user_id=? `
|