feat:优化项目信息

This commit is contained in:
henry
2022-02-09 17:35:31 +08:00
parent 2d8be509b7
commit 56e8243724
15 changed files with 357 additions and 54 deletions

View File

@ -66,7 +66,6 @@ func (c *PatentParams) add(tenantID, uid uint64) error {
}
return orm.GetDB().Transaction(func(tx *gorm.DB) error {
mTechnologyPatent.Kind = model2.TechnologyPatentKind(c.Kind)
mTechnologyPatent.TenantID = tenantID
mTechnologyPatent.Title = c.Title
mTechnologyPatent.FileUrl = c.FileUrl
mTechnologyPatent.ApplyCode = c.ApplyCode

View File

@ -31,7 +31,6 @@ func (m *TechnologyPatent) Instance(where ...*model.ModelWhere) ([]*TechnologyPa
Select("p.id", "p.title", "LEFT(p.description, 80) AS description", "p.apply_at").
Joins(fmt.Sprintf("LEFT JOIN %s AS c ON p.ipc_code = c.ipc AND c.is_deleted = %d",
model.NewTechnologyPatentClassify().TableName(), model.DeleteStatusForNot)).
Where("p.shelf_status = ?", model.ShelfStatusForUp).
Where("p.is_deleted = ?", model.DeleteStatusForNot)
if len(where) > 0 {