Commit 75bb2a35 authored by luhongguang's avatar luhongguang

Merge branch 'colonel' of https://git.yidian-inc.com:8021/bp/goods into colonel

parents 3cfdc6d0 fc3e9ad9
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
use App\Base\Job; use App\Base\Job;
use Api\PhpServices\Idgen\Idgen; use Api\PhpServices\Idgen\Idgen;
use Api\PhpUtils\Log\FileLog;
use App\Models\marketing\mysql\ColonelDistributorColonel; use App\Models\marketing\mysql\ColonelDistributorColonel;
use App\Models\marketing\mysql\ColonelDistributorConfig; use App\Models\marketing\mysql\ColonelDistributorConfig;
use App\Models\marketing\mysql\ColonelDistributorInviteOrderNum; use App\Models\marketing\mysql\ColonelDistributorInviteOrderNum;
...@@ -16,6 +15,7 @@ use App\Exception\custom\InterfaceException; ...@@ -16,6 +15,7 @@ use App\Exception\custom\InterfaceException;
use Api\PhpUtils\Http\HttpUtil; use Api\PhpUtils\Http\HttpUtil;
use App\Models\user\mysql\UserWechatBind; use App\Models\user\mysql\UserWechatBind;
use App\Services\marketing\PindanActivityColonelConfigService; use App\Services\marketing\PindanActivityColonelConfigService;
use Api\PhpUtils\Log\JobLog;
class ColonelorderController extends Job class ColonelorderController extends Job
{ {
...@@ -83,7 +83,7 @@ class ColonelorderController extends Job ...@@ -83,7 +83,7 @@ class ColonelorderController extends Job
if (!ColonelDistributorPayInfo::commit()) { if (!ColonelDistributorPayInfo::commit()) {
throw new Exception(sprintf("事务提交失败 %s", json_encode($data))); throw new Exception(sprintf("事务提交失败 %s", json_encode($data)));
} }
$this->loggerError('success'); $this->loggerInfo('success');
} catch (Exception $e) { } catch (Exception $e) {
ColonelDistributorPayInfo::rollback(); ColonelDistributorPayInfo::rollback();
$this->loggerError('error=' . $e->getMessage()); $this->loggerError('error=' . $e->getMessage());
...@@ -101,7 +101,7 @@ class ColonelorderController extends Job ...@@ -101,7 +101,7 @@ class ColonelorderController extends Job
*/ */
private function getInviteNewUserData($userIds, &$colonelPayInfoData) private function getInviteNewUserData($userIds, &$colonelPayInfoData)
{ {
if ($inviteNewUserList = $this->getInviteNewUserList($userIds,$this->startTime,$this->endTime)) { if ($inviteNewUserList = $this->getInviteNewUserList($userIds, $this->startTime, $this->endTime)) {
$userNickList = $this->getUserList(array_column($inviteNewUserList, 'user_id')); $userNickList = $this->getUserList(array_column($inviteNewUserList, 'user_id'));
foreach ($inviteNewUserList as $newUser) { foreach ($inviteNewUserList as $newUser) {
$colonelPayInfoData[] = [ $colonelPayInfoData[] = [
...@@ -155,7 +155,7 @@ class ColonelorderController extends Job ...@@ -155,7 +155,7 @@ class ColonelorderController extends Job
{ {
$config = ColonelDistributorConfig::getRecord([ $config = ColonelDistributorConfig::getRecord([
'date[<=]' => $settlementDate, 'date[<=]' => $settlementDate,
'type' => ColonelDistributorConfig::TYPE_COLONEL, 'type' => ColonelDistributorConfig::TYPE_COLONEL,
'ORDER' => ['date' => 'DESC'], 'ORDER' => ['date' => 'DESC'],
'LIMIT' => 1 'LIMIT' => 1
]); ]);
...@@ -193,7 +193,7 @@ class ColonelorderController extends Job ...@@ -193,7 +193,7 @@ class ColonelorderController extends Job
* @return array * @return array
* @throws InterfaceException * @throws InterfaceException
*/ */
private function getInviteNewUserList($userIds,$startTime,$endTime): array private function getInviteNewUserList($userIds, $startTime, $endTime): array
{ {
$url = config('interface', 'coupon.background.wx_invite_relation_list_by_user_ids'); $url = config('interface', 'coupon.background.wx_invite_relation_list_by_user_ids');
if (empty($url)) { if (empty($url)) {
...@@ -227,7 +227,7 @@ class ColonelorderController extends Job ...@@ -227,7 +227,7 @@ class ColonelorderController extends Job
]); ]);
$ids = $res['id_datetime']['goods'] ?? []; $ids = $res['id_datetime']['goods'] ?? [];
foreach ($data as $key => $item) { foreach ($data as $key => $item) {
$data[$key]['colonel_distributor_pay_info_id'] = $ids[$key]; $data[$key]['pay_info_trade_id'] = $ids[$key];
} }
return $data; return $data;
} }
...@@ -265,7 +265,7 @@ class ColonelorderController extends Job ...@@ -265,7 +265,7 @@ class ColonelorderController extends Job
*/ */
private function loggerInfo($log) private function loggerInfo($log)
{ {
FileLog::info('colonel_distributor_order', 'colonel_distributor_order:' . $log, false, true); JobLog::getInstance()->info('colonel_distributor_order', $log)->output();
} }
/** /**
...@@ -276,6 +276,6 @@ class ColonelorderController extends Job ...@@ -276,6 +276,6 @@ class ColonelorderController extends Job
*/ */
private function loggerError($log) private function loggerError($log)
{ {
FileLog::error('colonel_distributor_order', $log, null, 'bp-server@yidian-inc.com', true); JobLog::getInstance()->error('colonel_distributor_order', $log, null, 'bp-server@yidian-inc.com')->output();
} }
} }
...@@ -6,10 +6,10 @@ ...@@ -6,10 +6,10 @@
*/ */
use App\Base\Job; use App\Base\Job;
use Api\PhpUtils\Log\FileLog;
use App\Models\marketing\mysql\ColonelDistributorPayInfo; use App\Models\marketing\mysql\ColonelDistributorPayInfo;
use App\Exception\custom\InterfaceException; use App\Exception\custom\InterfaceException;
use Api\PhpUtils\Http\HttpUtil; use Api\PhpUtils\Http\HttpUtil;
use Api\PhpUtils\Log\JobLog;
class ColonelwalletController extends Job class ColonelwalletController extends Job
{ {
...@@ -35,7 +35,7 @@ class ColonelwalletController extends Job ...@@ -35,7 +35,7 @@ class ColonelwalletController extends Job
if ($this->handlePayInfoStatus(array_column($payInfoList, 'pay_info_id'))) { if ($this->handlePayInfoStatus(array_column($payInfoList, 'pay_info_id'))) {
$this->loggerInfo('success'); $this->loggerInfo('success');
} else { } else {
$this->loggerInfo('更新状态失败'); $this->loggerError('更新状态失败');
} }
} }
} }
...@@ -63,7 +63,7 @@ class ColonelwalletController extends Job ...@@ -63,7 +63,7 @@ class ColonelwalletController extends Job
'user_id' => $payInfo['colonel_user_id'], 'user_id' => $payInfo['colonel_user_id'],
'service_name' => self::WALLET_SERVICE_NAME, 'service_name' => self::WALLET_SERVICE_NAME,
'source_name' => self::WALLET_SOURCE_NAME, 'source_name' => self::WALLET_SOURCE_NAME,
'third_order_id' => $payInfo['colonel_distributor_pay_info_id'], 'third_order_id' => $payInfo['pay_info_trade_id'],
'third_order_id_type' => $payInfo['type'], 'third_order_id_type' => $payInfo['type'],
'third_order_desc' => self::getThirdOrderDesc($payInfo), 'third_order_desc' => self::getThirdOrderDesc($payInfo),
'amount' => $payInfo['reward'], 'amount' => $payInfo['reward'],
...@@ -105,7 +105,7 @@ class ColonelwalletController extends Job ...@@ -105,7 +105,7 @@ class ColonelwalletController extends Job
'op' => self::CAPITAL_POOL_OP, 'op' => self::CAPITAL_POOL_OP,
'user_id' => $payInfo['colonel_user_id'], 'user_id' => $payInfo['colonel_user_id'],
'amount' => $payInfo['reward'], 'amount' => $payInfo['reward'],
'third_order_id' => $payInfo['colonel_distributor_pay_info_id'], 'third_order_id' => $payInfo['pay_info_trade_id'],
'third_order_id_type' => $payInfo['type'], 'third_order_id_type' => $payInfo['type'],
'third_order_desc' => self::getThirdOrderDesc($payInfo), 'third_order_desc' => self::getThirdOrderDesc($payInfo),
]; ];
...@@ -133,7 +133,7 @@ class ColonelwalletController extends Job ...@@ -133,7 +133,7 @@ class ColonelwalletController extends Job
// TODO 此处看后期业务发展 看是否需要封装WalletSdk // TODO 此处看后期业务发展 看是否需要封装WalletSdk
$date = date('Y-m-d H:i:s'); $date = date('Y-m-d H:i:s');
return [ return [
'transfer_service_id' => '', //TODO 'transfer_service_id' => appConfig('colonel.wallet.transfer_service_id'),
'sign' => self::getWalletHttpSign($date), 'sign' => self::getWalletHttpSign($date),
'time' => $date 'time' => $date
]; ];
...@@ -148,8 +148,7 @@ class ColonelwalletController extends Job ...@@ -148,8 +148,7 @@ class ColonelwalletController extends Job
*/ */
private function getWalletHttpSign($date): string private function getWalletHttpSign($date): string
{ {
$transfer_service_secret = ''; //TODO return md5($date . appConfig('colonel.wallet.transfer_service_secret'));
return md5($date . $transfer_service_secret);
} }
/** /**
...@@ -202,7 +201,7 @@ class ColonelwalletController extends Job ...@@ -202,7 +201,7 @@ class ColonelwalletController extends Job
*/ */
private function loggerInfo($log) private function loggerInfo($log)
{ {
FileLog::info('colonel_distributor_wallet', 'colonel_distributor_wallet:' . $log, false, true); JobLog::getInstance()->info('colonel_distributor_wallet', $log, false)->output();
} }
/** /**
...@@ -213,6 +212,6 @@ class ColonelwalletController extends Job ...@@ -213,6 +212,6 @@ class ColonelwalletController extends Job
*/ */
private function loggerError($log) private function loggerError($log)
{ {
FileLog::error('colonel_distributor_wallet', $log, null, 'bp-server@yidian-inc.com', true); JobLog::getInstance()->error('colonel_distributor_wallet', $log, null, 'bp-server@yidian-inc.com')->output();
} }
} }
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
"require": { "require": {
"php": "7.2.*", "php": "7.2.*",
"ext-json": "*", "ext-json": "*",
"api/php_utils":"1.0.16", "api/php_utils":"1.0.17",
"api/php_services":"1.0.13", "api/php_services":"1.0.13",
"ext-openssl": "*" "ext-openssl": "*"
}, },
......
This diff is collapsed.
...@@ -13,4 +13,8 @@ idgen.key = "5cfdb867e96374c7883b31d6928cc4cb" ...@@ -13,4 +13,8 @@ idgen.key = "5cfdb867e96374c7883b31d6928cc4cb"
[prod : common] [prod : common]
[perf : common ] [perf : common ]
[test: common ] [test: common ]
[dev : common ] colonel.wallet.transfer_service_id="21090614423333205002"
\ No newline at end of file colonel.wallet.transfer_service_secret="4916927cf3305292f5a524db592dfa95"
[dev : common ]
colonel.wallet.transfer_service_id="21090614322322205004"
colonel.wallet.transfer_service_secret="e24126c53d4507381ff800a6653611e4"
\ No newline at end of file
...@@ -46,6 +46,6 @@ class JobLog ...@@ -46,6 +46,6 @@ class JobLog
public function output() public function output()
{ {
echo $this->log . PHP_EOL; echo $this->log;
} }
} }
...@@ -338,7 +338,7 @@ class ClassLoader ...@@ -338,7 +338,7 @@ class ClassLoader
* Loads the given class or interface. * Loads the given class or interface.
* *
* @param string $class The name of the class * @param string $class The name of the class
* @return bool|null True if loaded, null otherwise * @return true|null True if loaded, null otherwise
*/ */
public function loadClass($class) public function loadClass($class)
{ {
...@@ -347,6 +347,8 @@ class ClassLoader ...@@ -347,6 +347,8 @@ class ClassLoader
return true; return true;
} }
return null;
} }
/** /**
......
This diff is collapsed.
...@@ -17,8 +17,8 @@ return array( ...@@ -17,8 +17,8 @@ return array(
'ad155f8f1cf0d418fe49e248db8c661b' => $vendorDir . '/react/promise/src/functions_include.php', 'ad155f8f1cf0d418fe49e248db8c661b' => $vendorDir . '/react/promise/src/functions_include.php',
'0d59ee240a4cd96ddbb4ff164fccea4d' => $vendorDir . '/symfony/polyfill-php73/bootstrap.php', '0d59ee240a4cd96ddbb4ff164fccea4d' => $vendorDir . '/symfony/polyfill-php73/bootstrap.php',
'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php', 'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
'a9ed0d27b5a698798a89181429f162c5' => $vendorDir . '/khanamiryan/qrcode-detector-decoder/lib/Common/customFunctions.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php', 'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
'a9ed0d27b5a698798a89181429f162c5' => $vendorDir . '/khanamiryan/qrcode-detector-decoder/lib/Common/customFunctions.php',
'8592c7b0947d8a0965a9e8c3d16f9c24' => $vendorDir . '/elasticsearch/elasticsearch/src/autoload.php', '8592c7b0947d8a0965a9e8c3d16f9c24' => $vendorDir . '/elasticsearch/elasticsearch/src/autoload.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php', '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
'3a37ebac017bc098e9a86b35401e7a68' => $vendorDir . '/mongodb/mongodb/src/functions.php', '3a37ebac017bc098e9a86b35401e7a68' => $vendorDir . '/mongodb/mongodb/src/functions.php',
......
...@@ -18,8 +18,8 @@ class ComposerStaticInit14d712e6ba9ca61e9e636d6cf65f43bf ...@@ -18,8 +18,8 @@ class ComposerStaticInit14d712e6ba9ca61e9e636d6cf65f43bf
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php', 'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
'0d59ee240a4cd96ddbb4ff164fccea4d' => __DIR__ . '/..' . '/symfony/polyfill-php73/bootstrap.php', '0d59ee240a4cd96ddbb4ff164fccea4d' => __DIR__ . '/..' . '/symfony/polyfill-php73/bootstrap.php',
'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php', 'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
'a9ed0d27b5a698798a89181429f162c5' => __DIR__ . '/..' . '/khanamiryan/qrcode-detector-decoder/lib/Common/customFunctions.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php', 'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
'a9ed0d27b5a698798a89181429f162c5' => __DIR__ . '/..' . '/khanamiryan/qrcode-detector-decoder/lib/Common/customFunctions.php',
'8592c7b0947d8a0965a9e8c3d16f9c24' => __DIR__ . '/..' . '/elasticsearch/elasticsearch/src/autoload.php', '8592c7b0947d8a0965a9e8c3d16f9c24' => __DIR__ . '/..' . '/elasticsearch/elasticsearch/src/autoload.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php', '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
'3a37ebac017bc098e9a86b35401e7a68' => __DIR__ . '/..' . '/mongodb/mongodb/src/functions.php', '3a37ebac017bc098e9a86b35401e7a68' => __DIR__ . '/..' . '/mongodb/mongodb/src/functions.php',
......
...@@ -27,12 +27,12 @@ ...@@ -27,12 +27,12 @@
}, },
{ {
"name": "api/php_utils", "name": "api/php_utils",
"version": "v1.0.16", "version": "v1.0.17",
"version_normalized": "1.0.16.0", "version_normalized": "1.0.17.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://git.yidian-inc.com:8021/bp/php_utils.git", "url": "https://git.yidian-inc.com:8021/bp/php_utils.git",
"reference": "6c294df8b60aa4b30d40bae7f0f0afb3b5703769" "reference": "aa70ccdd545f3e421eaf717274954990f1805b87"
}, },
"require": { "require": {
"elasticsearch/elasticsearch": "~7.0", "elasticsearch/elasticsearch": "~7.0",
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
"mongodb/mongodb": "1.4.3", "mongodb/mongodb": "1.4.3",
"php": "7.2.*" "php": "7.2.*"
}, },
"time": "2021-09-06T05:39:50+00:00", "time": "2021-09-06T08:57:33+00:00",
"type": "library", "type": "library",
"installation-source": "source", "installation-source": "source",
"autoload": { "autoload": {
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment