OfficialAccountDaySubStatTransformer.php 875 B

123456789101112131415161718192021222324252627
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: tandunzhao
  5. * Date: 2018/6/20
  6. * Time: 下午5:05
  7. */
  8. namespace App\Http\Controllers\Manage\OfficialAccount\Transformers;
  9. class OfficialAccountDaySubStatTransformer
  10. {
  11. public function transform($obj){
  12. return [
  13. 'appid' => isset($obj->appid) ? $obj->appid : "",
  14. 'official_account_name' => isset($obj->official_account_name) ? $obj->official_account_name : "",
  15. 'month' => isset($obj->month) ? $obj->month : "",
  16. 'date' => isset($obj->date) ? $obj->date : "",
  17. 'reward_balance' => (int)isset($obj->reward_balance) ? $obj->reward_balance : 0,
  18. 'charge_balance' => (int)isset($obj->charge_balance) ? $obj->charge_balance : 0,
  19. 'fee' => (int)isset($obj->fee) ? $obj->fee : 0,
  20. ];
  21. }
  22. }