Skip to content

Commit

Permalink
Merge pull request #314 from nanasess/add-sc-customerlist-test
Browse files Browse the repository at this point in the history
SC_CustomerList のテストケース追加
  • Loading branch information
chihiro-adachi authored Oct 15, 2019
2 parents 8877c7f + 45e5a8c commit 33b2920
Show file tree
Hide file tree
Showing 3 changed files with 576 additions and 6 deletions.
26 changes: 21 additions & 5 deletions data/class/SC_CustomerList.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,19 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/

/* [名称] SC_CustomerList
* [概要] 会員検索用クラス
/**
* 会員検索用クラス
*/
class SC_CustomerList extends SC_SelectSql_Ex
{
/** @var array */
public $arrColumnCSV;

/**
* @param array $array 検索パラメータの連想配列
* @param string $mode 検索モード. 顧客検索の場合は customer
* XXX $mode = 'customer' しか使用していないかも
*/
public function __construct($array, $mode = '')
{
parent::__construct($array);
Expand Down Expand Up @@ -327,14 +333,19 @@ public function __construct($array, $mode = '')
$this->setOrder('customer_id DESC');
}

// 検索用SQL
/**
* 検索用SQL
*/
public function getList()
{
$this->select = 'SELECT customer_id,name01,name02,kana01,kana02,sex,email,email_mobile,tel01,tel02,tel03,pref,status,update_date,mailmaga_flg FROM dtb_customer ';

return $this->getSql(2);
}

/**
* @deprecated 本体で使用していないため非推奨
*/
public function getListMailMagazine($is_mobile = false)
{
$colomn = $this->getMailMagazineColumn($is_mobile);
Expand All @@ -347,15 +358,20 @@ public function getListMailMagazine($is_mobile = false)
return $this->getSql(0);
}

// 検索総数カウント用SQL
/**
* 検索総数カウント用SQL
*/
public function getListCount()
{
$this->select = 'SELECT COUNT(customer_id) FROM dtb_customer ';

return $this->getSql(1);
}

// CSVダウンロード用SQL
/**
* CSVダウンロード用SQL
* @deprecated 本体で使用していないため非推奨
*/
public function getListCSV($arrColumnCSV)
{
$this->arrColumnCSV = $arrColumnCSV;
Expand Down
Loading

0 comments on commit 33b2920

Please sign in to comment.