AisFundBill.php 1011 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2017 https://www.sapixx.com All rights reserved.
  4. * @license Licensed (http://www.apache.org/licenses/LICENSE-2.0).
  5. * @author pillar<ltmn@qq.com>
  6. * 采购基金账单
  7. */
  8. namespace app\ais\model;
  9. use think\Model;
  10. use util\Util;
  11. class AisFundBill extends Model
  12. {
  13. public function user(){
  14. return $this->hasOne('app\common\model\SystemUser','id','uid');
  15. }
  16. /**
  17. * [log 增加财务日志]
  18. * @param [array] $param
  19. */
  20. public static function add(array $param){
  21. $data['member_miniapp_id'] = intval($param['miniapp_id']);
  22. $data['store_id'] = intval($param['store_id']);
  23. $data['types'] = intval($param['types']);
  24. $data['uid'] = intval($param['uid']);
  25. $data['order_no'] = $param['order_no'];
  26. $data['money'] = floatval($param['money']);
  27. $data['update_time'] = time();
  28. return self::insert($data);
  29. }
  30. }