|
@@ -1048,7 +1048,45 @@ class IndexController extends WebBaseController
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- $special['point'] = 0;
|
|
|
+ switch ($recruit->special_condition_type){
|
|
|
+ case 0:
|
|
|
+ $special['point'] = 0;
|
|
|
+
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ $special_rule = json_decode($recruit->special_condition_value,true);
|
|
|
+ $conditions = array_column($special_rule['list'],'condition');
|
|
|
+ $special['point'] = 0;
|
|
|
+ if(array_key_exists('multi',$special_rule) && $special_rule['multi'] && is_array($special['condition'])){
|
|
|
+ foreach ($special['condition'] as $v){
|
|
|
+ $key = array_search($v,$conditions);
|
|
|
+ $rule_info = $special_rule['list'][$key];
|
|
|
+ $special['point'] += $rule_info['value'];
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ $key = array_search($special['condition'],$conditions);
|
|
|
+ $rule_info = $special_rule['list'][$key];
|
|
|
+ $special['point'] += $rule_info['value'];
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ $special_rule = json_decode($post_info['special'],true);
|
|
|
+ $conditions = array_column($special_rule['list'],'condition');
|
|
|
+ $special['point'] = 0;
|
|
|
+ if(array_key_exists('multi',$special_rule) && $special_rule['multi'] && is_array($special['condition'])){
|
|
|
+ foreach ($special['condition'] as $v){
|
|
|
+ $key = array_search($v,$conditions);
|
|
|
+ $rule_info = $special_rule['list'][$key];
|
|
|
+ $special['point'] += $rule_info['value'];
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ $key = array_search($special['condition'],$conditions);
|
|
|
+ $rule_info = $special_rule['list'][$key];
|
|
|
+ $special['point'] += $rule_info['value'];
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
if(is_array($special['condition'])){
|
|
|
$special['condition'] = implode(',',$special['condition']);
|
|
|
}
|
|
@@ -1219,6 +1257,44 @@ class IndexController extends WebBaseController
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ switch ($recruit->special_condition_type){
|
|
|
+ case 0:
|
|
|
+ $special['point'] = 0;
|
|
|
+
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ $special_rule = json_decode($recruit->special_condition_value,true);
|
|
|
+ $conditions = array_column($special_rule['list'],'condition');
|
|
|
+ $special['point'] = 0;
|
|
|
+ if(array_key_exists('multi',$special_rule) && $special_rule['multi'] && is_array($special['condition'])){
|
|
|
+ foreach ($special['condition'] as $v){
|
|
|
+ $key = array_search($v,$conditions);
|
|
|
+ $rule_info = $special_rule['list'][$key];
|
|
|
+ $special['point'] += $rule_info['value'];
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ $key = array_search($special['condition'],$conditions);
|
|
|
+ $rule_info = $special_rule['list'][$key];
|
|
|
+ $special['point'] += $rule_info['value'];
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ $special_rule = json_decode($post_info['special'],true);
|
|
|
+ $conditions = array_column($special_rule['list'],'condition');
|
|
|
+ $special['point'] = 0;
|
|
|
+ if(array_key_exists('multi',$special_rule) && $special_rule['multi'] && is_array($special['condition'])){
|
|
|
+ foreach ($special['condition'] as $v){
|
|
|
+ $key = array_search($v,$conditions);
|
|
|
+ $rule_info = $special_rule['list'][$key];
|
|
|
+ $special['point'] += $rule_info['value'];
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ $key = array_search($special['condition'],$conditions);
|
|
|
+ $rule_info = $special_rule['list'][$key];
|
|
|
+ $special['point'] += $rule_info['value'];
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
if(is_array($special['condition'])){
|
|
|
$special['condition'] = implode(',',$special['condition']);
|
|
|
}
|