Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
d5f50ece
Commit
d5f50ece
authored
Mar 14, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增分佣提成
parent
47a0d497
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
1 deletion
+53
-1
Finance.php
application/index/controller/Finance.php
+34
-1
OCheckBargain.php
application/model/OCheckBargain.php
+19
-0
No files found.
application/index/controller/Finance.php
View file @
d5f50ece
...
...
@@ -171,7 +171,7 @@ class Finance extends Basic
$data
[
'msg'
]
=
'Id is null.'
;
}
else
{
$bargain
=
new
OBargainModel
();
$update_data
[
'
commission'
]
=
empty
(
$this
->
params
[
'commission'
])
?
0
:
$this
->
params
[
'commission
'
];
$update_data
[
'
scale_fee'
]
=
empty
(
$this
->
params
[
'scale_fee'
])
?
0
:
$this
->
params
[
'scale_fee
'
];
$update_data
[
'practical_fee'
]
=
empty
(
$this
->
params
[
'practical_fee'
])
?
0
:
$this
->
params
[
'practical_fee'
];
$data
[
'data'
]
=
$bargain
->
updateBargainById
(
$this
->
params
[
'id'
],
$update_data
);
...
...
@@ -183,4 +183,36 @@ class Finance extends Basic
return
$this
->
response
(
$data
[
'code'
],
$data
[
'msg'
],
$data
[
'data'
]);
}
/**
* 新增分佣提成
*
* @return \think\Response
*/
public
function
addBargain
()
{
$data
[
'code'
]
=
200
;
$data
[
'msg'
]
=
""
;
$data
[
'data'
]
=
[];
if
(
empty
(
$this
->
params
[
'id'
]))
{
$data
[
'code'
]
=
101
;
$data
[
'msg'
]
=
'Id is null.'
;
}
else
{
$bargain
=
new
OBargainModel
();
$update_data
[
'role'
]
=
empty
(
$this
->
params
[
'role'
])
?
0
:
$this
->
params
[
'role'
];
$update_data
[
'scale_fee'
]
=
empty
(
$this
->
params
[
'commission'
])
?
0
:
$this
->
params
[
'scale_fee'
];
$update_data
[
'practical_fee'
]
=
empty
(
$this
->
params
[
'practical_fee'
])
?
0
:
$this
->
params
[
'practical_fee'
];
$update_data
[
'father_id'
]
=
empty
(
$this
->
params
[
'id'
])
?
0
:
$this
->
params
[
'id'
];
$update_data
[
'scale'
]
=
empty
(
$this
->
params
[
'scale'
])
?
0
:
$this
->
params
[
'scale'
];
$update_data
[
'id'
]
=
empty
(
$this
->
params
[
'id'
])
?
0
:
$this
->
params
[
'id'
];
$data
[
'data'
]
=
$bargain
->
insertBargain
(
$update_data
);
if
(
$data
[
'data'
]
==
0
)
{
$data
[
'code'
]
=
101
;
$data
[
'msg'
]
=
'Add the failure.'
;
}
}
return
$this
->
response
(
$data
[
'code'
],
$data
[
'msg'
],
$data
[
'data'
]);
}
}
\ No newline at end of file
application/model/OCheckBargain.php
0 → 100644
View file @
d5f50ece
<?php
/**
* Created by PhpStorm.
* User: fu ju
* Date: 2018/1/20
* Time: 17:52
*/
namespace
app\model
;
use
think\Db
;
class
OCheckBargain
extends
BaseModel
{
protected
$table
=
'o_check_bargain'
;
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment