Skip to content

Commit

Permalink
Merge pull request ixre#21 from jsix/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
ixre committed May 15, 2016
2 parents ad22d17 + 89e54d6 commit 813fe20
Show file tree
Hide file tree
Showing 333 changed files with 10,958 additions and 18,434 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ zhu***@126.com



pub-serve --- 14199
partner-serve ---- 14192



## Deploy ##
### 1. Import database ###
> Create new mysql db instance named "go2o"
Expand Down
2 changes: 0 additions & 2 deletions conf/query/Partner.ItemList.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ f.small_title,
`cost`,
`sale_price`,
`apply_subs`,
`note`,
on_shelves,
`state`,
/*`description`,*/
f.`create_time`,
f.`update_time`
FROM `gs_item` f INNER JOIN gs_category c ON f.category_id = c.id
Expand Down
2 changes: 1 addition & 1 deletion conf/query/Partner.ItemsOfCategory.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ f.small_title,
`cost`,
`sale_price`,
`apply_subs`,
`note`,
`remark`,
on_shelves,
`state`,
/*`description`,*/
Expand Down
21 changes: 21 additions & 0 deletions conf/query/Partner.PersonFinanceRiseAccount.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8" ?>
<ExportItemConfig>
<ColumnMappingString></ColumnMappingString>
<Query>
<![CDATA[
SELECT m.name,r.* FROM mm_member m INNER JOIN pf_riseinfo r ON r.person_id=m.id
INNER JOIN mm_relation rl ON rl.member_id=m.id
WHERE rl.reg_partner_id={partner_id} AND ('{keyword}' = '' OR (m.usr LIKE '%{keyword}%' OR m.name LIKE '%{keyword}%' OR m.phone
LIKE '%{keyword}%')) ORDER BY {order} LIMIT {page_start},{page_size}
]]>
</Query>
<Import><![CDATA[]]></Import>
<Total>
<![CDATA[ SELECT COUNT(0) FROM mm_member m INNER JOIN pf_riseinfo r ON r.person_id=m.id
INNER JOIN mm_relation rl ON rl.member_id=m.id
WHERE rl.reg_partner_id={partner_id} AND ('{keyword}' = '' OR (m.usr LIKE '%{keyword}%' OR m.name LIKE '%{keyword}%' OR m.phone
LIKE '%{keyword}%'))
]]>
</Total>
</ExportItemConfig>
22 changes: 22 additions & 0 deletions conf/query/Partner.PersonFinanceRiseLog.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8" ?>
<ExportItemConfig>
<ColumnMappingString></ColumnMappingString>
<Query>
<![CDATA[
SELECT r.* FROM mm_member m INNER JOIN pf_riselog r ON r.person_id=m.id
INNER JOIN mm_relation rl ON rl.member_id=m.id
WHERE rl.reg_partner_id={partner_id} AND r.person_id={person_id}
AND ({type}=-1 OR {type}=type) AND ('{keyword}' = ''
OR (r.title LIKE '%{keyword}%')) ORDER BY log_time DESC LIMIT {page_start},{page_size}
]]>
</Query>
<Import><![CDATA[]]></Import>
<Total>
<![CDATA[ SELECT COUNT(0) FROM mm_member m INNER JOIN pf_riselog r ON r.person_id=m.id
INNER JOIN mm_relation rl ON rl.member_id=m.id
WHERE rl.reg_partner_id={partner_id} AND r.person_id={person_id}
AND ({type}=-1 OR {type}=type) AND ('{keyword}' = ''
OR (r.title LIKE '%{keyword}%'))
]]>
</Total>
</ExportItemConfig>
25 changes: 25 additions & 0 deletions conf/query/Partner.PersonFinanceRiseTransferLog.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8" ?>
<ExportItemConfig>
<ColumnMappingString></ColumnMappingString>
<Query>
<![CDATA[
SELECT r.*,m.name,m.phone FROM mm_member m INNER JOIN pf_riselog r ON r.person_id=m.id
INNER JOIN mm_relation rl ON rl.member_id=m.id
WHERE rl.reg_partner_id={partner_id} AND r.type IN({type})
AND ({state}=-1 OR {state}=r.state) AND ('{keyword}' = ''
OR (r.title LIKE '%{keyword}%' OR m.name LIKE '%{keyword}%'
OR m.phone LIKE '%{keyword}%' OR m.usr LIKE '%{keyword}%'))
ORDER BY log_time DESC LIMIT {page_start},{page_size}
]]>
</Query>
<Import><![CDATA[]]></Import>
<Total>
<![CDATA[ SELECT COUNT(0) FROM mm_member m INNER JOIN pf_riselog r ON r.person_id=m.id
INNER JOIN mm_relation rl ON rl.member_id=m.id
WHERE rl.reg_partner_id={partner_id} AND r.type IN({type})
AND ({state}=-1 OR {state}=r.state) AND ('{keyword}' = ''
OR (r.title LIKE '%{keyword}%' OR m.name LIKE '%{keyword}%'
OR m.phone LIKE '%{keyword}%' OR m.usr LIKE '%{keyword}%'))
]]>
</Total>
</ExportItemConfig>
Binary file modified docs/design/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 3 additions & 19 deletions go2o-server.go → go2o-serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ import (
"go2o/src/core/service/dps"
"log"
"os"
"os/signal"
"runtime"
"syscall"
"go2o/src/fix"
)

