xiziwen 1 ngày trước cách đây
mục cha
commit
10f170827a

+ 1 - 1
controllers/data_manage/excel/excel_info.go

@@ -3434,7 +3434,7 @@ func (c *ExcelInfoController) SaveExcelReference() {
 
 	addList := make([]*excel3.ReferencedExcelConfig, 0)
 	for _, v := range req {
-		exist, e := excel3.GetReferencedExcelConfig(v.ReferencedId, v.FromScene, v.Uuid)
+		exist, e := excel3.GetReferencedExcelConfig(v.ReferencedId, v.FromScene, v.UniqueCode, v.Uuid)
 		if e != nil && e.Error() != utils.ErrNoRow() {
 			br.Msg = "查找引用失败"
 			br.ErrMsg = "查找引用失败,Err:" + e.Error()

+ 3 - 3
models/data_manage/excel/referenced_excel_config.go

@@ -37,10 +37,10 @@ func AddReferencedExcelConfig(items []*ReferencedExcelConfig) (err error) {
 }
 
 // getByCode
-func GetReferencedExcelConfig(referencedId, fromScene int, uuid string) (item ReferencedExcelConfig, err error) {
+func GetReferencedExcelConfig(referencedId, fromScene int, uniqueCode, uuid string) (item ReferencedExcelConfig, err error) {
 	o := orm.NewOrmUsingDB("data")
-	sql := ` SELECT * FROM referenced_excel_config WHERE referenced_id = ? AND from_scene = ? AND uuid = ? `
-	err = o.Raw(sql, referencedId, fromScene, uuid).QueryRow(&item)
+	sql := ` SELECT * FROM referenced_excel_config WHERE referenced_id = ? AND from_scene = ? AND uuid = ? AND unique_code = ? `
+	err = o.Raw(sql, referencedId, fromScene, uniqueCode, uuid).QueryRow(&item)
 	return
 }