BusinessOther.php 936 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. namespace addons\qingdongams\model;
  3. use think\Exception;
  4. use think\Model;
  5. use traits\model\SoftDelete;
  6. /**
  7. * 商机管理
  8. */
  9. class BusinessOther Extends Model
  10. {
  11. use SoftDelete;
  12. // 表名,不含前缀
  13. protected $name = 'qingdongams_business_other';
  14. // 开启自动写入时间戳字段
  15. protected $autoWriteTimestamp = 'int';
  16. // 定义时间戳字段名
  17. protected $createTime = 'createtime';
  18. protected $updateTime = 'updatetime';
  19. protected $deleteTime = 'deletetime';
  20. public static function getOther($params){
  21. $other = self::where(['id' => $params['id']])->value('otherdata');
  22. if($other){
  23. $other=json_decode($other,true);
  24. }else{
  25. $other=[];
  26. }
  27. $params = array_merge($params, $other);
  28. $params = Form::getDataDetail(Form::BUSINESS_TYPE, $params);
  29. return $params;
  30. }
  31. }