diff --git a/Application/Admin/Controller/CompanyStatementController.class.php b/Application/Admin/Controller/CompanyStatementController.class.php
index 4ce977248..27ad14703 100644
--- a/Application/Admin/Controller/CompanyStatementController.class.php
+++ b/Application/Admin/Controller/CompanyStatementController.class.php
@@ -1438,9 +1438,12 @@ class CompanyStatementController extends ThinkController
if ($company_ids) {
$inside = M("promote_company",'tab_')->field("company_name")->where(['id'=>['in',$company_ids],'is_inside'=>1])->select();
- $inside = implode(',',array_column($inside,'company_name'));
+ if ($inside) {
- $this->ajaxReturn(['status'=>0,'msg'=>$inside.'为内部公司不能添加特殊补点']);
+ $inside = implode(',',array_column($inside,'company_name'));
+ $this->ajaxReturn(['status'=>0,'msg'=>$inside.'为内部公司不能添加特殊补点']);
+
+ }
}
diff --git a/Application/Admin/Controller/GameApiController.class.php b/Application/Admin/Controller/GameApiController.class.php
index 7bd30f474..e52bd0396 100644
--- a/Application/Admin/Controller/GameApiController.class.php
+++ b/Application/Admin/Controller/GameApiController.class.php
@@ -22,7 +22,13 @@ class GameApiController extends Think {
public function verify()
{
$service = new TestingResourceService();
- $batches = M('testing_resource_batch', 'tab_')->where(['verify_status' => 0])->select();
+
+ $gameIds = $service->getHasItfGameIds();
+ $map = ['verify_status' => 0];
+ if (count($gameIds) > 0) {
+ $map['game_id'] = ['in', $gameIds];
+ }
+ $batches = M('testing_resource_batch', 'tab_')->where($map)->select();
foreach ($batches as $batch) {
$service->verify($batch);
}
@@ -31,7 +37,14 @@ class GameApiController extends Think {
public function provide()
{
$service = new TestingResourceService();
- $batches = M('testing_resource_batch', 'tab_')->where(['verify_status' => 1, 'provide_status' => 0])->select();
+
+ $gameIds = $service->getHasItfGameIds();
+
+ $map = ['verify_status' => 1, 'provide_status' => 0];
+ if (count($gameIds) > 0) {
+ $map['game_id'] = ['in', $gameIds];
+ }
+ $batches = M('testing_resource_batch', 'tab_')->where($map)->select();
foreach ($batches as $batch) {
$service->provide($batch);
}
diff --git a/Application/Admin/Controller/PaymentMerchantController.class.php b/Application/Admin/Controller/PaymentMerchantController.class.php
index 5e89bcb4c..0dfad5d2e 100644
--- a/Application/Admin/Controller/PaymentMerchantController.class.php
+++ b/Application/Admin/Controller/PaymentMerchantController.class.php
@@ -414,7 +414,7 @@ class PaymentMerchantController extends ThinkController
$query = M('payment_rule', 'tab_')->where($conditions);
$countQuery = clone $query;
- $items = $query->order('id desc')->page($page, $row)->select();
+ $items = $query->order('start_time desc')->page($page, $row)->select();
$count = $countQuery->count();
$gameTypes = $gameService->getGameTypes(null, 'id,type_name');
@@ -675,6 +675,13 @@ class PaymentMerchantController extends ThinkController
]);
}
+ if ($rule['start_time'] < strtotime(date('Y-m-d 23:59:59', time()))) {
+ $this->ajaxReturn([
+ 'status' => 0,
+ 'message' => '该记录不可删除,规则开始时间包含今天或今天之前的时间。'
+ ]);
+ }
+
M('payment_rule', 'tab_')->where(['id' => $id])->delete();
addOperationLog([
'op_type' => 2,
diff --git a/Application/Admin/View/AggregateFinanceStatement/lists.html b/Application/Admin/View/AggregateFinanceStatement/lists.html
index f49220582..2a63fc4a7 100644
--- a/Application/Admin/View/AggregateFinanceStatement/lists.html
+++ b/Application/Admin/View/AggregateFinanceStatement/lists.html
@@ -453,7 +453,7 @@
//重算金额
$("#updateStatement").on("click",function(){
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
- if($(elem).data("status") == 0 || $(elem).data("status") == 1 || $(elem).data("status") == -1 || $(elem).data("status") == -3){
+ if($(elem).data("status") == 0 || $(elem).data("status") == -1 || $(elem).data("status") == -3){
return $(elem).val();
}else{
flag = true;
@@ -461,10 +461,10 @@
// return $(elem).val();
}).get().join(",");
if(text == ''){
- layer.msg("" + '无需要进行重新结算的结算单,仅[未申请发票][申请开票][审批拒绝][汇总审批撤回]状态可以进行重新结算' + "");
+ layer.msg("" + '无需要进行重新结算的结算单,仅[未汇总][申请开票][审批拒绝][汇总审批撤回]状态可以进行重新结算' + "");
return;
}
- layer.confirm("重算结算金额会对结算单回退到未申请发票状态,请慎重处理,点击取消停止操作",{title:false}, function(index){
+ layer.confirm("重算结算金额会对结算单回退到未汇总状态,请慎重处理,点击取消停止操作",{title:false}, function(index){
_doReceived();
layer.close(index);
});
diff --git a/Application/Base/Service/PaymentRuleService.class.php b/Application/Base/Service/PaymentRuleService.class.php
index 5b1596275..e6412c5dd 100644
--- a/Application/Base/Service/PaymentRuleService.class.php
+++ b/Application/Base/Service/PaymentRuleService.class.php
@@ -70,7 +70,7 @@ class PaymentRuleService
}
if ($length == 1) {
$first = $repeatRules[0];
- if ($startTime <= $first['start_time'] && $endTime >= $last['end_time']) {
+ if ($startTime <= $first['start_time'] && $endTime >= $first['end_time']) {
M('payment_rule', 'tab_')->where(['id' => $first['id']])->delete();
} elseif ($endTime < $first['end_time'] && $startTime <= $first['start_time']) {
M('payment_rule', 'tab_')->where(['id' => $first['id']])->save(['start_time' => $endTime + 1, 'update_time' => time()]);
diff --git a/Application/Base/Service/TestingResourceService.class.php b/Application/Base/Service/TestingResourceService.class.php
index 15b33344e..bb9aea68a 100644
--- a/Application/Base/Service/TestingResourceService.class.php
+++ b/Application/Base/Service/TestingResourceService.class.php
@@ -555,4 +555,24 @@ class TestingResourceService
}
return $resources;
}
+
+ public function getHasItfGameIds()
+ {
+ $gameSettings = $this->repository->getGameSettings();
+ $baseGameIds = [];
+ foreach ($gameSettings as $gameSetting) {
+ if ($gameSetting['has_itf'] == 1) {
+ $baseGameIds[] = $gameSetting['base_game_id'];
+ }
+ }
+ $baseGames = [];
+ if (count($baseGameIds) > 0) {
+ $baseGames = M('base_game', 'tab_')->where(['id' => ['in', $baseGameIds]])->select();
+ }
+ if (empty($baseGames)) {
+ return [];
+ } else {
+ return array_merge(array_column($baseGames, 'android_game_id'), array_column($baseGames, 'ios_game_id'));
+ }
+ }
}
\ No newline at end of file