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
nanasess committed Oct 4, 2019
2 parents 9b412e5 + 45e5a8c commit 7b05fd6
Show file tree
Hide file tree
Showing 3 changed files with 577 additions and 6 deletions.
27 changes: 22 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 = '')
{
if (is_array($array)) {
Expand Down Expand Up @@ -346,7 +352,10 @@ public function __construct($array, $mode = '')
}
$this->setOrder('dtb_customer.customer_id DESC');
}
// 検索用SQL

/**
* 検索用SQL
*/
public function getList()
{
$this->select = 'SELECT dtb_customer.customer_id,dtb_customer.name01,dtb_customer.name02,dtb_customer.kana01,dtb_customer.kana02,dtb_customer.sex,
Expand All @@ -355,6 +364,9 @@ public function getList()
return $this->getSql(2);
}

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

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

return $this->getSql(1);
}

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

0 comments on commit 7b05fd6

Please sign in to comment.