结算管理--更新

master
chenxiaojun 5 years ago
commit d792e34348

@ -1099,8 +1099,10 @@ public function auto_rrdae(){
$promoteMap['chain'] = ['like', "{$promote['chain']}{$promote['id']}/%"];
$promoteIds = M('promote', 'tab_')->where($promoteMap)->getField('id', true);
$promoteIds[] = $promote['id'];
$settlementType = $promote['settlement_type'];
$settlementEndTime = strtotime(date('Y-m-d')) - 1;
if ($initial) {
$settlementType = 5;
$settlementBeginTime = 0;
} else {
switch ($promote['settlement_type']) {
@ -1141,7 +1143,7 @@ public function auto_rrdae(){
$add['op_type'] = 3;
$add['last_op_id'] = $add['op_id'];
$add['last_op_type'] = 3;
$add['settlement_type'] = $promote['settlement_type'];
$add['settlement_type'] = $settlementType;
M()->startTrans();//开启事物
$withdrawId = D('withdraw')->add($add);

@ -259,6 +259,7 @@ class QueryController extends ThinkController
$add['op_type'] = 2;
$add['last_op_id'] = $add['op_id'];
$add['last_op_type'] = 2;
$add['settlement_type'] = 3;
M()->startTrans();//开启事物
$withdrawId = M('withdraw', 'tab_')->add($add);

@ -23,7 +23,9 @@ class WithdrawModel extends Model{
//结算类型
const SETTLEMENT_TYPE_WEEK = 1;
const SETTLEMENT_TYPE_MONTH = 2;
const SETTLEMENT_TYPE_OTHER = 3;
const SETTLEMENT_TYPE_ADMIN = 3;
const SETTLEMENT_TYPE_PROMOTE = 4;
const SETTLEMENT_TYPE_OTHER = 5;
/**
* 构造函数
@ -47,6 +49,7 @@ class WithdrawModel extends Model{
public static $settlementTypeList = [
self::SETTLEMENT_TYPE_WEEK => '周结',
self::SETTLEMENT_TYPE_MONTH => '月结',
self::SETTLEMENT_TYPE_ADMIN => '管理员提现',
self::SETTLEMENT_TYPE_OTHER => '其他',
];

@ -344,6 +344,7 @@ class FinanceController extends BaseController
$add['op_type'] = 1;
$add['last_op_id'] = $this->loginPromote['id'];
$add['last_op_type'] = 1;
$add['settlement_type'] = 4;
M()->startTrans();//开启事物
$withdrawId = M('withdraw', 'tab_')->add($add);

@ -940,4 +940,4 @@ ALTER TABLE tab_promote add `company_relation` tinyint(1) NOT NULL DEFAULT '0' C
-- 2020-01-02
-- 提现结算类型 cxj
ALTER TABLE `tab_withdraw`
ADD COLUMN `settlement_type` tinyint(3) NOT NULL DEFAULT 3 COMMENT '结算类型1-周结 2-月结 3-其他';
ADD COLUMN `settlement_type` tinyint(3) NOT NULL DEFAULT 3 COMMENT '结算类型1-周结 2-月结 3-管理员提现 4-推广员提现 5-其他';

Loading…
Cancel
Save