feat:完善项目信息
This commit is contained in:
@ -34,7 +34,7 @@ func (a *Account) Login(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := account.NewLogin()(api.GetLocal()(c).(string)).Launch(account.LoginMode(form.Mode), &account.LoginParams{
|
||||
data, err := account.NewLogin()(api.GetTenantID()(c).(string)).Launch(account.LoginMode(form.Mode), &account.LoginParams{
|
||||
Captcha: struct {
|
||||
Mobile string
|
||||
Captcha string
|
||||
@ -54,7 +54,7 @@ func (a *Account) Register(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := account.NewRegister()(api.GetLocal()(c).(string)).Launch(&account.RegisterParams{
|
||||
data, err := account.NewRegister()(api.GetTenantID()(c).(string)).Launch(&account.RegisterParams{
|
||||
Name: form.Name, Mobile: form.Mobile, Captcha: form.Captcha,
|
||||
Password: form.Password, RepeatPass: form.RepeatPass,
|
||||
})
|
||||
|
@ -18,7 +18,7 @@ func (*Activity) Applys(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := activity.NewApply()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
data, err := activity.NewApply()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
List(form.Title, form.Page, form.PageSize)
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
@ -39,7 +39,7 @@ func (*Activity) ApplyLaunch(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := activity.NewApply()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := activity.NewApply()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Launch(&activity.ApplyLaunchParams{
|
||||
Mode: form.Mode, MaxNUmber: form.MaxNumber, Title: form.Title, Amount: form.Amount, Content: form.Content,
|
||||
BeginAt: form.BeginAt, FinishAt: form.FinishAt, JoinDeadline: form.JoinDeadline,
|
||||
@ -54,7 +54,7 @@ func (*Activity) ApplyRevoke(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := activity.NewApply()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := activity.NewApply()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Revoke(form.Convert())
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
@ -66,7 +66,7 @@ func (*Activity) ApplyDelete(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := activity.NewApply()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := activity.NewApply()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Delete(form.Convert())
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
@ -81,7 +81,7 @@ func (*Activity) Joins(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := activity.NewInstance()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
data, err := activity.NewInstance()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Joins(form.Title, form.Status, form.Page, form.PageSize)
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
@ -93,7 +93,7 @@ func (*Activity) JoinDelete(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := activity.NewInstance()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := activity.NewInstance()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
JoinDelete(form.Convert())
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
|
@ -10,6 +10,6 @@ import (
|
||||
type Home struct{}
|
||||
|
||||
func (*Home) Instance(c *gin.Context) {
|
||||
data, err := home.NewInstance()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).Instance()
|
||||
data, err := home.NewInstance()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).Instance()
|
||||
api.APIResponse(err, data)
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ func (*Manage) Enterprise(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := manage.NewEnterprise()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
data, err := manage.NewEnterprise()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
List(form.Mode, form.Title, form.Page, form.PageSize)
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
@ -74,7 +74,7 @@ func (*Manage) EnterpriseAdd(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := manage.NewEnterprise()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := manage.NewEnterprise()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Form(&manage.EnterpriseParams{Mode: form.Mode, Title: form.Title, Name: form.Name, Mobile: form.Mobile,
|
||||
Papers: form.paperInfo(), Patents: form.PatentInfo(), Content: form.Content,
|
||||
})
|
||||
@ -90,7 +90,7 @@ func (*Manage) EnterpriseEdit(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := manage.NewEnterprise()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := manage.NewEnterprise()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Form(&manage.EnterpriseParams{ID: form.Convert(), Mode: form.Mode, Title: form.Title, Name: form.Name,
|
||||
Mobile: form.Mobile, Papers: form.paperInfo(), Patents: form.PatentInfo(), Content: form.Content,
|
||||
})
|
||||
@ -104,7 +104,7 @@ func (*Manage) EnterpriseDelete(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := manage.NewEnterprise()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := manage.NewEnterprise()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Delete(form.Convert())
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
@ -120,7 +120,7 @@ func (*Manage) Equipment(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := manage.NewEquipment()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
data, err := manage.NewEquipment()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
List(form.Kind, form.Code, form.Title, form.Page, form.PageSize)
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
@ -132,7 +132,7 @@ func (*Manage) EquipmentAdd(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := manage.NewEquipment()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := manage.NewEquipment()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Form(&manage.EquipmentParams{Kind: form.Kind, Code: form.Code, Title: form.Title, Params: form.Params, Description: form.Description})
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
@ -146,7 +146,7 @@ func (*Manage) EquipmentEdit(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := manage.NewEquipment()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := manage.NewEquipment()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Form(&manage.EquipmentParams{ID: form.Convert(), Kind: form.Kind, Code: form.Code, Title: form.Title,
|
||||
Params: form.Params, Description: form.Description})
|
||||
|
||||
@ -160,7 +160,7 @@ func (*Manage) EquipmentDelete(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := manage.NewEquipment()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := manage.NewEquipment()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Delete(form.Convert())
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
@ -172,7 +172,7 @@ func (*Manage) CompanyDetail(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := manage.NewCompany()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
data, err := manage.NewCompany()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Detail(form.Convert())
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
@ -186,7 +186,7 @@ func (*Manage) CompanyProduct(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := manage.NewCompany()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
data, err := manage.NewCompany()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Product(form.Convert(), form.Page, form.PageSize)
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
@ -203,7 +203,7 @@ func (*Manage) Expert(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := manage.NewExpert()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
data, err := manage.NewExpert()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Instance(form.Name, form.Mobile, form.Page, form.PageSize)
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
@ -217,7 +217,7 @@ func (*Manage) ExpertAchievement(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := manage.NewExpert()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
data, err := manage.NewExpert()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Achievement(form.Convert(), form.Page, form.PageSize)
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
@ -231,7 +231,7 @@ func (*Manage) ExpertProject(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := manage.NewExpert()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
data, err := manage.NewExpert()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Project(form.Convert(), form.Page, form.PageSize)
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
@ -245,7 +245,7 @@ func (*Manage) ExpertPatent(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := manage.NewExpert()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
data, err := manage.NewExpert()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Patent(form.Convert(), form.Page, form.PageSize)
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
@ -259,7 +259,7 @@ func (*Manage) ExpertPaper(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := manage.NewExpert()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
data, err := manage.NewExpert()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Paper(form.Convert(), form.Page, form.PageSize)
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
@ -273,7 +273,7 @@ func (*Manage) ExpertCooperate(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := manage.NewExpert()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
data, err := manage.NewExpert()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Cooperate(form.Convert(), form.Page, form.PageSize)
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
@ -287,7 +287,7 @@ func (*Manage) ResearchLaboratory(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := manage.NewResearch()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
data, err := manage.NewResearch()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Laboratory(form.Name, form.Page, form.PageSize)
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
@ -301,7 +301,7 @@ func (*Manage) ResearchVisit(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := manage.NewResearch()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
data, err := manage.NewResearch()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Visit(form.Page, form.PageSize)
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
@ -315,7 +315,7 @@ func (*Manage) LaboratoryAchievement(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := manage.NewLaboratory()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
data, err := manage.NewLaboratory()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Achievement(form.Convert(), form.Page, form.PageSize)
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
@ -329,7 +329,7 @@ func (*Manage) LaboratoryProject(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := manage.NewLaboratory()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
data, err := manage.NewLaboratory()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Project(form.Convert(), form.Page, form.PageSize)
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
@ -343,7 +343,7 @@ func (*Manage) LaboratoryPatent(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := manage.NewLaboratory()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
data, err := manage.NewLaboratory()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Patent(form.Convert(), form.Page, form.PageSize)
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
@ -357,7 +357,7 @@ func (*Manage) LaboratoryPaper(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := manage.NewLaboratory()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
data, err := manage.NewLaboratory()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Paper(form.Convert(), form.Page, form.PageSize)
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
@ -371,7 +371,7 @@ func (*Manage) LaboratoryCooperate(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := manage.NewLaboratory()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
data, err := manage.NewLaboratory()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Cooperate(form.Convert(), form.Page, form.PageSize)
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
@ -383,7 +383,7 @@ func (*Manage) LaboratoryCooperateDetail(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := manage.NewLaboratory()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
data, err := manage.NewLaboratory()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
CooperateDetail(form.Convert())
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
@ -397,7 +397,7 @@ func (*Manage) AgentCompany(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := manage.NewAgent()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
data, err := manage.NewAgent()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Company(form.Name, form.Page, form.PageSize)
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
@ -411,7 +411,7 @@ func (*Manage) AgentCompanyAdd(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := manage.NewAgent()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := manage.NewAgent()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Form(0, form.Name, form.Industrys)
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
@ -426,7 +426,7 @@ func (*Manage) AgentCompanyEdit(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := manage.NewAgent()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := manage.NewAgent()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Form(form.Convert(), form.Name, form.Industrys)
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ func (*Service) Demand(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := service.NewDemand()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
data, err := service.NewDemand()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
List(form.Title, form.Status, form.Page, form.PageSize)
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
@ -43,7 +43,7 @@ func (*Service) DemandDetail(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := service.NewDemand()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
data, err := service.NewDemand()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Detail(form.Convert())
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
@ -55,7 +55,7 @@ func (*Service) DemandAdd(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := service.NewDemand()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := service.NewDemand()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Form(&service.DemandParams{Kinds: form.Kinds, IsSubmit: form.IsSubmit, Title: form.Title,
|
||||
Name: form.Name, Mobile: form.Mobile, Description: form.Description,
|
||||
})
|
||||
@ -71,7 +71,7 @@ func (*Service) DemandEdit(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := service.NewDemand()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := service.NewDemand()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Form(&service.DemandParams{ID: form.Convert(), Kinds: form.Kinds, IsSubmit: form.IsSubmit, Title: form.Title,
|
||||
Name: form.Name, Mobile: form.Mobile, Description: form.Description,
|
||||
})
|
||||
@ -85,7 +85,7 @@ func (*Service) DemandDelete(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := service.NewDemand()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := service.NewDemand()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Delete(form.Convert())
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ func (c *settledForm) bind() *settled.BasicParams {
|
||||
|
||||
// Index 入驻信息
|
||||
func (*Settled) Index(c *gin.Context) {
|
||||
data, err := settled.NewInstance()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).Index()
|
||||
data, err := settled.NewInstance()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).Index()
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
|
||||
@ -49,7 +49,7 @@ func (*Settled) Company(c *gin.Context) {
|
||||
}
|
||||
form.License = (&api.ImageForm{Image: form.License}).FilterImageURL()
|
||||
|
||||
err := settled.NewCompany()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := settled.NewCompany()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Launch(form.settledForm.bind(), (&api.IDStringForm{ID: form.InviterCode}).Convert(), &form.IdentityForCompany)
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
@ -63,7 +63,7 @@ func (*Settled) CompanyGet(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := settled.NewCompany()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).Get(form.Code)
|
||||
data, err := settled.NewCompany()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).Get(form.Code)
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
|
||||
@ -77,7 +77,7 @@ func (*Settled) Expert(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := settled.NewExpert()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := settled.NewExpert()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Launch(form.settledForm.bind(), &form.IdentityForExpert)
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
@ -92,7 +92,7 @@ func (*Settled) Research(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := settled.NewResearch()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := settled.NewResearch()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Launch(form.settledForm.bind(), &form.IdentityForResearch)
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
@ -107,7 +107,7 @@ func (*Settled) Laboratory(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := settled.NewLaboratory()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := settled.NewLaboratory()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Launch(form.settledForm.bind(), &form.IdentityForLaboratory)
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
@ -133,7 +133,7 @@ func (*Settled) Agent(c *gin.Context) {
|
||||
form.IDImage.Behind = (&api.ImageForm{Image: form.IDImage.Behind}).FilterImageURL()
|
||||
form.IDImage.Hold = (&api.ImageForm{Image: form.IDImage.Hold}).FilterImageURL()
|
||||
|
||||
err := settled.NewAgent()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := settled.NewAgent()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Launch(form.settledForm.bind(), &form.IdentityForAgent)
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
|
@ -156,7 +156,7 @@ func (a *Technology) Instance(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := technology2.NewInstance()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
data, err := technology2.NewInstance()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
List(form.Status, form.Page, form.PageSize)
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
@ -168,7 +168,7 @@ func (a *Technology) InstanceAdd(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := technology2.NewInstance()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := technology2.NewInstance()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Form(&technology2.InstanceParams{
|
||||
PatentID: form.PatentID, Territory: form.Territory, Title: form.Title, Company: form.Company,
|
||||
Images: form.FilterImageURL(), ProveImages: form.FilterProveImages(), Introduce: form.Introduce, Purpose: form.Purpose,
|
||||
@ -187,7 +187,7 @@ func (a *Technology) InstanceEdit(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := technology2.NewInstance()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := technology2.NewInstance()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Form(&technology2.InstanceParams{
|
||||
ID: form.Convert(),
|
||||
PatentID: form.PatentID, Territory: form.Territory, Title: form.Title, Company: form.Company,
|
||||
@ -207,7 +207,7 @@ func (a *Technology) InstanceShelf(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := technology2.NewInstance()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := technology2.NewInstance()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Shelf(form.Convert(), form.Status)
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
@ -219,7 +219,7 @@ func (a *Technology) InstanceDelete(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := technology2.NewInstance()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := technology2.NewInstance()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Delete(form.Convert())
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
@ -233,7 +233,7 @@ func (a *Technology) Paper(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := technology2.NewPaper()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
data, err := technology2.NewPaper()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
List(form.Title, form.Page, form.PageSize)
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
@ -245,7 +245,7 @@ func (a *Technology) PaperAdd(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := technology2.NewPaper()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := technology2.NewPaper()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Form(&technology2.PaperParams{
|
||||
Title: form.Title, Ext: form.Ext, Author: form.Author, PublishAt: form.PublishAt,
|
||||
Keywords: form.Keywords, Tags: form.Tags, Remark: form.Remark,
|
||||
@ -262,7 +262,7 @@ func (a *Technology) PaperEdit(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := technology2.NewPaper()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := technology2.NewPaper()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Form(&technology2.PaperParams{
|
||||
ID: form.Convert(), Title: form.Title, Ext: form.Ext, Author: form.Author, PublishAt: form.PublishAt,
|
||||
Keywords: form.Keywords, Tags: form.Tags, Remark: form.Remark,
|
||||
@ -277,7 +277,7 @@ func (a *Technology) PaperDelete(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := technology2.NewPaper()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := technology2.NewPaper()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Delete(form.Convert())
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
@ -295,7 +295,7 @@ func (a *Technology) Patent(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := technology2.NewPatent()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
data, err := technology2.NewPatent()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
List(form.Kind, form.Title, form.ApplyCode, form.OpenCode, form.IPCCode, form.Page, form.PageSize)
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
@ -307,7 +307,7 @@ func (a *Technology) PatentDetail(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := technology2.NewPatent()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
data, err := technology2.NewPatent()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Detail(form.Convert())
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
@ -319,7 +319,7 @@ func (a *Technology) PatentAdd(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := technology2.NewPatent()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := technology2.NewPatent()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Form(&technology2.PatentParams{Kind: form.Kind, Title: form.Title, FileUrl: (&api.FileForm{File: form.FileUrl}).FilterURL(),
|
||||
ApplyCode: form.ApplyCode, ApplyName: form.ApplyName, ApplyAddress: form.ApplyAddress, ApplyAt: form.ApplyAt,
|
||||
OpenCode: form.OpenCode, OpenAt: form.OpenAt, Inventor: form.Inventor, IPCCode: form.IPCCode,
|
||||
@ -337,7 +337,7 @@ func (a *Technology) PatentEdit(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := technology2.NewPatent()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := technology2.NewPatent()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Form(&technology2.PatentParams{ID: form.Convert(), Kind: form.Kind, Title: form.Title,
|
||||
FileUrl: (&api.FileForm{File: form.FileUrl}).FilterURL(), ApplyCode: form.ApplyCode,
|
||||
ApplyName: form.ApplyName, ApplyAddress: form.ApplyAddress, ApplyAt: form.ApplyAt, OpenCode: form.OpenCode,
|
||||
@ -354,7 +354,7 @@ func (a *Technology) PatentDelete(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := technology2.NewPatent()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := technology2.NewPatent()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Delete(form.Convert())
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
@ -368,7 +368,7 @@ func (a *Technology) Demand(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := technology2.NewDemand()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
data, err := technology2.NewDemand()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
List(form.Status, form.Page, form.PageSize)
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
@ -380,7 +380,7 @@ func (a *Technology) DemandDetail(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := technology2.NewDemand()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
data, err := technology2.NewDemand()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Detail(form.Convert())
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
@ -392,7 +392,7 @@ func (a *Technology) DemandAdd(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := technology2.NewDemand()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := technology2.NewDemand()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Form(&technology2.DemandParams{
|
||||
Title: form.Title, Introduce: form.Introduce, Name: form.Name, Mobile: form.Mobile, Deadline: form.Deadline,
|
||||
Industry: form.Industry, Kinds: form.Kinds, Budget: form.Budget, BudgetMode: form.BudgetMode,
|
||||
@ -414,7 +414,7 @@ func (a *Technology) DemandEdit(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := technology2.NewDemand()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := technology2.NewDemand()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Form(&technology2.DemandParams{
|
||||
ID: form.Convert(), Title: form.Title, Introduce: form.Introduce, Name: form.Name, Mobile: form.Mobile, Deadline: form.Deadline,
|
||||
Industry: form.Industry, Kinds: form.Kinds, Budget: form.Budget, BudgetMode: form.BudgetMode,
|
||||
@ -434,7 +434,7 @@ func (a *Technology) DemandDelete(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := technology2.NewDemand()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := technology2.NewDemand()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Delete(form.Convert())
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
@ -448,7 +448,7 @@ func (a *Technology) Topic(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := technology2.NewTopic()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
data, err := technology2.NewTopic()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
List(form.Status, form.Page, form.PageSize)
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
@ -460,7 +460,7 @@ func (a *Technology) TopicDetail(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := technology2.NewTopic()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
data, err := technology2.NewTopic()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Detail(form.Convert())
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
@ -472,7 +472,7 @@ func (a *Technology) TopicAdd(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := technology2.NewTopic()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := technology2.NewTopic()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Form(&technology2.TopicParams{Title: form.Title, Emcee: form.Emcee, Mechanism: form.Mechanism, Code: form.Code,
|
||||
BeginAt: form.BeginAt, FinishAt: form.FinishAt, Amount: form.Amount, Source: form.Source, Kind: form.Kind,
|
||||
Keywords: form.Keywords})
|
||||
@ -488,7 +488,7 @@ func (a *Technology) TopicEdit(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := technology2.NewTopic()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := technology2.NewTopic()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Form(&technology2.TopicParams{ID: form.Convert(), Title: form.Title, Emcee: form.Emcee, Mechanism: form.Mechanism,
|
||||
Code: form.Code, BeginAt: form.BeginAt, FinishAt: form.FinishAt, Amount: form.Amount, Source: form.Source,
|
||||
Kind: form.Kind, Keywords: form.Keywords})
|
||||
@ -502,7 +502,7 @@ func (a *Technology) TopicDelete(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := technology2.NewTopic()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := technology2.NewTopic()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Delete(form.Convert())
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
@ -517,7 +517,7 @@ func (*Technology) Product(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := technology2.NewProduct()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
data, err := technology2.NewProduct()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Instance(form.Title, form.Status, form.Page, form.PageSize)
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
@ -531,7 +531,7 @@ func (*Technology) ProductVisit(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := technology2.NewProduct()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
data, err := technology2.NewProduct()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Visit(form.Convert(), form.Page, form.PageSize)
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
@ -543,7 +543,7 @@ func (*Technology) ProductAdd(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := technology2.NewProduct()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := technology2.NewProduct()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Form(&technology2.ProductParams{
|
||||
Title: form.Title, Image: form.FilterImageURL(), Video: form.FilterVideo(),
|
||||
Material: form.FilterMaterial(), Introduce: form.Introduce, Industrys: form.Industrys,
|
||||
@ -562,7 +562,7 @@ func (*Technology) ProductEdit(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := technology2.NewProduct()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := technology2.NewProduct()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Form(&technology2.ProductParams{
|
||||
ID: form.Convert(), Title: form.Title, Image: form.FilterImageURL(), Video: form.FilterVideo(),
|
||||
Material: form.FilterMaterial(), Introduce: form.Introduce, Industrys: form.Industrys,
|
||||
@ -581,7 +581,7 @@ func (*Technology) ProductShelf(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := technology2.NewProduct()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := technology2.NewProduct()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Shelf(form.Convert(), form.Status)
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
@ -593,7 +593,7 @@ func (*Technology) ProductDelete(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := technology2.NewProduct()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := technology2.NewProduct()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Delete(form.Convert())
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
@ -607,7 +607,7 @@ func (a *Technology) Project(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := technology2.NewProject()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
data, err := technology2.NewProject()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
List(form.Title, form.Page, form.PageSize)
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
@ -619,7 +619,7 @@ func (a *Technology) ProjectAdd(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := technology2.NewProject()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := technology2.NewProject()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Form(&technology2.ProjectParams{
|
||||
Title: form.Title, Kind: form.Kind, Source: form.Source, Director: form.Director,
|
||||
BeginAt: form.BeginAt, FinishAt: form.FinishAt, Amount: form.Amount, Role: form.Role,
|
||||
@ -636,7 +636,7 @@ func (a *Technology) ProjectEdit(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := technology2.NewProject()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := technology2.NewProject()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Form(&technology2.ProjectParams{ID: form.Convert(),
|
||||
Title: form.Title, Kind: form.Kind, Source: form.Source, Director: form.Director,
|
||||
BeginAt: form.BeginAt, FinishAt: form.FinishAt, Amount: form.Amount, Role: form.Role,
|
||||
@ -653,7 +653,7 @@ func (*Technology) ProjectShelf(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := technology2.NewProject()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := technology2.NewProject()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Shelf(form.Convert(), form.Status)
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
@ -665,7 +665,7 @@ func (a *Technology) ProjectDelete(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := technology2.NewProject()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := technology2.NewProject()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Delete(form.Convert())
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
@ -679,7 +679,7 @@ func (*Technology) Achievement(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := technology2.NewAchievement()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
data, err := technology2.NewAchievement()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Instance(form.Status, form.Page, form.PageSize)
|
||||
api.APIResponse(err, data)(c)
|
||||
}
|
||||
@ -691,7 +691,7 @@ func (*Technology) AchievementAdd(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := technology2.NewAchievement()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := technology2.NewAchievement()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Form(&technology2.AchievementParams{Mode: form.Mode,
|
||||
Title: form.Title, Image: form.FilterImageURL(), File: form.FilterFile(),
|
||||
Introduce: form.Introduce, Industrys: form.Industrys,
|
||||
@ -710,7 +710,7 @@ func (*Technology) AchievementEdit(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := technology2.NewAchievement()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := technology2.NewAchievement()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Form(&technology2.AchievementParams{ID: form.Convert(), Mode: form.Mode,
|
||||
Title: form.Title, Image: form.FilterImageURL(), File: form.FilterFile(),
|
||||
Introduce: form.Introduce, Industrys: form.Industrys,
|
||||
@ -729,7 +729,7 @@ func (*Technology) AchievementShelf(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := technology2.NewAchievement()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := technology2.NewAchievement()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Shelf(form.Convert(), form.Status)
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
@ -741,7 +741,7 @@ func (*Technology) AchievementDelete(c *gin.Context) {
|
||||
api.APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
err := technology2.NewAchievement()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(c).(string)).
|
||||
err := technology2.NewAchievement()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(string)).
|
||||
Delete(form.Convert())
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
|
Reference in New Issue
Block a user