From a15305d8f3edc762e8ee5fba6f2dd83814948ee9 Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Mon, 11 Sep 2023 11:26:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=BB=93=E7=AE=97=E5=91=A8?= =?UTF-8?q?=E6=9C=9F=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/dao/system/AppUpdateDao.php | 42 ++++++++++++++++++++++ app/common/model/system/AppUpdate.php | 20 +++++++++++ app/controller/admin/system/Lhapp.php | 34 ++++++++++++++++++ app/controller/api/community/Community.php | 14 ++------ route/admin/system.php | 19 ++++++++++ 5 files changed, 118 insertions(+), 11 deletions(-) create mode 100644 app/common/dao/system/AppUpdateDao.php create mode 100644 app/common/model/system/AppUpdate.php create mode 100644 app/controller/admin/system/Lhapp.php diff --git a/app/common/dao/system/AppUpdateDao.php b/app/common/dao/system/AppUpdateDao.php new file mode 100644 index 00000000..78db6032 --- /dev/null +++ b/app/common/dao/system/AppUpdateDao.php @@ -0,0 +1,42 @@ + +// +---------------------------------------------------------------------- + + +namespace app\common\dao\system; + + +use app\common\dao\BaseDao; +use app\common\model\BaseModel; +use app\common\model\system\AppUpdate; +use think\db\exception\DbException; + +/** + * Class AppUpdateDao + * @package app\common\dao\system + * @author xaboy + * @day 2020-04-24 + */ +class AppUpdateDao extends BaseDao +{ + + /** + * @return BaseModel + * @author xaboy + * @day 2020-03-30 + */ + protected function getModel(): string + { + return AppUpdate::class; + } + + +} diff --git a/app/common/model/system/AppUpdate.php b/app/common/model/system/AppUpdate.php new file mode 100644 index 00000000..e9b57ba2 --- /dev/null +++ b/app/common/model/system/AppUpdate.php @@ -0,0 +1,20 @@ + +// +---------------------------------------------------------------------- +namespace app\controller\admin\system; + +use app\common\repositories\system\LhappRepository; +use crmeb\basic\BaseController; +use think\App; + +class Lhapp extends BaseController +{ + /** + * @var LhappRepository + */ + protected $repository; + + /** + * CacheRepository constructor. + * @param App $app + */ + public function __construct(App $app, LhappRepository $repository) + { + parent::__construct($app); + $this->repository = $repository; + } + +} diff --git a/app/controller/api/community/Community.php b/app/controller/api/community/Community.php index de5fdcdc..4dd0f66a 100644 --- a/app/controller/api/community/Community.php +++ b/app/controller/api/community/Community.php @@ -780,20 +780,12 @@ class Community extends BaseController $queryBuilder->where('c.mer_status', 2); } $count = $queryBuilder->count(); - $list = $queryBuilder->setOption('field', [])->field(['c.community_id', 'c.uid', 'c.title', 'c.image', 'c.entrust_mer_id', 'm.credit_buy', 'm.settle_cycle', 'm.interest_rate', 'm.mer_name', 'm.mer_avatar', 'c.mer_status', 'c.entrust_order_id', 'c.entrust_finish', 'c.entrust_start_date'])->order('c.community_id', 'desc')->page($page, $limit)->fetchSql(false)->select(); + $list = $queryBuilder->setOption('field', [])->field(['c.community_id', 'c.uid', 'c.title', 'c.image', 'c.entrust_mer_id', 'c.mer_status', 'c.entrust_order_id', 'c.entrust_finish', 'c.entrust_start_date'])->order('c.community_id', 'desc')->page($page, $limit)->fetchSql(false)->select(); if ($list) $list = $list->toArray(); foreach($list as $k => $v) { $list[$k]['entrust_day'] = Db::name('entrust')->where('community_id', $v['community_id'])->value('entrust_day', 0); - // type:1发起的委托 2收到的委托 - if ($type == 2) { - $merchantInfo = Db::name('merchant')->where('uid', $v['uid'])->find(); - // 这个地方可能需要变更 - $list[$k]['credit_buy'] = $merchantInfo['credit_buy'] ?? 0; - $list[$k]['settle_cycle'] = $merchantInfo['settle_cycle'] ?? 0; - $list[$k]['interest_rate'] = $merchantInfo['interest_rate'] ?? 0; - $list[$k]['mer_name'] = $merchantInfo['mer_name'] ?? ''; - $list[$k]['mer_avatar'] = $merchantInfo['mer_avatar'] ?? ''; - } + $list[$k]['mer_info'] = Db::name('merchant')->where('uid', $v['uid'])->where('is_del', 0)->field(['mer_id', 'mer_name', 'mer_address', 'mer_avatar', 'credit_buy', 'settle_cycle', 'interest_rate'])->find(); + $list[$k]['entrust_mer_info'] = Db::name('merchant')->where('mer_id', $v['entrust_mer_id'])->where('is_del', 0)->field(['mer_id', 'mer_name', 'mer_address', 'mer_avatar', 'credit_buy', 'settle_cycle', 'interest_rate'])->find(); } return app('json')->success(compact('count', 'list')); } diff --git a/route/admin/system.php b/route/admin/system.php index 72454e52..59cdad37 100644 --- a/route/admin/system.php +++ b/route/admin/system.php @@ -169,6 +169,25 @@ Route::group(function () { '_auth' => true, ]); + // APP版本管理 + // Route::group('app/version', function () { + // Route::get('lst', '/list')->name('appVersionList')->option([ + // '_alias' => 'APP版本列表', + // ]); + // Route::get('detail/:id', '/detail')->name('appVersionDetail')->option([ + // '_alias' => 'APP版本详情', + // ]); + // Route::post('add', '/add')->name('appVersionAdd')->option([ + // '_alias' => '新增APP版本', + // ]); + // Route::post('edit/:id', '/edit')->name('appVersionEdit')->option([ + // '_alias' => '编辑APP版本', + // ]); + // })->prefix('admin.system.Lhapp')->option([ + // '_path' => '/app/version', + // '_auth' => true, + // ]); + Route::group(function () { Route::get('menus', 'admin.system.auth.Menu/menus');