更新
This commit is contained in:
parent
8d56c24155
commit
261a25481e
@ -8,6 +8,7 @@ use Symfony\Component\HttpClient\HttpClient;
|
|||||||
use think\queue\Job;
|
use think\queue\Job;
|
||||||
use think\facade\Log;
|
use think\facade\Log;
|
||||||
use app\common\model\Company;
|
use app\common\model\Company;
|
||||||
|
use app\common\model\informationg\UserInformationg;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 任务结算执行的具体逻辑
|
* 任务结算执行的具体逻辑
|
||||||
@ -24,7 +25,7 @@ class TaskInformationJob
|
|||||||
$arr['status'] = 0;
|
$arr['status'] = 0;
|
||||||
//信息更新
|
//信息更新
|
||||||
if ($data['template_info']['type'] == 31) {
|
if ($data['template_info']['type'] == 31) {
|
||||||
if($data['template_info']['information_count'] < $data['template_info']['information_day_count']){
|
if ($data['template_info']['information_count'] < $data['template_info']['information_day_count']) {
|
||||||
Log::info('任务结算失败,信息更新未达到要求:' . json_encode($data));
|
Log::info('任务结算失败,信息更新未达到要求:' . json_encode($data));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -77,8 +78,14 @@ class TaskInformationJob
|
|||||||
if ($json['status'] == 200) {
|
if ($json['status'] == 200) {
|
||||||
$arr['total_price'] = $json['data']['total_price'];
|
$arr['total_price'] = $json['data']['total_price'];
|
||||||
//基础金额*(每日基户数*天数)//且户数小于公司总户数
|
//基础金额*(每日基户数*天数)//且户数小于公司总户数
|
||||||
// $day=date('d',time())>;
|
$user_count = UserInformationg::where('company_id', $data['company_id'])->count();
|
||||||
if ($json['data']['total_price'] > 58*5) {
|
$user_count_two = 5 * $company['day_count'];
|
||||||
|
if ($user_count_two > $user_count) {
|
||||||
|
$user_count_money = 58 * $user_count;
|
||||||
|
} else {
|
||||||
|
$user_count_money = 58 * $user_count_two;
|
||||||
|
}
|
||||||
|
if ($json['data']['total_price'] > $user_count_money) {
|
||||||
$arr['status'] = 1;
|
$arr['status'] = 1;
|
||||||
$name = '片区交易';
|
$name = '片区交易';
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user