bianjianModel.php 853 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. /**
  3. * 便笺(2021-08-31)添加
  4. */
  5. class agent_bianjianClassModel extends agentModel
  6. {
  7. public function gettotal()
  8. {
  9. $stotal = $this->getwdtotal($this->adminid);
  10. $titles = '';
  11. return array('stotal'=>$stotal,'titles'=> $titles);
  12. }
  13. private function getwdtotal($uid)
  14. {
  15. $stotal = m('bianjian')->rows('`uid`='.$uid.' and `state`=2');
  16. return $stotal;
  17. }
  18. protected function agenttotals($uid)
  19. {
  20. $a = array(
  21. 'weiwc' => $this->getwdtotal($uid)
  22. );
  23. return $a;
  24. }
  25. protected function agentrows($rows, $rowd, $uid)
  26. {
  27. if($rowd)foreach($rowd as $k=>$rs){
  28. if($rs['stateval']>0){
  29. $ztrs = $this->flow->getststrsssa($rs['stateval']);
  30. if($ztrs){
  31. $rows[$k]['statustext'] = $ztrs['name'];
  32. $rows[$k]['statuscolor'] = $ztrs['color'];
  33. }
  34. }
  35. }
  36. return $rows;
  37. }
  38. }
粤ICP备19079148号