|
@@ -157,7 +157,7 @@ func (this *FollowEnt) AddFollow() {
|
|
|
return map[string]interface{}{
|
|
|
"status": false,
|
|
|
"limit_count": followEntManager.MaxNum,
|
|
|
- }, nil
|
|
|
+ }, errors.New(fmt.Sprintf("您关注的企业已达%d个,无法关注更多", followEntManager.MaxNum))
|
|
|
}
|
|
|
err = followEntManager.AddFollowEnt(util.DecodeId(entId), this.GetString("group"))
|
|
|
if err != nil {
|
|
@@ -180,6 +180,14 @@ func (this *FollowEnt) AddFollow() {
|
|
|
if errMsg != nil {
|
|
|
log.Printf("%s 添加关注企业出错:%s\n", userId, errMsg.Error())
|
|
|
}
|
|
|
+ if rData != nil && errMsg.Error() != "" {
|
|
|
+ this.ServeJson(Result{
|
|
|
+ Error_code: 0,
|
|
|
+ Error_msg: errMsg.Error(),
|
|
|
+ Data: rData,
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
this.ServeJson(NewResult(rData, errMsg))
|
|
|
}
|
|
|
|