Merge remote-tracking branch 'origin/main' into lichang

This commit is contained in:
TsMask
2024-04-15 15:58:44 +08:00
16 changed files with 41 additions and 27 deletions

View File

@@ -1,7 +1,7 @@
# Makefile for rest agent project
PROJECT = OMC
VERSION = 2.2404.3
VERSION = 2.2404.4
PLATFORM = amd64
ARMPLATFORM = aarch64
BUILDDIR = ../../build

View File

@@ -1,7 +1,7 @@
# Makefile for OMC-OMC-crontask project
PROJECT = OMC
VERSION = 2.2404.3
VERSION = 2.2404.4
LIBDIR = be.ems/lib
BINNAME = crontask

View File

@@ -1,7 +1,7 @@
# Makefile for rest agent project
PROJECT = OMC
VERSION = 2.2404.3
VERSION = 2.2404.4
RelDate = `date +%Y%m%d`
Release = $(RelDate)
RelVer = $(VERSION)-$(RelDate)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -3,7 +3,7 @@
ProjectL = omc
ProjectU = OMC
PROJECT = $(ProjectL)
VERSION = 2.2404.3
VERSION = 2.2404.4
RelDate = `date +%Y%m%d`
Release = $(RelDate)
RelVer = $(VERSION)-$(RelDate)

View File

@@ -27,6 +27,7 @@ case "${extension}" in
EOF
if [ ${neType} == "OMC" ]; then
${omcBin}/setomc.sh -m upgrade >> ${logFile}
${omcBin}/omcsvc.sh restart
fi
;;
rpm)
@@ -42,6 +43,7 @@ EOF
EOF
if [ ${neType} == "OMC" ]; then
${omcBin}/setomc.sh -m upgrade >> ${logFile}
${omcBin}/omcsvc.sh restart
fi
;;
*)

View File

@@ -27,6 +27,7 @@ case "${extension}" in
EOF
if [ ${neType} == "OMC" ]; then
${omcBin}/setomc.sh -m upgrade >> ${logFile}
${omcBin}/omcsvc.sh restart
fi
;;
rpm)
@@ -42,6 +43,7 @@ EOF
EOF
if [ ${neType} == "OMC" ]; then
${omcBin}/setomc.sh -m upgrade >> ${logFile}
${omcBin}/omcsvc.sh restart
fi
;;
*)

View File

@@ -2,7 +2,7 @@
ProcList="restagent crontask sshsvc captrace data2html"
ProjectL=omc
VERSION=2.2404.3
VERSION=2.2404.4
RelDate=`date +%Y%m%d`
Release=${RelDate}
RelVer=${VERSION}-${RelDate}

View File

@@ -1,7 +1,7 @@
# Makefile for rest agent project
PROJECT = OMC
VERSION = 2.2404.3
VERSION = 2.2404.4
PLATFORM = amd64
ARMPLATFORM = aarch64
BUILDDIR = ../../build

View File

@@ -1,7 +1,7 @@
# 项目信息
framework:
name: "CN EMS"
version: "2.2404.3"
version: "2.2404.4"
# 应用服务配置
server:

View File

@@ -40,12 +40,17 @@ type SysJobController struct {
//
// GET /list
func (s *SysJobController) List(c *gin.Context) {
querys := ctx.QueryMap(c)
data := s.sysJobService.SelectJobPage(querys)
rows := data["rows"].([]model.SysJob)
// 闭包函数处理多语言
language := ctx.AcceptLanguage(c)
querys := ctx.QueryMap(c)
// 多语言值转key查询
if v, ok := querys["jobName"]; ok && v != "" {
querys["jobName"] = i18n.TFindKeyPrefix(language, "job", v.(string))
}
data := s.sysJobService.SelectJobPage(querys)
rows := data["rows"].([]model.SysJob)
// 闭包函数处理多语言
converI18n := func(language string, arr *[]model.SysJob) {
for i := range *arr {
(*arr)[i].JobName = i18n.TKey(language, (*arr)[i].JobName)

View File

@@ -39,6 +39,7 @@ type SysJobLogController struct {
//
// GET /list
func (s *SysJobLogController) List(c *gin.Context) {
language := ctx.AcceptLanguage(c)
// 查询参数转换map
querys := ctx.QueryMap(c)
// 任务ID优先级更高
@@ -47,11 +48,15 @@ func (s *SysJobLogController) List(c *gin.Context) {
querys["jobName"] = jobInfo.JobName
querys["jobGroup"] = jobInfo.JobGroup
}
data := s.sysJobLogService.SelectJobLogPage(querys)
// 多语言值转key查询
if v, ok := querys["jobName"]; ok && v != "" {
querys["jobName"] = i18n.TFindKeyPrefix(language, "job", v.(string))
}
data := s.sysJobLogService.SelectJobLogPage(querys)
rows := data["rows"].([]model.SysJobLog)
// 闭包函数处理多语言
language := ctx.AcceptLanguage(c)
converI18n := func(language string, arr *[]model.SysJobLog) {
for i := range *arr {
(*arr)[i].JobName = i18n.TKey(language, (*arr)[i].JobName)

View File

@@ -35,13 +35,13 @@ func (s *SysDeptController) List(c *gin.Context) {
language := ctx.AcceptLanguage(c)
var querys struct {
// 部门ID
DeptID string `json:"deptId"`
DeptID string `form:"deptId"`
// 父部门ID
ParentID string `json:"parentId" `
ParentID string `form:"parentId" `
// 部门名称
DeptName string `json:"deptName" `
DeptName string `form:"deptName" `
// 部门状态0正常 1停用
Status string `json:"status"`
Status string `form:"status"`
}
err := c.ShouldBindQuery(&querys)
if err != nil {

View File

@@ -33,9 +33,10 @@ type SysMenuController struct {
//
// GET /list
func (s *SysMenuController) List(c *gin.Context) {
language := ctx.AcceptLanguage(c)
query := model.SysMenu{}
if v, ok := c.GetQuery("menuName"); ok && v != "" {
query.MenuName = v
query.MenuName = i18n.TFindKeyPrefix(language, "menu", v)
}
if v, ok := c.GetQuery("status"); ok && v != "" {
query.Status = v
@@ -48,7 +49,6 @@ func (s *SysMenuController) List(c *gin.Context) {
data := s.sysMenuService.SelectMenuList(query, userId)
// 闭包函数处理多语言
language := ctx.AcceptLanguage(c)
var converI18n func(language string, arr *[]model.SysMenu)
converI18n = func(language string, arr *[]model.SysMenu) {
for i := range *arr {

View File

@@ -1,7 +1,7 @@
# Makefile for OMC-OMC-crontask project
PROJECT = OMC
VERSION = 2.2404.3
VERSION = 2.2404.4
LIBDIR = be.ems/lib
BINNAME = sshsvc