From 996ed300f5c06e7ea325a1c159f510d8453a79fc Mon Sep 17 00:00:00 2001 From: xuanchen <122383162@qq.com> Date: Mon, 28 Sep 2020 15:10:02 +0800 Subject: [PATCH] =?UTF-8?q?=E9=98=B6=E6=AE=B5=E6=80=A7=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=EF=BC=8C=E6=B2=A1=E6=9C=89=E5=AE=9E=E8=B4=A8=E6=80=A7=E7=9A=84?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/Finance/CensusController.php | 7 +- app/Api/Controllers/UserController.php | 10 +- app/Http/Controllers/TestController.php | 4 +- app/Models/User.php | 16 +- config/unionpay.php | 131 ++++++++ config/xuanchen_coupon.php | 2 +- packages/coupon/config/xuanchen_coupon.php | 2 +- packages/sinopec/composer.json | 27 ++ packages/sinopec/config/xuanchen_coupon.php | 15 + packages/sinopec/src/Action/Init.php | 197 ++++++++++++ packages/sinopec/src/Action/PinganAction.php | 55 ++++ packages/sinopec/src/Action/SinopecAction.php | 73 +++++ packages/sinopec/src/Action/YsdAction.php | 91 ++++++ .../sinopec/src/Action/pingan/PingAnInit.php | 205 ++++++++++++ packages/sinopec/src/Action/pingan/Query.php | 45 +++ .../src/Action/pingan/Verification.php | 298 ++++++++++++++++++ .../sinopec/src/Action/sinopec/ZhyCreate.php | 81 +++++ .../sinopec/src/Action/sinopec/ZhyQuery.php | 81 +++++ .../sinopec/src/Action/ysd/YsdDestroy.php | 61 ++++ packages/sinopec/src/Action/ysd/YsdGrant.php | 59 ++++ packages/sinopec/src/Action/ysd/YsdQuery.php | 51 +++ .../src/Action/ysd/YsdVerification.php | 195 ++++++++++++ .../src/Contracts/CheckCouponContracts.php | 14 + .../sinopec/src/Contracts/CouponContracts.php | 30 ++ packages/sinopec/src/Coupon.php | 144 +++++++++ packages/sinopec/src/ServiceProvider.php | 31 ++ packages/sinopec/src/Traits/Log.php | 47 +++ packages/sinopec/src/Traits/SetParams.php | 79 +++++ packages/unionpay/composer.json | 27 ++ packages/unionpay/config/unionpay.php | 14 + packages/unionpay/src/Action/Init.php | 69 ++++ packages/unionpay/src/Action/Query.php | 50 +++ .../unionpay/src/Action/UnionPayAction.php | 90 ++++++ packages/unionpay/src/Action/Verification.php | 194 ++++++++++++ .../src/Contracts/CheckCouponContracts.php | 14 + .../src/Contracts/CouponContracts.php | 30 ++ packages/unionpay/src/ServiceProvider.php | 31 ++ packages/unionpay/src/Traits/Log.php | 47 +++ packages/unionpay/src/UnionPay.php | 149 +++++++++ ...7814b8e2c600a6d375f37e88a9dc03f549bbea.php | 83 ----- ...c056b604351e0d923fe2c65734008322071f33.php | 36 --- ...01773cc50146df7b50b9519152bf76f2e9be1d.php | 29 -- ...1791cc8e988d93c8fe42f5501609f1bcb90ba0.php | 67 ---- ...1a9a628ef948ea2d6eb08062c5d200b36412e1.php | 15 - ...16f3416f2d1a202acbaa0444fe12d8848515da.php | 31 -- ...bd2a8a9168e8e602ed60969606e01873ff7dc0.php | 32 -- ...2619e39fa47c5651c51c607d946c9526d20255.php | 5 - ...2ab2234f1564c81dced8326152a186de8c3a51.php | 5 - ...45955a84e6a03891c007da99793c14c2d7579b.php | 56 ---- ...ea16797fa7064bbd64adeba88a07880d59dfac.php | 14 - ...337bf186f54edadbbb71f831ed6469155951c5.php | 6 - ...de8610abd9767ef7aa4f231b5843c10de5406f.php | 62 ---- ...59b6eeb71ef78df861dbfb49cf0ce1d19c3ead.php | 20 -- ...bd34660972d8680ceaf8434cf399e64a20f19e.php | 35 -- ...9ddfcf6ac5c6324f9a61abd696dadfa941fa87.php | 14 - ...3520a825114c02248a43124c589797daebc0ba.php | 15 - ...ffc9b53ba80eababa2ec2f0ac9633a5ca1ebb5.php | 21 -- ...01dcce4f4dd10c1957c2bf09ffbf63af3bd40e.php | 75 ----- ...2a74c554976a198bfb25103d830411cb55be60.php | 5 - ...23b7a0f1450075c7dc369f8fe0fedeb0a17711.php | 139 -------- ...a17271d0aee880c9f5d95c83bfea3deb282efb.php | 6 - ...770dac8434c40b1d64577647259648e0ab64d7.php | 17 - ...f9bcd0d36b367e1324cfee4e5690cd31f9e806.php | 21 -- ...23120a2c883f51b58b9269c60e78b4ed87363a.php | 40 --- ...579146699ce73739ebd0ab1f15346a7448ba2b.php | 39 --- ...33bba7fa5d462b9bd9328a0a9cccaf88a0140a.php | 59 ---- ...46c7bb58b0e2a7b5354bf385b6ef2e25e5ee30.php | 99 ------ ...64c95c1511b05bc31e835bba7992f6532ac3e3.php | 14 - ...f67c81269667a4b56e738a19df4da65ab9d9ea.php | 37 --- ...b58acc6c50c0878363ee6eaa18db5e12517ce8.php | 97 ------ ...f5590dd1e2e3c6edef5ee0c1a2cee38e982e61.php | 49 --- ...846184b0bdd99d31042eabf0582ef4c530e25b.php | 6 - ...6280b8a37bf115bc4f6f0669ce9c426ae41056.php | 22 -- ...f060a233a6480650d1ae30d45549909ff0c96c.php | 74 ----- ...11f8f183bbdbb99d29764565369b58b4699789.php | 35 -- ...6340d22370b810783bebb185c2bd7b27a08c3a.php | 24 -- ...80c4b630ff07054ce37b5d00dd950311d693aa.php | 13 - ...f4fc5f7146b7c8815e68c33383ad0e058cab64.php | 26 -- ...0c9cc5d234bbbbb8d24370f4097c1d11b96f6d.php | 3 - ...2aaeb06a6bb77b07bd118106d603bc942b9720.php | 16 - ...f449516e6bd5926531a3532747d8f534512d1a.php | 2 - ...615e9db181eafa38c5c901f96db6495af06911.php | 54 ---- ...08c68f26badcc92e3f4b0857d7c68b32867047.php | 63 ---- ...516f0e511764356ea8aa80e61897011d539c92.php | 41 --- ...203d9fd5cddc9beaafe3951f959f76e0a3e8fd.php | 22 -- ...45443f435369432578cee33f54b26334aa2ed6.php | 9 - ...c154b31e64489e508086ab463d103a16ba45da.php | 5 - ...a3446350abc602dff0bfa8e7b518e3e183ddeb.php | 13 - ...bec90ced309209a10c923e3bbcb83724809aef.php | 22 -- ...c6c62da5833c60e2ca4377ece54617bb1b4300.php | 50 --- ...b92a2eff9d2d1f36ca2cc57bc4f6e760a90053.php | 38 --- ...200739c80ad261e0f1ffbf39c3f910650b04c9.php | 18 -- ...d826d834342e1d624accaf1a7fb4beda2206db.php | 8 - ...bf18a9309f3055ea40ab0da285de1b3c6f3194.php | 15 - ...f1096d01189b3cff30cf8f4d976eb3fa89f812.php | 29 -- ...0893336a1c423439a4471369f55a1b74b9fe96.php | 15 - ...95e2baa00341e0686e163a2ff94d09e6953f31.php | 105 ------ ...b31cc4d471a732a3a32fcdaf2e19cbf5816123.php | 5 - ...26dfff3ea44e0da76fe4431245f539530df480.php | 9 - ...d7e431810d967d760691a4621b62625bc35993.php | 8 - ...90dbc92efa6958eef76e40990b4beff6263b2a.php | 27 -- ...0d0075d2bd84874113102b4f8bb21f529f3705.php | 32 -- ...a9a527f9e8ee7424e30d095b1981e0cfc10a9c.php | 58 ---- ...93ee8e68257c706d6c58154b87c3786859d5af.php | 28 -- ...d92e0e43c35144b8c3264c82f33a72c18d505e.php | 33 -- ...330ade4373b44ab9f8d7c80359cf8ac976f0bf.php | 79 ----- ...29d1f291c75b92f49f8f367f245c848cb9402c.php | 6 - ...92959b06d169706bd5349e705d4313c9b78bac.php | 21 -- ...ae94fe840fdc4c78cea053fb34c27dc9cfa2a9.php | 3 - ...b816fa47d94e1b001ef21839d85312495d19a4.php | 6 - ...347a6061f4892f392bad667d4682054aa3c9e7.php | 146 --------- ...3607b80ddf18243a4aa231ba2e236e8260444b.php | 10 - ...e7b0bc0e3ee1c8e386d8b5fcb8abb1dd31a447.php | 6 - ...25d2a8181b4595a0746365ddab2a9d7e3ba114.php | 22 -- ...880137936e7893d9d73b4997ad9df6b621d502.php | 105 ------ ...692515eefd248b18f054ec9d2a65f44df957d0.php | 20 -- ...bc8d866f6b138c45d0663fff18d6454e249e1f.php | 20 -- ...cd71ff7b91555866377e415784033c5e0dd7fc.php | 22 -- ...2a33984ce353f65b02df48aa8bc23e693c1a7b.php | 8 - 119 files changed, 2745 insertions(+), 2666 deletions(-) create mode 100644 config/unionpay.php create mode 100644 packages/sinopec/composer.json create mode 100644 packages/sinopec/config/xuanchen_coupon.php create mode 100644 packages/sinopec/src/Action/Init.php create mode 100644 packages/sinopec/src/Action/PinganAction.php create mode 100644 packages/sinopec/src/Action/SinopecAction.php create mode 100644 packages/sinopec/src/Action/YsdAction.php create mode 100644 packages/sinopec/src/Action/pingan/PingAnInit.php create mode 100644 packages/sinopec/src/Action/pingan/Query.php create mode 100644 packages/sinopec/src/Action/pingan/Verification.php create mode 100644 packages/sinopec/src/Action/sinopec/ZhyCreate.php create mode 100644 packages/sinopec/src/Action/sinopec/ZhyQuery.php create mode 100644 packages/sinopec/src/Action/ysd/YsdDestroy.php create mode 100644 packages/sinopec/src/Action/ysd/YsdGrant.php create mode 100644 packages/sinopec/src/Action/ysd/YsdQuery.php create mode 100644 packages/sinopec/src/Action/ysd/YsdVerification.php create mode 100644 packages/sinopec/src/Contracts/CheckCouponContracts.php create mode 100644 packages/sinopec/src/Contracts/CouponContracts.php create mode 100644 packages/sinopec/src/Coupon.php create mode 100644 packages/sinopec/src/ServiceProvider.php create mode 100644 packages/sinopec/src/Traits/Log.php create mode 100644 packages/sinopec/src/Traits/SetParams.php create mode 100644 packages/unionpay/composer.json create mode 100644 packages/unionpay/config/unionpay.php create mode 100644 packages/unionpay/src/Action/Init.php create mode 100644 packages/unionpay/src/Action/Query.php create mode 100644 packages/unionpay/src/Action/UnionPayAction.php create mode 100644 packages/unionpay/src/Action/Verification.php create mode 100644 packages/unionpay/src/Contracts/CheckCouponContracts.php create mode 100644 packages/unionpay/src/Contracts/CouponContracts.php create mode 100644 packages/unionpay/src/ServiceProvider.php create mode 100644 packages/unionpay/src/Traits/Log.php create mode 100644 packages/unionpay/src/UnionPay.php delete mode 100644 storage/framework/views/007814b8e2c600a6d375f37e88a9dc03f549bbea.php delete mode 100644 storage/framework/views/01c056b604351e0d923fe2c65734008322071f33.php delete mode 100644 storage/framework/views/0301773cc50146df7b50b9519152bf76f2e9be1d.php delete mode 100644 storage/framework/views/041791cc8e988d93c8fe42f5501609f1bcb90ba0.php delete mode 100644 storage/framework/views/141a9a628ef948ea2d6eb08062c5d200b36412e1.php delete mode 100644 storage/framework/views/1616f3416f2d1a202acbaa0444fe12d8848515da.php delete mode 100644 storage/framework/views/21bd2a8a9168e8e602ed60969606e01873ff7dc0.php delete mode 100644 storage/framework/views/242619e39fa47c5651c51c607d946c9526d20255.php delete mode 100644 storage/framework/views/242ab2234f1564c81dced8326152a186de8c3a51.php delete mode 100644 storage/framework/views/2545955a84e6a03891c007da99793c14c2d7579b.php delete mode 100644 storage/framework/views/27ea16797fa7064bbd64adeba88a07880d59dfac.php delete mode 100644 storage/framework/views/2e337bf186f54edadbbb71f831ed6469155951c5.php delete mode 100644 storage/framework/views/33de8610abd9767ef7aa4f231b5843c10de5406f.php delete mode 100644 storage/framework/views/3459b6eeb71ef78df861dbfb49cf0ce1d19c3ead.php delete mode 100644 storage/framework/views/38bd34660972d8680ceaf8434cf399e64a20f19e.php delete mode 100644 storage/framework/views/399ddfcf6ac5c6324f9a61abd696dadfa941fa87.php delete mode 100644 storage/framework/views/3c3520a825114c02248a43124c589797daebc0ba.php delete mode 100644 storage/framework/views/3dffc9b53ba80eababa2ec2f0ac9633a5ca1ebb5.php delete mode 100644 storage/framework/views/4101dcce4f4dd10c1957c2bf09ffbf63af3bd40e.php delete mode 100644 storage/framework/views/432a74c554976a198bfb25103d830411cb55be60.php delete mode 100644 storage/framework/views/4423b7a0f1450075c7dc369f8fe0fedeb0a17711.php delete mode 100644 storage/framework/views/44a17271d0aee880c9f5d95c83bfea3deb282efb.php delete mode 100644 storage/framework/views/45770dac8434c40b1d64577647259648e0ab64d7.php delete mode 100644 storage/framework/views/45f9bcd0d36b367e1324cfee4e5690cd31f9e806.php delete mode 100644 storage/framework/views/4823120a2c883f51b58b9269c60e78b4ed87363a.php delete mode 100644 storage/framework/views/49579146699ce73739ebd0ab1f15346a7448ba2b.php delete mode 100644 storage/framework/views/4b33bba7fa5d462b9bd9328a0a9cccaf88a0140a.php delete mode 100644 storage/framework/views/4e46c7bb58b0e2a7b5354bf385b6ef2e25e5ee30.php delete mode 100644 storage/framework/views/4f64c95c1511b05bc31e835bba7992f6532ac3e3.php delete mode 100644 storage/framework/views/55f67c81269667a4b56e738a19df4da65ab9d9ea.php delete mode 100644 storage/framework/views/56b58acc6c50c0878363ee6eaa18db5e12517ce8.php delete mode 100644 storage/framework/views/56f5590dd1e2e3c6edef5ee0c1a2cee38e982e61.php delete mode 100644 storage/framework/views/57846184b0bdd99d31042eabf0582ef4c530e25b.php delete mode 100644 storage/framework/views/5b6280b8a37bf115bc4f6f0669ce9c426ae41056.php delete mode 100644 storage/framework/views/5cf060a233a6480650d1ae30d45549909ff0c96c.php delete mode 100644 storage/framework/views/6011f8f183bbdbb99d29764565369b58b4699789.php delete mode 100644 storage/framework/views/616340d22370b810783bebb185c2bd7b27a08c3a.php delete mode 100644 storage/framework/views/6180c4b630ff07054ce37b5d00dd950311d693aa.php delete mode 100644 storage/framework/views/61f4fc5f7146b7c8815e68c33383ad0e058cab64.php delete mode 100644 storage/framework/views/620c9cc5d234bbbbb8d24370f4097c1d11b96f6d.php delete mode 100644 storage/framework/views/632aaeb06a6bb77b07bd118106d603bc942b9720.php delete mode 100644 storage/framework/views/64f449516e6bd5926531a3532747d8f534512d1a.php delete mode 100644 storage/framework/views/65615e9db181eafa38c5c901f96db6495af06911.php delete mode 100644 storage/framework/views/6b08c68f26badcc92e3f4b0857d7c68b32867047.php delete mode 100644 storage/framework/views/6d516f0e511764356ea8aa80e61897011d539c92.php delete mode 100644 storage/framework/views/6f203d9fd5cddc9beaafe3951f959f76e0a3e8fd.php delete mode 100644 storage/framework/views/7d45443f435369432578cee33f54b26334aa2ed6.php delete mode 100644 storage/framework/views/7dc154b31e64489e508086ab463d103a16ba45da.php delete mode 100644 storage/framework/views/82a3446350abc602dff0bfa8e7b518e3e183ddeb.php delete mode 100644 storage/framework/views/84bec90ced309209a10c923e3bbcb83724809aef.php delete mode 100644 storage/framework/views/88c6c62da5833c60e2ca4377ece54617bb1b4300.php delete mode 100644 storage/framework/views/8ab92a2eff9d2d1f36ca2cc57bc4f6e760a90053.php delete mode 100644 storage/framework/views/8b200739c80ad261e0f1ffbf39c3f910650b04c9.php delete mode 100644 storage/framework/views/90d826d834342e1d624accaf1a7fb4beda2206db.php delete mode 100644 storage/framework/views/9fbf18a9309f3055ea40ab0da285de1b3c6f3194.php delete mode 100644 storage/framework/views/a4f1096d01189b3cff30cf8f4d976eb3fa89f812.php delete mode 100644 storage/framework/views/a90893336a1c423439a4471369f55a1b74b9fe96.php delete mode 100644 storage/framework/views/a995e2baa00341e0686e163a2ff94d09e6953f31.php delete mode 100644 storage/framework/views/aab31cc4d471a732a3a32fcdaf2e19cbf5816123.php delete mode 100644 storage/framework/views/ac26dfff3ea44e0da76fe4431245f539530df480.php delete mode 100644 storage/framework/views/b1d7e431810d967d760691a4621b62625bc35993.php delete mode 100644 storage/framework/views/b690dbc92efa6958eef76e40990b4beff6263b2a.php delete mode 100644 storage/framework/views/b90d0075d2bd84874113102b4f8bb21f529f3705.php delete mode 100644 storage/framework/views/bca9a527f9e8ee7424e30d095b1981e0cfc10a9c.php delete mode 100644 storage/framework/views/bf93ee8e68257c706d6c58154b87c3786859d5af.php delete mode 100644 storage/framework/views/c0d92e0e43c35144b8c3264c82f33a72c18d505e.php delete mode 100644 storage/framework/views/c1330ade4373b44ab9f8d7c80359cf8ac976f0bf.php delete mode 100644 storage/framework/views/c829d1f291c75b92f49f8f367f245c848cb9402c.php delete mode 100644 storage/framework/views/cd92959b06d169706bd5349e705d4313c9b78bac.php delete mode 100644 storage/framework/views/ddae94fe840fdc4c78cea053fb34c27dc9cfa2a9.php delete mode 100644 storage/framework/views/deb816fa47d94e1b001ef21839d85312495d19a4.php delete mode 100644 storage/framework/views/e1347a6061f4892f392bad667d4682054aa3c9e7.php delete mode 100644 storage/framework/views/e23607b80ddf18243a4aa231ba2e236e8260444b.php delete mode 100644 storage/framework/views/e6e7b0bc0e3ee1c8e386d8b5fcb8abb1dd31a447.php delete mode 100644 storage/framework/views/e925d2a8181b4595a0746365ddab2a9d7e3ba114.php delete mode 100644 storage/framework/views/ea880137936e7893d9d73b4997ad9df6b621d502.php delete mode 100644 storage/framework/views/f3692515eefd248b18f054ec9d2a65f44df957d0.php delete mode 100644 storage/framework/views/f7bc8d866f6b138c45d0663fff18d6454e249e1f.php delete mode 100644 storage/framework/views/fbcd71ff7b91555866377e415784033c5e0dd7fc.php delete mode 100644 storage/framework/views/ff2a33984ce353f65b02df48aa8bc23e693c1a7b.php diff --git a/app/Admin/Controllers/Finance/CensusController.php b/app/Admin/Controllers/Finance/CensusController.php index 7445cac..4cca85c 100644 --- a/app/Admin/Controllers/Finance/CensusController.php +++ b/app/Admin/Controllers/Finance/CensusController.php @@ -47,9 +47,10 @@ class CensusController extends AdminController { $grid = new Grid(new User); - $grid->model()->whereHas('identity', function ($q) { - $q->where('identity_id', 1); - }); + $grid->model() + ->whereHas('identity', function ($q) { + $q->where('identity_id', 1); + }); $grid->disableCreateButton(); $grid->disableBatchActions(); diff --git a/app/Api/Controllers/UserController.php b/app/Api/Controllers/UserController.php index 0a2b73c..dcc4981 100644 --- a/app/Api/Controllers/UserController.php +++ b/app/Api/Controllers/UserController.php @@ -4,7 +4,7 @@ namespace App\Api\Controllers; use App\Models\User; use Illuminate\Http\Request; -use XuanChen\Coupon\Coupon; +use XuanChen\Coupon\UnionPay; class UserController extends Controller { @@ -63,7 +63,7 @@ class UserController extends Controller return $this->error($validator->errors()->first(), $log); } - $res = Coupon::Grant($res['activityId'], $res['outletId'], $res['mobile']); + $res = UnionPay::Grant($res['activityId'], $res['outletId'], $res['mobile']); if (is_string($res)) { return $this->error($res, $log); @@ -106,7 +106,7 @@ class UserController extends Controller $redemptionCode = $res['redemptionCode']; $outletId = $res['outletId']; - $res = Coupon::Query($redemptionCode, $outletId); + $res = UnionPay::Query($redemptionCode, $outletId); if (is_string($res)) { return $this->error($res, $log); @@ -141,7 +141,7 @@ class UserController extends Controller $redemptionCode = $res['redemptionCode']; $outletId = $res['outletId']; - $res = Coupon::Destroy($redemptionCode, $outletId); + $res = UnionPay::Destroy($redemptionCode, $outletId); if ($res !== true) { return $this->error($res, $log); @@ -188,7 +188,7 @@ class UserController extends Controller $redemptionCode = trim($redemptionCode); $outletId = trim($outletId); - $coupon = Coupon::Redemption($this->user, $redemptionCode, $total, $outletId, $orderid); + $coupon = UnionPay::Redemption($this->user, $redemptionCode, $total, $outletId, $orderid); if (is_string($coupon)) { return $this->error($coupon, $log); } diff --git a/app/Http/Controllers/TestController.php b/app/Http/Controllers/TestController.php index a827a6d..94eb6f9 100644 --- a/app/Http/Controllers/TestController.php +++ b/app/Http/Controllers/TestController.php @@ -7,7 +7,7 @@ use SelfCoupon; use App\Models\User; use GuzzleHttp\Client; use Illuminate\Http\Request; -use XuanChen\Coupon\Coupon; +use XuanChen\Coupon\UnionPay; // use Wo; @@ -179,7 +179,7 @@ class TestController $total = $request->total; $outletId = $request->outletId; $orderid = $request->orderid ?? ''; - $res = Coupon::Redemption($this->user, $redemptionCode, $total, $outletId, $orderid); + $res = UnionPay::Redemption($this->user, $redemptionCode, $total, $outletId, $orderid); if (is_string($res)) { return $this->error($res); diff --git a/app/Models/User.php b/app/Models/User.php index ba7474d..76a3cbe 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -16,14 +16,12 @@ class User extends Authenticatable /** * The attributes that are mass assignable. - * * @var array */ protected $guarded = []; /** * The attributes that should be hidden for arrays. - * * @var array */ protected $hidden = [ @@ -91,7 +89,7 @@ class User extends Authenticatable /** * Notes: 密码加密 * @Author: - * @Date: 2019/9/6 11:37 + * @Date : 2019/9/6 11:37 * @param $password */ protected function setPasswordAttribute($password) @@ -129,12 +127,12 @@ class User extends Authenticatable public function getCouponCount($type, $date = '') { return $this->coupons() - ->whereIn('status', [2]) - ->where('thirdPartyGoodsId', $type) - ->when($date, function ($q) { - $q->whereDate('created_at', now()->format('Y-m-d')); - }) - ->count(); + ->whereIn('status', [2]) + ->where('thirdPartyGoodsId', $type) + ->when($date, function ($q) { + $q->whereDate('created_at', now()->format('Y-m-d')); + }) + ->count(); } } diff --git a/config/unionpay.php b/config/unionpay.php new file mode 100644 index 0000000..2398cd9 --- /dev/null +++ b/config/unionpay.php @@ -0,0 +1,131 @@ + [ + 'self' => [ + 'private' => storage_path('cert/self/private_rsa.pem'), + 'public' => storage_path('cert/self/public_rsa.pem'), + ], + 'unionpay' => [ + 'public' => storage_path('cert/unionpay/public_rsa.pem'), + ], + ], + 'fields' => [ + 'query' => [ + 'in' => [ + "msg_type" => "报文类型", + "msg_txn_code" => "交易代码", + "msg_crrltn_id" => "报文流水号", + "msg_flg" => "报文请求应答标志", + "msg_sender" => "报文发送方", + "msg_time" => "报文日期", + "msg_ver" => "报文版本号", + "req_serial_no" => "查询流水号", + "shop_no" => "门店号", + "term_no" => "受理终端号", + "service_code" => "受理方式", + "voucher_no" => "受理凭证号", + "mkt_code" => "聚合营销码", + "mkt_mode" => "聚合营销类型", + "embedded_mchnt_no" => "发起渠道商户号", + "currency_code" => "货币代码", + "amount" => "消费金额", + "avl_amt" => "可优惠金额", + "term_sp_chnl_no" => "终端指定SP渠道号", + "func_code" => "功能码", + "times" => "次数", + "pay_mode" => "支付方式", + //用户附加信息 + "user_ext_info" => [ + "mobile_no" => "手机号", + "user_code" => "用户号", + "user_code_type" => "用户号类型", + "dev_id" => "设备id", + ], + "sign" => " 签名域", + ], + 'out' => [ + "msg_type" => "报文类型", + "msg_txn_code" => "交易代码", + "msg_crrltn_id" => "报文流水号", + "msg_flg" => "报文请求应答标志", + "msg_sender" => "报文发送方", + "msg_time" => "报文日期", + "msg_sys_sn" => "平台流水号", + "msg_rsp_code" => "响应码", + "msg_rsp_desc" => "响应码描述", + "discount" => "折扣金额", + "actual_amt" => "折后应收金额", + "pos_display" => "POS显示", + "pos_receipt" => "POS小票", + "pos_ad" => "POS广告", + "pos_mkt_ad" => "Pos_营销联盟广告", + "sign" => "签名域", + ] + ], + 'freezecoupon' => [ + 'in' => [ + "msg_type" => "报文类型", + "msg_txn_code" => "交易代码", + "msg_crrltn_id" => "消息关联号", + "msg_flg" => "报文请求应答标志", + "msg_sender" => "报文发送方", + "msg_time" => "报文日期", + "msg_sys_sn" => "平台流水号", + "msg_ver" => "报文版本号", + "shop_no" => "门店号", + "term_no" => "终端号", + "req_serial_no" => "销券流水号", + "orig_req_serial_no" => "原查询流水号", + "enc_card_no" => "加密卡号", + "part_card_no" => "部分卡号", + "acq_term_sn" => "受理终端流水号", + "refer_no" => "检索参考号", + "sett_date" => "清算日期", + "txn_date" => "交易日期", + "txn_time" => "交易时间", + "orig_amt" => "原始金额", + "discount_amt" => "优惠的金额", + "pay_amt" => "支付金额", + "pay_mode" => "支付方式", + "order_no" => "订单号", + "trans_crrltn_no" => "交易关联流水号", + "equity_no" => "权益号", + "card_no" => "全卡号", + "sign" => "签名数据", + ], + 'out' => [ + "msg_type" => "报文类型", + "msg_txn_code" => "交易代码", + "msg_crrltn_id" => "消息关联号", + "msg_flg" => "报文请求应答标志", + "msg_sender" => "报文发送方", + "msg_time" => "报文日期", + "msg_sys_sn" => "平台流水号", + "msg_ver" => "报文版本号", + "msg_rsp_code" => "响应码", + "msg_rsp_desc" => "响应码描述", + "orig_amt" => "原始金额", + "discount_amt" => "折扣金额", + "pay_amt" => "支付金额", + "serv_chg" => "服务费", + "commission" => "佣金", + "ad" => "广告", + "pos_receipt" => "POS优惠", + "coupon_no" => "凭证号", + "coupon_type" => "凭证类型", + "sp_biz_code" => "SP统计码", + "charge_code" => "计费码", + "pos_event_title" => "SP活动主题", + "sp_contact" => "SP联系电话", + "sp_name" => "SP名称", + "event_no" => "活动号", + "td_code" => "二维码", + "memo" => "附言", + "mkt_sp_chnl_no" => "营销渠道号", + "point_amt" => "积分抵扣金额", + "sign" => "签名数据", + ] + ], + ] +]; diff --git a/config/xuanchen_coupon.php b/config/xuanchen_coupon.php index ed94d03..1538da7 100644 --- a/config/xuanchen_coupon.php +++ b/config/xuanchen_coupon.php @@ -6,7 +6,7 @@ return [ 'ysd' => [ // 'pattern' => '/^YSD\d{12}/', 'pattern' => '/^YSD/', - 'model' => \XuanChen\Coupon\Action\YsdAction::class, + 'model' => \XuanChen\Coupon\Action\UnionPayAction::class, ], 'pingan' => [ 'pattern' => '/^\d{12}$/', diff --git a/packages/coupon/config/xuanchen_coupon.php b/packages/coupon/config/xuanchen_coupon.php index ee27158..16895ae 100644 --- a/packages/coupon/config/xuanchen_coupon.php +++ b/packages/coupon/config/xuanchen_coupon.php @@ -9,7 +9,7 @@ return [ ], 'ysd' => [ 'pattern' => '/^YSD/', - 'model' => \XuanChen\Coupon\Action\YsdAction::class, + 'model' => \XuanChen\Coupon\Action\UnionPayAction::class, ], ], ]; diff --git a/packages/sinopec/composer.json b/packages/sinopec/composer.json new file mode 100644 index 0000000..ac5e154 --- /dev/null +++ b/packages/sinopec/composer.json @@ -0,0 +1,27 @@ +{ + "name": "xuanchen/coupon", + "description": "卡券相关", + "license": "MIT", + "authors": [ + { + "name": "玄尘", + "email": "122383162@qq.com" + } + ], + "require": { + "php": ">=7.1.3", + "laravel/framework": "*" + }, + "autoload": { + "psr-0": { + "XuanChen\\Coupon": "src/" + } + }, + "extra": { + "laravel": { + "providers": [ + "XuanChen\\Coupon\\ServiceProvider" + ] + } + } +} diff --git a/packages/sinopec/config/xuanchen_coupon.php b/packages/sinopec/config/xuanchen_coupon.php new file mode 100644 index 0000000..16895ae --- /dev/null +++ b/packages/sinopec/config/xuanchen_coupon.php @@ -0,0 +1,15 @@ + \App\Models\Coupon::class, + 'rules' => [ + 'pingan' => [ + 'pattern' => '/^\d{12}$/', + 'model' => \XuanChen\Coupon\Action\PinganAction::class, + ], + 'ysd' => [ + 'pattern' => '/^YSD/', + 'model' => \XuanChen\Coupon\Action\UnionPayAction::class, + ], + ], +]; diff --git a/packages/sinopec/src/Action/Init.php b/packages/sinopec/src/Action/Init.php new file mode 100644 index 0000000..5e37cdb --- /dev/null +++ b/packages/sinopec/src/Action/Init.php @@ -0,0 +1,197 @@ +user = $user; + + return $this; + } + + //设置渠道 + public function setOrderId($orderid) + { + $this->orderid = $orderid; + + return $this; + } + + //设置核销码 + public function setCode($redemptionCode) + { + $this->redemptionCode = $redemptionCode; + + return $this; + + } + + //设置订单总额 + public function setTotal($total) + { + $this->total = $total; + + return $this; + + } + + //设置网点id + public function setOutletId($outletId) + { + $this->outletId = $outletId; + + return $this; + + } + + //设置活动id + public function setActivityId($activityId) + { + $this->activityId = $activityId; + + return $this; + + } + + //设置手机号 + public function setMobile($mobile) + { + $this->mobile = $mobile; + + return $this; + + } + + /** + * Notes: 插入日志 + * @Author: 玄尘 + * @Date : 2020/6/30 10:29 + * @param $url + * @param $method + * @param $params + * @param string $type + * @return mixed + */ + public function createLog($url, $method, $params, $type = 'pingan') + { + $data = [ + 'path' => $url, + 'method' => $method, + 'type' => $type, + 'in_source' => $params, + ]; + + $info = LogModel::create($data); + + return $info; + } + + /** + * Notes: 更新日志 + * @Author: 玄尘 + * @Date : 2020/6/30 10:29 + * @param $log + * @param $params + */ + public static function updateLog($log, $params) + { + $log->out_source = $params; + $log->save(); + } + + //统一门店 相同金额 3分钟之内看作是一笔订单 + public function CheckCount() + { + if ($this->queryData) { + if (isset($this->queryData['thirdPartyGoodsId']) && $this->queryData['thirdPartyGoodsId'] == 'YSD-full0-0') { + return true; + } + } + + if ($this->orderid) { + $check_count = Coupon::where('orderid', $this->orderid) + ->where('outletId', $this->outletId) + ->where('total', $this->total) + ->where('status', 2) + ->where('created_at', '>=', now()->subMinutes(3)->format('Y-m-d H:i:s')) + ->count(); + } else { + $check_count = Coupon::where('outletId', $this->outletId) + ->where('total', $this->total) + ->where('status', 2) + ->where('created_at', '>=', now()->subMinutes(3)->format('Y-m-d H:i:s')) + ->count(); + } + + $count = floor($this->total / 100); + + if ($check_count > 0) { +// if ($this->total < 100) { + // return '核销失败,订单金额少于100只能核销一张优惠券。'; + // } + if ($check_count >= $count) { + return "核销失败,此订单您只能使用 {$count} 张优惠券"; + } + } + + return true; + } + + /** + * Notes: 校验是否已经核销过 + * @Author: 玄尘 + * @Date : 2020/8/8 13:43 + */ + public function HasCheck() + { + $info = Coupon::where('redemptionCode', $this->redemptionCode) + ->where('outletId', $this->outletId) + ->where('total', $this->total) + ->where('status', 2) + ->first(); + if ($info) { + return '核销失败,此优惠券已被使用'; + } + + return false; + + } + +} diff --git a/packages/sinopec/src/Action/PinganAction.php b/packages/sinopec/src/Action/PinganAction.php new file mode 100644 index 0000000..8dc68b1 --- /dev/null +++ b/packages/sinopec/src/Action/PinganAction.php @@ -0,0 +1,55 @@ +setCode($this->redemptionCode) + ->setUser($this->user) + ->setOutletId($this->outletId) + ->setTotal($this->total) + ->setOrderId($this->orderid) + ->start(); + } + + /** + * Notes: 查询卡券详情 + * @Author: 玄尘 + * @Date : 2020/6/29 15:15 + * @return mixed + */ + public function detail() + { + $info = (new Query)->setOutletId($this->outletId) + ->setCode($this->redemptionCode) + ->start(); + + return $info; + } + + //发券 + function grant() + { + return '没这个接口'; + } + + //作废 + function destroy() + { + return '没这个接口'; + } + +} diff --git a/packages/sinopec/src/Action/SinopecAction.php b/packages/sinopec/src/Action/SinopecAction.php new file mode 100644 index 0000000..333b51b --- /dev/null +++ b/packages/sinopec/src/Action/SinopecAction.php @@ -0,0 +1,73 @@ +data = $data; + + return $action->start(); + + + } + + /** + * Notes: 发券接口 + * @Author: 玄尘 + * @Date: 2020/9/23 15:58 + */ + function grant() + { + // TODO: Implement grant() method. + } + + /** + * Notes: 查询接口 + * @Author: 玄尘 + * @Date: 2020/9/23 15:58 + * @return mixed|void + */ + function detail() + { + // TODO: Implement detail() method. + } + + /** + * Notes: 作废接口 + * @Author: 玄尘 + * @Date: 2020/9/23 15:59 + */ + function destroy() + { + // TODO: Implement destroy() method. + } + + /** + * Notes: 核销接口 + * @Author: 玄尘 + * @Date: 2020/9/23 16:00 + * @return mixed|void + */ + function start() + { + // TODO: Implement start() method. + } +} \ No newline at end of file diff --git a/packages/sinopec/src/Action/YsdAction.php b/packages/sinopec/src/Action/YsdAction.php new file mode 100644 index 0000000..6817c8d --- /dev/null +++ b/packages/sinopec/src/Action/YsdAction.php @@ -0,0 +1,91 @@ +setActivityId($this->activityId) + ->setOutletId($this->outletId) + ->setMobile($this->mobile) + ->start(); + } + + /** + * Notes: 查询卡券详情 + * @Author: 玄尘 + * @Date : 2020/6/29 15:15 + * @return mixed + */ + public function detail() + { + $query_coupon = (new YsdQuery)->setOutletId($this->outletId) + ->setCode($this->redemptionCode) + ->start(); + + if (!is_string($query_coupon)) { + return [ + 'name' => $query_coupon->activity->title, + 'code' => $query_coupon->code, + 'full' => $query_coupon->full, + 'price' => $query_coupon->price, + 'status' => $query_coupon->status, + 'used_at' => (string)$query_coupon->used_at, + 'startTime' => (string)$query_coupon->start_at, + 'endTime' => (string)$query_coupon->end_at, + + ]; + } + + return $query_coupon; + } + + /** + * Notes: 作废 + * @Author: 玄尘 + * @Date : 2020/7/21 11:32 + */ + public function destroy() + { + return $res = (new YsdDestroy)->setCode($this->redemptionCode) + ->setOutletId($this->outletId) + ->start(); + } + + /** + * Notes: 核销执行入口 + * @Author: 玄尘 + * @Date : 2020/6/29 14:49 + * @return mixed + */ + public function start() + { + return $res = (new YsdVerification)->setCode($this->redemptionCode) + ->setUser($this->user) + ->setOutletId($this->outletId) + ->setTotal($this->total) + ->setOrderId($this->orderid) + ->start(); + } + +} diff --git a/packages/sinopec/src/Action/pingan/PingAnInit.php b/packages/sinopec/src/Action/pingan/PingAnInit.php new file mode 100644 index 0000000..1065ac0 --- /dev/null +++ b/packages/sinopec/src/Action/pingan/PingAnInit.php @@ -0,0 +1,205 @@ +this_type = config('pingan.this_type'); + $pingan = config('pingan.' . $this->this_type); + + $this->baseUri = $pingan['Uri']; + $this->tokenUri = $pingan['tokenUri']; + $this->client_id = $pingan['client_id']; + $this->grant_type = $pingan['grant_type']; + $this->userName = $pingan['userName']; + $this->client_secret = $pingan['client_secret']; + $this->aes_code = $pingan['AES_CODE']; + } + + /** + * 获取access_token + * @return void [type] [description] + */ + public function getToken() + { + //从数据库里找token + $token = PinganToken::where('type', $this->this_type)->orderBy('id', 'desc')->first(); + + if ($token) { + $access_token = $token->access_token; + $expires_in = $token->expires_in; + $get_token_time = $token->get_token_time; + $diffMinutes = $get_token_time->diffInMinutes(now(), false); + if ($diffMinutes < $expires_in) { + $this->access_token = $access_token; + } else { + $this->getAjaxToken(); + } + } else { + $this->getAjaxToken(); + } + } + + /** + * 获取毫秒级别的时间戳 + */ + public function getMsecTime() + { + [$msec, $sec] = explode(' ', microtime()); + $msectime = (float)sprintf('%.0f', (floatval($msec) + floatval($sec)) * 1000); + $msectime = explode('.', $msectime); + + return $msectime[0]; + } + + /** + * 请求平台 access_token + * @return void [type] [description] + */ + public function getAjaxToken() + { + $params = [ + 'client_id' => $this->client_id, + 'grant_type' => $this->grant_type, + 'client_secret' => $this->client_secret, + ]; + + try { + $log = $this->createLog($this->tokenUri, 'POST', $params, 'pingan'); + + $client = new Client(); + $response = $client->request('POST', $this->tokenUri, [ + 'form_params' => $params, + ]); + $body = $response->getBody(); + $content = $body->getContents(); + $result = json_decode($content, true); + + $this->updateLog($log, $result); //更新日志 + + if ($result['ret'] > 0) { + $this->error = $result['msg']; + } else { + $data = $result['data']; + PinganToken::create([ + 'type' => $this->this_type, + 'access_token' => $data['access_token'], + 'expires_in' => $data['expires_in'], + 'get_token_time' => now(), + ]); + $this->access_token = $data['access_token']; + $this->error = ''; + } + } catch (RequestException $e) { + $this->error = $e->getMessage(); + $this->updateLog($log, [$this->error]); //更新日志 + } + + } + + /** + * 通用获取数据接口 + * @param [type] $url 请求地址 + * @param array $query 传递参数 + * @param array $json 需要传的json数据 + * @param string $method 方式 + * @return array|mixed [type] [description] + */ + public function getPingAnData($url, $query = [], $json = [], $method = 'POST') + { + $this->getToken(); + + if ($this->error) { + return $this->error; + } + + $postData = [ + 'query' => array_merge([ + 'access_token' => $this->access_token, + 'request_id' => $this->getMsecTime(), + 'userName' => $this->userName, + ], $query), + 'json' => $json, + 'headers' => [ + 'Content-Type' => 'application/json;charset=utf-8', + 'accept' => 'application/json;charset=utf-8', + ], + ]; + + $log = $this->createLog($url, $method, $postData, 'pingan'); //日志 + + try { + $client = new Client(); + $response = $client->request($method, $url, $postData); + $body = $response->getBody(); + $content = $body->getContents(); + $result = json_decode($content, true); + + if ($result['ret'] > 0) { + $retData = $result['msg']; + } else { + $retData = $result['data']; + } + $this->updateLog($log, $retData);//更新日志 + + return $retData; + } catch (RequestException $e) { + $this->updateLog($log, [$e->getMessage()]);//更新日志 + + return ['ret' => '99999', $e->getMessage()]; + } + } + + //加密 + public function encrypt($str) + { + if (is_array($str)) { + $str = json_encode($str); + } + $data = openssl_encrypt($str, 'aes-128-ecb', $this->aes_code, OPENSSL_RAW_DATA); + + return base64_encode($data); + } + + //解密 + public function decrypt($str) + { + $encrypted = base64_decode($str); + + return openssl_decrypt($encrypted, 'aes-128-ecb', $this->aes_code, OPENSSL_RAW_DATA); + } + +} diff --git a/packages/sinopec/src/Action/pingan/Query.php b/packages/sinopec/src/Action/pingan/Query.php new file mode 100644 index 0000000..edd1734 --- /dev/null +++ b/packages/sinopec/src/Action/pingan/Query.php @@ -0,0 +1,45 @@ +outletId)->first(); + + if (!$outlet) { + throw new \Exception('网点编号错误,未查询到网点信息'); + } + + $url = $this->baseUri . 'partner/v2/coupondetail'; + $params = [ + 'redemptionCode' => $this->redemptionCode, + 'outletNo' => $outlet->PaOutletId, + 'thirdOutletNo' => $outlet->outlet_id, + ]; + + $res = $this->getPingAnData($url, $params); + + if (!is_array($res)) { + throw new \Exception($res); + } + + if ($res['code'] != 200) { + throw new \Exception($res['message']); + } + + return collect($res['data']); + } catch (\Exception $e) { + return $e->getMessage(); + } + + } + +} \ No newline at end of file diff --git a/packages/sinopec/src/Action/pingan/Verification.php b/packages/sinopec/src/Action/pingan/Verification.php new file mode 100644 index 0000000..bdcafbb --- /dev/null +++ b/packages/sinopec/src/Action/pingan/Verification.php @@ -0,0 +1,298 @@ +HasCheck(); + if ($res !== false) { + return $res; + } + + //查询卡券信息 + $this->query_coupon = (new Query)->setOutletId($this->outletId) + ->setCode($this->redemptionCode) + ->start(); + if (is_string($this->query_coupon)) { + return $this->query_coupon; + } + + //校验卡券 + $ticket = $this->checkCoupon(); + if (!is_array($ticket)) { + return $ticket; + } + + //检查可核销次数 + $ret = $this->CheckCount(); + if ($ret !== true) { + return $ret; + } + + //增加核销记录 + $coupon = $this->AddCoupon(); + if (is_string($coupon)) { + return $coupon; + } + + try { + $params = [ + 'couponNo' => $coupon->redemptionCode, + 'partnerOrderId' => date('ymdHis') . sprintf("%0" . strlen(999999) . "d", mt_rand(0, 999999)), + 'outletId' => $coupon->PaOutletId, + 'productId' => $coupon->productId, + 'timestamp' => $this->getMsecTime(), + ]; + + $url = $this->baseUri . 'partner/redemption'; + $str = $this->encrypt($params); + $res = $this->getPingAnData($url, [], ['data' => $str]); + + if (!is_array($res)) { + $coupon->remark = $res; + $coupon->status = 3; + $coupon->save(); + throw new \Exception($res); + } + + if ($res['code'] != 200) { + $coupon->remark = $res['code'] . '--' . $res['message']; + $coupon->status = 3; + $coupon->save(); + throw new \Exception($res['message']); + } + + $data = $res['data']; + + $coupon->remark = $data['message']; + $coupon->status = ($data['status'] == 1) ? 2 : 3; + $coupon->save(); + + //返回的数据 + $resdata = [ + 'price' => $coupon->price, + 'name' => $coupon->couponName, + 'total' => $coupon->total, + ]; + + //核销成功 执行分润 + $coupon->profit(); + + return $resdata; + + } catch (Exception $e) { + $coupon->status = 3; + $coupon->remark = '核销失败 ' . $e->getMessage(); + $coupon->save(); + + return $coupon->remark; + } + + } + + /** + * Notes: 如可核销记录 + * @Author: 玄尘 + * @Date : 2020/7/21 15:03 + * @return string + */ + public function AddCoupon() + { + try { + $couponData = [ + 'user_id' => $this->user->id, + 'type' => Coupon::TYPE_PINGAN, + 'outletId' => $this->outletId, + 'orderid' => $this->orderid, + 'PaOutletId' => $this->queryData['PaOutletId'], + 'redemptionCode' => $this->redemptionCode, + 'productId' => $this->queryData['productId'], + 'thirdPartyGoodsId' => $this->queryData['thirdPartyGoodsId'], + 'couponName' => $this->query_coupon['couponName'], + 'price' => $this->ticket['price'], + 'total' => $this->total, + 'profit' => $this->ticket['profit'], + 'status' => 0, + 'startTime' => $this->query_coupon['startTime'], + 'endTime' => $this->query_coupon['endTime'], + ]; + + return $coupon = Coupon::create($couponData); + + } catch (Exception $e) { + return $e->getMessage(); + } + + } + + /** + * Notes: 检查卡券信息 + * @Author: 玄尘 + * @Date : 2020/6/29 16:40 + * @return string + */ + public function checkCoupon() + { + + //检查卡券是否已被核销 + if ($this->query_coupon['status'] > 0) { + if (isset(config('pingan.coupon_status')[$this->query_coupon['status']])) { + return '核销失败,平安券' . config('pingan.coupon_status')[$this->query_coupon['status']]; + } + + return '核销失败,平安券不可用。'; + } + + $startTime = Carbon::parse($this->query_coupon['startTime']); + $endTime = Carbon::parse($this->query_coupon['endTime']); + $now = now(); + + if ($startTime->gt($now)) { + return '核销失败,平安券未开始使用。'; + } + + if ($now->gt($endTime)) { + return '核销失败,平安券已过期。'; + } + + //查找适配的商品id 和 网点id + $pinganData = $this->getPinganProduct(); + + if (is_string($pinganData)) { + return $pinganData; + } + + //获取相关优惠信息 + return $this->checkCode(); + + } + + /** + * 校验平安券编号 + * @return array|string [type] [description] + */ + public function checkCode() + { + $code = $this->user->code->where('code', $this->queryData['thirdPartyGoodsId'])->first(); + if (!$code) { + return "核销失败,未找到此项平安券规则,请联系管理人员检查渠道配置。"; + } + + $ticket = explode('-', $this->queryData['thirdPartyGoodsId']); + + if (!is_array($ticket) || count($ticket) != 3) { + return "核销失败,平安券规则格式不正确。"; + } + + $full = $ticket[1]; //full100 + $price = $ticket[2]; + preg_match('/\d+/', $full, $result); + + if (empty($result) || !is_array($result)) { + return "核销失败,平安券规则格式不正确。"; + } + + if (!is_numeric($this->total)) { + return "核销失败,订单金额必须是数字"; + } + if ($result[0] > $this->total) { + return '核销失败,订单金额不足,平安券不可使用。'; + } + + $this->ticket = [ + 'total' => $result[0], + 'price' => $price, + 'profit' => $code->profit, + ]; + + return $this->ticket; + } + + /** + * 查找平安商品id + * @author 玄尘 2020-04-04 + * @return array|string [type] [description] + */ + public function getPinganProduct() + { + //查询网点是否存在 + $outlet = User::where('outlet_id', $this->outletId)->first(); + + if (!$outlet) { + return '核销失败,网点编号错误,未查询到网点信息'; + } + + $PaOutletId = $outlet->PaOutletId; + $outlet_id = $outlet->outlet_id; + $profitOfferItemVersion = $this->query_coupon['profitOfferItemVersion']; + + if (!$PaOutletId && $profitOfferItemVersion != 1) { + return '核销失败,参数错误,渠道信息缺少平安网点id'; + } + + $productItemList = $this->query_coupon['productItemList']; + + if (!is_array($productItemList) || !is_array($productItemList[0])) { + return '核销失败,平安券数据有误,可能是未配置网点。'; + } + + //循环查找 + $first = ''; + foreach ($productItemList as $key => $item) { + $productId = $item['productId']; + $thirdPartyGoodsId = $item['thirdPartyGoodsId']; + $outletList = $item['outletList']; + if (!is_array($outletList) || !is_array($outletList[0])) { + return '核销失败,网点信息有误!请检查平安券配置信息。'; + break; + } + + $outletList = collect($outletList); + //判断是新版还是旧版 + if ($profitOfferItemVersion) { + //新版通过第三方查询 + $first = $outletList->firstWhere('thirdOutletNo', $outlet_id); + + if ($first) { + break; + } + } else { + //旧版通过平安网点查询 + $first = $outletList->firstWhere('outletNo', $PaOutletId); + if ($first) { + break; + } + } + } + + if (!$first) { + return '核销失败,未找到可用网点信息。'; + } + + if (!$thirdPartyGoodsId) { + return '核销失败,平安券编号规则有误。'; + } + + if (!$productId) { + return '核销失败,未查询到平安券商品id。'; + } + + return $this->queryData = [ + 'thirdPartyGoodsId' => $thirdPartyGoodsId, + 'productId' => $productId, + 'PaOutletId' => $first['outletNo'], + ]; + + } + +} diff --git a/packages/sinopec/src/Action/sinopec/ZhyCreate.php b/packages/sinopec/src/Action/sinopec/ZhyCreate.php new file mode 100644 index 0000000..c599f77 --- /dev/null +++ b/packages/sinopec/src/Action/sinopec/ZhyCreate.php @@ -0,0 +1,81 @@ + "", + "eletronAndRule" => [ + [ + "entryMethod" => "01", + "marketCode" => "20191213154203514", + "marketRuleNumber" => "001", + "perVoucherNumber" => "1", + "planVoucherNumber" => "10", + "queryCreateTime" => "2019-11-11 18=> 39=> 49", + "similarStack" => "Y", + "voucherEndTime" => "2019-12-15", + "voucher_ruleCode" => "$01-VC-1573468710381900", + "voucherRuleName" => "ceshi2", + "voucherSource" => "S01", + "voucherStartTime" => "2019-12-13", + "voucherStartTime_type" => "VOUCHER_START_TIME_TYPE_ABSOLUTE_EFFECTIVE_TIME" + ] + ], + "limitFrequency" => "", + "mabIsRefund" => "", + "marketCode" => "20191213154203514", + "marketExEndTime" => "2019-12-15 00=> 00=> 00", + "marketExStartTime" => "2019-12-13 00=> 00=> 00", + "marketHierarchy" => "3311", + "marketName" => "行为推送活动-3", + "marketProvince" => "51", + "marketReleaseSys" => "VOUCHER_PUBLISH_TYPE_APPLET", + "marketStatus" => "MARKET_ACTIVITY_STATE_TAKE_EFFECT", + "promotionCalculation" => "PROMOTION_TYPE_MEMBER_BEHAVIOR", + "rule" => [ + [ + "cashValue" => "100", + "channel" => "C01,C02,C03,C05", + "fullType" => "", + "marketCode" => "20191213154203514", + "perVoucherNumber" => "1", + "planVoucherNumber" => "10", + "ruleCode" => "$01-VC-1573468710381900", + "ruleDetail" => "123123", + "ruleName" => "ceshi2", + "voucherType" => "C01" + ] + ], + "tradLimit" => [ + [ + "endValue" => "", + "fixed" => "", + "marketCode" => "20191213154203514", + "marketRuleName" => "001", + "marketRuleNumber" => "001", + "memLevel" => "", + "operator" => "", + "startValue" => "", + "tradingUnit" => "", + "transactionType" => "" + ] + ] + ]; + + } catch (\Exception $e) { + return $e->getMessage(); + } + + } + +} \ No newline at end of file diff --git a/packages/sinopec/src/Action/sinopec/ZhyQuery.php b/packages/sinopec/src/Action/sinopec/ZhyQuery.php new file mode 100644 index 0000000..2692f0d --- /dev/null +++ b/packages/sinopec/src/Action/sinopec/ZhyQuery.php @@ -0,0 +1,81 @@ + "", + "eletronAndRule" => [ + [ + "entryMethod" => "01", + "marketCode" => "20191213154203514", + "marketRuleNumber" => "001", + "perVoucherNumber" => "1", + "planVoucherNumber" => "10", + "queryCreateTime" => "2019-11-11 18=> 39=> 49", + "similarStack" => "Y", + "voucherEndTime" => "2019-12-15", + "voucher_ruleCode" => "$01-VC-1573468710381900", + "voucherRuleName" => "ceshi2", + "voucherSource" => "S01", + "voucherStartTime" => "2019-12-13", + "voucherStartTime_type" => "VOUCHER_START_TIME_TYPE_ABSOLUTE_EFFECTIVE_TIME" + ] + ], + "limitFrequency" => "", + "mabIsRefund" => "", + "marketCode" => "20191213154203514", + "marketExEndTime" => "2019-12-15 00=> 00=> 00", + "marketExStartTime" => "2019-12-13 00=> 00=> 00", + "marketHierarchy" => "3311", + "marketName" => "行为推送活动-3", + "marketProvince" => "51", + "marketReleaseSys" => "VOUCHER_PUBLISH_TYPE_APPLET", + "marketStatus" => "MARKET_ACTIVITY_STATE_TAKE_EFFECT", + "promotionCalculation" => "PROMOTION_TYPE_MEMBER_BEHAVIOR", + "rule" => [ + [ + "cashValue" => "100", + "channel" => "C01,C02,C03,C05", + "fullType" => "", + "marketCode" => "20191213154203514", + "perVoucherNumber" => "1", + "planVoucherNumber" => "10", + "ruleCode" => "$01-VC-1573468710381900", + "ruleDetail" => "123123", + "ruleName" => "ceshi2", + "voucherType" => "C01" + ] + ], + "tradLimit" => [ + [ + "endValue" => "", + "fixed" => "", + "marketCode" => "20191213154203514", + "marketRuleName" => "001", + "marketRuleNumber" => "001", + "memLevel" => "", + "operator" => "", + "startValue" => "", + "tradingUnit" => "", + "transactionType" => "" + ] + ] + ]; + + } catch (\Exception $e) { + return $e->getMessage(); + } + + } + +} \ No newline at end of file diff --git a/packages/sinopec/src/Action/ysd/YsdDestroy.php b/packages/sinopec/src/Action/ysd/YsdDestroy.php new file mode 100644 index 0000000..dd4c4f0 --- /dev/null +++ b/packages/sinopec/src/Action/ysd/YsdDestroy.php @@ -0,0 +1,61 @@ +redemptionCode) { + try { + if (!$this->outletId) { + throw new \Exception('缺少网点id'); + } + + $info = ActivityCoupon::where('code', $this->redemptionCode)->first(); + + if (!$info) { + throw new \Exception('未查询到卡券信息'); + } + + $outlet = User::where('outlet_id', $this->outletId)->first(); + + if (empty($outlet)) { + return '作废失败,未查询到此网点信息。'; + } + + $grants = $info->activity->grants()->pluck('user_id'); + if ($grants->isEmpty()) { + return '作废失败,此活动还没有配置可发券渠道,请联系相关人员进行配置。'; + } + + if (!in_array($outlet->parent_id, $grants->toArray())) { + return '作废失败,您没有权限作废此优惠券。'; + } + + if (!$info->canDestroy()) { + throw new \Exception('作废失败,' . $info->status_text . '不能操作'); + } + + $info->status = ActivityCoupon::STATUS_CLOSE; + $info->save(); + + event(new ConponCallback($info)); + + return true; + } catch (\Exception $e) { + return $e->getMessage(); + } + } else { + return '未获取到券码。'; + } + + } + +} \ No newline at end of file diff --git a/packages/sinopec/src/Action/ysd/YsdGrant.php b/packages/sinopec/src/Action/ysd/YsdGrant.php new file mode 100644 index 0000000..1c3b452 --- /dev/null +++ b/packages/sinopec/src/Action/ysd/YsdGrant.php @@ -0,0 +1,59 @@ +activityId)->first(); + if (!$activity) { + return '发券失败,没有找到这个活动。'; + } + + if (!$activity->status) { + return '发券失败,活动已经关闭。'; + } + + $outlet = User::where('outlet_id', $this->outletId)->first(); + if (!$outlet) { + return '发券失败,未查询到此网点信息。'; + } + + $grants = $activity->grants()->pluck('user_id'); + if ($grants->isEmpty()) { + return '发券失败,此活动还没有配置可发券渠道,请联系相关人员进行配置。'; + } + + if (!in_array($outlet->parent_id, $grants->toArray())) { + return '发券失败,您没有权限发此类优惠券。'; + } + + $coupon = $activity->grant($this->mobile, $this->outletId); + + if (!is_string($coupon)) { + return [ + 'name' => $activity->title, + 'code' => $coupon->code, + 'full' => $coupon->full, + 'price' => $coupon->price, + 'startTime' => $coupon->start_at->format('Y-m-d H:i:s'), + 'endTime' => $coupon->end_at->format('Y-m-d H:i:s'), + ]; + } + + return $coupon; + } catch (\Exception $e) { + return $e->getMessage(); + } + + } + +} \ No newline at end of file diff --git a/packages/sinopec/src/Action/ysd/YsdQuery.php b/packages/sinopec/src/Action/ysd/YsdQuery.php new file mode 100644 index 0000000..9951c6e --- /dev/null +++ b/packages/sinopec/src/Action/ysd/YsdQuery.php @@ -0,0 +1,51 @@ +outletId)->first(); + + if (!$info) { + throw new \Exception('网点编号错误,未查询到网点信息'); + } + + $coupon = ActivityCoupon::where('code', $this->redemptionCode)->first(); + + if (!$coupon) { + throw new \Exception('卡券编号错误,未查询到卡券信息'); + } + + $activity = $coupon->activity; + if (!$activity) { + throw new \Exception('操作失败,未查到活动信息'); + } + + //获取所有可核销渠道 + $verifications = $activity->verifications()->pluck('user_id'); + + if ($verifications->isEmpty()) { + throw new \Exception('操作失败,此活动还没有配置可核券渠道,请联系相关人员进行配置。'); + } + + if (!in_array($info->parent_id, $verifications->toArray())) { + throw new \Exception('操作失败,您没有权限查询此卡券信息。'); + } + + return $coupon; + + } catch (\Exception $e) { + return $e->getMessage(); + } + + } + +} \ No newline at end of file diff --git a/packages/sinopec/src/Action/ysd/YsdVerification.php b/packages/sinopec/src/Action/ysd/YsdVerification.php new file mode 100644 index 0000000..d1f85de --- /dev/null +++ b/packages/sinopec/src/Action/ysd/YsdVerification.php @@ -0,0 +1,195 @@ +HasCheck(); + if ($res !== false) { + return $res; + } + + //查询卡券信息 返回model 返回string 说明报错 + $this->query_coupon = (new YsdQuery)->setOutletId($this->outletId) + ->setCode($this->redemptionCode) + ->start(); + + if (is_string($this->query_coupon)) { + return $this->query_coupon; + } + + //检查可核销次数,100元为1次。 + if ($this->query_coupon->activity && $this->query_coupon->activity->need_check) { + $ret = $this->CheckCount(); + if ($ret !== true) { + return $ret; + } + } + + //校验卡券 + $ticket = $this->checkCoupon(); + if (!is_array($ticket)) { + return $ticket; + } + + //增加核销记录 + $coupon = $this->AddCoupon(); + if (is_string($coupon)) { + return $coupon; + } + + DB::beginTransaction(); + + try { + $this->query_coupon->status = ActivityCoupon::STATUS_USED; + $this->query_coupon->used_at = now(); + $this->query_coupon->save(); + + $this->coupon->status = 2; + $this->coupon->remark = '核销成功'; + $this->coupon->save(); + //返回的数据 + $resdata = [ + 'name' => $this->coupon->couponName, + 'total' => $this->coupon->total, + 'price' => $this->coupon->price, + ]; + //核销成功 执行分润 + $this->coupon->profit(); + DB::commit(); + + event(new ConponCallback($this->query_coupon)); + + return $resdata; + } catch (Exception $e) { + DB::rollback(); + + $this->coupon->status = 3; + $this->coupon->remark = '核销失败 ' . $e->getMessage(); + $this->coupon->save(); + + return $this->coupon->remark; + } + + } + + /** + * Notes: 检查卡券信息 + * @Author: 玄尘 + * @Date : 2020/6/29 16:40 + * @return string + */ + public function checkCoupon() + { + + if (!$this->query_coupon->canRedemption()) { + return '核销失败,优惠券不可核销'; + } + + $now = now(); + + if ($this->query_coupon->start_at->gt($now)) { + return '核销失败,卡券未到可用时间。请在' . $this->query_coupon->start_at->format('Y-m-d H:i:s') . '后使用'; + } + + if ($now->gt($this->query_coupon->end_at)) { + return '核销失败,卡券已过期。'; + } + + $rule_code = $this->query_coupon->activity->rule->code; + $code = $this->user->code->where('code', $rule_code)->first(); + + if (!$code) { + return "核销失败,您没有权限使用此卡券优惠活动。"; + } + + $ticket = explode('-', $rule_code); + if (!is_array($ticket) || count($ticket) != 3) { + return "核销失败,卡券规则格式不正确"; + } + + $full = $ticket[1]; //full100 + $price = $ticket[2]; + // preg_match('/(\d{3}(\.\d+)?)/is', $full, $match); + preg_match('/\d+/', $full, $match); + + if (!is_array($match)) { + return "核销失败,卡券规则格式不正确。"; + } + + if (!is_numeric($this->total)) { + return "核销失败,订单金额必须是数字"; + } + + if ($match[0] > $this->total) { + return '核销失败,订单金额不足。'; + } + + return $this->ticket = [ + 'total' => $match[0], + 'price' => $price, + 'profit' => $code->profit, + ]; + + } + + /** + * Notes: 如可核销记录 + * @Author: 玄尘 + * @Date : 2020/7/21 15:03 + * @return string + */ + public function AddCoupon() + { + DB::beginTransaction(); + + try { + $couponData = [ + 'user_id' => $this->user->id, + 'type' => Coupon::TYPE_YSD, + 'outletId' => $this->outletId, + 'orderid' => $this->orderid, + 'PaOutletId' => '', + 'redemptionCode' => $this->redemptionCode, + 'thirdPartyGoodsId' => $this->query_coupon->activity->rule->code, + 'couponName' => $this->query_coupon->activity->title, + 'price' => $this->ticket['price'], + 'total' => $this->total, + 'profit' => $this->ticket['profit'], + 'status' => $this->query_coupon->status, + 'startTime' => $this->query_coupon->start_at, + 'endTime' => $this->query_coupon->end_at, + ]; + + $this->coupon = Coupon::create($couponData); + + DB::commit(); + + return $this->coupon; + } catch (Exception $e) { + DB::rollback(); + + return $e->getMessage(); + } + + } + +} \ No newline at end of file diff --git a/packages/sinopec/src/Contracts/CheckCouponContracts.php b/packages/sinopec/src/Contracts/CheckCouponContracts.php new file mode 100644 index 0000000..d673353 --- /dev/null +++ b/packages/sinopec/src/Contracts/CheckCouponContracts.php @@ -0,0 +1,14 @@ +setActivityId($activityId) + ->setOutletId($outletId) + ->setMobile($mobile) + ->grant(); + + } + + /** + * Notes: 查询接口 + * @Author: 玄尘 + * @Date : 2020/7/21 11:58 + * @param $redemptionCode + */ + public static function Query($redemptionCode, $outletId) + { + if (!$redemptionCode) { + return '查询失败,未获取到券码'; + } + + $model = self::getModelByCode($redemptionCode); + if (is_string($model)) { + return $model; + } + + return $model->setCode($redemptionCode) + ->setOutletId($outletId) + ->detail(); + } + + /** + * Notes: 卡券作废 + * @Author: 玄尘 + * @Date : 2020/9/2 16:54 + * @param $redemptionCode + * @param $outletId + * @return string + */ + public static function Destroy($redemptionCode, $outletId) + { + try { + $model = self::getModelByCode($redemptionCode); + if (is_string($model)) { + return $model; + } + + return $model->setCode($redemptionCode) + ->setOutletId($outletId) + ->destroy(); + } catch (\Exception $e) { + return $e->getMessage(); + } + + } + + /** + * Notes: 根据券码 获取class + * @Author: 玄尘 + * @Date : 2020/7/21 12:00 + * @param $code + * @return string + */ + public static function getModelByCode($code) + { + $rules = config('xuanchen_coupon.rules'); + if (!$rules) { + return '系统出错,未找到配置文件'; + } + + $model = ''; + foreach ($rules as $rule) { + if (preg_match($rule['pattern'], $code, $matches)) { + $model = $rule['model']; + break; + } + } + + if (!$model) { + throw new \Exception('卡券核销失败。未查到卡券所属'); + } + + return new $model; + + } + + /** + * Notes: description + * @Author: 玄尘 + * @Date : 2020/8/21 13:33 + * @param \App\Models\User $user 渠道 + * @param string $redemptionCode 要核销的券码 + * @param float $total 订单金额 + * @param string $outletId 网点id + * @param string $orderid 订单id + * @return string + */ + public static function Redemption(User $user, string $redemptionCode, float $total, string $outletId, string $orderid = '') + { + + try { + $model = self::getModelByCode($redemptionCode); + if (is_string($model)) { + return $model; + } + + return $model->setUser($user) + ->setCode($redemptionCode) + ->setTotal($total) + ->setOutletId($outletId) + ->setOrderId($orderid) + ->start(); + + } catch (\Exception $e) { + return $e->getMessage(); + } + + } + +} diff --git a/packages/sinopec/src/ServiceProvider.php b/packages/sinopec/src/ServiceProvider.php new file mode 100644 index 0000000..a05c53a --- /dev/null +++ b/packages/sinopec/src/ServiceProvider.php @@ -0,0 +1,31 @@ +app->runningInConsole()) { + $this->publishes([__DIR__ . '/../config/xuanchen_coupon.php' => config_path('xuanchen_coupon.php')]); + } + } + + /** + * Bootstrap services. + * @return void + */ + public function boot() + { + $this->mergeConfigFrom(__DIR__ . '/../config/xuanchen_coupon.php', 'xuanchen_coupon'); + + } + +} diff --git a/packages/sinopec/src/Traits/Log.php b/packages/sinopec/src/Traits/Log.php new file mode 100644 index 0000000..3de425c --- /dev/null +++ b/packages/sinopec/src/Traits/Log.php @@ -0,0 +1,47 @@ + $url, + 'method' => $method, + 'type' => $type, + 'in_source' => $params, + ]; + + $info = LogModel::create($data); + + return $info; + } + + /** + * Notes: 更新日志 + * @Author: 玄尘 + * @Date : 2020/6/30 10:29 + * @param $log + * @param $params + */ + public static function updateLog($log, $params) + { + $log->out_source = $params; + $log->save(); + } + +} diff --git a/packages/sinopec/src/Traits/SetParams.php b/packages/sinopec/src/Traits/SetParams.php new file mode 100644 index 0000000..8a54c30 --- /dev/null +++ b/packages/sinopec/src/Traits/SetParams.php @@ -0,0 +1,79 @@ +user = $user; + + return $this; + } + + //设置核销码 + public function setCode($redemptionCode) + { + $this->redemptionCode = $redemptionCode; + + return $this; + + } + + //设置订单总额 + public function setTotal($total) + { + $this->total = $total; + + return $this; + + } + + //设置网点id + public function setOutletId($outletId) + { + $this->outletId = $outletId; + + return $this; + + } + + //设置活动id + public function setActivityId($activityId) + { + $this->activityId = $activityId; + + return $this; + + } + + //设置手机号 + public function setMobile($mobile) + { + $this->mobile = $mobile; + + return $this; + + } + +} diff --git a/packages/unionpay/composer.json b/packages/unionpay/composer.json new file mode 100644 index 0000000..a0f3e59 --- /dev/null +++ b/packages/unionpay/composer.json @@ -0,0 +1,27 @@ +{ + "name": "xuanchen/unionPay", + "description": "银联对接", + "license": "MIT", + "authors": [ + { + "name": "玄尘", + "email": "122383162@qq.com" + } + ], + "require": { + "php": ">=7.1.3", + "laravel/framework": "*" + }, + "autoload": { + "psr-0": { + "XuanChen\\UnionPay": "src/" + } + }, + "extra": { + "laravel": { + "providers": [ + "XuanChen\\UnionPay\\ServiceProvider" + ] + } + } +} diff --git a/packages/unionpay/config/unionpay.php b/packages/unionpay/config/unionpay.php new file mode 100644 index 0000000..56587a2 --- /dev/null +++ b/packages/unionpay/config/unionpay.php @@ -0,0 +1,14 @@ + [ + 'self' => [ + 'private' => storage_path('cert/self/private_rsa.pem'), + 'public' => storage_path('cert/self/public_rsa.pem'), + ], + 'unionpay' => [ + 'public' => storage_path('cert/unionpay/public_rsa.pem'), + ], + ], +]; diff --git a/packages/unionpay/src/Action/Init.php b/packages/unionpay/src/Action/Init.php new file mode 100644 index 0000000..a0a2761 --- /dev/null +++ b/packages/unionpay/src/Action/Init.php @@ -0,0 +1,69 @@ +getPublic($self); + $pub_key_id = openssl_get_publickey($public_key); + + $signStr = $this->getSignString($params); + + if ($pub_key_id) { + $result = (bool)openssl_verify($signStr, $sign, $pub_key_id); + openssl_free_key($pub_key_id); + } else { + return '公钥格式有误!'; + } + + return $result; + } + + /** + * 获取待签名字符串 + * @param array $params 参数数组 + * @return string + */ + public function getSignString($params) + { + $params = array_filter($params); + ksort($params); + $signStr = http_build_query($params); + return $signStr; + } + + //获取私钥 + public function getPrivate() + { + $private = config('unionpay.check.self.private'); + return file_get_contents($private); + } + + //获取公钥 + public function getPublic($self = false) + { + $public = config('unionpay.check.unionpay.public'); + + if ($self) { + $public = config('unionpay.check.self.public'); + } + + return file_get_contents($public); + } + +} diff --git a/packages/unionpay/src/Action/Query.php b/packages/unionpay/src/Action/Query.php new file mode 100644 index 0000000..820b35a --- /dev/null +++ b/packages/unionpay/src/Action/Query.php @@ -0,0 +1,50 @@ +outletId)->first(); + + if (!$info) { + throw new \Exception('网点编号错误,未查询到网点信息'); + } + + $coupon = ActivityCoupon::where('code', $this->redemptionCode)->first(); + + if (!$coupon) { + throw new \Exception('卡券编号错误,未查询到卡券信息'); + } + + $activity = $coupon->activity; + if (!$activity) { + throw new \Exception('操作失败,未查到活动信息'); + } + + //获取所有可核销渠道 + $verifications = $activity->verifications()->pluck('user_id'); + + if ($verifications->isEmpty()) { + throw new \Exception('操作失败,此活动还没有配置可核券渠道,请联系相关人员进行配置。'); + } + + if (!in_array($info->parent_id, $verifications->toArray())) { + throw new \Exception('操作失败,您没有权限查询此卡券信息。'); + } + + return $coupon; + + } catch (\Exception $e) { + return $e->getMessage(); + } + + } + +} \ No newline at end of file diff --git a/packages/unionpay/src/Action/UnionPayAction.php b/packages/unionpay/src/Action/UnionPayAction.php new file mode 100644 index 0000000..6f82c2a --- /dev/null +++ b/packages/unionpay/src/Action/UnionPayAction.php @@ -0,0 +1,90 @@ +setActivityId($this->activityId) + ->setOutletId($this->outletId) + ->setMobile($this->mobile) + ->start(); + } + + /** + * Notes: 查询卡券详情 + * @Author: 玄尘 + * @Date : 2020/6/29 15:15 + * @return mixed + */ + public function detail() + { + $query_coupon = (new YsdQuery)->setOutletId($this->outletId) + ->setCode($this->redemptionCode) + ->start(); + + if (!is_string($query_coupon)) { + return [ + 'name' => $query_coupon->activity->title, + 'code' => $query_coupon->code, + 'full' => $query_coupon->full, + 'price' => $query_coupon->price, + 'status' => $query_coupon->status, + 'used_at' => (string)$query_coupon->used_at, + 'startTime' => (string)$query_coupon->start_at, + 'endTime' => (string)$query_coupon->end_at, + + ]; + } + + return $query_coupon; + } + + /** + * Notes: 作废 + * @Author: 玄尘 + * @Date : 2020/7/21 11:32 + */ + public function destroy() + { + return $res = (new YsdDestroy)->setCode($this->redemptionCode) + ->setOutletId($this->outletId) + ->start(); + } + + /** + * Notes: 核销执行入口 + * @Author: 玄尘 + * @Date : 2020/6/29 14:49 + * @return mixed + */ + public function start() + { + return $res = (new YsdVerification)->setCode($this->redemptionCode) + ->setUser($this->user) + ->setOutletId($this->outletId) + ->setTotal($this->total) + ->setOrderId($this->orderid) + ->start(); + } + +} diff --git a/packages/unionpay/src/Action/Verification.php b/packages/unionpay/src/Action/Verification.php new file mode 100644 index 0000000..8fb3513 --- /dev/null +++ b/packages/unionpay/src/Action/Verification.php @@ -0,0 +1,194 @@ +HasCheck(); + if ($res !== false) { + return $res; + } + + //查询卡券信息 返回model 返回string 说明报错 + $this->query_coupon = (new YsdQuery)->setOutletId($this->outletId) + ->setCode($this->redemptionCode) + ->start(); + + if (is_string($this->query_coupon)) { + return $this->query_coupon; + } + + //检查可核销次数,100元为1次。 + if ($this->query_coupon->activity && $this->query_coupon->activity->need_check) { + $ret = $this->CheckCount(); + if ($ret !== true) { + return $ret; + } + } + + //校验卡券 + $ticket = $this->checkCoupon(); + if (!is_array($ticket)) { + return $ticket; + } + + //增加核销记录 + $coupon = $this->AddCoupon(); + if (is_string($coupon)) { + return $coupon; + } + + DB::beginTransaction(); + + try { + $this->query_coupon->status = ActivityCoupon::STATUS_USED; + $this->query_coupon->used_at = now(); + $this->query_coupon->save(); + + $this->coupon->status = 2; + $this->coupon->remark = '核销成功'; + $this->coupon->save(); + //返回的数据 + $resdata = [ + 'name' => $this->coupon->couponName, + 'total' => $this->coupon->total, + 'price' => $this->coupon->price, + ]; + //核销成功 执行分润 + $this->coupon->profit(); + DB::commit(); + + event(new ConponCallback($this->query_coupon)); + + return $resdata; + } catch (Exception $e) { + DB::rollback(); + + $this->coupon->status = 3; + $this->coupon->remark = '核销失败 ' . $e->getMessage(); + $this->coupon->save(); + + return $this->coupon->remark; + } + + } + + /** + * Notes: 检查卡券信息 + * @Author: 玄尘 + * @Date : 2020/6/29 16:40 + * @return string + */ + public function checkCoupon() + { + + if (!$this->query_coupon->canRedemption()) { + return '核销失败,优惠券不可核销'; + } + + $now = now(); + + if ($this->query_coupon->start_at->gt($now)) { + return '核销失败,卡券未到可用时间。请在' . $this->query_coupon->start_at->format('Y-m-d H:i:s') . '后使用'; + } + + if ($now->gt($this->query_coupon->end_at)) { + return '核销失败,卡券已过期。'; + } + + $rule_code = $this->query_coupon->activity->rule->code; + $code = $this->user->code->where('code', $rule_code)->first(); + + if (!$code) { + return "核销失败,您没有权限使用此卡券优惠活动。"; + } + + $ticket = explode('-', $rule_code); + if (!is_array($ticket) || count($ticket) != 3) { + return "核销失败,卡券规则格式不正确"; + } + + $full = $ticket[1]; //full100 + $price = $ticket[2]; + // preg_match('/(\d{3}(\.\d+)?)/is', $full, $match); + preg_match('/\d+/', $full, $match); + + if (!is_array($match)) { + return "核销失败,卡券规则格式不正确。"; + } + + if (!is_numeric($this->total)) { + return "核销失败,订单金额必须是数字"; + } + + if ($match[0] > $this->total) { + return '核销失败,订单金额不足。'; + } + + return $this->ticket = [ + 'total' => $match[0], + 'price' => $price, + 'profit' => $code->profit, + ]; + + } + + /** + * Notes: 如可核销记录 + * @Author: 玄尘 + * @Date : 2020/7/21 15:03 + * @return string + */ + public function AddCoupon() + { + DB::beginTransaction(); + + try { + $couponData = [ + 'user_id' => $this->user->id, + 'type' => Coupon::TYPE_YSD, + 'outletId' => $this->outletId, + 'orderid' => $this->orderid, + 'PaOutletId' => '', + 'redemptionCode' => $this->redemptionCode, + 'thirdPartyGoodsId' => $this->query_coupon->activity->rule->code, + 'couponName' => $this->query_coupon->activity->title, + 'price' => $this->ticket['price'], + 'total' => $this->total, + 'profit' => $this->ticket['profit'], + 'status' => $this->query_coupon->status, + 'startTime' => $this->query_coupon->start_at, + 'endTime' => $this->query_coupon->end_at, + ]; + + $this->coupon = Coupon::create($couponData); + + DB::commit(); + + return $this->coupon; + } catch (Exception $e) { + DB::rollback(); + + return $e->getMessage(); + } + + } + +} \ No newline at end of file diff --git a/packages/unionpay/src/Contracts/CheckCouponContracts.php b/packages/unionpay/src/Contracts/CheckCouponContracts.php new file mode 100644 index 0000000..7d17256 --- /dev/null +++ b/packages/unionpay/src/Contracts/CheckCouponContracts.php @@ -0,0 +1,14 @@ +app->runningInConsole()) { + $this->publishes([__DIR__ . '/../config/unionpay.php' => config_path('unionpay.php')]); + } + } + + /** + * Bootstrap services. + * @return void + */ + public function boot() + { + $this->mergeConfigFrom(__DIR__ . '/../config/unionpay.php', 'unionpay'); + + } + +} diff --git a/packages/unionpay/src/Traits/Log.php b/packages/unionpay/src/Traits/Log.php new file mode 100644 index 0000000..d167a5f --- /dev/null +++ b/packages/unionpay/src/Traits/Log.php @@ -0,0 +1,47 @@ + $url, + 'method' => $method, + 'type' => $type, + 'in_source' => $params, + ]; + + $info = LogModel::create($data); + + return $info; + } + + /** + * Notes: 更新日志 + * @Author: 玄尘 + * @Date : 2020/6/30 10:29 + * @param $log + * @param $params + */ + public static function updateLog($log, $params) + { + $log->out_source = $params; + $log->save(); + } + +} diff --git a/packages/unionpay/src/UnionPay.php b/packages/unionpay/src/UnionPay.php new file mode 100644 index 0000000..bdaaff5 --- /dev/null +++ b/packages/unionpay/src/UnionPay.php @@ -0,0 +1,149 @@ +all(); + $sign = $inputs['sign']; + unset($inputs['sign']); + + if (!$redemptionCode) { + return '查询失败,未获取到券码'; + } + + $model = self::getModelByCode($redemptionCode); + if (is_string($model)) { + return $model; + } + + return $model->setCode($redemptionCode) + ->setOutletId($outletId) + ->detail(); + } + + /** + * Notes: 卡券作废 + * @Author: 玄尘 + * @Date : 2020/9/2 16:54 + * @param $redemptionCode + * @param $outletId + * @return string + */ + public static function Destroy($redemptionCode, $outletId) + { + try { + $model = self::getModelByCode($redemptionCode); + if (is_string($model)) { + return $model; + } + + return $model->setCode($redemptionCode) + ->setOutletId($outletId) + ->destroy(); + } catch (\Exception $e) { + return $e->getMessage(); + } + + } + + /** + * Notes: 根据券码 获取class + * @Author: 玄尘 + * @Date : 2020/7/21 12:00 + * @param $code + * @return string + */ + public static function getModelByCode($code) + { + $rules = config('xuanchen_coupon.rules'); + if (!$rules) { + return '系统出错,未找到配置文件'; + } + + $model = ''; + foreach ($rules as $rule) { + if (preg_match($rule['pattern'], $code, $matches)) { + $model = $rule['model']; + break; + } + } + + if (!$model) { + throw new \Exception('卡券核销失败。未查到卡券所属'); + } + + return new $model; + + } + + /** + * Notes: description + * @Author: 玄尘 + * @Date : 2020/8/21 13:33 + * @param \App\Models\User $user 渠道 + * @param string $redemptionCode 要核销的券码 + * @param float $total 订单金额 + * @param string $outletId 网点id + * @param string $orderid 订单id + * @return string + */ + public static function Redemption(User $user, string $redemptionCode, float $total, string $outletId, string $orderid = '') + { + + try { + $model = self::getModelByCode($redemptionCode); + if (is_string($model)) { + return $model; + } + + return $model->setUser($user) + ->setCode($redemptionCode) + ->setTotal($total) + ->setOutletId($outletId) + ->setOrderId($orderid) + ->start(); + + } catch (\Exception $e) { + return $e->getMessage(); + } + + } + + //验证签名 + public function checkSign($params) + { + $sign = $params['sign']; + unset($params['sign']); + + $signStr = $this->getSignString($params); + + $private_key = $this->getPrivate(); + $privKeyId = openssl_pkey_get_private($private_key); + if (!$privKeyId) { + return '私钥格式有误'; + } + + openssl_sign($signStr, $signature, $privKeyId, OPENSSL_ALGO_SHA1); + openssl_free_key($privKeyId); + + return bin2hex($signature); + } + +} diff --git a/storage/framework/views/007814b8e2c600a6d375f37e88a9dc03f549bbea.php b/storage/framework/views/007814b8e2c600a6d375f37e88a9dc03f549bbea.php deleted file mode 100644 index 7fbf555..0000000 --- a/storage/framework/views/007814b8e2c600a6d375f37e88a9dc03f549bbea.php +++ /dev/null @@ -1,83 +0,0 @@ -
- -
-

-
- - - showTools() || $grid->showExportBtn() || $grid->showCreateBtn() ): ?> -
-
- renderColumnSelector(); ?> - - renderExportButton(); ?> - - renderCreateButton(); ?> - -
- showTools() ): ?> -
- renderHeaderTools(); ?> - -
- -
- - - renderFilter(); ?> - - - renderHeader(); ?> - - - -
- - - - visibleColumns(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $column): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> - - popLoop(); $loop = $__env->getLastLoop(); ?> - - - - hasQuickCreate()): ?> - renderQuickCreate(); ?> - - - - - - rows()->isEmpty() && $grid->showDefineEmptyPage()): ?> - make('admin::grid.empty-grid', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> - - - rows(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> - getRowAttributes(); ?>> - visibleColumnNames(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $name): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> - - popLoop(); $loop = $__env->getLastLoop(); ?> - - popLoop(); $loop = $__env->getLastLoop(); ?> - - - renderTotalRow(); ?> - - -
formatHtmlAttributes(); ?>>getLabel(); ?>renderHeader(); ?>
getColumnAttributes($name); ?>> - column($name); ?> - -
- -
- - renderFooter(); ?> - - - - -
- \ No newline at end of file diff --git a/storage/framework/views/01c056b604351e0d923fe2c65734008322071f33.php b/storage/framework/views/01c056b604351e0d923fe2c65734008322071f33.php deleted file mode 100644 index 1c98392..0000000 --- a/storage/framework/views/01c056b604351e0d923fe2c65734008322071f33.php +++ /dev/null @@ -1,36 +0,0 @@ -
> -
- - addLoop($__currentLoopData); foreach($__currentLoopData as $field): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> - render(); ?> - - popLoop(); $loop = $__env->getLastLoop(); ?> - -
- - - - - - - 0): ?> - - -
- \ No newline at end of file diff --git a/storage/framework/views/0301773cc50146df7b50b9519152bf76f2e9be1d.php b/storage/framework/views/0301773cc50146df7b50b9519152bf76f2e9be1d.php deleted file mode 100644 index 43e9038..0000000 --- a/storage/framework/views/0301773cc50146df7b50b9519152bf76f2e9be1d.php +++ /dev/null @@ -1,29 +0,0 @@ -
- - - -
- - make('admin::form.error', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> - -
-
-
- - /> -
-
- -
-
- - /> -
-
-
- - make('admin::form.help-block', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> - -
-
- \ No newline at end of file diff --git a/storage/framework/views/041791cc8e988d93c8fe42f5501609f1bcb90ba0.php b/storage/framework/views/041791cc8e988d93c8fe42f5501609f1bcb90ba0.php deleted file mode 100644 index 5b299ac..0000000 --- a/storage/framework/views/041791cc8e988d93c8fe42f5501609f1bcb90ba0.php +++ /dev/null @@ -1,67 +0,0 @@ - -
- - - - - - -
\ No newline at end of file diff --git a/storage/framework/views/141a9a628ef948ea2d6eb08062c5d200b36412e1.php b/storage/framework/views/141a9a628ef948ea2d6eb08062c5d200b36412e1.php deleted file mode 100644 index 387e0ad..0000000 --- a/storage/framework/views/141a9a628ef948ea2d6eb08062c5d200b36412e1.php +++ /dev/null @@ -1,15 +0,0 @@ -
- - - -
- - make('admin::form.error', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> - - - - make('admin::form.help-block', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> - -
-
- \ No newline at end of file diff --git a/storage/framework/views/1616f3416f2d1a202acbaa0444fe12d8848515da.php b/storage/framework/views/1616f3416f2d1a202acbaa0444fe12d8848515da.php deleted file mode 100644 index a9bda49..0000000 --- a/storage/framework/views/1616f3416f2d1a202acbaa0444fe12d8848515da.php +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - <?php echo $__env->yieldContent('title', $app_title??config('app.name')); ?> - - - - yieldContent('css'); ?> - yieldContent('js'); ?> - - - - yieldContent('footer'); ?> - yieldContent('pop'); ?> - yieldContent('content'); ?> - - - - - - - -yieldContent('script'); ?> - - \ No newline at end of file diff --git a/storage/framework/views/21bd2a8a9168e8e602ed60969606e01873ff7dc0.php b/storage/framework/views/21bd2a8a9168e8e602ed60969606e01873ff7dc0.php deleted file mode 100644 index 2e5d4b0..0000000 --- a/storage/framework/views/21bd2a8a9168e8e602ed60969606e01873ff7dc0.php +++ /dev/null @@ -1,32 +0,0 @@ -
- - - -
- - make('admin::form.error', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> - - - - - - make('admin::form.help-block', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> - -
-
- \ No newline at end of file diff --git a/storage/framework/views/242619e39fa47c5651c51c607d946c9526d20255.php b/storage/framework/views/242619e39fa47c5651c51c607d946c9526d20255.php deleted file mode 100644 index 4e8507f..0000000 --- a/storage/framework/views/242619e39fa47c5651c51c607d946c9526d20255.php +++ /dev/null @@ -1,5 +0,0 @@ -addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> - - -popLoop(); $loop = $__env->getLastLoop(); ?> - \ No newline at end of file diff --git a/storage/framework/views/242ab2234f1564c81dced8326152a186de8c3a51.php b/storage/framework/views/242ab2234f1564c81dced8326152a186de8c3a51.php deleted file mode 100644 index 1dbcdc7..0000000 --- a/storage/framework/views/242ab2234f1564c81dced8326152a186de8c3a51.php +++ /dev/null @@ -1,5 +0,0 @@ -
- - /> - make('admin::actions.form.help-block', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> -
\ No newline at end of file diff --git a/storage/framework/views/2545955a84e6a03891c007da99793c14c2d7579b.php b/storage/framework/views/2545955a84e6a03891c007da99793c14c2d7579b.php deleted file mode 100644 index a4035d1..0000000 --- a/storage/framework/views/2545955a84e6a03891c007da99793c14c2d7579b.php +++ /dev/null @@ -1,56 +0,0 @@ -
-
-

title(), false); ?>

- -
- renderTools(); ?> - -
-
- - - open(); ?> - - -
- - isEmpty()): ?> - make('admin::form.tab', compact('tabObj'), \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> - -
- - hasRows()): ?> - getRows(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> - render(); ?> - - popLoop(); $loop = $__env->getLastLoop(); ?> - - columns(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $column): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> -
- fields(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $field): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> - render(); ?> - - popLoop(); $loop = $__env->getLastLoop(); ?> -
- popLoop(); $loop = $__env->getLastLoop(); ?> - -
- - -
- - - renderFooter(); ?> - - - getHiddenFields(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $field): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> - render(); ?> - - popLoop(); $loop = $__env->getLastLoop(); ?> - - - close(); ?> - -
- - \ No newline at end of file diff --git a/storage/framework/views/27ea16797fa7064bbd64adeba88a07880d59dfac.php b/storage/framework/views/27ea16797fa7064bbd64adeba88a07880d59dfac.php deleted file mode 100644 index 69c55d1..0000000 --- a/storage/framework/views/27ea16797fa7064bbd64adeba88a07880d59dfac.php +++ /dev/null @@ -1,14 +0,0 @@ -
> -
-

- -

-
-
- -
- -   - - -
\ No newline at end of file diff --git a/storage/framework/views/2e337bf186f54edadbbb71f831ed6469155951c5.php b/storage/framework/views/2e337bf186f54edadbbb71f831ed6469155951c5.php deleted file mode 100644 index 0c87289..0000000 --- a/storage/framework/views/2e337bf186f54edadbbb71f831ed6469155951c5.php +++ /dev/null @@ -1,6 +0,0 @@ - \ No newline at end of file diff --git a/storage/framework/views/33de8610abd9767ef7aa4f231b5843c10de5406f.php b/storage/framework/views/33de8610abd9767ef7aa4f231b5843c10de5406f.php deleted file mode 100644 index ab1644a..0000000 --- a/storage/framework/views/33de8610abd9767ef7aa4f231b5843c10de5406f.php +++ /dev/null @@ -1,62 +0,0 @@ - -
-

-
-
- -
- -
- -
- - addLoop($__currentLoopData); foreach($__currentLoopData as $pk => $form): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> - -
- - fields(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $field): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> - render(); ?> - - popLoop(); $loop = $__env->getLastLoop(); ?> - - -
- -
-
 
-
-
- -
-
- - popLoop(); $loop = $__env->getLastLoop(); ?> -
- - - - - -
- -
-
 
-
-
- - -
\ No newline at end of file diff --git a/storage/framework/views/3459b6eeb71ef78df861dbfb49cf0ce1d19c3ead.php b/storage/framework/views/3459b6eeb71ef78df861dbfb49cf0ce1d19c3ead.php deleted file mode 100644 index f635dfa..0000000 --- a/storage/framework/views/3459b6eeb71ef78df861dbfb49cf0ce1d19c3ead.php +++ /dev/null @@ -1,20 +0,0 @@ -
- - - -
- - make('admin::form.error', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> - - - - - make('admin::form.help-block', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> - -
-
- \ No newline at end of file diff --git a/storage/framework/views/38bd34660972d8680ceaf8434cf399e64a20f19e.php b/storage/framework/views/38bd34660972d8680ceaf8434cf399e64a20f19e.php deleted file mode 100644 index 056f76c..0000000 --- a/storage/framework/views/38bd34660972d8680ceaf8434cf399e64a20f19e.php +++ /dev/null @@ -1,35 +0,0 @@ -visible(\Illuminate\Support\Arr::get($item, 'roles', [])) && Admin::user()->can(\Illuminate\Support\Arr::get($item, 'permission'))): ?> - -
  • - isValidUrl($item['uri'])): ?> - - - - - - - - - - - -
  • - -
  • - - - - - - - - - - -
  • - - \ No newline at end of file diff --git a/storage/framework/views/399ddfcf6ac5c6324f9a61abd696dadfa941fa87.php b/storage/framework/views/399ddfcf6ac5c6324f9a61abd696dadfa941fa87.php deleted file mode 100644 index 500ed14..0000000 --- a/storage/framework/views/399ddfcf6ac5c6324f9a61abd696dadfa941fa87.php +++ /dev/null @@ -1,14 +0,0 @@ -
    - - - - make('admin::actions.form.help-block', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> -
    - - \ No newline at end of file diff --git a/storage/framework/views/3c3520a825114c02248a43124c589797daebc0ba.php b/storage/framework/views/3c3520a825114c02248a43124c589797daebc0ba.php deleted file mode 100644 index 20d75b3..0000000 --- a/storage/framework/views/3c3520a825114c02248a43124c589797daebc0ba.php +++ /dev/null @@ -1,15 +0,0 @@ - - addLoop($__currentLoopData); foreach($__currentLoopData as $key => $col): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> - has($col.$key)): ?> - get($col.$key); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $message): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> -
    - popLoop(); $loop = $__env->getLastLoop(); ?> - - popLoop(); $loop = $__env->getLastLoop(); ?> - - has($errorKey)): ?> - get($errorKey); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $message): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> -
    - popLoop(); $loop = $__env->getLastLoop(); ?> - - \ No newline at end of file diff --git a/storage/framework/views/3dffc9b53ba80eababa2ec2f0ac9633a5ca1ebb5.php b/storage/framework/views/3dffc9b53ba80eababa2ec2f0ac9633a5ca1ebb5.php deleted file mode 100644 index 98b5c85..0000000 --- a/storage/framework/views/3dffc9b53ba80eababa2ec2f0ac9633a5ca1ebb5.php +++ /dev/null @@ -1,21 +0,0 @@ -
    - - - -
    - - make('admin::form.error', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> - -
    - addLoop($__currentLoopData); foreach($__currentLoopData as $option => $label): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> - - popLoop(); $loop = $__env->getLastLoop(); ?> -
    - - make('admin::form.help-block', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> - -
    -
    - \ No newline at end of file diff --git a/storage/framework/views/4101dcce4f4dd10c1957c2bf09ffbf63af3bd40e.php b/storage/framework/views/4101dcce4f4dd10c1957c2bf09ffbf63af3bd40e.php deleted file mode 100644 index 3013aef..0000000 --- a/storage/framework/views/4101dcce4f4dd10c1957c2bf09ffbf63af3bd40e.php +++ /dev/null @@ -1,75 +0,0 @@ -startSection('content'); ?> -
    -

    - - - -

    - - - - - - - - - - -
    - -
    - - make('admin::partials.alerts', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> - make('admin::partials.exception', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> - make('admin::partials.toastr', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> - - - make($_view_['view'], $_view_['data'], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> - - - - - -
    -stopSection(); ?> - -make('admin::index', ['header' => strip_tags($header)], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> \ No newline at end of file diff --git a/storage/framework/views/432a74c554976a198bfb25103d830411cb55be60.php b/storage/framework/views/432a74c554976a198bfb25103d830411cb55be60.php deleted file mode 100644 index 6142cc3..0000000 --- a/storage/framework/views/432a74c554976a198bfb25103d830411cb55be60.php +++ /dev/null @@ -1,5 +0,0 @@ -
    - - > - make('admin::actions.form.help-block', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> -
    \ No newline at end of file diff --git a/storage/framework/views/4423b7a0f1450075c7dc369f8fe0fedeb0a17711.php b/storage/framework/views/4423b7a0f1450075c7dc369f8fe0fedeb0a17711.php deleted file mode 100644 index c0d1577..0000000 --- a/storage/framework/views/4423b7a0f1450075c7dc369f8fe0fedeb0a17711.php +++ /dev/null @@ -1,139 +0,0 @@ -startSection('title', '核销列表'); ?> - -startSection('css'); ?> - -stopSection(); ?> - -startPush('script'); ?> - - -stopPush(); ?> - -startSection('content'); ?> -
    -
    -
    -
    -
    -
    -
    - -
    - -
    - -
    - -
    - -
    -
    - -
    - -
    -
    - - ~ - -
    -
    - - - - - - - - - - - - -
    -
    -
    -
    -
    - - - - - - - - - - - - - - - - - addLoop($__currentLoopData); foreach($__currentLoopData as $coupon): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> - - - - - - - - - - - - - popLoop(); $loop = $__env->getLastLoop(); ?> - -
    ID网点名称平安券编号优惠政策核销金额状态处理结果核销时间
    id, false); ?> outlet ? $coupon->outlet->nickname : 'Id:' . $coupon->outletId, false); ?>redemptionCode, false); ?>couponName, false); ?>price, false); ?>status_text, false); ?>remark, false); ?>created_at, false); ?>
    -
    -
    - 全部: - 成功: - 失败: - - - -
    -
    - appends([ - 'outlet'=>Request::input('outlet'), - 'status'=>Request::input('status'), - 'redemptionCode'=>Request::input('redemptionCode'), - 'start'=>Request::input('start'), - 'end'=>Request::input('end'), - ])->links('Merchant::common.pagination'), false); ?> - -
    -
    -
    -stopSection(); ?> - -make('Merchant::layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> \ No newline at end of file diff --git a/storage/framework/views/44a17271d0aee880c9f5d95c83bfea3deb282efb.php b/storage/framework/views/44a17271d0aee880c9f5d95c83bfea3deb282efb.php deleted file mode 100644 index 51304e7..0000000 --- a/storage/framework/views/44a17271d0aee880c9f5d95c83bfea3deb282efb.php +++ /dev/null @@ -1,6 +0,0 @@ -
    - - /> - make('admin::actions.form.help-block', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> -
    - \ No newline at end of file diff --git a/storage/framework/views/45770dac8434c40b1d64577647259648e0ab64d7.php b/storage/framework/views/45770dac8434c40b1d64577647259648e0ab64d7.php deleted file mode 100644 index 18fb3fc..0000000 --- a/storage/framework/views/45770dac8434c40b1d64577647259648e0ab64d7.php +++ /dev/null @@ -1,17 +0,0 @@ -
  • -
    - - - - "> - - -
    - -
      - addLoop($__currentLoopData); foreach($__currentLoopData as $branch): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> - make($branchView, $branch, \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> - popLoop(); $loop = $__env->getLastLoop(); ?> -
    - -
  • \ No newline at end of file diff --git a/storage/framework/views/45f9bcd0d36b367e1324cfee4e5690cd31f9e806.php b/storage/framework/views/45f9bcd0d36b367e1324cfee4e5690cd31f9e806.php deleted file mode 100644 index e652095..0000000 --- a/storage/framework/views/45f9bcd0d36b367e1324cfee4e5690cd31f9e806.php +++ /dev/null @@ -1,21 +0,0 @@ -startSection('title', 'dashboard - index'); ?> - -startSection('content'); ?> -
    -
    -
    -
    -
    商户信息
    - -
    -
    -

    登录账户:username, false); ?>

    -

    用户昵称:nickname, false); ?>

    -

    用户身份:identity_text, false); ?>

    -
    -
    -
    -
    -stopSection(); ?> - -make('Merchant::layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> \ No newline at end of file diff --git a/storage/framework/views/4823120a2c883f51b58b9269c60e78b4ed87363a.php b/storage/framework/views/4823120a2c883f51b58b9269c60e78b4ed87363a.php deleted file mode 100644 index 8ea0e16..0000000 --- a/storage/framework/views/4823120a2c883f51b58b9269c60e78b4ed87363a.php +++ /dev/null @@ -1,40 +0,0 @@ -
    -
    - -
    - columns(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $column): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> -
    -
    -
    - filters(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $filter): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> - render(); ?> - - popLoop(); $loop = $__env->getLastLoop(); ?> -
    -
    -
    - popLoop(); $loop = $__env->getLastLoop(); ?> -
    - - - - -
    -
    - \ No newline at end of file diff --git a/storage/framework/views/49579146699ce73739ebd0ab1f15346a7448ba2b.php b/storage/framework/views/49579146699ce73739ebd0ab1f15346a7448ba2b.php deleted file mode 100644 index 1c6ac55..0000000 --- a/storage/framework/views/49579146699ce73739ebd0ab1f15346a7448ba2b.php +++ /dev/null @@ -1,39 +0,0 @@ -
    - - - -
    - - - - - -
    - - - make('admin::form.error', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> - - addLoop($__currentLoopData); foreach($__currentLoopData as $option => $label): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> - - ' : '
    '; ?> - - - - - ' : '
    '; ?> - - - popLoop(); $loop = $__env->getLastLoop(); ?> - - - - make('admin::form.help-block', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> - -
    -
    - \ No newline at end of file diff --git a/storage/framework/views/4b33bba7fa5d462b9bd9328a0a9cccaf88a0140a.php b/storage/framework/views/4b33bba7fa5d462b9bd9328a0a9cccaf88a0140a.php deleted file mode 100644 index e0a3a81..0000000 --- a/storage/framework/views/4b33bba7fa5d462b9bd9328a0a9cccaf88a0140a.php +++ /dev/null @@ -1,59 +0,0 @@ -startSection('title', '修改密码'); ?> - -startSection('content'); ?> -
    - -
    - -
    - -
    -
    -
    - -
    - -
    -
    -
    -
    - - - -
    -
    -
    -stopSection(); ?> - - -startPush('script'); ?> - -stopPush(); ?> - -make('Merchant::layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> \ No newline at end of file diff --git a/storage/framework/views/4e46c7bb58b0e2a7b5354bf385b6ef2e25e5ee30.php b/storage/framework/views/4e46c7bb58b0e2a7b5354bf385b6ef2e25e5ee30.php deleted file mode 100644 index fdbe867..0000000 --- a/storage/framework/views/4e46c7bb58b0e2a7b5354bf385b6ef2e25e5ee30.php +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - <?php echo e(config('app.name', ''), false); ?> --渠道管理系统登录 - - - - - - - -
    -
    -

    渠道管理

    -
    -

    Click  Here  To  Login

    -
    -
    - - -
    -
    - - -
    - - -
    - -
    - - -
    -
    -
    -
    -
    -
    - - - - - \ No newline at end of file diff --git a/storage/framework/views/4f64c95c1511b05bc31e835bba7992f6532ac3e3.php b/storage/framework/views/4f64c95c1511b05bc31e835bba7992f6532ac3e3.php deleted file mode 100644 index a5e21fe..0000000 --- a/storage/framework/views/4f64c95c1511b05bc31e835bba7992f6532ac3e3.php +++ /dev/null @@ -1,14 +0,0 @@ -
    - -
    -
    - -
    -   -
    -
    - - make('admin::form.help-block', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> - -
    -
    \ No newline at end of file diff --git a/storage/framework/views/55f67c81269667a4b56e738a19df4da65ab9d9ea.php b/storage/framework/views/55f67c81269667a4b56e738a19df4da65ab9d9ea.php deleted file mode 100644 index 4454f0b..0000000 --- a/storage/framework/views/55f67c81269667a4b56e738a19df4da65ab9d9ea.php +++ /dev/null @@ -1,37 +0,0 @@ -startSection('title', '订单列表'); ?> - -startSection('css'); ?> - -stopSection(); ?> - -startPush('script'); ?> - - -stopPush(); ?> -startSection('content'); ?> -
    - -
    - -
    - -
    -
    -
    -
    - - - -
    -
    -
    -stopSection(); ?> - -make('Merchant::layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> \ No newline at end of file diff --git a/storage/framework/views/56b58acc6c50c0878363ee6eaa18db5e12517ce8.php b/storage/framework/views/56b58acc6c50c0878363ee6eaa18db5e12517ce8.php deleted file mode 100644 index 568d591..0000000 --- a/storage/framework/views/56b58acc6c50c0878363ee6eaa18db5e12517ce8.php +++ /dev/null @@ -1,97 +0,0 @@ -startSection('title', '核销统计'); ?> - -startSection('css'); ?> - -stopSection(); ?> - -startPush('script'); ?> - - -stopPush(); ?> - -startSection('content'); ?> -
    -
    -
    -
    -
    -
    - -
    -
    - -
    - - - - - -
    -
    -
    -
    -
    -
    - - - - - - - - - - - - - addLoop($__currentLoopData); foreach($__currentLoopData as $coupon): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> - - - - - - - - - - popLoop(); $loop = $__env->getLastLoop(); ?> - - - - - - - - - -
    日期100元减10元优惠券100元减25元优惠券100元减50元优惠券200元减100元优惠券
    - 查看 -
    全部
    -
    - -
    -
    -stopSection(); ?> - -make('Merchant::layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> \ No newline at end of file diff --git a/storage/framework/views/56f5590dd1e2e3c6edef5ee0c1a2cee38e982e61.php b/storage/framework/views/56f5590dd1e2e3c6edef5ee0c1a2cee38e982e61.php deleted file mode 100644 index f824095..0000000 --- a/storage/framework/views/56f5590dd1e2e3c6edef5ee0c1a2cee38e982e61.php +++ /dev/null @@ -1,49 +0,0 @@ - \ No newline at end of file diff --git a/storage/framework/views/57846184b0bdd99d31042eabf0582ef4c530e25b.php b/storage/framework/views/57846184b0bdd99d31042eabf0582ef4c530e25b.php deleted file mode 100644 index 23be042..0000000 --- a/storage/framework/views/57846184b0bdd99d31042eabf0582ef4c530e25b.php +++ /dev/null @@ -1,6 +0,0 @@ - - -   - - - \ No newline at end of file diff --git a/storage/framework/views/5b6280b8a37bf115bc4f6f0669ce9c426ae41056.php b/storage/framework/views/5b6280b8a37bf115bc4f6f0669ce9c426ae41056.php deleted file mode 100644 index 4a8efc5..0000000 --- a/storage/framework/views/5b6280b8a37bf115bc4f6f0669ce9c426ae41056.php +++ /dev/null @@ -1,22 +0,0 @@ -
    - - - isNotEmpty()): ?> - - - -
    \ No newline at end of file diff --git a/storage/framework/views/5cf060a233a6480650d1ae30d45549909ff0c96c.php b/storage/framework/views/5cf060a233a6480650d1ae30d45549909ff0c96c.php deleted file mode 100644 index 0284872..0000000 --- a/storage/framework/views/5cf060a233a6480650d1ae30d45549909ff0c96c.php +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - <?php echo e(Admin::title(), false); ?> <?php if($header): ?> | <?php echo e($header, false); ?><?php endif; ?> - - - - - - - - - - - - - - - - - - - - -
    - - -
    - - -
    - - make('admin::partials.header', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> - - make('admin::partials.sidebar', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> - -
    - - -
    - yieldContent('content'); ?> -
    - - - - -
    - - make('admin::partials.footer', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> - -
    - - - - - - - - - - - - \ No newline at end of file diff --git a/storage/framework/views/6011f8f183bbdbb99d29764565369b58b4699789.php b/storage/framework/views/6011f8f183bbdbb99d29764565369b58b4699789.php deleted file mode 100644 index ebe0c64..0000000 --- a/storage/framework/views/6011f8f183bbdbb99d29764565369b58b4699789.php +++ /dev/null @@ -1,35 +0,0 @@ - - \ No newline at end of file diff --git a/storage/framework/views/616340d22370b810783bebb185c2bd7b27a08c3a.php b/storage/framework/views/616340d22370b810783bebb185c2bd7b27a08c3a.php deleted file mode 100644 index 5354bbc..0000000 --- a/storage/framework/views/616340d22370b810783bebb185c2bd7b27a08c3a.php +++ /dev/null @@ -1,24 +0,0 @@ - -
    -

    -
    -
    - -
    - -
    - -
    - -
    - - fields(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $field): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> - render(); ?> - - popLoop(); $loop = $__env->getLastLoop(); ?> - -
    -
    -
    - -
    \ No newline at end of file diff --git a/storage/framework/views/6180c4b630ff07054ce37b5d00dd950311d693aa.php b/storage/framework/views/6180c4b630ff07054ce37b5d00dd950311d693aa.php deleted file mode 100644 index b09b7ed..0000000 --- a/storage/framework/views/6180c4b630ff07054ce37b5d00dd950311d693aa.php +++ /dev/null @@ -1,13 +0,0 @@ - - get('type'), 0, 'success'); - $message = \Illuminate\Support\Arr::get($toastr->get('message'), 0, ''); - $options = json_encode($toastr->get('options', [])); - ?> - - \ No newline at end of file diff --git a/storage/framework/views/61f4fc5f7146b7c8815e68c33383ad0e058cab64.php b/storage/framework/views/61f4fc5f7146b7c8815e68c33383ad0e058cab64.php deleted file mode 100644 index c9be5f9..0000000 --- a/storage/framework/views/61f4fc5f7146b7c8815e68c33383ad0e058cab64.php +++ /dev/null @@ -1,26 +0,0 @@ -
    - - - -
    - - make('admin::form.error', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> - -
    - - - - - - /> - - - - - -
    - - make('admin::form.help-block', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> - -
    -
    \ No newline at end of file diff --git a/storage/framework/views/620c9cc5d234bbbbb8d24370f4097c1d11b96f6d.php b/storage/framework/views/620c9cc5d234bbbbb8d24370f4097c1d11b96f6d.php deleted file mode 100644 index 27cbd7b..0000000 --- a/storage/framework/views/620c9cc5d234bbbbb8d24370f4097c1d11b96f6d.php +++ /dev/null @@ -1,3 +0,0 @@ -addLoop($__currentLoopData); foreach($__currentLoopData as $c): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> - "> -popLoop(); $loop = $__env->getLastLoop(); ?> \ No newline at end of file diff --git a/storage/framework/views/632aaeb06a6bb77b07bd118106d603bc942b9720.php b/storage/framework/views/632aaeb06a6bb77b07bd118106d603bc942b9720.php deleted file mode 100644 index ed4e6c4..0000000 --- a/storage/framework/views/632aaeb06a6bb77b07bd118106d603bc942b9720.php +++ /dev/null @@ -1,16 +0,0 @@ -
    - - - -
    - - make('admin::form.error', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> - - /> - - - make('admin::form.help-block', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> - -
    -
    - \ No newline at end of file diff --git a/storage/framework/views/64f449516e6bd5926531a3532747d8f534512d1a.php b/storage/framework/views/64f449516e6bd5926531a3532747d8f534512d1a.php deleted file mode 100644 index 563899f..0000000 --- a/storage/framework/views/64f449516e6bd5926531a3532747d8f534512d1a.php +++ /dev/null @@ -1,2 +0,0 @@ - /> - \ No newline at end of file diff --git a/storage/framework/views/65615e9db181eafa38c5c901f96db6495af06911.php b/storage/framework/views/65615e9db181eafa38c5c901f96db6495af06911.php deleted file mode 100644 index 8d258c1..0000000 --- a/storage/framework/views/65615e9db181eafa38c5c901f96db6495af06911.php +++ /dev/null @@ -1,54 +0,0 @@ -hasPages()): ?> -
    - -
    - - \ No newline at end of file diff --git a/storage/framework/views/6b08c68f26badcc92e3f4b0857d7c68b32867047.php b/storage/framework/views/6b08c68f26badcc92e3f4b0857d7c68b32867047.php deleted file mode 100644 index eac545c..0000000 --- a/storage/framework/views/6b08c68f26badcc92e3f4b0857d7c68b32867047.php +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - <?php echo $__env->yieldContent('title'); ?> - - - - - - - - - -
    -
    - yieldContent('code'); ?> -
    - -
    - yieldContent('message'); ?> -
    -
    - - - \ No newline at end of file diff --git a/storage/framework/views/6d516f0e511764356ea8aa80e61897011d539c92.php b/storage/framework/views/6d516f0e511764356ea8aa80e61897011d539c92.php deleted file mode 100644 index b03a4e3..0000000 --- a/storage/framework/views/6d516f0e511764356ea8aa80e61897011d539c92.php +++ /dev/null @@ -1,41 +0,0 @@ -get('error')): ?> -
    - -

    get('title'), 0), false); ?>

    -

    get('message'), 0); ?>

    -
    -get('errors')): ?> - hasBag('error')): ?> -
    - - - getBag("error")->toArray(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $message): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> -

    - popLoop(); $loop = $__env->getLastLoop(); ?> -
    - - - -get('success')): ?> -
    - -

    get('title'), 0), false); ?>

    -

    get('message'), 0); ?>

    -
    - - -get('info')): ?> -
    - -

    get('title'), 0), false); ?>

    -

    get('message'), 0); ?>

    -
    - - -get('warning')): ?> -
    - -

    get('title'), 0), false); ?>

    -

    get('message'), 0); ?>

    -
    - \ No newline at end of file diff --git a/storage/framework/views/6f203d9fd5cddc9beaafe3951f959f76e0a3e8fd.php b/storage/framework/views/6f203d9fd5cddc9beaafe3951f959f76e0a3e8fd.php deleted file mode 100644 index b5f2a9d..0000000 --- a/storage/framework/views/6f203d9fd5cddc9beaafe3951f959f76e0a3e8fd.php +++ /dev/null @@ -1,22 +0,0 @@ -
    - -
    - - - -
    - -
    - -
    - - -
    \ No newline at end of file diff --git a/storage/framework/views/7d45443f435369432578cee33f54b26334aa2ed6.php b/storage/framework/views/7d45443f435369432578cee33f54b26334aa2ed6.php deleted file mode 100644 index 4b57a75..0000000 --- a/storage/framework/views/7d45443f435369432578cee33f54b26334aa2ed6.php +++ /dev/null @@ -1,9 +0,0 @@ - \ No newline at end of file diff --git a/storage/framework/views/7dc154b31e64489e508086ab463d103a16ba45da.php b/storage/framework/views/7dc154b31e64489e508086ab463d103a16ba45da.php deleted file mode 100644 index 41eb01e..0000000 --- a/storage/framework/views/7dc154b31e64489e508086ab463d103a16ba45da.php +++ /dev/null @@ -1,5 +0,0 @@ -
    - - - make('admin::actions.form.help-block', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> -
    \ No newline at end of file diff --git a/storage/framework/views/82a3446350abc602dff0bfa8e7b518e3e183ddeb.php b/storage/framework/views/82a3446350abc602dff0bfa8e7b518e3e183ddeb.php deleted file mode 100644 index 3a0ec50..0000000 --- a/storage/framework/views/82a3446350abc602dff0bfa8e7b518e3e183ddeb.php +++ /dev/null @@ -1,13 +0,0 @@ -
    - -
    -
    -
    - -
    - "> - - - "> -
    -
    -
    \ No newline at end of file diff --git a/storage/framework/views/84bec90ced309209a10c923e3bbcb83724809aef.php b/storage/framework/views/84bec90ced309209a10c923e3bbcb83724809aef.php deleted file mode 100644 index 2c6cc53..0000000 --- a/storage/framework/views/84bec90ced309209a10c923e3bbcb83724809aef.php +++ /dev/null @@ -1,22 +0,0 @@ - - - - - \ No newline at end of file diff --git a/storage/framework/views/88c6c62da5833c60e2ca4377ece54617bb1b4300.php b/storage/framework/views/88c6c62da5833c60e2ca4377ece54617bb1b4300.php deleted file mode 100644 index db46ad0..0000000 --- a/storage/framework/views/88c6c62da5833c60e2ca4377ece54617bb1b4300.php +++ /dev/null @@ -1,50 +0,0 @@ -
    - -
    - - - - -
    - -
    - - - -
    - -
    - - -
    - - -
    - - -
    - -
    - - -
    - -
    -
    -
      - renderEach($branchView, $items, 'branch'); ?> -
    -
    -
    - -
    - \ No newline at end of file diff --git a/storage/framework/views/8ab92a2eff9d2d1f36ca2cc57bc4f6e760a90053.php b/storage/framework/views/8ab92a2eff9d2d1f36ca2cc57bc4f6e760a90053.php deleted file mode 100644 index fae9942..0000000 --- a/storage/framework/views/8ab92a2eff9d2d1f36ca2cc57bc4f6e760a90053.php +++ /dev/null @@ -1,38 +0,0 @@ -
    - -
    -
    -
    -
    -

    核销成功统计数据

    -
    -
    - - - - - - - - - - - - addLoop($__currentLoopData); foreach($__currentLoopData as $list): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> - - - - - - - - popLoop(); $loop = $__env->getLastLoop(); ?> - - -
    渠道100元减10元优惠券成功数100元减25元优惠券成功数100元减50元优惠券成功数200元减100元优惠券成功数
    -
    -
    -
    -
    -
    - \ No newline at end of file diff --git a/storage/framework/views/8b200739c80ad261e0f1ffbf39c3f910650b04c9.php b/storage/framework/views/8b200739c80ad261e0f1ffbf39c3f910650b04c9.php deleted file mode 100644 index 6e064e5..0000000 --- a/storage/framework/views/8b200739c80ad261e0f1ffbf39c3f910650b04c9.php +++ /dev/null @@ -1,18 +0,0 @@ -> - - - addLoop($__currentLoopData); foreach($__currentLoopData as $header): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> - - popLoop(); $loop = $__env->getLastLoop(); ?> - - - - addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> - - addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> - - popLoop(); $loop = $__env->getLastLoop(); ?> - - popLoop(); $loop = $__env->getLastLoop(); ?> - -
    \ No newline at end of file diff --git a/storage/framework/views/90d826d834342e1d624accaf1a7fb4beda2206db.php b/storage/framework/views/90d826d834342e1d624accaf1a7fb4beda2206db.php deleted file mode 100644 index 42bb417..0000000 --- a/storage/framework/views/90d826d834342e1d624accaf1a7fb4beda2206db.php +++ /dev/null @@ -1,8 +0,0 @@ -
    - addLoop($__currentLoopData); foreach($__currentLoopData as $field): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> -
    - render(); ?> - -
    - popLoop(); $loop = $__env->getLastLoop(); ?> -
    \ No newline at end of file diff --git a/storage/framework/views/9fbf18a9309f3055ea40ab0da285de1b3c6f3194.php b/storage/framework/views/9fbf18a9309f3055ea40ab0da285de1b3c6f3194.php deleted file mode 100644 index 74099d5..0000000 --- a/storage/framework/views/9fbf18a9309f3055ea40ab0da285de1b3c6f3194.php +++ /dev/null @@ -1,15 +0,0 @@ -
    - - - -
    - - make('admin::form.error', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> - - /> - - make('admin::form.help-block', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> - -
    -
    - \ No newline at end of file diff --git a/storage/framework/views/a4f1096d01189b3cff30cf8f4d976eb3fa89f812.php b/storage/framework/views/a4f1096d01189b3cff30cf8f4d976eb3fa89f812.php deleted file mode 100644 index 414d3b9..0000000 --- a/storage/framework/views/a4f1096d01189b3cff30cf8f4d976eb3fa89f812.php +++ /dev/null @@ -1,29 +0,0 @@ -
    - - - -
    - - make('admin::form.error', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> - -
    -
    -
    - - /> -
    -
    - -
    -
    - - /> -
    -
    -
    - - make('admin::form.help-block', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> - -
    -
    - \ No newline at end of file diff --git a/storage/framework/views/a90893336a1c423439a4471369f55a1b74b9fe96.php b/storage/framework/views/a90893336a1c423439a4471369f55a1b74b9fe96.php deleted file mode 100644 index c540776..0000000 --- a/storage/framework/views/a90893336a1c423439a4471369f55a1b74b9fe96.php +++ /dev/null @@ -1,15 +0,0 @@ -hasBag('exception') && config('app.debug') == true): ?> - getBag('exception');?> -
    - -

    - - first('type')), false); ?> - In first('file')), false); ?> line first('line'), false); ?> : -

    -

      first('message'); ?>

    - - -
    - - \ No newline at end of file diff --git a/storage/framework/views/a995e2baa00341e0686e163a2ff94d09e6953f31.php b/storage/framework/views/a995e2baa00341e0686e163a2ff94d09e6953f31.php deleted file mode 100644 index d0a1c26..0000000 --- a/storage/framework/views/a995e2baa00341e0686e163a2ff94d09e6953f31.php +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - <?php echo e(config('admin.title'), false); ?> | <?php echo e(trans('admin.login'), false); ?> - - - - - - - - - "> - - "> - - "> - - "> - - - - - -style="background: url() no-repeat;background-size: cover;"> -
    - - - - -
    - - - - - - - - - - - - \ No newline at end of file diff --git a/storage/framework/views/aab31cc4d471a732a3a32fcdaf2e19cbf5816123.php b/storage/framework/views/aab31cc4d471a732a3a32fcdaf2e19cbf5816123.php deleted file mode 100644 index ef887cf..0000000 --- a/storage/framework/views/aab31cc4d471a732a3a32fcdaf2e19cbf5816123.php +++ /dev/null @@ -1,5 +0,0 @@ -startSection('title', __('Not Found')); ?> -startSection('code', '404'); ?> -startSection('message', __('Not Found')); ?> - -make('errors::minimal', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> \ No newline at end of file diff --git a/storage/framework/views/ac26dfff3ea44e0da76fe4431245f539530df480.php b/storage/framework/views/ac26dfff3ea44e0da76fe4431245f539530df480.php deleted file mode 100644 index dff7e17..0000000 --- a/storage/framework/views/ac26dfff3ea44e0da76fe4431245f539530df480.php +++ /dev/null @@ -1,9 +0,0 @@ -
    -
    - - -
    - -
    -
    -
    \ No newline at end of file diff --git a/storage/framework/views/b1d7e431810d967d760691a4621b62625bc35993.php b/storage/framework/views/b1d7e431810d967d760691a4621b62625bc35993.php deleted file mode 100644 index d4f6d6f..0000000 --- a/storage/framework/views/b1d7e431810d967d760691a4621b62625bc35993.php +++ /dev/null @@ -1,8 +0,0 @@ - - \ No newline at end of file diff --git a/storage/framework/views/b690dbc92efa6958eef76e40990b4beff6263b2a.php b/storage/framework/views/b690dbc92efa6958eef76e40990b4beff6263b2a.php deleted file mode 100644 index d14dcea..0000000 --- a/storage/framework/views/b690dbc92efa6958eef76e40990b4beff6263b2a.php +++ /dev/null @@ -1,27 +0,0 @@ -
    - - - -
    - - make('admin::form.error', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> - - addLoop($__currentLoopData); foreach($__currentLoopData as $option => $label): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> - - ' : '
    '; ?> - - - - - ' : '
    '; ?> - - - popLoop(); $loop = $__env->getLastLoop(); ?> - - make('admin::form.help-block', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> - -
    -
    - \ No newline at end of file diff --git a/storage/framework/views/b90d0075d2bd84874113102b4f8bb21f529f3705.php b/storage/framework/views/b90d0075d2bd84874113102b4f8bb21f529f3705.php deleted file mode 100644 index 1b3b1af..0000000 --- a/storage/framework/views/b90d0075d2bd84874113102b4f8bb21f529f3705.php +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - <?php echo $__env->yieldContent('title','商户管理'); ?> - - - - - - yieldContent('css'); ?> - yieldContent('js'); ?> - - - -
    - yieldContent('content'); ?> -
    - - - - - - - - yieldPushContent('script'); ?> - - - - \ No newline at end of file diff --git a/storage/framework/views/bca9a527f9e8ee7424e30d095b1981e0cfc10a9c.php b/storage/framework/views/bca9a527f9e8ee7424e30d095b1981e0cfc10a9c.php deleted file mode 100644 index ff63cdb..0000000 --- a/storage/framework/views/bca9a527f9e8ee7424e30d095b1981e0cfc10a9c.php +++ /dev/null @@ -1,58 +0,0 @@ - - - - \ No newline at end of file diff --git a/storage/framework/views/bf93ee8e68257c706d6c58154b87c3786859d5af.php b/storage/framework/views/bf93ee8e68257c706d6c58154b87c3786859d5af.php deleted file mode 100644 index 29e14e6..0000000 --- a/storage/framework/views/bf93ee8e68257c706d6c58154b87c3786859d5af.php +++ /dev/null @@ -1,28 +0,0 @@ -
    > - -
    -

    -
    - addLoop($__currentLoopData); foreach($__currentLoopData as $tool): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> - - - popLoop(); $loop = $__env->getLastLoop(); ?> -
    -
    - -
    - - -
    - - - -
    - - \ No newline at end of file diff --git a/storage/framework/views/c0d92e0e43c35144b8c3264c82f33a72c18d505e.php b/storage/framework/views/c0d92e0e43c35144b8c3264c82f33a72c18d505e.php deleted file mode 100644 index bfb0d1d..0000000 --- a/storage/framework/views/c0d92e0e43c35144b8c3264c82f33a72c18d505e.php +++ /dev/null @@ -1,33 +0,0 @@ - \ No newline at end of file diff --git a/storage/framework/views/c1330ade4373b44ab9f8d7c80359cf8ac976f0bf.php b/storage/framework/views/c1330ade4373b44ab9f8d7c80359cf8ac976f0bf.php deleted file mode 100644 index 895375c..0000000 --- a/storage/framework/views/c1330ade4373b44ab9f8d7c80359cf8ac976f0bf.php +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - <?php echo e(config('app.name', ''), false); ?> 渠道后台管理系统 - - - - - - - - - - -
    - make('Merchant::common.menu', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> - -
    -
    - -
    - - - -
    - -
    - - -
    - -
    - - - - - - - - - - - - - - \ No newline at end of file diff --git a/storage/framework/views/c829d1f291c75b92f49f8f367f245c848cb9402c.php b/storage/framework/views/c829d1f291c75b92f49f8f367f245c848cb9402c.php deleted file mode 100644 index e2716c9..0000000 --- a/storage/framework/views/c829d1f291c75b92f49f8f367f245c848cb9402c.php +++ /dev/null @@ -1,6 +0,0 @@ -
    - -
    - make($presenter->view(), \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> -
    -
    \ No newline at end of file diff --git a/storage/framework/views/cd92959b06d169706bd5349e705d4313c9b78bac.php b/storage/framework/views/cd92959b06d169706bd5349e705d4313c9b78bac.php deleted file mode 100644 index 061608a..0000000 --- a/storage/framework/views/cd92959b06d169706bd5349e705d4313c9b78bac.php +++ /dev/null @@ -1,21 +0,0 @@ -
    - -
    - - - -
    - -
    - -
    - -
    \ No newline at end of file diff --git a/storage/framework/views/ddae94fe840fdc4c78cea053fb34c27dc9cfa2a9.php b/storage/framework/views/ddae94fe840fdc4c78cea053fb34c27dc9cfa2a9.php deleted file mode 100644 index 2ff602b..0000000 --- a/storage/framework/views/ddae94fe840fdc4c78cea053fb34c27dc9cfa2a9.php +++ /dev/null @@ -1,3 +0,0 @@ -addLoop($__currentLoopData); foreach($__currentLoopData as $j): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> - -popLoop(); $loop = $__env->getLastLoop(); ?> \ No newline at end of file diff --git a/storage/framework/views/deb816fa47d94e1b001ef21839d85312495d19a4.php b/storage/framework/views/deb816fa47d94e1b001ef21839d85312495d19a4.php deleted file mode 100644 index cc21ca0..0000000 --- a/storage/framework/views/deb816fa47d94e1b001ef21839d85312495d19a4.php +++ /dev/null @@ -1,6 +0,0 @@ - \ No newline at end of file diff --git a/storage/framework/views/e1347a6061f4892f392bad667d4682054aa3c9e7.php b/storage/framework/views/e1347a6061f4892f392bad667d4682054aa3c9e7.php deleted file mode 100644 index 58d65f7..0000000 --- a/storage/framework/views/e1347a6061f4892f392bad667d4682054aa3c9e7.php +++ /dev/null @@ -1,146 +0,0 @@ -
    - -
    -

    -
    - - - showTools() || $grid->showExportBtn() || $grid->showCreateBtn() ): ?> -
    -
    - renderColumnSelector(); ?> - - renderExportButton(); ?> - - renderCreateButton(); ?> - -
    - showTools() ): ?> -
    - renderHeaderTools(); ?> - -
    - -
    - - - renderFilter(); ?> - - - renderHeader(); ?> - - - -
    -
    -
    - - - - visibleColumns(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $column): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> - - popLoop(); $loop = $__env->getLastLoop(); ?> - - - - - - rows(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> - getRowAttributes(); ?>> - visibleColumnNames(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $name): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> - - popLoop(); $loop = $__env->getLastLoop(); ?> - - popLoop(); $loop = $__env->getLastLoop(); ?> - - - renderTotalRow(); ?> - - -
    formatHtmlAttributes(); ?>>getLabel(), false); ?>renderHeader(); ?>
    getColumnAttributes($name); ?> class="column-"> - column($name); ?> - -
    -
    - - leftVisibleColumns()->isNotEmpty()): ?> -
    - - - - leftVisibleColumns(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $column): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> - - popLoop(); $loop = $__env->getLastLoop(); ?> - - - - - rows(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> - getRowAttributes(); ?>> - leftVisibleColumns(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $column): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> - getName() - ?> - - popLoop(); $loop = $__env->getLastLoop(); ?> - - popLoop(); $loop = $__env->getLastLoop(); ?> - - - renderTotalRow($grid->leftVisibleColumns()); ?> - - -
    formatHtmlAttributes(); ?>>getLabel(), false); ?>renderHeader(); ?>
    getColumnAttributes($name); ?> class="column-"> - column($name); ?> - -
    -
    - - - rightVisibleColumns()->isNotEmpty()): ?> -
    - - - - rightVisibleColumns(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $column): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> - - popLoop(); $loop = $__env->getLastLoop(); ?> - - - - - - rows(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> - getRowAttributes(); ?>> - rightVisibleColumns(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $column): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> - getName() - ?> - - popLoop(); $loop = $__env->getLastLoop(); ?> - - popLoop(); $loop = $__env->getLastLoop(); ?> - - - renderTotalRow($grid->rightVisibleColumns()); ?> - - -
    formatHtmlAttributes(); ?>>getLabel(), false); ?>renderHeader(); ?>
    getColumnAttributes($name); ?> class="column-"> - column($name); ?> - -
    -
    - -
    -
    - - renderFooter(); ?> - - - - -
    - \ No newline at end of file diff --git a/storage/framework/views/e23607b80ddf18243a4aa231ba2e236e8260444b.php b/storage/framework/views/e23607b80ddf18243a4aa231ba2e236e8260444b.php deleted file mode 100644 index 54bc55c..0000000 --- a/storage/framework/views/e23607b80ddf18243a4aa231ba2e236e8260444b.php +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/storage/framework/views/e6e7b0bc0e3ee1c8e386d8b5fcb8abb1dd31a447.php b/storage/framework/views/e6e7b0bc0e3ee1c8e386d8b5fcb8abb1dd31a447.php deleted file mode 100644 index b5e1a74..0000000 --- a/storage/framework/views/e6e7b0bc0e3ee1c8e386d8b5fcb8abb1dd31a447.php +++ /dev/null @@ -1,6 +0,0 @@ - - -   - - - \ No newline at end of file diff --git a/storage/framework/views/e925d2a8181b4595a0746365ddab2a9d7e3ba114.php b/storage/framework/views/e925d2a8181b4595a0746365ddab2a9d7e3ba114.php deleted file mode 100644 index 8c97d71..0000000 --- a/storage/framework/views/e925d2a8181b4595a0746365ddab2a9d7e3ba114.php +++ /dev/null @@ -1,22 +0,0 @@ - \ No newline at end of file diff --git a/storage/framework/views/ea880137936e7893d9d73b4997ad9df6b621d502.php b/storage/framework/views/ea880137936e7893d9d73b4997ad9df6b621d502.php deleted file mode 100644 index 0328a2e..0000000 --- a/storage/framework/views/ea880137936e7893d9d73b4997ad9df6b621d502.php +++ /dev/null @@ -1,105 +0,0 @@ -startSection('title', '订单列表'); ?> - -startSection('css'); ?> - -stopSection(); ?> - -startPush('script'); ?> - - -stopPush(); ?> - -startSection('content'); ?> -
    -
    -
    -
    -
    -
    -
    - -
    -
    - -
    - -
    - -
    - -
    -
    - - ~ - -
    -
    - - - -
    -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - addLoop($__currentLoopData); foreach($__currentLoopData as $coupon): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> - - - - - - - - - - - - - - - - popLoop(); $loop = $__env->getLastLoop(); ?> - -
    ID渠道渠道网点订单号优惠券名称金额分润状态处理结果起始时间到期时间核销时间
    id, false); ?> user->nickname, false); ?>outlet ? $coupon->outlet->nickname : 'Id:' . $coupon->outletId, false); ?>partnerOrderId, false); ?>redemptionCode, false); ?>couponName, false); ?>price, false); ?>profit, false); ?>status_text, false); ?>remark, false); ?>startTime, false); ?>endTime, false); ?>created_at, false); ?>
    -
    -
    - links('Merchant::common.pagination'), false); ?> - -
    -
    -
    -stopSection(); ?> - -make('Merchant::layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> \ No newline at end of file diff --git a/storage/framework/views/f3692515eefd248b18f054ec9d2a65f44df957d0.php b/storage/framework/views/f3692515eefd248b18f054ec9d2a65f44df957d0.php deleted file mode 100644 index 4eb7087..0000000 --- a/storage/framework/views/f3692515eefd248b18f054ec9d2a65f44df957d0.php +++ /dev/null @@ -1,20 +0,0 @@ - - \ No newline at end of file diff --git a/storage/framework/views/f7bc8d866f6b138c45d0663fff18d6454e249e1f.php b/storage/framework/views/f7bc8d866f6b138c45d0663fff18d6454e249e1f.php deleted file mode 100644 index 6cade8e..0000000 --- a/storage/framework/views/f7bc8d866f6b138c45d0663fff18d6454e249e1f.php +++ /dev/null @@ -1,20 +0,0 @@ -
    - - - -
    - - make('admin::form.error', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> - - - - - make('admin::form.help-block', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> - -
    -
    - \ No newline at end of file diff --git a/storage/framework/views/fbcd71ff7b91555866377e415784033c5e0dd7fc.php b/storage/framework/views/fbcd71ff7b91555866377e415784033c5e0dd7fc.php deleted file mode 100644 index be4e2ef..0000000 --- a/storage/framework/views/fbcd71ff7b91555866377e415784033c5e0dd7fc.php +++ /dev/null @@ -1,22 +0,0 @@ - \ No newline at end of file diff --git a/storage/framework/views/ff2a33984ce353f65b02df48aa8bc23e693c1a7b.php b/storage/framework/views/ff2a33984ce353f65b02df48aa8bc23e693c1a7b.php deleted file mode 100644 index 34b1085..0000000 --- a/storage/framework/views/ff2a33984ce353f65b02df48aa8bc23e693c1a7b.php +++ /dev/null @@ -1,8 +0,0 @@ -startSection('content'); ?> -
    - -
    您访问的地址不正确
    -
    -stopSection(); ?> - -make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> \ No newline at end of file