作者 唐旭辉

bug 修复

... ... @@ -140,7 +140,7 @@ type VisibleObject struct {
/*TemplateEditVisible */
type TemplateEditVisibleRequest struct {
Id int `json:"id"` //模板编号
VisibleObject []VisibleObject `json:"visibleObject" valid:"Required"`
VisibleObject []VisibleObject `json:"visibleObject"`
}
type TemplateEditVisibleResponse struct {
}
... ...
... ... @@ -266,7 +266,16 @@ func TemplateEditVisible(uid, companyId int64, request *protocol.TemplateEditVis
log.Error(err.Error())
return
}
if err = utils.UpdateTableByMap(template, map[string]interface{}{"VisibleObject": string(data)}); err != nil {
var (
visibleType int8
)
if len(request.VisibleObject) > 0 {
visibleType = models.VisibleTypeDepartment
} else {
visibleType = models.VisibleTypeAll
}
if err = utils.UpdateTableByMap(template, map[string]interface{}{"VisibleObject": string(data), "VisibleType": visibleType}); err != nil {
log.Error(err.Error())
return
}
... ...
... ... @@ -6,8 +6,9 @@ import (
)
const (
KEY_PREFIX string = "oppmg_" //统一前缀
KEY_USER_TOKEN string = "token" //登录token存储
KEY_PREFIX string = "oppmg_" //统一前缀
KEY_USER_TOKEN string = "token" //登录token存储
KEY_CAPTCHA_AUTH string = "captch_auth" //统一用户中心返回的验证码凭证
)
const (
... ...
... ... @@ -83,4 +83,4 @@ func RefreshLoginTokenExpires(userid int64, companyid int64) error {
return nil
}
//消息发布订阅
// func Set
... ...