From 82d40f4e8b1336175893aae7b83ebaf9db743c04 Mon Sep 17 00:00:00 2001
From: chenxiaojun <956334972@qq.com>
Date: Fri, 11 Oct 2019 11:20:13 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E->=E6=B8=B8=E6=88=8F=E5=88=86?=
=?UTF-8?q?=E5=8C=85=E6=89=93=E5=8C=85=E9=A1=BA=E5=BA=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Controller/AutoPackController.class.php | 2 +-
Application/Admin/View/Apply/and_lists.html | 49 ++++++++++++++++---
.../Home/Controller/ApplyController.class.php | 8 +--
Data/update.sql | 6 ++-
4 files changed, 52 insertions(+), 13 deletions(-)
diff --git a/Application/Admin/Controller/AutoPackController.class.php b/Application/Admin/Controller/AutoPackController.class.php
index 39ed6e914..1c9ff623b 100644
--- a/Application/Admin/Controller/AutoPackController.class.php
+++ b/Application/Admin/Controller/AutoPackController.class.php
@@ -314,7 +314,7 @@ class AutoPackController extends Think
$apply_data = $applyModel
-> field('id,game_id,game_name,promote_id,promote_account,sdk_version')
-> where($map)
- -> order('id desc')
+ -> order('bale_sort desc,id desc')
-> limit(200)
-> select();
diff --git a/Application/Admin/View/Apply/and_lists.html b/Application/Admin/View/Apply/and_lists.html
index 7434d52d8..a9a067d14 100644
--- a/Application/Admin/View/Apply/and_lists.html
+++ b/Application/Admin/View/Apply/and_lists.html
@@ -127,6 +127,7 @@
审核状态 |
打包状态 |
审核时间 |
+ 打包顺序 |
下载状态 |
分成比例 |
注册单价 |
@@ -164,6 +165,15 @@
{:set_show_time($data['dispose_time'],'','other')} |
+
+
+
+ {$data.bale_sort}
+
+ |
@@ -227,6 +237,7 @@
| 审核状态 |
打包状态 |
审核时间 |
+ 打包顺序 |
下载状态 |
分成比例 |
注册单价 |
@@ -267,7 +278,15 @@
{:set_show_time($data['dispose_time'],'','other')} |
-
+
+
+
+ {$data.bale_sort}
+
+ |
@@ -461,13 +480,29 @@ $(".editTab").click(function(){
var promote_id = that.attr("promote-id");
var field = that.attr('field');
layer.prompt({title:title,formType:0},function(value,index) {
- if (!/^(((\d|[1-9]\d)(\.\d{1,2})?)|100|100.0|100.00)$/.test(value)) {
- updateAlert('分成比例输入错误','tip_error');
- setTimeout(function(){
- $('#tip').find('.tipclose').click();
- },2000);
- return false;
+ if (field == 'promote_ratio' || field == 'promote_money') {
+ if (!/^(((\d|[1-9]\d)(\.\d{1,2})?)|100|100.0|100.00)$/.test(value)) {
+ if (field == 'promote_ratio') {
+ updateAlert('分成比例输入错误','tip_error');
+ } else {
+ updateAlert('游戏注册单价输入错误','tip_error');
+ }
+
+ setTimeout(function(){
+ $('#tip').find('.tipclose').click();
+ },2000);
+ return false;
+ }
+ } else if (field = 'bale_sort') {
+ if (!/^(?:0|[1-9][0-9]*)$/.test(value)) {
+ updateAlert('请输入正整数','tip_error');
+ setTimeout(function(){
+ $('#tip').find('.tipclose').click();
+ },2000);
+ return false;
+ }
}
+
$.ajax({
async: false,
url:"{:U('Apply/setRatio')}",
diff --git a/Application/Home/Controller/ApplyController.class.php b/Application/Home/Controller/ApplyController.class.php
index 75f3e8e5d..065cbd863 100644
--- a/Application/Home/Controller/ApplyController.class.php
+++ b/Application/Home/Controller/ApplyController.class.php
@@ -986,12 +986,12 @@ class ApplyController extends BaseController
if (($updateStatus == 0 && $res) || ($updateStatus == 1 && $res !== false)) {
$thsiAppltId = M('Apply', 'tab_')->where(array('game_id' => $list['id'], 'promote_id' => $promoteId))->getField('id');
$gameSource = M('Game_source', 'tab_')->field('id,source_version')->where(['game_id' => $list['id']])->find();
- if (file_exists(get_game_source_file_url($list['id'])) || null == $gameSource) {
- M('apply', 'tab_')->where(['id' => $thsiAppltId])->setField(['enable_status' => 2, 'pack_url' => '', 'plist_url' => '']);
- M('apply_launch', 'tab_')->where(['apply_id' => $thsiAppltId])->setField('launch_packge', 0);
- } else {
+ if (!file_exists(get_game_source_file_url($list['id'])) || null == $gameSource) {
M('apply', 'tab_')->where(['id' => $thsiAppltId])->setField('enable_status', -1);
M('apply_launch', 'tab_')->where(['apply_id' => $thsiAppltId])->setField('launch_packge', -1);
+ } else {
+ M('apply', 'tab_')->where(['id' => $thsiAppltId])->setField(['enable_status' => 2, 'pack_url' => '', 'plist_url' => '']);
+ M('apply_launch', 'tab_')->where(['apply_id' => $thsiAppltId])->setField('launch_packge', 0);
}
} else {
$this->ajaxReturn(array("status" => 0, "msg" => "申请失败", 'ret' => $res));
diff --git a/Data/update.sql b/Data/update.sql
index a66b0005c..649b3c39b 100644
--- a/Data/update.sql
+++ b/Data/update.sql
@@ -71,4 +71,8 @@ ALTER TABLE `tab_game` ADD COLUMN `server_type` tinyint(2) NOT NULL DEFAULT 1 C
-- ----------------------------
-- 2019-10-10 cxj
-- ----------------------------
-ALTER TABLE `tab_promote` ADD COLUMN `child_game_permission` tinyint(2) NOT NULL DEFAULT 0 COMMENT '下级游戏添加权限 0-本账号已添加游戏 1-所有游戏' AFTER `idcard`;
\ No newline at end of file
+ALTER TABLE `tab_promote` ADD COLUMN `child_game_permission` tinyint(2) NOT NULL DEFAULT 0 COMMENT '下级游戏添加权限 0-本账号已添加游戏 1-所有游戏' AFTER `idcard`;
+
+-- 2019-10-11 cxj
+ALTER TABLE `tab_apply` ADD COLUMN `bale_sort` int(5) NOT NULL DEFAULT 0 COMMENT '打包顺序' AFTER `offline_status`;
+
|