|
@@ -133,8 +133,6 @@ type CheckStatusResp struct {
|
|
|
PermissionName string `description:"拥有权限分类,多个用英文逗号分隔"`
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
type ApplyTryReq struct {
|
|
|
BusinessCardUrl string `description:"名片地址"`
|
|
|
RealName string `description:"姓名"`
|
|
@@ -154,8 +152,6 @@ type CountryCodeItem struct {
|
|
|
CountryCode string `description:"区号"`
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
//修改外呼手机号
|
|
|
type OutboundMobileItem struct {
|
|
|
OutboundMobile string `description:"外呼手机号"`
|
|
@@ -163,9 +159,6 @@ type OutboundMobileItem struct {
|
|
|
ActivityId int `description:"活动ID"`
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
type UserWhiteList struct {
|
|
|
Mobile string `description:"手机号码"`
|
|
|
RealName string `description:"用户实际名称"`
|
|
@@ -181,4 +174,26 @@ type UserWhiteListRep struct {
|
|
|
List []*UserWhiteList
|
|
|
}
|
|
|
|
|
|
+type UserDetailByUserLogin struct {
|
|
|
+ Headimgurl string `description:"头像"`
|
|
|
+ Mobile string `description:"手机号码"`
|
|
|
+ RealName string `description:"用户实际名称"`
|
|
|
+ CompanyName string `description:"公司名称"`
|
|
|
+ Permission string `description:"拥有权限分类,多个用英文逗号分隔"`
|
|
|
+ HasPermission int `description:"1:有该行业权限,正常展示,2:无权限,非潜在客户,3:未在小程序授权用户信息 等"`
|
|
|
+}
|
|
|
|
|
|
+func GetCompanyPermission(companyId int) (permission string, err error) {
|
|
|
+ sql := ` SELECT GROUP_CONCAT(DISTINCT b.chart_permission_name ORDER BY b.sort ASC SEPARATOR ',') AS permission
|
|
|
+ FROM company_report_permission AS a
|
|
|
+ INNER JOIN chart_permission AS b ON a.chart_permission_id=b.chart_permission_id
|
|
|
+ INNER JOIN company_product AS c ON a.company_id=c.company_id AND a.product_id=c.product_id
|
|
|
+ WHERE a.company_id=?
|
|
|
+ AND c.is_suspend=0
|
|
|
+ AND b.cygx_auth=1
|
|
|
+ AND c.status IN('正式','试用','永续')
|
|
|
+ AND a.status IN('正式','试用','永续') `
|
|
|
+ o := orm.NewOrm()
|
|
|
+ err = o.Raw(sql, companyId).QueryRow(&permission)
|
|
|
+ return
|
|
|
+}
|