H5manger.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. namespace app\master\controller;
  3. use app\core\model\HongbaoPlan;
  4. use app\core\model\User;
  5. use app\core\service\Finance;
  6. use think\Controller;
  7. use think\Db;
  8. use tool\Common;
  9. class H5manger extends Controller
  10. {
  11. public function index() {
  12. $finance = new \app\master\logic\Index();
  13. $result = $finance->balance($msg, '18989706775');
  14. dump($result);
  15. }
  16. public function hongbao() {
  17. /*$user = User::get([
  18. 'mobile'=>'18101707268'
  19. ]);
  20. (new HongbaoPlan())->sendUserOnRegister($user);*/
  21. }
  22. public function getStat30Days() {
  23. //echo "select FROM_UNIXTIME(addTime, '%y-%m-%d') dates, sum(moneySubject) from a_cang where isForged=0 and addTime between ".(THINK_START_TIME - 7 * 86400)." and ".Common::timetodate(THINK_START_TIME, 0)." group by dates";exit;
  24. dump(Db::query("select FROM_UNIXTIME(addTime, '%Y-%m-%d') date, sum(moneySubject) as moneyTotal,count(*) as count from a_cang where isForged=0 and addTime between ".(THINK_START_TIME - 30 * 86400)." and ".THINK_START_TIME." group by date"));
  25. }
  26. public function cancelUser() {
  27. $finance = new Finance();
  28. //$user = Model::get($this->app['userID']);
  29. $result = $finance->userCancel($msg, request()->param('mobile'), 'http://www.jiaqiancaifu.com');
  30. return view(__FUNCTION__, [
  31. 'resourcePath'=>'/static/'.request()->path(),
  32. 'param'=>$result['param'],
  33. 'url'=>$result['url']
  34. ]);
  35. }
  36. }