feat:修改技术文档需求数据模块
This commit is contained in:
@ -3,7 +3,6 @@ package api
|
||||
import (
|
||||
technology2 "SciencesServer/app/api/enterprise/controller/technology"
|
||||
"SciencesServer/app/basic/api"
|
||||
"SciencesServer/app/basic/config"
|
||||
"SciencesServer/app/session"
|
||||
config2 "SciencesServer/config"
|
||||
"github.com/gin-gonic/gin"
|
||||
@ -61,21 +60,20 @@ type (
|
||||
}
|
||||
// demandForm 需求参数
|
||||
demandForm struct {
|
||||
Title string `json:"title" form:"title" binding:"required"`
|
||||
Introduce string `json:"introduce" form:"introduce" binding:"required"`
|
||||
Name string `json:"name" form:"name" binding:"required"`
|
||||
Mobile string `json:"mobile" form:"mobile" binding:"required"`
|
||||
Deadline string `json:"deadline" form:"deadline" binding:"required"`
|
||||
Industry []string `json:"industry" form:"industry" binding:"required"`
|
||||
Kinds []string `json:"kinds" form:"kinds" binding:"required"`
|
||||
config.Area
|
||||
Title string `json:"title" form:"title" binding:"required"`
|
||||
Introduce string `json:"introduce" form:"introduce" binding:"required"`
|
||||
Name string `json:"name" form:"name" binding:"required"`
|
||||
Mobile string `json:"mobile" form:"mobile" binding:"required"`
|
||||
Deadline string `json:"deadline" form:"deadline" binding:"required"`
|
||||
Industry []string `json:"industry" form:"industry" binding:"required"`
|
||||
Kinds []string `json:"kinds" form:"kinds" binding:"required"`
|
||||
Budget float64 `json:"budget" form:"budget"`
|
||||
BudgetMode int `json:"budget_mode" form:"budget_mode"`
|
||||
Expect []string `json:"expect" form:"expect"` // 期望合作的企业及模式
|
||||
Expects []string `json:"expects" form:"expects"` // 期望合作的企业及模式
|
||||
DemandBasic string `json:"demand_basic" form:"demand_basic"` // 基础
|
||||
DemandExpect string `json:"demand_expect" form:"demand_expect"` // 预期
|
||||
DemandBenefit string `json:"demand_benefit" form:"demand_benefit"` // 效益
|
||||
Status int `json:"status" form:"status"`
|
||||
IsSubmit int `json:"is_submit" form:"is_submit"`
|
||||
}
|
||||
// topicForm 课题参数
|
||||
topicForm struct {
|
||||
@ -384,12 +382,12 @@ func (a *Technology) DemandAdd(c *gin.Context) {
|
||||
err := technology2.NewDemand()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(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, Area: form.Area, Budget: form.Budget, BudgetMode: form.BudgetMode,
|
||||
Expect: form.Expect, Demand: struct {
|
||||
Basic string `json:"basic"`
|
||||
Expect string `json:"expect"`
|
||||
Benefit string `json:"benefit"`
|
||||
}{Basic: form.DemandBasic, Expect: form.DemandExpect, Benefit: form.DemandBenefit}, Status: form.Status,
|
||||
Industry: form.Industry, Kinds: form.Kinds, Budget: form.Budget, BudgetMode: form.BudgetMode,
|
||||
Expects: form.Expects, Demand: struct {
|
||||
Basic string
|
||||
Expect string
|
||||
Benefit string
|
||||
}{Basic: form.DemandBasic, Expect: form.DemandExpect, Benefit: form.DemandBenefit}, IsSubmit: form.IsSubmit,
|
||||
})
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
@ -406,12 +404,12 @@ func (a *Technology) DemandEdit(c *gin.Context) {
|
||||
err := technology2.NewDemand()(api.GetSession()(c).(*session.Enterprise), api.GetLocal()(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, Area: form.Area, Budget: form.Budget, BudgetMode: form.BudgetMode,
|
||||
Expect: form.Expect, Demand: struct {
|
||||
Basic string `json:"basic"`
|
||||
Expect string `json:"expect"`
|
||||
Benefit string `json:"benefit"`
|
||||
}{Basic: form.DemandBasic, Expect: form.DemandExpect, Benefit: form.DemandBenefit}, Status: form.Status,
|
||||
Industry: form.Industry, Kinds: form.Kinds, Budget: form.Budget, BudgetMode: form.BudgetMode,
|
||||
Expects: form.Expects, Demand: struct {
|
||||
Basic string
|
||||
Expect string
|
||||
Benefit string
|
||||
}{Basic: form.DemandBasic, Expect: form.DemandExpect, Benefit: form.DemandBenefit}, IsSubmit: form.IsSubmit,
|
||||
})
|
||||
api.APIResponse(err)(c)
|
||||
}
|
||||
|
Reference in New Issue
Block a user