func main() {
Expand Down Expand Up @@ -63,8 +62,8 @@ func main() {
if !newApp.Init(debug, trace) {
os.Exit(1)
}

go handleSignal(ch)
fix.CustomFix()
go fix.SignalNotify(ch)

if v := newApp.Config().GetInt("server_port"); v != 0 {
httpPort = v
Expand Down Expand Up @@ -95,18 +94,3 @@ func main() {

os.Exit(1) // 退出
}

func handleSignal(srcCh chan bool) {
ch := make(chan os.Signal)
signal.Notify(ch, syscall.SIGHUP, syscall.SIGTERM)
for {
sig := <-ch
switch sig {
case syscall.SIGHUP:
//log.Println("[ OS][ TERM] - go2o sighup ...")
case syscall.SIGTERM: // 退出时
log.Println("[ OS][ TERM] - go2o server has exit !")
close(srcCh)
}
}
}
2 changes: 2 additions & 0 deletions go2o-tcpserve.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"os"
"os/signal"
"syscall"
"go2o/src/fix"
)

func main() {
Expand All @@ -41,6 +42,7 @@ func main() {
gof.CurrentApp = core.NewMainApp(conf)
dps.Init(gof.CurrentApp)
cache.Initialize(gof.CurrentApp.Storage())
fix.CustomFix()

ts := tcpserve.NewServe(logOutput)
ts.RegisterJob(tcpserve.MemberSummaryNotifyJob) //注册会员信息通知
Expand Down
70 changes: 70 additions & 0 deletions merchant-serve.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
/**
* Copyright 2014 @ z3q.net.
* name :
* author : jarryliu
* date : 2013-12-16 21:45
* description :
* history :
*/

package main

import (
"flag"
"fmt"
"github.com/jsix/gof"
"github.com/jsix/gof/storage"
"go2o/src/app/cache"
"go2o/src/core"
"go2o/src/core/service/dps"
"log"
"os"
"runtime"
"go2o/src/fix"
"go2o/src/app/front/partner"
"github.com/jsix/gof/web/session"
)

func main() {
var (
ch chan bool = make(chan bool)
confFile string
httpPort int
debug bool
trace bool
help bool
newApp *core.MainApp
)

flag.IntVar(&httpPort, "port", 14281, "web server port")
flag.BoolVar(&debug, "debug", false, "enable debug")
flag.BoolVar(&trace, "trace", false, "enable trace")
flag.BoolVar(&help, "help", false, "command usage")
flag.StringVar(&confFile, "conf", "app.conf", "")
flag.Parse()

if help {
flag.Usage()
return
}

log.SetOutput(os.Stdout)
log.SetFlags(log.LstdFlags | log.Ltime | log.Ldate | log.Lshortfile)

runtime.GOMAXPROCS(runtime.NumCPU())
newApp = core.NewMainApp(confFile)
if !newApp.Init(debug, trace) {
os.Exit(1)
}
fix.CustomFix()
go fix.SignalNotify(ch)

gof.CurrentApp = newApp
dps.Init(newApp)
core.RegisterTypes()
cache.Initialize(storage.NewRedisStorage(newApp.Redis()))
session.Set(newApp.Storage(),"")
go partner.Listen(ch, newApp, fmt.Sprintf(":%d", httpPort))

<-ch
}
49 changes: 49 additions & 0 deletions pub-serve.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/**
* Copyright 2014 @ z3q.net.
* name :
* author : jarryliu
* date : 2013-12-16 21:45
* description :
* history :
*/

package main

import (
"flag"
"fmt"
"go2o/src/core"
"log"
"os"
"runtime"
"go2o/src/fix"
"go2o/src/app/front/pub"
)

func main() {
var (
ch chan bool = make(chan bool)
confFile string
httpPort int
help bool
newApp *core.MainApp
)

flag.IntVar(&httpPort, "port", 14280, "web server port")
flag.BoolVar(&help, "help", false, "command usage")
flag.StringVar(&confFile, "conf", "app.conf", "")
flag.Parse()

if help {
flag.Usage()
return
}
log.SetOutput(os.Stdout)
log.SetFlags(log.LstdFlags | log.Ltime | log.Ldate | log.Lshortfile)
runtime.GOMAXPROCS(runtime.NumCPU())
newApp = core.NewMainApp(confFile)
go fix.SignalNotify(ch)
go pub.Listen(ch, newApp, fmt.Sprintf(":%d", httpPort))

<-ch
}
20 changes: 10 additions & 10 deletions public/static/assets/js/core.js

Large diffs are not rendered by default.

52 changes: 33 additions & 19 deletions public/static/assets/js/core_full.js

Large diffs are not rendered by default.

6 changes: 0 additions & 6 deletions public/static/assets/js/global.js

This file was deleted.

Binary file removed public/static/assets/js/images/menu.gif
Binary file not shown.
Loading

0 comments on commit 813fe20

Please sign in to comment.