Merge pull request 'hotfix/fiance_statement_bug_20210420' (#286) from hotfix/fiance_statement_bug_20210420 into release

/286
master
陈志 4 years ago
commit c5f28ad116

@ -45,7 +45,7 @@ $('.btn-close-{$name}').click(function(event) {
'fileTypeExts' : '*.jpg; *.jpeg; *.png; *.gif;',
"onUploadSuccess" : uploadPicture{$name},
'onFallback' : function() {
alert('未检测到兼容版本的Flash.');
// alert('未检测到兼容版本的Flash.');
}
});
})

@ -78,16 +78,12 @@ class ConsoleController extends Think {
foreach ($tasks as $task) {
if ($task['type'] == 1) {
$message = '推广员迁移[' . $task['id'] . ']';
$result = $promoteService->shiftPromote($task);
if ($result['status']) {
$message = 'SUCCESS ----- ' . $message . $result['msg'];
} else {
$message = 'ERROR ----- ' . $message . $result['msg'];
}
Printer::export($message);
} elseif ($task['type'] == 2) {
$message = '玩家迁移[' . $task['id'] . ']';
$result = $promoteService->shiftPlayer($task);
} else {
$message = '未知类型迁移[' . $task['id'] . ']';
}
$result = $promoteService->shift($task);
if ($result['status']) {
$message = 'SUCCESS ----- ' . $message . $result['msg'];
} else {
@ -96,7 +92,6 @@ class ConsoleController extends Think {
Printer::export($message);
}
}
}
public function runTask($queue = 'common', $count = 10)
{

@ -202,10 +202,11 @@ class FileController extends AdminController
/* 调用文件上传组件上传文件 */
$Picture = D('Picture');
$pic_driver = C('PICTURE_UPLOAD_DRIVER');
// dd(I('icon'));
if (I('icon')) {
if ($_FILES['file']['size'] > 51200) {
$return = array('status' => 1001, 'info' => '图片大小不得超过50k', 'data' => '');
if ($_FILES['file']['size'] > 2*1024*1024) {
$return = array('status' => 1001, 'info' => '图片大小不得超过2M', 'data' => '');
$this->ajaxReturn($return);
}
}

@ -7,15 +7,6 @@ class ShiftTaskController extends Think {
public function test()
{
$list = M('ShiftTask')->where(['status' => 0])->select();
$service = new PromoteService();
foreach ($list as $task) {
if ($task['type'] == 1) {
$result = $this->shiftPromote($task);
} elseif ($task['type'] == 2) {
$result = $this->shiftPlayer($task);
}
}
}
}

@ -49,6 +49,14 @@
<input type="hidden" name="game_appid" value="">
</td>
</tr>
<tr>
<td class="l">游戏原包名称:</td>
<td class="r" >
<input type="text" class="txt " name="original_package_name" value="" placeholder="请输入游戏原包名称">
</td>
</tr>
<tr>
<td class="l">游戏类型:</td>
<td class="r">
@ -278,7 +286,7 @@
</div>
</div>
</span>
<span class="notice-text">尺寸不得小于512*512px圆角半径113px不强制要求可直接提供512*512方图</span>
<span class="notice-text">尺寸不得小于512*512px圆角半径113px不强制要求可直接提供512*512方图不得大于2M</span>
</td>
</tr>
<tr class="picbox">
@ -1468,7 +1476,7 @@
thumb:true,
compress:false,
prepareNextFile: true,
formData: function(){return $.extend(true, {}, userInfo);},
formData: function(){return $.extend(true, {icon:1}, userInfo);},
chunked:false,
duplicate: true
});
@ -1567,6 +1575,11 @@
return false;
});
if (response.status==1001) {
alert('图片大小不得超过2M');
$('#icon_thelist').children().last().remove();
location.reload()
}
});
function setIconVal()

@ -316,7 +316,7 @@
</div>
</div>
</span>
<span class="notice-text">尺寸不得小于125*125px大小不得超过50K</span>
<span class="notice-text">尺寸不得小于512*512px圆角半径113px不强制要求可直接提供512*512方图不得大于2M</span>
</td>
</tr>
<tr class="picbox">
@ -2586,7 +2586,7 @@
});
if (response.status==1001) {
alert('图片大小不得超过50k');
alert('图片大小不得超过2M');
$('#icon_thelist').children().last().remove();
location.reload()
}

