// 路由注册-公司
// 秒寻科技
// zt 2024-02-01

package companyrouter

import (
	"ipsomc/core/company/companyhandler"
	"ipsomc/core/gin/midware/endecrypt"
	"ipsomc/core/gin/midware/islogin"

	"github.com/gin-gonic/gin"
)

// 配置项目路由
func SetRouter(r *gin.RouterGroup) {
	groupRouter := r.Group("/company") //路由分组
	groupHand := companyhandler.CompanyHand{}

	groupRouter.Use(endecrypt.DecryptReqParam()) //请求参数解密
	groupRouter.Use(islogin.PcIsLogin())         //判断是否登录

	//公司注册
	groupRouter.POST("/companyRegister", groupHand.CompanyRegisterHan)

	//基本接口
	groupRouter.POST("/addCompany", groupHand.AddCompanyHan)
	groupRouter.POST("/updateCompany", groupHand.UpdateCompanyHan)
	groupRouter.POST("/deleteCompany", groupHand.DeleteCompanyHan)
	groupRouter.POST("/getCompanyById", groupHand.GetCompanyByIdHan)
	groupRouter.POST("/getCompanyPageList", groupHand.GetCompanyPageListHan)
}
