123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <?php
- use PHPUnit\Framework\TestCase;
- use const mtopcard\ProvinceList;
- define('APP_ID', 'test');
- define('BASE_ROOT_PATH', str_replace('/test', '', dirname(__FILE__)));
- require_once(BASE_ROOT_PATH . '/global.php');
- require_once(BASE_CORE_PATH . '/lrlz.php');
- const CurrentTest = NetTest;
- class TestlAmountStats extends TestCase
- {
- public static function setUpBeforeClass(): void
- {
- Base::run_util();
- }
- public function testset_cache()
- {
- $cache_key = 'amount_stats_settings';
- $channel_names = ['泰山','沧沧' ,'驰增', '达尚', '点充', '盲盒', '多鲸'];//上游名称
- $merchant_names = ['华融','车卫士','海南','XX'];//下游名称
- $channel_fast = [];//快充通道
- $channel_normal = [];//普充通道
- $merchant = [];//机构
- $writer = function ($key,$val) use($cache_key) {
- $cache = rcache($cache_key, 'refill-');
- $data = unserialize($cache['data']) ?? [];
- $data[$key] = $val;
- wcache($cache_key, ['data' => serialize($data)], 'refill-');
- };
- $writer('channel_names', $channel_names);
- $writer('merchant_names', $merchant_names);
- $writer('channel_fast', $channel_fast);
- $writer('channel_normal', $channel_normal);
- $writer('merchant', $merchant);
- $read = rcache($cache_key, 'refill-');
- $read = unserialize($read['data']);
- }
- public function testdaily_statement_data()
- {
- $model_refill_order = Model('refill_order');
- $condition['type'] = 'provider';
- $condition['time_text'] = '2022-09-01';
- // $condition['order_time_type'] = 'notify_time';
- // $condition['cid'] = ['in', '319,326,327,234'];
- $list = $model_refill_order->getOrderStatsListAll($condition, '*', 'time_stamp desc, cname asc');
- }
- }
|