From 5aacc2e840b59aa14f82a5cd6d4e8994cfe27235 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 26 Mar 2019 19:27:08 +0800 Subject: [PATCH] base --- .gitigonre | 10 +++++ .gitmodules | 3 ++ config | 1 + third_party/phpcommon | 1 + webapp/bootstrap/config_loader.php | 54 +++++++++++++++++++++++ webapp/bootstrap/init.php | 6 +++ webapp/controller/OpsController.class.php | 1 + webapp/controller/PayController.class.php | 39 ++++++++++++++++ webapp/index.php | 24 ++++++++++ webapp/phpcommon | 1 + 10 files changed, 140 insertions(+) create mode 100644 .gitigonre create mode 100644 .gitmodules create mode 120000 config create mode 160000 third_party/phpcommon create mode 100644 webapp/bootstrap/config_loader.php create mode 100644 webapp/bootstrap/init.php create mode 120000 webapp/controller/OpsController.class.php create mode 100644 webapp/controller/PayController.class.php create mode 100644 webapp/index.php create mode 120000 webapp/phpcommon diff --git a/.gitigonre b/.gitigonre new file mode 100644 index 0000000..eaa8137 --- /dev/null +++ b/.gitigonre @@ -0,0 +1,10 @@ +*.*\~ +*.*~ +*.*\# +*.*# +~*.* +\#*.* +*.tar +*.tar.gz +config +.idea \ No newline at end of file diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..ce08b16 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "third_party/phpcommon"] + path = third_party/phpcommon + url = git@git.kingsome.cn:server_common/phpcommon.git diff --git a/config b/config new file mode 120000 index 0000000..a67a155 --- /dev/null +++ b/config @@ -0,0 +1 @@ +/var/data/conf_test/pay/webapp/config/ \ No newline at end of file diff --git a/third_party/phpcommon b/third_party/phpcommon new file mode 160000 index 0000000..4fa9d00 --- /dev/null +++ b/third_party/phpcommon @@ -0,0 +1 @@ +Subproject commit 4fa9d00842f4fd2fb2c0b3c82bfdaa4f7ac6a602 diff --git a/webapp/bootstrap/config_loader.php b/webapp/bootstrap/config_loader.php new file mode 100644 index 0000000..792d431 --- /dev/null +++ b/webapp/bootstrap/config_loader.php @@ -0,0 +1,54 @@ + $redis_conf['host'], + 'port' => $redis_conf['port'], + 'passwd' => $redis_conf['passwd'] + )); + return $r; + } + + protected function getMysql($accountid) + { + $mysql_conf = getMysqlConfig(crc32($accountid)); + $conn = new phpcommon\Mysql(array( + 'host' => $mysql_conf['host'], + 'port' => $mysql_conf['port'], + 'user' => $mysql_conf['user'], + 'passwd' => $mysql_conf['passwd'], + 'dbname' => 'kefudb' . $mysql_conf['instance_id'] + )); + return $conn; + } + + public function getOrderId() + { + echo 'sss'; + } + + public function notifyAllUser() + { + + } + +} diff --git a/webapp/index.php b/webapp/index.php new file mode 100644 index 0000000..2830c63 --- /dev/null +++ b/webapp/index.php @@ -0,0 +1,24 @@ +$a();'); +} catch (Exception $e){ + echo($e); +} diff --git a/webapp/phpcommon b/webapp/phpcommon new file mode 120000 index 0000000..0ee1d84 --- /dev/null +++ b/webapp/phpcommon @@ -0,0 +1 @@ +../third_party/phpcommon/ \ No newline at end of file