hsun 1 年之前
父节点
当前提交
cb2f18667d
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      models/jiayue/category.go

+ 2 - 1
models/jiayue/category.go

@@ -49,11 +49,12 @@ func GetDictCategory(condition string, pars []interface{}, orderRule string) (ca
 
 	// 查询字段固定, 避免嘉悦加了字段这边报错
 	fields := "C.ID, C.PARENT_ID, C.PARENT_NAME, C.TYPE, C.CODE, C.NAME, C.ICON, C.SORTING, C.DESCRIPTION, C.USER_ID, C.PATH"
-	querySql := fmt.Sprintf(`SELECT %s FROM %s AS C JOIN %s AS R ON C.ID = R.INDEX_ID WHERE %s %s`, fields, IndexMenuTableName, IndexMenuRelateTableName, condition, orderRule)
+	querySql := fmt.Sprintf(`SELECT %s FROM %s C JOIN %s R ON C.ID = R.INDEX_ID WHERE %s %s`, fields, IndexMenuTableName, IndexMenuRelateTableName, condition, orderRule)
 	order := ``
 	if orderRule != "" {
 		order += fmt.Sprintf(` ORDER BY %s`, orderRule)
 	}
+	global.LOG.Info("querySql SQL: ", querySql)
 
 	list, e := execDictCategory(querySql, pars)
 	if e != nil {