Commit 6bcc3cba authored by wangtao's avatar wangtao

管理后台 看板

parent f7ac9a48
...@@ -80,7 +80,7 @@ class Index extends AdminBase ...@@ -80,7 +80,7 @@ class Index extends AdminBase
$map[] = ['pay_time', '>=', $monthStart]; $map[] = ['pay_time', '>=', $monthStart];
$map[] = ['pay_time', '<=', $monthEnd]; $map[] = ['pay_time', '<=', $monthEnd];
$map[] = ['pay_status', '=', 1]; $map[] = ['pay_status', '=', 1];
$month_payment_count = Db::name('payment')->where($map)->sum('pay_amount'); //月订单量 $month_payment_count = Db::name('payment')->where($map)->count(); //月订单量
$user_sum_count = Db::name('user')->where('is_del', 0)->count(); //总用户数量 $user_sum_count = Db::name('user')->where('is_del', 0)->count(); //总用户数量
$map = []; $map = [];
......
...@@ -16,7 +16,7 @@ use app\model\project\User; ...@@ -16,7 +16,7 @@ use app\model\project\User;
use app\model\project\UserMoneyLog; use app\model\project\UserMoneyLog;
use think\App; use think\App;
use think\facade\Db; use think\facade\Db;
use app\model\projectCategory; use app\model\ProjectCategory;
/** /**
* 后台主控制器 * 后台主控制器
......
...@@ -118,7 +118,7 @@ class Upload extends BaseController ...@@ -118,7 +118,7 @@ class Upload extends BaseController
*/ */
public function upfile(string $file = 'file', int $groupid = 0, string $action = '', string $thum = '') public function upfile(string $file = 'file', int $groupid = 0, string $action = '', string $thum = '')
{ {
echo 111;exit;
$action = $action ? $action : input('action'); $action = $action ? $action : input('action');
if (!$action) return $this->returnMsg('参数错误'); if (!$action) return $this->returnMsg('参数错误');
......
...@@ -7,6 +7,7 @@ use app\api\service\AlipayTradeService; ...@@ -7,6 +7,7 @@ use app\api\service\AlipayTradeService;
use app\BaseController; use app\BaseController;
use think\facade\Log; use think\facade\Log;
use think\facade\View; use think\facade\View;
use veitool\make\Controller;
use Yansongda\Pay\Pay; use Yansongda\Pay\Pay;
use app\api\service\PayService; use app\api\service\PayService;
use think\facade\Db; use think\facade\Db;
...@@ -220,13 +221,15 @@ class PayController ...@@ -220,13 +221,15 @@ class PayController
*/ */
public function alipayretuanurl() public function alipayretuanurl()
{ {
$get = input();
$biz_content['out_trade_no'] = $get['out_trade_no']; return redirect('https://www.kuajingxl.com');
$alipaySevice = new AlipayTradeService(); // $get = input();
$result = $alipaySevice->payquery($biz_content); // $biz_content['out_trade_no'] = $get['out_trade_no'];
if ($result->code == 10000 && $result->trade_status == 'TRADE_SUCCESS') { // $alipaySevice = new AlipayTradeService();
PayService::handlePaymentNotify($get['out_trade_no'], (array)$result); // $result = $alipaySevice->payquery($biz_content);
} // if ($result->code == 10000 && $result->trade_status == 'TRADE_SUCCESS') {
// PayService::handlePaymentNotify($get['out_trade_no'], (array)$result);
// }
} }
/** /**
......
...@@ -6,6 +6,7 @@ use app\api\middleware\Auth; ...@@ -6,6 +6,7 @@ use app\api\middleware\Auth;
use app\api\service\UtilService; use app\api\service\UtilService;
use app\api\validate\BusinessValidate; use app\api\validate\BusinessValidate;
use app\BaseController; use app\BaseController;
use app\model\project\School;
use app\Request; use app\Request;
use think\facade\Db; use think\facade\Db;
use app\model\project\User as UserModel; use app\model\project\User as UserModel;
...@@ -30,15 +31,41 @@ class User extends BaseController ...@@ -30,15 +31,41 @@ class User extends BaseController
} }
//获取学校信息
public function getSchoolInfo(Request $request)
{
$info = School::where(['user_id' => $request->userId, 'is_del' => '0'])
->with(['schoolQualification', 'schoolfrsfzqian', 'schoolfrsfzhou'])
->find();
return $this->returnMsg('操作成功', 1, $info);
}
//修改企业信息 //修改企业信息
public function editBusinessInfo(Request $request) public function editBusinessInfo(Request $request)
{ {
$vo = (new BusinessValidate())->goCheck(['frxm', 'qydm', 'frsfz', 'business_qualification_url_id']); $filed = ['frxm', 'qydm', 'frsfz', 'business_qualification_url_id','frsfz_qian','frsfz_hou','contacts_name','contacts_phone','contacts_email'];
if ($vo !== true) { // $vo = (new BusinessValidate())->goCheck(['frxm', 'qydm', 'frsfz', 'business_qualification_url_id']);
return $vo; // if ($vo !== true) {
} // return $vo;
$param = $request->param(); // }
$result = Business::where(['user_id' => $request->userId, 'is_del' => '0'])->update($param); $updatedata = $request->only($filed);
$result = Business::where(['user_id' => $request->userId, 'is_del' => '0'])->update($updatedata);
return $this->returnMsg('操作成功', 1, $result);
}
//修改学校信息
public function editSchoolInfo(Request $request)
{
$filed = ['frxm', 'qydm', 'frsfz', 'school_qualification_url_id','frsfz_qian','frsfz_hou','contacts_name','contacts_phone','contacts_email'];
// $vo = (new BusinessValidate())->goCheck(['frxm', 'qydm', 'frsfz', 'business_qualification_url_id']);
// if ($vo !== true) {
// return $vo;
// }
$updatedata = $request->only($filed);
$result = School::where(['user_id' => $request->userId, 'is_del' => '0'])->update($updatedata);
return $this->returnMsg('操作成功', 1, $result); return $this->returnMsg('操作成功', 1, $result);
} }
......
...@@ -73,6 +73,22 @@ class School extends Model ...@@ -73,6 +73,22 @@ class School extends Model
->field('fileid, filename, filesize, fileurl, filetype,fileext,storage'); ->field('fileid, filename, filesize, fileurl, filetype,fileext,storage');
} }
//法人身份证正面
public function schoolfrsfzqian()
{
return $this->hasOne(SystemUploadFile::class, 'fileid', 'frsfz_qian')
->where('isdel', 0)
->field('fileid,filename,filesize,fileurl,filetype,fileext,storage');
}
//法人身份证反面
public function schoolfrsfzhou()
{
return $this->hasOne(SystemUploadFile::class, 'fileid', 'frsfz_hou')
->where('isdel', 0)
->field('fileid,filename,filesize,fileurl,filetype,fileext,storage');
}
//合作协议 //合作协议
public function agreement() public function agreement()
{ {
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
return [ return [
// 应用地址 // 应用地址
'app_host' => '', 'app_host' => 'https://www.kuajingxl.com',
// 应用的命名空间 // 应用的命名空间
'app_namespace' => '', 'app_namespace' => '',
// 是否启用路由 // 是否启用路由
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment