init
This commit is contained in:
27
app/controller/Order/RechargeRecord.php
Normal file
27
app/controller/Order/RechargeRecord.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace app\controller\Order;
|
||||
|
||||
use Overtrue\Pinyin\Pinyin;
|
||||
use think\facade\Db;
|
||||
|
||||
class RechargeRecord
|
||||
{
|
||||
public function RechargeRecord($openid){
|
||||
$area = Db::table('user')->where('openid',$openid)->value('area');
|
||||
$pinyin = new Pinyin();
|
||||
$s = $pinyin->sentence($area);
|
||||
$s = strtr($s,array(' '=>''));
|
||||
$table = 'recharge_'.$s;
|
||||
$list = Db::table($table)->where('openid',$openid)->order('id desc')->select()->toArray();
|
||||
$i = 0;
|
||||
foreach ($list as $l){
|
||||
$list[$i]['total'] /= 100;
|
||||
$list[$i]['payer_total']/= 100;
|
||||
$i+=1;
|
||||
}
|
||||
return json($list);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user