|
@@ -493,7 +493,7 @@ func (this *YanxuanSpecialController) Enable() {
|
|
|
} else {
|
|
|
status = 4
|
|
|
}
|
|
|
- if tmpErr := models.EnableYanxuanSpecial(req.Id, status, req.Reason); tmpErr != nil {
|
|
|
+ if tmpErr := models.EnableYanxuanSpecial(req.Id, status, req.Reason, user.RealName); tmpErr != nil {
|
|
|
br.Msg = "审批失败"
|
|
|
br.ErrMsg = "审批失败, Err:" + tmpErr.Error()
|
|
|
return
|
|
@@ -504,7 +504,7 @@ func (this *YanxuanSpecialController) Enable() {
|
|
|
go services.SendWxMsgSpecialAuthor(req.Id, req.Status)
|
|
|
go services.UpdateYanxuanSpecialResourceData(req.Id) // 写入首页最新 cygx_resource_data 表
|
|
|
go services.EsAddYanxuanSpecial(req.Id) // 写入es 综合搜索
|
|
|
- go services.AddAddCygxYanxuanSpecialApprovalLog(user, req.Id, req.Status, req.Reason) // 写入es 综合搜索
|
|
|
+ go services.AddAddCygxYanxuanSpecialApprovalLog(user, req.Id, req.Status, req.Reason) // 添加审核记录日志
|
|
|
br.Msg = "审批成功"
|
|
|
br.Ret = 200
|
|
|
br.Success = true
|
|
@@ -521,8 +521,8 @@ func (this *YanxuanSpecialController) Collect() {
|
|
|
this.Data["json"] = br
|
|
|
this.ServeJSON()
|
|
|
}()
|
|
|
- sysUser := this.User
|
|
|
- if sysUser == nil {
|
|
|
+ user := this.User
|
|
|
+ if user == nil {
|
|
|
br.Msg = "请登录"
|
|
|
br.ErrMsg = "请登录,SysUser Is Empty"
|
|
|
br.Ret = 408
|
|
@@ -545,20 +545,21 @@ func (this *YanxuanSpecialController) Collect() {
|
|
|
return
|
|
|
}
|
|
|
var sellerName string
|
|
|
- sellerName, err = models.GetCompanySellerName(sysUser.CompanyId)
|
|
|
+ sellerItemQy, err := models.GetSellerByCompanyIdCheckFicc(user.CompanyId, 2)
|
|
|
if err != nil {
|
|
|
- br.Msg = "报名失败!"
|
|
|
- br.ErrMsg = "获取对应销售失败,Err:" + err.Error()
|
|
|
+ br.Msg = "查询栏目详情失败!"
|
|
|
+ br.ErrMsg = "获取销售信息失败,Err:" + err.Error()
|
|
|
return
|
|
|
}
|
|
|
+ sellerName = sellerItemQy.RealName
|
|
|
if req.Status == 1 {
|
|
|
item := models.CygxYanxuanSpecialCollect{
|
|
|
- UserId: sysUser.UserId,
|
|
|
- Mobile: sysUser.Mobile,
|
|
|
- Email: sysUser.Email,
|
|
|
- CompanyId: sysUser.CompanyId,
|
|
|
- CompanyName: sysUser.CompanyName,
|
|
|
- RealName: sysUser.RealName,
|
|
|
+ UserId: user.UserId,
|
|
|
+ Mobile: user.Mobile,
|
|
|
+ Email: user.Email,
|
|
|
+ CompanyId: user.CompanyId,
|
|
|
+ CompanyName: user.CompanyName,
|
|
|
+ RealName: user.RealName,
|
|
|
SellerName: sellerName,
|
|
|
CreateTime: time.Now(),
|
|
|
ModifyTime: time.Now(),
|
|
@@ -573,7 +574,7 @@ func (this *YanxuanSpecialController) Collect() {
|
|
|
}
|
|
|
br.Msg = "收藏成功"
|
|
|
} else {
|
|
|
- err = models.DelCygxYanxuanSpecialCollect(sysUser.UserId, req.Id)
|
|
|
+ err = models.DelCygxYanxuanSpecialCollect(user.UserId, req.Id)
|
|
|
if err != nil {
|
|
|
br.Msg = "删除失败"
|
|
|
br.ErrMsg = "删除失败,Err:" + err.Error()
|
|
@@ -581,7 +582,7 @@ func (this *YanxuanSpecialController) Collect() {
|
|
|
}
|
|
|
br.Msg = "取消收藏成功"
|
|
|
}
|
|
|
-
|
|
|
+ go services.UdpateYanxuanSpecialCollect(user, req.Id, req.Status)
|
|
|
br.Ret = 200
|
|
|
br.Success = true
|
|
|
}
|
|
@@ -703,8 +704,8 @@ func (this *YanxuanSpecialController) Follow() {
|
|
|
this.Data["json"] = br
|
|
|
this.ServeJSON()
|
|
|
}()
|
|
|
- sysUser := this.User
|
|
|
- if sysUser == nil {
|
|
|
+ user := this.User
|
|
|
+ if user == nil {
|
|
|
br.Msg = "请登录"
|
|
|
br.ErrMsg = "请登录,SysUser Is Empty"
|
|
|
br.Ret = 408
|
|
@@ -727,21 +728,22 @@ func (this *YanxuanSpecialController) Follow() {
|
|
|
return
|
|
|
}
|
|
|
var sellerName string
|
|
|
- sellerName, err = models.GetCompanySellerName(sysUser.CompanyId)
|
|
|
+ sellerItemQy, err := models.GetSellerByCompanyIdCheckFicc(user.CompanyId, 2)
|
|
|
if err != nil {
|
|
|
- br.Msg = "报名失败!"
|
|
|
- br.ErrMsg = "获取对应销售失败,Err:" + err.Error()
|
|
|
+ br.Msg = "查询栏目详情失败!"
|
|
|
+ br.ErrMsg = "获取销售信息失败,Err:" + err.Error()
|
|
|
return
|
|
|
}
|
|
|
+ sellerName = sellerItemQy.RealName
|
|
|
if req.Status == 1 {
|
|
|
item := models.CygxYanxuanSpecialFollow{
|
|
|
- UserId: sysUser.UserId,
|
|
|
+ UserId: user.UserId,
|
|
|
FollowUserId: req.FollowUserId,
|
|
|
- Mobile: sysUser.Mobile,
|
|
|
- Email: sysUser.Email,
|
|
|
- CompanyId: sysUser.CompanyId,
|
|
|
- CompanyName: sysUser.CompanyName,
|
|
|
- RealName: sysUser.RealName,
|
|
|
+ Mobile: user.Mobile,
|
|
|
+ Email: user.Email,
|
|
|
+ CompanyId: user.CompanyId,
|
|
|
+ CompanyName: user.CompanyName,
|
|
|
+ RealName: user.RealName,
|
|
|
SellerName: sellerName,
|
|
|
CreateTime: time.Now(),
|
|
|
ModifyTime: time.Now(),
|
|
@@ -756,7 +758,7 @@ func (this *YanxuanSpecialController) Follow() {
|
|
|
}
|
|
|
br.Msg = "关注成功"
|
|
|
} else {
|
|
|
- err = models.DelCygxYanxuanSpecialFollow(sysUser.UserId, req.FollowUserId)
|
|
|
+ err = models.DelCygxYanxuanSpecialFollow(user.UserId, req.FollowUserId)
|
|
|
if err != nil {
|
|
|
br.Msg = "删除失败"
|
|
|
br.ErrMsg = "删除失败,Err:" + err.Error()
|
|
@@ -764,7 +766,7 @@ func (this *YanxuanSpecialController) Follow() {
|
|
|
}
|
|
|
br.Msg = "取消关注成功"
|
|
|
}
|
|
|
-
|
|
|
+ go services.UdpateYanxuanSpecialFansNum(user, req.FollowUserId, req.Status)
|
|
|
br.Ret = 200
|
|
|
br.Success = true
|
|
|
}
|