|
|
|
@ -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.GetTenantID()(c).(string)).
|
|
|
|
|
data, err := technology2.NewInstance()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(uint64)).
|
|
|
|
|
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.GetTenantID()(c).(string)).
|
|
|
|
|
err := technology2.NewInstance()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(uint64)).
|
|
|
|
|
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.GetTenantID()(c).(string)).
|
|
|
|
|
err := technology2.NewInstance()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(uint64)).
|
|
|
|
|
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.GetTenantID()(c).(string)).
|
|
|
|
|
err := technology2.NewInstance()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(uint64)).
|
|
|
|
|
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.GetTenantID()(c).(string)).
|
|
|
|
|
err := technology2.NewInstance()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(uint64)).
|
|
|
|
|
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.GetTenantID()(c).(string)).
|
|
|
|
|
data, err := technology2.NewPaper()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(uint64)).
|
|
|
|
|
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.GetTenantID()(c).(string)).
|
|
|
|
|
err := technology2.NewPaper()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(uint64)).
|
|
|
|
|
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.GetTenantID()(c).(string)).
|
|
|
|
|
err := technology2.NewPaper()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(uint64)).
|
|
|
|
|
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.GetTenantID()(c).(string)).
|
|
|
|
|
err := technology2.NewPaper()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(uint64)).
|
|
|
|
|
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.GetTenantID()(c).(string)).
|
|
|
|
|
data, err := technology2.NewPatent()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(uint64)).
|
|
|
|
|
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.GetTenantID()(c).(string)).
|
|
|
|
|
data, err := technology2.NewPatent()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(uint64)).
|
|
|
|
|
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.GetTenantID()(c).(string)).
|
|
|
|
|
err := technology2.NewPatent()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(uint64)).
|
|
|
|
|
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.GetTenantID()(c).(string)).
|
|
|
|
|
err := technology2.NewPatent()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(uint64)).
|
|
|
|
|
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.GetTenantID()(c).(string)).
|
|
|
|
|
err := technology2.NewPatent()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(uint64)).
|
|
|
|
|
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.GetTenantID()(c).(string)).
|
|
|
|
|
data, err := technology2.NewDemand()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(uint64)).
|
|
|
|
|
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.GetTenantID()(c).(string)).
|
|
|
|
|
data, err := technology2.NewDemand()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(uint64)).
|
|
|
|
|
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.GetTenantID()(c).(string)).
|
|
|
|
|
err := technology2.NewDemand()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(uint64)).
|
|
|
|
|
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.GetTenantID()(c).(string)).
|
|
|
|
|
err := technology2.NewDemand()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(uint64)).
|
|
|
|
|
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.GetTenantID()(c).(string)).
|
|
|
|
|
err := technology2.NewDemand()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(uint64)).
|
|
|
|
|
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.GetTenantID()(c).(string)).
|
|
|
|
|
data, err := technology2.NewTopic()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(uint64)).
|
|
|
|
|
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.GetTenantID()(c).(string)).
|
|
|
|
|
data, err := technology2.NewTopic()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(uint64)).
|
|
|
|
|
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.GetTenantID()(c).(string)).
|
|
|
|
|
err := technology2.NewTopic()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(uint64)).
|
|
|
|
|
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.GetTenantID()(c).(string)).
|
|
|
|
|
err := technology2.NewTopic()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(uint64)).
|
|
|
|
|
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.GetTenantID()(c).(string)).
|
|
|
|
|
err := technology2.NewTopic()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(uint64)).
|
|
|
|
|
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.GetTenantID()(c).(string)).
|
|
|
|
|
data, err := technology2.NewProduct()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(uint64)).
|
|
|
|
|
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.GetTenantID()(c).(string)).
|
|
|
|
|
data, err := technology2.NewProduct()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(uint64)).
|
|
|
|
|
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.GetTenantID()(c).(string)).
|
|
|
|
|
err := technology2.NewProduct()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(uint64)).
|
|
|
|
|
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.GetTenantID()(c).(string)).
|
|
|
|
|
err := technology2.NewProduct()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(uint64)).
|
|
|
|
|
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.GetTenantID()(c).(string)).
|
|
|
|
|
err := technology2.NewProduct()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(uint64)).
|
|
|
|
|
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.GetTenantID()(c).(string)).
|
|
|
|
|
err := technology2.NewProduct()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(uint64)).
|
|
|
|
|
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.GetTenantID()(c).(string)).
|
|
|
|
|
data, err := technology2.NewProject()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(uint64)).
|
|
|
|
|
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.GetTenantID()(c).(string)).
|
|
|
|
|
err := technology2.NewProject()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(uint64)).
|
|
|
|
|
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.GetTenantID()(c).(string)).
|
|
|
|
|
err := technology2.NewProject()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(uint64)).
|
|
|
|
|
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.GetTenantID()(c).(string)).
|
|
|
|
|
err := technology2.NewProject()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(uint64)).
|
|
|
|
|
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.GetTenantID()(c).(string)).
|
|
|
|
|
err := technology2.NewProject()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(uint64)).
|
|
|
|
|
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.GetTenantID()(c).(string)).
|
|
|
|
|
data, err := technology2.NewAchievement()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(uint64)).
|
|
|
|
|
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.GetTenantID()(c).(string)).
|
|
|
|
|
err := technology2.NewAchievement()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(uint64)).
|
|
|
|
|
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.GetTenantID()(c).(string)).
|
|
|
|
|
err := technology2.NewAchievement()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(uint64)).
|
|
|
|
|
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.GetTenantID()(c).(string)).
|
|
|
|
|
err := technology2.NewAchievement()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(uint64)).
|
|
|
|
|
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.GetTenantID()(c).(string)).
|
|
|
|
|
err := technology2.NewAchievement()(api.GetSession()(c).(*session.Enterprise), api.GetTenantID()(c).(uint64)).
|
|
|
|
|
Delete(form.Convert())
|
|
|
|
|
api.APIResponse(err)(c)
|
|
|
|
|
}
|
|
|
|
|