ziwen 1 năm trước cách đây
mục cha
commit
a39643a5df
3 tập tin đã thay đổi với 9 bổ sung4 xóa
  1. 6 2
      controllers/activity.go
  2. 1 0
      routers/router.go
  3. 2 2
      services/activity.go

+ 6 - 2
controllers/activity.go

@@ -24,6 +24,10 @@ type ActivityABaseController struct {
 	BaseCommonController
 }
 
+type ActivityNoLoginController struct {
+	BaseAuthMobileController
+}
+
 // @Title 活动类型列表
 // @Description活动类型列表接口
 // @Success 200 {object} models.ActivityTypeListResp
@@ -1692,7 +1696,7 @@ func (this *ActivityCoAntroller) LabelMoreList() {
 // @Param   IsResearchPoints   query   string  false       "是否仅展示研选扣点 1:展示研选扣点、2:展示外部资源 ,1,2两者都展示" //兼容前端
 // @Success 200 {object} models.GetCygxActivityListRep
 // @router /listNew [get]
-func (this *ActivityCoAntroller) ActivityListNew() {
+func (this *ActivityNoLoginController) ActivityListNew() {
 	br := new(models.BaseResponse).Init()
 	defer func() {
 		this.Data["json"] = br
@@ -2188,7 +2192,7 @@ func (this *ActivityCoAntroller) CheckAsk() {
 // @Param   IsPower   query   int  false       "是否选择有权限行业 ,1是 0 否 默认0"
 // @Success 200 {object} models.ActivityTypeListHomeResp
 // @router /labelTypeListV5 [get]
-func (this *ActivityCoAntroller) LabelTypeListV5() {
+func (this *ActivityNoLoginController) LabelTypeListV5() {
 	br := new(models.BaseResponse).Init()
 	defer func() {
 		this.Data["json"] = br

+ 1 - 0
routers/router.go

@@ -96,6 +96,7 @@ func init() {
 			web.NSInclude(
 				&controllers.ActivityCoAntroller{},
 				&controllers.ActivityABaseController{},
+				&controllers.ActivityNoLoginController{},
 			),
 		),
 		web.NSNamespace("/research",

+ 2 - 2
services/activity.go

@@ -1113,8 +1113,8 @@ func GetActivityonditionList(user *models.WxUserItem, activityTypeId, chartPermi
 // 根据用户身份处理活动可见
 func ActivityConditioninitSql(user *models.WxUserItem, condition string, isPower int) (conditionActivity string, err error) {
 	// cygx_10.9 未绑定联系方式的客户可以看到部分活动
-	if user.UserId == 0 {
-		conditionActivity  = ` AND art.publish_status = 1  AND art.visible_range != 1  AND (art.is_limit_people = 0 OR (art.is_limit_people=1 AND art.is_all_customer_type=1))   ` + condition
+	if user.UserId == 0 || user.CompanyId == 1 {
+		conditionActivity  = ` AND art.publish_status = 1  AND art.visible_range != 1 AND (art.is_limit_people = 0 OR (art.is_limit_people=1 AND art.is_all_customer_type=1))   ` + condition
 		return
 	}
 	condition += `   AND art.publish_status = 1 `