RetentionMoneyController.php 625 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace app\workerapi\controller;
  3. use app\workerapi\lists\MasterWorkerRetentionMoneyLogLists;
  4. use app\workerapi\logic\RetentionMoneyLogic;
  5. class RetentionMoneyController extends BaseApiController
  6. {
  7. public function totalAmount()
  8. {
  9. $result = RetentionMoneyLogic::totalAmount(['worker_id' => $this->userId]);
  10. if (false === $result) {
  11. return $this->fail(RetentionMoneyLogic::getError());
  12. }
  13. return $this->success('操作成功',$result, 1, 0);
  14. }
  15. public function lists()
  16. {
  17. return $this->dataLists(new MasterWorkerRetentionMoneyLogLists());
  18. }
  19. }