2022-01-19 13:23:07 +08:00
|
|
|
|
package manage
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"SciencesServer/app/api/admin/model"
|
2022-01-19 14:22:44 +08:00
|
|
|
|
"SciencesServer/app/basic/config"
|
2022-01-19 13:23:07 +08:00
|
|
|
|
"SciencesServer/app/basic/controller"
|
|
|
|
|
model2 "SciencesServer/app/common/model"
|
2022-02-09 11:06:59 +08:00
|
|
|
|
"SciencesServer/app/service"
|
2022-01-19 13:23:07 +08:00
|
|
|
|
"SciencesServer/app/session"
|
2022-01-20 09:43:26 +08:00
|
|
|
|
config2 "SciencesServer/config"
|
2022-05-03 21:40:47 +08:00
|
|
|
|
"SciencesServer/lib"
|
2022-05-10 23:01:03 +08:00
|
|
|
|
"SciencesServer/utils"
|
2022-01-19 13:23:07 +08:00
|
|
|
|
"errors"
|
2022-05-03 23:21:04 +08:00
|
|
|
|
"fmt"
|
2022-02-09 11:06:59 +08:00
|
|
|
|
"strings"
|
2022-05-10 23:01:03 +08:00
|
|
|
|
"time"
|
2022-01-19 13:23:07 +08:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type Company struct {
|
|
|
|
|
*session.Admin
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type CompanyHandle func(session *session.Admin) *Company
|
|
|
|
|
|
|
|
|
|
type (
|
|
|
|
|
// CompanyInstance 公司企业信息
|
|
|
|
|
CompanyInstance struct {
|
|
|
|
|
ID string `json:"id"`
|
|
|
|
|
*model.ManageCompanyInfo
|
|
|
|
|
Industrys []string `json:"industrys"`
|
2022-01-19 16:03:47 +08:00
|
|
|
|
Address string `json:"address"`
|
2022-01-19 13:23:07 +08:00
|
|
|
|
Area string `json:"area"`
|
|
|
|
|
}
|
|
|
|
|
// CompanyDetail 公司企业详细信息
|
|
|
|
|
CompanyDetail struct {
|
2022-01-27 14:50:52 +08:00
|
|
|
|
ID string `json:"id"`
|
|
|
|
|
TenantID string `json:"tenant_id"`
|
|
|
|
|
InvitedCode string `json:"invited_code"`
|
2022-01-19 13:23:07 +08:00
|
|
|
|
*model2.ManageCompany
|
2022-01-20 09:43:26 +08:00
|
|
|
|
Industrys []*config.Industry `json:"industrys"`
|
|
|
|
|
Keywords []string `json:"keywords"`
|
|
|
|
|
Directions []string `json:"directions"`
|
|
|
|
|
Area string `json:"area"`
|
2022-01-19 13:23:07 +08:00
|
|
|
|
}
|
|
|
|
|
// CompanyParams 公司企业参数信息
|
|
|
|
|
CompanyParams struct {
|
|
|
|
|
}
|
2022-05-03 21:40:47 +08:00
|
|
|
|
// CompanyExcel 公司企业表格信息
|
|
|
|
|
CompanyExcel struct {
|
2022-05-10 23:22:01 +08:00
|
|
|
|
Name string `json:"name" xlsx:"企业名称"`
|
|
|
|
|
Province string `json:"province" xlsx:"所在省"`
|
|
|
|
|
City string `json:"city" xlsx:"所在市"`
|
|
|
|
|
District string `json:"district" xlsx:"所在区"`
|
|
|
|
|
Address string `json:"address" xlsx:"详细地址"`
|
|
|
|
|
Code string `json:"code" xlsx:"信用代码"`
|
|
|
|
|
RegisterAt string `json:"register_at" xlsx:"注册时间"`
|
|
|
|
|
Industry string `json:"industry" xlsx:"所属领域"`
|
|
|
|
|
Url string `json:"url" xlsx:"企业网站"`
|
|
|
|
|
Introduce string `json:"introduce" xlsx:"企业简介"`
|
|
|
|
|
Kind string `json:"kind" xlsx:"企业类型"`
|
|
|
|
|
Product string `json:"product" xlsx:"核心技术与产品及应用场景"`
|
|
|
|
|
Keyword string `json:"keyword" xlsx:"关键词"`
|
|
|
|
|
Contact string `json:"contact" xlsx:"联系人"` // 联系人
|
|
|
|
|
ContactMobile string `json:"contact_mobile" xlsx:"联系电话"` // 联系方式
|
2022-05-03 21:40:47 +08:00
|
|
|
|
}
|
2022-01-19 13:23:07 +08:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// Instance 首页信息
|
|
|
|
|
func (c *Company) Instance(tenantID uint64, name string, status int, page, pageSize int) (*controller.ReturnPages, error) {
|
|
|
|
|
mManageCompany := model.NewManageCompany()
|
|
|
|
|
|
|
|
|
|
where := make([]*model2.ModelWhere, 0)
|
|
|
|
|
|
|
|
|
|
if c.TenantID > 0 {
|
|
|
|
|
where = append(where, model2.NewWhere("c.tenant_id", c.TenantID))
|
|
|
|
|
}
|
|
|
|
|
if tenantID > 0 {
|
|
|
|
|
where = append(where, model2.NewWhere("c.tenant_id", tenantID))
|
|
|
|
|
}
|
|
|
|
|
if name != "" {
|
|
|
|
|
where = append(where, model2.NewWhereLike("c.name", name))
|
|
|
|
|
}
|
|
|
|
|
if status > 0 {
|
|
|
|
|
where = append(where, model2.NewWhere("c.examine_status", status))
|
|
|
|
|
}
|
|
|
|
|
var count int64
|
|
|
|
|
|
2022-01-27 14:50:52 +08:00
|
|
|
|
out, err := mManageCompany.Companys(page, pageSize, &count, where...)
|
2022-01-19 13:23:07 +08:00
|
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
list := make([]*CompanyInstance, 0)
|
|
|
|
|
|
|
|
|
|
for _, v := range out {
|
|
|
|
|
mManageCompany.Industry = v.Industry
|
|
|
|
|
|
2022-01-19 16:03:47 +08:00
|
|
|
|
_industrys := make([]string, 0)
|
|
|
|
|
|
|
|
|
|
for _, v := range mManageCompany.GetIndustryAttribute() {
|
2022-01-20 09:43:26 +08:00
|
|
|
|
_industrys = append(_industrys, config.GetIndustryInfo(v, "-", "/").Value)
|
2022-01-19 16:03:47 +08:00
|
|
|
|
}
|
2022-01-19 13:23:07 +08:00
|
|
|
|
list = append(list, &CompanyInstance{
|
2022-01-19 16:03:47 +08:00
|
|
|
|
ID: v.GetEncodeID(), ManageCompanyInfo: v, Industrys: _industrys,
|
|
|
|
|
Address: v.FormatBasic(), Area: (&model2.Area{
|
|
|
|
|
Province: v.TenantProvince,
|
|
|
|
|
City: v.TenantCity,
|
|
|
|
|
}).FormatBasic(),
|
2022-01-19 13:23:07 +08:00
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
return &controller.ReturnPages{Data: list, Count: count}, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Form 数据操作
|
2022-01-19 14:22:44 +08:00
|
|
|
|
func (c *Company) Form(params *BasicParams, other *config.IdentityForCompany) error {
|
|
|
|
|
mManageCompany := model.NewManageCompany()
|
|
|
|
|
// 查询相应的企业入驻信息
|
|
|
|
|
if params.ID > 0 {
|
|
|
|
|
mManageCompany.ID = params.ID
|
|
|
|
|
|
2022-02-15 17:19:23 +08:00
|
|
|
|
isExist, err := model2.FirstField(mManageCompany.ManageCompany, []string{"id", "name", "code", "tenant_id", "examine_status", "created_at"})
|
2022-01-19 14:22:44 +08:00
|
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
} else if !isExist {
|
|
|
|
|
return errors.New("操作错误,公司企业信息不存在或已被删除")
|
|
|
|
|
}
|
|
|
|
|
if c.TenantID > 0 {
|
|
|
|
|
if mManageCompany.TenantID != c.TenantID {
|
|
|
|
|
return errors.New("操作错误,无权限操作")
|
|
|
|
|
}
|
|
|
|
|
} else {
|
2022-01-28 16:59:15 +08:00
|
|
|
|
if params.Code != mManageCompany.Code {
|
|
|
|
|
if isExist, err = params.isExist(mManageCompany.ManageCompany, model2.NewWhere("code", params.Code)); err != nil {
|
2022-01-19 14:22:44 +08:00
|
|
|
|
return err
|
|
|
|
|
} else if isExist {
|
|
|
|
|
return errors.New("操作错误,当前站点下已存在同一公司组织机构代码")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
mManageCompany.TenantID = c.TenantID
|
2022-01-27 14:50:52 +08:00
|
|
|
|
mManageCompany.Kind = model2.ManageCompanyKind(other.Kind)
|
2022-01-19 14:22:44 +08:00
|
|
|
|
mManageCompany.Image = model2.Image{Image: params.Image}
|
|
|
|
|
mManageCompany.Area = model2.Area{
|
|
|
|
|
Province: params.Area.Province, City: params.Area.City, District: params.Area.District, Address: params.Area.Address,
|
|
|
|
|
}
|
|
|
|
|
mManageCompany.Product = other.Product
|
|
|
|
|
mManageCompany.Url = other.Url
|
|
|
|
|
mManageCompany.SetIndustryAttribute(params.Industrys)
|
|
|
|
|
mManageCompany.SetKeywordAttribute(params.Keywords)
|
|
|
|
|
mManageCompany.SetDirectionAttribute(other.Directions)
|
|
|
|
|
mManageCompany.Introduce = params.Introduce
|
|
|
|
|
|
|
|
|
|
if c.TenantID <= 0 {
|
|
|
|
|
mManageCompany.TenantID = params.TenantID
|
|
|
|
|
}
|
2022-02-09 11:06:59 +08:00
|
|
|
|
_industrys := make([]string, 0)
|
|
|
|
|
|
|
|
|
|
for _, v := range params.Industrys {
|
|
|
|
|
_industrys = append(_industrys, config.GetIndustryInfo(v, "-", "-").Value)
|
|
|
|
|
}
|
|
|
|
|
manage := service.NewESManage(
|
|
|
|
|
service.WithManageIdentity(config.TenantUserIdentityForCompany),
|
|
|
|
|
service.WithManageIndustry(strings.Join(_industrys, ";")),
|
|
|
|
|
service.WithManageKeyword(strings.Join(params.Keywords, ";")),
|
|
|
|
|
)
|
2022-01-19 14:22:44 +08:00
|
|
|
|
if mManageCompany.ID > 0 {
|
2022-02-09 11:06:59 +08:00
|
|
|
|
if err := model2.Updates(mManageCompany.ManageCompany, mManageCompany.ManageCompany); err != nil {
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
if mManageCompany.ExamineStatus == model2.ExamineStatusForAgree {
|
|
|
|
|
_ = manage.Update()
|
|
|
|
|
}
|
2022-02-23 15:18:55 +08:00
|
|
|
|
return nil
|
2022-01-19 14:22:44 +08:00
|
|
|
|
}
|
|
|
|
|
// 查询手机号码是否在当前租户下是否已经注册了
|
|
|
|
|
mManageCompany.Name = params.Name
|
|
|
|
|
mManageCompany.Code = params.Code
|
2022-01-19 22:13:28 +08:00
|
|
|
|
mManageCompany.License = other.FilterLicense()
|
2022-01-20 11:09:29 +08:00
|
|
|
|
mManageCompany.ExamineStatus = model2.ExamineStatusForAgree
|
|
|
|
|
mManageCompany.ExamineRemark = "主动创建,无需审核"
|
2022-01-19 14:22:44 +08:00
|
|
|
|
|
2022-01-28 16:59:15 +08:00
|
|
|
|
if isExist, err := params.isExist(mManageCompany.ManageCompany,
|
2022-01-19 14:22:44 +08:00
|
|
|
|
model2.NewWhere("code", params.Code)); err != nil {
|
|
|
|
|
return err
|
|
|
|
|
} else if isExist {
|
2022-01-28 16:59:15 +08:00
|
|
|
|
return errors.New("操作错误,已存在同一公司组织机构代码")
|
2022-01-19 14:22:44 +08:00
|
|
|
|
}
|
2022-02-09 11:06:59 +08:00
|
|
|
|
if err := model2.Create(mManageCompany.ManageCompany); err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
service.WithManageID(mManageCompany.ID)(manage)
|
|
|
|
|
service.WithManageTitle(params.Name)(manage)
|
|
|
|
|
|
|
|
|
|
return manage.Create()
|
2022-01-19 13:23:07 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Detail 详细信息
|
|
|
|
|
func (c *Company) Detail(id uint64) (*CompanyDetail, error) {
|
|
|
|
|
mManageCompany := model.NewManageCompany()
|
|
|
|
|
|
|
|
|
|
out, err := mManageCompany.Company(id)
|
|
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
} else if out.ManageCompany == nil {
|
|
|
|
|
return nil, errors.New("操作错误,公司企业信息不存在或已被删除")
|
|
|
|
|
}
|
2022-01-20 09:43:26 +08:00
|
|
|
|
_industrys := make([]*config.Industry, 0)
|
|
|
|
|
|
|
|
|
|
for _, v := range out.GetIndustryAttribute() {
|
|
|
|
|
_industrys = append(_industrys, config.GetIndustryInfo(v, "-", ">"))
|
|
|
|
|
}
|
|
|
|
|
out.Image.Image = out.Image.Analysis(config2.SystemConfig[config2.SysImageDomain])
|
|
|
|
|
out.License = (&model2.Image{Image: out.License}).Analysis(config2.SystemConfig[config2.SysImageDomain])
|
|
|
|
|
|
2022-01-19 13:23:07 +08:00
|
|
|
|
return &CompanyDetail{
|
|
|
|
|
ID: out.GetEncodeID(),
|
2022-01-20 09:43:26 +08:00
|
|
|
|
TenantID: out.GetEncodeTenantID(),
|
2022-01-27 14:50:52 +08:00
|
|
|
|
InvitedCode: (&model2.Model{ID: out.InviterID}).GetEncodeID(),
|
2022-01-19 13:23:07 +08:00
|
|
|
|
ManageCompany: out.ManageCompany,
|
2022-01-20 09:43:26 +08:00
|
|
|
|
Industrys: _industrys,
|
2022-01-19 13:23:07 +08:00
|
|
|
|
Keywords: out.GetKeywordAttribute(),
|
2022-01-27 14:50:52 +08:00
|
|
|
|
Directions: out.GetDirectionAttribute(),
|
|
|
|
|
//Area: out.FormatBasic(),
|
2022-01-19 13:23:07 +08:00
|
|
|
|
}, nil
|
|
|
|
|
}
|
|
|
|
|
|
2022-05-03 21:40:47 +08:00
|
|
|
|
// Import 导入数据
|
|
|
|
|
func (c *Company) Import(file string) error {
|
|
|
|
|
excel := lib.NewExcel()
|
2022-05-10 23:01:03 +08:00
|
|
|
|
|
2022-05-03 23:21:04 +08:00
|
|
|
|
err := excel.Import(strings.Replace(file, "/", "", 1), 1, 0)
|
2022-05-03 21:40:47 +08:00
|
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
data := excel.Analysis(&CompanyExcel{})
|
|
|
|
|
|
2022-05-10 23:01:03 +08:00
|
|
|
|
rows := make([]*model2.ManageCompany, 0, len(data))
|
|
|
|
|
|
|
|
|
|
now := time.Now()
|
2022-05-03 21:40:47 +08:00
|
|
|
|
|
|
|
|
|
for _, v := range data {
|
|
|
|
|
_data := v.(*CompanyExcel)
|
2022-05-10 23:01:03 +08:00
|
|
|
|
|
|
|
|
|
row := new(model2.ManageCompany)
|
|
|
|
|
|
|
|
|
|
var count int64
|
|
|
|
|
// 查询公司是否存在
|
|
|
|
|
if err = model2.Count(row, &count, model2.NewWhere("code", _data.Code)); err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
if count > 0 {
|
|
|
|
|
continue
|
|
|
|
|
}
|
|
|
|
|
industrys := make([]string, 0)
|
|
|
|
|
|
|
|
|
|
if industrys, err = _data.industry(); err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
2022-05-03 23:21:04 +08:00
|
|
|
|
// 所属领域
|
2022-05-10 23:22:01 +08:00
|
|
|
|
row.ModelTenant = model2.ModelTenant{TenantID: _data.tenant()}
|
2022-05-10 23:01:03 +08:00
|
|
|
|
row.Kind = _data.kind()
|
|
|
|
|
row.Name = _data.Name
|
|
|
|
|
row.Code = _data.Code
|
|
|
|
|
row.Area = _data.area()
|
2022-05-10 23:22:01 +08:00
|
|
|
|
row.Product = _data.Product
|
2022-05-10 23:01:03 +08:00
|
|
|
|
row.Url = _data.Url
|
|
|
|
|
row.License = ""
|
|
|
|
|
row.SetIndustryAttribute(industrys)
|
|
|
|
|
row.SetKeywordAttribute(_data.keyword())
|
|
|
|
|
row.Direction = ""
|
|
|
|
|
row.Introduce = _data.Introduce
|
|
|
|
|
row.Examine = model2.Examine{
|
|
|
|
|
ExamineStatus: model2.ExamineStatusForAgree,
|
|
|
|
|
ExamineRemark: "主动上传,无需审核",
|
|
|
|
|
ExamineAt: now,
|
|
|
|
|
}
|
|
|
|
|
row.CreatedAt = now
|
|
|
|
|
row.UpdatedAt = now
|
|
|
|
|
|
|
|
|
|
rows = append(rows, row)
|
|
|
|
|
}
|
|
|
|
|
if len(rows) > 0 {
|
|
|
|
|
mManageCompany := model2.NewManageCompany()
|
|
|
|
|
|
|
|
|
|
if err = model2.Creates(mManageCompany, rows); err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
manage := service.NewESManage()
|
|
|
|
|
|
|
|
|
|
for _, row := range rows {
|
|
|
|
|
_industrys := make([]string, 0)
|
|
|
|
|
|
|
|
|
|
for _, v := range row.GetIndustryAttribute() {
|
|
|
|
|
_industrys = append(_industrys, config.GetIndustryInfo(v, "-", "-").Value)
|
|
|
|
|
}
|
|
|
|
|
service.WithManageID(row.ID)(manage)
|
|
|
|
|
service.WithManageTitle(row.Name)(manage)
|
|
|
|
|
service.WithManageIdentity(config.TenantUserIdentityForCompany)(manage)
|
|
|
|
|
service.WithManageIndustry(strings.Join(_industrys, ";"))(manage)
|
|
|
|
|
service.WithManageKeyword(strings.Join(row.GetKeywordAttribute(), ";"))(manage)
|
|
|
|
|
}
|
|
|
|
|
if err = manage.Create(); err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
2022-05-03 21:40:47 +08:00
|
|
|
|
}
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
|
2022-05-10 23:01:03 +08:00
|
|
|
|
func (c *CompanyExcel) tenant() uint64 {
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *CompanyExcel) kind() model2.ManageCompanyKind {
|
|
|
|
|
switch c.Kind {
|
|
|
|
|
case "上市企业":
|
|
|
|
|
return model2.ManageCompanyKindForListedEnterprise
|
|
|
|
|
case "优质企业":
|
|
|
|
|
return model2.ManageCompanyKindForHighQuality
|
|
|
|
|
case "普通企业":
|
|
|
|
|
return model2.ManageCompanyKindForOrdinary
|
|
|
|
|
}
|
|
|
|
|
return 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *CompanyExcel) area() model2.Area {
|
|
|
|
|
area := model2.Area{
|
|
|
|
|
Address: c.Address,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
filter := func(key, value string) string {
|
|
|
|
|
areaInfo, has := config.MemoryForAreaInfo[key]
|
|
|
|
|
|
|
|
|
|
if !has {
|
|
|
|
|
return ""
|
|
|
|
|
}
|
|
|
|
|
if value == "" {
|
|
|
|
|
return ""
|
|
|
|
|
}
|
|
|
|
|
for k, v := range areaInfo {
|
|
|
|
|
if v == value {
|
|
|
|
|
return k
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return ""
|
|
|
|
|
}
|
|
|
|
|
// 省
|
|
|
|
|
area.Province = filter(config2.DefaultChinaAreaCode, c.Province)
|
|
|
|
|
|
|
|
|
|
if area.Province != "" {
|
|
|
|
|
area.City = filter(area.Province, c.City)
|
|
|
|
|
|
|
|
|
|
if area.City != "" {
|
|
|
|
|
area.District = filter(area.District, c.City)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return area
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *CompanyExcel) industry() ([]string, error) {
|
|
|
|
|
// 存在多个
|
|
|
|
|
industrys := strings.Split(c.Industry, "\n")
|
|
|
|
|
|
|
|
|
|
out := make([]string, 0)
|
|
|
|
|
|
|
|
|
|
for _, v := range industrys {
|
|
|
|
|
_industrys := strings.Split(v, "/")
|
|
|
|
|
|
|
|
|
|
_out := make([]string, 0, len(_industrys))
|
|
|
|
|
|
|
|
|
|
for key, industry := range _industrys {
|
|
|
|
|
mSysIndustry := model.NewSysIndustry()
|
|
|
|
|
|
|
|
|
|
isExist, err := model2.FirstField(mSysIndustry.SysIndustry, []string{"id"}, model2.NewWhere("name", industry))
|
|
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
if !isExist {
|
|
|
|
|
if key > 0 {
|
|
|
|
|
mSysIndustry.ParentID = utils.StringToUnit64(_out[key-1])
|
|
|
|
|
}
|
|
|
|
|
mSysIndustry.Name = industry
|
|
|
|
|
|
|
|
|
|
if err = model2.Create(mSysIndustry.SysIndustry); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
_out = append(_out, fmt.Sprintf("%d", mSysIndustry.ID))
|
|
|
|
|
}
|
|
|
|
|
out = append(out, strings.Join(_out, "-"))
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *CompanyExcel) keyword() []string {
|
|
|
|
|
return strings.Split(c.Keyword, "\n")
|
|
|
|
|
}
|
|
|
|
|
|
2022-01-19 13:23:07 +08:00
|
|
|
|
func NewCompany() CompanyHandle {
|
|
|
|
|
return func(session *session.Admin) *Company {
|
|
|
|
|
return &Company{session}
|
|
|
|
|
}
|
|
|
|
|
}
|