...
|
...
|
@@ -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
|
|
|
}
|
...
|
...
|
|