优化上游结算包名

master
chenzhi 4 years ago
parent 2de8e4a313
commit 51c4b07eea

@ -361,7 +361,7 @@ class CompanyStatementSetController extends Controller {
{ {
$game_where = "partner_id in ({$cp_id})"; $game_where = "partner_id in ({$cp_id})";
$game = M('game','tab_'); $game = M('game','tab_');
$gameDbRes = $game->field("id,relation_game_name as game_name,partner_id as cp_id,original_package_name")->where($game_where)->select(); $gameDbRes = $game->field("id,relation_game_name as game_name,partner_id as cp_id,original_package_name,select_package_name")->where($game_where)->select();
$gameList=[]; $gameList=[];
foreach ($gameDbRes as $k => $v) { foreach ($gameDbRes as $k => $v) {
$gameList[$v['id']] =$v; $gameList[$v['id']] =$v;
@ -392,7 +392,11 @@ class CompanyStatementSetController extends Controller {
if(empty($v['original_package_name'])){ if(empty($v['original_package_name'])){
$game_name = $v['game_name']; $game_name = $v['game_name'];
}else{ }else{
$game_name = $v['original_package_name']; if($v['select_package_name'] == 1){
$game_name = $v['original_package_name'];
}else{
$game_name = $v['game_name'];
}
} }
$cp_id = $v['cp_id']; $cp_id = $v['cp_id'];
unset($v['cp_id']); unset($v['cp_id']);

Loading…
Cancel
Save