You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
680 B

package copartner
import (
"github.com/gin-gonic/gin"
"recook/internal/back"
"recook/internal/v2/logic/wxapp/copartner"
"recook/tools"
)
type Company struct {
}
type argsCompanyAdd struct {
InviteNo string // 邀请码
copartner.CompanyInfo
}
// Add @Title 添加合伙人
func (*Company) Add(c *gin.Context) {
var args argsCompanyAdd
if err := tools.Params(&args, c); err != nil {
back.Fail(c, err.Error())
return
}
if err := copartner.CopartnerLogic.Very(args.InviteNo); err != nil {
back.Fail(c, err.Error())
return
}
if err := copartner.CompanyLogic.Add(args.CompanyInfo); err != nil {
back.Fail(c, err.Error())
} else {
back.Suc(c, "ok", "")
}
}