更新结算周期判断
This commit is contained in:
parent
39de61cb98
commit
a15305d8f3
42
app/common/dao/system/AppUpdateDao.php
Normal file
42
app/common/dao/system/AppUpdateDao.php
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | Author: CRMEB Team <admin@crmeb.com>
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
20
app/common/model/system/AppUpdate.php
Normal file
20
app/common/model/system/AppUpdate.php
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\common\model\system;
|
||||||
|
|
||||||
|
use app\common\model\BaseModel;
|
||||||
|
|
||||||
|
class AppUpdate extends BaseModel
|
||||||
|
{
|
||||||
|
|
||||||
|
public static function tablePk(): string
|
||||||
|
{
|
||||||
|
return 'id';
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function tableName(): string
|
||||||
|
{
|
||||||
|
return 'app_update';
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
34
app/controller/admin/system/Lhapp.php
Normal file
34
app/controller/admin/system/Lhapp.php
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
<?php
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
// | Author: CRMEB Team <admin@crmeb.com>
|
||||||
|
// +----------------------------------------------------------------------
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -780,20 +780,12 @@ class Community extends BaseController
|
|||||||
$queryBuilder->where('c.mer_status', 2);
|
$queryBuilder->where('c.mer_status', 2);
|
||||||
}
|
}
|
||||||
$count = $queryBuilder->count();
|
$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();
|
if ($list) $list = $list->toArray();
|
||||||
foreach($list as $k => $v) {
|
foreach($list as $k => $v) {
|
||||||
$list[$k]['entrust_day'] = Db::name('entrust')->where('community_id', $v['community_id'])->value('entrust_day', 0);
|
$list[$k]['entrust_day'] = Db::name('entrust')->where('community_id', $v['community_id'])->value('entrust_day', 0);
|
||||||
// type:1发起的委托 2收到的委托
|
$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();
|
||||||
if ($type == 2) {
|
$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();
|
||||||
$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'] ?? '';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return app('json')->success(compact('count', 'list'));
|
return app('json')->success(compact('count', 'list'));
|
||||||
}
|
}
|
||||||
|
@ -169,6 +169,25 @@ Route::group(function () {
|
|||||||
'_auth' => true,
|
'_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::group(function () {
|
||||||
|
|
||||||
Route::get('menus', 'admin.system.auth.Menu/menus');
|
Route::get('menus', 'admin.system.auth.Menu/menus');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user