|
|
|
@ -4,6 +4,7 @@ declare (strict_types=1); |
|
|
|
|
|
|
|
|
|
namespace app\command; |
|
|
|
|
|
|
|
|
|
use app\common\model\user\ValueContributionLog; |
|
|
|
|
use Swoole\Coroutine\MySQL\Exception; |
|
|
|
|
use think\console\Command; |
|
|
|
|
use think\console\Input; |
|
|
|
@ -36,6 +37,15 @@ class dayUserGrowth extends Command |
|
|
|
|
foreach ($user as $k => $v) { |
|
|
|
|
if ($v['all_value'] > 0) { |
|
|
|
|
$growth_num = bcdiv($v['all_value'], $v['growth_rate'], 2); |
|
|
|
|
//加到log日志 |
|
|
|
|
ValueContributionLog::getDB()->insert([ |
|
|
|
|
'type' => 9, |
|
|
|
|
'types_of' => 1, |
|
|
|
|
'num' => $growth_num, |
|
|
|
|
'ctime' => date('Y-m-d H:i:s'), |
|
|
|
|
'memo' => '贡献值转化增值积分', |
|
|
|
|
'user_id' => $v['uid'], |
|
|
|
|
]); |
|
|
|
|
$growth_num = $growth_num+$v['brokerage_price']; |
|
|
|
|
userModel::getDB() |
|
|
|
|
->where('uid', $v['uid']) |
|
|
|
|