diff --git a/app/Amqp/Consumer/CancelOrderConsumer.php b/app/Amqp/Consumer/CancelOrderConsumer.php index 48818ed..bfbdbf2 100644 --- a/app/Amqp/Consumer/CancelOrderConsumer.php +++ b/app/Amqp/Consumer/CancelOrderConsumer.php @@ -9,6 +9,7 @@ use App\Constants\Common\OrderCode; use App\Lib\Log; use App\Model\Order; use App\Model\UserCoupon; +use App\Service\ServiceTrait\Api\CouponTrait; use App\Service\ServiceTrait\Api\OrderTrait; use Exception; use Hyperf\Amqp\Message\ConsumerDelayedMessageTrait; @@ -28,6 +29,7 @@ class CancelOrderConsumer extends ConsumerMessage { use ProducerDelayedMessageTrait,ConsumerDelayedMessageTrait; use OrderTrait; + use CouponTrait; /** * @var Type|string 消息类型 @@ -103,27 +105,4 @@ class CancelOrderConsumer extends ConsumerMessage return Result::ACK; } - - /** - * @param $orderType - * @param $orderInfo - * @return void - * @throws Exception - */ - private function rollbackCoupon($orderType,$orderInfo): void - { - if ($orderType != OrderCode::ORDER_TYPE_GOOD) return; - - if ($orderInfo->coupon_id <= 0) return; - - $couponInfo = $this->userCouponModel->where('coupon_id', $orderInfo->coupon_id)->where('user_id',$orderInfo->user_id)->first(); - - if (empty($couponInfo)) return; - - $couponInfo->status = CouponCode::COUPON_STATUS_UNUSED; - - if (date('Y-m-d H:i:s') > $couponInfo->validity_end_time) $couponInfo->status = CouponCode::COUPON_STATUS_EXPIRE; - - if (!$couponInfo->save()) throw new Exception('CancelOrderConsumer:error:couponStatusUpdateError:'.json_encode($orderInfo->toArray())); - } } diff --git a/app/Cache/Redis/Api/GoodCache.php b/app/Cache/Redis/Api/GoodCache.php index b16826c..e6e41c9 100644 --- a/app/Cache/Redis/Api/GoodCache.php +++ b/app/Cache/Redis/Api/GoodCache.php @@ -294,7 +294,7 @@ class GoodCache * @throws ContainerExceptionInterface * @throws NotFoundExceptionInterface */ - public function delCache(int $kitchenId,int $cycleId) + public function delCache(int $kitchenId,int $cycleId): void { $keyArr = [ ApiRedisKey::mealGoodListKey($cycleId,$kitchenId), diff --git a/app/Service/Api/Order/PlaceOrderService.php b/app/Service/Api/Order/PlaceOrderService.php index 1518dc5..0d21c18 100644 --- a/app/Service/Api/Order/PlaceOrderService.php +++ b/app/Service/Api/Order/PlaceOrderService.php @@ -79,6 +79,8 @@ class PlaceOrderService extends BaseOrderService $this->sendStockMq($this->orderId,OrderCode::WAIT_PAY); + $this->orderRes['order_id'] = $this->orderId; + return $this->return->success('success',$this->orderRes); } @@ -195,7 +197,7 @@ class PlaceOrderService extends BaseOrderService $orderInsertModel->copies = $this->orderRes['copies']; $orderInsertModel->type = $this->orderType; $orderInsertModel->total_price = $this->orderRes['total_price']; - $orderInsertModel->actual_price = $this->orderRes['actual_price']; + $orderInsertModel->actual_price = max($this->orderRes['actual_price'], 0); $orderInsertModel->discount_price = $this->orderRes['favorable_sundry_price'] + $this->orderRes['favorable_good_price']; $orderInsertModel->status = OrderCode::WAIT_PAY; $orderInsertModel->is_refund_all = OrderCode::REFUND_NULL; diff --git a/app/Service/Api/Pay/PlacePayService.php b/app/Service/Api/Pay/PlacePayService.php index 6112188..65cea8a 100644 --- a/app/Service/Api/Pay/PlacePayService.php +++ b/app/Service/Api/Pay/PlacePayService.php @@ -15,11 +15,18 @@ use App\Cache\Redis\RedisCache; use App\Constants\Common\OrderCode; use App\Constants\Common\PayCode; use App\Exception\ErrException; +use App\Extend\SystemUtil; use App\Model\Order; use App\Model\PayOrder; use App\Model\UserThird; use App\Service\Api\BaseService; use App\Service\Common\Pay\Wx\WxJsRechargeOrderService; +use App\Service\ServiceTrait\Api\CateringTrait; +use App\Service\ServiceTrait\Api\CouponTrait; +use App\Service\ServiceTrait\Api\GoodOrderTrait; +use App\Service\ServiceTrait\Api\RefundOrderTrait; +use App\Service\ServiceTrait\Common\OrderChangeStatusTrait; +use Hyperf\DbConnection\Db; use Hyperf\Di\Annotation\Inject; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; @@ -44,17 +51,18 @@ class PlacePayService extends BaseService /** * @var Order */ - private Order $orderModel; + #[Inject] + protected Order $orderModel; /** * @var mixed */ - private mixed $orderInfo; + private Order $orderInfo; /** * @var mixed */ - private mixed $payInfo; + private PayOrder $payInfo; /** * @var string @@ -91,10 +99,15 @@ class PlacePayService extends BaseService $this->orderType = (int)$this->request->input('order_type'); $this->payType = (int)$this->request->input('pay_type'); - $this->orderModel = (new OrderTypeFactory)->getPayOrderModel($this->payType); + $this->orderModel = (new OrderTypeFactory)->getPayOrderModel($this->orderType); $this->checkOrder(); + //小于等于 0 直接支付 + if ($this->orderInfo->actual_price <= 0) return $this->directPayment(); + + $this->checkPayOrder(); + $this->setPayInfo(); $rechargeService = match ($this->payType) @@ -106,17 +119,22 @@ class PlacePayService extends BaseService $rechargeService->setConfig(); $rechargeService->setNotify(); + // 测试环境 0.01 + if (!SystemUtil::checkProEnv() && $this->orderInfo->actual_price > 0) $this->orderInfo->actual_price = '0.01'; + $payData = $rechargeService->pay( (float)$this->orderInfo->actual_price, - $this->request->input('body','订单支付'), - $this->orderInfo->order_no, +// $this->request->input('body','订单支付'), + $this->orderInfo->id, + $this->orderInfo->order_sno, $this->userId ); $res = [ 'orderId' => $this->orderId, 'wechat_pay' => [], - 'alipay' => [] + 'alipay' => [], + 'status' => $this->orderInfo->status ]; //返回支付数组 @@ -130,6 +148,62 @@ class PlacePayService extends BaseService return $this->return->success('success', $res); } + use GoodOrderTrait; + use CateringTrait; + use OrderChangeStatusTrait; + private bool $isCatering; + + private function directPayment(): array + { + switch ($this->orderType) { + case OrderCode::ORDER_TYPE_GOOD: + Db::transaction(function (){ + $this->manageOrder(); + + $this->isCatering = $this->manageAddCateringLog(); + }); + + //已经截单 自动退款 + if (!$this->isCatering) $this->directGoodRefund(); + break; + case OrderCode::ORDER_TYPE_BALANCE: + echo 1; + break; + default: + throw new ErrException('订单类型错误'); + } + + $res = [ + 'orderId' => $this->orderId, + 'wechat_pay' => [], + 'alipay' => [], + 'status' => $this->orderInfo->status + ]; + + $this->redisCache->delLock($this->lockKey); + + return $this->return->success('success', $res); + } + + use RefundOrderTrait; + use CouponTrait; + + /** + * @return void + */ + private function directGoodRefund(): void + { + Db::transaction(function (){ +// $this->manageRefundOrder(); + + $this->manageOrderByRefund(); + + $this->manageSubCateringLog(); + + if ($this->orderInfo->coupin_id > 0) $this->rollbackCoupon(OrderCode::ORDER_TYPE_GOOD,$this->orderInfo); + }); + } + private function setAliPayOrder(): null { return null; @@ -176,7 +250,7 @@ class PlacePayService extends BaseService $this->payInfo->user_id = $this->userId; $this->payInfo->order_id = $this->orderId; $this->payInfo->order_type = $this->orderType; - $this->payInfo->order_no = $this->orderInfo->order_no; + $this->payInfo->order_no = $this->orderInfo->order_sno; $this->payInfo->pay_money = $this->orderInfo->actual_price; $this->payInfo->recharge_type = $this->payType; $this->payInfo->status = PayCode::WAIT_PAY; @@ -195,7 +269,13 @@ class PlacePayService extends BaseService if (empty($this->orderInfo)) throw new ErrException('该订单为空'); if ($this->orderInfo->user_id != $this->userId) throw new ErrException('该订单不属于你'); if ($this->orderInfo->status != OrderCode::WAIT_PAY) throw new ErrException('该订单已支付或已取消,请确认后重试'); + } + /** + * @return void + */ + private function checkPayOrder(): void + { $this->payInfo = $this->payOrderModel->getInfoByOrderIdAndType($this->orderId,$this->orderType); if (empty($this->payInfo)) return; if ($this->payInfo->status == PayCode::FINISH_PAY) throw new ErrException('该订单已支付,请确认后重试'); diff --git a/app/Service/Common/Pay/Wx/WxJsRechargeBaseService.php b/app/Service/Common/Pay/Wx/WxJsRechargeBaseService.php index a49ea6d..d758af4 100644 --- a/app/Service/Common/Pay/Wx/WxJsRechargeBaseService.php +++ b/app/Service/Common/Pay/Wx/WxJsRechargeBaseService.php @@ -150,14 +150,13 @@ abstract class WxJsRechargeBaseService implements ThirdPayInterface 'description' => '测试订单', 'amount' => [ 'total' => (int)bcmul((string)$money, "100"), - 'currency' => 'CNY' ], 'payer' => [ - 'openid' => $this->openId, - ] + 'sub_openid' => $this->openId, + ], ]; - $result = $this->ysdPay->wechat($this->config)->mini($wxOrder); + $result = $this->ysdPay->wechat(array_merge($this->config, ['_force' => true]))->mp($wxOrder); $this->log->callbackLog(__CLASS__.'微信支付调起数据|回调地址:'. json_encode($this->config['wechat']['default']).'|回调数据:'.json_encode($result).'|请求数据:'.json_encode($wxOrder)); return $result; diff --git a/app/Service/Common/Pay/Wx/WxJsRechargeOrderService.php b/app/Service/Common/Pay/Wx/WxJsRechargeOrderService.php index d42deef..1470d39 100644 --- a/app/Service/Common/Pay/Wx/WxJsRechargeOrderService.php +++ b/app/Service/Common/Pay/Wx/WxJsRechargeOrderService.php @@ -3,13 +3,13 @@ namespace App\Service\Common\Pay\Wx; use App\Constants\Common\OrderCode; -use App\Model\Order; +use App\Service\ServiceTrait\Api\CateringTrait; use App\Service\ServiceTrait\Api\CheckOrderCallBackTrait; +use App\Service\ServiceTrait\Api\CouponTrait; use App\Service\ServiceTrait\Api\GoodOrderTrait; use App\Service\ServiceTrait\Api\OrderTrait; use App\Service\ServiceTrait\Api\PayFinishTrait; use App\Service\ServiceTrait\Api\RefundOrderTrait; -use App\Service\ServiceTrait\CateringTrait; use App\Service\ServiceTrait\Common\OrderChangeStatusTrait; use Hyperf\DbConnection\Db; use Psr\Container\ContainerExceptionInterface; @@ -26,7 +26,8 @@ class WxJsRechargeOrderService extends WxJsRechargeBaseService RefundOrderTrait, OrderTrait, OrderChangeStatusTrait, - CateringTrait; + CateringTrait, + CouponTrait; /** * @@ -121,6 +122,8 @@ class WxJsRechargeOrderService extends WxJsRechargeBaseService $this->manageOrderByRefund(); $this->manageSubCateringLog(); + + if ($this->orderInfo->coupin_id > 0) $this->rollbackCoupon(OrderCode::ORDER_TYPE_GOOD,$this->orderInfo); }); $this->sendStockMq($this->orderInfo->id,$this->orderInfo->status); diff --git a/app/Service/ServiceTrait/CateringTrait.php b/app/Service/ServiceTrait/Api/CateringTrait.php similarity index 99% rename from app/Service/ServiceTrait/CateringTrait.php rename to app/Service/ServiceTrait/Api/CateringTrait.php index 5f865fd..bb04ad8 100644 --- a/app/Service/ServiceTrait/CateringTrait.php +++ b/app/Service/ServiceTrait/Api/CateringTrait.php @@ -1,6 +1,6 @@ coupon_id <= 0) return; + + $couponInfo = $this->userCouponModel->where('coupon_id', $orderInfo->coupon_id)->where('user_id',$orderInfo->user_id)->first(); + + if (empty($couponInfo)) return; + + $couponInfo->status = CouponCode::COUPON_STATUS_UNUSED; + + if (date('Y-m-d H:i:s') > $couponInfo->validity_end_time) $couponInfo->status = CouponCode::COUPON_STATUS_EXPIRE; + + if (!$couponInfo->save()) throw new Exception('CancelOrderConsumer:error:couponStatusUpdateError:'.json_encode($orderInfo->toArray())); + } +} \ No newline at end of file diff --git a/app/Service/ServiceTrait/Api/OrderTrait.php b/app/Service/ServiceTrait/Api/OrderTrait.php index 037be9c..256bc87 100644 --- a/app/Service/ServiceTrait/Api/OrderTrait.php +++ b/app/Service/ServiceTrait/Api/OrderTrait.php @@ -102,11 +102,10 @@ trait OrderTrait protected function checkGood(): void { foreach ($this->cartFirstData as $key => $one) { + if (!in_array($key, $this->goodIds)) throw new ErrException('商品不存在',ApiCode::ORDER_GOOD_IN_EXISTENCE); + if ($this->orderType == 0) $this->orderType = $this->skuArr[$key]['type']; if ($this->skuArr[$key]['type'] != $this->orderType) throw new ErrException('自选菜品跟套餐菜品请分开订单下单'); - - if (in_array($key, $this->goodIds)) continue; - throw new ErrException('商品不存在',ApiCode::ORDER_GOOD_IN_EXISTENCE); } } @@ -206,6 +205,7 @@ trait OrderTrait $this->skuArr = array_column($skuArr,null,'id'); $this->skuImageArr = array_column($skuArr,null,'id'); $this->goodIds = array_column($skuArr,'id'); + unset($skuArr); } diff --git a/config/autoload/ysdPay.php b/config/autoload/ysdPay.php index 81df5ce..3adcc43 100644 --- a/config/autoload/ysdPay.php +++ b/config/autoload/ysdPay.php @@ -11,35 +11,35 @@ return [ // 必填-商户秘钥 'mch_secret_key' => env('WX_PAYMENT_MCH_SECRET_KEY'), // 必填-商户私钥 字符串或路径 - 'mch_secret_cert' => env('WX_PAYMENT_MCH_SECRET_CERT'), + 'mch_secret_cert' => __DIR__. '/../pay/wx/apiclient_key.pem', // 必填-商户公钥证书路径 - 'mch_public_cert_path' => env('WX_PAYMENT_MCH_PUBLIC_CERT_PATH'), + 'mch_public_cert_path' => __DIR__ . '/../pay/wx/apiclient_cert.pem', // 必填 'notify_url' => env('WX_PAYMENT_NOTIFY_URL'), // 选填-公众号 的 app_id - 'mp_app_id' => '', + 'mp_app_id' => env('WX_PAYMENT_MINI_APP_ID'), // 选填-小程序 的 app_id 'mini_app_id' => '', // 选填-app 的 app_id - 'app_id' => env('WX_PAYMENT_APP_ID'), + 'app_id' => '', // 选填-合单 app_id 'combine_app_id' => '', // 选填-合单商户号 'combine_mch_id' => '', // 选填-服务商模式下,子公众号 的 app_id - 'sub_mp_app_id' => '', + 'sub_mp_app_id' => env('WX_PAYMENT_SUB_MINI_APP_ID'), // 选填-服务商模式下,子 app 的 app_id 'sub_app_id' => '', // 选填-服务商模式下,子小程序 的 app_id 'sub_mini_app_id' => '', // 选填-服务商模式下,子商户id - 'sub_mch_id' => '', + 'sub_mch_id' => env('WX_PAYMENT_SUB_MCH_ID'), // 选填-微信公钥证书路径, optional,强烈建议 php-fpm 模式下配置此参数 'wechat_public_cert_path' => [ // '45F59D4DABF31918AFCEC556D5D2C6E376675D57' => __DIR__ . '/Cert/wechatPublicKey.crt', ], // 选填-默认为正常模式。可选为: MODE_NORMAL, MODE_SERVICE - 'mode' => Pay::MODE_NORMAL + 'mode' => Pay::MODE_SERVICE ] ], 'alipay' => [ @@ -66,7 +66,7 @@ return [ ], 'logger' => [ // optional 'enable' => true, - 'file' => BASE_PATH . '/runtime/payment/ysd_pay.log', + 'file' => BASE_PATH . '/runtime/logs/payment/ysd_pay.log', 'level' => 'debug', // 建议生产环境等级调整为 info,开发环境为 debug 'type' => 'single', // optional, 可选 daily. 'max_file' => 30 // optional, 当 type 为 daily 时有效,默认 30 天 diff --git a/config/pay/wx/apiclient_cert.p12 b/config/pay/wx/apiclient_cert.p12 new file mode 100755 index 0000000..e0adff2 Binary files /dev/null and b/config/pay/wx/apiclient_cert.p12 differ diff --git a/config/pay/wx/apiclient_cert.pem b/config/pay/wx/apiclient_cert.pem new file mode 100755 index 0000000..f701f3a --- /dev/null +++ b/config/pay/wx/apiclient_cert.pem @@ -0,0 +1,25 @@ +-----BEGIN CERTIFICATE----- +MIIEKDCCAxCgAwIBAgIUQxlEa66GkfyyctUmrnY2LuMMTCUwDQYJKoZIhvcNAQEL +BQAwXjELMAkGA1UEBhMCQ04xEzARBgNVBAoTClRlbnBheS5jb20xHTAbBgNVBAsT +FFRlbnBheS5jb20gQ0EgQ2VudGVyMRswGQYDVQQDExJUZW5wYXkuY29tIFJvb3Qg +Q0EwHhcNMjUwMzE3MDMxODExWhcNMzAwMzE2MDMxODExWjCBgTETMBEGA1UEAwwK +MTY1NjA5NzI4MTEbMBkGA1UECgwS5b6u5L+h5ZWG5oi357O757ufMS0wKwYDVQQL +DCTljqbpl6jpnZLpm4nnvZHnu5znp5HmioDmnInpmZDlhazlj7gxCzAJBgNVBAYT +AkNOMREwDwYDVQQHDAhTaGVuWmhlbjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC +AQoCggEBAL+1FtAf2ChXnzi4AxYyl8rB7jbCv9IWH2XG9mW0tFf8500vgGeIG9Z8 +qVT8gKBlXnhYOSIvgHl/qTs7zC6j0qt2wtD3QbjGt7n5RMBX/FGMRcZekU6YD23h +k2D7jAeiyUTdezXYml27Qtn/zGmYthRurMTJU1H6zjlBjb86Vc/uikDO5yngU9qV +cICgAhks2S2h9V6ch5gxzDO+ddt49HzBPow5wV7kRdkZcfRmfB8+ByN1x00FadOI +u4feXQ+2dbfbpBiNZ5iMj2eoPxVNNOgeE0aT3eRD+BI7FiP7XsUWd/jHAqJVzqIK +jfIRODWk4sUjTZ34vU+EZA6QNdZSId0CAwEAAaOBuTCBtjAJBgNVHRMEAjAAMAsG +A1UdDwQEAwID+DCBmwYDVR0fBIGTMIGQMIGNoIGKoIGHhoGEaHR0cDovL2V2Y2Eu +aXRydXMuY29tLmNuL3B1YmxpYy9pdHJ1c2NybD9DQT0xQkQ0MjIwRTUwREJDMDRC +MDZBRDM5NzU0OTg0NkMwMUMzRThFQkQyJnNnPUhBQ0M0NzFCNjU0MjJFMTJCMjdB +OUQzM0E4N0FEMUNERjU5MjZFMTQwMzcxMA0GCSqGSIb3DQEBCwUAA4IBAQBf/qyi +IAIapW1MvAGjLfvu2B1M4NzwvwTLO8UKNKG4tzQog/aPg0yb3ZCL1IIDnZ4winUZ +Vt+aqZghvI0duLRHYORZeurfXCPtARzYncNDD6Ixhqo/5+9ZJqtcTN7jIdkRjNjY +UZd4X75RpnTnWjQdLQ7yH6dqWy2PGQA3allA5b4Zn7yjQROqqBbi9VsS9VigfIVl +AckdS/zSPCWUFi0U4BdR/EsoGiBqvXqvUitMZWWQNKETNDEc4Uqm/uNzdm0dV938 +8cTwdvbHF1l0jYjVhmf5jisNruhRCokh1daCPNoRjZmsT8DWYT8+bnxx5mUl4Iw5 +8hsu4IplxfERKBO3 +-----END CERTIFICATE----- diff --git a/config/pay/wx/apiclient_key.pem b/config/pay/wx/apiclient_key.pem new file mode 100755 index 0000000..9ea8629 --- /dev/null +++ b/config/pay/wx/apiclient_key.pem @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQC/tRbQH9goV584 +uAMWMpfKwe42wr/SFh9lxvZltLRX/OdNL4BniBvWfKlU/ICgZV54WDkiL4B5f6k7 +O8wuo9KrdsLQ90G4xre5+UTAV/xRjEXGXpFOmA9t4ZNg+4wHoslE3Xs12Jpdu0LZ +/8xpmLYUbqzEyVNR+s45QY2/OlXP7opAzucp4FPalXCAoAIZLNktofVenIeYMcwz +vnXbePR8wT6MOcFe5EXZGXH0ZnwfPgcjdcdNBWnTiLuH3l0PtnW326QYjWeYjI9n +qD8VTTToHhNGk93kQ/gSOxYj+17FFnf4xwKiVc6iCo3yETg1pOLFI02d+L1PhGQO +kDXWUiHdAgMBAAECggEBAK3+1FfNr0jeTjsSeGq7PJ3gai71j1hEj/a2IIiq/Ewn +1F9vz6EoHewMdTwXeT8bAiVEHYbzii28OoLygR2Lvve08Jjs8Y+dfL+kiEvzD6WM +JQAocMXeqZJXfIY3iR6dFwQT6XIzx9du0Pw/eO4Wlpvw34o0GBV+B5Jb9yUq8xum +mDYELmgJeBq/1g+oFOYN7QsysnXHlp9G1eUu1l2A71NNShcJh9UNZBbXSLuDSlYb +OgkM5/cIZEUdblG1RT/tnU1hTbBq50eH4hzMZwhPuK9I7RgLrkYe3c3WFXSHPJIE +6y5xSU8s1hsf+ORUuta7lu/CcUyEt0yqLT6vs24ZyAECgYEA7vbQFo68sUaviqSC +iKTA2bSKILGBLsQfEqoJtlUzQyyMfkh+0gFeKG4NonZovd+yUj8ZiSa2mhQt/EKV +5QFFMTdbb/jFVMghLZ2u8h4DMiSsxLV64mmUxIt553TqwK//AQS4Iq1mPQnufA93 +QEczj65aAhCh34QO4+oRRceUIt0CgYEAzV/SmqtofuGBPJEbhKKxafQQIxKVCBOM +WrdMLzUNskJWJIicOB1ZPzgpEdqKXe5nQKufjw2caZXgIjgfrovX8WHa3zgy6bPA +QUH6uvFa7dwYuVcn++18/kJeCuP/u7ImIrIjhFxfjqrxXgS7fX+idVvdhvMHrUR8 +GCrGfhoQiwECgYEAry4opiDFm4AiOBUZzGpbJj3/9K+r8Ei+LsSQkiYrilciN4GV +1wZBrInhXPRJHMjcxQaVBcJnotSgUYnOsS8ZNldKpO9OWjTMfdBW7A+scBoKvbn8 +9/ZGpT9Kgq9nWRKscmavRlyv0pdxSWldFrYbyn0aZuEiieUZtWNmfi0tH9ECgYEA +r/Osp7665Bmnc5COlvAcN75WJPZCoIy+7umjZ754YYTb8Kjpzlm2oKco6JbnfNpH +s+xV42Wx3/P79tVGr3A4LiG8Nwoa9IZ/7Gjuu0MUuDydIg09wGUTdXK+x23XJ6PV +cFxWeYv6gmyKJha/2yGCujFedcO5jATknH/pVxhVnAECgYAFYVuGQKsVQsjoihfu +hVbIMmYkZ3akThLbM6MmAp4mYMLlGMQKSPcCncJrg1OXy3IOHoXUQGLeLSwLFYg2 +bfodXSeaxxZSlucdQNia8GP5gsdxMrcil4e6IbUUZUdm9bzDS8A30de8Fa+rMgjM +zsWYivNo++7l1h7lAEmgI5DcAA== +-----END PRIVATE KEY----- diff --git a/env.local.other b/env.local.other new file mode 100644 index 0000000..7e2a7d1 --- /dev/null +++ b/env.local.other @@ -0,0 +1,50 @@ +# [app] -- 集群配置需一致 +APP_NAME=hhl_meal +APP_ENV=dev +API_RETURN_KEY=hhl@shenzhen +JWT_KEY=hhl@shenzhen +JWT_EXPIRE=2592000 +ADMIN_JWT_EXPIRE=86400 + +# [ide] +DEVTOOL_IDE=phpstorm + +# [crontab] -- 集群配置 仅需一台true即可 其他都是false 根据 restart_pre.sh 自动生成 +CRONTAB_ENABLE=false + +# [mysql] -- 集群配置需一致 +DB_DRIVER=mysql +DB_HOST=192.168.15.68 +DB_PORT=3306 +DB_DATABASE=hhl_meal +DB_USERNAME=hhl +DB_PASSWORD=hhltest +DB_CHARSET=utf8mb4 +DB_COLLATION=utf8mb4_unicode_ci +DB_PREFIX=app_ + +# [redis] -- 集群配置需一致 +REDIS_HOST=192.168.15.68 +REDIS_AUTH=hhltest +REDIS_PORT=6379 +REDIS_DB=0 +SYSTEM_REDIS_DB=1 +LOCK_REDIS_DB=2 + +# [rabbitmq] -- 集群配置需一致 +AMQP_HOST=192.168.15.68 +AMQP_PORT=5672 +AMQP_USER=admin +AMQP_PASSWORD=123456 +AMQP_VHOST=/ + +# [ali] -- 集群配置需一致 +ALI_ACCESS_KEY_ID=LTAI5tFsBsKskcrRmkjpMXay +ALI_ACCESS_KEY_SECRET=YSIMtOGLu7W8tpQLKdgioTUYmgXB8M +ALI_BUCKET=hhl-catering +ALI_REGION=cn-shenzhen +ALI_CALLBACK_URL=https://new-api-pre.hehele.cc/common/oss/ossCallBack +ALI_OSS_URL=https://hhl-catering.oss-cn-shenzhen.aliyuncs.com/ +ALI_STS_ENDPOINT=sts.cn-shenzhen.aliyuncs.com +ALI_ROLE_ARN=acs:ram::1644087445786901:role/oss +ALI_OSS_ENDPOINT=oss-cn-shenzhen.aliyuncs.com \ No newline at end of file