feat:完善项目信息

This commit is contained in:
henry
2022-01-19 16:13:40 +08:00
parent 6adf1381d0
commit 94106773f5
3 changed files with 19 additions and 4 deletions

View File

@ -1,6 +1,10 @@
package config
import "SciencesServer/utils"
import (
"SciencesServer/config"
"SciencesServer/utils"
"strings"
)
// Area 区域
type Area struct {
@ -33,9 +37,10 @@ type (
}
// IdentityForResearch 研究机构
IdentityForResearch struct {
Longitude float64 `json:"longitude" form:"longitude"` // 经度
Latitude float64 `json:"latitude" form:"latitude"` // 纬度
Researchs []string `json:"researchs" form:"researchs"` // 研究方向
Longitude float64 `json:"longitude" form:"longitude"` // 经度
Latitude float64 `json:"latitude" form:"latitude"` // 纬度
License string `json:"license" form:"license" binding:"required"` // 营业执照
Researchs []string `json:"researchs" form:"researchs"` // 研究方向
}
// IdentityForLaboratory 实验室
IdentityForLaboratory struct {
@ -63,6 +68,10 @@ type (
}
)
func (this *IdentityForCompany) FilterLicense() string {
return strings.Replace(this.License, config.SystemConfig[config.SysImageDomain], "", -1)
}
func (this *IdentityForExpert) ConvertResearch() uint64 {
if this.ResearchID == "" {
return 0
@ -77,6 +86,10 @@ func (this *IdentityForExpert) ConvertLaboratory() uint64 {
return uint64(utils.HASHIDDecode(this.LaboratoryID))
}
func (this *IdentityForResearch) FilterLicense() string {
return strings.Replace(this.License, config.SystemConfig[config.SysImageDomain], "", -1)
}
func (this *IdentityForLaboratory) ConvertResearch() uint64 {
if this.ResearchID == "" {
return 0