feat:完善信息
This commit is contained in:
@ -21,7 +21,7 @@ type SettledParams struct {
|
||||
Code string // 唯一编码
|
||||
config.Area
|
||||
Introduce string
|
||||
Industry uint64 `json:"industry"`
|
||||
Industry string `json:"industry"`
|
||||
Keywords []string `json:"keywords"`
|
||||
}
|
||||
|
||||
@ -57,7 +57,7 @@ func (c *SettledParams) pass(uid, mUID uint64, mStatus model2.ExamineStatusKind)
|
||||
func (c *Settled) Company(params *SettledParams, other *config.IdentityForCompany) error {
|
||||
mManageCompany := model3.NewManageCompany()
|
||||
|
||||
err := params.effect(c.ManageUID, mManageCompany.ManageCompany)
|
||||
err := params.effect(c.UID, mManageCompany.ManageCompany)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
@ -73,10 +73,10 @@ func (c *Settled) Company(params *SettledParams, other *config.IdentityForCompan
|
||||
mManageCompany.Introduce = params.Introduce
|
||||
|
||||
if mManageCompany.ID <= 0 {
|
||||
mManageCompany.UID = c.ManageUID
|
||||
mManageCompany.UID = c.UID
|
||||
return model2.Create(mManageCompany.ManageCompany)
|
||||
}
|
||||
if !params.pass(c.ManageUID, mManageCompany.UID, mManageCompany.Status) {
|
||||
if !params.pass(c.UID, mManageCompany.UID, mManageCompany.Status) {
|
||||
return errors.New("操作错误,无权限操作")
|
||||
}
|
||||
mManageCompany.Status = model2.ExamineStatusForOngoing
|
||||
@ -87,7 +87,7 @@ func (c *Settled) Company(params *SettledParams, other *config.IdentityForCompan
|
||||
func (c *Settled) Expert(params *SettledParams, other *config.IdentityForExpert) error {
|
||||
mManageExpert := model3.NewManageExpert()
|
||||
|
||||
err := params.effect(c.ManageUID, mManageExpert.ManageExpert)
|
||||
err := params.effect(c.UID, mManageExpert.ManageExpert)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
@ -108,10 +108,10 @@ func (c *Settled) Expert(params *SettledParams, other *config.IdentityForExpert)
|
||||
mManageExpert.Research = utils.AnyToJSON(other.Research)
|
||||
|
||||
if mManageExpert.ID <= 0 {
|
||||
mManageExpert.UID = c.ManageUID
|
||||
mManageExpert.UID = c.UID
|
||||
return model2.Create(mManageExpert.ManageExpert)
|
||||
}
|
||||
if !params.pass(c.ManageUID, mManageExpert.UID, mManageExpert.Status) {
|
||||
if !params.pass(c.UID, mManageExpert.UID, mManageExpert.Status) {
|
||||
return errors.New("操作错误,无权限操作")
|
||||
}
|
||||
mManageExpert.Status = model2.ExamineStatusForOngoing
|
||||
@ -122,7 +122,7 @@ func (c *Settled) Expert(params *SettledParams, other *config.IdentityForExpert)
|
||||
func (c *Settled) Research(params *SettledParams, other *config.IdentityForResearch) error {
|
||||
mManageResearch := model3.NewManageResearch()
|
||||
|
||||
err := params.effect(c.ManageUID, mManageResearch.ManageResearch)
|
||||
err := params.effect(c.UID, mManageResearch.ManageResearch)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
@ -137,10 +137,10 @@ func (c *Settled) Research(params *SettledParams, other *config.IdentityForResea
|
||||
mManageResearch.Research = other.Research
|
||||
|
||||
if mManageResearch.ID <= 0 {
|
||||
mManageResearch.UID = c.ManageUID
|
||||
mManageResearch.UID = c.UID
|
||||
return model2.Create(mManageResearch.ManageResearch)
|
||||
}
|
||||
if !params.pass(c.ManageUID, mManageResearch.UID, mManageResearch.Status) {
|
||||
if !params.pass(c.UID, mManageResearch.UID, mManageResearch.Status) {
|
||||
return errors.New("操作错误,无权限操作")
|
||||
}
|
||||
mManageResearch.Status = model2.ExamineStatusForOngoing
|
||||
@ -151,7 +151,7 @@ func (c *Settled) Research(params *SettledParams, other *config.IdentityForResea
|
||||
func (c *Settled) Laboratory(params *SettledParams, other *config.IdentityForLaboratory) error {
|
||||
mManageLaboratory := model3.NewManageLaboratory()
|
||||
|
||||
err := params.effect(c.ManageUID, mManageLaboratory.ManageLaboratory)
|
||||
err := params.effect(c.UID, mManageLaboratory.ManageLaboratory)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
@ -169,10 +169,10 @@ func (c *Settled) Laboratory(params *SettledParams, other *config.IdentityForLab
|
||||
mManageLaboratory.Research = utils.AnyToJSON(other.Research)
|
||||
|
||||
if mManageLaboratory.ID <= 0 {
|
||||
mManageLaboratory.UID = c.ManageUID
|
||||
mManageLaboratory.UID = c.UID
|
||||
return model2.Create(mManageLaboratory.ManageLaboratory)
|
||||
}
|
||||
if !params.pass(c.ManageUID, mManageLaboratory.UID, mManageLaboratory.Status) {
|
||||
if !params.pass(c.UID, mManageLaboratory.UID, mManageLaboratory.Status) {
|
||||
return errors.New("操作错误,无权限操作")
|
||||
}
|
||||
mManageLaboratory.Status = model2.ExamineStatusForOngoing
|
||||
|
Reference in New Issue
Block a user