12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?php
- namespace app\api\controller\v1;
- use app\api\controller\Base;
- use app\hander\HelpHander;
- use think\Db;
- class PartyFee extends Base
- {
- // 新增/编辑
- public function save(){
- model('PartyFee')->add();
- HelpHander::success([],'操作成功');
- }
- // 详情
- public function detail(){
- $id = input('id/d',0);
- $ret = model('PartyFee')->info($id);
- HelpHander::success($ret);
- }
- // 删除
- public function del(){
- $id = input('id/d',0);
- model('PartyFee')->del($id);
- HelpHander::success([],'操作成功');
- }
- //列表
- public function list(){
- $title = input('name','','trim');
- $year = input('year','','trim');
- if(!$year){
- HelpHander::error('未选择年份');
- }
- $ret = model('PartyFee')->lists($title,$year);
- HelpHander::success($ret);
- }
- //用户列表
- public function ulist(){
- $year = input('year','','trim');
- if(!$year){
- HelpHander::error('未选择年份');
- }
- $ret = model('PartyFee')->ulists($this->userId,$year);
- HelpHander::success($ret);
- }
- }
|