feat:完善项目
This commit is contained in:
@ -7,5 +7,5 @@ type SysConfig struct {
|
||||
}
|
||||
|
||||
func NewSysConfig() *SysConfig {
|
||||
return &SysConfig{}
|
||||
return &SysConfig{model.NewSysConfig()}
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ import (
|
||||
"SciencesServer/app/common/model"
|
||||
"SciencesServer/serve/orm"
|
||||
"fmt"
|
||||
"time"
|
||||
)
|
||||
|
||||
// SysPatent 专利信息
|
||||
@ -13,8 +14,16 @@ type SysPatent struct {
|
||||
|
||||
// SysPatentInfo 专利信息
|
||||
type SysPatentInfo struct {
|
||||
*model.SysPatent
|
||||
UID string `json:"uid"`
|
||||
model.Model
|
||||
model.ModelTenant
|
||||
Title string `json:"title"`
|
||||
ApplyCode string `json:"apply_code"`
|
||||
ApplyAt string `json:"apply_at"`
|
||||
ApplyName string `json:"apply_name"`
|
||||
Inventor string `json:"inventor"`
|
||||
model.Shelf
|
||||
UID uint64 `json:"-"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
}
|
||||
|
||||
func (m *SysPatent) IsExistParams(params map[string]interface{}) (bool, error) {
|
||||
@ -35,7 +44,7 @@ func (m *SysPatent) Patent(page, pageSize int, count *int64, where ...*model.Mod
|
||||
db := orm.GetDB().Table(m.TableName()+" AS p").
|
||||
Select("p.id", "p.title", "p.apply_code", "p.inventor", "p.apply_name", "p.apply_at", "u.uid",
|
||||
"p.shelf_status", "p.created_at").
|
||||
Joins(fmt.Sprintf("LEFT JOIN %s AS u ON p.id = u.tenant_id AND u.is_deleted = %d",
|
||||
Joins(fmt.Sprintf("LEFT JOIN %s AS u ON p.id = u.patent_id AND u.is_deleted = %d",
|
||||
model.NewUserPatent().TableName(), model.DeleteStatusForNot))
|
||||
|
||||
if len(where) > 0 {
|
||||
|
Reference in New Issue
Block a user