コード例 #1
0
ファイル: orders.php プロジェクト: huylv-hust/uosbo
 public static function find_ss_list($object, $flag = false)
 {
     $model_ss = new Model_Mss();
     $model_partner = new Model_Mpartner();
     $list_partner_code = array();
     if ($flag) {
         $list_partner = \Model_Mpartner::forge()->find($object);
     } else {
         $list_partner = $model_partner->get_info_by_userid($object);
     }
     $list_ss_id = array();
     foreach ($list_partner as $item) {
         $list_partner_code[] = $item['partner_code'];
     }
     if ($list_partner_code) {
         $config_partner['where'][] = array('partner_code', 'IN', $list_partner_code);
         $list_ss = \Model_Mss::forge()->find($config_partner);
         if ($list_ss) {
             foreach ($list_ss as $key => $val) {
                 $list_ss_id[] = $val->ss_id;
             }
         }
     }
     return $list_ss_id;
 }