Преглед изворни кода

修改项目文件夹名称

zhangjq пре 6 година
родитељ
комит
23e677f1a5
3 измењених фајлова са 5 додато и 6 уклоњено
  1. 2 2
      client/engineclient.go
  2. 1 2
      client/utils.go
  3. 2 2
      client/xsd.go

+ 2 - 2
client/engineclient.go

@@ -47,7 +47,7 @@ func (c *EngineClient) InitDefalutFile(project_name string) {
 	os.MkdirAll("routers", os.ModePerm)
 	os.MkdirAll("conf", os.ModePerm)
 	os.MkdirAll("sqlconfig", os.ModePerm)
-	os.MkdirAll("sqlconfig/gen", os.ModePerm)
+	//os.MkdirAll("sqlconfig/gen", os.ModePerm)
 	os.MkdirAll("doc", os.ModePerm)
 	os.MkdirAll("web", os.ModePerm)
 
@@ -172,7 +172,7 @@ func (c *EngineClient) Generate(xmlfile string) {
 func (c *EngineClient)MergeXmlToSingle()string{
 	path, _ := utils.GetCurrentPath()
 	// e.g.: c:/gopath/src/hanghua_background_proj
-	projDir := fmt.Sprintf("%s%s_proj", path, c.ProjectName)
+	projDir := fmt.Sprintf("%s%s.proj", path, c.ProjectName)
 	projMainXmlFile := projDir + "/" + c.ProjectName + ".xml"
 	projMainXmlFileTemp := projDir + "/" + c.ProjectName + "_temp.xml"
 	_, err := os.Stat(projMainXmlFileTemp)

+ 1 - 2
client/utils.go

@@ -4,7 +4,6 @@ import (
 	"os"
 	"fmt"
 	"errors"
-	"time"
 	"strings"
 	"path/filepath"
 	"io"
@@ -38,7 +37,7 @@ func CopyDir(srcPath string, destPath string) error {
 		}
 	}
 	//加上拷贝时间:不用可以去掉
-	destPath = destPath + "_" + time.Now().Format("20060102150405")
+	//destPath = destPath + "_" + time.Now().Format("20060102150405")
 
 	err := filepath.Walk(srcPath, func(path string, f os.FileInfo, err error) error {
 		if f == nil {

+ 2 - 2
client/xsd.go

@@ -45,14 +45,14 @@ var XSD=`<?xml version="1.0" standalone="yes"?>
                         <xs:attribute name="name" type="xs:string" />
                         <xs:attribute name="desc" type="xs:string" />
                         <xs:attribute name="method" type="xs:string" />
+                        <xs:attribute name="function" type="xs:string" />
+                        <xs:attribute name="table" type="xs:string" />
                       </xs:complexType>
                     </xs:element>
                   </xs:sequence>
                   <xs:attribute name="name" type="xs:string" />
                   <xs:attribute name="desc" type="xs:string" />
                   <xs:attribute name="skip_login" type="xs:string" />
-				  <xs:attribute name="function" type="xs:string" />
-                  <xs:attribute name="table" type="xs:string" />
                 </xs:complexType>
               </xs:element>
             </xs:sequence>