Explorar o código

Merge branch 'cygx_9.6' of http://8.136.199.33:3000/hongze/hongze_cygx into debug

# Conflicts:
#	models/report.go
xingzai %!s(int64=2) %!d(string=hai) anos
pai
achega
fcd3086636
Modificáronse 2 ficheiros con 8 adicións e 25 borrados
  1. 0 25
      models/industrial_subject.go
  2. 8 0
      models/report.go

+ 0 - 25
models/industrial_subject.go

@@ -1,25 +0,0 @@
-package models
-
-import (
-	"github.com/beego/beego/v2/client/orm"
-	"hongze/hongze_cygx/utils"
-)
-
-type IndustrialSubject struct {
-	IndustrialSubjectId    int    `orm:"column(industrial_subject_id);pk" description:"标的id"`
-	IndustrialManagementId int    `description:"产业id"`
-	SubjectName            string `description:"标的名称"`
-	IndustryName           string `description:"产业名称"`
-	LayoutTime             string `description:"产业布局时间"`
-}
-
-// 标的列表
-func GetIndustrialSubjectListById(subjectIdArr []int) (items []*IndustrialSubject, err error) {
-	if len(subjectIdArr) == 0 {
-		return
-	}
-	o := orm.NewOrm()
-	sql := `SELECT * FROM cygx_industrial_subject WHERE industrial_subject_id IN  (` + utils.GetOrmInReplace(len(subjectIdArr)) + `)   `
-	_, err = o.Raw(sql, subjectIdArr).QueryRows(&items)
-	return
-}

+ 8 - 0
models/report.go

@@ -55,6 +55,14 @@ type IndustrialAnalyst struct {
 	IndustrialManagementId int    `description:"产业id"`
 }
 
+type IndustrialSubject struct {
+	IndustrialSubjectId    int    `orm:"column(industrial_subject_id);pk" description:"标的id"`
+	IndustrialManagementId int    `description:"产业id"`
+	SubjectName            string `description:"标的名称"`
+	IndustryName           string `description:"产业名称"`
+	LayoutTime             string `description:"产业布局时间"`
+}
+
 // 获取产业报告数量
 func GetReportIndustrialCount(categoryId, industrialManagementId int) (count int, err error) {
 	o := orm.NewOrm()