@ -534,7 +534,7 @@ $("#upload_picture_icon").uploadify({
'fileTypeExts' : '*.jpg; *.jpeg; *.png; *.gif;',
"onUploadSuccess" : upload_picture_icon{$field.name},
'onFallback' : function() {
alert('未检测到兼容版本的Flash.');
// alert('未检测到兼容版本的Flash.');
}
});
function upload_picture_icon{$field.name}(file, data){
@ -569,7 +569,7 @@ $("#upload_picture_cover").uploadify({
'fileTypeExts' : '*.jpg; *.jpeg; *.png; *.gif;',
"onUploadSuccess" : upload_picture_cover{$field.name},
'onFallback' : function() {
alert('未检测到兼容版本的Flash.');
// alert('未检测到兼容版本的Flash.');
}
});
function upload_picture_cover{$field.name}(file, data){
@ -602,7 +602,7 @@ $("#upload_picture_detail").uploadify({
'fileTypeExts' : '*.jpg; *.jpeg; *.png; *.gif;',
"onUploadSuccess" : upload_picture_detail{$field.name},
'onFallback' : function() {
alert('未检测到兼容版本的Flash.');
// alert('未检测到兼容版本的Flash.');
}
});
function upload_picture_detail{$field.name}(file, data){

@ -203,6 +203,7 @@ class PromoteService {
$secondMap['parent_id'] = ['in', $shiftIds];
}
try {
M('promote', 'tab_')->where($firstMap)->save([
'parent_id' => $toPromote['id'],
'parent_name' => $toPromote['account'],
@ -215,14 +216,12 @@ class PromoteService {
'level' . $toPromote['level'] => $toPromote['id']
]);
$status = M('ShiftTask')->where('id=' . $task['id'])->save(['status' => 1, 'handle_time' => time()]);
if (!$status) {
$model->rollback();
return ['status' => false, 'msg' => '系统异常,修改迁移任务状态失败'];
}
$model->commit();
return ['status' => true, 'msg' => '推广帐号迁移成功'];
} catch (\Exception $e) {
$model->rollback();
return ['status' => true, 'msg' => '推广帐号迁移失败: ' . $e->getMessage()];
}
}
public function shiftRemoveCoin($promote, $task)
@ -234,7 +233,7 @@ class PromoteService {
$topBalanceCoin = $this->getBalanceCoin($topPromote['id'], 0);
$topBalancePlus = 0;
$map = ['chain' => $promote['chain'] . $chain['id'] . '/%'];
$map = ['chain' => $promote['chain'] . $promote['id'] . '/%'];
if (count($shiftIds) > 0) {
$map['id'] = ['in', $shiftIds];
}
@ -358,7 +357,6 @@ class PromoteService {
$formConpany = M('promote_company', 'tab_')->field(['company_name', 'company_belong'])->where(['id' => $fromPromote['company_id']])->find();
$toConpany = M('promote_company', 'tab_')->field(['company_name', 'company_belong'])->where(['id' => $toPromote['company_id']])->find();
$belongs = PromoteCompanyService::$belongs;
$mends = [];
foreach ($users as $item) {
$amount = isset($payAmountRows[$item['id']]) ? round(floatval($payAmountRows[$item['id']]['pay_amount']), 2) : 0;
@ -435,12 +433,12 @@ class PromoteService {
return ['status' => false, 'msg' => '系统异常,修改用户推广员失败'];
}
try {
M('user_play', 'tab_')->where($otherMap)->save($updateData);
M('user_play_info', 'tab_')->where($otherMap)->save($updateData);
unset($spendMap['pay_status']);
$updateCheck = [];
if (count($hasGameIds) > 0) {
$spendMap['game_id'] = ['in', $hasGameIds];
M('spend', 'tab_')->where($spendMap)->save(array_merge($updateData, $updateMarket, ['is_check' => 1]));
@ -460,14 +458,37 @@ class PromoteService {
M('deposit', 'tab_')->where($orderMap)->save(array_merge($updateData, $updateMarket));
M('user_play_data_count', 'tab_')->where($orderMap)->save(['promote_id' => $toPromote['id']]);
$status = M('shift_task', 'sys_')->where('id=' . $task['id'])->save(['status' => 1, 'handle_time' => time()]);
if (!$status) {
$model->commit();
return ['status' => true, 'msg' => '玩家迁移成功'];
} catch (\Exception $e) {
$model->rollback();
return ['status' => false, 'msg' => '系统异常,修改迁移任务失败'];
return ['status' => true, 'msg' => '系统异常: ' . $e->getMessage()];
}
}
$model->commit();
return ['status' => true, 'msg' => '玩家迁移成功'];
public function afterShift($task, $result)
{
$data = [];
if ($result['status']) {
$data = ['status' => 1, 'result' => $result['msg'], 'handle_time' => time()];
} else {
$data = ['status' => 2, 'result' => $result['msg'], 'handle_time' => time()];
}
M('shift_task', 'sys_')->where('id=' . $task['id'])->save($data);
}
public function shift($task)
{
$result = null;
if ($task['type'] == 1) {
$result = $this->shiftPromote($task);
} elseif ($task['type'] == 2) {
$result = $this->shiftPlayer($task);
} else {
$result = ['status' => false, 'msg' => '类型错误'];
}
$this->afterShift($task, $result);
return $result;
}
public function cancelShift($params)

Loading…
Cancel
Save