staff_assess_router.go 1.8 KB
package routers

import (
	"github.com/beego/beego/v2/server/web"
	"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/port/beego/controllers"
)

func init() {
	assessTaskNS := web.NewNamespace("/v1/staff-assess-task",
		// web.NSBefore(filters.AllowCors(), middlewares.CheckToken()),
		web.NSCtrlPost("/search/me", (*controllers.StaffAssessController).SearchAssessTaskMe), //获取我参与过的评估项目列表
		web.NSCtrlPost("/desc/me", (*controllers.StaffAssessController).AssessTaskMeDesc),     //获取我的项目评估进度描述
		web.NSCtrlPost("/", (*controllers.StaffAssessController).CreateStaffAssessTask),       //创建员工的评估任务
	)
	// /v1/staff-assess/self/me/list
	assessNS := web.NewNamespace("/v1/staff-assess",
		// web.NSBefore(filters.AllowCors(), middlewares.CheckToken()),
		web.NSCtrlPost("/self/me/list", (*controllers.StaffAssessController).AssessSelfMeList),                //获取我的自评反馈列表
		web.NSCtrlPost("/self/me/info", (*controllers.StaffAssessController).GetAssessSelfMeInfo),             //获取我的自评反馈详情
		web.NSCtrlPost("/me/invite-user", (*controllers.StaffAssessController).GetAssessInviteUser),           //获取邀请的员工
		web.NSCtrlPost("/me/save-invite-user", (*controllers.StaffAssessController).SaveAssessInviteUser),     //保存我邀请的员工
		web.NSCtrlPost("/me/invite-user/select", (*controllers.StaffAssessController).SelectAssessInviteUser), //选择我邀请的员工
		web.NSCtrlPost("/self/info", (*controllers.StaffAssessController).GetAssessSelfInfo),                  //获取我的自评反馈详情
		web.NSCtrlPost("/info", (*controllers.StaffAssessController).GetAssessInfo),                           //获取我的自评反馈详情
	)
	web.AddNamespace(assessTaskNS)
	web.AddNamespace(assessNS)
}