forked from ixre/go2o
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Former-commit-id: 89e54d6
- Loading branch information
Showing
18 changed files
with
1,018 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
/** | ||
* 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" | ||
"github.com/jsix/gof/web/session" | ||
"go2o/src/app" | ||
"go2o/src/app/cache" | ||
"go2o/src/app/daemon" | ||
"go2o/src/app/restapi" | ||
"go2o/src/core" | ||
"go2o/src/core/service/dps" | ||
"log" | ||
"os" | ||
"runtime" | ||
"go2o/src/fix" | ||
) | ||
|
||
func main() { | ||
var ( | ||
ch chan bool = make(chan bool) | ||
confFile string | ||
httpPort int | ||
restPort int | ||
debug bool | ||
trace bool | ||
runDaemon bool // 运行daemon | ||
help bool | ||
newApp *core.MainApp | ||
) | ||
|
||
flag.IntVar(&httpPort, "port", 14190, "web server port") | ||
flag.IntVar(&restPort, "restport", 14191, "rest api 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.BoolVar(&runDaemon, "d", false, "run daemon") | ||
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) | ||
|
||
if v := newApp.Config().GetInt("server_port"); v != 0 { | ||
httpPort = v | ||
} | ||
if v := newApp.Config().GetInt("api_service_port"); v != 0 { | ||
restPort = v | ||
} | ||
|
||
gof.CurrentApp = newApp | ||
dps.Init(newApp) | ||
cache.Initialize(storage.NewRedisStorage(newApp.Redis())) | ||
core.RegisterTypes() | ||
session.Set(newApp.Storage(), "") | ||
|
||
var booted bool | ||
|
||
if runDaemon { | ||
go daemon.Run(newApp) | ||
} | ||
|
||
go app.Run(ch, newApp, fmt.Sprintf(":%d", httpPort)) //运行HTTP | ||
|
||
go restapi.Run(newApp, restPort) // 运行REST API | ||
|
||
if booted { | ||
<-ch | ||
} | ||
|
||
os.Exit(1) // 退出 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<title>{{.Map.Category.Name}}</title> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, minimum-scale=1,initial-scale=1, maximum-scale=1, user-scalable=1;"/> | ||
<meta content="yes" name="apple-mobile-web-app-capable" /> | ||
<meta content="black" name="apple-mobile-web-app-status-bar-style" /> | ||
<meta content="telephone=no" name="format-detection" /> | ||
<link type="text/css" rel="stylesheet" href="{{.Var.static_serve}}/css/shop/touchpad/stand.css?spam={{.Var.spam}}"/> | ||
<style type="text/css"> | ||
#wrapper li{line-height:3rem;} | ||
</style> | ||
</head> | ||
<body> | ||
|
||
{{template "header" $}} | ||
|
||
<h2 style="font-size:1rem;padding-top: 60px;color: #F30;text-align: center;">优惠券将于5.20日开始发布, 敬请期待! </h2> | ||
|
||
{{template "footer" $}} | ||
|
||
<script type="text/javascript" src="{{.Var.static_serve}}/assets/js/require.js?{{.Var.Spam}}"></script> | ||
<script type="text/javascript"> | ||
var _baseUrl = '{{.Var.static_serve}}'; | ||
require([_baseUrl + "/assets/js/touch/require_config.js"], function () { | ||
require(['shop/coupon_list']); | ||
}); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{{$img_serve:=.Map.img_serve}} | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<title>商品详情</title> | ||
<meta name="Cache-Control" content="no-cache"/> | ||
<meta content="width=device-width, minimum-scale=1,initial-scale=1, maximum-scale=1, user-scalable=1;" id="viewport" name="viewport" /> | ||
<meta content="yes" name="apple-mobile-web-app-capable" /> | ||
<meta content="black" name="apple-mobile-web-app-status-bar-style" /> | ||
<meta content="telephone=no" name="format-detection" /> | ||
<link type="text/css" rel="stylesheet" href="{{.Var.static_serve}}/css/shop/touchpad/stand.css?spam={{.Var.spam}}"/> | ||
</head> | ||
<body> | ||
<!--{{template "header" $}}--> | ||
<div class="page-goods-des"> | ||
<div class="top"> | ||
<span class="ui-button w50 back-button middle-button"> | ||
<span class="button-inner"> | ||
<span class="button-txt"><b>返回</b></span> | ||
<input onclick="window.history.back()" type="button"/> | ||
</span> | ||
</span> | ||
|
||
商品详情 | ||
</div> | ||
<div class="con"> | ||
{{.Map.describe}} | ||
</div> | ||
</div> | ||
|
||
{{template "footer" $}} | ||
</body> | ||
</html> |
Oops, something went wrong.